]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[lkrnprefix] Support a longer version string
authorMichael Brown <mcb30@ipxe.org>
Fri, 28 Feb 2025 11:27:21 +0000 (11:27 +0000)
committerMichael Brown <mcb30@ipxe.org>
Fri, 28 Feb 2025 11:32:42 +0000 (11:32 +0000)
The bzImage specification allows two bytes for the setup code jump
instruction at offset 0x200, which limits its relative offset to +0x7f
bytes.  This currently imposes an upper limit on the length of the
version string, which currently precedes the setup code.

Fix by moving the version string to the .prefix.data section, so that
it no longer affects the placement of the setup code.

Originally-fixed-by: Miao Wang <shankerwangmiao@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/prefix/lkrnprefix.S

index c8a04c9d78eb73b7778d9b0e98a141328814a5de..19d30141b95056bddce468ef4064bc311a8b776e 100644 (file)
@@ -104,6 +104,7 @@ hardware_subarch:
 hardware_subarch_data:
        .byte   0, 0, 0, 0, 0, 0, 0, 0
 
+       .section ".prefix.data", "aw", @progbits
 version_string:
        .asciz  VERSION
 
@@ -113,6 +114,7 @@ version_string:
  *
  */
 
+       .section ".prefix", "ax", @progbits
 setup:
        /* Fix up code segment */
        pushw   %ds