ArmPkg/ArmGic: Introduced ArmGicGetSupportedArchRevision()
This function returns the revision of the GIC Architecture. Some GICv3 controllers can work in GICv2 mode. Switching to an older GIC revision is driven by the higher level exception level. This function allows code to support any GIC revision at runtime. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16231 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
committed by
oliviermartin
parent
f1e2b7283e
commit
d5c6b7fca3
@@ -33,6 +33,7 @@ Abstract:
|
||||
@retval EFI_SUCCESS Protocol registered
|
||||
@retval EFI_OUT_OF_RESOURCES Cannot allocate protocol data structure
|
||||
@retval EFI_DEVICE_ERROR Hardware problems
|
||||
@retval EFI_UNSUPPORTED GIC version not supported
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -41,9 +42,16 @@ InterruptDxeInitialize (
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
ARM_GIC_ARCH_REVISION Revision;
|
||||
|
||||
Status = GicV2DxeInitialize (ImageHandle, SystemTable);
|
||||
Revision = ArmGicGetSupportedArchRevision ();
|
||||
|
||||
if (Revision == ARM_GIC_ARCH_REVISION_2) {
|
||||
Status = GicV2DxeInitialize (ImageHandle, SystemTable);
|
||||
} else {
|
||||
Status = EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user