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 // e32test\mmu\mmudetect.h
18 #ifndef __MMUDETECT_H__
19 #define __MMUDETECT_H__
25 inline TUint32 MemModelAttributes()
26 { return (TUint32)UserSvr::HalFunction(EHalGroupKernel, EKernelHalMemModelInfo, NULL, NULL); }
28 inline TUint32 MemModelType()
29 { return MemModelAttributes() & EMemModelTypeMask; }
31 inline TBool HaveMMU()
32 { return MemModelAttributes()&EMemModelAttrVA; }
34 inline TBool HaveVirtMem()
35 { return MemModelAttributes()&EMemModelAttrVA; }
37 inline TBool HaveMultAddr()
38 { return (MemModelAttributes()&(EMemModelAttrProcessProt|EMemModelAttrSameVA))
39 ==(EMemModelAttrProcessProt|EMemModelAttrSameVA); }
41 inline TBool HaveProcessProt()
42 { return (MemModelAttributes()&EMemModelAttrProcessProt); }
44 inline TBool HaveDirectKernProt()
45 { return (MemModelAttributes()&EMemModelAttrKernProt); }
47 inline TBool HaveIPCKernProt()
48 { return (MemModelAttributes()&EMemModelAttrIPCKernProt); }
50 inline TBool HaveWriteProt()
51 { return (MemModelAttributes()&EMemModelAttrWriteProt); }
54 inline TUint8* KernData()
56 const TRomHeader& romHdr=*(const TRomHeader*)UserSvr::RomHeaderAddress();
57 return (TUint8*)romHdr.iKernDataAddress;
60 inline TUint8* KernData()