diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2007-10-26 13:29:04 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2007-10-27 14:57:43 -0400 |
commit | bd53147db8bdf5dd49025c198ff18ac23f560e0e (patch) | |
tree | 50b65c7e72e2fdfc754e9c0844dbb7931d01e2db /arch/x86/kernel | |
parent | 0cca1ca647d87c2c0b0d76d2f32683ce34d54989 (diff) |
x86: Fix boot protocol KEEP_SEGMENTS check.
The kernel only ever supports 1 version of the boot protocol
so there is no need to check the boot protocol revision to
see if a feature is supported.
Both x86 and x86_64 support the same boot protocol so we need
to implement the KEEP_SEGMENTS on x86_64 as well. It isn't
just paravirt bootloaders that could use this functionality.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Zachary Amsden <zach@vmware.com>
Cc: Andi Kleen <ak@suse.de>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/asm-offsets_64.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c index 7e50bda565b4..d1b6ed98774e 100644 --- a/arch/x86/kernel/asm-offsets_64.c +++ b/arch/x86/kernel/asm-offsets_64.c | |||
@@ -15,12 +15,16 @@ | |||
15 | #include <asm/segment.h> | 15 | #include <asm/segment.h> |
16 | #include <asm/thread_info.h> | 16 | #include <asm/thread_info.h> |
17 | #include <asm/ia32.h> | 17 | #include <asm/ia32.h> |
18 | #include <asm/bootparam.h> | ||
18 | 19 | ||
19 | #define DEFINE(sym, val) \ | 20 | #define DEFINE(sym, val) \ |
20 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) | 21 | asm volatile("\n->" #sym " %0 " #val : : "i" (val)) |
21 | 22 | ||
22 | #define BLANK() asm volatile("\n->" : : ) | 23 | #define BLANK() asm volatile("\n->" : : ) |
23 | 24 | ||
25 | #define OFFSET(sym, str, mem) \ | ||
26 | DEFINE(sym, offsetof(struct str, mem)) | ||
27 | |||
24 | #define __NO_STUBS 1 | 28 | #define __NO_STUBS 1 |
25 | #undef __SYSCALL | 29 | #undef __SYSCALL |
26 | #undef _ASM_X86_64_UNISTD_H_ | 30 | #undef _ASM_X86_64_UNISTD_H_ |
@@ -109,5 +113,11 @@ int main(void) | |||
109 | DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx)); | 113 | DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx)); |
110 | BLANK(); | 114 | BLANK(); |
111 | DEFINE(__NR_syscall_max, sizeof(syscalls) - 1); | 115 | DEFINE(__NR_syscall_max, sizeof(syscalls) - 1); |
116 | |||
117 | BLANK(); | ||
118 | OFFSET(BP_scratch, boot_params, scratch); | ||
119 | OFFSET(BP_loadflags, boot_params, hdr.loadflags); | ||
120 | OFFSET(BP_hardware_subarch, boot_params, hdr.hardware_subarch); | ||
121 | OFFSET(BP_version, boot_params, hdr.version); | ||
112 | return 0; | 122 | return 0; |
113 | } | 123 | } |