From: "PierreGondois" <pierre.gondois@arm.com>
To: Abdul Lateef Attar <abdattar@amd.com>, devel@edk2.groups.io
Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>,
Sami Mujawar <Sami.Mujawar@arm.com>
Subject: Re: [edk2-devel] [PATCH v2 3/4] DynamicTablesPkg: Adds ACPI WSMT Table generator
Date: Mon, 11 Mar 2024 07:16:07 -0700 [thread overview]
Message-ID: <f2481985-50a7-4ddd-91bc-a5c7d3a6a38c@arm.com> (raw)
In-Reply-To: <9f0314d4ca44d8c1302866ad6ba03ffeb3c788fa.1709566848.git.AbdulLateef.Attar@amd.com>
Hello Abdul,
On 3/4/24 16:43, Abdul Lateef Attar wrote:
> From: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
>
> Adds generic ACPI WSMT table generator library.
> Register/Deregister WSMT table.
> Update the WSMT table during boot as per specification.
>
> Cc: Sami Mujawar <Sami.Mujawar@arm.com>
> Cc: Pierre Gondois <pierre.gondois@arm.com>
> Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> ---
> DynamicTablesPkg/DynamicTables.dsc.inc | 2 +
> DynamicTablesPkg/Include/AcpiTableGenerator.h | 1 +
> .../Include/ArchNameSpaceObjects.h | 10 +
> .../Library/Acpi/AcpiWsmtLib/AcpiWsmtLib.inf | 30 +++
> .../Library/Acpi/AcpiWsmtLib/WsmtGenerator.c | 230 ++++++++++++++++++
> 5 files changed, 273 insertions(+)
> create mode 100644 DynamicTablesPkg/Library/Acpi/AcpiWsmtLib/AcpiWsmtLib.inf
> create mode 100644 DynamicTablesPkg/Library/Acpi/AcpiWsmtLib/WsmtGenerator.c
>
[snip]
> +STATIC
> +EFI_STATUS
> +BuildWsmtTable (
> + IN CONST ACPI_TABLE_GENERATOR *CONST This,
> + IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo,
> + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol,
> + OUT EFI_ACPI_DESCRIPTION_HEADER **CONST Table
> + )
> +{
> + EFI_STATUS Status;
> + CM_ARCH_WSMT_PROTECTION_FLAGS *ProtectionFlags;
> +
> + ASSERT (This != NULL);
> + ASSERT (AcpiTableInfo != NULL);
> + ASSERT (CfgMgrProtocol != NULL);
> + ASSERT (Table != NULL);
> + ASSERT (AcpiTableInfo->TableGeneratorId == This->GeneratorID);
> + ASSERT (AcpiTableInfo->AcpiTableSignature == This->AcpiTableSignature);
> +
> + if ((AcpiTableInfo->AcpiTableRevision < This->MinAcpiTableRevision) ||
> + (AcpiTableInfo->AcpiTableRevision > This->AcpiTableRevision))
> + {
> + DEBUG ((
> + DEBUG_ERROR,
> + "ERROR: WSMT: Requested table revision = %d, is not supported."
> + "Supported table revision: Minimum = %d, Maximum = %d\n",
> + AcpiTableInfo->AcpiTableRevision,
> + This->MinAcpiTableRevision,
> + This->AcpiTableRevision
> + ));
> + return EFI_INVALID_PARAMETER;
> + }
> +
> + *Table = NULL;
> +
> + Status = AddAcpiHeader (
> + CfgMgrProtocol,
> + This,
> + (EFI_ACPI_DESCRIPTION_HEADER *)&mAcpiWsmt,
> + AcpiTableInfo,
> + sizeof (EFI_ACPI_WSMT_TABLE)
> + );
> + if (EFI_ERROR (Status)) {
> + DEBUG ((
> + DEBUG_ERROR,
> + "ERROR: WSMT: Failed to add ACPI header. Status = %r\n",
> + Status
> + ));
> + return Status;
> + }
> +
> + Status = GetEArchObjWsmtProtectionFlags (
> + CfgMgrProtocol,
> + CM_NULL_TOKEN,
> + &ProtectionFlags,
> + NULL
> + );
> + if (EFI_ERROR (Status)) {
> + DEBUG ((
> + DEBUG_ERROR,
> + "ERROR: WSMT: Failed to get protection flags information." \
> + " Status = %r\n",
> + Status
> + ));
> + } else {
> + mAcpiWsmt.ProtectionFlags = ProtectionFlags->ProtectionFlags;
> + }
It seems that EFI_WSMT_PROTECTION_FLAGS_COMM_BUFFER_NESTED_PTR_PROTECTION
bit can only be set if EFI_WSMT_PROTECTION_FLAGS_FIXED_COMM_BUFFERS
is set. Maybe this should be checked here.
> +
> + *Table = (EFI_ACPI_DESCRIPTION_HEADER *)&mAcpiWsmt;
> +
> + return Status;
> +}
> +
Regards,
Pierre
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116633): https://edk2.groups.io/g/devel/message/116633
Mute This Topic: https://groups.io/mt/104724520/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:[~2024-03-11 14:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 15:43 [edk2-devel] [PATCH v2 0/4] DynamicTablesPkg V2: Adds generic FADT, HPET and WSMT table generators Abdul Lateef Attar via groups.io
2024-03-04 15:43 ` [edk2-devel] [PATCH v2 1/4] DynamicTablesPkg: Adds ACPI FADT Table generator Abdul Lateef Attar via groups.io
2024-03-04 15:43 ` [edk2-devel] [PATCH v2 2/4] DynamicTablesPkg: Adds ACPI HPET " Abdul Lateef Attar via groups.io
2024-03-11 14:16 ` PierreGondois
2024-03-04 15:43 ` [edk2-devel] [PATCH v2 3/4] DynamicTablesPkg: Adds ACPI WSMT " Abdul Lateef Attar via groups.io
2024-03-11 14:16 ` PierreGondois [this message]
2024-03-04 15:43 ` [edk2-devel] [PATCH v2 4/4] DynamicTablesPkg: Adds ACPI SSDT HPET " Abdul Lateef Attar via groups.io
2024-03-11 14:16 ` PierreGondois
2024-03-11 14:22 ` PierreGondois
2024-03-13 9:49 ` Abdul Lateef Attar via groups.io
2024-03-11 14:15 ` [edk2-devel] [PATCH v2 0/4] DynamicTablesPkg V2: Adds generic FADT, HPET and WSMT table generators 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=f2481985-50a7-4ddd-91bc-a5c7d3a6a38c@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