From: Yinghai Lu <yinghai@kernel.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: "Kevin O'Connor" <kevin@koconnor.net>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Stefan Reinauer <stepan@coresystems.de>,
linux-kernel@vger.kernel.org, coreboot@coreboot.org,
Jaswinder Singh Rajput <jaswinder@infradead.org>
Subject: Re: MPTable can not be high-memory on Linux
Date: Sun, 22 Feb 2009 22:14:56 -0800 [thread overview]
Message-ID: <49A23EE0.8000102@kernel.org> (raw)
In-Reply-To: <20090222225847.GB1649@elte.hu>
Ingo Molnar wrote:
> * Kevin O'Connor <kevin@koconnor.net> wrote:
>
>> On Sun, Feb 22, 2009 at 01:33:35PM -0800, Yinghai Lu wrote:
>> [...]
>>>>>> BIOS-e820: 0000000000090000 - 0000000000100000 (reserved)
>>>>>> BIOS-e820: 0000000000100000 - 000000003f7f0000 (usable)
>>>>>> BIOS-e820: 000000003f7f0000 - 0000000040000000 (reserved)
>> [...]
>>>>>> found SMP MP-table at [c00f9fc0] 000f9fc0
>> [...]
>>> that should work for a long time.
>>>
>>> 0xf9fc0 < 1M is quite < max_low_pfn, so wonder why bootmem could panic.
>> On this machine the mptable "floating" structure is at
>> 0xf9fc0. It points to the rest of the table which is in the
>> 0x3f7f0000 area.
>>
>> Note, that this is on a Coreboot+SeaBIOS machine - so we can
>> change the bios. However, the mptable spec does allow for
>> part of the table to be high memory.
>
> yes, and i'd prefer if it worked fine even if it's that high.
>
please check
[PATCH] x86: check physptr with max_low_pfn on 32bit
Impact: fix bug
coreboot aka LinuxBIOS try to put mptable on somewhere much high than
max_low_pfn, it cause panic
so need to check physptr with max_low_pfn * PAGE_SIZE.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
arch/x86/kernel/mpparse.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
Index: linux-2.6/arch/x86/kernel/mpparse.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/mpparse.c
+++ linux-2.6/arch/x86/kernel/mpparse.c
@@ -710,13 +710,22 @@ static int __init smp_scan_config(unsign
* of physical memory; so that simply reserving
* PAGE_SIZE from mpf->physptr yields BUG()
* in reserve_bootmem.
+ * also need to make sure physptr is below than
+ * max_low_pfn
+ * we don't need reserve the area above max_low_pfn
*/
unsigned long end = max_low_pfn * PAGE_SIZE;
- if (mpf->physptr + size > end)
- size = end - mpf->physptr;
-#endif
+
+ if (mpf->physptr < end) {
+ if (mpf->physptr + size > end)
+ size = end - mpf->physptr;
+ reserve_bootmem_generic(mpf->physptr, size,
+ BOOTMEM_DEFAULT);
+ }
+#else
reserve_bootmem_generic(mpf->physptr, size,
BOOTMEM_DEFAULT);
+#endif
}
return 1;
next prev parent reply other threads:[~2009-02-23 6:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <499DB40C.1060205@coresystems.de>
[not found] ` <499DB480.1000909@coresystems.de>
[not found] ` <499DB6D8.5040706@coresystems.de>
[not found] ` <499DBDA0.2010606@coresystems.de>
[not found] ` <499DCE79.8020809@coresystems.de>
2009-02-22 15:25 ` MPTable can not be high-memory on Linux Kevin O'Connor
2009-02-22 17:06 ` Rafael J. Wysocki
2009-02-22 21:33 ` Yinghai Lu
2009-02-22 22:32 ` Kevin O'Connor
2009-02-22 22:58 ` Ingo Molnar
2009-02-23 6:14 ` Yinghai Lu [this message]
2009-02-23 6:42 ` Ingo Molnar
2009-02-28 23:41 ` Kevin O'Connor
2009-03-01 3:10 ` Yinghai Lu
2009-03-01 18:04 ` Kevin O'Connor
2009-03-02 3:23 ` [PATCH] x86: ioremap mptable -v2 Yinghai Lu
2009-03-02 10:18 ` Ingo Molnar
2009-03-02 10:19 ` Ingo Molnar
2009-03-02 20:07 ` Yinghai Lu
2009-03-02 20:29 ` Ingo Molnar
2009-03-02 20:46 ` Yinghai Lu
2009-03-02 20:57 ` Ingo Molnar
2009-02-22 17:53 ` MPTable can not be high-memory on Linux Andi Kleen
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=49A23EE0.8000102@kernel.org \
--to=yinghai@kernel.org \
--cc=coreboot@coreboot.org \
--cc=jaswinder@infradead.org \
--cc=kevin@koconnor.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rjw@sisk.pl \
--cc=stepan@coresystems.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.