X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FInclude%2FGuid%2FSmmVariableCommon.h;h=c527a598913965b29e95ebc34d5dd7c72c708de0;hb=9d510e61fceee7b92955ef9a3c20343752d8ce3f;hp=c7fde00ca2f318291cb9d31c61a4e3ac8f9e6f73;hpb=d00ed85e0ab212b988458b2fe98f20cb295637ad;p=mirror_edk2.git diff --git a/MdeModulePkg/Include/Guid/SmmVariableCommon.h b/MdeModulePkg/Include/Guid/SmmVariableCommon.h index c7fde00ca2..c527a59891 100644 --- a/MdeModulePkg/Include/Guid/SmmVariableCommon.h +++ b/MdeModulePkg/Include/Guid/SmmVariableCommon.h @@ -1,28 +1,24 @@ /** @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.
-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. +Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef _SMM_VARIABLE_COMMON_H_ #define _SMM_VARIABLE_COMMON_H_ +#include + #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: +// 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 { @@ -37,29 +33,39 @@ typedef struct { #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 +// 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 +// +// The payload for this function is SMM_VARIABLE_COMMUNICATE_LOCK_VARIABLE +// +#define SMM_VARIABLE_FUNCTION_LOCK_VARIABLE 8 + +#define SMM_VARIABLE_FUNCTION_VAR_CHECK_VARIABLE_PROPERTY_SET 9 + +#define SMM_VARIABLE_FUNCTION_VAR_CHECK_VARIABLE_PROPERTY_GET 10 + +#define SMM_VARIABLE_FUNCTION_GET_PAYLOAD_SIZE 11 /// /// Size of SMM communicate header, without including the payload. @@ -78,7 +84,7 @@ typedef struct { EFI_GUID Guid; UINTN DataSize; UINTN NameSize; - UINT32 Attributes; + UINT32 Attributes; CHAR16 Name[1]; } SMM_VARIABLE_COMMUNICATE_ACCESS_VARIABLE; @@ -87,7 +93,7 @@ typedef struct { /// typedef struct { EFI_GUID Guid; - UINTN NameSize; + UINTN NameSize; // Return name buffer size CHAR16 Name[1]; } SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME; @@ -98,7 +104,20 @@ typedef struct { UINT64 MaximumVariableStorageSize; UINT64 RemainingVariableStorageSize; UINT64 MaximumVariableSize; - UINT32 Attributes; + UINT32 Attributes; } SMM_VARIABLE_COMMUNICATE_QUERY_VARIABLE_INFO; -#endif // _SMM_VARIABLE_COMMON_H_ \ No newline at end of file +typedef SMM_VARIABLE_COMMUNICATE_GET_NEXT_VARIABLE_NAME SMM_VARIABLE_COMMUNICATE_LOCK_VARIABLE; + +typedef struct { + EFI_GUID Guid; + UINTN NameSize; + VAR_CHECK_VARIABLE_PROPERTY VariableProperty; + CHAR16 Name[1]; +} SMM_VARIABLE_COMMUNICATE_VAR_CHECK_VARIABLE_PROPERTY; + +typedef struct { + UINTN VariablePayloadSize; +} SMM_VARIABLE_COMMUNICATE_GET_PAYLOAD_SIZE; + +#endif // _SMM_VARIABLE_COMMON_H_