summaryrefslogtreecommitdiff
path: root/arch/x86/realmode
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/realmode')
-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 4612d5382791..fadf48378ada 100644
--- a/arch/x86/realmode/rm/header.S
+++ b/arch/x86/realmode/rm/header.S
@@ -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)
diff --git a/arch/x86/realmode/rm/realmode.h b/arch/x86/realmode/rm/realmode.h
index 15ab6335f843..d74cff6350ed 100644
--- a/arch/x86/realmode/rm/realmode.h
+++ b/arch/x86/realmode/rm/realmode.h
@@ -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 */
diff --git a/arch/x86/realmode/rm/wakeup.h b/arch/x86/realmode/rm/wakeup.h
index 2dfaf06b8af1..9317e0042f24 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;
#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
diff --git a/arch/x86/realmode/rm/wakeup_asm.S b/arch/x86/realmode/rm/wakeup_asm.S
index 46108f05e04e..8905166b0bbb 100644
--- a/arch/x86/realmode/rm/wakeup_asm.S
+++ b/arch/x86/realmode/rm/wakeup_asm.S
@@ -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