3 * - Virtual Memory Manager (Header)
12 #define MM_USER_MIN 0x00200000
13 #define USER_STACK_SZ 0x00020000 // 128 KiB
14 #define USER_STACK_TOP 0x00800000
15 #define USER_LIB_MAX 0xBC000000
16 #define MM_USER_MAX 0xBC000000 // Top load address for user libraries
17 #define MM_PPD_MIN 0xBC000000 // Per-Process Data base
18 #define MM_PPD_HANDLES 0xBC000000 // - VFS Handles (Practically unlimited)
19 #define MM_PPD_MMAP 0xBD000000 // - MMap Entries (24b each = 0x2AAAA max)
20 #define MM_PPD_UNALLOC 0xBE000000 //
21 #define MM_PPD_CFG 0xBFFFF000 // - Per-process config entries
22 #define MM_PPD_MAX 0xC0000000 //
24 #define MM_KHEAP_BASE 0xC0400000 // C+4MiB
25 #define MM_KHEAP_MAX 0xCF000000 //
26 #define MM_KERNEL_VFS 0xCF000000 //
27 #define MM_KUSER_CODE 0xCFFF0000 // 16 Pages
28 #define MM_MODULE_MIN 0xD0000000 // Lowest Module Address
29 #define MM_MODULE_MAX 0xE0000000 // 128 MiB
31 // Page Info (Which VFS node owns each physical page)
33 // = 2^24 = 16 MiB = 0x4000000
35 #define MM_PAGENODE_BASE 0xE0000000
37 // Needs (2^32/2^12*4 bytes)
38 // - 2^22 bytes max = 4 MiB = 0x1000000
39 // 1024 items per page
40 #define MM_REFCOUNT_BASE 0xE4000000
42 #define MM_KERNEL_STACKS 0xF0000000
43 #define MM_KERNEL_STACK_SIZE 0x00008000
44 #define MM_KERNEL_STACKS_END 0xFC000000
47 extern void MM_FinishVirtualInit(void);
48 extern void MM_SetCR3(Uint CR3);
49 extern tPAddr MM_Clone(int bCloneUser);
50 extern tVAddr MM_NewKStack(void);
51 extern tVAddr MM_NewWorkerStack(Uint *InitialStack, size_t StackSize);