Re: [Etherboot-developers] Seperating out the x86 BIOS calls...
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Markus G. <ma...@gu...> - 2002-07-17 06:33:55
|
Ken Yap wrote: > There are some limits of the de/compression code, Markus can explain > those. The decompressor is based on the code in contrib/compressor/lzhuf.c, but has been aggressively optimized for size. If you want to make any changes to the assembly code, you should probably first read the C source and try to understand it. The decompressor currently runs in real mode only. As such, it uses segment registers and cannot extract more than at most 64kB (there probably is a limit even before 64kB is reached, but I don't remember all the details). As we know that we are never going to deal with more than 64kB of data, we can also tell that the pattern frequency can never get bigger than 2^16 (in fact, it'll stay considerably smaller than that). Thus, I stripped out the reconst() function which would never get called. If you want to deal with larger images, you probably have to implement it, though. Also, I managed to shrink the code size, by compressing all the preinitialized tables (using some kind of run length encoding); and I stripped off a few more bytes by ordering these tables in a way so that once I have initialized one table my registers already have the right values that I will need for initializing the next one. Due to the small register file, there always is considerable register pressure when writing code for the x86. I managed to keep almost all data in registers, but this required me to split some of the registers into 4bit nybbles. You might need to keep this in mind if you have to make changes to the code. Markus -- Markus Gutschke 3637 Fillmore Street #106 San Francisco, CA 94123-1600 +1-415-567-8449 ma...@gu... |