Stichting-MINIX-Research-Foundation / minix

Official MINIX sources - Automatically replicated from gerrit.minix3.org
Other
3.02k stars 970 forks source link

e1000 driver not working on my on-board NIC #72

Open mnakama opened 9 years ago

mnakama commented 9 years ago

Doing a bare-metal install to my i7 system (not qemu or virtualbox), netconf auto-detects my network card as e1000. I setup everything for static IP, using netconf, like so:

ip: 192.168.2.50 netmask: 255.255.255.0 gateway: 192.168.2.1 nameserver: 192.168.2.1 nameserver2: [blank]

Then I reboot. When the system comes back up, I try to ping or do DNS lookups, but everything fails with "no route to host". I can ping my own IP, 192.168.2.50, but all others fail.

I've also installed minix in a virtual machine in qemu, using the same e1000 driver, and it works perfectly in the virtual machine. It seems that the driver is missing support for my real hardware chipset.

Here's the output from linux lspci on the same machine (non-virtual) from linux:

$ sudo lspci -vknn 00:19.0 Ethernet controller [0200]: Intel Corporation 82567LF-2 Gigabit Network Connection [8086:10cd] Subsystem: Acer Incorporated [ALI] Device [1025:0198] Flags: bus master, fast devsel, latency 0, IRQ 29 Memory at f9dc0000 (32-bit, non-prefetchable) [size=128K] Memory at f9df2000 (32-bit, non-prefetchable) [size=4K] I/O ports at a080 [size=32] Capabilities: [c8] Power Management version 2 Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+ Capabilities: [e0] PCI Advanced Features Kernel driver in use: e1000e Kernel modules: e1000e

8086:10cd is listed in the e1000.conf in the source, so it seems that it claims to support the card.

mnakama commented 9 years ago

Following advice from Saturn, stux, sambuc, and zacts from #minix, I brought down minix CURRENT and built it from source. I changed a line in e1000.h to say ""#define E1000_VERBOSE = 4" and rebuilt the driver, then I booted minix from bare metal again.

Here are two screenshots of the system after it just booted to login prompt: bootup_cleanshot

bootup_fullscreen

Here's a screenshot of me trying to refresh the driver, followed by an attempt to ping something: refresh and ping

It looks like the driver does mostly fine on boot, but it fails to DHCP (ifconfig showed no IP set), and it fails to ping or connect to anything with static IP. I don't get any interrupt messages on the console during the ping. In the qemu environment testing the same e1000 driver, I did get interrupt messages while using ssh and any other networking program.

That's all the testing I know how to do... I'm kind of new to minix. Can anyone direct me to what to try next? I haven't programmed a device driver before, but I know C and C++.

etherfoundry commented 9 years ago

I had a similar problem (same error message re: alarm clock, same DHCP failure) with my install, except with VirtualBox and the AMD Lance adapter.

The problem ended up being that I had selected the ICH9 chipset. Changing it to PIIX resolved my issue. Do you know what machine type you specified? Check '-machine help', try using i440FX + PIIX.

Hope this helps.

mnakama commented 9 years ago

Thanks for the response. I forgot to explicitly state in my first comment that I'm installing to my bare-metal/real hardware machine, not a VM. I can't really change the chipset without buying a PCI-Express ethernet card. e1000e is such a common 1gb ethernet chip that it's strange to not have proper support in minix.

I can get virtual machines working fine... but I don't think there's much value in a self-healing operating system that runs on a vm in a less stable OS =).

I wanted to do some actual debugging and problem determination on the driver and my PC, but it's hard to squeeze in hobby work when I've got so much job work to do =(.