From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id D3CBA7803D1 for ; Thu, 2 May 2024 16:37:10 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=wJgmvv9Lnhnx13iwhxn50I5iEoeZ3s+N1ImNNJU+aok=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:From:Subject:To:Cc:References:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1714667829; v=1; b=grOHXR5LLNzpZYdMe+R56Z6sza+MaSr7YBodWqeY1xqh5Pgtpms2/Sl0oH1ghF3MJBWha5Ut MjV7LDa9gE2EGUwRt7rltyT4kW8TZn8p5tI5YMa7DC9e5cda602wEDlzDPsyzPnyZNWMe7ObX2m yp220tvarrJFOEuj2Dwdo4cPXaXzoBck2sr4Fzfc7qUwf4m6hohMoIP7fEPGWBNyuFff3xR4YRb 3741UFFJ/mqxoMYxupbQ4DR0zRLFGLRCYT4CmxUY191gNKlrXUZaWRQD4ebzknfNLQCiTfYxg2r 4fgfjEwHtoMA367dQ36oySix7toaJBX3FfRUWmROxgHZA== X-Received: by 127.0.0.2 with SMTP id 44beYY7687511xeiwZlob8ZS; Thu, 02 May 2024 09:37:09 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.10603.1714667828743175911 for ; Thu, 02 May 2024 09:37:08 -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 CD05A339; Thu, 2 May 2024 09:37:33 -0700 (PDT) X-Received: from [10.34.111.156] (e126645.nice.Arm.com [10.34.111.156]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0E05C3F793; Thu, 2 May 2024 09:37:06 -0700 (PDT) Message-ID: <5554cef2-dad4-4a51-9894-328360223137@arm.com> Date: Thu, 2 May 2024 18:37:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: "PierreGondois" Subject: Re: [edk2-devel] [RESEND PATCH v4 4/5] DynamicTablesPkg: Adds ACPI SSDT HPET Table generator To: Abdul Lateef Attar , devel@edk2.groups.io Cc: Sami Mujawar References: In-Reply-To: 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 Resent-Date: Thu, 02 May 2024 09:37:09 -0700 Resent-From: pierre.gondois@arm.com Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 5iMVCMyaatebIkckoiDeuDkex7686176AA= 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=20240206 header.b=grOHXR5L; 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 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io 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. >=20 > Cc: Sami Mujawar > Cc: Pierre Gondois > Signed-off-by: Abdul Lateef Attar > --- > 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/AcpiSs= dtHpetLib.inf > create mode 100644 DynamicTablesPkg/Library/Acpi/AcpiSsdtHpetLib/SsdtHp= etGenerator.c >=20 > diff --git a/DynamicTablesPkg/DynamicTables.dsc.inc b/DynamicTablesPkg/Dy= namicTables.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 u= nder: DynamicTablesPkg/Library/Acpi/X64/ (or a better folder name) also I think the CmObject should be moved to: X64NameSpaceObjects.h > =20 > [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 > } > =20 > [Components.ARM, Components.AARCH64] > diff --git a/DynamicTablesPkg/Include/AcpiTableGenerator.h b/DynamicTable= sPkg/Include/AcpiTableGenerator.h [snip] > + > + Status =3D AmlCodeGenNameInteger ("_HID", EisaId, HpetNode, NULL); > + if (EFI_ERROR (Status)) { > + ASSERT_EFI_ERROR (Status); > + goto exit_handler; > + } > + > + Status =3D 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 =3D AmlCodeGenNameResourceTemplate ("_CRS", HpetNode, &CrsNode)= ; > + if (EFI_ERROR (Status)) { > + ASSERT_EFI_ERROR (Status); > + goto exit_handler; > + } > + > + Status =3D 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] -=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 (#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] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-