Discussion:
NetBSD 5.1 RC1 wm0 with Xen 4.0.0
(too old to reply)
Xavier Beaudouin
2010-05-07 10:56:29 UTC
Permalink
Hi there,

I'd like to make NetBSD 5.1 RC1 running under Xen 4.0.0, but it seems I have this kind of error under hvm :

wm0 at pci0 dev 4 function 0: Intel i82540EM 1000BASE-T Ethernet, rev 3
wm0: interrupting at ioapic0 pin 32
wm0: 32-bit 33Mhz PCI bus
wm0: No EEPROM
wm0: unable to read Ethernet address

Is there any issue with Xen 4.0.0 as DomU with NetBSD 5.1 ? Because it is strange that Intel Pro 1000 is not detected on NetBSD, but it detected on FreeBSD... :)

Thanks,
Xavier

--
Xavier Beaudouin - ***@soprive.net
GPG Fingerprints : A6B2 D563 F93B A3AF C08A CBAC 6BC6 79EB DCC9 9867


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Izumi Tsutsui
2010-05-07 13:25:08 UTC
Permalink
Post by Xavier Beaudouin
wm0 at pci0 dev 4 function 0: Intel i82540EM 1000BASE-T Ethernet, rev 3
wm0: interrupting at ioapic0 pin 32
wm0: 32-bit 33Mhz PCI bus
wm0: No EEPROM
wm0: unable to read Ethernet address
Just FYI, qemu-0.12.3 seems to have the similar problem:

---
NetBSD 5.1_RC1 (GENERIC) #0: Sat Apr 24 23:26:09 UTC 2010
***@b7.netbsd.org:/home/builds/ab/netbsd-5-1-RC1/i386/201004250032Z-obj/home/builds/ab/netbsd-5-1-RC1/src/sys/arch/i386/compile/GENERIC
total memory = 127 MB
avail memory = 113 MB
Bochs Bochs

:

drm at vga1 not configured
wm0 at pci0 dev 3 function 0: Intel i82540EM 1000BASE-T Ethernet, rev. 3
wm0: interrupting at irq 11
wm0: unable to read Ethernet address
isa0 at pcib0

:

---
Izumi Tsutsui

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Xavier Beaudouin
2010-05-07 13:33:24 UTC
Permalink
Hi there,
Post by Izumi Tsutsui
Post by Xavier Beaudouin
wm0 at pci0 dev 4 function 0: Intel i82540EM 1000BASE-T Ethernet, rev 3
wm0: interrupting at ioapic0 pin 32
wm0: 32-bit 33Mhz PCI bus
wm0: No EEPROM
wm0: unable to read Ethernet address
Since I am based on qemu-0.11.0 it is maybe the reason why.... :)

Maybe NetBSD can handle better a different nic?

/Xavier
Post by Izumi Tsutsui
---
NetBSD 5.1_RC1 (GENERIC) #0: Sat Apr 24 23:26:09 UTC 2010
total memory = 127 MB
avail memory = 113 MB
Bochs Bochs
drm at vga1 not configured
wm0 at pci0 dev 3 function 0: Intel i82540EM 1000BASE-T Ethernet, rev. 3
wm0: interrupting at irq 11
wm0: unable to read Ethernet address
isa0 at pcib0
---
Izumi Tsutsui
--
Xavier Beaudouin - ***@soprive.net
GPG Fingerprints : A6B2 D563 F93B A3AF C08A CBAC 6BC6 79EB DCC9 9867


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Izumi Tsutsui
2010-05-07 16:36:24 UTC
Permalink
Post by Xavier Beaudouin
Post by Xavier Beaudouin
wm0 at pci0 dev 4 function 0: Intel i82540EM 1000BASE-T Ethernet, rev 3
wm0: interrupting at ioapic0 pin 32
wm0: 32-bit 33Mhz PCI bus
wm0: No EEPROM
wm0: unable to read Ethernet address
Since I am based on qemu-0.11.0 it is maybe the reason why.... :)
Maybe NetBSD can handle better a different nic?
Or fix qemu?


--- qemu-0.12.3/hw/e1000.c.orig 2010-02-24 05:54:38.000000000 +0900
+++ qemu-0.12.3/hw/e1000.c 2010-05-08 01:29:53.000000000 +0900
@@ -259,6 +259,12 @@

s->eecd_state.old_eecd = val & (E1000_EECD_SK | E1000_EECD_CS |
E1000_EECD_DI|E1000_EECD_FWE_MASK|E1000_EECD_REQ);
+ if ((E1000_EECD_CS & (val ^ oldval))) { // EEPROM reset on CS edge
+ s->eecd_state.bitnum_in = 0;
+ s->eecd_state.bitnum_out = 0;
+ s->eecd_state.reading = 0;
+ return;
+ }
if (!(E1000_EECD_SK & (val ^ oldval))) // no clock edge
return;
if (!(E1000_EECD_SK & val)) { // falling edge


---
Izumi Tsutsui

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Izumi Tsutsui
2010-05-07 19:31:44 UTC
Permalink
Post by Izumi Tsutsui
Or fix qemu?
Well, this one would be better per Microwire spec:

--- qemu-0.12.3/hw/e1000.c.orig 2010-02-24 05:54:38.000000000 +0900
+++ qemu-0.12.3/hw/e1000.c 2010-05-08 04:04:39.000000000 +0900
@@ -259,21 +259,20 @@

s->eecd_state.old_eecd = val & (E1000_EECD_SK | E1000_EECD_CS |
E1000_EECD_DI|E1000_EECD_FWE_MASK|E1000_EECD_REQ);
+ if (!(E1000_EECD_CS & val)) // CS inactive; nothing to do
+ return;
+ if (E1000_EECD_CS & (val ^ oldval)) { // CS rise edge; reset state
+ s->eecd_state.val_in = 0;
+ s->eecd_state.bitnum_in = 0;
+ s->eecd_state.bitnum_out = 0;
+ s->eecd_state.reading = 0;
+ }
if (!(E1000_EECD_SK & (val ^ oldval))) // no clock edge
return;
if (!(E1000_EECD_SK & val)) { // falling edge
s->eecd_state.bitnum_out++;
return;
}
- if (!(val & E1000_EECD_CS)) { // rising, no CS (EEPROM reset)
- memset(&s->eecd_state, 0, sizeof s->eecd_state);
- /*
- * restore old_eecd's E1000_EECD_SK (known to be on)
- * to avoid false detection of a clock edge
- */
- s->eecd_state.old_eecd = E1000_EECD_SK;
- return;
- }
s->eecd_state.val_in <<= 1;
if (val & E1000_EECD_DI)
s->eecd_state.val_in |= 1;


---
Izumi Tsutsui

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Izumi Tsutsui
2010-08-07 16:58:22 UTC
Permalink
Post by Izumi Tsutsui
Post by Xavier Beaudouin
Post by Xavier Beaudouin
wm0 at pci0 dev 4 function 0: Intel i82540EM 1000BASE-T Ethernet, rev 3
wm0: interrupting at ioapic0 pin 32
wm0: 32-bit 33Mhz PCI bus
wm0: No EEPROM
wm0: unable to read Ethernet address
Since I am based on qemu-0.11.0 it is maybe the reason why.... :)
Maybe NetBSD can handle better a different nic?
Or fix qemu?
FYI, qemu-0.13.x will include a fix for this problem.
(i.e. NetBSD's wm(4) will work on it)
---
Izumi Tsutsui

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Takahiro Kambe
2010-09-12 14:01:12 UTC
Permalink
In message <***@mirage.ceres.dti.ne.jp>
on Sun, 8 Aug 2010 01:58:22 +0900,
Post by Izumi Tsutsui
Post by Izumi Tsutsui
Post by Xavier Beaudouin
Post by Xavier Beaudouin
wm0 at pci0 dev 4 function 0: Intel i82540EM 1000BASE-T Ethernet, rev 3
wm0: interrupting at ioapic0 pin 32
wm0: 32-bit 33Mhz PCI bus
wm0: No EEPROM
wm0: unable to read Ethernet address
Since I am based on qemu-0.11.0 it is maybe the reason why.... :)
Maybe NetBSD can handle better a different nic?
Or fix qemu?
FYI, qemu-0.13.x will include a fix for this problem.
(i.e. NetBSD's wm(4) will work on it)
Is there any work around by NetBSD side?
--
Takahiro Kambe <***@back-street.net>

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Takahiro Kambe
2010-09-12 16:06:27 UTC
Permalink
In message <***@back-street.net>
on Sun, 12 Sep 2010 23:19:42 +0900 (JST),
on Sun, 12 Sep 2010 23:14:49 +0900,
Post by Takahiro Kambe
Post by Izumi Tsutsui
FYI, qemu-0.13.x will include a fix for this problem.
(i.e. NetBSD's wm(4) will work on it)
Is there any work around by NetBSD side?
Wow, thanks!
It works! (there still another problem, wm(4) looks OK.)
--
Takahiro Kambe <***@back-street.net>

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Erik Berls
2011-10-24 05:04:03 UTC
Permalink
Yup, I know this is over a year old, but is there any reason not to
commit this for those of us who need to run under older versions of
Xen?

(This solves a Xen 3.3.0 issue for me.)

-=erik.
       on Sun, 12 Sep 2010 23:19:42 +0900 (JST),
      on Sun, 12 Sep 2010 23:14:49 +0900,
Post by Takahiro Kambe
Post by Izumi Tsutsui
FYI, qemu-0.13.x will include a fix for this problem.
(i.e. NetBSD's wm(4) will work on it)
Is there any work around by NetBSD side?
Wow, thanks!
It works!  (there still another problem, wm(4) looks OK.)
--
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Izumi Tsutsui
2011-10-24 11:31:59 UTC
Permalink
Post by Erik Berls
Yup, I know this is over a year old, but is there any reason not to
commit this for those of us who need to run under older versions of
Xen?
I wonder how we can detect if running host is QEMU in the driver...
(i82540EM + MAC, or enable the workaround once after EEPROM fails without it?)
not sure if it could cause bad side effect on the real hardware.

(it worked fine on my old DELL, but someone could still bikeshed it ;-p)

---
Izumi Tsutsui

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...