]> Pileus Git - ~andy/linux/commitdiff
x86, realmode: Move end signature into header.S
authorH. Peter Anvin <hpa@linux.intel.com>
Mon, 21 May 2012 07:02:45 +0000 (00:02 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Mon, 21 May 2012 07:02:45 +0000 (00:02 -0700)
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>
arch/x86/realmode/rm/header.S
arch/x86/realmode/rm/realmode.h
arch/x86/realmode/rm/wakeup.h
arch/x86/realmode/rm/wakeup_asm.S

index 4612d5382791e903e0ec1f5b06a743b1148a99bc..fadf48378adac71fdd9d4ef76f74b876e0572aa7 100644 (file)
@@ -7,6 +7,8 @@
 #include <linux/linkage.h>
 #include <asm/page_types.h>
 
+#include "realmode.h"
+       
        .section ".header", "a"
 
        .balign 16
@@ -30,3 +32,10 @@ GLOBAL(real_mode_header)
        .long   pa_machine_real_restart_asm
 #endif
 END(real_mode_header)
+
+       /* End signature, used to verify integrity */
+       .section ".signature","a"
+       .balign 4
+GLOBAL(end_signature)
+       .long   REALMODE_END_SIGNATURE
+END(end_signature)
index 15ab6335f8439232b3c985b1a43a72e8e3413681..d74cff6350edc2208fcb6321f63ec7d5966f8c44 100644 (file)
@@ -13,4 +13,9 @@
 
 #endif /* __ASSEMBLY__ */
 
+/*
+ * Signature at the end of the realmode region
+ */
+#define REALMODE_END_SIGNATURE 0x65a22c82
+
 #endif /* ARCH_X86_REALMODE_RM_REALMODE_H */
index 2dfaf06b8af135b262477ffcbd27900aa409a168..9317e0042f24b9f49d3e5d5eafac20424bea574d 100644 (file)
@@ -33,7 +33,6 @@ extern struct wakeup_header wakeup_header;
 
 #define WAKEUP_HEADER_OFFSET   8
 #define WAKEUP_HEADER_SIGNATURE 0x51ee1111
-#define WAKEUP_END_SIGNATURE   0x65a22c82
 
 /* Wakeup behavior bits */
 #define WAKEUP_BEHAVIOR_RESTORE_MISC_ENABLE     0
index 46108f05e04e07c355942893b36045fccc40a066..8905166b0bbb2021fe9a6eecbda5c185f70847bd 100644 (file)
@@ -85,7 +85,7 @@ ENTRY(wakeup_start)
 
        /* Check we really have everything... */
        movl    end_signature, %eax
-       cmpl    $WAKEUP_END_SIGNATURE, %eax
+       cmpl    $REALMODE_END_SIGNATURE, %eax
        jne     bogus_real_magic
 
        /* Call the C code */
@@ -175,7 +175,3 @@ GLOBAL(wakeup_idt)
        .long   0               /* address */
        .word   0
 END(wakeup_idt)
-
-       .section ".signature","a"
-end_signature:
-       .long   WAKEUP_END_SIGNATURE