2 * Acess2 x86_64 Architecture Code
4 * This file is published under the terms of the Acess Licence.
5 * See the file COPYING for more details
7 * vmem.h - Virtual Memory Functions & Definitions
14 // === Memory Location Definitions ===
16 * Userland - Lower Half
17 * Kernel land - Upper Half
19 * START ADDRESS END ADDRESS BITS SIZE NAME
20 * 0xFFFF8000 00000000 - 0xFFFFFFFF FFFFFFFF 47 128 TiB Kernel Range
21 * 8000 00000000 - 8000 7FFFFFFF 31 2 GiB Identity Map
22 * 8000 80000000 - 9000 00000000 ~44 16 TiB Kernel Heap
23 * 9000 00000000 - 9800 00000000 43 8 TiB Module Space
24 * 9800 00000000 - 9900 00000000 40 1 TiB Per-Process Data
25 * 9900 00000000 - 9A00 00000000 40 1 TiB Kernel VFS
26 * A000 00000000 - B000 00000000 44 16 TiB Kernel Stacks
27 * D000 00000000 - E000 00000000 44 16 TiB Hardware Mappings
28 * FE00 00000000 - FE80 00000000 39 512 GiB Fractal Mapping
29 * FE80 00000000 - FF00 00000000 39 512 GiB Temp Fractal Mapping
32 #define MM_USER_MIN 0x00000000##00010000
33 #define USER_LIB_MAX 0x00008000##00000000
34 #define USER_STACK_SZ 0x00000000##00020000 // 64 KiB
35 #define USER_STACK_TOP 0x00008FFF##FFFFF000
36 #define MM_USER_MAX 0x00008FFF##FFFFF000
37 //#define KERNEL_BASE 0xFFF8000##00000000
38 #define MM_KHEAP_BASE (KERNEL_BASE|(0x8000##80000000))
39 #define MM_KHEAP_MAX (KERNEL_BASE|(0x8001##00000000))
40 #define MM_MODULE_MIN (KERNEL_BASE|(0x9000##00000000))
41 #define MM_MODULE_MAX (KERNEL_BASE|(0x9800##00000000))
42 #define MM_PPD_BASE (KERNEL_BASE|(0x9800##00000000))
43 #define MM_PPD_CFG MM_PPD_BASE
44 #define MM_PPD_VFS (KERNEL_BASE|(0x9880##00000000))
45 #define MM_KERNEL_VFS (KERNEL_BASE|(0x9900##00000000))
46 #define MM_KSTACK_BASE (KERNEL_BASE|(0xA000##00000000))
47 #define MM_KSTACK_TOP (KERNEL_BASE|(0xC000##00000000))
49 #define MM_HWMAP_BASE (KERNEL_BASE|(0xD000##00000000))
50 #define MM_HWMAP_TOP (KERNEL_BASE|(0xE000##00000000))
52 #define MM_LOCALAPIC (KERNEL_BASE|(0xFD00##00000000))
53 #define MM_FRACTAL_BASE (KERNEL_BASE|(0xFE00##00000000))
54 #define MM_TMPFRAC_BASE (KERNEL_BASE|(0xFE80##00000000))
58 void MM_FinishVirtualInit(void);
59 tVAddr MM_NewKStack(void);
60 tVAddr MM_Clone(void);
61 tVAddr MM_NewWorkerStack(void);