Skip to content

Commit

Permalink
[PATCH] kexec: reserve Bootmem fix for booting nondefault location ke…
Browse files Browse the repository at this point in the history
…rnel

This patch fixes a problem with reserving memory during boot up of a kernel
built for non-default location.  Currently boot memory allocator reserves
the memory required by kernel image, boot allocaotor bitmap etc.  It
assumes that kernel is loaded at 1MB (HIGH_MEMORY hard coded to 1024*1024).
 But kernel can be built for non-default locatoin, hence existing
hardcoding will lead to reserving unnecessary memory.  This patch fixes it.

Signed-off-by: Vivek Goyal <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Vivek Goyal authored and Linus Torvalds committed Jun 25, 2005
1 parent 3d345e3 commit 8a91908
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/i386/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1124,8 +1124,8 @@ void __init setup_bootmem_allocator(void)
* the (very unlikely) case of us accidentally initializing the
* bootmem allocator with an invalid RAM area.
*/
reserve_bootmem(HIGH_MEMORY, (PFN_PHYS(min_low_pfn) +
bootmap_size + PAGE_SIZE-1) - (HIGH_MEMORY));
reserve_bootmem(__PHYSICAL_START, (PFN_PHYS(min_low_pfn) +
bootmap_size + PAGE_SIZE-1) - (__PHYSICAL_START));

/*
* reserve physical page 0 - it's a special BIOS page on many boxes,
Expand Down

0 comments on commit 8a91908

Please sign in to comment.