X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ArmPkg%2FLibrary%2FArmGicArchLib%2FArm%2FArmGicArchLib.c;fp=ArmPkg%2FLibrary%2FArmGicArchLib%2FArm%2FArmGicArchLib.c;h=f8822a224580d310e2c66889f0e1e0440846889c;hb=f94522c823610a4b44486835aca195c267bd3953;hp=f256de70463194d05a2718e5511cccc1392bf70d;hpb=e9e9c7e8a4a987f9e68c016514aa8b60570a6450;p=mirror_edk2.git diff --git a/ArmPkg/Library/ArmGicArchLib/Arm/ArmGicArchLib.c b/ArmPkg/Library/ArmGicArchLib/Arm/ArmGicArchLib.c index f256de7046..f8822a2245 100644 --- a/ArmPkg/Library/ArmGicArchLib/Arm/ArmGicArchLib.c +++ b/ArmPkg/Library/ArmGicArchLib/Arm/ArmGicArchLib.c @@ -15,9 +15,11 @@ #include #include -ARM_GIC_ARCH_REVISION +STATIC ARM_GIC_ARCH_REVISION mGicArchRevision; + +RETURN_STATUS EFIAPI -ArmGicGetSupportedArchRevision ( +ArmGicArchLibInitialize ( VOID ) { @@ -43,9 +45,22 @@ ArmGicGetSupportedArchRevision ( IccSre = ArmGicV3GetControlSystemRegisterEnable (); } if (IccSre & ICC_SRE_EL2_SRE) { - return ARM_GIC_ARCH_REVISION_3; + mGicArchRevision = ARM_GIC_ARCH_REVISION_3; + goto Done; } } - return ARM_GIC_ARCH_REVISION_2; + mGicArchRevision = ARM_GIC_ARCH_REVISION_2; + +Done: + return RETURN_SUCCESS; +} + +ARM_GIC_ARCH_REVISION +EFIAPI +ArmGicGetSupportedArchRevision ( + VOID + ) +{ + return mGicArchRevision; }