From 48741e3b994ba29eb0b53e244d1d08da0c7fe54e Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 17 Aug 2016 17:46:56 -0600 Subject: [PATCH] Do not map heap on AP, due to it being independent from the BSP heap. We need to adjust the mapping so that kernel mappings are shared accross processors, probably using higher half mapping for the kernel --- arch/x86_64/src/start.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/arch/x86_64/src/start.rs b/arch/x86_64/src/start.rs index 68c188f..6ab23a7 100644 --- a/arch/x86_64/src/start.rs +++ b/arch/x86_64/src/start.rs @@ -95,15 +95,10 @@ pub unsafe extern fn kstart_ap(stack_start: usize, stack_end: usize) -> ! { idt::init_ap(); // Initialize paging - let mut active_table = paging::init(stack_start, stack_end); + //let mut active_table = + paging::init(stack_start, stack_end); - // Map heap - let heap_start_page = Page::containing_address(VirtualAddress::new(HEAP_START)); - let heap_end_page = Page::containing_address(VirtualAddress::new(HEAP_START + HEAP_SIZE-1)); - - for page in Page::range_inclusive(heap_start_page, heap_end_page) { - active_table.map(page, entry::WRITABLE | entry::NO_EXECUTE); - } + // TODO: Use heap from master, ensuring consistency } while ! BSP_READY.load(Ordering::SeqCst) {