VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Include/Guid/SmmVariableCommon.h@ 58466

Last change on this file since 58466 was 58466, checked in by vboxsync, 9 years ago

EFI/Firmware: Merged in the svn:eol-style, svn:mime-type and trailing whitespace cleanup that was done after the initial UDK2014.SP1 import: svn merge /vendor/edk2/UDK2014.SP1 /vendor/edk2/current .

  • Property svn:eol-style set to native
File size: 3.6 KB
Line 
1/** @file
2 The file defined some common structures used for communicating between SMM variable module and SMM variable wrapper module.
3
4Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>
5This program and the accompanying materials are licensed and made available under
6the terms and conditions of the BSD License that accompanies this distribution.
7The full text of the license may be found at
8http://opensource.org/licenses/bsd-license.php.
9
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13**/
14
15#ifndef _SMM_VARIABLE_COMMON_H_
16#define _SMM_VARIABLE_COMMON_H_
17
18#define EFI_SMM_VARIABLE_WRITE_GUID \
19 { 0x93ba1826, 0xdffb, 0x45dd, { 0x82, 0xa7, 0xe7, 0xdc, 0xaa, 0x3b, 0xbd, 0xf3 } }
20
21extern EFI_GUID gSmmVariableWriteGuid;
22
23//
24// This structure is used for SMM variable. the collected statistics data is saved in SMRAM. It can be got from
25// SMI handler. The communication buffer should be:
26// EFI_SMM_COMMUNICATE_HEADER + SMM_VARIABLE_COMMUNICATE_HEADER + payload.
27//
28typedef struct {
29 UINTN Function;
30 EFI_STATUS ReturnStatus;
31 UINT8 Data[1];
32} SMM_VARIABLE_COMMUNICATE_HEADER;
33
34//
35// The payload for this function is SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE.
36//
37#define SMM_VARIABLE_FUNCTION_GET_VARIABLE 1
38//
39// The payload for this function is SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME.
40//
41#define SMM_VARIABLE_FUNCTION_GET_NEXT_VARIABLE_NAME 2
42//
43// The payload for this function is SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE.
44//
45#define SMM_VARIABLE_FUNCTION_SET_VARIABLE 3
46//
47// The payload for this function is SMM_VARIABLE_COMMUNICATE_QUERY_VARIABLE_INFO.
48//
49#define SMM_VARIABLE_FUNCTION_QUERY_VARIABLE_INFO 4
50//
51// It is a notify event, no extra payload for this function.
52//
53#define SMM_VARIABLE_FUNCTION_READY_TO_BOOT 5
54//
55// It is a notify event, no extra payload for this function.
56//
57#define SMM_VARIABLE_FUNCTION_EXIT_BOOT_SERVICE 6
58//
59// The payload for this function is VARIABLE_INFO_ENTRY. The GUID in EFI_SMM_COMMUNICATE_HEADER
60// is gEfiSmmVariableProtocolGuid.
61//
62#define SMM_VARIABLE_FUNCTION_GET_STATISTICS 7
63//
64// The payload for this function is SMM_VARIABLE_COMMUNICATE_LOCK_VARIABLE
65//
66#define SMM_VARIABLE_FUNCTION_LOCK_VARIABLE 8
67
68///
69/// Size of SMM communicate header, without including the payload.
70///
71#define SMM_COMMUNICATE_HEADER_SIZE (OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data))
72
73///
74/// Size of SMM variable communicate header, without including the payload.
75///
76#define SMM_VARIABLE_COMMUNICATE_HEADER_SIZE (OFFSET_OF (SMM_VARIABLE_COMMUNICATE_HEADER, Data))
77
78///
79/// This structure is used to communicate with SMI handler by SetVariable and GetVariable.
80///
81typedef struct {
82 EFI_GUID Guid;
83 UINTN DataSize;
84 UINTN NameSize;
85 UINT32 Attributes;
86 CHAR16 Name[1];
87} SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE;
88
89///
90/// This structure is used to communicate with SMI handler by GetNextVariableName.
91///
92typedef struct {
93 EFI_GUID Guid;
94 UINTN NameSize; // Return name buffer size
95 CHAR16 Name[1];
96} SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME;
97
98///
99/// This structure is used to communicate with SMI handler by QueryVariableInfo.
100///
101typedef struct {
102 UINT64 MaximumVariableStorageSize;
103 UINT64 RemainingVariableStorageSize;
104 UINT64 MaximumVariableSize;
105 UINT32 Attributes;
106} SMM_VARIABLE_COMMUNICATE_QUERY_VARIABLE_INFO;
107
108typedef SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME SMM_VARIABLE_COMMUNICATE_LOCK_VARIABLE;
109
110#endif // _SMM_VARIABLE_COMMON_H_
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette