From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 0FA2E780091 for ; Fri, 22 Sep 2023 08:52:59 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=KYjSZhMCSOjtgY7YYmw4Ym1OpHizqUqlUjkTAcb+GXk=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1695372778; v=1; b=O5ycWa4O2wV3Kz3J1WZpHvv6egO3xQMuxjWAHVAswB3WvhO+qEULOaKk3oEdimeS9Pjbxqc2 MMeoRqdYVHTL7pKcbRuCCc9UV8Odn+K+tbVDeEjzuIl5BRcCYpfHxgihP8XgRJ+FN1iSCn/R1/y bnP3dTMJf6qjT4+9B0vyIQoM= X-Received: by 127.0.0.2 with SMTP id E19RYY7687511x8xcyGE9xUZ; Fri, 22 Sep 2023 01:52:58 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.17251.1695372777958898032 for ; Fri, 22 Sep 2023 01:52:58 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B3AA0DA7; Fri, 22 Sep 2023 01:53:34 -0700 (PDT) X-Received: from [10.34.100.121] (e126645.nice.arm.com [10.34.100.121]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8B75D3F5A1; Fri, 22 Sep 2023 01:52:56 -0700 (PDT) Message-ID: <56191006-b6a4-d879-6496-f268603bb982@arm.com> Date: Fri, 22 Sep 2023 10:52:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [edk2-devel] [PATCH v2 05/11] DynamicTablesPkg: Update MADT generator for ACPI 6.5 To: Sami Mujawar , devel@edk2.groups.io Cc: Anshuman.Khandual@arm.com, Matteo.Carlini@arm.com, Akanksha.Jain2@arm.com, Sibel.Allinson@arm.com, jeshuas@nvidia.com, nd@arm.com References: <20230913124935.38768-1-sami.mujawar@arm.com> <20230913124935.38768-6-sami.mujawar@arm.com> From: "PierreGondois" In-Reply-To: <20230913124935.38768-6-sami.mujawar@arm.com> Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: GwWoU9egrf31rDVQU7CCqnt7x7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=O5ycWa4O; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Hi Sami, On 9/13/23 14:49, Sami Mujawar wrote: > The ACPI 6.5 specification updates the MADT table to add > a new field to GICC for specifying the TRBE interrupt and > also adds support for Online Capable flag to the GICC flags. >=20 > The Online Capable flags should be passed transparently > through as specified in the CM_ARM_GICC_INFO.Flags field > and only require the MADT table revision to be setup to > 6 to reflect the ACPI 6.5 specification. >=20 > The TRBE field needs to be appropriately setup in the > GICC structure. >=20 > Therefore, update the MADT generator to reflect the > above updates required for supporting ACPI 6.5 >=20 > Signed-off-by: Sami Mujawar > --- >=20 > Notes: > v2: > - TRBE interrupt not set correctly for ACPI 6.4 [Jeshua] > - Fixed issue with setting TRBE interrupt [Sami] > Ref: https://edk2.groups.io/g/devel/message/107427 >=20 > DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c | 83 += ++++++++++--------- > 1 file changed, 46 insertions(+), 37 deletions(-) >=20 > diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerat= or.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c > index 2102a59faf498eaab7777c509443461ada999610..97be08b5f5b967944a351f834= c3bc3f1ee5029b6 100644 > --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c > +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c > @@ -1,11 +1,11 @@ > /** @file > MADT Table Generator > =20 > - Copyright (c) 2017 - 2020, ARM Limited. All rights reserved. > + Copyright (c) 2017 - 2023, Arm Limited. All rights reserved. > SPDX-License-Identifier: BSD-2-Clause-Patent > =20 > @par Reference(s): > - - ACPI 6.3 Specification - January 2019 > + - ACPI 6.5 Specification - Aug 29, 2022 > =20 > **/ > =20 > @@ -82,7 +82,7 @@ GET_OBJECT_LIST ( > ); > =20 > /** This function updates the GIC CPU Interface Information in the > - EFI_ACPI_6_3_GIC_STRUCTURE structure. > + EFI_ACPI_6_5_GIC_STRUCTURE structure. > =20 > @param [in] Gicc Pointer to GIC CPU Interface structure. > @param [in] GicCInfo Pointer to the GIC CPU Interface Information. > @@ -91,7 +91,7 @@ GET_OBJECT_LIST ( > STATIC > VOID > AddGICC ( > - IN EFI_ACPI_6_3_GIC_STRUCTURE *CONST Gicc, > + IN EFI_ACPI_6_5_GIC_STRUCTURE *CONST Gicc, > IN CONST CM_ARM_GICC_INFO *CONST GicCInfo, > IN CONST UINT8 MadtRev > ) > @@ -100,9 +100,9 @@ AddGICC ( > ASSERT (GicCInfo !=3D NULL); > =20 > // UINT8 Type > - Gicc->Type =3D EFI_ACPI_6_3_GIC; > + Gicc->Type =3D EFI_ACPI_6_5_GIC; > // UINT8 Length > - Gicc->Length =3D sizeof (EFI_ACPI_6_3_GIC_STRUCTURE); > + Gicc->Length =3D sizeof (EFI_ACPI_6_5_GIC_STRUCTURE); > // UINT16 Reserved > Gicc->Reserved =3D EFI_ACPI_RESERVED_WORD; > =20 > @@ -148,6 +148,15 @@ AddGICC ( > // in EFI_ACPI_6_2_GIC_STRUCTURE. > Gicc->SpeOverflowInterrupt =3D 0; > } > + > + // UINT16 TrbeInterrupt > + if (MadtRev > EFI_ACPI_6_4_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION) { > + Gicc->TrbeInterrupt =3D GicCInfo->TrbeInterrupt; > + } else { > + // Setting TrbeInterrupt to 0 ensures backward compatibility with > + // ACPI 6.4 > + Gicc->TrbeInterrupt =3D 0; I'm not sure this is necessary as the Gicc struct should be 0-ed, Regards, Pierre -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108983): https://edk2.groups.io/g/devel/message/108983 Mute This Topic: https://groups.io/mt/101335844/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-