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 ADF77941B39 for ; Tue, 28 Nov 2023 18:41:50 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=chUGU7vKZbpQ1c0MOe6FChA3j40pmhuwbHlAhh7uKkY=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version: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=1701196909; v=1; b=fsn/OWrdzhlIViYJ/OkFzj58yHs42ex6l7H6sGzarZY2esxJW7l6YDEnEwHBlyPREFZ3iyZu NQsu5AHj/mNCR5Oc8iLlsGQsaXwYauYtCgb8PDKgwAMNELM4jo4NJSMW5WShT1JHlQmtg7en+cR p2iJUWjQCZkkH98zmNRa85AM= X-Received: by 127.0.0.2 with SMTP id 1bLmYY7687511xQ0jnEDc1QX; Tue, 28 Nov 2023 10:41:49 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web11.205.1701196908540551396 for ; Tue, 28 Nov 2023 10:41:48 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10908"; a="392743317" X-IronPort-AV: E=Sophos;i="6.04,234,1695711600"; d="scan'208";a="392743317" X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Nov 2023 10:41:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10908"; a="942024386" X-IronPort-AV: E=Sophos;i="6.04,234,1695711600"; d="scan'208";a="942024386" X-Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 28 Nov 2023 10:41:47 -0800 X-Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 28 Nov 2023 10:41:47 -0800 X-Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Tue, 28 Nov 2023 10:41:47 -0800 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Tue, 28 Nov 2023 10:41:46 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S00K2j7X8P3rR93lfzmuU1GKJW3ZfrPSJqK/PPBKV0TtTlR4N5zLRsP5L/VF/ch+pcYURIH1am8U4SbizDj6BhjHE/5gHijM0fdxQv0ZizMQeiWknBCDkZL+HCC0UCaKI0diO5FgiCcU4uG4CmjsHMkM5JmslCLn+rzQLcUlTyzCWMjZofB/GDwvgH/HhoG3Qqg6ufzZexgzIVEKDwRGngihy+08ji1LEQVhjGCQHRP1YoHT2GQFZthgjXT1ie6QX1yr32+pMvzsdYykQK2rEqSa8XkoyBcwBgAYzJ9nSnhH6KnOuSunSg2V0x8TqZLeJyVecf308Xx147sqBjgh+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Lm7TzeLxJSgjql5gOEjRcYpCNc1bdBuR5mQvkxZkWFo=; b=H4GrQBhkOwT0DXRyGa1tF4u2ZXMXLjcYpoWYye5C29Mt192vK5kbCfnnDuUptQ2CXCivT/Rf1NlyVe3zrbqxt3gtt69XowTfthcKoi4ajr2lkcgT9iwweDPbngZh4pInXufgUBYaW7KjNO/mZGGVnOCxKByS9UYMdbCvcLGF+LNF78twZJP0M8aaf0i1oX1ZoVXuLH3Lb+F9K1yOZ+jUxAJRZgOhlmC844bCcE++xnGOsyIsRdc89I10J/nnud77t1j3MzWlgCH3xLL3W5qB4tqbdSNym4odRR0RknppKBLudHM4Zg1G/kBX6Cz9zWGCRMlYtZwjen0VICjXfHb+OQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from BN9PR11MB5483.namprd11.prod.outlook.com (2603:10b6:408:104::10) by PH7PR11MB5983.namprd11.prod.outlook.com (2603:10b6:510:1e2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.25; Tue, 28 Nov 2023 18:41:12 +0000 X-Received: from BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::6da1:a4b7:4771:14e1]) by BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::6da1:a4b7:4771:14e1%5]) with mapi id 15.20.7025.022; Tue, 28 Nov 2023 18:41:12 +0000 From: "Chiu, Chasel" To: "devel@edk2.groups.io" , "dhaval@rivosinc.com" CC: "Gao, Liming" , "Liu, Zhiguang" , "Bi, Dandan" Subject: Re: [edk2-devel] [PATCH v3 1/1] MdeModulePkg: Fix issue with ACPI table creation Thread-Topic: [edk2-devel] [PATCH v3 1/1] MdeModulePkg: Fix issue with ACPI table creation Thread-Index: AQHaG2n0gIIVhIFBw0CUUzI/WrM/bbCQHbbQ Date: Tue, 28 Nov 2023 18:41:12 +0000 Message-ID: References: <20231120042429.860029-1-dhaval@rivosinc.com> <20231120042429.860029-2-dhaval@rivosinc.com> In-Reply-To: <20231120042429.860029-2-dhaval@rivosinc.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN9PR11MB5483:EE_|PH7PR11MB5983:EE_ x-ms-office365-filtering-correlation-id: dcf5650a-c0a7-40d4-813e-08dbf0419882 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: jNa2yrDdLQ8bRVBO3CLWJlrtH8FJ0i9SG/WbJW+EA8mQoTwSarUujqCsZHlZXpiwPthHNWN4M7FyNWsNovnGQAJhZWFgq7Lvmyc3vKgakvUYKH9y6iEW8Gc+8xSqitz8rID12qrc8asg+/m/8EoYzlivwPOuB38FtdK9JMAiFehqwurF++7uciWCCc9GwPuwOS4JT7oxKNBQ857+d9y3gtVv0WAUFpVuIHkQ9wSlMbVlojLxmmVxi6FlKbpPj+KCaESbm3J0Om8YYROODibVjzhYnZpXlKjvmaEoHhX7qdLFL7Fti09DFpmpy8nQi7vcwYMOCP74OS9u4OK30mzzAbIZAmwYWjif9e265yXjpFV+jZA5gUZvTG+40bRc0fbcJhhokipm8YL76SLd3Hcdt1s70cV3kZRlpPlOCoNH4S6SvDttEhRVHtehR7xP764s8XOei0ImmyJ9qsui9XTBqsqV5D/nAA1+DMw4CVZcSx6tP2HM4qbkyEKJLWnf8mYabfT9kZVs0ka3YowCos/YRJdoD0yRtk8To6qDITGXJDogAf8c+g6q4JX7Vqv97B52M1tArCDy4tRnYyRoAB7JEl8/73EeFajYTuFuLKXIp1Xy8LbAEVdU6RG+vgZnRI0kHgqnzFuf4SR0B95qOnJb5Q== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Yv4dxDG7LgelcG5ruhe0jTE5846f890dIbWItJkVhrSxAVCjRmcgITM/KPME?= =?us-ascii?Q?fV+yshQ6eXoc+T6cQO7OisagKiUO3zr9yslxLOGnbbtGZVJOgtV644ZASbVO?= =?us-ascii?Q?PeWA6VrO9A8iAzwK5pFIC8VI3jwVx2uBGz3G1/yBectB8IAm4SB8yMDLeOl2?= =?us-ascii?Q?nLKYqKHR5z1SxV92DJYn70BeU/zFX6VaRvC5xYzu3KDH47H31Va65nUDkJxy?= =?us-ascii?Q?7bXDGl+0Yp8004aQXLhalyl3yeFcOTWNgfM6+GoYfB1k7eF/opU693lS9W3K?= =?us-ascii?Q?ZEE4PIMCIHmphiNDBh9oyW0deFoMRa5QNI7w83HAjypo5HaRT3E6y/zPGVxA?= =?us-ascii?Q?cHp3gVzXQkpsXr/djWEZdBM8El8pBOgjakieyueNOcfHjAOW3B1qAxk3Cm0P?= =?us-ascii?Q?xENMDxzbKNTMag51unZtgNDTjdabK/aPXtbLcK/do44lpOIc8UZVfYAyA5Tp?= =?us-ascii?Q?GV3W1qHsSi3OoMJvScbpihRkqareJg7grPKPobVuTBqlr0IoP9lsA65EFBx0?= =?us-ascii?Q?lhgd+zZtCdWTV0wF9nS5Lv8ZuWukorDP+0nR7Jbns0yryJ9Fd0Mp/MY1knb1?= =?us-ascii?Q?PrG5SzOjbl2FHmb316TeOEdm4PAN5NXGIasI4ejS3P6mMAWY2K+BUSfIZ0qx?= =?us-ascii?Q?ZDlDDG/bTltcuu6PvfCspxpWavYjDmbXaf758ziyJQNStlidzL4VyovtsM++?= =?us-ascii?Q?F5OhGK/pvlDzT7D4Zo7q+ITFmnLDn1+zNvCCetY5Im1bQf5NVubCJPFx/jWI?= =?us-ascii?Q?WYCiNCubIFdlqhaCQgHdQZpxSQRFGo6U17wJ8njtQXVehQGbTwLYsmLqVszC?= =?us-ascii?Q?f3NJgbxkdIAELnx3aWwYV7SSt8qNJClQnK7hleuFHSqhDtJUKw6RL+wpVNnm?= =?us-ascii?Q?koJ0i0tgddtD7WlwOUmxYl8Hpaz7POqanj8sYv2k1D6xT52qfV5mD6oB3eVS?= =?us-ascii?Q?zyhCMaCOJxSzi7ydfksim4937SdKdRiblLGo6iB6scHengReN60PSahaHkj7?= =?us-ascii?Q?eHsN+fnhyHH/Bym7svuoK0pzNzPvcknW8XxvQxLFeYc4BPmZytlM5Wf107Wv?= =?us-ascii?Q?m/VX68QYAyPP/2CJ+BVFkkuzDgwdR4xn4vOihOXL3zWV6wEZOI1fZc+q5zeq?= =?us-ascii?Q?ZkHC6MNYcx5m9ixX2LSCttZCCqWzDu8E6b32flOnV9Hp6LaK9zlt6y3MAuHw?= =?us-ascii?Q?fyjDZnbYGrHTpMUQHE0JCBdpHdmXvi4WaDHPRNzBhV6nacegM17ODFh6DnVk?= =?us-ascii?Q?ZcItnzNOKDCAbemXty5rw7sAviaocOuvItVeSXuA9cXo/oQK7L0WJm+EKPgn?= =?us-ascii?Q?HLyzD3lW5TTcBK87sBP0LCaRPcyJPg9CmEbp5PAeCV9qzNMxTwzLiBPwtJCr?= =?us-ascii?Q?TSxaBo9UjCOaeMW85ey2D0puYEINQuDm8W4DZYnz+wUUPyT89T14TM5kpNGU?= =?us-ascii?Q?yzeuE4pQnRKDW1A1yciRP/q4pCKvLAfk/1XqJmCfPMxhmI3tPOHdirBEzoxo?= =?us-ascii?Q?KxHoCWYwcQo9UlNFusrjxU6fe1VPHwBav2FBh6xzrzi8jPTx+q9Zcz5HNLY3?= =?us-ascii?Q?BMqznqcywQ7QOgKSXlMw0L0v0T95tFPDgHeutamr?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR11MB5483.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dcf5650a-c0a7-40d4-813e-08dbf0419882 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Nov 2023 18:41:12.4812 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: va36mqtrNtDpi1HYiSVbJU/K7UlAXJFdFuYg2GT+UaB6Km5K9rajv5coeamDvw4lJ2hTpvTllfo1+dOwMfq8Ow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB5983 X-OriginatorOrg: intel.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,chasel.chiu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: m7cdBo4LJehILJJ5cG7QAQjmx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" 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="fsn/OWrd"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.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 Thanks for update! Change looks good to me. Acked-by: Chasel Chiu > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Dhaval > Sharma > Sent: Sunday, November 19, 2023 8:24 PM > To: devel@edk2.groups.io > Cc: Gao, Liming ; Liu, Zhiguang > ; Bi, Dandan > Subject: [edk2-devel] [PATCH v3 1/1] MdeModulePkg: Fix issue with ACPI ta= ble > creation >=20 > As per ACPI Spec 6.5+ Table 5-9 if xDSDT is avaialble, it should be used = first. > Handle required flow when xDSDT is abscent or present. >=20 > Test: Tested on RISCV64 Qemu platform with xDSDT and booted to linux kern= el. >=20 > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Dandan Bi > Signed-off-by: Dhaval Sharma > --- >=20 > Notes: > v2: > - Added proper indentation for else if >=20 > MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 22 > +++++++++++++------- > 1 file changed, 15 insertions(+), 7 deletions(-) >=20 > diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > index e09bc9b704f5..ead8376177c9 100644 > --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > @@ -1892,14 +1892,22 @@ InstallAcpiTableFromHob ( > } } - if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION= _TABLE > *)ChildTable)->Dsdt !=3D 0) {+ //+ // First check if xDSDT = is available 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, Ta= bleToInstall, > 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 = {+ > break;+ }+ Status =3D AddTableToList (AcpiTableInstance, Ta= bleToInstall, > 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 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#111451): https://edk2.groups.io/g/devel/message/11145= 1 > Mute This Topic: https://groups.io/mt/102702109/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 -=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 (#111823): https://edk2.groups.io/g/devel/message/111823 Mute This Topic: https://groups.io/mt/102702109/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-