Re: [Etherboot-developers] Q: Multiple drivers.
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: <ebi...@ln...> - 2001-12-06 23:07:05
|
ke...@us... (Ken Yap) writes:
> >Hmm. Then it isn't intentional that etherboot always boots the first
> >NIC of that type in the system?
>
> If it does it's by accident.
This is the code in question.
For PCI (the common case) it always grabs the NIC with the lowest
address on the pcibus. The Boot Bios specification provices
information on which pci device to use but currently we don't use it.
int eth_probe(void)
{
struct pci_device *p;
const struct dispatch_table *t;
p = 0;
eth_pci_init(pci_nic_list);
pci_ioaddrs[0] = 0;
pci_ioaddrs[1] = 0;
/* at this point we have a list of possible PCI candidates
we just pick the first one with a non-zero ioaddr */
for (p = pci_nic_list; p->vendor != 0; ++p) {
if (p->ioaddr != 0) {
pci_ioaddrs[0] = p->ioaddr;
break;
}
}
printf("Probing...");
for (t = NIC; t->nic_name != 0; ++t)
{
printf("[%s]", t->nic_name);
if ((*t->eth_probe)(&nic, t->probe_ioaddrs, p)) {
return (1);
}
}
return (0);
}
> A case in point is my firewall with two
> 3c509 NICs. Currently Etherboot always boots the first detected NIC,
> using 3com's recommended probe algorithm, which resolves the address of
> all 3c509s on the bus one bit at a time, and is the same algorithm used
> in the Becker driver.
????
> So I have to be careful to put Etherboot on the
> first detected NIC on the system. Otherwise I could send out the request
> to the cable modem, which would give me an address, but would be useless
> for TFTP loading.
I think we are violently agreeing.
> Without a preference for the home NIC, when the code is on the NIC slot,
> one could have a situation where adding a NIC to the system upsets a
> working boot setup.
I agree but we don't have that preference unless it is something
driver specific... And when you include a Etherboot NIC into an
traditional BIOS it does seem to still have a prefered NIC even
when you don't have a bootrom.
> And as stressed before, this should be a compile time option.
Definentily size is to important, and policy is an important thing
to control.
Eric
|