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 4B6E9D8027F for ; Thu, 15 Feb 2024 01:41:56 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=LV+fPUGMW/v7mfPMTv9KGhGvd33JebT63nIPqEcqYV0=; c=relaxed/simple; d=groups.io; h=From:To:Cc:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Thread-Index:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding:Content-Language; s=20140610; t=1707961314; v=1; b=dzdMh6RUsDBNGaX6S6Riy4x5GvPavRUQ8USI72SX0u/SYB9MWimG0GIwaejk74cHwiDWxfXq 9gWRsgBeq2lZoASXMAr+4L36zkMzEe41fkEI4D3m2cOqMAe19GPgXcxQqbm/PxteqoHb6TfCO0q VwZ0hV49kjmj6DqIVBDObqjY= X-Received: by 127.0.0.2 with SMTP id 8RgtYY7687511xwbzohGVAmt; Wed, 14 Feb 2024 17:41:54 -0800 X-Received: from zrleap.intel-email.com (zrleap.intel-email.com [114.80.218.36]) by mx.groups.io with SMTP id smtpd.web11.4755.1707961307686811799 for ; Wed, 14 Feb 2024 17:41:53 -0800 X-Received: from zrleap.intel-email.com (localhost [127.0.0.1]) by zrleap.intel-email.com (Postfix) with ESMTP id 00801A32E03E for ; Thu, 15 Feb 2024 09:41:44 +0800 (CST) X-Received: from localhost (localhost [127.0.0.1]) by zrleap.intel-email.com (Postfix) with ESMTP id E1B1AA32E038 for ; Thu, 15 Feb 2024 09:41:44 +0800 (CST) X-Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by zrleap.intel-email.com (Postfix) with SMTP id 15DD1A32E001 for ; Thu, 15 Feb 2024 09:41:41 +0800 (CST) X-Received: from DESKTOPS6D0PVI ([114.93.194.54]) (envelope-sender ) by 192.168.6.13 with ESMTP(SSL) for ; Thu, 15 Feb 2024 09:41:34 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 114.93.194.54 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming via groups.io" To: , , Cc: , , , , "'Laszlo Ersek'" , "'Leif Lindholm'" , "'Andrew Fish'" , References: <20240128134816.236973-1-dhaval@rivosinc.com> <20240128134816.236973-2-dhaval@rivosinc.com> <17AEFB5BFEE74D09.16647@groups.io> In-Reply-To: <17AEFB5BFEE74D09.16647@groups.io> Subject: =?UTF-8?B?W2VkazItZGV2ZWxdIOWbnuWkjTogW2VkazItc3RhYmxlMjAyNDAyXSBbUEFUQ0ggdjUgMS8xXSBNZGVNb2R1bGVQa2cvQWNwaVRhYmxlRHhlOiBQcmVmZXIgeERTRFQgb3ZlciBEU0RUIHdoZW4gaW5zdGFsbGluZyB0YWJsZXM=?= Date: Thu, 15 Feb 2024 09:41:38 +0800 Message-ID: <01d001da5fb0$1e84e680$5b8eb380$@byosoft.com.cn> MIME-Version: 1.0 Thread-Index: AdpfrXDBdh36A7SbRFiaGpFGF9tiSA== 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,gaoliming@byosoft.com.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: BUf8cUTCiP3PmOyOV3C9cqs3x7686176AA= Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=dzdMh6RU; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=pass (policy=none) header.from=groups.io Hi, all This patch was reviewed before soft feature freeze. I would like to merge it for this stable tag. If you have any comments, please reply this mail.= =20 Thanks Liming > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: devel@edk2.groups.io =B4=FA=B1= =ED gaoliming via > groups.io > =B7=A2=CB=CD=CA=B1=BC=E4: 2024=C4=EA1=D4=C230=C8=D5 9:21 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io; dhaval@rivosinc.com > =B3=AD=CB=CD: zhiguang.liu@intel.com; dandan.bi@intel.com; > pedro.falcato@gmail.com; chasel.chiu@intel.com > =D6=F7=CC=E2: =BB=D8=B8=B4: [edk2-devel] [PATCH v5 1/1] MdeModulePkg/Acpi= TableDxe: > Prefer xDSDT over DSDT when installing tables >=20 > This version is good to me. Reviewed-by: Liming Gao > >=20 > > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > > =B7=A2=BC=FE=C8=CB: devel@edk2.groups.io =B4=FA= =B1=ED Dhaval > > Sharma > > =B7=A2=CB=CD=CA=B1=BC=E4: 2024=C4=EA1=D4=C228=C8=D5 21:39 > > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > > =B3=AD=CB=CD: gaoliming@byosoft.com.cn; zhiguang.liu@intel.com; > > dandan.bi@intel.com; pedro.falcato@gmail.com; chasel.chiu@intel.com > > =D6=F7=CC=E2: [edk2-devel] [PATCH v5 1/1] MdeModulePkg/AcpiTableDxe: Pr= efer > > xDSDT over DSDT when installing tables > > > > As per ACPI Spec 6.5+ Table 5-9 if xDSDT is available, > > it should be used first. Handle required flow when xDSDT > > is absent or present. > > > > Test: Tested on RISCV64 Qemu platform with xDSDT and booted to > > linux kernel. > > > > Cc: Liming Gao > > Cc: Zhiguang Liu > > Cc: Dandan Bi > > Cc: Pedro Falcato > > Cc: devel@edk2.groups.io > > Signed-off-by: Dhaval Sharma > > Acked-by: Chasel Chiu > > --- > > > > Notes: > > v5: > > - If DSDT is not found, throw error and continue to build other tables > > v4: > > - Fix typos and commit message adding more clarity to patch subject > > v3: > > - Added description of ACPI spec clarification based on which this > patch is > > created > > - Optimizing if-else flow > > v2: > > - Added proper indentation for else if > > > > MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 24 > > ++++++++++++++------ > > 1 file changed, 17 insertions(+), 7 deletions(-) > > > > diff --git > a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > > b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > > index e09bc9b704f5..3879e10b3349 100644 > > --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > > +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > > @@ -1892,14 +1892,24 @@ InstallAcpiTableFromHob ( > > } > > } > > > > - if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE > > *)ChildTable)->Dsdt !=3D 0) { > > + // > > + // First check if xDSDT is available, as that is preferred as per > > + // ACPI Spec 6.5+ Table 5-9 X_DSDT definition > > + // > > + if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE > > *)ChildTable)->XDsdt !=3D 0) { > > + TableToInstall =3D (VOID > > *)(UINTN)((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE > > *)ChildTable)->XDsdt; > > + } 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, > > TableToInstall, TRUE, Version, TRUE, &TableKey); > > - if (EFI_ERROR (Status)) { > > - DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to > > add ACPI table DSDT\n")); > > - ASSERT_EFI_ERROR (Status); > > - break; > > - } > > + } else { > > + DEBUG ((DEBUG_ERROR, "DSDT table not found\n")); > > + continue; > > + } > > + > > + Status =3D AddTableToList (AcpiTableInstance, TableToInstall, TRUE, > > Version, TRUE, &TableKey); > > + if (EFI_ERROR (Status)) { > > + DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to > add > > ACPI table DSDT\n")); > > + ASSERT_EFI_ERROR (Status); > > + break; > > } > > } > > } > > -- > > 2.39.2 > > > > > > > > > > >=20 >=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 (#115476): https://edk2.groups.io/g/devel/message/115476 Mute This Topic: https://groups.io/mt/104365766/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-