2 * ACPI wakeup real mode startup stub
4 #include <asm/segment.h>
5 #include <asm/msr-index.h>
7 #include <asm/pgtable.h>
10 .section ".header", "a"
12 /* This should match the structure in wakeup.h */
15 video_mode: .short 0 /* Video mode number */
16 pmode_return: .byte 0x66, 0xea /* ljmpl */
17 .long 0 /* offset goes here */
19 pmode_cr0: .long 0 /* Saved %cr0 */
20 pmode_cr3: .long 0 /* Saved %cr3 */
21 pmode_cr4: .long 0 /* Saved %cr4 */
22 pmode_efer: .quad 0 /* Saved EFER */
24 realmode_flags: .long 0
26 trampoline_segment: .word 0
27 signature: .long 0x51ee1111
43 movl $wakeup_stack_end, %esp
45 /* Clear the EFLAGS */
49 /* Check header signature... */
51 cmpl $0x51ee1111, %eax
54 /* Check we really have everything... */
55 movl end_signature, %eax
56 cmpl $0x65a22c82, %eax
62 /* Do any other stuff... */
65 /* This could also be done in C code... */
74 movl pmode_efer + 4, %edx
78 movl $0xc0000080, %ecx
84 /* This really couldn't... */
90 pushw trampoline_segment
102 .globl HEAP, heap_end