Re: [Etherboot-developers] UNDI driver
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Michael B. <mb...@fe...> - 2003-05-19 23:55:27
|
> But as there's a common context for all these initialisations, the > upshot is that though we actually find nic 0, but we use the context > (MAC address etc) from the LAST nic in the search order (or rather, the > last nic that initialised). This doesn't make a lot of sense; only one UNDI driver should ever get initialised (unless it fails to boot and another one is given a chance), and the BIOS should pass the PCI bus, device and function number in AX when it calls the first two initialisation routines. The UNDI driver should then use this information to locate its hardware, from which it can extract its MAC address. Not that it matters, given that Etherboot doesn't suffer from this particular problem, but it's a curiosity. Incidentally, the interaction between multiple UNDI ROMs and multiple NICs is not well defined in Etherboot at the moment. UNDI ROMs will be tried sequentially; if one fails to boot then the next will be tried the next time probe() is called. However, if we have two NICs and two UNDI ROMs, this means that they will be tried in the following combination: NIC 1, UNDI ROM A NIC 2, UNDI ROM B where there is no necessary connection between NIC 1 and UNDI ROM A other than that NIC 1 is the first NIC found in the system and UNDI ROM A is the first UNDI ROM found in the system (which won't necessarily belong to NIC 1). Theoretically, it's possible to use romaddr from the PCI device to locate the ROM, but I always seem to get a zero in romaddr, even when the ROM can be detected by scanning. What we probably want to do is try combinations in the following order: NIC 1, UNDI ROM A NIC 2, UNDI ROM A NIC 1, UNDI ROM B NIC 2, UNDI ROM B which could be achieved by judicious use of a few static variables. However, in the case when NICs 1 and 2 are of different types, we could have problems: the UNDI ROMs may not bother to check that the hardware device specified by AX is of the correct type before they start setting registers etc... Michael |