summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Include
diff options
context:
space:
mode:
authorgdong1 <gdong1@6f19259b-4bc3-4df7-8a09-765794883524>2011-02-28 07:31:45 +0000
committergdong1 <gdong1@6f19259b-4bc3-4df7-8a09-765794883524>2011-02-28 07:31:45 +0000
commitd00ed85e0ab212b988458b2fe98f20cb295637ad (patch)
tree748ca27a963b34e2e26c946fcca3b2601ff9e643 /MdeModulePkg/Include
parent60d8f1f856b4aeaece21329c5f5a3c40e4c6499f (diff)
downloadedk2-platforms-d00ed85e0ab212b988458b2fe98f20cb295637ad.tar.xz
Puts SMM variable common definitions in SmmVariableCommon.h.
Fixed a bug that SMM_VARIABLE_COMMUNICATE_VARIABLE_INFO_ENTRY was misused as SMM_VARIABLE_COMMUNICATE_QUERY_VARIABLE_INFO. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11339 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Include')
-rw-r--r--MdeModulePkg/Include/Guid/SmmVariableCommon.h104
-rw-r--r--MdeModulePkg/Include/Guid/VariableFormat.h88
2 files changed, 105 insertions, 87 deletions
diff --git a/MdeModulePkg/Include/Guid/SmmVariableCommon.h b/MdeModulePkg/Include/Guid/SmmVariableCommon.h
new file mode 100644
index 0000000000..c7fde00ca2
--- /dev/null
+++ b/MdeModulePkg/Include/Guid/SmmVariableCommon.h
@@ -0,0 +1,104 @@
+/** @file
+ The file defined some common structures used for communicating between SMM variable module and SMM variable wrapper module.
+
+Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _SMM_VARIABLE_COMMON_H_
+#define _SMM_VARIABLE_COMMON_H_
+
+#define EFI_SMM_VARIABLE_WRITE_GUID \
+ { 0x93ba1826, 0xdffb, 0x45dd, { 0x82, 0xa7, 0xe7, 0xdc, 0xaa, 0x3b, 0xbd, 0xf3 } }
+
+extern EFI_GUID gSmmVariableWriteGuid;
+
+//
+// This structure is used for SMM variable. the collected statistics data is saved in SMRAM. It can be got from
+// SMI handler. The communication buffer should be:
+// EFI_SMM_COMMUNICATE_HEADER + SMM_VARIABLE_COMMUNICATE_HEADER + payload.
+//
+typedef struct {
+ UINTN Function;
+ EFI_STATUS ReturnStatus;
+ UINT8 Data[1];
+} SMM_VARIABLE_COMMUNICATE_HEADER;
+
+//
+// The payload for this function is SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE.
+//
+#define SMM_VARIABLE_FUNCTION_GET_VARIABLE 1
+//
+// The payload for this function is SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME.
+//
+#define SMM_VARIABLE_FUNCTION_GET_NEXT_VARIABLE_NAME 2
+//
+// The payload for this function is SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE.
+//
+#define SMM_VARIABLE_FUNCTION_SET_VARIABLE 3
+//
+// The payload for this function is SMM_VARIABLE_COMMUNICATE_QUERY_VARIABLE_INFO.
+//
+#define SMM_VARIABLE_FUNCTION_QUERY_VARIABLE_INFO 4
+//
+// It is a notify event, no extra payload for this function.
+//
+#define SMM_VARIABLE_FUNCTION_READY_TO_BOOT 5
+//
+// It is a notify event, no extra payload for this function.
+//
+#define SMM_VARIABLE_FUNCTION_EXIT_BOOT_SERVICE 6
+//
+// The payload for this function is VARIABLE_INFO_ENTRY. The GUID in EFI_SMM_COMMUNICATE_HEADER
+// is gEfiSmmVariableProtocolGuid.
+//
+#define SMM_VARIABLE_FUNCTION_GET_STATISTICS 7
+
+///
+/// Size of SMM communicate header, without including the payload.
+///
+#define SMM_COMMUNICATE_HEADER_SIZE (OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data))
+
+///
+/// Size of SMM variable communicate header, without including the payload.
+///
+#define SMM_VARIABLE_COMMUNICATE_HEADER_SIZE (OFFSET_OF (SMM_VARIABLE_COMMUNICATE_HEADER, Data))
+
+///
+/// This structure is used to communicate with SMI handler by SetVariable and GetVariable.
+///
+typedef struct {
+ EFI_GUID Guid;
+ UINTN DataSize;
+ UINTN NameSize;
+ UINT32 Attributes;
+ CHAR16 Name[1];
+} SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE;
+
+///
+/// This structure is used to communicate with SMI handler by GetNextVariableName.
+///
+typedef struct {
+ EFI_GUID Guid;
+ UINTN NameSize;
+ CHAR16 Name[1];
+} SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME;
+
+///
+/// This structure is used to communicate with SMI handler by QueryVariableInfo.
+///
+typedef struct {
+ UINT64 MaximumVariableStorageSize;
+ UINT64 RemainingVariableStorageSize;
+ UINT64 MaximumVariableSize;
+ UINT32 Attributes;
+} SMM_VARIABLE_COMMUNICATE_QUERY_VARIABLE_INFO;
+
+#endif // _SMM_VARIABLE_COMMON_H_ \ No newline at end of file
diff --git a/MdeModulePkg/Include/Guid/VariableFormat.h b/MdeModulePkg/Include/Guid/VariableFormat.h
index 0db3a22f34..a7902f1682 100644
--- a/MdeModulePkg/Include/Guid/VariableFormat.h
+++ b/MdeModulePkg/Include/Guid/VariableFormat.h
@@ -2,7 +2,7 @@
The variable data structures are related to EDK II-specific implementation of UEFI variables.
VariableFormat.h defines variable data headers and variable storage region headers.
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -157,90 +157,4 @@ struct _VARIABLE_INFO_ENTRY {
BOOLEAN Volatile; ///< TRUE if volatile, FALSE if non-volatile.
};
-//
-// This structure is used for SMM variable. the collected statistics data is saved in SMRAM. It can be got from
-// SMI handler. The communication buffer should be:
-// EFI_SMM_COMMUNICATE_HEADER + SMM_VARIABLE_COMMUNICATE_HEADER + payload.
-//
-typedef struct {
- UINTN Function;
- EFI_STATUS ReturnStatus;
- UINT8 Data[1];
-} SMM_VARIABLE_COMMUNICATE_HEADER;
-
-//
-// The payload for this function is SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE.
-//
-#define SMM_VARIABLE_FUNCTION_GET_VARIABLE 1
-//
-// The payload for this function is SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME.
-//
-#define SMM_VARIABLE_FUNCTION_GET_NEXT_VARIABLE_NAME 2
-//
-// The payload for this function is SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE.
-//
-#define SMM_VARIABLE_FUNCTION_SET_VARIABLE 3
-//
-// The payload for this function is SMM_VARIABLE_COMMUNICATE_QUERY_VARIABLE_INFO.
-//
-#define SMM_VARIABLE_FUNCTION_QUERY_VARIABLE_INFO 4
-//
-// It is a notify event, no extra payload for this function.
-//
-#define SMM_VARIABLE_FUNCTION_READY_TO_BOOT 5
-//
-// It is a notify event, no extra payload for this function.
-//
-#define SMM_VARIABLE_FUNCTION_EXIT_BOOT_SERVICE 6
-//
-// The payload for this function is VARIABLE_INFO_ENTRY. The GUID in EFI_SMM_COMMUNICATE_HEADER
-// is gEfiSmmVariableProtocolGuid.
-//
-#define SMM_VARIABLE_FUNCTION_GET_STATISTICS 7
-
-///
-/// Size of SMM communicate header, without including the payload.
-///
-#define SMM_COMMUNICATE_HEADER_SIZE (OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data))
-
-///
-/// Size of SMM variable communicate header, without including the payload.
-///
-#define SMM_VARIABLE_COMMUNICATE_HEADER_SIZE (OFFSET_OF (SMM_VARIABLE_COMMUNICATE_HEADER, Data))
-
-///
-/// This structure is used to communicate with SMI handler by SetVariable and GetVariable.
-///
-typedef struct {
- EFI_GUID Guid;
- UINTN DataSize;
- UINTN NameSize;
- UINT32 Attributes;
- CHAR16 Name[1];
-} SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE;
-
-///
-/// This structure is used to communicate with SMI handler by GetNextVariableName.
-///
-typedef struct {
- EFI_GUID Guid;
- UINTN NameSize;
- CHAR16 Name[1];
-} SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME;
-
-///
-/// This structure is used to communicate with SMI handler by QueryVariableInfo.
-///
-typedef struct {
- UINT64 MaximumVariableStorageSize;
- UINT64 RemainingVariableStorageSize;
- UINT64 MaximumVariableSize;
- UINT32 Attributes;
-} SMM_VARIABLE_COMMUNICATE_QUERY_VARIABLE_INFO;
-
-///
-/// This structure is used to communicate with SMI handler to get variable statistics information.
-///
-typedef VARIABLE_INFO_ENTRY SMM_VARIABLE_COMMUNICATE_VARIABLE_INFO_ENTRY;
-
#endif // _EFI_VARIABLE_H_