diff options
author | Olivier Martin <olivier.martin@arm.com> | 2015-05-29 13:50:43 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@Edk2> | 2015-05-29 13:50:43 +0000 |
commit | 7fbd1eb2312d3dfab2ac8cdfcefc234c73d8aeeb (patch) | |
tree | 0062d16f930c05cb0fe7e7eececca5f8fb91b18e /ArmVirtPkg/PrePi/AArch64/ArchPrePi.c | |
parent | 4c31caef17170dfd5bd7fe82b890078547750370 (diff) | |
download | edk2-7fbd1eb2312d3dfab2ac8cdfcefc234c73d8aeeb.tar.gz edk2-7fbd1eb2312d3dfab2ac8cdfcefc234c73d8aeeb.tar.bz2 edk2-7fbd1eb2312d3dfab2ac8cdfcefc234c73d8aeeb.zip |
Renamed ArmPlatformPkg/ArmVirtualizationPkg into ArmVirtPkg
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17537 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmVirtPkg/PrePi/AArch64/ArchPrePi.c')
-rw-r--r-- | ArmVirtPkg/PrePi/AArch64/ArchPrePi.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ArmVirtPkg/PrePi/AArch64/ArchPrePi.c b/ArmVirtPkg/PrePi/AArch64/ArchPrePi.c new file mode 100644 index 0000000000..217986107e --- /dev/null +++ b/ArmVirtPkg/PrePi/AArch64/ArchPrePi.c @@ -0,0 +1,33 @@ +/** @file
+*
+* 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
+* which accompanies this distribution. The full text of the license may be found at
+* http://opensource.org/licenses/bsd-license.php
+*
+* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+*
+**/
+
+#include "PrePi.h"
+
+#include <Chipset/AArch64.h>
+
+VOID
+ArchInitialize (
+ VOID
+ )
+{
+ // Enable Floating Point
+ if (FixedPcdGet32 (PcdVFPEnabled)) {
+ ArmEnableVFP ();
+ }
+
+ if (ArmReadCurrentEL () == AARCH64_EL2) {
+ // Trap General Exceptions. All exceptions that would be routed to EL1 are routed to EL2
+ ArmWriteHcr (ARM_HCR_TGE);
+ }
+}
|