Skip to contentSkip to conversation

openbsd image on freeoszoo

Qemu-devel Jim C. Brown 6 participants 14 messages Jul 9, 2004 – Jul 12, 2004

lore
Share & tools
lore
#0 lore raw

My apologies but I don't have the email address of the FreeOSZoo maintainer. I merely want to make some comments that might help make improvements.

For the openbsd image, I find that it is necessary to disable DMA for the pciide device (using flag 0x0fcc). Otherwise it is only possible to boot into ISA mode.

Also, (at least for ISA mode - havent tried using apm in PCI mode yet) I have to disable the apm0 device or else I get lots of "Error - Unknown result - 83" messages spamming my screen. (This is not verbatim btw, only from my bad memory.)

I also get lots of "remote transmit DMA failed to complete" errors, for both the ISA and the PCI nic. I haven't solved this one yet but it seems harmless. (For the ISA nic, it seems that it MUST be called ne2 btw or network won't work.) For the PCI nic, I also get "send_packet: Input/output error", not solved yet either.

None of these problems appear on the NetBSD image.

For the OpenBSD ISA nic, it seems to ignore the -macaddr parameter??? PCI nic does the right thing. (NetBSD's PCI nic also seems to ignore this, tho I haven't tried to pass it manually yet).

For both images, it might be a good idea to set it up to use dhcp by default, instead of hardcoding a network address.

For the most part, I have been very happy with the openbsd image ... it is great for hacking on. :)

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#1 lore raw
Quoted 6 lines · Jim C. Brown

I also get lots of "remote transmit DMA failed to complete" errors, for both the ISA and the PCI nic. I haven't solved this one yet but it seems harmless. (For the ISA nic, it seems that it MUST be called ne2 btw or network won't work.) For the PCI nic, I also get "send_packet: Input/output error", not solved yet either.

Fixed in qemu. Attached is the patch that fixes it. This looks like a bug in qemu, as it transfers an odd number of bytes in words, leaving a count of -1 when done. But if so, it has never been caught before...

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
hw/ne2000.c +6 -6
@@ -447,7 +447,7 @@
 #ifdef DEBUG_NE2000
     printf("NE2000: asic write val=0x%04x\n", val);
 #endif
-    if (s->rcnt == 0)
+    if ((s->rcnt == 0) || (s->rcnt == (uint16_t)-1))
 	    return;
     if (s->dcfg & 0x01) {
         /* 16 bit access */
@@ -463,7 +463,7 @@
     /* wrap */
     if (s->rsar == s->stop)
         s->rsar = s->start;
-    if (s->rcnt == 0) {
+    if ((s->rcnt == 0) || (s->rcnt == (uint16_t)-1)) {
         /* signal end of transfert */
         s->isr |= ENISR_RDC;
         ne2000_update_irq(s);
@@ -489,7 +489,7 @@
     /* wrap */
     if (s->rsar == s->stop)
         s->rsar = s->start;
-    if (s->rcnt == 0) {
+    if ((s->rcnt == 0) || (s->rcnt == (uint16_t)-1)) {
         /* signal end of transfert */
         s->isr |= ENISR_RDC;
         ne2000_update_irq(s);
@@ -507,7 +507,7 @@
 #ifdef DEBUG_NE2000
     printf("NE2000: asic writel val=0x%04x\n", val);
 #endif
-    if (s->rcnt == 0)
+    if ((s->rcnt == 0) || (s->rcnt == (uint16_t)-1))
 	    return;
     /* 32 bit access */
     ne2000_mem_writel(s, s->rsar, val);
@@ -516,7 +516,7 @@
     /* wrap */
     if (s->rsar == s->stop)
         s->rsar = s->start;
-    if (s->rcnt == 0) {
+    if ((s->rcnt == 0) || (s->rcnt == (uint16_t)-1)) {
         /* signal end of transfert */
         s->isr |= ENISR_RDC;
         ne2000_update_irq(s);
@@ -536,7 +536,7 @@
     /* wrap */
     if (s->rsar == s->stop)
         s->rsar = s->start;
-    if (s->rcnt == 0) {
+    if ((s->rcnt == 0) || (s->rcnt == (uint16_t)-1)) {
         /* signal end of transfert */
         s->isr |= ENISR_RDC;
         ne2000_update_irq(s);
#2 lore raw
Quoted 10 lines · Jim C. Brown
Quoted 5 lines · Jim C. Brown

I also get lots of "remote transmit DMA failed to complete" errors, for both the ISA and the PCI nic. I haven't solved this one yet but it seems harmless. (For the ISA nic, it seems that it MUST be called ne2 btw or network won't work.) For the PCI nic, I also get "send_packet:
Input/output error", not solved yet either.

Fixed in qemu. Attached is the patch that fixes it. This looks like a bug in qemu, as it transfers an odd number of bytes in words, leaving a count of -1 when done. But if so, it has never been caught before...

Are you sure this is really right (or is the right solution to the problem) ? I had networking working in WinXP fine. When I installed the patch, it stopped working. Backing out the patch caused it to start working again. Any ideas?

J

#3 lore raw
Quoted 12 lines · Julian Seward
Quoted 10 lines · Jim C. Brown
Quoted 5 lines · Jim C. Brown

I also get lots of "remote transmit DMA failed to complete" errors, for both the ISA and the PCI nic. I haven't solved this one yet but it seems harmless. (For the ISA nic, it seems that it MUST be called ne2 btw or network won't work.) For the PCI nic, I also get "send_packet:
Input/output error", not solved yet either.

Fixed in qemu. Attached is the patch that fixes it. This looks like a bug in qemu, as it transfers an odd number of bytes in words, leaving a count of -1 when done. But if so, it has never been caught before...

Quoted 8 lines

Are you sure this is really right (or is the right solution to the problem) ? I had networking working in WinXP fine. When I installed the patch, it stopped working. Backing out the patch caused it to start working again. Any ideas?

J

Even when it works, it's the wrong fix. It was just a short hack to get OpenBSD working.

Quoted 4 lines

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#4 lore raw
In reply to Jim C. Brown
Quoted 9 lines · Jim C. Brown
Quoted 5 lines · Jim C. Brown

I also get lots of "remote transmit DMA failed to complete" errors, for both the ISA and the PCI nic. I haven't solved this one yet but it seems harmless. (For the ISA nic, it seems that it MUST be called ne2 btw or network won't work.) For the PCI nic, I also get "send_packet: Input/output error", not solved yet either.

Quoted 3 lines

Fixed in qemu. Attached is the patch that fixes it. This looks like a bug in qemu, as it transfers an odd number of bytes in words, leaving a count of -1 when done. But if so, it has never been caught before...

I just commited a better fix. Try it.

Fabrice.

#5 lore raw
Quoted 12 lines · Fabrice Bellard
Quoted 11 lines · Jim C. Brown
Quoted 7 lines · Jim C. Brown

I also get lots of "remote transmit DMA failed to complete" errors, for both the ISA and the PCI nic. I haven't solved this one yet but it seems harmless. (For the ISA nic, it seems that it MUST be called ne2 btw or network
won't work.) For the PCI nic, I also get "send_packet: Input/output error",
not solved yet either.

Quoted 10 lines
Quoted 4 lines

Fixed in qemu. Attached is the patch that fixes it. This looks like a bug in qemu, as it transfers an odd number of bytes in words, leaving a count of
-1 when done. But if so, it has never been caught before...

I just commited a better fix. Try it.

Fabrice.

It works great. Thanks!

Quoted 5 lines

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#6 lore raw

Re: [Qemu-devel] cvs cpu-exec.c (bug?)

In reply to Fabrice Bellard

I have just returned from a conference and I have just checked out the latest version from the cvs.

My compiler refused to compile the cpu-exec.c without the following trivial patch, in line 906:

<int cpu_signal_handler(int host_signum, siginfo *info,
< void *puc)

Quoted 2 lines

int cpu_signal_handler(int host_signum, struct siginfo *info,
void *puc)

the keyword "struct" is missing defining the argument named info. Maybe several other compilers have the implicit typedef on structs and give either no error or just a warning.

For the sake of portability (and consistency, siginfo is always named as "struct" in the remaining of the code) I feel it should be better to fix it.

Thanks. Ciao.
renzo

#7 lore raw
In reply to Fabrice Bellard
Quoted 8 lines · Fabrice Bellard
Quoted 7 lines · Jim C. Brown
Quoted 5 lines · Jim C. Brown

I also get lots of "remote transmit DMA failed to complete" errors, for both the ISA and the PCI nic. I haven't solved this one yet but it seems harmless. (For the ISA nic, it seems that it MUST be called ne2 btw or network won't work.) For the PCI nic, I also get "send_packet:
Input/output error", not solved yet either.

Quoted 5 lines
Quoted 3 lines

Fixed in qemu. Attached is the patch that fixes it. This looks like a bug in qemu, as it transfers an odd number of bytes in words, leaving a count of -1 when done. But if so, it has never been caught before...

I just commited a better fix. Try it.

Hmm. The fix is ne2000.c rev 1.12. This makes (user mode) networking in XP guest not work for me. Reverting to rev 1.11 makes networking work again. I tried this twice to be sure. This is on a SuSE 9.1 host.

J

#8 lore raw
Quoted 9 lines · Julian Seward
Quoted 1 line

I just commited a better fix. Try it.

Hmm. The fix is ne2000.c rev 1.12. This makes (user mode) networking in XP guest not work for me. Reverting to rev 1.11 makes networking work again. I tried this twice to be sure. This is on a SuSE 9.1 host.

J

What host OS are you using? And does tuntap networking work correctly?

Also, can you download the openbsd image from freeoszoo and tell us if user mode networking works (both with and without the patch) ?

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#9 lore raw

Euh, well, QEMU keeps crashing my X server, and I have other stuff to do, so I kinda gave up. What I can say is even with rev 1.11, using user mode networking, network throughput seems slow, erratic and connections often time out after a while. All this makes me wonder if the simulated network card is not losing packets, causing retries/timeouts in the higher level protocol layers. All this is still with XP as a guest, btw.

J

Quoted 14 lines · you
Quoted 8 lines · Julian Seward
Quoted 1 line

I just commited a better fix. Try it.

Hmm. The fix is ne2000.c rev 1.12. This makes (user mode) networking in XP guest not work for me. Reverting to rev 1.11 makes networking work again. I tried this twice to be sure. This is on a SuSE 9.1 host.

J

What host OS are you using? And does tuntap networking work correctly?

Also, can you download the openbsd image from freeoszoo and tell us if user mode networking works (both with and without the patch) ?

#10 lore raw
In reply to Jim C. Brown
Quoted 5 lines · Jim C. Brown

My apologies but I don't have the email address of the FreeOSZoo maintainer. I merely want to make some comments that might help make improvements.

Hi Jim,

thanks for your report, I have no openbsd skill [that's one of the images I want to try asap] so I won't be able to help for now. Contacts are listed in the community page.

@Jean-Michel, this report makes me think to one of our last thread concerning freeoszoo security concern, that may be helpful to have a "maintainer" notion so that people stay "responsibles" (I mean they at least want to take care of evolutions and or bug reported by users & developers) of uploads they do ? It does not mean in any case that anybody should not help anymore, it's just a kind of trace of what was done by who and how.

What do you (all of you) think about it ?

Have a nice day and have fun!

Raphaël
http://freeoszoo.org/~blacknoz

#11 lore raw
In reply to Jim C. Brown

Il giorno 10/lug/04, alle 01:18, Jim C. Brown ha scritto:

Quoted 4 lines

For the openbsd image, I find that it is necessary to disable DMA for the pciide device (using flag 0x0fcc). Otherwise it is only possible to boot into ISA mode.

Hi. I installed the image. At the time I installed it, I didn't get that error. Now I get it, and think it's due to the apm support.

Stefano

P.S.: there's openbsd 3.5 online, but we have to update the webpage. Just download it at ftp://ftp.zoo.students.cs.unibo.it

Stefano

#12 lore raw
Quoted 11 lines · Stefano Marinelli

Il giorno 10/lug/04, alle 01:18, Jim C. Brown ha scritto:

Quoted 4 lines

For the openbsd image, I find that it is necessary to disable DMA for the pciide device (using flag 0x0fcc). Otherwise it is only possible to boot into ISA mode.

Hi. I installed the image. At the time I installed it, I didn't get that error. Now I get it, and think it's due to the apm support.

Stefano

I disabled apm0 but I got it either way. Hmm...

Quoted 3 lines

P.S.: there's openbsd 3.5 online, but we have to update the webpage. Just download it at ftp://ftp.zoo.students.cs.unibo.it

That site doesnt exist.......

Quoted 9 lines

Stefano

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#13 lore raw

Il giorno 11/lug/04, alle 02:53, Jim C. Brown ha scritto:

Quoted 5 lines
Quoted 2 lines

P.S.: there's openbsd 3.5 online, but we have to update the webpage. Just download it at ftp://ftp.zoo.students.cs.unibo.it

That site doesnt exist.......

Sorrry,it was late night. It's ftp://zoo.students.cs.unibo.it

Stefano