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