Re: [Etherboot-developers] Q: Multiple drivers.
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Marty C. <md...@th...> - 2001-12-05 15:29:44
|
The current conversation about multiple NICs has gotten me thinking
(always a dangerous thing :)
I was considering constraints and dependencies, and realized that one
thing that:
- Etherboot drivers try to find a NIC for whatever driver(s)
are compiled into them. Thus, the Etherboot code is NIC
specific.
- If an Etherboot driver finds a NIC of the right type, the
first thing it does is try to figure out what its MAC address is,
because without it, BOOTP or DHCP cannot even happen.
This brought to mind the following idea.
- What if (as an option) we specified that the ROM had to match
a particular MAC address as well as a particular card type
before it was an acceptable card to boot from.
I'm thinking out loud here, but please follow my logic:
- Main Etherboot logic matches NIC type and calls driver code
- Driver does something like:
if (this_nic_mac_addr() == NULL)
print "Unable to get NIC mac address!"
return FAILED_TO_GET_MAC_ADDR
if (NIC_MAC_ADDR_TO_MATCH != NULL)
if this_nic_mac_addr() != NIC_MAC_ADDR_TO_MATCH
print "A NIC was found, but does not match the required
MAC address for this Etherboot ROM.
NIC: this_nic_mac_addr() ROM: NIC_MAC_ADDR_TO_MATCH
return FAILED_TO_FIND_RIGHT_NIC
Proceed as usual
There could even be (with a tiny bit more code) an array of
NIC_MAC_ADDRS_TO_MATCH[] which could also specify the _order_ NICs should
be matched, which helps solve another issue having to do with making sure
cards are tried in the right order.
Now, the obvious objection to this scheme is that it puts state about the
NIC in the ROM. However, the ROM already contains the type of NIC
already, which is what allows us to do the "boot another card in the
machine from the ROM on this NIC" trick. There would not be a danger of
corrupting the network like burning IP addresses into ROMs might cause.
I would say this would be useful for people who have multiple NIC cards
and want to make sure that the one the ROM is on is the one that gets
chosen, and also for those people who need the control of being able to
pick the right card from BIOS code.
The state being put in the ROM is less of a problem than putting
something like an IP address in the ROM.
Let's look at some cases:
- if NIC_MAC_ADDR_TO_MATCH == ROM_MAC_ADDR then if you put the card
in another machine it works the same.
- if the NIC_MAC_ADDR != ROM_MAC_ADDR then if you put the card
in another machine it probably fails. BUT, the failure would
occur if you put a NIC a "ROM with a different driver from its host
NIC" into different machine. Obviously this would be an option
for special situations, and a clear error message would be printed.
So what do folks think? Do you like the idea? Does this idea have
useful application (as an option) while not violating the integrity of
the booting paradigm?
Marty
P.S. Note that this is a case where free software has a big advantage.
Imagine the overhead of a commercial vendor who would have to burn a
special ROM with a particular MAC address in it rather than stocking bags
of ROMs for a particular kind of NIC. This can be an Etherboot option or
a rom-o-matic.net field that the user can easily fill in if they need
this special case.
---
Try: http://rom-o-matic.net/ to make Etherboot images instantly.
Name: Marty Connor
US Mail: Entity Cyber, Inc.; P.O. Box 391827; Cambridge, MA 02139; USA
Voice: (617) 491-6935, Fax: (617) 491-7046
Email: md...@th...
Web: http://www.thinguin.org/
|