diff -r 000000000000 -r bde4ae8d615e os/kernelhwsrv/kernel/eka/include/memmodel/epoc/multiple/arm/mmboot.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/os/kernelhwsrv/kernel/eka/include/memmodel/epoc/multiple/arm/mmboot.h Fri Jun 15 03:10:57 2012 +0200 @@ -0,0 +1,254 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// e32\include\memmodel\epoc\multiple\arm\mmboot.h +// +// WARNING: This file contains some APIs which are internal and are subject +// to change without notice. Such APIs should therefore not be used +// outside the Kernel and Hardware Services package. +// + +/** + @file + @publishedPartner + @released +*/ + +#ifndef __MMBOOT_H__ +#define __MMBOOT_H__ +#include +#include +#include + +// +// Linear address map (1Gb configuration) : +// 00000000-001FFFFF Unmapped +// 00200000-002FFFFF IPC Alias region +// 00300000-003FFFFF Unmapped +// 00400000-1FFFFFFF Local data +// 20000000-3BFFFFFF Shared data +// 3C000000-3DFFFFFF RAM loaded code (=phys ram size up to 256M) +// 3E000000-3FFFFFFF DLL static data (=phys ram size/2 up to 128M) +// 40000000-7FFFFFFF Unused +// 80000000-8FFFFFFF ROM +// 90000000-9FFFFFFF User Global Area +// A0000000-BFFFFFFF RAM drive +// C0000000-C0001FFF Super page/CPU page +// C0030000-C0030FFF KPageInfoMap +// C0038000-C003FFFF IRQ, FIQ, UND, ABT stacks (4*4K for stacks + 4*4K for guard pages) +// C0040000-C00403FF ASID info (256 ASIDs) +// C0080000-C00FFFFF Page table info +// C1000000-C13FFFFF Page directories (up to 256 * 16KB) +// C2000000-C5FFFFFF Page tables +// C6000000-C6FFFFFF Primary I/O mappings +// C7000000-C7FFFFFF +// C8000000-C8FFFFFF Kernel .data/.bss, initial stack, kernel heap +// C9000000-C91FFFFF Kernel stacks +// C9200000-FBFFFFFF Extra kernel mappings (I/O, RAM loaded device drivers) +// FC000000-FDFFFFFF Page Info array +// FFF00000-FFFFFFFF Exception vectors +// +// +// Linear address map (2Gb configuration) : +// 00000000-001FFFFF Unmapped +// 00200000-002FFFFF IPC Alias region +// 00300000-003FFFFF Unmapped +// 00400000-37FFFFFF Local data +// 38000000-3FFFFFFF DLL static data (=phys ram size/2 up to 128M) +// 40000000-6FFFFFFF Shared data +// 70000000-7FFFFFFF RAM loaded code (=phys ram size up to 256M) +// 80000000-8FFFFFFF ROM +// 90000000-9FFFFFFF User Global Area +// A0000000-BFFFFFFF RAM drive +// C0000000-C0001FFF Super page/CPU page +// C0030000-C0030FFF KPageInfoMap +// C0038000-C003FFFF IRQ, FIQ, UND, ABT stacks (4*4K for stacks + 4*4K for guard pages) +// C0040000-C00403FF ASID info (256 ASIDs) +// C0080000-C00FFFFF Page table info +// C1000000-C13FFFFF Page directories (up to 256 * 16KB) +// C2000000-C5FFFFFF Page tables +// C6000000-C6FFFFFF Primary I/O mappings +// C7000000-C7FFFFFF +// C8000000-C8FFFFFF Kernel .data/.bss, initial stack, kernel heap +// C9000000-C91FFFFF Kernel stacks +// C9200000-FBFFFFFF Extra kernel mappings (I/O, RAM loaded device drivers) +// FC000000-FDFFFFFF Page Info array +// FFF00000-FFFFFFFF Exception vectors +// + +// Linear addresses +const TLinAddr KIPCAlias =0x00200000u; +const TLinAddr KUserLocalDataBase =0x00400000u; +const TLinAddr KUserSharedDataBase1GB =0x20000000u; +const TLinAddr KUserSharedDataEnd1GB =0x40000000u; +const TLinAddr KUserSharedDataBase2GB =0x40000000u; +const TLinAddr KUserSharedDataEnd2GB =0x80000000u; + +const TLinAddr KRomLinearBase =0x80000000u; +const TLinAddr KRomLinearEnd =0x90000000u; +const TLinAddr KUserGlobalDataBase =0x90000000u; +const TLinAddr KUserGlobalDataEnd =0xA0000000u; +const TLinAddr KRamDriveStartAddress =0xA0000000u; +const TInt KRamDriveMaxSize=0x20000000; +const TLinAddr KRamDriveEndAddress =0xC0000000u; +const TLinAddr KSuperPageLinAddr =0xC0000000u; +const TLinAddr KExcptStacksLinearBase =0xC0038000u; +const TLinAddr KAsidInfoBase =0xC0040000u; +const TLinAddr KPageTableInfoBase =0xC0080000u; +const TLinAddr KPageDirectoryBase =0xC1000000u; +const TLinAddr KPageTableBase =0xC2000000u; +const TLinAddr KPrimaryIOBase =0xC6000000u; +const TLinAddr KKernelDataBase =0xC8000000u; +const TLinAddr KKernelDataEnd =0xC9200000u; +const TLinAddr KKernelSectionEnd =0xFC000000u; + +const TLinAddr KPageInfoLinearBase =0xFC000000u; + +const TLinAddr KMachineConfigLinAddr =0xC0000800u; +const TLinAddr KDummyUncachedAddr =0xC000F000u; +const TLinAddr KTempAddr =0xC0010000u; +const TLinAddr KSecondTempAddr =0xC0014000u; +const TLinAddr KDefragAltStackAddr =0xC001F000u; +const TLinAddr KDemandPagingTempAddr =0xC0020000u; // used by demand paging (size of region is 0x10000) +const TLinAddr KPageInfoMap =0xC0030000u; + + +// Domain usage +// +// 0 All, except... +// 1 RAM Drive +// 2 IPC Alias chunk +// 15 User memory when __USER_MEMORY_GUARDS_ENABLED__ defined +const TInt KIPCAliasDomain = 2; +const TInt KNumArmDomains = 16; /**< @internalTechnology */ + +// default domain access is client of domain 0, no access to rest +const TUint32 KDefaultDomainAccess = 0x00000001u; /**< @internalTechnology */ +const TUint32 KSupervisorInitialDomainAccess = 0x00000001u; /**< @internalTechnology */ + +#define PDE_IN_DOMAIN(aPde, aDomain) (((aPde) & ~(15 << 5)) | ((aDomain) << 5)) + +// Constants for ARM V6 MMU +const TInt KPageShift=12; +const TInt KPageSize=1<