On Thursday, 7 of February 2008, H. Peter Anvin wrote:Rafael J. Wysocki wrote:Index: linux-2.6/arch/x86/kernel/acpi/realmode/wakeup.SMissing a .short pad here... Pavel fixed that at some point, I thought.
===================================================================
--- /dev/null
+++ linux-2.6/arch/x86/kernel/acpi/realmode/wakeup.S
@@ -0,0 +1,122 @@
+/*
+ * ACPI wakeup real mode startup stub
+ */
+#include <asm/segment.h>
+#include <asm/msr-index.h>
+#include <asm/page_64.h>
+#include <asm/pgtable_64.h>
+
+ .code16
+ .section ".header", "a"
+
+/* This should match the structure in wakeup.h */
+ .globl wakeup_header
+wakeup_header:
+video_mode: .short 0 /* Video mode number */
+pmode_return: .byte 0x66, 0xea /* ljmpl */
+ .long 0 /* offset goes here */
+ .short __KERNEL_CS
Hm, the struct in wakeup.h doesn't contain it too. Why exactly is it
necessary?
Yeah. Pavel, what's at 0x3f00, btw?
In fact, I'd prefer to remove .signature from the header and use the
end_signature only, so that I can use struct wakeup_header for addressing
the header fields in the assembly too.
Furthermore, by doing so, you're also padding the binary out to its maximum
length, so you might as well just remove the .bss-clearing stuff.
Do you mean placing the header at the end will fill the area between it and the
code with zeros, so the .bss clearing is not necessary?