Messages in this thread | | | Date | Fri, 15 Oct 1999 13:53:00 -0700 | From | "Chris Noe" <> | Subject | RE: bootsect.S changes |
| |
The patch attempted to emulate the original bytecodes that as86/ld86 output wherever possible. In an instruction by instruction disassembly, the new boot code differs only by a few bytes (or less with a recent binutils). Each 32 bit instruction in the original code was replaced by a 32 bitter in mine, and I don't recall adding or removing any: it was simply meant to be a "transcription" more than a cleanup (at least at this point).
I was looking to first get rid of the as86 dependency first, leaving just a bootable kernel with gas bootcode. Later, not too long from now, the plan has been to send out the next round of patches which will clean up, beautify, clarify, optimize and otherwise make wonderful the bootcode.
I guess I could have done it all at once, but I just don't feel like that would have been the best way to do it -- I wanted the 'lowest common denominator' before the 'super-duper ultra-tricked'.
Chris Noe (stiker@northlink.com)
-----Original Message----- From: Andrzej Krzysztofowicz [mailto:ankry@green.mif.pg.gda.pl] Sent: Friday, October 15, 1999 6:29 AM To: linux-kernel@vger.rutgers.edu Cc: stiker@northlink.com Subject: bootsect.S changes
Hi, As I see the i386 bootsect code evaluates into 32 bit code. Could anybody explain me what is the reason ?
32-bit code is in most cases a bit larger (one byte per statement) but in the bootsector every byte is very valuable. Are there any problems with 16-bit code? (compilation? non-working on some machines?)
What are the advantages of the following code: movw $128, %cx subw %si, %si subw %di, %di cld rep movsl <------- 32 bit instead of movw $256, %cx subw %si, %si subw %di, %di cld rep movsw <------- 16 bit (which is shorter), etc. I hope, nobody will joke saying it is faster ...
Regards Andrzej
PS. IMHO, using 32-bit code in bootsect.S/setup.S makes sense only if it is really necessary to handle 32-bit addresses/data or it is shorter. Am I wrong? -- ======================================================================= Andrzej M. Krzysztofowicz ankry@mif.pg.gda.pl tel. (0-58) 347 14 61 Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |