Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212015
b: refs/heads/master
c: 9ea77bd
h: refs/heads/master
i:
  212013: 2d34ffb
  212011: 20b9785
  212007: 1b08822
  211999: 7899c36
v: v3
  • Loading branch information
H. Peter Anvin committed Aug 26, 2010
1 parent 4f45396 commit ec27d5d
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d0cd7425fab774a480cce17c2f649984312d0b55
refs/heads/master: 9ea77bdb39b62c9bf9fd3cdd1c25a9420bccd380
5 changes: 5 additions & 0 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2150,6 +2150,11 @@ and is between 256 and 4096 characters. It is defined in the file
Reserves a hole at the top of the kernel virtual
address space.

reservelow= [X86]
Format: nn[K]
Set the amount of memory to reserve for BIOS at
the bottom of the address space.

reset_devices [KNL] Force drivers to reset the underlying device
during initialization.

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ config X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK
Set whether the default state of memory_corruption_check is
on or off.

config X86_LOW_RESERVE
config X86_RESERVE_LOW
int "Amount of low memory, in kilobytes, to reserve for the BIOS"
default 64
range 4 640
Expand Down
28 changes: 26 additions & 2 deletions trunk/arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,8 @@ static __init void reserve_ibft_region(void)
reserve_early_overlap_ok(addr, addr + size, "ibft");
}

static unsigned reserve_low = CONFIG_X86_RESERVE_LOW << 10;

static void __init trim_bios_range(void)
{
/*
Expand All @@ -627,9 +629,9 @@ static void __init trim_bios_range(void)
*
* This typically reserves additional memory (64KiB by default)
* since some BIOSes are known to corrupt low memory. See the
* Kconfig help text for X86_LOW_RESERVE.
* Kconfig help text for X86_RESERVE_LOW.
*/
e820_update_range(0, ALIGN(CONFIG_X86_LOW_RESERVE << 10, PAGE_SIZE),
e820_update_range(0, ALIGN(reserve_low, PAGE_SIZE),
E820_RAM, E820_RESERVED);

/*
Expand All @@ -641,6 +643,28 @@ static void __init trim_bios_range(void)
sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
}

static int __init parse_reservelow(char *p)
{
unsigned long long size;

if (!p)
return -EINVAL;

size = memparse(p, &p);

if (size < 4096)
size = 4096;

if (size > 640*1024)
size = 640*1024;

reserve_low = size;

return 0;
}

early_param("reservelow", parse_reservelow);

/*
* Determine if we were loaded by an EFI loader. If so, then we have also been
* passed the efi memmap, systab, etc., so we should use these data structures
Expand Down

0 comments on commit ec27d5d

Please sign in to comment.