MdeModulePkg[all]  0.98
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
VariablePolicy.h File Reference

Data Structures

struct  VARIABLE_POLICY_ENTRY
 
struct  VARIABLE_LOCK_ON_VAR_STATE_POLICY
 
struct  _EDKII_VARIABLE_POLICY_PROTOCOL
 

Macros

#define EDKII_VARIABLE_POLICY_PROTOCOL_REVISION   0x0000000000010000
 
#define EDKII_VARIABLE_POLICY_PROTOCOL_GUID
 
#define VARIABLE_POLICY_ENTRY_REVISION   0x00010000
 
#define VARIABLE_POLICY_NO_MIN_SIZE   0
 
#define VARIABLE_POLICY_NO_MAX_SIZE   MAX_UINT32
 
#define VARIABLE_POLICY_NO_MUST_ATTR   0
 
#define VARIABLE_POLICY_NO_CANT_ATTR   0
 
#define VARIABLE_POLICY_TYPE_NO_LOCK   0
 
#define VARIABLE_POLICY_TYPE_LOCK_NOW   1
 
#define VARIABLE_POLICY_TYPE_LOCK_ON_CREATE   2
 
#define VARIABLE_POLICY_TYPE_LOCK_ON_VAR_STATE   3
 

Typedefs

typedef EFI_STATUS(EFIAPI * DISABLE_VARIABLE_POLICY )(VOID)
 
typedef EFI_STATUS(EFIAPI * IS_VARIABLE_POLICY_ENABLED )(OUT BOOLEAN *State)
 
typedef EFI_STATUS(EFIAPI * REGISTER_VARIABLE_POLICY )(IN CONST VARIABLE_POLICY_ENTRY *PolicyEntry)
 
typedef EFI_STATUS(EFIAPI * DUMP_VARIABLE_POLICY )(IN OUT UINT8 *Policy, IN OUT UINT32 *Size)
 
typedef EFI_STATUS(EFIAPI * LOCK_VARIABLE_POLICY )(VOID)
 
typedef
_EDKII_VARIABLE_POLICY_PROTOCOL 
EDKII_VARIABLE_POLICY_PROTOCOL
 

Variables

EFI_GUID gEdkiiVariablePolicyProtocolGuid
 

Macro Definition Documentation

#define EDKII_VARIABLE_POLICY_PROTOCOL_GUID
Value:
{ \
0x81D1675C, 0x86F6, 0x48DF, { 0xBD, 0x95, 0x9A, 0x6E, 0x4F, 0x09, 0x25, 0xC3 } \
}
#define EDKII_VARIABLE_POLICY_PROTOCOL_REVISION   0x0000000000010000
#define VARIABLE_POLICY_ENTRY_REVISION   0x00010000
#define VARIABLE_POLICY_NO_CANT_ATTR   0
#define VARIABLE_POLICY_NO_MAX_SIZE   MAX_UINT32
#define VARIABLE_POLICY_NO_MIN_SIZE   0
#define VARIABLE_POLICY_NO_MUST_ATTR   0
#define VARIABLE_POLICY_TYPE_LOCK_NOW   1
#define VARIABLE_POLICY_TYPE_LOCK_ON_CREATE   2
#define VARIABLE_POLICY_TYPE_LOCK_ON_VAR_STATE   3
#define VARIABLE_POLICY_TYPE_NO_LOCK   0

Typedef Documentation

typedef EFI_STATUS(EFIAPI * DISABLE_VARIABLE_POLICY)(VOID)

This API function disables the variable policy enforcement. If it's already been called once, will return EFI_ALREADY_STARTED.

Return values
EFI_SUCCESS
EFI_ALREADY_STARTEDHas already been called once this boot.
EFI_WRITE_PROTECTEDInterface has been locked until reboot.
EFI_WRITE_PROTECTEDInterface option is disabled by platform PCD.
typedef EFI_STATUS(EFIAPI * DUMP_VARIABLE_POLICY)(IN OUT UINT8 *Policy, IN OUT UINT32 *Size)

This API function will dump the entire contents of the variable policy table.

Similar to GetVariable, the first call can be made with a 0 size and it will return the size of the buffer required to hold the entire table.

Parameters
[out]PolicyPointer to the policy buffer. Can be NULL if Size is 0.
[in,out]SizeOn input, the size of the output buffer. On output, the size of the data returned.
Return values
EFI_SUCCESSPolicy data is in the output buffer and Size has been updated.
EFI_INVALID_PARAMETERSize is NULL, or Size is non-zero and Policy is NULL.
EFI_BUFFER_TOO_SMALLSize is insufficient to hold policy. Size updated with required size.
typedef EFI_STATUS(EFIAPI * IS_VARIABLE_POLICY_ENABLED)(OUT BOOLEAN *State)

This API function returns whether or not the policy engine is currently being enforced.

Parameters
[out]StatePointer to a return value for whether the policy enforcement is currently enabled.
Return values
EFI_SUCCESS
OthersAn error has prevented this command from completing.
typedef EFI_STATUS(EFIAPI * LOCK_VARIABLE_POLICY)(VOID)

This API function locks the interface so that no more policy updates can be performed or changes made to the enforcement until the next boot.

Return values
EFI_SUCCESS
OthersAn error has prevented this command from completing.
typedef EFI_STATUS(EFIAPI * REGISTER_VARIABLE_POLICY)(IN CONST VARIABLE_POLICY_ENTRY *PolicyEntry)

This API function validates and registers a new policy with the policy enforcement engine.

Parameters
[in]NewPolicyPointer to the incoming policy structure.
Return values
EFI_SUCCESS
EFI_INVALID_PARAMETERNewPolicy is NULL or is internally inconsistent.
EFI_ALREADY_STARTEDAn identical matching policy already exists.
EFI_WRITE_PROTECTEDThe interface has been locked until the next reboot.
EFI_ABORTEDA calculation error has prevented this function from completing.
EFI_OUT_OF_RESOURCESCannot grow the table to hold any more policies.

Variable Documentation

EFI_GUID gEdkiiVariablePolicyProtocolGuid