TianoCore EDK2 master
Loading...
Searching...
No Matches
ArchPeilessSec.c
Go to the documentation of this file.
1
9#include "PeilessSec.h"
10
11#include <AArch64/AArch64.h>
12
16VOID
18 VOID
19 )
20{
21 // Enable Floating Point
22 if (FixedPcdGet32 (PcdVFPEnabled)) {
23 ArmEnableVFP ();
24 }
25
26 if (ArmReadCurrentEL () == AARCH64_EL2) {
27 // Trap General Exceptions. All exceptions that would be routed to EL1 are routed to EL2
28 ArmWriteHcr (ARM_HCR_TGE);
29
30 /* Enable Timer access for non-secure EL1 and EL0
31 The cnthctl_el2 register bits are architecturally
32 UNKNOWN on reset.
33 Disable event stream as it is not in use at this stage
34 */
35 ArmWriteCntHctl (CNTHCTL_EL2_EL1PCTEN | CNTHCTL_EL2_EL1PCEN);
36 }
37}
VOID ArchInitialize(VOID)
#define FixedPcdGet32(TokenName)
Definition: PcdLib.h:92