diff options
author | Stefan Hajnoczi <stefanha@gmail.com> | 2008-07-30 19:45:48 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@gmail.com> | 2008-07-30 19:45:48 +0100 |
commit | 4cc786de810a74659b6266d04188c78b5b202103 (patch) | |
tree | c6fa0f282adf1dfbabf862f08858f8b95b83c6e3 | |
parent | 594c672b75430e3201c664218b47215890b1387e (diff) | |
download | ipxe-4cc786de810a74659b6266d04188c78b5b202103.tar.gz |
[prefix] Reasonable value for lkrn initrd_addr_max
H. Peter Anvin <hpa@zytor.com> sent word that Sergey Vlasov
<vsu@altlinux.ru> discovered gPXE lkrn images fail to load in SYSLINUX
3.70 because we have initrd_addr_max zeroed. This patch sets the same
value as the Linux kernel.
Also change the header jmp instruction to use a hardcoded opcode value
like Linux does. Just in case the assembler decides to use a three-byte
instruction instead of the desired two-byte jmp.
-rw-r--r-- | src/arch/i386/prefix/lkrnprefix.S | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/arch/i386/prefix/lkrnprefix.S b/src/arch/i386/prefix/lkrnprefix.S index 59e70cd19..c1e92f579 100644 --- a/src/arch/i386/prefix/lkrnprefix.S +++ b/src/arch/i386/prefix/lkrnprefix.S @@ -110,7 +110,10 @@ root_dev: boot_flag: .word 0xAA55 jump: - jmp setup_code + /* Manually specify a two-byte jmp instruction here rather + * than leaving it up to the assembler. */ + .byte 0xeb + .byte setup_code - header header: .byte 'H', 'd', 'r', 'S' version: @@ -142,7 +145,10 @@ pad1: cmd_line_ptr: .long 0 initrd_addr_max: - .long 0 + /* We don't use an initrd but some bootloaders (e.g. SYSLINUX) have + * been known to require this field. Set the value to 2 GB. This + * value is also used by the Linux kernel. */ + .long 0x7fffffff kernel_alignment: .long 0 relocatable_kernel: |