c1f10deba0b7335e87bb9c298613324d5ff920eb
[tpg/acess2.git] / Kernel / arch / armv7 / include / mm_virt.h
1 /*
2  * Acess2
3  * ARM7 Virtual Memory Manager Header
4  */
5 #ifndef _MM_VIRT_H_
6 #define _MM_VIRT_H_
7
8 #include "options.h"
9
10 #define USER_STACK_COMM    0x04000      // Pages to allocate up front
11 #define USER_STACK_SIZE    0x10000      // Stack space
12 #define USER_STACK_TOP  0x78000000
13
14 #define MM_USER_MIN     0x00001000
15 #define USER_LIB_MAX    0x70000000
16 #define MM_PPD_HANDLES  0x7F800000
17 #define MM_TABLE1USER   0x7FC00000      // 2 GiB - 4 MiB
18 #define MM_TABLE0USER   0x7FE00000      // 2 GiB - 2 MiB
19 #define MM_KSTACK_BASE  0x7FE00000
20 #define MM_KSTACK_END   0x80000000
21
22 // Page Blocks are 12-bits wide (12 address bits used)
23 // Hence, the table is 16KiB large (and must be so aligned)
24 // and each block addresses 1MiB of data
25
26 // First level table is aligned to 16KiB (restriction of TTBR reg)
27 // - VMSAv6 uses two TTBR regs, determined by bit 31
28
29 //#define KERNEL_BASE   0x80000000      // 2GiB
30
31 #define MM_KHEAP_BASE   0x80800000      // 8MiB of kernel code
32 #define MM_KHEAP_MAX    0xC0000000      // ~1GiB of kernel heap
33
34 #define MM_MODULE_MIN   0xC0000000      // - 0xD0000000
35 #define MM_MODULE_MAX   0xCF000000
36
37 #define MM_GLOBALSTACKS 0xCF000000      // Global stacks
38 #define MM_GLOBALSTACKS_END     0xD0000000
39
40 // PMM Data, giving it 256MiB is overkill, but it's unused atm
41 #define MM_MAXPHYSPAGE  (1024*1024)
42 // 2^(32-12) max pages
43 // 8.125 bytes per page (for bitmap allocation)
44 // = 8.125 MiB
45 #define MM_PMM_BASE     0xE0000000
46 #define MM_PMM_END      0xF0000000
47
48 #define MM_HWMAP_BASE   0xF0000000      // Ent 0xF00
49 #define MM_HWMAP_END    0xFE000000
50 #define MM_TMPMAP_BASE  0xFE000000
51 #define MM_TMPMAP_END   0xFF000000
52
53 #define MM_KERNEL_VFS   0xFF000000      // 
54 #define MM_TABLE1KERN   0xFF800000      // - 0x???????? 4MiB
55 //#define MM_TABLE0KERN 0xFFC00000      // - 0xFFE04000 16KiB
56
57 #endif

UCC git Repository :: git.ucc.asn.au