From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web12.19526.1639439766581416899 for ; Mon, 13 Dec 2021 15:56:08 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.com header.s=intel header.b=YfA86mMp; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: nathaniel.l.desimone@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1639439766; x=1670975766; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=h0zzK5tf8Xu4t2wuGuw8YvdnOW2A0h7KrxWRRXY6Qok=; b=YfA86mMpY1HnHEfJkSH4P7pVv7BInAYEo+CGCWMSgeN76wxFIE/Elre/ 7DAMyife2armMm3xoUCUOQTr1Y/LvWdE+KsnR73+dhlNqMKSvDlNR7D6M P+kx7W5619iB8W1ORul5eSp/wJjUpgeKi95sgqW4bZgYul7bJ0VyPoBiM kdmURTSc9yJ7N8/tVNfB1507cQ4hewsgCTPs+hx6W06YnX7ql4QlkfYVb CF+HYJ78l2Iyyv029cgLsEMZKwUacY6tPis/Op199vKdRmlZRaYgpaOrr HcAaJRFUtLzmcsGLm9aq41jUvKLz59biKcDhvxvfbfkM/P3YXG1p7psAF A==; X-IronPort-AV: E=McAfee;i="6200,9189,10197"; a="238670135" X-IronPort-AV: E=Sophos;i="5.88,203,1635231600"; d="scan'208";a="238670135" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2021 15:56:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,203,1635231600"; d="scan'208";a="517983449" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga008.jf.intel.com with ESMTP; 13 Dec 2021 15:56:05 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 13 Dec 2021 15:56:04 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Mon, 13 Dec 2021 15:56:04 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.177) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Mon, 13 Dec 2021 15:56:04 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ltRBmLg/pnOohpbbSVPZjYoy5KM3FgRsBMunP0Y7qiEiwAdj6U+dlQpZWO+gNtN6esWExJV52WSAAX7pJVb0kZDWKyv1mvLG+Tej/4jnhJ7p1KCdk4kiCdzLZQh6/lgm6TYeYLI9Kng44QimqbjBvcz4VUCig1E6Zm/8/63JKq7OhMANl2tLUV9x+N3VZI8DIK78wG95Rx+7qwGUz0yU93XxPJzLppesCqYj7qcjbJmLl1MZIh8YaMH5xAhNPxsI2W8LsTKMwyJ5xGsnM8BIUiGiqweIEGsdi7RuZgQt5zDd4FFO61BqKLrHq9SXWY59TiPEAdzlcE7hEExNqnvMHw== 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=lkc545kjySQzQ5m0/G6e3eo8JP6zNwjFOyA/6W2GJYk=; b=hKvU9CGuZ4k9DTMqz/1PeNTc3LbKd5IotVscjV11povfKNzGC5z/9s1cJ0owBGNT6D+7snoEvkzZdNHz/HWl7uJGS3Z0rg2mynyjbh2TCOIa/p8Std8JB33YtuxWoNXPN5Bv00y9QoEAxdfHrT2ZQ18t3wv7Tj9TNZKgdrEErGTlXZFup/N+KsgvbC5WpJi5R/0dz5bBCSXaREhsG3seW3klvjl9SqMF5Z8+wluNGrOItrtmTMso63m3ZlDjLgw5rV6pSVKIRZjygYw0oBF4oNP3VLp5OSnv37yLiREGjL5t+1BLPLGXUgGiN2gSPEZuYF5lyknhIHrGmYu/WiuQfg== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lkc545kjySQzQ5m0/G6e3eo8JP6zNwjFOyA/6W2GJYk=; b=sOhhfCVRJZMZagQc+HyZgpdcWarViSHjIywJwjspkTVu18e1IG1nb7DgnTebJevZISGh5jQ1LdscwNfHHaXvpIj9nIJoWNDAmyrQgePvyZA9h/apF134clkGRyBKpl+l4HzUNlq/rZy/sochLLb/Qy0GneHT0VOhy03LrQOgC/A= Received: from MW4PR11MB5821.namprd11.prod.outlook.com (2603:10b6:303:184::5) by MWHPR1101MB2288.namprd11.prod.outlook.com (2603:10b6:301:53::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.12; Mon, 13 Dec 2021 23:56:03 +0000 Received: from MW4PR11MB5821.namprd11.prod.outlook.com ([fe80::6920:39b9:e18c:9dc5]) by MW4PR11MB5821.namprd11.prod.outlook.com ([fe80::6920:39b9:e18c:9dc5%8]) with mapi id 15.20.4778.017; Mon, 13 Dec 2021 23:56:03 +0000 From: "Nate DeSimone" To: "Ni, Ray" , "devel@edk2.groups.io" , "Sravanthi, K KavyaX" CC: "Chiu, Chasel" , "Gao, Liming" , "Dong, Eric" , "Oram, Isaac W" , "Kubacki, Michael" Subject: Re: [edk2-devel] [Patch V2] MinPlatformPkg: Check if Acpi table is already installed. Thread-Topic: [edk2-devel] [Patch V2] MinPlatformPkg: Check if Acpi table is already installed. Thread-Index: AQHX6mjLiWvORF6lDEKBHjxuERO9Eawn2I3QgABP5oCACPvw0A== Date: Mon, 13 Dec 2021 23:56:03 +0000 Message-ID: References: <20211206061610.3316-1-k.kavyax.sravanthi@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.200.16 dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7f3a0478-61f3-49a6-8126-08d9be941eda x-ms-traffictypediagnostic: MWHPR1101MB2288:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: cUIJRmtciNfQknk4NOw+zQCIUhsQd3pgaUMdumjMjvAXhS3Vxy6bNIJSWf67tPffdxzzxo0eTro3zUMBbzahk8D022s8Hmfmr30FKsBwF2/Fo1Lr1Xij81jRLRFYxKCIJujniPatrDw1WKUSBxcPLruUIBcOiu/c7QV2xXVtUE2OcixbxcMlnsnbXVUJc6bAceQ1ttqaOAP3sJivGaHGNxEfj2PUUxGVohuwBr0K0vPhihhJVvsWvXx+nzKhpneJtBrFGo0YwdM+czam4L2er86oPd9IfwqKxSI11wu9IaizlpiEemTq8I8oRg4EQrJ2v9mxEhx3yZb4LM0uS1a9Z4UiD1ZuWD1drKXkyAd2RfwHqvIJMXZ3rZE0LCzyCXcBGJqBFQB9JhugdTMJiXb5SAwFhUPWiwUCs4Y264JeFVZzajpewFN71clL1CcBa3YVb65IpwV1zVA7uxxV6xtpvJYhj1hHehTrI74cb4akZSDT1QEVY3RPpcpDshcP0RC7hurLJ2KFwagbvRfoZhkWDLMgLYWiNRhP27uVzdJAkVHTwxQCGsyquvf0eRIEyO08qwM0XBjCUqvDvcVgKMJzsH29AFVieG0Dj63ngGZy7fSAV51qvvZxMkbABR3wdfCymOT8kGm07RcYvPb2ag0m7D9fb5Dp1ZpyhsOhuzSqlRG+PHmA4rukibFlrRrwSXPUT9zNeNuwBS3jHwXgEXdQZVTBebPU8dirqnQVBcoOHadzG/9fszKUUG2h1EPS1dgN9QwjxDT37N5LlYtzrm0UoXXqufV/BucC6oSrY1n3hXwSuer8xoN+OXUHtthBT0/LZovj/yfJsgfdbFSinHCFyQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5821.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(64756008)(66556008)(6506007)(66446008)(66946007)(76116006)(966005)(54906003)(52536014)(66476007)(53546011)(2906002)(9686003)(38070700005)(6636002)(82960400001)(55016003)(86362001)(83380400001)(5660300002)(110136005)(508600001)(71200400001)(7696005)(8676002)(316002)(8936002)(26005)(33656002)(186003)(38100700002)(4326008)(122000001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?RWz937lRIdS/cgUfiVMGQu16x/JPoevKj1SJLonO4RM8BH44s0E2zFdUkF16?= =?us-ascii?Q?Pfgfs8yyW4eZExe8TSGw38YNAwp8KZWxLqnMdPuMr7nLU4F8TqzNs+DQ72U3?= =?us-ascii?Q?Ix3Qybqa5Ojszakmd817rMx4FmuIJeWuch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YDKrDxWbYNOqwRRZz1WHTMN8NPeteCrsA9qMzm1vseqs/1ZbOn?= =?us-ascii?Q?rWb124hcPdAwy/f6OB2qX73dqZWOVBxE8GUG9wG+Rz7sNrQ6GTFfNVzmxtle?= =?us-ascii?Q?PcTNfpBaYYRx5Cp5bghfKQznrFExswVw3WRR/zwn6gGWij0Rw66shcV11hAO?= =?us-ascii?Q?ZGl1vr35MUNs9qkWaUemVKbR91dEHdmNrRql1ZvrFZ8Ndl3DVGBtPprPQ7cr?= =?us-ascii?Q?7b8MV4zc+VnfCRuojCDiTidGvxhYzjf75VaoDzTJtQXqed7QDTlPWnQ/1POG?= =?us-ascii?Q?97+32nmDqG/XEMdvwyQvXaFae3krtBbT9q0npajMfcrtseqzllM4HJFhmj1e?= =?us-ascii?Q?U7u/0hL+8PhevwzCeOB222+5tl3mCbA1ahiugx4rsOQ12IbgwtgSiFeHCbTV?= =?us-ascii?Q?ClEDZU5+4JYCoJtyg/BZQDvP1v7HgdpUSAz1m2MITMzUHi5A5xNpkYsaBh5V?= =?us-ascii?Q?eUWBRKEbDxxLBtfNu3bpqEp03rsd5+6zQpp86mIUEN+ajwhXSu37Lnqm3N1w?= =?us-ascii?Q?r/H38nLE+k8OZ8JIDFC9FKHtGrGQZHb0VEhudWqo8nMCNc8kRmK4QfaJqSjo?= =?us-ascii?Q?qFIJxsNVqlfFNGFOpV/LkEgdPtTTKV04hc2MAJdI9kicrGGmdvwG/UZDR/vK?= =?us-ascii?Q?A/PJwg=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5821.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7f3a0478-61f3-49a6-8126-08d9be941eda X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Dec 2021 23:56:03.0458 (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: LDMQeMCI1av3NKadwoTMXPjSbZe9GNAfEorypM7c24udLjj0Geycdah4zvHnS7OzmXIuelfCePerZMr4DQwIUR7RD01oSzDnDH7k/1seeMo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1101MB2288 Return-Path: nathaniel.l.desimone@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Ray, Since UefiPayloadPkg is in edk2, and MinPlatformPkg is in edk2-platforms, U= efiPayloadPkg should not have any dependencies on MinPlatformPkg. Therefore= , I don't see how that is relevant. Thanks, Nate -----Original Message----- From: Ni, Ray =20 Sent: Tuesday, December 7, 2021 10:42 PM To: devel@edk2.groups.io; Desimone, Nathaniel L ; Sravanthi, K KavyaX Cc: Chiu, Chasel ; Liming Gao ; Dong, Eric ; Oram, Isaac W ; Michael Kubacki Subject: RE: [edk2-devel] [Patch V2] MinPlatformPkg: Check if Acpi table is= already installed. Nate, I don't consider it as a hack. UefiPayloadPkg requires that bootloader prod= uces all ACPI tables. Now we are in a middle stage. So, only the MCFG and FADT are produced (as g= UniversalPayloadAcpiTableGuid HOB) in PEI phase. Thanks, Ray -----Original Message----- From: devel@edk2.groups.io On Behalf Of Nate DeSimon= e Sent: Wednesday, December 8, 2021 10:06 AM To: Sravanthi, K KavyaX ; devel@edk2.groups.i= o Cc: Chiu, Chasel ; Liming Gao ; Dong, Eric ; Oram, Isaac W ; Michael Kubacki Subject: Re: [edk2-devel] [Patch V2] MinPlatformPkg: Check if Acpi table is= already installed. This seems like a hack to me. One of the major goals of the Minimum Platfor= m Architecture is consistency. A board override for the MinPlatform provide= d installation of the MCFG table runs counter to that goal. Every field in = the MCFG table produced by MinPlatform's implementation is fully customizab= le by board code via the PciSegmentInfoLib's GetPciSegmentInfo() function. = If a multi-segment MCFG table is needed, then all the board needs to do is = choose a different implementation of PciSegmentInfoLib than the default one= (MinPlatformPkg\Pci\Library\PciSegmentInfoLibSimple\PciSegmentInfoLibSimpl= e.inf) I cannot conceive of any reason why a board override of this functionality = is required. Why do you need this?=20 -----Original Message----- From: Sravanthi, K KavyaX =20 Sent: Sunday, December 5, 2021 10:16 PM To: devel@edk2.groups.io Cc: Sravanthi, K KavyaX ; Chiu, Chasel ; Desimone, Nathaniel L ; = Liming Gao ; Dong, Eric Subject: [Patch V2] MinPlatformPkg: Check if Acpi table is already installe= d. Check if Acpi table is already installed by locating the first ACPI table i= n XSDT/RSDT based on Signature Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: kavya Reviewed-by: Zhiguang Liu --- Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 18 ++++++++= ++++++++++ 1 file changed, 18 insertions(+) diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c b= /Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c index 785cf4c2f9..dcbb8b7c7f 100644 --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c @@ -1048,12 +1048,21 @@ InstallMcfgFromScratch ( { EFI_STATUS = Status; EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_HEADER = *McfgTable; + EFI_ACPI_COMMON_HEADER = *Mcfg; EFI_ACPI_MEMORY_MAPPED_ENHANCED_CONFIGURATION_SPACE_BASE_ADDRESS_ALLOCAT= ION_STRUCTURE *Segment; UINTN = Index; UINTN = SegmentCount; PCI_SEGMENT_INFO = *PciSegmentInfo; UINTN = TableHandle; =20 + Mcfg =3D (EFI_ACPI_COMMON_HEADER *) EfiLocateFirstAcpiTable ( + EFI_ACPI_3_0_PCI_EXPRESS_MEMORY_MAPP= ED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE + ); if (Mcfg !=3D NULL) { + DEBUG ((DEBUG_INFO, "MCFG table already installed\n")); + return EFI_SUCCESS; + } + PciSegmentInfo =3D GetPciSegmentInfo (&SegmentCount); =20 McfgTable =3D AllocateZeroPool ( @@ -1365,6 +1374,7 @@ UpdateLocalTable ( { EFI_STATUS Status; EFI_ACPI_COMMON_HEADER *CurrentTable; + EFI_ACPI_COMMON_HEADER *Table; EFI_ACPI_TABLE_VERSION Version; UINTN TableHandle; UINTN Index; @@ -1372,6 +1382,14 @@ UpdateLocalTable ( for (Index =3D 0; Index < sizeof(mLocalTable)/sizeof(mLocalTable[0]); In= dex++) { CurrentTable =3D mLocalTable[Index]; =20 + Table =3D (EFI_ACPI_COMMON_HEADER *) EfiLocateFirstAcpiTable (CurrentT= able->Signature); + if (Table !=3D NULL) { + DEBUG ((DEBUG_INFO, "Acpi table with signature=3D%c%c%c%c already in= stalled\n", + ((CHAR8*)&CurrentTable->Signature)[0], ((CHAR8*)&CurrentTable-= >Signature)[1], + ((CHAR8*)&CurrentTable->Signature)[2], ((CHAR8*)&CurrentTable-= >Signature)[3])); + continue; + } + PlatformUpdateTables (CurrentTable, &Version); =20 TableHandle =3D 0; -- 2.16.2.windows.1