mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] s-t-RAM: load gdt the right way
@ 2005-04-21 11:09 Pavel Machek
  0 siblings, 0 replies; only message in thread
From: Pavel Machek @ 2005-04-21 11:09 UTC (permalink / raw)
  To: Andrew Morton, kernel list; +Cc: ak


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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-04-21 11:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-21 11:09 [patch] s-t-RAM: load gdt the right way Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®