public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: jkeating@redhat.com, Joerg Pommnitz <pommnitz@yahoo.com>,
	Jordan Crouse <jordan.crouse@amd.com>,
	Chuck Ebbert <cebbert@redhat.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andi Kleen <ak@suse.de>
Subject: More E820 brokenness
Date: Thu, 27 Sep 2007 15:17:33 -0700	[thread overview]
Message-ID: <46FC2BFD.6070200@zytor.com> (raw)

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

As luck would have it, it's not just an obscure Geode system which has a
broken E820 implementation.  Today I received a bug report about a Dell
system (XPS M1330) with broken E820.

Unfortunately, the workaround for the Geode breaks this system, because
x86-64 doesn't fall back to the e801/88 information like the i386 kernel
does.

I wonder if the relevant people could test out this patch to see how it
works on their respective system.  This patch reverts to 2.6.23-rc8
behaviour of simply truncating the map, but still makes e801/88 info
available to the kernel; this hopefully should match 2.6.22 behaviour.

I want to emphasize that this is seriously broken.  Using a partial e820
map could have disastrous results, since the kernel will have partial
memory map information and not know about reserved areas, etc.  Part of
me feels that the right thing to do is what the current git kernel does
-- either fall back to e801, or stop and error.

(Andi: I would particularly appreciate your opinion on this issue.)

	-hpa

[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 642 bytes --]

diff --git a/arch/i386/boot/memory.c b/arch/i386/boot/memory.c
index bccaa1c..84939b7 100644
--- a/arch/i386/boot/memory.c
+++ b/arch/i386/boot/memory.c
@@ -34,17 +34,7 @@ static int detect_memory_e820(void)
 		      "=m" (*desc)
 		    : "D" (desc), "a" (0xe820));
 
-		/* Some BIOSes stop returning SMAP in the middle of
-		   the search loop.  We don't know exactly how the BIOS
-		   screwed up the map at that point, we might have a
-		   partial map, the full map, or complete garbage, so
-		   just return failure. */
-		if (id != SMAP) {
-			count = 0;
-			break;
-		}
-
-		if (err)
+		if (id != SMAP || err)
 			break;
 
 		count++;

             reply	other threads:[~2007-09-27 22:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-27 22:17 H. Peter Anvin [this message]
2007-09-27 22:33 ` More E820 brokenness Jordan Crouse
2007-09-27 22:47   ` H. Peter Anvin
2007-09-27 23:15     ` Jordan Crouse
2007-09-27 23:22       ` H. Peter Anvin
2007-09-27 23:27       ` H. Peter Anvin
2007-09-27 23:34         ` Jordan Crouse
2007-09-27 23:36           ` H. Peter Anvin
2007-09-27 23:54             ` Jordan Crouse
2007-09-28  0:12               ` H. Peter Anvin
2007-09-28 13:05                 ` Rafael J. Wysocki

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=46FC2BFD.6070200@zytor.com \
    --to=hpa@zytor.com \
    --cc=ak@suse.de \
    --cc=cebbert@redhat.com \
    --cc=jkeating@redhat.com \
    --cc=jordan.crouse@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pommnitz@yahoo.com \
    /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