]>
Commit | Line | Data |
---|---|---|
0c0e7ef4 | 1 | /** @file\r |
2 | \r | |
3 | Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r | |
4 | Copyright (c) 2011, ARM Limited. All rights reserved.\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 <Chipset/ARM1176JZ-S.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 | VOID\r | |
23 | EFIAPI\r | |
24 | ArmWriteVBar (\r | |
25 | IN UINT32 VectorBase\r | |
26 | )\r | |
27 | {\r | |
28 | ASSERT(FeaturePcdGet (PcdRelocateVectorTable) == TRUE);\r | |
29 | \r | |
30 | if (VectorBase == 0x0) {\r | |
31 | ArmSetLowVectors ();\r | |
32 | } else if (VectorBase == 0xFFFF0000) {\r | |
33 | ArmSetHighVectors ();\r | |
34 | } else {\r | |
35 | // Feature not supported by ARM11. The Vector Table is either at 0x0 or 0xFFFF0000\r | |
36 | ASSERT(0);\r | |
37 | }\r | |
38 | }\r | |
39 | \r | |
40 | UINT32\r | |
41 | EFIAPI\r | |
42 | ArmReadVBar (\r | |
43 | VOID\r | |
44 | )\r | |
45 | {\r | |
46 | ASSERT((FeaturePcdGet (PcdRelocateVectorTable) == TRUE) && ((PcdGet32 (PcdCpuVectorBaseAddress) == 0x0) || (PcdGet32 (PcdCpuVectorBaseAddress) == 0xFFFF0000)));\r | |
47 | return PcdGet32 (PcdCpuVectorBaseAddress);\r | |
48 | }\r | |
49 | \r |