]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPkg/Library/ArmLib/Arm11/Arm11Lib.c
ARM Packages: Removed trailing spaces
[mirror_edk2.git] / ArmPkg / Library / ArmLib / Arm11 / Arm11Lib.c
1 /** @file
2
3 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
4 Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.
5
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #include <Chipset/ARM1176JZ-S.h>
17
18 #include <Library/ArmLib.h>
19 #include <Library/DebugLib.h>
20 #include <Library/PcdLib.h>
21
22 VOID
23 EFIAPI
24 ArmWriteVBar (
25 IN UINTN VectorBase
26 )
27 {
28 ASSERT(FeaturePcdGet (PcdRelocateVectorTable) == TRUE);
29
30 if (VectorBase == 0x0) {
31 ArmSetLowVectors ();
32 } else if (VectorBase == 0xFFFF0000) {
33 ArmSetHighVectors ();
34 } else {
35 // Feature not supported by ARM11. The Vector Table is either at 0x0 or 0xFFFF0000
36 ASSERT(0);
37 }
38 }
39
40 UINTN
41 EFIAPI
42 ArmReadVBar (
43 VOID
44 )
45 {
46 ASSERT((FeaturePcdGet (PcdRelocateVectorTable) == TRUE) && ((PcdGet32 (PcdCpuVectorBaseAddress) == 0x0) || (PcdGet32 (PcdCpuVectorBaseAddress) == 0xFFFF0000)));
47 return PcdGet32 (PcdCpuVectorBaseAddress);
48 }
49