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 DEC43AC1B26 for ; Fri, 17 Nov 2023 21:57:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Jmb3nQ2J4LBwCizkfKjAueOml9MwPyDJ+Wj/ELl7MqM=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version: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=1700258232; v=1; b=ng745EzwC5LnhmB6NTucl7dN9O1F7iCwbQ7pjvGUAJzhgilZYoplhaNbETzcCScR9LeZyszn rP3RfQlHEUpELPOkq6k38Ua7PfX4NATJZUWNgt8EU/eOxDZCCdLv/QZJrS8RK3W4FLfDvBLKfIi AL1vG2mAS+7mKr+bv1Btpyxo= X-Received: by 127.0.0.2 with SMTP id 3niTYY7687511xs2MHGS79oo; Fri, 17 Nov 2023 13:57:12 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.8820.1700258231953532627 for ; Fri, 17 Nov 2023 13:57:12 -0800 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-541-nTZtEqkZNp-QWnjczpHd4g-1; Fri, 17 Nov 2023 16:57:09 -0500 X-MC-Unique: nTZtEqkZNp-QWnjczpHd4g-1 X-Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E018F3C0CEE6; Fri, 17 Nov 2023 21:57:08 +0000 (UTC) X-Received: from [10.39.192.39] (unknown [10.39.192.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2673040C6EBB; Fri, 17 Nov 2023 21:57:06 +0000 (UTC) Message-ID: <76cfb29e-679c-2a22-275d-1fed046466bc@redhat.com> Date: Fri, 17 Nov 2023 22:57:05 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Fix issue with ACPI table creation To: devel@edk2.groups.io, chasel.chiu@intel.com, "dhaval@rivosinc.com" Cc: "Gao, Liming" , "Liu, Zhiguang" , "Bi, Dandan" References: <20231117113523.44080-1-dhaval@rivosinc.com> <20231117113523.44080-2-dhaval@rivosinc.com> From: "Laszlo Ersek" In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.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,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: ToiEuo4rvV3geUKDwUcCfpiTx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 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=ng745Ezw; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.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 On 11/17/23 18:50, Chiu, Chasel wrote: >=20 > Hi Dhaval, >=20 > Just a small feedback, > the only difference will be TableToInstall between XDsdt and Dsdt, could = we optimize the code flow to reduce duplicate lines? since a v3 is being requested, let me ask for even more: - can we specify the precise ACPI spec location in the commit message? - s/abscent/absent/ thanks! Laszlo >=20 > Thanks, > Chasel >=20 >=20 >> -----Original Message----- >> From: devel@edk2.groups.io On Behalf Of Dhaval >> Sharma >> Sent: Friday, November 17, 2023 3:35 AM >> To: devel@edk2.groups.io >> Cc: Gao, Liming ; Liu, Zhiguang >> ; Bi, Dandan >> Subject: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Fix issue with ACPI t= able >> creation >> >> As per spec if xDSDT is avaialble, it should be used first. >> Handle required flow when xDSDT is abscent or present. >> >> Test: Tested on RISCV64 Qemu platform with xDSDT and booted to linux ker= nel. >> >> Cc: Liming Gao >> Cc: Zhiguang Liu >> Cc: Dandan Bi >> Signed-off-by: Dhaval Sharma >> --- >> >> Notes: >> v2: >> - Added proper indentation for else if >> >> MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 13 >> ++++++++++++- >> 1 file changed, 12 insertions(+), 1 deletion(-) >> >> diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.= c >> b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c >> index e09bc9b704f5..11097ed4c3be 100644 >> --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c >> +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c >> @@ -1892,7 +1892,18 @@ InstallAcpiTableFromHob ( >> } } - if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTIO= N_TABLE >> *)ChildTable)->Dsdt !=3D 0) {+ //+ // First check if xDSDT= is available that is >> preferred+ //+ if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_T= ABLE >> *)ChildTable)->XDsdt !=3D 0) {+ TableToInstall =3D (VOID >> *)(UINTN)((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)- >>> XDsdt;+ Status =3D AddTableToList (AcpiTableInstance, = TableToInstall, >> TRUE, Version, TRUE, &TableKey);+ if (EFI_ERROR (Status)) {+ = DEBUG >> ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add ACPI table xDSDT\n"= ));+ >> ASSERT_EFI_ERROR (Status);+ break;+ }+ } else= if >> (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)->Dsdt !=3D 0) >> { TableToInstall =3D (VOID >> *)(UINTN)((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)- >>> Dsdt; Status =3D AddTableToList (AcpiTableInstance, T= ableToInstall, >> TRUE, Version, TRUE, &TableKey); if (EFI_ERROR (Status)) {-- >> 2.39.2 >> >> >> >> -=3D-=3D-=3D-=3D-=3D-=3D >> Groups.io Links: You receive all messages sent to this group. >> View/Reply Online (#111395): https://edk2.groups.io/g/devel/message/1113= 95 >> Mute This Topic: https://groups.io/mt/102645488/1777047 >> Group Owner: devel+owner@edk2.groups.io >> Unsubscribe: https://edk2.groups.io/g/devel/unsub [chasel.chiu@intel.com= ] -=3D- >> =3D-=3D-=3D-=3D-=3D >> >=20 >=20 >=20 >=20 >=20 >=20 -=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 (#111418): https://edk2.groups.io/g/devel/message/111418 Mute This Topic: https://groups.io/mt/102645488/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-