lkml.org 
[lkml]   [2005]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] s-t-RAM: load gdt the right way

Sleep code uses wrong version of lgdt, that does the wrong thing when
gdt is beyond 16MB or so...

Signed-off-by: Pavel Machek <pavel@suse.cz>

--- clean/arch/i386/kernel/acpi/wakeup.S 2005-01-22 21:24:51.000000000 +0100
+++ linux/arch/i386/kernel/acpi/wakeup.S 2005-04-14 22:29:45.000000000 +0200
@@ -74,8 +90,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
--- clean/arch/x86_64/kernel/acpi/wakeup.S 2005-01-22 21:24:51.000000000 +0100
+++ linux/arch/x86_64/kernel/acpi/wakeup.S 2005-04-14 22:34:18.000000000 +0200
@@ -67,7 +67,7 @@
shll $4, %eax
addl $(gdta - wakeup_code), %eax
movl %eax, gdt_48a +2 - wakeup_code
- lgdt %ds:gdt_48a - wakeup_code # load gdt with whatever is
+ lgdtl %ds:gdt_48a - wakeup_code # load gdt with whatever is
# appropriate

movl $1, %eax # protected mode (PE) bit
--
Boycott Kodak -- for their patent abuse against Java.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-21 13:26    [W:0.026 / U:17.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site