[PATCH 14/33] x86_64: Properly report in /proc/iomem the kernel address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The code assumed that the kernel was always loaded
at 1M in memory.  This fixes that assumption.

Signed-off-by: Eric W. Biederman <[email protected]>
---
 arch/x86_64/kernel/setup.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index 8a099ff..11d31ea 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -521,7 +521,7 @@ static void discover_ebda(void)
 
 void __init setup_arch(char **cmdline_p)
 {
-	unsigned long kernel_end;
+	unsigned long kernel_start, kernel_end;
 
  	ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
  	screen_info = SCREEN_INFO;
@@ -596,8 +596,9 @@ #endif
 				(table_end - table_start) << PAGE_SHIFT);
 
 	/* reserve kernel */
+	kernel_start = __pa_symbol(&_text);
 	kernel_end = round_up(__pa_symbol(&_end),PAGE_SIZE);
-	reserve_bootmem_generic(HIGH_MEMORY, kernel_end - HIGH_MEMORY);
+	reserve_bootmem_generic(kernel_start, kernel_end - kernel_start);
 
 	/*
 	 * reserve physical page 0 - it's a special BIOS page on many boxes,
-- 
1.4.2.rc2.g5209e

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux