diff options
author | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-03-12 00:59:46 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-03-12 00:59:46 +0000 |
commit | 5ea2c2d334af53bf14da6eb3ce2dbc5db1e3419c (patch) | |
tree | 2e043c9f4276040bbb1a68e4fcc6b61f5cf80d4a | |
parent | 8fa3caf2bc544591e8e1eae984dad24872a45efe (diff) | |
download | edk2-platforms-5ea2c2d334af53bf14da6eb3ce2dbc5db1e3419c.tar.xz |
ArmPkg/ArmLib: Functions to access ARM HYP Vector base address register.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14189 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | ArmPkg/Include/Library/ArmLib.h | 12 | ||||
-rw-r--r-- | ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.S | 13 | ||||
-rw-r--r-- | ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.asm | 12 |
3 files changed, 35 insertions, 2 deletions
diff --git a/ArmPkg/Include/Library/ArmLib.h b/ArmPkg/Include/Library/ArmLib.h index 4550ea6ba0..b12be1424e 100644 --- a/ArmPkg/Include/Library/ArmLib.h +++ b/ArmPkg/Include/Library/ArmLib.h @@ -570,4 +570,16 @@ ArmReadSctlr ( VOID
);
+UINTN
+EFIAPI
+ArmReadHVBar (
+ VOID
+ );
+
+VOID
+EFIAPI
+ArmWriteHVBar (
+ IN UINTN HypModeVectorBase
+ );
+
#endif // __ARM_LIB__
diff --git a/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.S b/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.S index b19185412c..71aee43073 100644 --- a/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.S +++ b/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.S @@ -1,7 +1,7 @@ #------------------------------------------------------------------------------
#
# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-# Copyright (c) 2011-2012, ARM Limited. All rights reserved.
+# Copyright (c) 2011-2013, ARM Limited. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -44,6 +44,8 @@ GCC_ASM_EXPORT(ArmReadScr) GCC_ASM_EXPORT(ArmWriteScr)
GCC_ASM_EXPORT(ArmReadMVBar)
GCC_ASM_EXPORT(ArmWriteMVBar)
+GCC_ASM_EXPORT(ArmReadHVBar)
+GCC_ASM_EXPORT(ArmWriteHVBar)
GCC_ASM_EXPORT(ArmCallWFE)
GCC_ASM_EXPORT(ArmCallSEV)
GCC_ASM_EXPORT(ArmReadSctlr)
@@ -161,6 +163,15 @@ ASM_PFX(ArmWriteScr): mcr p15, 0, r0, c1, c1, 0
bx lr
+ASM_PFX(ArmReadHVBar):
+ mrc p15, 4, r0, c12, c0, 0
+ bx lr
+
+ASM_PFX(ArmWriteHVBar):
+ mcr p15, 4, r0, c12, c0, 0
+ bx lr
+
+
ASM_PFX(ArmReadMVBar):
mrc p15, 0, r0, c12, c0, 1
bx lr
diff --git a/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.asm b/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.asm index fd0f332bd6..1636010e0f 100644 --- a/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.asm +++ b/ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.asm @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------
//
// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-// Copyright (c) 2011-2012, ARM Limited. All rights reserved.
+// Copyright (c) 2011-2013, ARM Limited. All rights reserved.
//
// This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
@@ -44,6 +44,8 @@ EXPORT ArmWriteScr
EXPORT ArmReadMVBar
EXPORT ArmWriteMVBar
+ EXPORT ArmReadHVBar
+ EXPORT ArmWriteHVBar
EXPORT ArmCallWFE
EXPORT ArmCallSEV
EXPORT ArmReadSctlr
@@ -161,6 +163,14 @@ ArmWriteScr mcr p15, 0, r0, c1, c1, 0
bx lr
+ArmReadHVBar
+ mrc p15, 4, r0, c12, c0, 0
+ bx lr
+
+ArmWriteHVBar
+ mcr p15, 4, r0, c12, c0, 0
+ bx lr
+
ArmReadMVBar
mrc p15, 0, r0, c12, c0, 1
bx lr
|