[PATCH v2 4/6] kexec, x86: set ext_cmd_line_ptr when boot_param is put high

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



only do that for bzImage64, and it could have command line above 4g.

Signed-off-by: Yinghai Lu <yinghai at kernel.org>
---
 kexec/arch/i386/x86-linux-setup.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/kexec/arch/i386/x86-linux-setup.c b/kexec/arch/i386/x86-linux-setup.c
index b0e6119..c929166 100644
--- a/kexec/arch/i386/x86-linux-setup.c
+++ b/kexec/arch/i386/x86-linux-setup.c
@@ -105,7 +105,13 @@ void setup_linux_bootloader_parameters(
 		/* setup_move_size */
 	/* } */
 	if (real_mode->protocol_version >= 0x0202) {
-		real_mode->cmd_line_ptr = real_mode_base + cmdline_offset;
+		unsigned long cmd_line_ptr = real_mode_base + cmdline_offset;
+
+		real_mode->cmd_line_ptr = cmd_line_ptr & 0xffffffff;
+		if (real_mode->protocol_version >= 0x020c)
+			real_mode->ext_cmd_line_ptr = cmd_line_ptr >> 32;
+
+		printf("cmd_line_ptr: %lx\n", cmd_line_ptr);
 	}
 
 	/* Fill in the command line */
-- 
1.7.7




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux