aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2012-05-21 03:02:45 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2012-05-21 03:02:45 -0400
commit61f5446169046c217a5479517edac3a890c3bee7 (patch)
tree461c02f95e69f06a0d7a2cf8c349f1b6e08105ca /arch/x86
parent8a3b947c40cb36100f316ac0d433f4ae554ee4cc (diff)
x86, realmode: Move end signature into header.S
The end signature was defined in wakeup_asm.S as it originally came from the ACPI wakeup code. However, we rely on the existence of the .signature section to expand .bss, otherwise we would have to include code to explicitly zero the .bss depending on the configuration. Since the expanded .bss is just in .init.data anyway, it's easier to always have it expanded. This fixes failures when compiled without CONFIG_ACPI_SLEEP. Reported-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com> Cc: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/realmode/rm/header.S9
-rw-r--r--arch/x86/realmode/rm/realmode.h5
-rw-r--r--arch/x86/realmode/rm/wakeup.h1
-rw-r--r--arch/x86/realmode/rm/wakeup_asm.S6
4 files changed, 15 insertions, 6 deletions
diff --git a/arch/x86/realmode/rm/header.S b/arch/x86/realmode/rm/header.S
index 4612d538279..fadf48378ad 100644
--- a/arch/x86/realmode/rm/header.S
+++ b/arch/x86/realmode/rm/header.S
@@ -7,6 +7,8 @@
7#include <linux/linkage.h> 7#include <linux/linkage.h>
8#include <asm/page_types.h> 8#include <asm/page_types.h>
9 9
10#include "realmode.h"
11
10 .section ".header", "a" 12 .section ".header", "a"
11 13
12 .balign 16 14 .balign 16
@@ -30,3 +32,10 @@ GLOBAL(real_mode_header)
30 .long pa_machine_real_restart_asm 32 .long pa_machine_real_restart_asm
31#endif 33#endif
32END(real_mode_header) 34END(real_mode_header)
35
36 /* End signature, used to verify integrity */
37 .section ".signature","a"
38 .balign 4
39GLOBAL(end_signature)
40 .long REALMODE_END_SIGNATURE
41END(end_signature)
diff --git a/arch/x86/realmode/rm/realmode.h b/arch/x86/realmode/rm/realmode.h
index 15ab6335f84..d74cff6350e 100644
--- a/arch/x86/realmode/rm/realmode.h
+++ b/arch/x86/realmode/rm/realmode.h
@@ -13,4 +13,9 @@
13 13
14#endif /* __ASSEMBLY__ */ 14#endif /* __ASSEMBLY__ */
15 15
16/*
17 * Signature at the end of the realmode region
18 */
19#define REALMODE_END_SIGNATURE 0x65a22c82
20
16#endif /* ARCH_X86_REALMODE_RM_REALMODE_H */ 21#endif /* ARCH_X86_REALMODE_RM_REALMODE_H */
diff --git a/arch/x86/realmode/rm/wakeup.h b/arch/x86/realmode/rm/wakeup.h
index 2dfaf06b8af..9317e0042f2 100644
--- a/arch/x86/realmode/rm/wakeup.h
+++ b/arch/x86/realmode/rm/wakeup.h
@@ -33,7 +33,6 @@ extern struct wakeup_header wakeup_header;
33 33
34#define WAKEUP_HEADER_OFFSET 8 34#define WAKEUP_HEADER_OFFSET 8
35#define WAKEUP_HEADER_SIGNATURE 0x51ee1111 35#define WAKEUP_HEADER_SIGNATURE 0x51ee1111
36#define WAKEUP_END_SIGNATURE 0x65a22c82
37 36
38/* Wakeup behavior bits */ 37/* Wakeup behavior bits */
39#define WAKEUP_BEHAVIOR_RESTORE_MISC_ENABLE 0 38#define WAKEUP_BEHAVIOR_RESTORE_MISC_ENABLE 0
diff --git a/arch/x86/realmode/rm/wakeup_asm.S b/arch/x86/realmode/rm/wakeup_asm.S
index 46108f05e04..8905166b0bb 100644
--- a/arch/x86/realmode/rm/wakeup_asm.S
+++ b/arch/x86/realmode/rm/wakeup_asm.S
@@ -85,7 +85,7 @@ ENTRY(wakeup_start)
85 85
86 /* Check we really have everything... */ 86 /* Check we really have everything... */
87 movl end_signature, %eax 87 movl end_signature, %eax
88 cmpl $WAKEUP_END_SIGNATURE, %eax 88 cmpl $REALMODE_END_SIGNATURE, %eax
89 jne bogus_real_magic 89 jne bogus_real_magic
90 90
91 /* Call the C code */ 91 /* Call the C code */
@@ -175,7 +175,3 @@ GLOBAL(wakeup_idt)
175 .long 0 /* address */ 175 .long 0 /* address */
176 .word 0 176 .word 0
177END(wakeup_idt) 177END(wakeup_idt)
178
179 .section ".signature","a"
180end_signature:
181 .long WAKEUP_END_SIGNATURE