TianoCore EDK2 master
Loading...
Searching...
No Matches
VarCheckPolicyMmi.h
1
9#ifndef _VAR_CHECK_POLICY_MMI_COMMON_H_
10#define _VAR_CHECK_POLICY_MMI_COMMON_H_
11
12#define VAR_CHECK_POLICY_COMM_SIG SIGNATURE_32('V', 'C', 'P', 'C')
13#define VAR_CHECK_POLICY_COMM_REVISION 1
14
15#pragma pack(push, 1)
16
18 UINT32 Signature;
19 UINT32 Revision;
20 UINT32 Command;
21 EFI_STATUS Result;
23
25 BOOLEAN State;
27
29 UINT32 PageRequested;
30 UINT32 TotalSize;
31 UINT32 PageSize;
32 BOOLEAN HasMore;
34
35typedef union {
36 VARIABLE_POLICY_ENTRY VariablePolicy;
37 VARIABLE_LOCK_ON_VAR_STATE_POLICY LockOnVarStatePolicy;
39
41 EFI_GUID InputVendorGuid;
42 UINT32 InputVariableNameSize;
43 UINT32 OutputVariableNameSize;
45 CHAR16 InputVariableName[1];
47
48#pragma pack(pop)
49
50#define VAR_CHECK_POLICY_COMM_GET_INFO_PARAMS_END \
51 (OFFSET_OF(VAR_CHECK_POLICY_COMM_GET_INFO_PARAMS, InputVariableName))
52
53// Make sure that we will hold at least the headers.
54#define VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE MAX((OFFSET_OF(EFI_MM_COMMUNICATE_HEADER, Data) + sizeof (VAR_CHECK_POLICY_COMM_HEADER) + EFI_PAGES_TO_SIZE(1)), EFI_PAGES_TO_SIZE(4))
55#define VAR_CHECK_POLICY_MM_DUMP_BUFFER_SIZE (VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE - \
56 (OFFSET_OF(EFI_MM_COMMUNICATE_HEADER, Data) + \
57 sizeof(VAR_CHECK_POLICY_COMM_HEADER) + \
58 sizeof(VAR_CHECK_POLICY_COMM_DUMP_PARAMS)))
59
60#define VAR_CHECK_POLICY_MM_GET_INFO_BUFFER_SIZE (VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE - \
61 (OFFSET_OF(EFI_MM_COMMUNICATE_HEADER, Data) + \
62 sizeof(VAR_CHECK_POLICY_COMM_HEADER) + \
63 OFFSET_OF(VAR_CHECK_POLICY_COMM_GET_INFO_PARAMS, InputVariableName)))
64
66 VAR_CHECK_POLICY_MM_DUMP_BUFFER_SIZE < VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE,
67 "an integer underflow may have occurred calculating VAR_CHECK_POLICY_MM_DUMP_BUFFER_SIZE"
68 );
69
71 VAR_CHECK_POLICY_MM_GET_INFO_BUFFER_SIZE < VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE,
72 "an integer underflow may have occurred calculating VAR_CHECK_POLICY_MM_GET_INFO_BUFFER_SIZE"
73 );
74
75#define VAR_CHECK_POLICY_COMMAND_DISABLE 0x0001
76#define VAR_CHECK_POLICY_COMMAND_IS_ENABLED 0x0002
77#define VAR_CHECK_POLICY_COMMAND_REGISTER 0x0003
78#define VAR_CHECK_POLICY_COMMAND_DUMP 0x0004
79#define VAR_CHECK_POLICY_COMMAND_LOCK 0x0005
80#define VAR_CHECK_POLICY_COMMAND_GET_INFO 0x0006
81#define VAR_CHECK_POLICY_COMMAND_GET_LOCK_VAR_STATE_INFO 0x0007
82
83#endif // _VAR_CHECK_POLICY_MMI_COMMON_H_
#define STATIC_ASSERT
Definition: Base.h:808
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
Definition: Base.h:213