3 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include <Library/ArmLib.h>
18 #include <Library/DebugLib.h>
19 #include <Library/PcdLib.h>
21 #include "ArmLibPrivate.h"
26 OUT ARM_CACHE_INFO
*CacheInfo
29 if (CacheInfo
!= NULL
) {
30 CacheInfo
->Type
= ArmCacheType();
31 CacheInfo
->Architecture
= ArmCacheArchitecture();
32 CacheInfo
->DataCachePresent
= ArmDataCachePresent();
33 CacheInfo
->DataCacheSize
= ArmDataCacheSize();
34 CacheInfo
->DataCacheAssociativity
= ArmDataCacheAssociativity();
35 CacheInfo
->DataCacheLineLength
= ArmDataCacheLineLength();
36 CacheInfo
->InstructionCachePresent
= ArmInstructionCachePresent();
37 CacheInfo
->InstructionCacheSize
= ArmInstructionCacheSize();
38 CacheInfo
->InstructionCacheAssociativity
= ArmInstructionCacheAssociativity();
39 CacheInfo
->InstructionCacheLineLength
= ArmInstructionCacheLineLength();
45 ArmSwitchProcessorMode (
46 IN ARM_PROCESSOR_MODE Mode
49 CPSRMaskInsert(ARM_PROCESSOR_MODE_MASK
, Mode
);
59 return (ARM_PROCESSOR_MODE
)(CPSRRead() & (UINT32
)ARM_PROCESSOR_MODE_MASK
);
68 UINT32 val
= ArmReadAuxCr();