[prefix] Add .text16.early section

Add a section .text16.early which is always kept inline with the
prefix.  This will allow for some code sharing between the .prefix and
.text16 sections.

Note that the simple solution of just prepending the .prefix section
to the .text16 section will not work, because a bug in Wyse Streaming
Manager server (WLDRM13.BIN) requires us to place a dummy PXENV+ entry
point at the start of .text16.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2010-04-20 11:05:53 +01:00
parent 6c35a525da
commit 9068249e24
4 changed files with 150 additions and 39 deletions

View File

@@ -362,7 +362,8 @@ got_pmm: /* PMM allocation succeeded */
addr32 rep movsb /* PMM presence implies flat real mode */
movl %edi, decompress_to
/* Shrink ROM */
movb $_prefix_memsz_sect, romheader_size
movb shrunk_rom_size, %al
movb %al, romheader_size
pmm_fail:
/* Restore upper register halves */
popal
@@ -488,6 +489,19 @@ image_source:
.long 0
.size image_source, . - image_source
/* Shrunk ROM size (in 512-byte sectors)
*
*/
shrunk_rom_size:
.byte 0
.size shrunk_rom_size, . - shrunk_rom_size
.section ".zinfo.fixup", "a", @progbits /* Compressor fixups */
.ascii "ADHB"
.long shrunk_rom_size
.long 512
.long 0
.previous
/* Temporary decompression area
*
* May be either at HIGHMEM_LOADPOINT, or within PMM-allocated block.