]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg PiSmmCommunicationSmm: Deprecate SMM Communication ACPI Table
authorStar Zeng <star.zeng@intel.com>
Thu, 20 Jul 2017 06:57:12 +0000 (14:57 +0800)
committerStar Zeng <star.zeng@intel.com>
Thu, 27 Jul 2017 06:08:09 +0000 (14:08 +0800)
Follow UEFI 2.7 spec to deprecate SMM Communication ACPI Table,
PiSmmCommunicationSmm will not install SMM Communication ACPI Table
anymore.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.c
UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf
UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.uni
UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmmExtra.uni

index 077eacce88d12806a43a5b98e3c414a83c5360a2..2b395f38da64739bf46a7e9aecea2ff931d0f7f4 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 PiSmmCommunication SMM Driver.\r
 \r
-Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -19,16 +19,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/SmmServicesTableLib.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
-#include <Library/HobLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/SmmMemLib.h>\r
-#include <Library/PcdLib.h>\r
 #include <Protocol/SmmSwDispatch2.h>\r
-#include <Protocol/SmmReadyToLock.h>\r
 #include <Protocol/SmmCommunication.h>\r
-#include <Protocol/AcpiTable.h>\r
 #include <Ppi/SmmCommunication.h>\r
-#include <Guid/Acpi.h>\r
 \r
 #include "PiSmmCommunicationPrivate.h"\r
 \r
@@ -36,26 +31,6 @@ EFI_SMM_COMMUNICATION_CONTEXT  mSmmCommunicationContext = {
   SMM_COMMUNICATION_SIGNATURE\r
 };\r
 \r
-EFI_SMM_COMMUNICATION_ACPI_TABLE  mSmmCommunicationAcpiTable = {\r
-  {\r
-    {\r
-      EFI_ACPI_4_0_UEFI_ACPI_DATA_TABLE_SIGNATURE,\r
-      sizeof (EFI_SMM_COMMUNICATION_ACPI_TABLE),\r
-      0x1,   // Revision\r
-      0x0,   // Checksum\r
-      {0x0}, // OemId[6]\r
-      0x0,   // OemTableId\r
-      0x0,   // OemRevision\r
-      0x0,   // CreatorId\r
-      0x0    // CreatorRevision\r
-    },\r
-    {0x0},                                                      // Identifier\r
-    OFFSET_OF (EFI_SMM_COMMUNICATION_ACPI_TABLE, SwSmiNumber)   // DataOffset\r
-  },\r
-  0x0,                                                   // SwSmiNumber\r
-  0x0                                                    // BufferPtrAddress\r
-};\r
-\r
 /**\r
   Set SMM communication context.\r
 **/\r
@@ -200,22 +175,8 @@ PiSmmCommunicationSmmEntryPoint (
   EFI_SMM_SW_DISPATCH2_PROTOCOL *SmmSwDispatch2;\r
   EFI_SMM_SW_REGISTER_CONTEXT   SmmSwDispatchContext;\r
   EFI_HANDLE                    DispatchHandle;\r
-  EFI_ACPI_TABLE_PROTOCOL       *AcpiTableProtocol;\r
-  UINTN                         TableKey;\r
-  UINT64                        OemTableId;\r
   EFI_PHYSICAL_ADDRESS          *BufferPtrAddress;\r
 \r
-  CopyMem (\r
-    mSmmCommunicationAcpiTable.UefiAcpiDataTable.Header.OemId,\r
-    PcdGetPtr (PcdAcpiDefaultOemId),\r
-    sizeof (mSmmCommunicationAcpiTable.UefiAcpiDataTable.Header.OemId)\r
-    );\r
-  OemTableId = PcdGet64 (PcdAcpiDefaultOemTableId);\r
-  CopyMem (&mSmmCommunicationAcpiTable.UefiAcpiDataTable.Header.OemTableId, &OemTableId, sizeof (UINT64));\r
-  mSmmCommunicationAcpiTable.UefiAcpiDataTable.Header.OemRevision      = PcdGet32 (PcdAcpiDefaultOemRevision);\r
-  mSmmCommunicationAcpiTable.UefiAcpiDataTable.Header.CreatorId        = PcdGet32 (PcdAcpiDefaultCreatorId);\r
-  mSmmCommunicationAcpiTable.UefiAcpiDataTable.Header.CreatorRevision  = PcdGet32 (PcdAcpiDefaultCreatorRevision);\r
-\r
   //\r
   // Register software SMI handler\r
   //\r
@@ -237,32 +198,15 @@ PiSmmCommunicationSmmEntryPoint (
 \r
   DEBUG ((EFI_D_INFO, "SmmCommunication SwSmi: %x\n", (UINTN)SmmSwDispatchContext.SwSmiInputValue));\r
 \r
-  //\r
-  // Set ACPI table\r
-  //\r
-  Status = gBS->LocateProtocol (&gEfiAcpiTableProtocolGuid, NULL, (VOID **) &AcpiTableProtocol);\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  mSmmCommunicationAcpiTable.SwSmiNumber = (UINT32)SmmSwDispatchContext.SwSmiInputValue;\r
   BufferPtrAddress = AllocateAcpiNvsMemoryBelow4G (sizeof(EFI_PHYSICAL_ADDRESS));\r
   ASSERT (BufferPtrAddress != NULL);\r
   DEBUG ((EFI_D_INFO, "SmmCommunication BufferPtrAddress: 0x%016lx, BufferPtr: 0x%016lx\n", (EFI_PHYSICAL_ADDRESS)(UINTN)BufferPtrAddress, *BufferPtrAddress));\r
-  mSmmCommunicationAcpiTable.BufferPtrAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)BufferPtrAddress;\r
-  CopyMem (&mSmmCommunicationAcpiTable.UefiAcpiDataTable.Identifier, &gEfiSmmCommunicationProtocolGuid, sizeof(gEfiSmmCommunicationProtocolGuid));\r
-\r
-  Status = AcpiTableProtocol->InstallAcpiTable (\r
-                                AcpiTableProtocol,\r
-                                &mSmmCommunicationAcpiTable,\r
-                                sizeof(mSmmCommunicationAcpiTable),\r
-                                &TableKey\r
-                                );\r
-  ASSERT_EFI_ERROR (Status);\r
 \r
   //\r
   // Save context\r
   //\r
   mSmmCommunicationContext.SwSmiNumber = (UINT32)SmmSwDispatchContext.SwSmiInputValue;\r
-  mSmmCommunicationContext.BufferPtrAddress = mSmmCommunicationAcpiTable.BufferPtrAddress;\r
+  mSmmCommunicationContext.BufferPtrAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)BufferPtrAddress;\r
   SetCommunicationContext ();\r
 \r
   return Status;\r
index 9b03837cf3f1dad2f570a5050b9e9373fc25ec92..67799e9436cd0c5cbde3fe290450f54f6c976657 100644 (file)
@@ -1,12 +1,8 @@
 ## @file\r
-# PI SMM Communication SMM driver that installs the SMM Communication ACPI Table.\r
+# PI SMM Communication SMM driver that saves SMM communication context\r
+# for use by SMM Communication PEIM in the S3 boot mode.\r
 #\r
-# This SMM driver installs the SMM Communication ACPI Table defined in the UEFI spec\r
-# which provides a mechanism that can be used in the OS present environment by\r
-# non-firmware agents for inter-mode communication with SMM agents. It also saves\r
-# SMM communication context for use by SMM Communication PEIM in the S3 boot mode.\r
-#\r
-# Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
   SmmServicesTableLib\r
   BaseLib\r
   BaseMemoryLib\r
-  HobLib\r
   DebugLib\r
   SmmMemLib\r
-  PcdLib\r
-\r
-[Guids]\r
-  gEfiAcpi20TableGuid                ## SOMETIMES_CONSUMES  ## SystemTable\r
-  gEfiAcpi10TableGuid                ## SOMETIMES_CONSUMES  ## SystemTable\r
-  gEfiAcpiTableGuid                  ## SOMETIMES_CONSUMES  ## SystemTable\r
 \r
 [Ppis]\r
   gEfiPeiSmmCommunicationPpiGuid     ## UNDEFINED # SMM Configuration Table\r
 \r
 [Protocols]\r
   gEfiSmmSwDispatch2ProtocolGuid     ## CONSUMES\r
-  gEfiSmmCommunicationProtocolGuid   ## UNDEFINED # SMM Communication ACPI Table GUID\r
-  gEfiAcpiTableProtocolGuid          ## CONSUMES\r
-\r
-[Pcd]\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId             ## CONSUMES\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemTableId        ## CONSUMES\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemRevision       ## CONSUMES\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorId         ## CONSUMES\r
-  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorRevision   ## CONSUMES\r
 \r
 [Depex]\r
-  gEfiSmmSwDispatch2ProtocolGuid AND\r
-  gEfiAcpiTableProtocolGuid\r
+  gEfiSmmSwDispatch2ProtocolGuid\r
 \r
 [UserExtensions.TianoCore."ExtraFiles"]\r
   PiSmmCommunicationSmmExtra.uni\r
index 55df3905df085ac27e1ad89bf2b88195d19024c8..9995b4ec7d9d888a3d272edf951231e7df87a8d0 100644 (file)
@@ -1,12 +1,8 @@
 // /** @file\r
-// PI SMM Communication SMM driver that installs the SMM Communication ACPI Table.\r
+// PI SMM Communication SMM driver that saves SMM communication context\r
+// for use by SMM Communication PEIM in the S3 boot mode.\r
 //\r
-// This SMM driver installs the SMM Communication ACPI Table defined in the UEFI spec\r
-// which provides a mechanism that can be used in the OS present environment by\r
-// non-firmware agents for inter-mode communication with SMM agents. It also saves\r
-// SMM communication context for use by SMM Communication PEIM in the S3 boot mode.\r
-//\r
-// Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -18,6 +14,6 @@
 //\r
 // **/\r
 \r
-#string STR_MODULE_ABSTRACT             #language en-US "PI SMM Communication SMM driver that installs the SMM Communication ACPI Table"\r
+#string STR_MODULE_ABSTRACT             #language en-US "PI SMM Communication SMM driver that saves SMM communication context"\r
 \r
-#string STR_MODULE_DESCRIPTION          #language en-US "This SMM driver installs 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 also saves an SMM communication context for use by SMM Communication PEIM in the S3 boot mode."\r
+#string STR_MODULE_DESCRIPTION          #language en-US "PI SMM Communication SMM driver that saves SMM communication context for use by SMM Communication PEIM in the S3 boot mode."\r
index 34e7731fb5ae50f127a04b1eaf16d9673fcd299c..bb7ce62dc589d943f50809eb5996670afa46328a 100644 (file)
@@ -1,7 +1,7 @@
 // /** @file\r
 // PiSmmCommunicationSmm Localized Strings and Content\r
 //\r
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+// Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved.<BR>\r
 //\r
 // This program and the accompanying materials\r
 // are licensed and made available under the terms and conditions of the BSD License\r
@@ -15,4 +15,4 @@
 \r
 #string STR_PROPERTIES_MODULE_NAME\r
 #language en-US\r
-"SMM Communication ACPI Table DXE Driver"\r
+"SMM Communication SMM Driver"\r