diff options
author | Pavel Machek <pavel@ucw.cz> | 2007-10-18 06:04:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-18 17:37:19 -0400 |
commit | 50a1efe14fd56a273cdbe53bf1c7fc12099d2e1a (patch) | |
tree | 1ec10fa2c77033b287b2012fb77b42646bdecfad | |
parent | 8f4ce8c32f2dc2bc2411cafe39976fc5c0adfabf (diff) |
s2ram: kill old debugging junk
This removes old debugging stuff, that should be no longer neccessary. It
accessed VGA hardware (which may not be ready at this point), and used LEDs
at port 80 for debugging.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/x86/kernel/acpi/wakeup_32.S | 12 | ||||
-rw-r--r-- | arch/x86/kernel/acpi/wakeup_64.S | 32 |
2 files changed, 1 insertions, 43 deletions
diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S index f22ba8534d26..a97313b1270e 100644 --- a/arch/x86/kernel/acpi/wakeup_32.S +++ b/arch/x86/kernel/acpi/wakeup_32.S | |||
@@ -11,7 +11,7 @@ | |||
11 | # | 11 | # |
12 | # If physical address of wakeup_code is 0x12345, BIOS should call us with | 12 | # If physical address of wakeup_code is 0x12345, BIOS should call us with |
13 | # cs = 0x1234, eip = 0x05 | 13 | # cs = 0x1234, eip = 0x05 |
14 | # | 14 | # |
15 | 15 | ||
16 | #define BEEP \ | 16 | #define BEEP \ |
17 | inb $97, %al; \ | 17 | inb $97, %al; \ |
@@ -52,7 +52,6 @@ wakeup_code: | |||
52 | BEEP | 52 | BEEP |
53 | 1: | 53 | 1: |
54 | mov $(wakeup_stack - wakeup_code), %sp # Private stack is needed for ASUS board | 54 | mov $(wakeup_stack - wakeup_code), %sp # Private stack is needed for ASUS board |
55 | movw $0x0e00 + 'S', %fs:(0x12) | ||
56 | 55 | ||
57 | pushl $0 # Kill any dangerous flags | 56 | pushl $0 # Kill any dangerous flags |
58 | popfl | 57 | popfl |
@@ -90,9 +89,6 @@ wakeup_code: | |||
90 | # make sure %cr4 is set correctly (features, etc) | 89 | # make sure %cr4 is set correctly (features, etc) |
91 | movl real_save_cr4 - wakeup_code, %eax | 90 | movl real_save_cr4 - wakeup_code, %eax |
92 | movl %eax, %cr4 | 91 | movl %eax, %cr4 |
93 | movw $0xb800, %ax | ||
94 | movw %ax,%fs | ||
95 | movw $0x0e00 + 'i', %fs:(0x12) | ||
96 | 92 | ||
97 | # need a gdt -- use lgdtl to force 32-bit operands, in case | 93 | # need a gdt -- use lgdtl to force 32-bit operands, in case |
98 | # the GDT is located past 16 megabytes. | 94 | # the GDT is located past 16 megabytes. |
@@ -102,8 +98,6 @@ wakeup_code: | |||
102 | movl %eax, %cr0 | 98 | movl %eax, %cr0 |
103 | jmp 1f | 99 | jmp 1f |
104 | 1: | 100 | 1: |
105 | movw $0x0e00 + 'n', %fs:(0x14) | ||
106 | |||
107 | movl real_magic - wakeup_code, %eax | 101 | movl real_magic - wakeup_code, %eax |
108 | cmpl $0x12345678, %eax | 102 | cmpl $0x12345678, %eax |
109 | jne bogus_real_magic | 103 | jne bogus_real_magic |
@@ -122,13 +116,11 @@ real_save_cr4: .long 0 | |||
122 | real_magic: .long 0 | 116 | real_magic: .long 0 |
123 | video_mode: .long 0 | 117 | video_mode: .long 0 |
124 | realmode_flags: .long 0 | 118 | realmode_flags: .long 0 |
125 | beep_flags: .long 0 | ||
126 | real_efer_save_restore: .long 0 | 119 | real_efer_save_restore: .long 0 |
127 | real_save_efer_edx: .long 0 | 120 | real_save_efer_edx: .long 0 |
128 | real_save_efer_eax: .long 0 | 121 | real_save_efer_eax: .long 0 |
129 | 122 | ||
130 | bogus_real_magic: | 123 | bogus_real_magic: |
131 | movw $0x0e00 + 'B', %fs:(0x12) | ||
132 | jmp bogus_real_magic | 124 | jmp bogus_real_magic |
133 | 125 | ||
134 | /* This code uses an extended set of video mode numbers. These include: | 126 | /* This code uses an extended set of video mode numbers. These include: |
@@ -194,7 +186,6 @@ wakeup_pmode_return: | |||
194 | movw %ax, %es | 186 | movw %ax, %es |
195 | movw %ax, %fs | 187 | movw %ax, %fs |
196 | movw %ax, %gs | 188 | movw %ax, %gs |
197 | movw $0x0e00 + 'u', 0xb8016 | ||
198 | 189 | ||
199 | # reload the gdt, as we need the full 32 bit address | 190 | # reload the gdt, as we need the full 32 bit address |
200 | lgdt saved_gdt | 191 | lgdt saved_gdt |
@@ -218,7 +209,6 @@ wakeup_pmode_return: | |||
218 | jmp *%eax | 209 | jmp *%eax |
219 | 210 | ||
220 | bogus_magic: | 211 | bogus_magic: |
221 | movw $0x0e00 + 'B', 0xb8018 | ||
222 | jmp bogus_magic | 212 | jmp bogus_magic |
223 | 213 | ||
224 | 214 | ||
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) |