]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPkg/Drivers/ArmGic/ArmGicDxe.c
ArmPkg: Apply uncrustify changes
[mirror_edk2.git] / ArmPkg / Drivers / ArmGic / ArmGicDxe.c
1 /*++
2
3 Copyright (c) 2013-2014, ARM Ltd. All rights reserved.<BR>
4
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 Module Name:
8
9 ArmGicDxe.c
10
11 Abstract:
12
13 Driver implementing the GIC interrupt controller protocol
14
15 --*/
16
17 #include <PiDxe.h>
18
19 #include "ArmGicDxe.h"
20
21 /**
22 Initialize the state information for the CPU Architectural Protocol
23
24 @param ImageHandle of the loaded driver
25 @param SystemTable Pointer to the System Table
26
27 @retval EFI_SUCCESS Protocol registered
28 @retval EFI_OUT_OF_RESOURCES Cannot allocate protocol data structure
29 @retval EFI_DEVICE_ERROR Hardware problems
30 @retval EFI_UNSUPPORTED GIC version not supported
31
32 **/
33 EFI_STATUS
34 InterruptDxeInitialize (
35 IN EFI_HANDLE ImageHandle,
36 IN EFI_SYSTEM_TABLE *SystemTable
37 )
38 {
39 EFI_STATUS Status;
40 ARM_GIC_ARCH_REVISION Revision;
41
42 Revision = ArmGicGetSupportedArchRevision ();
43
44 if (Revision == ARM_GIC_ARCH_REVISION_2) {
45 Status = GicV2DxeInitialize (ImageHandle, SystemTable);
46 } else if (Revision == ARM_GIC_ARCH_REVISION_3) {
47 Status = GicV3DxeInitialize (ImageHandle, SystemTable);
48 } else {
49 Status = EFI_UNSUPPORTED;
50 }
51
52 return Status;
53 }