4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The header file of HII Config Access protocol implementation of SecureBoot
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync configuration module.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCopyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncThis program and the accompanying materials
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncare licensed and made available under the terms and conditions of the BSD License
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncwhich accompanies this distribution. The full text of the license may be found at
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncTHE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncWITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// Tool generated IFR binary data and String package data
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// Shared IFR form update data
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// SHA-1 digest size in bytes.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// SHA-256 digest size in bytes
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// Set max digest size as SHA256 Output (32 bytes) by far
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// Support hash types
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#define SECUREBOOT_MENU_OPTION_SIGNATURE SIGNATURE_32 ('S', 'b', 'M', 'u')
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#define SECUREBOOT_MENU_ENTRY_SIGNATURE SIGNATURE_32 ('S', 'b', 'M', 'r')
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef struct {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef struct {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef struct {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef struct {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef struct {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef struct {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef struct {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// We define another format of 5th directory entry: security directory
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef struct {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef enum{
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/// HII specific Vendor Device Path definition.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef struct {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef struct {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncextern SECUREBOOT_CONFIG_PRIVATE_DATA mSecureBootConfigPrivateDateTemplate;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#define SECUREBOOT_CONFIG_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('S', 'E', 'C', 'B')
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#define SECUREBOOT_CONFIG_PRIVATE_FROM_THIS(a) CR (a, SECUREBOOT_CONFIG_PRIVATE_DATA, ConfigAccess, SECUREBOOT_CONFIG_PRIVATE_DATA_SIGNATURE)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// Cryptograhpic Key Information
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync UINT32 CipherBlockSize; // Output Cipher Block Size in Bytes
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync UINT32 CipherMode; // Cipher Mode for Symmetric Algorithm
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Retrieves the size, in bytes, of the context buffer required for hash operations.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The size, in bytes, of the context buffer required for hash operations.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Initializes user-supplied memory pointed by HashContext as hash context for
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync subsequent use.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If HashContext is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in, out] HashContext Pointer to Context being initialized.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval TRUE HASH context initialization succeeded.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval FALSE HASH context initialization failed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Performs digest on a data buffer of the specified length. This function can
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync be called multiple times to compute the digest of long or discontinuous data streams.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If HashContext is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in, out] HashContext Pointer to the MD5 context.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Data Pointer to the buffer containing the data to be hashed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] DataLength Length of Data buffer in bytes.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval TRUE HASH data digest succeeded.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval FALSE Invalid HASH context. After HashFinal function has been called, the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync HASH context cannot be reused.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Completes hash computation and retrieves the digest value into the specified
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync memory. After this function has been called, the context cannot be used again.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If HashContext is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If HashValue is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in, out] HashContext Pointer to the MD5 context
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] HashValue Pointer to a buffer that receives the HASH digest
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync value (16 bytes).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval TRUE HASH digest computation succeeded.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval FALSE HASH digest computation failed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// Hash Algorithm Table
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef struct {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync UINT8 *OidValue; ///< Hash Algorithm OID ASN.1 Value
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync HASH_GET_CONTEXT_SIZE GetContextSize; ///< Pointer to Hash GetContentSize function
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync HASH_INIT HashInit; ///< Pointer to Hash Init function
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync HASH_UPDATE HashUpdate; ///< Pointer to Hash Update function
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync HASH_FINAL HashFinal; ///< Pointer to Hash Final function
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef struct {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function publish the SecureBoot configuration Form.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in, out] PrivateData Points to SecureBoot configuration private data.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_SUCCESS HII Form is installed successfully.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_OUT_OF_RESOURCES Not enough resource for HII Form installation.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval Others Other errors as indicated.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function removes SecureBoot configuration Form.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in, out] PrivateData Points to SecureBoot configuration private data.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function allows a caller to extract the current configuration for one
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync or more named elements from the target driver.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Request A null-terminated Unicode string in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <ConfigRequest> format.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Progress On return, points to a character in the Request
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync string. Points to the string's null terminator if
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync request was successful. Points to the most recent
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync '&' before the first failing name/value pair (or
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the beginning of the string if the failure is in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the first name/value pair) if the request was not
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync successful.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Results A null-terminated Unicode string in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <ConfigAltResp> format which has all values filled
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync in for the names in the Request string. String to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync be allocated by the called function.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_SUCCESS The Results is filled with the requested values.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_OUT_OF_RESOURCES Not enough memory to store the results.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_INVALID_PARAMETER Request is illegal syntax, or unknown name.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_NOT_FOUND Routing data doesn't match any storage in this
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function processes the results of changes in configuration.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Configuration A null-terminated Unicode string in <ConfigResp>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Progress A pointer to a string filled in with the offset of
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the most recent '&' before the first failing
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync name/value pair (or the beginning of the string if
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the failure is in the first name/value pair) or
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the terminating NULL if all was successful.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_SUCCESS The Results is processed successfully.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_INVALID_PARAMETER Configuration is NULL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_NOT_FOUND Routing data doesn't match any storage in this
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function processes the results of changes in configuration.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Action Specifies the type of action taken by the browser.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] QuestionId A unique value which is sent to the original
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync exporting driver so that it can identify the type
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of data to expect.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Type The type of value for the question.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Value A pointer to the data being sent to the original
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync exporting driver.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] ActionRequest On return, points to the action requested by the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync callback function.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_SUCCESS The callback successfully handled the action.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync variable and its data.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_DEVICE_ERROR The variable could not be saved.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_UNSUPPORTED The specified Action is not supported by the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function converts an input device structure to a Unicode string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] DevPath A pointer to the device path structure.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return A new allocated Unicode string that represents the device path.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Clean up the dynamic opcode at label and form specified by both LabelId.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] LabelId It is both the Form ID and Label ID for opcode deletion.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] PrivateData Module private data.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Update the file explorer page with the refreshed file system.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] PrivateData Module private data.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] KeyValue Key value to identify the type of data to expect.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval TRUE Inform the caller to create a callback packet to exit file explorer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval FALSE Indicate that there is no need to exit file explorer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Free resources allocated in Allocate Rountine.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in, out] MenuOption Menu to be freed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Read file content into BufferPtr, the size of the allocate buffer
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync is *FileSize plus AddtionAllocateSize.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] FileHandle The file to be read.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in, out] BufferPtr Pointers to the pointer of allocated buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] FileSize Size of input file
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] AddtionAllocateSize Addtion size the buffer need to be allocated.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync In case the buffer need to contain others besides the file content.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_SUCCESS The file was read into the buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_INVALID_PARAMETER A parameter was invalid.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval others Unexpected error.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Close an open file handle.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] FileHandle The file handle to close.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Converts a nonnegative integer to an octet string of a specified length.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Integer Pointer to the nonnegative integer to be converted
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] IntSizeInWords Length of integer buffer in words
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] OctetString Converted octet string of the specified length
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] OSSizeInBytes Intended length of resulting octet string in bytes
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_SUCCESS Data conversion successfully
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_BUFFER_TOOL_SMALL Buffer is too small for output string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Convert a String to Guid Value.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Str Specifies the String to be converted.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] StrLen Number of Unicode Characters of String (exclusive \0)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Guid Return the result Guid value.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_SUCCESS The operation is finished successfully.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_NOT_FOUND Invalid string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Worker function that prints an EFI_GUID into specified Buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Guid Pointer to GUID to print.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Buffer Buffer to print Guid into.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] BufferSize Size of Buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval Number of characters printed.