diff options
Diffstat (limited to 'ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c')
-rw-r--r-- | ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c index 7ab28e3..da57551 100644 --- a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c +++ b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c @@ -104,3 +104,18 @@ ArmHasCcidx ( Mmfr2 = ArmReadIdAA64Mmfr2 ();
return (((Mmfr2 >> 20) & 0xF) == 1) ? TRUE : FALSE;
}
+
+/**
+ Checks whether the CPU implements the Virtualization Host Extensions.
+
+ @retval TRUE FEAT_VHE is implemented.
+ @retval FALSE FEAT_VHE is not mplemented.
+**/
+BOOLEAN
+EFIAPI
+ArmHasVhe (
+ VOID
+ )
+{
+ return ((ArmReadIdAA64Mmfr1 () & AARCH64_MMFR1_VH) != 0);
+}
|