IntelFrameworkPkg/Include/Protocol/FrameworkFormCallback.h File Reference


Data Structures

struct  EFI_IFR_DATA_ENTRY
struct  EFI_IFR_DATA_ARRAY
union  EFI_HII_CALLBACK_PACKET
struct  EFI_IFR_NV_DATA
struct  _EFI_FORM_CALLBACK_PROTOCOL

Defines

#define EFI_FORM_CALLBACK_PROTOCOL_GUID
#define RESET_REQUIRED   1
#define EXIT_REQUIRED   2
#define SAVE_REQUIRED   4
#define NV_CHANGED   8
#define NV_NOT_CHANGED   16

Typedefs

typedef struct
_EFI_FORM_CALLBACK_PROTOCOL 
EFI_FORM_CALLBACK_PROTOCOL
typedef EFI_STATUS(EFIAPI * EFI_NV_READ )(IN EFI_FORM_CALLBACK_PROTOCOL *This, IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, OUT UINT32 *Attributes, IN OUT UINTN *DataSize, OUT VOID *Buffer)
typedef EFI_STATUS(EFIAPI * EFI_NV_WRITE )(IN EFI_FORM_CALLBACK_PROTOCOL *This, IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, IN UINT32 Attributes, IN UINTN DataSize, IN VOID *Buffer, OUT BOOLEAN *ResetRequired)
typedef EFI_STATUS(EFIAPI * EFI_FORM_CALLBACK )(IN EFI_FORM_CALLBACK_PROTOCOL *This, IN UINT16 KeyValue, IN EFI_IFR_DATA_ARRAY *Data, OUT EFI_HII_CALLBACK_PACKET **Packet)

Variables

EFI_GUID gEfiFormCallbackProtocolGuid

Detailed Description

The EFI_FORM_CALLBACK_PROTOCOL is the defined interface for access to custom NV storage devices and for communication of user selections in a more interactive environment. This protocol should be published by hardware specific drivers that want to export access to custom hardware storage or publish IFR that need to call back the original driver.

Copyright (c) 2006 - 2010, 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.

Revision Reference:
This protocol is defined in HII spec 0.92.

Define Documentation

#define EFI_FORM_CALLBACK_PROTOCOL_GUID

Value:

{ \
    0xf3e4543d, 0xcf35, 0x6cef, {0x35, 0xc4, 0x4f, 0xe6, 0x34, 0x4d, 0xfc, 0x54 } \
  }

#define EXIT_REQUIRED   2

If this flag is set, the browser will exit after processing callback results.

#define NV_CHANGED   8

If this flag is set, the browser will turn the NV flag on after processing callback results.

#define NV_NOT_CHANGED   16

If this flag is set, the browser will turn the NV flag off after processing callback results.

#define RESET_REQUIRED   1

Inconsistent with specification here: RESET_REQUIRED, EXIT_REQUIRED, SAVE_REQUIRED, NV_CHANGED and NV_NOT_CHANGED are not defined in HII specification. These Flags of EFI_IFR_DATA_ENTRY should be defined to describe the standard behavior of the browser after the callback.

If this flag is set, the browser will exit and reset after processing callback results.

#define SAVE_REQUIRED   4

If this flag is set, the browser will save the NV data after processing callback results.


Typedef Documentation

typedef EFI_STATUS(EFIAPI * EFI_FORM_CALLBACK)(IN EFI_FORM_CALLBACK_PROTOCOL *This, IN UINT16 KeyValue, IN EFI_IFR_DATA_ARRAY *Data, OUT EFI_HII_CALLBACK_PACKET **Packet)

This function is called to provide results data to the driver.

Parameters:
This A pointer to the EFI_FORM_CALLBACK_PROTOCOL instance.
KeyValue A unique value which is sent to the original exporting driver so that it can identify the type of data to expect. The format of the data tends to vary based on the opcode that generated the callback.
Data A pointer to the data being sent to the original exporting driver.
Packet A pointer to a packet of information that a driver passes back to the browser.
Returns:
Status Code

typedef EFI_STATUS(EFIAPI * EFI_NV_READ)(IN EFI_FORM_CALLBACK_PROTOCOL *This, IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, OUT UINT32 *Attributes, IN OUT UINTN *DataSize, OUT VOID *Buffer)

Returns the value of a variable.

Parameters:
This A pointer to the EFI_FORM_CALLBACK_PROTOCOL instance.
VariableName A NULL-terminated Unicode string that is the name of the vendor's variable.
VendorGuid A unique identifier for the vendor.
Attributes If not NULL, a pointer to the memory location to return the attribute's bit-mask for the variable.
DataSize The size in bytes of the Buffer. A size of zero causes the variable to be deleted.
Buffer The buffer to return the contents of the variable.
Return values:
EFI_SUCCESS The function completed successfully.
EFI_NOT_FOUND The variable was not found.
EFI_BUFFER_TOO_SMALL The DataSize is too small for the result. DataSize has been updated with the size needed to complete the request.
EFI_INVALID_PARAMETER One of the parameters has an invalid value.
EFI_DEVICE_ERROR The variable could not be saved due to a hardware failure.

typedef EFI_STATUS(EFIAPI * EFI_NV_WRITE)(IN EFI_FORM_CALLBACK_PROTOCOL *This, IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, IN UINT32 Attributes, IN UINTN DataSize, IN VOID *Buffer, OUT BOOLEAN *ResetRequired)

Sets the value of a variable.

Parameters:
This A pointer to the EFI_FORM_CALLBACK_PROTOCOL instance.
VariableName A NULL-terminated Unicode string that is the name of the vendor's variable. Each VariableName is unique for each VendorGuid.
VendorGuid A unique identifier for the vendor.
Attributes Attributes bit-mask to set for the variable. Inconsistent with specification here: Attributes data type has been changed from UINT32 * to UINT32, because the input paramter is not necessary to use a pointer date type.
DataSize The size in bytes of the Buffer. A size of zero causes the variable to be deleted.
Buffer The buffer containing the contents of the variable.
ResetRequired Returns a value from the driver that abstracts this information and will enable a system to know if a system reset is required to achieve the configuration changes being enabled through this function.
Return values:
EFI_SUCCESS The firmware has successfully stored the variable and its data as defined by the Attributes.
EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.
EFI_INVALID_PARAMETER An invalid combination of Attributes bits was supplied, or the DataSize exceeds the maximum allowed.
EFI_DEVICE_ERROR The variable could not be saved due to a hardware failure.


Variable Documentation


Generated on Wed Sep 2 13:08:33 2015 for IntelFrameworkPkg[ALL] by  doxygen 1.5.7.1