[edk2-devel] [PATCH v1 1/1] DynamicTables: Fix DT PCI interrupt flags parsing

Sami Mujawar sami.mujawar at arm.com
Mon Jul 18 16:26:20 UTC 2022


Pushed as 039bdb4d3e96..fc4a132c0e9d

Regards,

Sami Mujawar

On 27/04/2022 03:49 pm, Pierre.Gondois at arm.com wrote:
> From: Pierre Gondois <pierre.gondois at arm.com>
>
> Device Tree PCI interrupt flags use the convention described at
> linux/Documentation/devicetree/bindings/interrupt-controller/arm,gic.yaml
>
> The 3rd cell is the flags, encoded as follows:
>    bits[3:0] trigger type and level flags.
>    1 = low-to-high edge triggered
>    2 = high-to-low edge triggered (invalid for SPIs)
>    4 = active high level-sensitive
>    8 = active low level-sensitive (invalid for SPIs).
>
> Fix the incorrect code.
>
> Signed-off-by: Pierre Gondois <Pierre.Gondois at arm.com>
> ---
>   .../Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c     | 2 +-
>   DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtUtility.h        | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c
> index a34018151f2d..d5b1c153e98f 100644
> --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c
> +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c
> @@ -449,7 +449,7 @@ GeneratePrt (
>       if ((Index > 0)   &&
>           (IrqMapInfo->IntcInterrupt.Interrupt >= 32)   &&
>           (IrqMapInfo->IntcInterrupt.Interrupt < 1020)  &&
> -        ((IrqMapInfo->IntcInterrupt.Flags & 0x3) != BIT0))
> +        ((IrqMapInfo->IntcInterrupt.Flags & 0x3) != 0))
>       {
>         Status = EFI_INVALID_PARAMETER;
>         ASSERT_EFI_ERROR (Status);
> diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtUtility.h b/DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtUtility.h
> index f2f425632b10..3f5d131d9ae5 100644
> --- a/DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtUtility.h
> +++ b/DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtUtility.h
> @@ -60,7 +60,7 @@
>   #define SPI_OFFSET  (32U)
>   #define DT_PPI_IRQ  (1U)
>   #define DT_SPI_IRQ  (0U)
> -#define DT_IRQ_IS_EDGE_TRIGGERED(x)  ((((x) & (BIT0 | BIT2)) != 0))
> +#define DT_IRQ_IS_EDGE_TRIGGERED(x)  ((((x) & (BIT0 | BIT1)) != 0))
>   #define DT_IRQ_IS_ACTIVE_LOW(x)      ((((x) & (BIT1 | BIT3)) != 0))
>   #define IRQ_TYPE_OFFSET    (0U)
>   #define IRQ_NUMBER_OFFSET  (1U)
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91471): https://edk2.groups.io/g/devel/message/91471
Mute This Topic: https://groups.io/mt/90732275/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list