]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: Add EDKII_PI_SMM_COMMUNICATION_REGION_TABLE definition.
authorJiewen Yao <jiewen.yao@intel.com>
Fri, 22 Apr 2016 06:59:49 +0000 (14:59 +0800)
committerJiewen Yao <jiewen.yao@intel.com>
Fri, 29 Apr 2016 04:49:08 +0000 (12:49 +0800)
This configuration table is used to describe platform pre-allocated memory
for SMM communication buffer. If DXE driver wants to communicate with SMM
agent, it can use this memory as SMM communication buffer instead of allocate
new memory region.

This is designed to meet Microsoft WSMT table definition on FIXED_COMM_BUFFERS
requirement.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
MdeModulePkg/Include/Guid/PiSmmCommunicationRegionTable.h [new file with mode: 0644]
MdeModulePkg/MdeModulePkg.dec

diff --git a/MdeModulePkg/Include/Guid/PiSmmCommunicationRegionTable.h b/MdeModulePkg/Include/Guid/PiSmmCommunicationRegionTable.h
new file mode 100644 (file)
index 0000000..e3021ef
--- /dev/null
@@ -0,0 +1,63 @@
+/** @file\r
+\r
+Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under \r
+the terms and conditions of the BSD License that accompanies this distribution.  \r
+The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php.                                          \r
+    \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef _PI_SMM_COMMUNICATION_REGION_TABLE_H_\r
+#define _PI_SMM_COMMUNICATION_REGION_TABLE_H_\r
+\r
+#define EDKII_PI_SMM_COMMUNICATION_REGION_TABLE_GUID {\\r
+  0x4e28ca50, 0xd582, 0x44ac, {0xa1, 0x1f, 0xe3, 0xd5, 0x65, 0x26, 0xdb, 0x34} \\r
+}\r
+\r
+//\r
+// This table to declare the generic SMM communication buffer location.\r
+// If this table is present, it means the SMM communication buffer is restricted to\r
+// EfiReservedMemoryType, EfiACPIMemoryNVS, or EfiRuntimeServicesData.\r
+//\r
+// This table is installed to UEFI configuration table by generic driver\r
+// or platform driver, at early DXE phase.\r
+// \r
+// The EFI_MEMORY_DESCRIPTOR entry must contain at least one entry.\r
+// The entries must be normal memory region in EfiReservedMemoryType, EfiACPIMemoryNVS,\r
+// or EfiRuntimeServicesData.\r
+// If the Entry.Type is EfiConventionalMemory, it means this entry is free to use.\r
+// If the Entry.Type is other, it means this entry is occupied.\r
+//\r
+// Any non-SMM component may put communication data there, then use \r
+// UEFI defined SMM Communication ACPI Table, or PI defined EFI_SMM_COMMUNICATION_PROTOCOL\r
+// to communicate with SMI handler. The process is:\r
+// 1) Find an entry whose type is EfiConventional.\r
+// 2) Change type to be EfiReservedMemoryType before use.\r
+// 3) Use it.\r
+// 4) Restore type be EfiConventional.\r
+//    The step 2) must be performed as an atomic transaction, if there might be conflict during runtime.\r
+//    For example, on IA-32/x64 platforms, this can be done using the CMPXCHG CPU instruction.\r
+//    If there is guarantee on no conflict during boot time, these steps can be skipped.\r
+//    For example, DXE, UEFI driver and UEFI application runs in sequence.\r
+//\r
+// For example, FPDT driver can use this communication buffer to get SMM\r
+// performance data in SMM. Profile driver can use this communication buffer\r
+// to get SMM profile data in SMM.\r
+//\r
+typedef struct {\r
+  UINT32                Version;\r
+  UINT32                NumberOfEntries;\r
+  UINT32                DescriptorSize;\r
+  UINT32                Reserved;\r
+//EFI_MEMORY_DESCRIPTOR Entry[1];\r
+} EDKII_PI_SMM_COMMUNICATION_REGION_TABLE;\r
+\r
+#define EDKII_PI_SMM_COMMUNICATION_REGION_TABLE_VERSION  0x00000001\r
+\r
+extern EFI_GUID gEdkiiPiSmmCommunicationRegionTableGuid;\r
+\r
+#endif\r
index 935554c5adc987431564c4a7bbf95324d7f553e4..a1338240d139e2e7888f3e258069115e2e9e7127 100644 (file)
   ## Include/Guid/RamDiskHii.h\r
   gRamDiskFormSetGuid            = { 0x2a46715f, 0x3581, 0x4a55, { 0x8e, 0x73, 0x2b, 0x76, 0x9a, 0xaa, 0x30, 0xc5 }}\r
 \r
   ## Include/Guid/RamDiskHii.h\r
   gRamDiskFormSetGuid            = { 0x2a46715f, 0x3581, 0x4a55, { 0x8e, 0x73, 0x2b, 0x76, 0x9a, 0xaa, 0x30, 0xc5 }}\r
 \r
+  ## Include/Guid/PiSmmCommunicationRegionTable.h\r
+  gEdkiiPiSmmCommunicationRegionTableGuid = { 0x4e28ca50, 0xd582, 0x44ac, {0xa1, 0x1f, 0xe3, 0xd5, 0x65, 0x26, 0xdb, 0x34}}\r
 \r
 [Ppis]\r
   ## Include/Ppi/AtaController.h\r
 \r
 [Ppis]\r
   ## Include/Ppi/AtaController.h\r