x86, realmode: read cr4 and EFER from kernel for 64-bit trampoline
This patch changes 64-bit trampoline so that CR4 and
EFER are provided by the kernel instead of using fixed
values.
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
Link: http://lkml.kernel.org/r/1336501366-28617-24-git-send-email-jarkko.sakkinen@intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
diff --git a/arch/x86/include/asm/realmode.h b/arch/x86/include/asm/realmode.h
index 1421eed..937dc60 100644
--- a/arch/x86/include/asm/realmode.h
+++ b/arch/x86/include/asm/realmode.h
@@ -24,18 +24,22 @@
#ifdef CONFIG_X86_32
u32 machine_real_restart_asm;
#endif
-} __attribute__((__packed__));
+};
/* This must match data at trampoline_32/64.S */
struct trampoline_header {
#ifdef CONFIG_X86_32
u32 start;
+ u16 gdt_pad;
u16 gdt_limit;
u32 gdt_base;
#else
u64 start;
+ u32 cr4;
+ u32 efer_low;
+ u32 efer_high;
#endif
-} __attribute__((__packed__));
+};
extern struct real_mode_header *real_mode_header;
extern unsigned char real_mode_blob_end[];