aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/setup.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 8354399b3aae..0aebd776018e 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -608,8 +608,6 @@ static __init void reserve_ibft_region(void)
608 memblock_reserve(addr, size); 608 memblock_reserve(addr, size);
609} 609}
610 610
611static unsigned reserve_low = CONFIG_X86_RESERVE_LOW << 10;
612
613static bool __init snb_gfx_workaround_needed(void) 611static bool __init snb_gfx_workaround_needed(void)
614{ 612{
615#ifdef CONFIG_PCI 613#ifdef CONFIG_PCI
@@ -698,8 +696,7 @@ static void __init trim_bios_range(void)
698 * since some BIOSes are known to corrupt low memory. See the 696 * since some BIOSes are known to corrupt low memory. See the
699 * Kconfig help text for X86_RESERVE_LOW. 697 * Kconfig help text for X86_RESERVE_LOW.
700 */ 698 */
701 e820_update_range(0, ALIGN(reserve_low, PAGE_SIZE), 699 e820_update_range(0, PAGE_SIZE, E820_RAM, E820_RESERVED);
702 E820_RAM, E820_RESERVED);
703 700
704 /* 701 /*
705 * special case: Some BIOSen report the PC BIOS 702 * special case: Some BIOSen report the PC BIOS
@@ -711,6 +708,8 @@ static void __init trim_bios_range(void)
711 sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map); 708 sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
712} 709}
713 710
711static unsigned reserve_low = CONFIG_X86_RESERVE_LOW << 10;
712
714static int __init parse_reservelow(char *p) 713static int __init parse_reservelow(char *p)
715{ 714{
716 unsigned long long size; 715 unsigned long long size;
@@ -733,6 +732,11 @@ static int __init parse_reservelow(char *p)
733 732
734early_param("reservelow", parse_reservelow); 733early_param("reservelow", parse_reservelow);
735 734
735static void __init trim_low_memory_range(void)
736{
737 memblock_reserve(0, ALIGN(reserve_low, PAGE_SIZE));
738}
739
736/* 740/*
737 * Determine if we were loaded by an EFI loader. If so, then we have also been 741 * Determine if we were loaded by an EFI loader. If so, then we have also been
738 * passed the efi memmap, systab, etc., so we should use these data structures 742 * passed the efi memmap, systab, etc., so we should use these data structures
@@ -987,6 +991,7 @@ void __init setup_arch(char **cmdline_p)
987 setup_real_mode(); 991 setup_real_mode();
988 992
989 trim_platform_memory_ranges(); 993 trim_platform_memory_ranges();
994 trim_low_memory_range();
990 995
991 init_gbpages(); 996 init_gbpages();
992 997