Ticket #1750 (closed bug: fixed)

Opened 11 months ago

Last modified 11 months ago

PXE Boot Crashes in ipro1000 Driver

Reported by: bonefish Owned by: axeld
Priority: normal Milestone: R1
Component: System/Kernel Version: R1 development
Cc: Blocked By:
Platform: x86 Blocking:

Description

Revision r23880 (+r23883). Reproducible on real hardware and in VMware.

When booting via PXE with the ipro1000 driver responsible for the network adapter, two instances of the driver are loaded: The first one from the netboot archive, the second one from the boot disk, when it has been mounted. Somewhere in its uninit_driver() the second instance causes a page fault.

I'm not sure who's to blame. The driver probably shouldn't be loaded a second time (devfs) and only one driver should be allowed to play with the hardware (device manager?), but, unless I'm mistaken, the situation didn't really change in this respect since PXE support was added, and it worked once.

Removing the driver from the disk image avoids the problem, as expected.

Attached is the serial debug output. The "add_driver()" lines originate from devfs:add_driver(), where I added the respective dprintf().

Attachments

serial (46.1 KB) - added by bonefish 11 months ago.
serial debug output

Change History

Changed 11 months ago by bonefish

serial debug output

Changed 11 months ago by marcusoverhagen

  • owner marcusoverhagen deleted

This is the current freebsd ipro1000/em1000 driver, not the one that I originally ported.

However, I think this is a bug in the device manager.

The driver is loaded twice (because is has a different path?) and the first one isn't uninitialized before the second one is loaded. That can easily lead to problems.

314 add_driver("/boot/beos/system/add-ons/kernel/ipro1000", 24) 317 ipro1000: init_driver(0x815717c4) 324 [ipro1000] ipro1000: /dev/net/ipro1000/0

892 add_driver("/boot/beos/system/add-ons/kernel/drivers/dev/net/ipro1000", -1) 895 ipro1000: init_driver(0x808317c4) 900 [ipro1000] ipro1000: /dev/net/ipro1000/0 911 ipro1000: uninit_driver(0x808317c4)

Changed 11 months ago by axeld

  • owner set to axeld
  • status changed from new to assigned
  • component changed from Drivers/Network to System/Kernel

devfs::add_driver() is actually checking if it already knows that driver. But since that check is inode based, it won't work with preloaded drivers (and guess who added that one :-)). It also won't work with home vs. system drivers, though, so it's a general bug in devfs; it should use the name of the driver instead.

Changed 11 months ago by axeld

  • status changed from assigned to closed
  • resolution set to fixed

Should be fixed in r23892.

Note: See TracTickets for help on using tickets.