Skip to contentSkip to conversation

Fix reloading GDT on ACPI S3 wakeup (fwd)

PATCH Pavel Machek 1 participant 1 message Apr 14, 2005 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi!

Quoted 6 lines

This patch - based on
http://marc.theaimsgroup.com/?l=linux-kernel&m=110055503031009&w=2 - makes ACPI S3 wakeup work for me on a ThinkPad T40p laptop with a SMP kernel. Without it only UP kernels work. I've been using the patch for three months now without any issues.

Quoted 6 lines

The ACPI resume code currently uses a real-mode 16-bit lgdt instruction to reload the GDT. This only restores the lower 24 bits of the GDT base address. In recent SMP kernels, the GDT seems to have moved out of the lower 16 megs, thereby causing the ACPI resume to fail -- an invalid GDT was being loaded.

Actually x86-64 needs this, too. Any testers?
Pavel

arch/x86_64/kernel/acpi/wakeup.S +1 -1
@@ -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
Signature · 1 line
Boycott Kodak -- for their patent abuse against Java.