Re: [Etherboot-developers] Bugfixed PXE
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: <ke...@us...> - 2001-06-27 22:53:05
|
>>Well, turns out that main.c uses the rom_info structure, BUT there are >>no obvious cues that rom_info in main.c and ROM_SEGMENT in loader.S are >>the same place. Just some absolute values - one in hex and the other in >>decimal - and different names (c.f. _start, used in both - but which >>really *is* different). Sorry, guys you can blame me. I really should document this. But just ask in this list if there's something you don't understand and I'll realise there's something to fix/document. rom_info is a structure located near the end of where the boot sector would normally be read in (0x7c00-0x7dff). rom_info's got nothing to do with floppies, it's just a place to pass information. The startup code needs some place to stash two shorts, the ROM segment address (value of CS on entering Etherboot) and the length of the ROM in words (the third byte of the ROM, after the AA55). main retrieves it later by using a pointer to a structure with two shorts. The idea is that knowing the address where the ROM is located can be used to discriminate between NICs and know which one it was booted from. The assembler code to store the ROM address and size is a bit tricky because one has to save DS, change DS to enable access to the addresses 0x7c00+506 and 508 (510 contains the boot sector signature, AA55), then restore DS. For the purposes of PXE loading, ROM segment doesn't really have any meaning so it doesn't matter what values are put there. It's more likely you upset the assembler code just mentioned. |