Update contrib.
1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32\include\memmodel\epoc\multiple\x86\mmboot.h
28 #include <kernel/cache.h>
31 // Linear address map:
32 // 00000000-003FFFFF Unmapped except for AP boot page at 7F000
33 // 00400000-37FFFFFF Local data
34 // 38000000-3FFFFFFF DLL static data (=phys ram size/2 up to 128M)
35 // 40000000-6FFFFFFF Shared data
36 // 70000000-7FFFFFFF RAM loaded code (=phys ram size up to 256M)
37 // 80000000-8FFFFFFF ROM
38 // 90000000-9FFFFFFF User Global Area
39 // A0000000-BFFFFFFF RAM drive
40 // C0000000-C0001FFF Super page/CPU page (extends to C0005FFF for SMP)
41 // C0006000-C0006FFF Trampoline page for SMP
42 // C0030000-C00303FF KPageInfoMap
43 // C0040000-C004FFFF ASID info
44 // C0080000-C00FFFFF Page table info
45 // C1000000-C1FFFFFF Page directories
46 // C2000000-C5FFFFFF Page tables
47 // C6000000-C6FFFFFF Primary I/O mappings
49 // C8000000-C8FFFFFF Kernel .data/.bss, initial stack, kernel heap
50 // C9000000-C93FFFFF Kernel stacks
51 // C9400000-F9FFFFFF Extra kernel mappings (I/O, RAM loaded device drivers)
52 // FA000000-FA3FFFFF IPC Alias for CPU 0
53 // FA400000-FA7FFFFF IPC Alias for CPU 1 (SMP only)
54 // FA800000-FABFFFFF IPC Alias for CPU 2 (SMP only)
55 // FAC00000-FAFFFFFF IPC Alias for CPU 3 (SMP only)
56 // FB000000-FB3FFFFF IPC Alias for CPU 4 (SMP only)
57 // FB400000-FB7FFFFF IPC Alias for CPU 5 (SMP only)
58 // FB800000-FBBFFFFF IPC Alias for CPU 6 (SMP only)
59 // FBC00000-FBFFFFFF IPC Alias for CPU 7 (SMP only)
60 // FC000000-FDFFFFFF Page Info array
61 // FE000000-FEBFFFFF Unused
62 // FEC00000-FEFFFFFF IO APIC + Local APIC
63 // FF000000-FFFFFFFF Unused
66 const TLinAddr KUserLocalDataBase =0x00400000u;
67 const TLinAddr KUserSharedDataBase =0x40000000u;
68 const TLinAddr KUserSharedDataEnd =0x80000000u; // after code
69 const TLinAddr KRomLinearBase =0x80000000u;
70 const TLinAddr KRomLinearEnd =0x90000000u;
71 const TLinAddr KUserGlobalDataBase =0x90000000u;
72 const TLinAddr KUserGlobalDataEnd =0xA0000000u;
73 const TLinAddr KRamDriveStartAddress=0xA0000000u;
74 const TInt KRamDriveMaxSize=0x20000000;
75 const TLinAddr KRamDriveEndAddress =0xC0000000u;
76 const TLinAddr KSuperPageLinAddr =0xC0000000u;
77 const TLinAddr KPageInfoMap =0xC0030000u;
78 const TLinAddr KAsidInfoBase =0xC0040000u;
79 const TLinAddr KPageTableInfoBase =0xC0080000u;
80 const TLinAddr KPageDirectoryBase =0xC1000000u;
81 const TLinAddr KPageTableBase =0xC2000000u;
82 const TLinAddr KPrimaryIOBase =0xC6000000u;
83 const TLinAddr KKernelSectionEnd =0xFA000000u;
84 const TLinAddr KIPCAlias =0xFA000000u; // for SMP 4MB for each CPU
85 // Thus CPU0->FC0, CPU1->FC4, ..., CPU7->FDC
86 const TUint32 KIPCAliasAreaSize =0x02000000u; // total size of alias area
87 const TLinAddr KPageInfoLinearBase =0xFC000000u;
89 const TLinAddr KMachineConfigLinAddr=0xC0000800u;
90 const TLinAddr KTempAddr=0xC0010000u;
91 const TLinAddr KSecondTempAddr=0xC0014000u;
92 const TLinAddr KDefragAltStackAddr=0xC001F000u;
93 const TLinAddr KApTrampolinePageLin =0xC0006000u;
94 const TLinAddr KBiosInfoLin =0xC0100000u; // RAM info + MP info
96 // Constants for X86 MMU
97 const TInt KChunkShift=22;
98 const TInt KChunkSize=1<<KChunkShift;
99 const TInt KChunkMask=KChunkSize-1;
100 const TInt KPageTableShift=KChunkShift-12+2; // PTE is 4 bytes
101 const TInt KPageTableSize=1<<KPageTableShift;
102 const TInt KPageTableMask=KPageTableSize-1;
103 const TInt KPtClusterShift=12-KPageTableShift;
104 const TInt KPtClusterSize=1<<KPtClusterShift;
105 const TInt KPtClusterMask=KPtClusterSize-1;
106 const TInt KPtBlockShift=12-3; /**< @internalTechnology */ // sizeof(SPageTableInfo)=8
107 const TInt KPtBlockSize=1<<KPtBlockShift; /**< @internalTechnology */
108 const TInt KPtBlockMask=KPtBlockSize-1; /**< @internalTechnology */
109 const TInt KPagesInPDEShift=KChunkShift-12;
110 const TInt KPagesInPDE=1<<KPagesInPDEShift;
111 const TInt KPagesInPDEMask=KPagesInPDE-1;
114 const TInt KPageInfoShift = 5;
116 #endif // __MMBOOT_H__