From nobody Fri Dec 27 20:32:02 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1500558950714815.9327334061019; Thu, 20 Jul 2017 06:55:50 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 833A221CE7467; Thu, 20 Jul 2017 06:53:47 -0700 (PDT) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4EB2321D147DE for ; Thu, 20 Jul 2017 06:53:45 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jul 2017 06:55:41 -0700 Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.9.12]) by orsmga001.jf.intel.com with ESMTP; 20 Jul 2017 06:55:39 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,384,1496127600"; d="scan'208";a="1153475458" From: Star Zeng To: edk2-devel@lists.01.org Date: Thu, 20 Jul 2017 21:55:32 +0800 Message-Id: <1500558932-298208-4-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 In-Reply-To: <1500558932-298208-1-git-send-email-star.zeng@intel.com> References: <1500558932-298208-1-git-send-email-star.zeng@intel.com> Subject: [edk2] [PATCH 3/3] UefiCpuPkg PiSmmCommunicationSmm: Deprecate SMM Communication ACPI Table X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jeff Fan , Star Zeng , Jiewen Yao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Follow UEFI 2.7 spec to deprecate SMM Communication ACPI Table, PiSmmCommunicationSmm will not install SMM Communication ACPI Table anymore. Cc: Jiewen Yao Cc: Jeff Fan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng --- .../PiSmmCommunication/PiSmmCommunicationSmm.c | 60 +-----------------= ---- .../PiSmmCommunication/PiSmmCommunicationSmm.inf | 29 ++--------- .../PiSmmCommunication/PiSmmCommunicationSmm.uni | 14 ++--- .../PiSmmCommunicationSmmExtra.uni | 4 +- 4 files changed, 13 insertions(+), 94 deletions(-) diff --git a/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.c b/UefiCp= uPkg/PiSmmCommunication/PiSmmCommunicationSmm.c index 077eacce88d1..2b395f38da64 100644 --- a/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.c +++ b/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.c @@ -1,7 +1,7 @@ /** @file PiSmmCommunication SMM Driver. =20 -Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD = License which accompanies this distribution. The full text of the license may be = found at @@ -19,16 +19,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITH= ER EXPRESS OR IMPLIED. #include #include #include -#include #include #include -#include #include -#include #include -#include #include -#include =20 #include "PiSmmCommunicationPrivate.h" =20 @@ -36,26 +31,6 @@ EFI_SMM_COMMUNICATION_CONTEXT mSmmCommunicationContext = =3D { SMM_COMMUNICATION_SIGNATURE }; =20 -EFI_SMM_COMMUNICATION_ACPI_TABLE mSmmCommunicationAcpiTable =3D { - { - { - EFI_ACPI_4_0_UEFI_ACPI_DATA_TABLE_SIGNATURE, - sizeof (EFI_SMM_COMMUNICATION_ACPI_TABLE), - 0x1, // Revision - 0x0, // Checksum - {0x0}, // OemId[6] - 0x0, // OemTableId - 0x0, // OemRevision - 0x0, // CreatorId - 0x0 // CreatorRevision - }, - {0x0}, // Identif= ier - OFFSET_OF (EFI_SMM_COMMUNICATION_ACPI_TABLE, SwSmiNumber) // DataOff= set - }, - 0x0, // SwSmiNumber - 0x0 // BufferPtrAddre= ss -}; - /** Set SMM communication context. **/ @@ -200,22 +175,8 @@ PiSmmCommunicationSmmEntryPoint ( EFI_SMM_SW_DISPATCH2_PROTOCOL *SmmSwDispatch2; EFI_SMM_SW_REGISTER_CONTEXT SmmSwDispatchContext; EFI_HANDLE DispatchHandle; - EFI_ACPI_TABLE_PROTOCOL *AcpiTableProtocol; - UINTN TableKey; - UINT64 OemTableId; EFI_PHYSICAL_ADDRESS *BufferPtrAddress; =20 - CopyMem ( - mSmmCommunicationAcpiTable.UefiAcpiDataTable.Header.OemId, - PcdGetPtr (PcdAcpiDefaultOemId), - sizeof (mSmmCommunicationAcpiTable.UefiAcpiDataTable.Header.OemId) - ); - OemTableId =3D PcdGet64 (PcdAcpiDefaultOemTableId); - CopyMem (&mSmmCommunicationAcpiTable.UefiAcpiDataTable.Header.OemTableId= , &OemTableId, sizeof (UINT64)); - mSmmCommunicationAcpiTable.UefiAcpiDataTable.Header.OemRevision =3D= PcdGet32 (PcdAcpiDefaultOemRevision); - mSmmCommunicationAcpiTable.UefiAcpiDataTable.Header.CreatorId =3D= PcdGet32 (PcdAcpiDefaultCreatorId); - mSmmCommunicationAcpiTable.UefiAcpiDataTable.Header.CreatorRevision =3D= PcdGet32 (PcdAcpiDefaultCreatorRevision); - // // Register software SMI handler // @@ -237,32 +198,15 @@ PiSmmCommunicationSmmEntryPoint ( =20 DEBUG ((EFI_D_INFO, "SmmCommunication SwSmi: %x\n", (UINTN)SmmSwDispatch= Context.SwSmiInputValue)); =20 - // - // Set ACPI table - // - Status =3D gBS->LocateProtocol (&gEfiAcpiTableProtocolGuid, NULL, (VOID = **) &AcpiTableProtocol); - ASSERT_EFI_ERROR (Status); - - mSmmCommunicationAcpiTable.SwSmiNumber =3D (UINT32)SmmSwDispatchContext.= SwSmiInputValue; BufferPtrAddress =3D AllocateAcpiNvsMemoryBelow4G (sizeof(EFI_PHYSICAL_A= DDRESS)); ASSERT (BufferPtrAddress !=3D NULL); DEBUG ((EFI_D_INFO, "SmmCommunication BufferPtrAddress: 0x%016lx, Buffer= Ptr: 0x%016lx\n", (EFI_PHYSICAL_ADDRESS)(UINTN)BufferPtrAddress, *BufferPtr= Address)); - mSmmCommunicationAcpiTable.BufferPtrAddress =3D (EFI_PHYSICAL_ADDRESS)(U= INTN)BufferPtrAddress; - CopyMem (&mSmmCommunicationAcpiTable.UefiAcpiDataTable.Identifier, &gEfi= SmmCommunicationProtocolGuid, sizeof(gEfiSmmCommunicationProtocolGuid)); - - Status =3D AcpiTableProtocol->InstallAcpiTable ( - AcpiTableProtocol, - &mSmmCommunicationAcpiTable, - sizeof(mSmmCommunicationAcpiTable), - &TableKey - ); - ASSERT_EFI_ERROR (Status); =20 // // Save context // mSmmCommunicationContext.SwSmiNumber =3D (UINT32)SmmSwDispatchContext.Sw= SmiInputValue; - mSmmCommunicationContext.BufferPtrAddress =3D mSmmCommunicationAcpiTable= .BufferPtrAddress; + mSmmCommunicationContext.BufferPtrAddress =3D (EFI_PHYSICAL_ADDRESS)(UIN= TN)BufferPtrAddress; SetCommunicationContext (); =20 return Status; diff --git a/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf b/Uefi= CpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf index 9b03837cf3f1..67799e9436cd 100644 --- a/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf +++ b/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf @@ -1,12 +1,8 @@ ## @file -# PI SMM Communication SMM driver that installs the SMM Communication ACPI= Table. +# PI SMM Communication SMM driver that saves SMM communication context +# for use by SMM Communication PEIM in the S3 boot mode. # -# This SMM driver installs the SMM Communication ACPI Table defined in the= UEFI spec -# which provides a mechanism that can be used in the OS present environmen= t by -# non-firmware agents for inter-mode communication with SMM agents. It als= o saves -# SMM communication context for use by SMM Communication PEIM in the S3 bo= ot mode. -# -# Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BS= D License @@ -49,34 +45,17 @@ [LibraryClasses] SmmServicesTableLib BaseLib BaseMemoryLib - HobLib DebugLib SmmMemLib - PcdLib - -[Guids] - gEfiAcpi20TableGuid ## SOMETIMES_CONSUMES ## SystemTable - gEfiAcpi10TableGuid ## SOMETIMES_CONSUMES ## SystemTable - gEfiAcpiTableGuid ## SOMETIMES_CONSUMES ## SystemTable =20 [Ppis] gEfiPeiSmmCommunicationPpiGuid ## UNDEFINED # SMM Configuration Table =20 [Protocols] gEfiSmmSwDispatch2ProtocolGuid ## CONSUMES - gEfiSmmCommunicationProtocolGuid ## UNDEFINED # SMM Communication ACPI= Table GUID - gEfiAcpiTableProtocolGuid ## CONSUMES - -[Pcd] - gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId ## CONSUM= ES - gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemTableId ## CONSUM= ES - gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemRevision ## CONSUM= ES - gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorId ## CONSUM= ES - gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorRevision ## CONSUM= ES =20 [Depex] - gEfiSmmSwDispatch2ProtocolGuid AND - gEfiAcpiTableProtocolGuid + gEfiSmmSwDispatch2ProtocolGuid =20 [UserExtensions.TianoCore."ExtraFiles"] PiSmmCommunicationSmmExtra.uni diff --git a/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.uni b/Uefi= CpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.uni index 55df3905df08..9995b4ec7d9d 100644 --- a/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.uni +++ b/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.uni @@ -1,12 +1,8 @@ // /** @file -// PI SMM Communication SMM driver that installs the SMM Communication ACP= I Table. +// PI SMM Communication SMM driver that saves SMM communication context +// for use by SMM Communication PEIM in the S3 boot mode. // -// This SMM driver installs the SMM Communication ACPI Table defined in th= e UEFI spec -// which provides a mechanism that can be used in the OS present environme= nt by -// non-firmware agents for inter-mode communication with SMM agents. It al= so saves -// SMM communication context for use by SMM Communication PEIM in the S3 b= oot mode. -// -// Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the B= SD License @@ -18,6 +14,6 @@ // // **/ =20 -#string STR_MODULE_ABSTRACT #language en-US "PI SMM Communicat= ion SMM driver that installs the SMM Communication ACPI Table" +#string STR_MODULE_ABSTRACT #language en-US "PI SMM Communicat= ion SMM driver that saves SMM communication context" =20 -#string STR_MODULE_DESCRIPTION #language en-US "This SMM driver i= nstalls the SMM Communication ACPI Table defined in the UEFI Specification,= which provides a mechanism that can be used in the OS-present environment = by non-firmware agents for inter-mode communication with SMM agents. It als= o saves an SMM communication context for use by SMM Communication PEIM in t= he S3 boot mode." +#string STR_MODULE_DESCRIPTION #language en-US "PI SMM Communicat= ion SMM driver that saves SMM communication context for use by SMM Communic= ation PEIM in the S3 boot mode." diff --git a/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmmExtra.uni b= /UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmmExtra.uni index 34e7731fb5ae..bb7ce62dc589 100644 --- a/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmmExtra.uni +++ b/UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmmExtra.uni @@ -1,7 +1,7 @@ // /** @file // PiSmmCommunicationSmm Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the B= SD License @@ -15,4 +15,4 @@ =20 #string STR_PROPERTIES_MODULE_NAME #language en-US -"SMM Communication ACPI Table DXE Driver" +"SMM Communication SMM Driver" --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel