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>
/** @file\r
PiSmmCommunication SMM Driver.\r
\r
/** @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
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
#include <Library/SmmServicesTableLib.h>\r
#include <Library/BaseLib.h>\r
#include <Library/BaseMemoryLib.h>\r
#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/DebugLib.h>\r
#include <Library/SmmMemLib.h>\r
-#include <Library/PcdLib.h>\r
#include <Protocol/SmmSwDispatch2.h>\r
#include <Protocol/SmmSwDispatch2.h>\r
-#include <Protocol/SmmReadyToLock.h>\r
#include <Protocol/SmmCommunication.h>\r
#include <Protocol/SmmCommunication.h>\r
-#include <Protocol/AcpiTable.h>\r
#include <Ppi/SmmCommunication.h>\r
#include <Ppi/SmmCommunication.h>\r
-#include <Guid/Acpi.h>\r
\r
#include "PiSmmCommunicationPrivate.h"\r
\r
\r
#include "PiSmmCommunicationPrivate.h"\r
\r
SMM_COMMUNICATION_SIGNATURE\r
};\r
\r
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
/**\r
Set SMM communication context.\r
**/\r
EFI_SMM_SW_DISPATCH2_PROTOCOL *SmmSwDispatch2;\r
EFI_SMM_SW_REGISTER_CONTEXT SmmSwDispatchContext;\r
EFI_HANDLE DispatchHandle;\r
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
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
//\r
// Register software SMI handler\r
//\r
\r
DEBUG ((EFI_D_INFO, "SmmCommunication SwSmi: %x\n", (UINTN)SmmSwDispatchContext.SwSmiInputValue));\r
\r
\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
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
\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
SetCommunicationContext ();\r
\r
return Status;\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
-# 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
#\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
SmmServicesTableLib\r
BaseLib\r
BaseMemoryLib\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
\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
- gEfiSmmSwDispatch2ProtocolGuid AND\r
- gEfiAcpiTableProtocolGuid\r
+ gEfiSmmSwDispatch2ProtocolGuid\r
\r
[UserExtensions.TianoCore."ExtraFiles"]\r
PiSmmCommunicationSmmExtra.uni\r
\r
[UserExtensions.TianoCore."ExtraFiles"]\r
PiSmmCommunicationSmmExtra.uni\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
-// 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
//\r
// This program and the accompanying materials\r
// are licensed and made available under the terms and conditions of the BSD License\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
-#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
// /** @file\r
// PiSmmCommunicationSmm Localized Strings and Content\r
//\r
// /** @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
//\r
// This program and the accompanying materials\r
// are licensed and made available under the terms and conditions of the BSD License\r
\r
#string STR_PROPERTIES_MODULE_NAME\r
#language en-US\r
\r
#string STR_PROPERTIES_MODULE_NAME\r
#language en-US\r
-"SMM Communication ACPI Table DXE Driver"\r
+"SMM Communication SMM Driver"\r