From: "Sami Mujawar" <sami.mujawar@arm.com>
To: Pierre Gondois <Pierre.Gondois@arm.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Anshuman Khandual <Anshuman.Khandual@arm.com>,
Matteo Carlini <Matteo.Carlini@arm.com>,
Akanksha Jain <Akanksha.Jain2@arm.com>,
Sibel Allinson <Sibel.Allinson@arm.com>,
"jeshuas@nvidia.com" <jeshuas@nvidia.com>, nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v2 05/11] DynamicTablesPkg: Update MADT generator for ACPI 6.5
Date: Fri, 22 Sep 2023 09:01:36 +0000 [thread overview]
Message-ID: <AB79BFDF-AB16-48ED-9190-8980607BED94@arm.com> (raw)
In-Reply-To: <56191006-b6a4-d879-6496-f268603bb982@arm.com>
Hi Pierre,
Thank you for the review feedback.
Please see my response inline marked [SAMI].
Regards,
Sami Mujawar
On 22/09/2023, 09:53, "Pierre Gondois" <pierre.gondois@arm.com <mailto:pierre.gondois@arm.com>> wrote:
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.
>
> 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.
>
> The TRBE field needs to be appropriately setup in the
> GICC structure.
>
> Therefore, update the MADT generator to reflect the
> above updates required for supporting ACPI 6.5
>
> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com>>
> ---
>
> 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 <https://edk2.groups.io/g/devel/message/107427>
>
> DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c | 83 +++++++++++---------
> 1 file changed, 46 insertions(+), 37 deletions(-)
>
> diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c
> index 2102a59faf498eaab7777c509443461ada999610..97be08b5f5b967944a351f834c3bc3f1ee5029b6 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
>
> - 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
>
> @par Reference(s):
> - - ACPI 6.3 Specification - January 2019
> + - ACPI 6.5 Specification - Aug 29, 2022
>
> **/
>
> @@ -82,7 +82,7 @@ GET_OBJECT_LIST (
> );
>
> /** This function updates the GIC CPU Interface Information in the
> - EFI_ACPI_6_3_GIC_STRUCTURE structure.
> + EFI_ACPI_6_5_GIC_STRUCTURE structure.
>
> @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 != NULL);
>
> // UINT8 Type
> - Gicc->Type = EFI_ACPI_6_3_GIC;
> + Gicc->Type = EFI_ACPI_6_5_GIC;
> // UINT8 Length
> - Gicc->Length = sizeof (EFI_ACPI_6_3_GIC_STRUCTURE);
> + Gicc->Length = sizeof (EFI_ACPI_6_5_GIC_STRUCTURE);
> // UINT16 Reserved
> Gicc->Reserved = EFI_ACPI_RESERVED_WORD;
>
> @@ -148,6 +148,15 @@ AddGICC (
> // in EFI_ACPI_6_2_GIC_STRUCTURE.
> Gicc->SpeOverflowInterrupt = 0;
> }
> +
> + // UINT16 TrbeInterrupt
> + if (MadtRev > EFI_ACPI_6_4_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION) {
> + Gicc->TrbeInterrupt = GicCInfo->TrbeInterrupt;
> + } else {
> + // Setting TrbeInterrupt to 0 ensures backward compatibility with
> + // ACPI 6.4
> + Gicc->TrbeInterrupt = 0;
I'm not sure this is necessary as the Gicc struct should be 0-ed,
[SAMI] Yes, I think we do not need to zero this field as the memory allocated for the MADT table in BuildMadtTable() is allocated using AllocateZeroPool().
I can drop the else condition.
[/SAMI]
Regards,
Pierre
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108985): https://edk2.groups.io/g/devel/message/108985
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]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2023-09-22 9:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-13 12:49 [edk2-devel] [PATCH v2 00/11] Update MADT for ACPI 6.5, and add TRBE & ETE support Sami Mujawar
2023-09-13 12:49 ` [edk2-devel] [PATCH v2 01/11] MdePkg: MADT: Add Online capable flag in GICC Sami Mujawar
2023-09-13 12:49 ` [edk2-devel] [PATCH v2 02/11] MdePkg: MADT: Add TRBE interrupt to GICC Sami Mujawar
2023-09-13 12:49 ` [edk2-devel] [PATCH v2 03/11] DynamicTablesPkg: Add TRBE interrupt to GICC object Sami Mujawar
2023-09-13 12:49 ` [edk2-devel] [PATCH v2 04/11] DynamicTablesPkg: Add TRBE interrupt to GICC object parser Sami Mujawar
2023-09-13 12:49 ` [edk2-devel] [PATCH v2 05/11] DynamicTablesPkg: Update MADT generator for ACPI 6.5 Sami Mujawar
2023-09-22 8:52 ` PierreGondois
2023-09-22 9:01 ` Sami Mujawar [this message]
2023-09-13 12:49 ` [edk2-devel] [PATCH v2 06/11] DynamicTablesPkg: Update FADT generator to " Sami Mujawar
2023-09-13 12:49 ` [edk2-devel] [PATCH v2 07/11] ShellPkg: Acpiview: Update MADT parser for TRBE interrupt Sami Mujawar
2023-09-14 5:19 ` Gao, Zhichao
2023-09-13 12:49 ` [edk2-devel] [PATCH v2 08/11] DynamicTablesPkg: Add an ET info object to Arm namespace Sami Mujawar
2023-09-13 12:49 ` [edk2-devel] [PATCH v2 09/11] DynamicTablesPkg: Add an ET info object parser Sami Mujawar
2023-09-13 12:49 ` [edk2-devel] [PATCH v2 10/11] DynamicTablesPkg: Add ETE device to CPU node in AML Sami Mujawar
2023-09-13 15:06 ` Jeshua Smith via groups.io
2023-09-14 7:20 ` Sami Mujawar
2023-09-13 12:49 ` [edk2-devel] [PATCH v2 11/11] DynamicTablesPkg: Fix referencing of CPC token Sami Mujawar
2023-09-22 8:52 ` [edk2-devel] [PATCH v2 00/11] Update MADT for ACPI 6.5, and add TRBE & ETE support PierreGondois
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AB79BFDF-AB16-48ED-9190-8980607BED94@arm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox