TianoCore EDK2 master
|
#include <Library/ArmLib.h>
#include "FdtHwInfoParser.h"
#include "CmObjectDescUtility.h"
#include "Arm/Gic/ArmGicCParser.h"
#include "Arm/Gic/ArmGicDispatcher.h"
Go to the source code of this file.
Functions | |
STATIC EFI_STATUS EFIAPI | CpuNodeParser (IN CONST VOID *Fdt, IN INT32 CpuNode, IN UINT32 GicVersion, IN UINT32 AddressCells, OUT CM_ARM_GICC_INFO *GicCInfo) |
STATIC EFI_STATUS EFIAPI | CpusNodeParser (IN CONST VOID *Fdt, IN INT32 CpusNode, IN UINT32 GicVersion, OUT CM_OBJ_DESCRIPTOR **NewGicCmObjDesc) |
STATIC EFI_STATUS EFIAPI | GicCIntcNodeParser (IN CONST VOID *Fdt, IN INT32 GicIntcNode, IN OUT CM_OBJ_DESCRIPTOR *GicCCmObjDesc) |
STATIC EFI_STATUS EFIAPI | GicCv2IntcNodeParser (IN CONST VOID *Fdt, IN INT32 Gicv2IntcNode, IN OUT CM_OBJ_DESCRIPTOR *GicCCmObjDesc) |
STATIC EFI_STATUS EFIAPI | GicCv3IntcNodeParser (IN CONST VOID *Fdt, IN INT32 Gicv3IntcNode, IN OUT CM_OBJ_DESCRIPTOR *GicCCmObjDesc) |
STATIC EFI_STATUS EFIAPI | GicCPmuNodeParser (IN CONST VOID *Fdt, IN INT32 GicIntcNode, IN OUT CM_OBJ_DESCRIPTOR *GicCCmObjDesc) |
EFI_STATUS EFIAPI | ArmGicCInfoParser (IN CONST FDT_HW_INFO_PARSER_HANDLE FdtParserHandle, IN INT32 FdtBranch) |
Arm Gic cpu parser.
Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file ArmGicCParser.c.
EFI_STATUS EFIAPI ArmGicCInfoParser | ( | IN CONST FDT_HW_INFO_PARSER_HANDLE | FdtParserHandle, |
IN INT32 | FdtBranch | ||
) |
CM_ARM_GICC_INFO parser function.
This parser expects FdtBranch to be the "\cpus" node node. At most one CmObj is created. The following structure is populated: typedef struct CmArmGicCInfo { UINT32 CPUInterfaceNumber; // {Populated} UINT32 AcpiProcessorUid; // {Populated} UINT32 Flags; // {Populated} UINT32 ParkingProtocolVersion; // {default = 0} UINT32 PerformanceInterruptGsiv; // {Populated} UINT64 ParkedAddress; // {default = 0} UINT64 PhysicalBaseAddress; // {Populated} UINT64 GICV; // {Populated} UINT64 GICH; // {Populated} UINT32 VGICMaintenanceInterrupt; // {Populated} UINT64 GICRBaseAddress; // {default = 0} UINT64 MPIDR; // {Populated} UINT8 ProcessorPowerEfficiencyClass; // {default = 0} UINT16 SpeOverflowInterrupt; // {default = 0} UINT32 ProximityDomain; // {default = 0} UINT32 ClockDomain; // {default = 0} UINT32 AffinityFlags; // {default = 0} } CM_ARM_GICC_INFO;
A parser parses a Device Tree to populate a specific CmObj type. None, one or many CmObj can be created by the parser. The created CmObj are then handed to the parser's caller through the HW_INFO_ADD_OBJECT interface. This can also be a dispatcher. I.e. a function that not parsing a Device Tree but calling other parsers.
[in] | FdtParserHandle | A handle to the parser instance. |
[in] | FdtBranch | When searching for DT node name, restrict the search to this Device Tree branch. |
EFI_SUCCESS | The function completed successfully. |
EFI_ABORTED | An error occurred. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_NOT_FOUND | Not found. |
EFI_UNSUPPORTED | Unsupported. |
Definition at line 809 of file ArmGicCParser.c.
STATIC EFI_STATUS EFIAPI CpuNodeParser | ( | IN CONST VOID * | Fdt, |
IN INT32 | CpuNode, | ||
IN UINT32 | GicVersion, | ||
IN UINT32 | AddressCells, | ||
OUT CM_ARM_GICC_INFO * | GicCInfo | ||
) |
Parse a "cpu" node.
[in] | Fdt | Pointer to a Flattened Device Tree (Fdt). |
[in] | CpuNode | Offset of a cpu node. |
[in] | GicVersion | Version of the GIC. |
[in] | AddressCells | Number of address cells used for the reg property. |
[out] | GicCInfo | CM_ARM_GICC_INFO structure to populate. |
EFI_SUCCESS | The function completed successfully. |
EFI_ABORTED | An error occurred. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_UNSUPPORTED | Unsupported. |
Definition at line 72 of file ArmGicCParser.c.
STATIC EFI_STATUS EFIAPI CpusNodeParser | ( | IN CONST VOID * | Fdt, |
IN INT32 | CpusNode, | ||
IN UINT32 | GicVersion, | ||
OUT CM_OBJ_DESCRIPTOR ** | NewGicCmObjDesc | ||
) |
Parse a "cpus" node and its children "cpu" nodes.
Create as many CM_ARM_GICC_INFO structures as "cpu" nodes.
[in] | Fdt | Pointer to a Flattened Device Tree (Fdt). |
[in] | CpusNode | Offset of a cpus node. |
[in] | GicVersion | Version of the GIC. |
[out] | NewGicCmObjDesc | If success, CM_OBJ_DESCRIPTOR containing all the created CM_ARM_GICC_INFO. |
EFI_SUCCESS | The function completed successfully. |
EFI_ABORTED | An error occurred. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_UNSUPPORTED | Unsupported. |
Definition at line 166 of file ArmGicCParser.c.
STATIC EFI_STATUS EFIAPI GicCIntcNodeParser | ( | IN CONST VOID * | Fdt, |
IN INT32 | GicIntcNode, | ||
IN OUT CM_OBJ_DESCRIPTOR * | GicCCmObjDesc | ||
) |
Parse a Gic compatible interrupt-controller node, extracting GicC information generic to Gic v2 and v3.
This function modifies a CM_OBJ_DESCRIPTOR object. The following CM_ARM_GICC_INFO fields are patched:
[in] | Fdt | Pointer to a Flattened Device Tree (Fdt). |
[in] | GicIntcNode | Offset of a Gic compatible interrupt-controller node. |
[in,out] | GicCCmObjDesc | The CM_ARM_GICC_INFO to patch. |
EFI_SUCCESS | The function completed successfully. |
EFI_ABORTED | An error occurred. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 280 of file ArmGicCParser.c.
STATIC EFI_STATUS EFIAPI GicCPmuNodeParser | ( | IN CONST VOID * | Fdt, |
IN INT32 | GicIntcNode, | ||
IN OUT CM_OBJ_DESCRIPTOR * | GicCCmObjDesc | ||
) |
Parse a Pmu compatible node, extracting Pmu information.
This function modifies a CM_OBJ_DESCRIPTOR object. The following CM_ARM_GICC_INFO fields are patched:
[in] | Fdt | Pointer to a Flattened Device Tree (Fdt). |
[in] | GicIntcNode | Offset of a Gic compatible interrupt-controller node. |
[in,out] | GicCCmObjDesc | The CM_ARM_GICC_INFO to patch. |
EFI_SUCCESS | The function completed successfully. |
EFI_ABORTED | An error occurred. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 678 of file ArmGicCParser.c.
STATIC EFI_STATUS EFIAPI GicCv2IntcNodeParser | ( | IN CONST VOID * | Fdt, |
IN INT32 | Gicv2IntcNode, | ||
IN OUT CM_OBJ_DESCRIPTOR * | GicCCmObjDesc | ||
) |
Parse a Gic compatible interrupt-controller node, extracting GicCv2 information.
This function modifies a CM_OBJ_DESCRIPTOR object. The following CM_ARM_GICC_INFO fields are patched:
[in] | Fdt | Pointer to a Flattened Device Tree (Fdt). |
[in] | Gicv2IntcNode | Offset of a Gicv2 compatible interrupt-controller node. |
[in,out] | GicCCmObjDesc | The CM_ARM_GICC_INFO to patch. |
EFI_SUCCESS | The function completed successfully. |
EFI_ABORTED | An error occurred. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 351 of file ArmGicCParser.c.
STATIC EFI_STATUS EFIAPI GicCv3IntcNodeParser | ( | IN CONST VOID * | Fdt, |
IN INT32 | Gicv3IntcNode, | ||
IN OUT CM_OBJ_DESCRIPTOR * | GicCCmObjDesc | ||
) |
Parse a Gic compatible interrupt-controller node, extracting GicCv3 information.
This function modifies a CM_OBJ_DESCRIPTOR object. The following CM_ARM_GICC_INFO fields are patched:
[in] | Fdt | Pointer to a Flattened Device Tree (Fdt). |
[in] | Gicv3IntcNode | Offset of a Gicv3 compatible interrupt-controller node. |
[in,out] | GicCCmObjDesc | The CM_ARM_GICC_INFO to patch. |
EFI_SUCCESS | The function completed successfully. |
EFI_ABORTED | An error occurred. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 488 of file ArmGicCParser.c.
STATIC CONST COMPATIBILITY_INFO CpuCompatibleInfo |
COMPATIBILITY_INFO structure for CPU nodes.
Definition at line 35 of file ArmGicCParser.c.
STATIC CONST COMPATIBILITY_STR CpuCompatibleStr[] |
List of "compatible" property values for CPU nodes.
Any other "compatible" value is not supported by this module.
Definition at line 24 of file ArmGicCParser.c.
CONST COMPATIBILITY_INFO PmuCompatibleInfo |
COMPATIBILITY_INFO structure for the PmuCompatibleStr.
Definition at line 50 of file ArmGicCParser.c.
STATIC CONST COMPATIBILITY_STR PmuCompatibleStr[] |
Pmu compatible strings.
Any other "compatible" value is not supported by this module.
Definition at line 44 of file ArmGicCParser.c.