TianoCore EDK2 master
Loading...
Searching...
No Matches
ArmFdtInterrupt.c File Reference
#include <FdtHwInfoParserInclude.h>
#include "FdtUtility.h"

Go to the source code of this file.

Functions

UINT32 EFIAPI FdtGetInterruptId (UINT32 CONST *Data)
 
UINT32 EFIAPI FdtGetInterruptFlags (UINT32 CONST *Data)
 
EFI_STATUS EFIAPI FdtGetIntcAddressCells (IN CONST VOID *Fdt, IN INT32 Node, OUT INT32 *AddressCells, OPTIONAL OUT INT32 *SizeCells OPTIONAL)
 

Detailed Description

Flattened device tree utility.

Copyright (c) 2021, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Reference(s):
  • Device tree Specification - Release v0.3
  • linux/Documentation/devicetree/bindings/interrupt-controller/arm%2Cgic.yaml
  • linux//Documentation/devicetree/bindings/interrupt-controller/arm%2Cgic.yaml

Definition in file ArmFdtInterrupt.c.

Function Documentation

◆ FdtGetIntcAddressCells()

EFI_STATUS EFIAPI FdtGetIntcAddressCells ( IN CONST VOID *  Fdt,
IN INT32  Node,
OUT INT32 *  AddressCells,
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."

Parameters
[in]FdtPointer to a Flattened Device Tree.
[in]NodeOffset of the node having to get the "#address-cells" and "#size-cells" properties from.
[out]AddressCellsIf success, number of address-cells. If the property is not available, default value is 2.
[out]SizeCellsIf success, number of size-cells. If the property is not available, default value is 1.
Return values
EFI_INVALID_PARAMETERInvalid parameter.

Definition at line 110 of file ArmFdtInterrupt.c.

◆ FdtGetInterruptFlags()

UINT32 EFIAPI FdtGetInterruptFlags ( UINT32 CONST Data)

Get the ACPI interrupt flags of an interrupt described in a fdt.

Data must describe a GIC interrupt. A GIC interrupt is on at least 3 UINT32 cells.

PPI interrupt cpu mask on bits [15:8] are ignored.

Parameters
[in]DataPointer to the first cell of an "interrupts" property.
Return values
Theinterrupt flags (for ACPI).

Definition at line 70 of file ArmFdtInterrupt.c.

◆ FdtGetInterruptId()

UINT32 EFIAPI FdtGetInterruptId ( UINT32 CONST Data)

Get the interrupt Id of an interrupt described in a fdt.

Data must describe a GIC interrupt. A GIC interrupt is on at least 3 UINT32 cells. This function DOES NOT SUPPORT extended SPI range and extended PPI range.

Parameters
[in]DataPointer to the first cell of an "interrupts" property.
Return values
Theinterrupt id.

Definition at line 28 of file ArmFdtInterrupt.c.