diff options
Diffstat (limited to 'arch/x86/kernel/acpi/wakeup_64.S')
-rw-r--r-- | arch/x86/kernel/acpi/wakeup_64.S | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/arch/x86/kernel/acpi/wakeup_64.S b/arch/x86/kernel/acpi/wakeup_64.S index 8b4357e1efe0..55608ec2ed72 100644 --- a/arch/x86/kernel/acpi/wakeup_64.S +++ b/arch/x86/kernel/acpi/wakeup_64.S | |||
@@ -41,7 +41,6 @@ wakeup_code: | |||
41 | 41 | ||
42 | # Running in *copy* of this code, somewhere in low 1MB. | 42 | # Running in *copy* of this code, somewhere in low 1MB. |
43 | 43 | ||
44 | movb $0xa1, %al ; outb %al, $0x80 | ||
45 | cli | 44 | cli |
46 | cld | 45 | cld |
47 | # setup data segment | 46 | # setup data segment |
@@ -65,11 +64,6 @@ wakeup_code: | |||
65 | cmpl $0x12345678, %eax | 64 | cmpl $0x12345678, %eax |
66 | jne bogus_real_magic | 65 | jne bogus_real_magic |
67 | 66 | ||
68 | call verify_cpu # Verify the cpu supports long | ||
69 | # mode | ||
70 | testl %eax, %eax | ||
71 | jnz no_longmode | ||
72 | |||
73 | testl $1, realmode_flags - wakeup_code | 67 | testl $1, realmode_flags - wakeup_code |
74 | jz 1f | 68 | jz 1f |
75 | lcall $0xc000,$3 | 69 | lcall $0xc000,$3 |
@@ -84,12 +78,6 @@ wakeup_code: | |||
84 | call mode_set | 78 | call mode_set |
85 | 1: | 79 | 1: |
86 | 80 | ||
87 | movw $0xb800, %ax | ||
88 | movw %ax,%fs | ||
89 | movw $0x0e00 + 'L', %fs:(0x10) | ||
90 | |||
91 | movb $0xa2, %al ; outb %al, $0x80 | ||
92 | |||
93 | mov %ds, %ax # Find 32bit wakeup_code addr | 81 | mov %ds, %ax # Find 32bit wakeup_code addr |
94 | movzx %ax, %esi # (Convert %ds:gdt to a liner ptr) | 82 | movzx %ax, %esi # (Convert %ds:gdt to a liner ptr) |
95 | shll $4, %esi | 83 | shll $4, %esi |
@@ -117,14 +105,10 @@ wakeup_32_vector: | |||
117 | .code32 | 105 | .code32 |
118 | wakeup_32: | 106 | wakeup_32: |
119 | # Running in this code, but at low address; paging is not yet turned on. | 107 | # Running in this code, but at low address; paging is not yet turned on. |
120 | movb $0xa5, %al ; outb %al, $0x80 | ||
121 | 108 | ||
122 | movl $__KERNEL_DS, %eax | 109 | movl $__KERNEL_DS, %eax |
123 | movl %eax, %ds | 110 | movl %eax, %ds |
124 | 111 | ||
125 | movw $0x0e00 + 'i', %ds:(0xb8012) | ||
126 | movb $0xa8, %al ; outb %al, $0x80; | ||
127 | |||
128 | /* | 112 | /* |
129 | * Prepare for entering 64bits mode | 113 | * Prepare for entering 64bits mode |
130 | */ | 114 | */ |
@@ -200,16 +184,11 @@ wakeup_long64: | |||
200 | */ | 184 | */ |
201 | lgdt cpu_gdt_descr | 185 | lgdt cpu_gdt_descr |
202 | 186 | ||
203 | movw $0x0e00 + 'n', %ds:(0xb8014) | ||
204 | movb $0xa9, %al ; outb %al, $0x80 | ||
205 | |||
206 | movq saved_magic, %rax | 187 | movq saved_magic, %rax |
207 | movq $0x123456789abcdef0, %rdx | 188 | movq $0x123456789abcdef0, %rdx |
208 | cmpq %rdx, %rax | 189 | cmpq %rdx, %rax |
209 | jne bogus_64_magic | 190 | jne bogus_64_magic |
210 | 191 | ||
211 | movw $0x0e00 + 'u', %ds:(0xb8016) | ||
212 | |||
213 | nop | 192 | nop |
214 | nop | 193 | nop |
215 | movw $__KERNEL_DS, %ax | 194 | movw $__KERNEL_DS, %ax |
@@ -220,13 +199,11 @@ wakeup_long64: | |||
220 | movw %ax, %gs | 199 | movw %ax, %gs |
221 | movq saved_rsp, %rsp | 200 | movq saved_rsp, %rsp |
222 | 201 | ||
223 | movw $0x0e00 + 'x', %ds:(0xb8018) | ||
224 | movq saved_rbx, %rbx | 202 | movq saved_rbx, %rbx |
225 | movq saved_rdi, %rdi | 203 | movq saved_rdi, %rdi |
226 | movq saved_rsi, %rsi | 204 | movq saved_rsi, %rsi |
227 | movq saved_rbp, %rbp | 205 | movq saved_rbp, %rbp |
228 | 206 | ||
229 | movw $0x0e00 + '!', %ds:(0xb801a) | ||
230 | movq saved_rip, %rax | 207 | movq saved_rip, %rax |
231 | jmp *%rax | 208 | jmp *%rax |
232 | 209 | ||
@@ -256,21 +233,12 @@ realmode_flags: .quad 0 | |||
256 | 233 | ||
257 | .code16 | 234 | .code16 |
258 | bogus_real_magic: | 235 | bogus_real_magic: |
259 | movb $0xba,%al ; outb %al,$0x80 | ||
260 | jmp bogus_real_magic | 236 | jmp bogus_real_magic |
261 | 237 | ||
262 | .code64 | 238 | .code64 |
263 | bogus_64_magic: | 239 | bogus_64_magic: |
264 | movb $0xb3,%al ; outb %al,$0x80 | ||
265 | jmp bogus_64_magic | 240 | jmp bogus_64_magic |
266 | 241 | ||
267 | .code16 | ||
268 | no_longmode: | ||
269 | movb $0xbc,%al ; outb %al,$0x80 | ||
270 | jmp no_longmode | ||
271 | |||
272 | #include "../verify_cpu_64.S" | ||
273 | |||
274 | /* This code uses an extended set of video mode numbers. These include: | 242 | /* This code uses an extended set of video mode numbers. These include: |
275 | * Aliases for standard modes | 243 | * Aliases for standard modes |
276 | * NORMAL_VGA (-1) | 244 | * NORMAL_VGA (-1) |