From d289601a0e11587f4a1c24d41f350f5e6f3d0ed4 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 28 Nov 2014 02:15:15 +0100 Subject: [PATCH] smaller cleanups --- arch/x86/include/asm/page.h | 2 ++ arch/x86/mm/page.c | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/page.h b/arch/x86/include/asm/page.h index b91a80a..089c732 100644 --- a/arch/x86/include/asm/page.h +++ b/arch/x86/include/asm/page.h @@ -88,6 +88,8 @@ /// This page or table is used during the boot process #define PG_BOOT (1 << 9) +/// This page is reserved for copying +#define PAGE_TMP (PAGE_FLOOR((size_t) &kernel_start) - PAGE_SIZE) /** @brief Converts a virtual address to a physical * diff --git a/arch/x86/mm/page.c b/arch/x86/mm/page.c index f8b11c8..c3f70e1 100644 --- a/arch/x86/mm/page.c +++ b/arch/x86/mm/page.c @@ -63,9 +63,6 @@ static size_t * other[PAGE_LEVELS] = { #define CHILD(map, lvl, vpn) &map[lvl-1][vpn<>PAGE_MAP_BITS] -/** This page is reserved for copying */ -#define PAGE_TMP (PAGE_FLOOR((size_t) &kernel_start) - PAGE_SIZE) - /** @todo Does't handle huge pages for now * @todo This will cause a pagefaut if addr isn't mapped! */ size_t page_virt_to_phys(size_t addr) @@ -139,7 +136,7 @@ int page_unmap(size_t viraddr, size_t npages) spinlock_lock(&kslock); for (vpn=start; vpn