[Etherboot-developers] Bugfixed PXE
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Peter L. <P.L...@sy...> - 2001-06-27 20:26:02
|
OK, I found the magic numbers. :) Had this just been affecting the ZLOADER, I would probably have left it, but I was getting weird hangs and crashes on our Supermicro boxes with Intel chips, even without ZLOADER, and I really have to get those going. 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). Vasil's original patch did actually allocate some space at the end of pxeloader.S for ROM_SEGMENT, but this broke when using ZLOADER, so I ifdef'd out the ROM_SEGMENT / ROM_LENGTH code, as it seemed to have no useful function, and we're not using a floppy, right? I was also worried by the fact that something was obviously being poked into somewhere I didn't understand. So my fault for removing code without understanding the implications. BUT Etherboot didn't make it easy for me; this needs to be cleaned up and documented by someone who genuinely understands which way is up. It took me a *long* time to work out what was happening. Where *should* ROM_SEGMENT really be? Has Etherboot been poking into some random space and just been lucky until now? I have reinstated the ROM_SEGMENT code, and the 2 data words just afterwards, conveniently before the ZLOADER code. I *believe* that I'm doing the right thing in properly allocating space, and so have NOT put the words in #ifdef PXELOADER/#endif. The assembler is happy, though it inflates the raw binary size a bit. Since we can now compress, I am not bothered. And - happy happy joy joy - I now get sensible numbers like (eepro100) ROM segment 0x07C0 length 0x3000 reloc 0x9400 (3c90x) ROM segment 0x07C0 length 0x5000 reloc 0x9400 and ZLOADER is OK, once I fixed makerom to round UP the sizes. The *correct* thing to do here, is - I believe - to stop using the 506 offset unless we really and truly ARE providing floppyness to the outside world, and shove the data words just after the 3rd byte. This entails tweaking other code, however, and I do not claim to understand what is going on. So - here's the new improved pxeloader, Makefile which now builds it with -DPXELOADER, and makerom which rounds up the size properly. The number of patch sections in pxeloader.S is now down to 4 PXE related and one for the ROM_SEGMENT; it should now be easy to retire pxeloader.S and merge back into loader.S. Patch relative to 5.0.2. Enjoy. -- Peter Lister, Sychron Inc. - 1-866-SYCHRON Intelligent Infrastructure - www.sychron.com |