From: "PierreGondois" <pierre.gondois@arm.com>
To: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>, devel@edk2.groups.io
Cc: Sami Mujawar <Sami.Mujawar@arm.com>
Subject: Re: [edk2-devel] [RESEND PATCH v4 4/5] DynamicTablesPkg: Adds ACPI SSDT HPET Table generator
Date: Thu, 2 May 2024 18:37:05 +0200 [thread overview]
Message-ID: <5554cef2-dad4-4a51-9894-328360223137@arm.com> (raw)
In-Reply-To: <fdc902a6ed2a4cae5ce865c6866c1a8fc9c84960.1714369949.git.AbdulLateef.Attar@amd.com>
Hello Abdul,
some comments on the patch:
On 4/29/24 08:03, Abdul Lateef Attar wrote:
> Adds generic ACPI SSDT HPET table generator library.
> Register/Deregister HPET table.
> Adds ACPI namespace object for HPET device.
> Adds Address space for HPET device.
>
> 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 | 2 +
> .../Acpi/AcpiSsdtHpetLib/AcpiSsdtHpetLib.inf | 32 ++
> .../Acpi/AcpiSsdtHpetLib/SsdtHpetGenerator.c | 295 ++++++++++++++++++
> 4 files changed, 331 insertions(+)
> create mode 100644 DynamicTablesPkg/Library/Acpi/AcpiSsdtHpetLib/AcpiSsdtHpetLib.inf
> create mode 100644 DynamicTablesPkg/Library/Acpi/AcpiSsdtHpetLib/SsdtHpetGenerator.c
>
> diff --git a/DynamicTablesPkg/DynamicTables.dsc.inc b/DynamicTablesPkg/DynamicTables.dsc.inc
> index 477dc6b6a9..fc2ac5962e 100644
> --- a/DynamicTablesPkg/DynamicTables.dsc.inc
> +++ b/DynamicTablesPkg/DynamicTables.dsc.inc
> @@ -36,6 +36,7 @@
> DynamicTablesPkg/Library/Acpi/AcpiFadtLib/AcpiFadtLib.inf
> DynamicTablesPkg/Library/Acpi/AcpiHpetLib/AcpiHpetLib.inf
> DynamicTablesPkg/Library/Acpi/AcpiWsmtLib/AcpiWsmtLib.inf
> + DynamicTablesPkg/Library/Acpi/AcpiSsdtHpetLib/AcpiSsdtHpetLib.inf
Same comment as in:
[PATCH v4 2/5] DynamicTablesPkg: Adds ACPI HPET Table generator
about:
[Components.IA32, Components.X64]
also if the table is Intel specific, maybe the generator should be placed under:
DynamicTablesPkg/Library/Acpi/X64/
(or a better folder name)
also I think the CmObject should be moved to:
X64NameSpaceObjects.h
>
> [Components.IA32, Components.X64]
> #
> @@ -46,6 +47,7 @@
> NULL|DynamicTablesPkg/Library/Acpi/AcpiFadtLib/AcpiFadtLib.inf
> NULL|DynamicTablesPkg/Library/Acpi/AcpiHpetLib/AcpiHpetLib.inf
> NULL|DynamicTablesPkg/Library/Acpi/AcpiWsmtLib/AcpiWsmtLib.inf
> + NULL|DynamicTablesPkg/Library/Acpi/AcpiSsdtHpetLib/AcpiSsdtHpetLib.inf
> }
>
> [Components.ARM, Components.AARCH64]
> diff --git a/DynamicTablesPkg/Include/AcpiTableGenerator.h b/DynamicTablesPkg/Include/AcpiTableGenerator.h
[snip]
> +
> + Status = AmlCodeGenNameInteger ("_HID", EisaId, HpetNode, NULL);
> + if (EFI_ERROR (Status)) {
> + ASSERT_EFI_ERROR (Status);
> + goto exit_handler;
> + }
> +
> + Status = AmlCodeGenNameInteger ("_UID", 0x00, HpetNode, NULL);
In case there as multiple HPET,
I think this should be set to HpetBaseAddress->HpetNumber
> + if (EFI_ERROR (Status)) {
> + ASSERT_EFI_ERROR (Status);
> + goto exit_handler;
> + }
> +
> + Status = AmlCodeGenNameResourceTemplate ("_CRS", HpetNode, &CrsNode);
> + if (EFI_ERROR (Status)) {
> + ASSERT_EFI_ERROR (Status);
> + goto exit_handler;
> + }
> +
> + Status = AmlCodeGenRdMemory32Fixed (FALSE, (UINT32)HpetBaseAddress->BaseAddress, SIZE_1KB, CrsNode, NULL);
Will this always be readonly ? Or could it be a ReadWrite parameter ?
If unsure, this shouldn't be too hard to patch in the future.
> + if (EFI_ERROR (Status)) {
> + ASSERT_EFI_ERROR (Status);
> + goto exit_handler;
> + }
> +
[snip]
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118531): https://edk2.groups.io/g/devel/message/118531
Mute This Topic: https://groups.io/mt/105796053/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-05-02 16:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-29 6:03 [edk2-devel] [RESEND PATCH v4 0/5] DynamicTablesPkg: Adds FADT, HPET, WSMT and MADT Table generators Abdul Lateef Attar via groups.io
2024-04-29 6:03 ` [edk2-devel] [RESEND PATCH v4 1/5] DynamicTablesPkg: Adds ACPI FADT Table generator Abdul Lateef Attar via groups.io
2024-04-29 6:03 ` [edk2-devel] [RESEND PATCH v4 2/5] DynamicTablesPkg: Adds ACPI HPET " Abdul Lateef Attar via groups.io
2024-05-02 16:36 ` PierreGondois
2024-04-29 6:03 ` [edk2-devel] [RESEND PATCH v4 3/5] DynamicTablesPkg: Adds ACPI WSMT " Abdul Lateef Attar via groups.io
2024-05-02 16:36 ` PierreGondois
2024-04-29 6:03 ` [edk2-devel] [RESEND PATCH v4 4/5] DynamicTablesPkg: Adds ACPI SSDT HPET " Abdul Lateef Attar via groups.io
2024-05-02 16:37 ` PierreGondois [this message]
2024-04-29 6:03 ` [edk2-devel] [RESEND PATCH v4 5/5] DynamicTablesPkg: Adds X64 arch MADT " Abdul Lateef Attar via groups.io
2024-05-02 16:37 ` PierreGondois
2024-05-02 7:21 ` [edk2-devel] [RESEND PATCH v4 0/5] DynamicTablesPkg: Adds FADT, HPET, WSMT and MADT Table generators Abdul Lateef Attar via groups.io
2024-05-02 16:35 ` PierreGondois
2024-05-03 7:41 ` Sami Mujawar
2024-05-13 4:08 ` Abdul Lateef Attar via groups.io
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=5554cef2-dad4-4a51-9894-328360223137@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