From nobody Sat May 4 18:44:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+84196+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84196+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1638338605; cv=none; d=zohomail.com; s=zohoarc; b=PhxyRmzLVCNqKSz3Z5yBkNlokuEGRTpZ9fbwVaA33tH+2aKNtmZ7YUmzWBtwUOPOpG+rNb40yt6fPkfbJ99c6YK2zaMfTHmQGwDw0nZOV36eSaL+7PbEFm56k45Cb/yrwoQ/viDaF5hj4L3gCCq8P3pYJaHX9f5fqDBPMG+mja4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638338605; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=v3cUskPjltE1UIdH/36ClPYfdjMO9Di2/XY59CWoSQo=; b=nrT2vbasjdnFl3TX83Ei9Fl1VNJkXq907C09Kx4rkJtAMLxVCuu+KPMRHACkyAYzNc64EuWHvLCTQrE2hPVx5DljOoJYTP5IoOsG/wcnIWPa/yK4wMDeqxsQG9t7qInmsfZUCIxytztRtuSoixH+/LrBUF3H+0MTEcagI4wwqWU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84196+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1638338605773969.6642129227781; Tue, 30 Nov 2021 22:03:25 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id aniFYY1788612xgvtjFDPTXS; Tue, 30 Nov 2021 22:03:25 -0800 X-Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web10.88677.1638338603901260497 for ; Tue, 30 Nov 2021 22:03:24 -0800 X-IronPort-AV: E=McAfee;i="6200,9189,10184"; a="216408309" X-IronPort-AV: E=Sophos;i="5.87,278,1631602800"; d="scan'208";a="216408309" X-Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2021 22:03:23 -0800 X-IronPort-AV: E=Sophos;i="5.87,278,1631602800"; d="scan'208";a="500107308" X-Received: from ksravanx-mobl1.gar.corp.intel.com ([10.215.138.78]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2021 22:03:20 -0800 From: "kavya" To: devel@edk2.groups.io Cc: kavya , Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-devel] [PATCH] MinPlatformPkg: Check if the Acpi table is already installed. Date: Wed, 1 Dec 2021 11:32:28 +0530 Message-Id: <20211201060228.7804-1-k.kavyax.sravanthi@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,k.kavyax.sravanthi@intel.com X-Gm-Message-State: T8amjekXcBF93M8555m2QajIx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1638338605; bh=dpu/XZjUc84Cbvu3xtfcPD4Dk0jH+Uunz+RJvPuYzqw=; h=Cc:Date:From:Reply-To:Subject:To; b=tmCCaDHLC9tv3ws+B9i0BVJA+dfnOMEx+QiZrwgNuLnp6b/bTDZ8bEizkaB5bGeMRaz 7dq9HN/5/e56OCtKc4ATgmwR4nbttfxz0PrYCLM6/hOchHuRC4c3wUAZENeHAJsAopuvr y4PMT3yox9WZ22T4oAhtWs5m2gedaK/isOE= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1638338606384100002 Content-Type: text/plain; charset="utf-8" Check if Acpi table is already installed by locating Acpi system description table protocol. If protocol is not installed then continue to install the acpi table. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: kavya --- Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 24 ++++++++= ++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c b= /Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c index 785cf4c2f9..03193c99fa 100644 --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c @@ -1053,6 +1053,18 @@ InstallMcfgFromScratch ( UINTN = SegmentCount; PCI_SEGMENT_INFO = *PciSegmentInfo; UINTN = TableHandle; + UINTN = Handle; + EFI_ACPI_DESCRIPTION_HEADER = *Table; + + Handle =3D 0; + Status =3D LocateAcpiTableBySignature ( + EFI_ACPI_3_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_B= ASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE, + (EFI_ACPI_DESCRIPTION_HEADER **) &Table, + &Handle + ); + if (!EFI_ERROR (Status)) { + return EFI_SUCCESS; + } =20 PciSegmentInfo =3D GetPciSegmentInfo (&SegmentCount); =20 @@ -1368,10 +1380,22 @@ UpdateLocalTable ( EFI_ACPI_TABLE_VERSION Version; UINTN TableHandle; UINTN Index; + UINTN Handle; + EFI_ACPI_DESCRIPTION_HEADER *Table; =20 for (Index =3D 0; Index < sizeof(mLocalTable)/sizeof(mLocalTable[0]); In= dex++) { CurrentTable =3D mLocalTable[Index]; =20 + Handle =3D 0; + Status =3D LocateAcpiTableBySignature ( + CurrentTable->Signature, + (EFI_ACPI_DESCRIPTION_HEADER **) &Table, + &Handle + ); + if (!EFI_ERROR (Status)) { + continue; + } + PlatformUpdateTables (CurrentTable, &Version); =20 TableHandle =3D 0; --=20 2.16.2.windows.1 -=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 (#84196): https://edk2.groups.io/g/devel/message/84196 Mute This Topic: https://groups.io/mt/87421907/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-