mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Andrew Morton <akpm@zip.com.au>,
	kernel list <linux-kernel@vger.kernel.org>
Cc: ak@suse.de
Subject: [patch] s-t-RAM: load gdt the right way
Date: Thu, 21 Apr 2005 13:09:36 +0200	[thread overview]
Message-ID: <20050421110936.GA18164@elf.ucw.cz> (raw)


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.

                 reply	other threads:[~2005-04-21 11:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050421110936.GA18164@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=ak@suse.de \
    --cc=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®