Skip to content

Commit be3a78e

Browse files
committed
[lkrnprefix] Support a longer version string
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>
1 parent 12ea8c4 commit be3a78e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/arch/x86/prefix/lkrnprefix.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ hardware_subarch:
104104
hardware_subarch_data:
105105
.byte 0, 0, 0, 0, 0, 0, 0, 0
106106

107+
.section ".prefix.data", "aw", @progbits
107108
version_string:
108109
.asciz VERSION
109110

@@ -113,6 +114,7 @@ version_string:
113114
*
114115
*/
115116

117+
.section ".prefix", "ax", @progbits
116118
setup:
117119
/* Fix up code segment */
118120
pushw %ds

0 commit comments

Comments
 (0)