* [PATCH] kdump: do not drop entire e820 in crash kernel
@ 2013-02-04 4:04 Cliff Wickman
2013-02-04 4:52 ` H. Peter Anvin
0 siblings, 1 reply; 2+ messages in thread
From: Cliff Wickman @ 2013-02-04 4:04 UTC (permalink / raw)
To: linux-kernel; +Cc: mingo, venkatesh.pallipadi, kexec, hpa
From: Cliff Wickman <cpw@sgi.com>
The crash kernel is not able to find its root device if that device is not
on PCI 0.
This is because it is booted with the command line option memmap=exactmap
which currently clears the e820 table. So ACPI processing does not
find reserved i/o spaces.
This works for a device on PCI 0 because ACPI falls back to a legacy mode.
But the error message " [Firmware Bug]: PCI: MMCONFIG at
[mem 0x80000000-0x80cfffff] not reserved in ACPI motherboard resources"
is written to the log even in this functioning case.
It fails for some devices on UV2, and only for UV2, because SGI seems to
be the only manufacturer currently using the extended PCI(>0).
The fix is to not drop the entire e820 table on a memmap=exactmap, but
to preserve all the non-E820_RAM reservations that the BIOS has made.
Signed-off-by: Cliff Wickman <cpw@sgi.com>
---
arch/x86/kernel/e820.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
Index: linus.current/arch/x86/kernel/e820.c
===================================================================
--- linus.current.orig/arch/x86/kernel/e820.c
+++ linus.current/arch/x86/kernel/e820.c
@@ -839,6 +839,8 @@ static int __init parse_memmap_opt(char
{
char *oldp;
u64 start_at, mem_size;
+ int i;
+ struct e820entry *curp, *availp;
if (!p)
return -EINVAL;
@@ -852,7 +854,17 @@ static int __init parse_memmap_opt(char
*/
saved_max_pfn = e820_end_of_ram_pfn();
#endif
- e820.nr_map = 0;
+ /* keep everything that was reserved by the BIOS */
+ for (i = 0, curp = &e820.map[0], availp = &e820.map[0];
+ i < e820.nr_map; i++, curp++) {
+ if (curp->type != E820_RAM) {
+ if (curp != availp) {
+ *availp = *curp;
+ availp++;
+ }
+ }
+ }
+ e820.nr_map = availp - &e820.map[0];
userdef = 1;
return 0;
}
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] kdump: do not drop entire e820 in crash kernel
2013-02-04 4:04 [PATCH] kdump: do not drop entire e820 in crash kernel Cliff Wickman
@ 2013-02-04 4:52 ` H. Peter Anvin
0 siblings, 0 replies; 2+ messages in thread
From: H. Peter Anvin @ 2013-02-04 4:52 UTC (permalink / raw)
To: Cliff Wickman; +Cc: kexec, linux-kernel, Ingo Molnar
On 02/03/2013 08:04 PM, Cliff Wickman wrote:
> From: Cliff Wickman <cpw@sgi.com>
>
> The crash kernel is not able to find its root device if that device is not
> on PCI 0.
>
> This is because it is booted with the command line option memmap=exactmap
> which currently clears the e820 table. So ACPI processing does not
> find reserved i/o spaces.
>
> This works for a device on PCI 0 because ACPI falls back to a legacy mode.
> But the error message " [Firmware Bug]: PCI: MMCONFIG at
> [mem 0x80000000-0x80cfffff] not reserved in ACPI motherboard resources"
> is written to the log even in this functioning case.
>
> It fails for some devices on UV2, and only for UV2, because SGI seems to
> be the only manufacturer currently using the extended PCI(>0).
>
> The fix is to not drop the entire e820 table on a memmap=exactmap, but
> to preserve all the non-E820_RAM reservations that the BIOS has made.
>
NAK. This is a fundamntal semantic change to something that isn't just
affecting kexec.
This ultimately is the result of the very bad design decision to use the
command line to muck with the target kernel memory map.
The work is underway to fix this, but this is not the right fix.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-04 4:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-04 4:04 [PATCH] kdump: do not drop entire e820 in crash kernel Cliff Wickman
2013-02-04 4:52 ` H. Peter Anvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox