]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Drivers/ArmGic/ArmGicDxe.c
BaseTools: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / ArmPkg / Drivers / ArmGic / ArmGicDxe.c
CommitLineData
1e57a462 1/*++\r
2\r
f5241b57 3Copyright (c) 2013-2014, ARM Ltd. All rights reserved.<BR>\r
1e57a462 4\r
e700a1fc
OM
5This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
1e57a462 12\r
13Module Name:\r
14\r
e700a1fc 15 ArmGicDxe.c\r
1e57a462 16\r
17Abstract:\r
18\r
19 Driver implementing the GIC interrupt controller protocol\r
20\r
21--*/\r
22\r
23#include <PiDxe.h>\r
24\r
69b5dc9f 25#include "ArmGicDxe.h"\r
1e57a462 26\r
1e57a462 27/**\r
28 Initialize the state information for the CPU Architectural Protocol\r
29\r
30 @param ImageHandle of the loaded driver\r
31 @param SystemTable Pointer to the System Table\r
32\r
33 @retval EFI_SUCCESS Protocol registered\r
34 @retval EFI_OUT_OF_RESOURCES Cannot allocate protocol data structure\r
35 @retval EFI_DEVICE_ERROR Hardware problems\r
d5c6b7fc 36 @retval EFI_UNSUPPORTED GIC version not supported\r
1e57a462 37\r
38**/\r
39EFI_STATUS\r
40InterruptDxeInitialize (\r
41 IN EFI_HANDLE ImageHandle,\r
42 IN EFI_SYSTEM_TABLE *SystemTable\r
43 )\r
44{\r
d5c6b7fc
OM
45 EFI_STATUS Status;\r
46 ARM_GIC_ARCH_REVISION Revision;\r
e700a1fc 47\r
d5c6b7fc
OM
48 Revision = ArmGicGetSupportedArchRevision ();\r
49\r
50 if (Revision == ARM_GIC_ARCH_REVISION_2) {\r
51 Status = GicV2DxeInitialize (ImageHandle, SystemTable);\r
5f81082e
OM
52 } else if (Revision == ARM_GIC_ARCH_REVISION_3) {\r
53 Status = GicV3DxeInitialize (ImageHandle, SystemTable);\r
d5c6b7fc
OM
54 } else {\r
55 Status = EFI_UNSUPPORTED;\r
56 }\r
1e57a462 57\r
58 return Status;\r
59}\r