[PATCH v7 5/7] kexec, x86: set booloader id in setup_header

Yinghai Lu yinghai at kernel.org
Thu Jan 24 15:44:22 EST 2013


set LOADER_TYPE_KEXEC

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

diff --git a/include/x86/x86-linux.h b/include/x86/x86-linux.h
index 50c2595..0949dc2 100644
--- a/include/x86/x86-linux.h
+++ b/include/x86/x86-linux.h
@@ -146,6 +146,7 @@ struct x86_linux_param_header {
 #define LOADER_TYPE_BOOTSECT_LOADER 2
 #define LOADER_TYPE_SYSLINUX        3
 #define LOADER_TYPE_ETHERBOOT       4
+#define LOADER_TYPE_KEXEC           0x0D
 #define LOADER_TYPE_UNKNOWN         0xFF
 	uint8_t  loader_flags;			/* 0x211 */
 	uint8_t  reserved12[2];			/* 0x212 */
diff --git a/kexec/arch/i386/x86-linux-setup.c b/kexec/arch/i386/x86-linux-setup.c
index eb8b794..c72773c 100644
--- a/kexec/arch/i386/x86-linux-setup.c
+++ b/kexec/arch/i386/x86-linux-setup.c
@@ -56,7 +56,7 @@ void setup_linux_bootloader_parameters(
 	unsigned long initrd_base, initrd_addr_max;
 
 	/* Say I'm a boot loader */
-	real_mode->loader_type = LOADER_TYPE_UNKNOWN;
+	real_mode->loader_type = LOADER_TYPE_KEXEC << 4;
 
 	/* No loader flags */
 	real_mode->loader_flags = 0;
-- 
1.7.10.4




More information about the kexec mailing list