Re: [patch] Fix GDT re-load on ACPI resume

Nickolai Zeldovich
2004-11-15T23:54:21Z

On Mon, 15 Nov 2004, Maciej W. Rozycki wrote:

> You should use "lgdtl" and let gas figure out the rest.

Thanks for the pointer; here's an updated patch.

-- kolya

--- linux-2.6.9/arch/i386/kernel/acpi/wakeup.S 2004/11/15 09:00:34 1.1
+++ linux-2.6.9/arch/i386/kernel/acpi/wakeup.S 2004/11/15 23:50:38
@@ -66,8 +66,9 @@
movw %ax,%fs
movw $0x0e00 + 'i', %fs:(0x12)

- # need a gdt
- lgdt real_save_gdt - wakeup_code
+ # need a gdt -- use lgdtl to force 32-bit operands, in case
+ # the GDT is located past 16 megabytes.
+ lgdtl real_save_gdt - wakeup_code

movl real_save_cr0 - wakeup_code, %eax
movl %eax, %cr0