Skip to content

Commit 1a6a904

Browse files
rpptsuryasaimadhu
authored andcommitted
x86/setup: Remove CONFIG_X86_RESERVE_LOW and reservelow= options
The CONFIG_X86_RESERVE_LOW build time and reservelow= command line option allowed to control the amount of memory under 1M that would be reserved at boot to avoid using memory that can be potentially clobbered by BIOS. Since the entire range under 1M is always reserved there is no need for these options anymore and they can be removed. Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20210601075354.5149-3-rppt@kernel.org
1 parent 0a5f38c commit 1a6a904

File tree

3 files changed

+0
-58
lines changed

3 files changed

+0
-58
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4775,11 +4775,6 @@
47754775
Reserves a hole at the top of the kernel virtual
47764776
address space.
47774777

4778-
reservelow= [X86]
4779-
Format: nn[K]
4780-
Set the amount of memory to reserve for BIOS at
4781-
the bottom of the address space.
4782-
47834778
reset_devices [KNL] Force drivers to reset the underlying device
47844779
during initialization.
47854780

arch/x86/Kconfig

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,35 +1693,6 @@ config X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK
16931693
Set whether the default state of memory_corruption_check is
16941694
on or off.
16951695

1696-
config X86_RESERVE_LOW
1697-
int "Amount of low memory, in kilobytes, to reserve for the BIOS"
1698-
default 64
1699-
range 4 640
1700-
help
1701-
Specify the amount of low memory to reserve for the BIOS.
1702-
1703-
The first page contains BIOS data structures that the kernel
1704-
must not use, so that page must always be reserved.
1705-
1706-
By default we reserve the first 64K of physical RAM, as a
1707-
number of BIOSes are known to corrupt that memory range
1708-
during events such as suspend/resume or monitor cable
1709-
insertion, so it must not be used by the kernel.
1710-
1711-
You can set this to 4 if you are absolutely sure that you
1712-
trust the BIOS to get all its memory reservations and usages
1713-
right. If you know your BIOS have problems beyond the
1714-
default 64K area, you can set this to 640 to avoid using the
1715-
entire low memory range.
1716-
1717-
If you have doubts about the BIOS (e.g. suspend/resume does
1718-
not work or there's kernel crashes after certain hardware
1719-
hotplug events) then you might want to enable
1720-
X86_CHECK_BIOS_CORRUPTION=y to allow the kernel to check
1721-
typical corruption patterns.
1722-
1723-
Leave this to the default value of 64 if you are unsure.
1724-
17251696
config MATH_EMULATION
17261697
bool
17271698
depends on MODIFY_LDT_SYSCALL

arch/x86/kernel/setup.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -695,30 +695,6 @@ static void __init e820_add_kernel_range(void)
695695
e820__range_add(start, size, E820_TYPE_RAM);
696696
}
697697

698-
static unsigned reserve_low = CONFIG_X86_RESERVE_LOW << 10;
699-
700-
static int __init parse_reservelow(char *p)
701-
{
702-
unsigned long long size;
703-
704-
if (!p)
705-
return -EINVAL;
706-
707-
size = memparse(p, &p);
708-
709-
if (size < 4096)
710-
size = 4096;
711-
712-
if (size > 640*1024)
713-
size = 640*1024;
714-
715-
reserve_low = size;
716-
717-
return 0;
718-
}
719-
720-
early_param("reservelow", parse_reservelow);
721-
722698
static void __init early_reserve_memory(void)
723699
{
724700
/*

0 commit comments

Comments
 (0)