Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1447575
| From | Andy Lutomirski <luto@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] x86/ebda: If the EBDA is in lowmem, reserve only 4k for the EBDA |
| Date | 2016-07-21 03:40 +0200 |
| Message-ID | <rXb7X-Jj-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Under some conditions, my Dell XPS 13 9350 puts the EBDA at 0x2c000
but reports the lowmem cutoff as 0. The old code reserves
everything above 0x2c000 and I can't boot [1].
Due to an old quirk, we assume that lowmem ends at 0x9f000. Nonetheless,
the old code would reserve everything from 0x2c000 to 0xfffff.
Be a little less conservative: when the EBDA is in lowmem, reserve
4k the EBDA and reserve highmem separately. On my laptop, this ends
up being more or less a no-op: the EBDA shows up as a single-page of
runtime data in the EFI memmap. Go Dell for getting this right.
[1] This only breaks boot in practice when some other firmware or
GRUB oddity that I don't fully understand kicks in causing the
memory below 0x2c000 to be unusable.
Signed-off-by: Andy Lutomirski <luto@kernel.org>
---
This is intentionally not tagged for -stable. I think it's -stable
material *eventually*, but the problem that's fixed is not widespread
(it's apparently just me for now) and there's plenty of potential to
regress something that was worked around by the old code.
arch/x86/kernel/ebda.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/ebda.c b/arch/x86/kernel/ebda.c
index afe65dffee80..2183a7eac646 100644
--- a/arch/x86/kernel/ebda.c
+++ b/arch/x86/kernel/ebda.c
@@ -62,10 +62,12 @@ void __init reserve_ebda_region(void)
if (lowmem < INSANE_CUTOFF)
lowmem = LOWMEM_CAP;
- /* Use the lower of the lowmem and EBDA markers as the cutoff */
- lowmem = min(lowmem, ebda_addr);
lowmem = min(lowmem, LOWMEM_CAP); /* Absolute cap */
/* reserve all memory between lowmem and the 1MB mark */
memblock_reserve(lowmem, 0x100000 - lowmem);
+
+ /* if the EBDA is in lowmem, reserve it separately. */
+ if (ebda_addr < lowmem)
+ memblock_reserve(ebda_addr, 4096);
}
--
2.7.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] x86/ebda: If the EBDA is in lowmem, reserve only 4k for the EBDA Andy Lutomirski <luto@kernel.org> - 2016-07-21 03:40 +0200
[PATCH] x86/boot: Reorganize and clean up the BIOS area reservation code Ingo Molnar <mingo@kernel.org> - 2016-07-21 10:20 +0200
Re: [PATCH] x86/boot: Reorganize and clean up the BIOS area reservation code Ingo Molnar <mingo@kernel.org> - 2016-07-21 10:40 +0200
Re: [PATCH] x86/boot: Reorganize and clean up the BIOS area reservation code "H. Peter Anvin" <hpa@zytor.com> - 2016-07-21 10:40 +0200
Re: [PATCH] x86/boot: Reorganize and clean up the BIOS area reservation code Ingo Molnar <mingo@kernel.org> - 2016-07-21 11:20 +0200
Re: [PATCH] x86/boot: Reorganize and clean up the BIOS area reservation code Ingo Molnar <mingo@kernel.org> - 2016-07-21 11:20 +0200
Re: [PATCH] x86/boot: Reorganize and clean up the BIOS area reservation code "H. Peter Anvin" <hpa@zytor.com> - 2016-07-21 14:40 +0200
Re: [PATCH] x86/boot: Reorganize and clean up the BIOS area reservation code Andy Lutomirski <luto@amacapital.net> - 2016-07-21 17:00 +0200
Re: [PATCH] x86/boot: Reorganize and clean up the BIOS area reservation code Ingo Molnar <mingo@kernel.org> - 2016-07-21 18:20 +0200
Re: [PATCH] x86/boot: Reorganize and clean up the BIOS area reservation code Andy Lutomirski <luto@amacapital.net> - 2016-07-21 23:10 +0200
Re: [PATCH] x86/boot: Reorganize and clean up the BIOS area reservation code "H. Peter Anvin" <hpa@zytor.com> - 2016-07-21 23:30 +0200
Re: [PATCH] x86/boot: Reorganize and clean up the BIOS area reservation code Andy Lutomirski <luto@amacapital.net> - 2016-07-21 23:50 +0200
Re: [PATCH] x86/boot: Reorganize and clean up the BIOS area reservation code Andy Lutomirski <luto@amacapital.net> - 2016-07-22 00:50 +0200
Re: [PATCH] x86/boot: Reorganize and clean up the BIOS area reservation code Matt Fleming <matt@codeblueprint.co.uk> - 2016-07-22 15:10 +0200
Re: [PATCH] x86/boot: Reorganize and clean up the BIOS area reservation code Linus Torvalds <torvalds@linux-foundation.org> - 2016-07-23 03:20 +0200
csiph-web