mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Brian Gerst <bgerst@didntduck.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Meelis Roos <mroos@linux.ee>, Brian Gerst <bgerst@didntduck.org>,
	linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: [PATCH] PnP BIOS exception fixes
Date: Thu, 04 Mar 2004 12:39:01 -0500	[thread overview]
Message-ID: <404769B5.7080900@quark.didntduck.org> (raw)
In-Reply-To: <Pine.GSO.4.44.0403041657430.10910-100000@math.ut.ee>

[-- Attachment #1: Type: text/plain, Size: 205 bytes --]

This patch fixes two errors in fixup_exception() for PnP BIOS faults:
- Check for the correct segments used for the BIOS
- Fix asm constraints so that EIP and ESP are properly reloaded

--
				Brian Gerst

[-- Attachment #2: pnpsegs-2 --]
[-- Type: text/plain, Size: 777 bytes --]

diff -urN linux-bk/arch/i386/mm/extable.c linux/arch/i386/mm/extable.c
--- linux-bk/arch/i386/mm/extable.c	2004-02-15 00:41:41.000000000 -0500
+++ linux/arch/i386/mm/extable.c	2004-03-04 10:45:32.988904488 -0500
@@ -12,7 +12,7 @@
 	const struct exception_table_entry *fixup;
 
 #ifdef CONFIG_PNPBIOS
-	if (unlikely((regs->xcs | 8) == 0x88)) /* 0x80 or 0x88 */
+	if (unlikely((regs->xcs & ~15) == (GDT_ENTRY_PNPBIOS_BASE << 3)))
 	{
 		extern u32 pnp_bios_fault_eip, pnp_bios_fault_esp;
 		extern u32 pnp_bios_is_utter_crap;
@@ -21,7 +21,7 @@
 		__asm__ volatile(
 			"movl %0, %%esp\n\t"
 			"jmp *%1\n\t"
-			: "=a" (pnp_bios_fault_esp), "=b" (pnp_bios_fault_eip));
+			: : "g" (pnp_bios_fault_esp), "g" (pnp_bios_fault_eip));
 		panic("do_trap: can't hit this");
 	}
 #endif

  reply	other threads:[~2004-03-04 17:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-04  7:23 2.6.3: PnPBIOS hangs with S875WP1 BIOS Meelis Roos
2004-03-04 13:51 ` Brian Gerst
2004-03-04 14:09   ` Meelis Roos
2004-03-04 14:45     ` Brian Gerst
2004-03-04 14:58       ` Meelis Roos
2004-03-04 17:39         ` Brian Gerst [this message]
2004-03-04 18:53           ` [PATCH] PnP BIOS exception fixes Linus Torvalds
2004-03-04 18:54             ` Brian Gerst

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=404769B5.7080900@quark.didntduck.org \
    --to=bgerst@didntduck.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mroos@linux.ee \
    --cc=torvalds@osdl.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®