]>
Commit | Line | Data |
---|---|---|
25402f5d HL |
1 | /** @file\r |
2 | \r | |
3 | Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r | |
4 | portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>\r | |
5 | \r | |
6 | This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | #include <Base.h>\r | |
17 | \r | |
18 | #include <Library/ArmLib.h>\r | |
19 | #include <Library/DebugLib.h>\r | |
20 | #include <Library/PcdLib.h>\r | |
21 | \r | |
22 | #include "ArmLibPrivate.h"\r | |
23 | \r | |
24 | VOID\r | |
25 | EFIAPI\r | |
26 | ArmCacheInformation (\r | |
27 | OUT ARM_CACHE_INFO *CacheInfo\r | |
28 | )\r | |
29 | {\r | |
30 | if (CacheInfo != NULL) {\r | |
31 | CacheInfo->Type = ArmCacheType();\r | |
32 | CacheInfo->Architecture = ArmCacheArchitecture();\r | |
33 | CacheInfo->DataCachePresent = ArmDataCachePresent();\r | |
34 | CacheInfo->DataCacheSize = ArmDataCacheSize();\r | |
35 | CacheInfo->DataCacheAssociativity = ArmDataCacheAssociativity();\r | |
36 | CacheInfo->DataCacheLineLength = ArmDataCacheLineLength();\r | |
37 | CacheInfo->InstructionCachePresent = ArmInstructionCachePresent();\r | |
38 | CacheInfo->InstructionCacheSize = ArmInstructionCacheSize();\r | |
39 | CacheInfo->InstructionCacheAssociativity = ArmInstructionCacheAssociativity();\r | |
40 | CacheInfo->InstructionCacheLineLength = ArmInstructionCacheLineLength();\r | |
41 | }\r | |
42 | }\r | |
43 | \r | |
44 | VOID\r | |
45 | EFIAPI\r | |
46 | ArmSetAuxCrBit (\r | |
47 | IN UINT32 Bits\r | |
48 | )\r | |
49 | {\r | |
50 | UINT32 val = ArmReadAuxCr();\r | |
51 | val |= Bits;\r | |
52 | ArmWriteAuxCr(val);\r | |
53 | }\r |