From: Manfred Spraul <manfred@colorfullife.com>
To: davej@suse.de, mochel@osdl.org, linux-kernel@vger.kernel.org
Subject: 2.5.24-dj2: oops in finalize_mtrr_state with bochs
Date: Tue, 25 Jun 2002 21:30:34 +0200 [thread overview]
Message-ID: <3D18C4DA.9030405@colorfullife.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 357 bytes --]
The bochs cpu emulator (tries to emulate Pentium cpus) oopses in
finalize_mtrr_state():
mtrr_if is NULL, and thus use_intel() crashes.
Patch attached. I've modified is_cpu() as well, without checking if this
macro could be used if mtrr_if is not initialized.
Partially tested - bochs now hangs at the first access to the ide
interface :-(
--
Manfred
[-- Attachment #2: patch-mtrr-dj2 --]
[-- Type: text/plain, Size: 603 bytes --]
diff -u 2.5/arch/i386/kernel/cpu/mtrr/mtrr.h build-2.5/arch/i386/kernel/cpu/mtrr/mtrr.h
--- 2.5/arch/i386/kernel/cpu/mtrr/mtrr.h Tue Jun 25 20:27:47 2002
+++ build-2.5/arch/i386/kernel/cpu/mtrr/mtrr.h Tue Jun 25 21:22:15 2002
@@ -88,8 +88,8 @@
extern u32 size_or_mask, size_and_mask;
extern struct mtrr_ops * mtrr_if;
-#define is_cpu(vnd) (mtrr_if->vendor == X86_VENDOR_##vnd)
-#define use_intel() (mtrr_if->use_intel_if == 1)
+#define is_cpu(vnd) (mtrr_if && mtrr_if->vendor == X86_VENDOR_##vnd)
+#define use_intel() (mtrr_if && mtrr_if->use_intel_if == 1)
extern unsigned int num_var_ranges;
reply other threads:[~2002-06-25 19:29 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=3D18C4DA.9030405@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=davej@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@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