mirror of https://github.com/ipxe/ipxe.git
Update all prefixes currently referring to _load_size to include a
compressor fixup section.pull/1/head
parent
0929142a15
commit
84551d485e
|
@ -1,10 +1,7 @@
|
||||||
/* NOTE: this boot sector contains instructions that need at least an 80186.
|
/* NOTE: this boot sector contains instructions that need at least an 80186.
|
||||||
* Yes, as86 has a bug somewhere in the valid instruction set checks.
|
* Yes, as86 has a bug somewhere in the valid instruction set checks.
|
||||||
*
|
*
|
||||||
* SYS_SIZE is the number of clicks (16 bytes) to be loaded.
|
|
||||||
*/
|
*/
|
||||||
.globl SYSSIZE
|
|
||||||
.equ SYSSIZE, _load_size_pgh
|
|
||||||
|
|
||||||
/* floppyload.S Copyright (C) 1991, 1992 Linus Torvalds
|
/* floppyload.S Copyright (C) 1991, 1992 Linus Torvalds
|
||||||
* modified by Drew Eckhardt
|
* modified by Drew Eckhardt
|
||||||
|
@ -147,6 +144,14 @@ got_sectors:
|
||||||
/* Jump to loaded copy */
|
/* Jump to loaded copy */
|
||||||
ljmp $SYSSEG, $start_runtime
|
ljmp $SYSSEG, $start_runtime
|
||||||
|
|
||||||
|
endseg: .word SYSSEG + _load_size_pgh
|
||||||
|
.section ".zinfo.fixup", "a" /* Compressor fixup information */
|
||||||
|
.ascii "SUBW"
|
||||||
|
.long endseg
|
||||||
|
.long 16
|
||||||
|
.long 0
|
||||||
|
.previous
|
||||||
|
|
||||||
/* This routine loads the system at address SYSSEG<<4, making sure no 64kB
|
/* This routine loads the system at address SYSSEG<<4, making sure no 64kB
|
||||||
* boundaries are crossed. We try to load it as fast as possible, loading whole
|
* boundaries are crossed. We try to load it as fast as possible, loading whole
|
||||||
* tracks whenever we can.
|
* tracks whenever we can.
|
||||||
|
@ -165,7 +170,7 @@ rp_read:
|
||||||
movb $4, %cl
|
movb $4, %cl
|
||||||
shrw %cl,%dx /* bx is always divisible by 16 */
|
shrw %cl,%dx /* bx is always divisible by 16 */
|
||||||
addw %dx,%ax
|
addw %dx,%ax
|
||||||
cmpw $SYSSEG+SYSSIZE, %ax /* have we loaded all yet? */
|
cmpw endseg, %ax /* have we loaded all yet? */
|
||||||
jb ok1_read
|
jb ok1_read
|
||||||
ret
|
ret
|
||||||
ok1_read:
|
ok1_read:
|
||||||
|
|
|
@ -58,12 +58,20 @@ load_image:
|
||||||
ja 1b
|
ja 1b
|
||||||
ljmp $BOOT_SEG, $start_image
|
ljmp $BOOT_SEG, $start_image
|
||||||
|
|
||||||
load_length:
|
|
||||||
.long _load_size_sect
|
|
||||||
max_sector:
|
max_sector:
|
||||||
.byte 0
|
.byte 0
|
||||||
max_head:
|
max_head:
|
||||||
.byte 0
|
.byte 0
|
||||||
|
load_length:
|
||||||
|
.long _load_size_sect
|
||||||
|
|
||||||
|
.section ".zinfo.fixup", "a" /* Compressor fixup information */
|
||||||
|
.ascii "SUBL"
|
||||||
|
.long load_length
|
||||||
|
.long 512
|
||||||
|
.long 0
|
||||||
|
.previous
|
||||||
|
|
||||||
|
|
||||||
load_failed:
|
load_failed:
|
||||||
movw $10f, %si
|
movw $10f, %si
|
||||||
|
|
|
@ -105,6 +105,14 @@ boot_flag:
|
||||||
|
|
||||||
|
|
||||||
.org 512
|
.org 512
|
||||||
|
|
||||||
|
.section ".zinfo.fixup", "a" /* Compressor fixup information */
|
||||||
|
.ascii "SUBW"
|
||||||
|
.long syssize
|
||||||
|
.long 16
|
||||||
|
.long 0
|
||||||
|
.previous
|
||||||
|
|
||||||
/*
|
/*
|
||||||
We're now at the beginning of the second sector of the image -
|
We're now at the beginning of the second sector of the image -
|
||||||
where the setup code goes.
|
where the setup code goes.
|
||||||
|
|
|
@ -32,10 +32,21 @@ segment_header:
|
||||||
.byte 0
|
.byte 0
|
||||||
.byte 0x04 /* Last segment */
|
.byte 0x04 /* Last segment */
|
||||||
.long 0x00007e00
|
.long 0x00007e00
|
||||||
.long _load_size - 512
|
imglen: .long _load_size - 512
|
||||||
.long _load_size - 512
|
memlen: .long _load_size - 512
|
||||||
.size segment_header, . - segment_header
|
.size segment_header, . - segment_header
|
||||||
|
|
||||||
|
.section ".zinfo.fixup", "a" /* Compressor fixup information */
|
||||||
|
.ascii "SUBL"
|
||||||
|
.long imglen
|
||||||
|
.long 1
|
||||||
|
.long 0
|
||||||
|
.ascii "SUBL"
|
||||||
|
.long memlen
|
||||||
|
.long 1
|
||||||
|
.long 0
|
||||||
|
.previous
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* NBI entry point
|
* NBI entry point
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
|
|
|
@ -23,6 +23,13 @@ romheader_size: .byte _load_size_sect /* Size in 512-byte blocks */
|
||||||
.org 0x1a
|
.org 0x1a
|
||||||
.word pnpheader
|
.word pnpheader
|
||||||
.size romheader, . - romheader
|
.size romheader, . - romheader
|
||||||
|
|
||||||
|
.section ".zinfo.fixup", "a" /* Compressor fixup information */
|
||||||
|
.ascii "SUBB"
|
||||||
|
.long romheader_size
|
||||||
|
.long 512
|
||||||
|
.long 0
|
||||||
|
.previous
|
||||||
|
|
||||||
pciheader:
|
pciheader:
|
||||||
.ascii "PCIR" /* Signature */
|
.ascii "PCIR" /* Signature */
|
||||||
|
@ -41,6 +48,13 @@ pciheader_size: .word _load_size_sect /* Image length same as offset 02h */
|
||||||
.word 0x0000 /* reserved */
|
.word 0x0000 /* reserved */
|
||||||
.equ pciheader_len, . - pciheader
|
.equ pciheader_len, . - pciheader
|
||||||
.size pciheader, . - pciheader
|
.size pciheader, . - pciheader
|
||||||
|
|
||||||
|
.section ".zinfo.fixup", "a" /* Compressor fixup information */
|
||||||
|
.ascii "SUBW"
|
||||||
|
.long pciheader_size
|
||||||
|
.long 512
|
||||||
|
.long 0
|
||||||
|
.previous
|
||||||
|
|
||||||
pnpheader:
|
pnpheader:
|
||||||
.ascii "$PnP" /* Signature */
|
.ascii "$PnP" /* Signature */
|
||||||
|
@ -124,7 +138,7 @@ notpnp_message:
|
||||||
.size notpnp_message, . - notpnp_message
|
.size notpnp_message, . - notpnp_message
|
||||||
|
|
||||||
/* Boot execution vector
|
/* Boot execution vector
|
||||||
*
|
*pciheader_size
|
||||||
* Called by the PnP BIOS when it wants to boot us, or via the hooked
|
* Called by the PnP BIOS when it wants to boot us, or via the hooked
|
||||||
* INT 19 if we detected a non-PnP BIOS.
|
* INT 19 if we detected a non-PnP BIOS.
|
||||||
*/
|
*/
|
||||||
|
@ -215,15 +229,3 @@ print_message:
|
||||||
popw %ax
|
popw %ax
|
||||||
ret
|
ret
|
||||||
.size print_message, . - print_message
|
.size print_message, . - print_message
|
||||||
|
|
||||||
|
|
||||||
/* Data update information for the compressor */
|
|
||||||
.section ".zinfo.fixup", "a"
|
|
||||||
.ascii "SUBB"
|
|
||||||
.long romheader_size
|
|
||||||
.long 512
|
|
||||||
.long 0
|
|
||||||
.ascii "SUBW"
|
|
||||||
.long pciheader_size
|
|
||||||
.long 512
|
|
||||||
.long 0
|
|
||||||
|
|
|
@ -269,6 +269,12 @@ SECTIONS {
|
||||||
*/
|
*/
|
||||||
_text16_size_pgh = ( ( _text16_size + 15 ) / 16 );
|
_text16_size_pgh = ( ( _text16_size + 15 ) / 16 );
|
||||||
_data16_size_pgh = ( ( _data16_size + 15 ) / 16 );
|
_data16_size_pgh = ( ( _data16_size + 15 ) / 16 );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Load sizes in paragraphs and sectors. Note that wherever the
|
||||||
|
* _load_size variables are used, there must be a corresponding
|
||||||
|
* .zinfo.fixup section.
|
||||||
|
*/
|
||||||
_load_size_pgh = ( ( _load_size + 15 ) / 16 );
|
_load_size_pgh = ( ( _load_size + 15 ) / 16 );
|
||||||
_load_size_sect = ( ( _load_size + 511 ) / 512 );
|
_load_size_sect = ( ( _load_size + 511 ) / 512 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue