From 33f7226aed1e095dd67134a97a8fa9dcfd853e2e Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 27 Sep 2019 11:20:00 -0700 Subject: 5690 --- kernel.soso/common.h | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/kernel.soso/common.h b/kernel.soso/common.h index fec1810d..7f04785e 100644 --- a/kernel.soso/common.h +++ b/kernel.soso/common.h @@ -21,24 +21,23 @@ typedef unsigned int size_t; #define FALSE 0 #define NULL 0 +// kernel memory map +// code #define KERN_PAGE_DIRECTORY 0x00001000 - #define KERN_BASE 0x00100000 - -//16M is identity mapped as below. -//First 8M we don't touch. Kernel code is there. -//4M is reserved for 4K page directories. -//4M is not used for now. kernel mini heap was here in old times. -#define RESERVED_AREA 0x01000000 //16 mb -#define KERN_PD_AREA_BEGIN 0x00800000 // 8 mb -#define KERN_PD_AREA_END 0x00C00000 //12 mb -#define KERN_NOTUSED_BEGIN 0x00C00000 //12 mb -#define KERN_NOTUSED_END 0x01000000 //16 mb - -#define GFX_MEMORY 0x01000000 //16 mb - -#define KERN_HEAP_BEGIN 0x02000000 //32 mb -#define KERN_HEAP_END 0x40000000 // 1 gb +// 4k page directories +#define KERN_PD_AREA_BEGIN 0x00800000 // 8 MB +#define KERN_PD_AREA_END 0x00C00000 // 12 MB +// 4MB unused (used to be for mini heap) +#define KERN_NOTUSED_BEGIN 0x00C00000 // 12 MB +#define KERN_NOTUSED_END 0x01000000 // 16 MB +// +#define RESERVED_AREA 0x01000000 // 16 MB +// frame buffer +#define GFX_MEMORY 0x01000000 // 16 MB +// heap +#define KERN_HEAP_BEGIN 0x02000000 // 32 MB +#define KERN_HEAP_END 0x40000000 // 1 GB #define PAGE_INDEX_4K(addr) ((addr) >> 12) -- cgit 1.4.1-2-gfad0