Return-path: Received: from aserp1040.oracle.com ([141.146.126.69]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TcMdk-0000BG-Gv for kexec@lists.infradead.org; Sat, 24 Nov 2012 20:47:54 +0000 From: Yinghai Lu Subject: [PATCH v4 5/6] kexec, x86: set ext_cmd_line_ptr when boot_param is above 4g Date: Sat, 24 Nov 2012 12:47:45 -0800 Message-Id: <1353790066-20352-6-git-send-email-yinghai@kernel.org> In-Reply-To: <1353790066-20352-1-git-send-email-yinghai@kernel.org> References: <1353790066-20352-1-git-send-email-yinghai@kernel.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: kexec-bounces@lists.infradead.org Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Simon Horman , "H. Peter Anvin" , Vivek Goyal , Haren Myneni , "Eric W. Biederman" Cc: Yinghai Lu , kexec@lists.infradead.org update ext_cmd_line_ptr for bzImage from protocal 2.12 that could have command line above 4g. -v2: update ext_... handling to the way that Eric likes. Signed-off-by: Yinghai Lu --- kexec/arch/i386/x86-linux-setup.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/kexec/arch/i386/x86-linux-setup.c b/kexec/arch/i386/x86-linux-setup.c index 3c31f64..d12dab1 100644 --- a/kexec/arch/i386/x86-linux-setup.c +++ b/kexec/arch/i386/x86-linux-setup.c @@ -103,7 +103,12 @@ 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 & 0xffffffffUL; + if ((real_mode->protocol_version >= 0x020c) && + ((cmd_line_ptr & 0xffffffffUL) != cmd_line_ptr)) + real_mode->ext_cmd_line_ptr = cmd_line_ptr >> 32; } /* Fill in the command line */ -- 1.7.7 _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec