From d4770bc9af9b12c21d1181d6e60d7c70625ed1dd Mon Sep 17 00:00:00 2001 From: "Masamichi Takagi m-takagi@ab.jp.nec.com" Date: Tue, 30 Oct 2012 20:53:14 +0900 Subject: [PATCH] make physical memory allocator try to reserve memory areas with (size/2)-aligned addresses --- kernel/mem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/mem.c b/kernel/mem.c index c5854936..44487d81 100644 --- a/kernel/mem.c +++ b/kernel/mem.c @@ -101,7 +101,10 @@ static void page_allocator_init(void) pa_start = aal_mc_get_memory_address(AAL_MC_GMA_AVAIL_START, 0); pa_end = aal_mc_get_memory_address(AAL_MC_GMA_AVAIL_END, 0); - pa_start &= PAGE_MASK; + // pa_start &= PAGE_MASK; + // physical memory allocator stores bitmap in array of long int + // so the unit size is 64-page + pa_start = (pa_start + PAGE_SIZE * 64 - 1) & ~(PAGE_SIZE * 64 - 1); pa_end = (pa_end + PAGE_SIZE - 1) & PAGE_MASK; /*