Opened 17 years ago

Closed 17 years ago

#1750 closed bug (fixed)

PXE Boot Crashes in ipro1000 Driver

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

Description

Revision hrev23880 (+hrev23883). 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 (1)

serial (46.1 KB ) - added by bonefish 17 years ago.
serial debug output

Download all attachments as: .zip

Change History (4)

by bonefish, 17 years ago

Attachment: serial added

serial debug output

comment:1 by marcusoverhagen, 17 years ago

Owner: marcusoverhagen removed

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)

comment:2 by axeld, 17 years ago

Component: Drivers/NetworkSystem/Kernel
Owner: set to axeld
Status: newassigned

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.

comment:3 by axeld, 17 years ago

Resolution: fixed
Status: assignedclosed

Should be fixed in hrev23892.

Note: See TracTickets for help on using tickets.