[syslinux:elflink] load_linux: the command line pointer depends on real_mode_base
syslinux-bot for H. Peter Anvin
hpa at linux.intel.com
Mon Feb 4 11:33:02 PST 2013
Commit-ID: b9911b669ba6c0118431df0675ba4df14abb21d8
Gitweb: http://www.syslinux.org/commit/b9911b669ba6c0118431df0675ba4df14abb21d8
Author: H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Mon, 4 Feb 2013 11:23:20 -0800
Committer: H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Mon, 4 Feb 2013 11:23:20 -0800
load_linux: the command line pointer depends on real_mode_base
The command line pointer depends on real_mode_base, so we can't set it
up until we know where the real mode code will actually land.
Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>
---
com32/lib/syslinux/load_linux.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/com32/lib/syslinux/load_linux.c b/com32/lib/syslinux/load_linux.c
index 89e43d2..f70682f 100644
--- a/com32/lib/syslinux/load_linux.c
+++ b/com32/lib/syslinux/load_linux.c
@@ -301,18 +301,6 @@ int syslinux_boot_linux(void *kernel_buf, size_t kernel_size,
}
}
- /* Set up the command line */
- if (hdr.version >= 0x0202) {
- whdr->cmd_line_ptr = real_mode_base + cmdline_offset;
- } else {
- whdr->old_cmd_line_magic = OLD_CMDLINE_MAGIC;
- whdr->old_cmd_line_offset = cmdline_offset;
- if (hdr.version >= 0x0200) {
- /* Be paranoid and round up to a multiple of 16 */
- whdr->setup_move_size = (cmdline_offset + cmdline_size + 15) & ~15;
- }
- }
-
/* Get the memory map */
mmap = syslinux_memory_map(); /* Memory map for shuffle_boot */
amap = syslinux_dup_memmap(mmap); /* Keep track of available memory */
@@ -401,6 +389,18 @@ int syslinux_boot_linux(void *kernel_buf, size_t kernel_size,
}
}
+ /* Set up the command line information in the header */
+ if (hdr.version >= 0x0202) {
+ whdr->cmd_line_ptr = real_mode_base + cmdline_offset;
+ } else {
+ whdr->old_cmd_line_magic = OLD_CMDLINE_MAGIC;
+ whdr->old_cmd_line_offset = cmdline_offset;
+ if (hdr.version >= 0x0200) {
+ /* Be paranoid and round up to a multiple of 16 */
+ whdr->setup_move_size = (cmdline_offset + cmdline_size + 15) & ~15;
+ }
+ }
+
if (syslinux_add_movelist(&fraglist, real_mode_base, (addr_t) kernel_buf,
real_mode_size))
goto bail;
More information about the Syslinux-commits
mailing list