mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-25 22:54:51 +02:00
DynamicTablesPkg: FdtHwInfoParserLib: Create wrapper to get INTC addr cells
Parent interrupt controller's address cells is arch specific. So, create a wrapper function which can be implemented differently for different archs. Move current implementation to ARM specific file. Suggested-by: Sunil V L <sunilvl@ventanamicro.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
This commit is contained in:
parent
d8aa665b31
commit
40a0dbdd18
@ -974,7 +974,7 @@ BuildSsdtPciTableEx (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO *PciInfo;
|
CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO *PciInfo;
|
||||||
UINT32 PciCount;
|
UINT32 PciCount;
|
||||||
UINTN Index;
|
UINT32 Index;
|
||||||
EFI_ACPI_DESCRIPTION_HEADER **TableList;
|
EFI_ACPI_DESCRIPTION_HEADER **TableList;
|
||||||
ACPI_PCI_GENERATOR *Generator;
|
ACPI_PCI_GENERATOR *Generator;
|
||||||
UINT32 Uid;
|
UINT32 Uid;
|
||||||
|
@ -83,3 +83,36 @@ FdtGetInterruptFlags (
|
|||||||
|
|
||||||
return AcpiIrqFlags;
|
return AcpiIrqFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** For relevant architectures, get the "#address-cells" and/or "#size-cells"
|
||||||
|
property of the node.
|
||||||
|
|
||||||
|
According to the Device Tree specification, s2.3.5 "#address-cells and
|
||||||
|
#size-cells":
|
||||||
|
"If missing, a client program should assume a default value of 2 for
|
||||||
|
#address-cells, and a value of 1 for #size-cells."
|
||||||
|
|
||||||
|
@param [in] Fdt Pointer to a Flattened Device Tree.
|
||||||
|
@param [in] Node Offset of the node having to get the
|
||||||
|
"#address-cells" and "#size-cells"
|
||||||
|
properties from.
|
||||||
|
@param [out] AddressCells If success, number of address-cells.
|
||||||
|
If the property is not available,
|
||||||
|
default value is 2.
|
||||||
|
@param [out] SizeCells If success, number of size-cells.
|
||||||
|
If the property is not available,
|
||||||
|
default value is 1.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Invalid parameter.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
FdtGetIntcAddressCells (
|
||||||
|
IN CONST VOID *Fdt,
|
||||||
|
IN INT32 Node,
|
||||||
|
OUT INT32 *AddressCells, OPTIONAL
|
||||||
|
OUT INT32 *SizeCells OPTIONAL
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return FdtGetAddressInfo (Fdt, Node, AddressCells, SizeCells);
|
||||||
|
}
|
||||||
|
@ -455,4 +455,34 @@ FdtGetParentAddressInfo (
|
|||||||
OUT INT32 *SizeCells OPTIONAL
|
OUT INT32 *SizeCells OPTIONAL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/** For relevant architectures, get the "#address-cells" and/or "#size-cells"
|
||||||
|
property of the node.
|
||||||
|
|
||||||
|
According to the Device Tree specification, s2.3.5 "#address-cells and
|
||||||
|
#size-cells":
|
||||||
|
"If missing, a client program should assume a default value of 2 for
|
||||||
|
#address-cells, and a value of 1 for #size-cells."
|
||||||
|
|
||||||
|
@param [in] Fdt Pointer to a Flattened Device Tree.
|
||||||
|
@param [in] Node Offset of the node having to get the
|
||||||
|
"#address-cells" and "#size-cells"
|
||||||
|
properties from.
|
||||||
|
@param [out] AddressCells If success, number of address-cells.
|
||||||
|
If the property is not available,
|
||||||
|
default value is 2.
|
||||||
|
@param [out] SizeCells If success, number of size-cells.
|
||||||
|
If the property is not available,
|
||||||
|
default value is 1.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Invalid parameter.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
FdtGetIntcAddressCells (
|
||||||
|
IN CONST VOID *Fdt,
|
||||||
|
IN INT32 Node,
|
||||||
|
OUT INT32 *AddressCells, OPTIONAL
|
||||||
|
OUT INT32 *SizeCells OPTIONAL
|
||||||
|
);
|
||||||
|
|
||||||
#endif // FDT_UTILITY_H_
|
#endif // FDT_UTILITY_H_
|
||||||
|
@ -365,7 +365,7 @@ ParseIrqMap (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the "address-cells" property of the IntcNode.
|
// Get the "address-cells" property of the IntcNode.
|
||||||
Status = FdtGetAddressInfo (Fdt, IntcNode, &IntcAddressCells, NULL);
|
Status = FdtGetIntcAddressCells (Fdt, IntcNode, &IntcAddressCells, NULL);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
ASSERT (0);
|
ASSERT (0);
|
||||||
return Status;
|
return Status;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user