TianoCore EDK2 master
Loading...
Searching...
No Matches
Database.c File Reference
#include "HiiDatabase.h"

Go to the source code of this file.

Macros

#define BASE_NUMBER   10
 

Functions

EFI_STATUS GenerateHiiDatabaseRecord (IN HII_DATABASE_PRIVATE_DATA *Private, OUT HII_DATABASE_RECORD **DatabaseNode)
 
BOOLEAN IsHiiHandleValid (EFI_HII_HANDLE Handle)
 
EFI_STATUS InvokeRegisteredFunction (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, IN VOID *PackageInstance, IN UINT8 PackageType, IN EFI_HII_HANDLE Handle)
 
EFI_STATUS InsertGuidPackage (IN VOID *PackageHdr, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, OUT HII_GUID_PACKAGE_INSTANCE **Package)
 
EFI_STATUS ExportGuidPackages (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_HANDLE Handle, IN HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, IN UINTN UsedSize, IN UINTN BufferSize, IN OUT VOID *Buffer, IN OUT UINTN *ResultSize)
 
EFI_STATUS RemoveGuidPackages (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_HANDLE Handle, IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList)
 
UINTN IsEfiVarStoreQuestion (EFI_IFR_QUESTION_HEADER *IfrQuestionHdr, EFI_IFR_VARSTORE_EFI **EfiVarStoreList, UINTN EfiVarStoreNumber)
 
AUTHENTICATED_VARIABLE_HEADERAuthFindVariableData (IN VARIABLE_STORE_HEADER *VariableStorage, IN EFI_GUID *VarGuid, IN UINT32 VarAttribute, IN CHAR16 *VarName)
 
VARIABLE_HEADERFindVariableData (IN VARIABLE_STORE_HEADER *VariableStorage, IN EFI_GUID *VarGuid, IN UINT32 VarAttribute, IN CHAR16 *VarName)
 
EFI_STATUS FindQuestionDefaultSetting (IN UINT16 DefaultId, IN EFI_IFR_VARSTORE_EFI *EfiVarStore, IN EFI_IFR_QUESTION_HEADER *IfrQuestionHdr, OUT VOID *ValueBuffer, IN UINTN Width, IN BOOLEAN BitFieldQuestion)
 
VOID UpdateDefaultSettingInFormPackage (HII_IFR_PACKAGE_INSTANCE *FormPackage)
 
EFI_STATUS InsertFormPackage (IN VOID *PackageHdr, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, OUT HII_IFR_PACKAGE_INSTANCE **Package)
 
EFI_STATUS ExportFormPackages (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_HANDLE Handle, IN HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, IN UINTN UsedSize, IN UINTN BufferSize, IN OUT VOID *Buffer, IN OUT UINTN *ResultSize)
 
EFI_STATUS RemoveFormPackages (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_HANDLE Handle, IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList)
 
EFI_STATUS InsertStringPackage (IN HII_DATABASE_PRIVATE_DATA *Private, IN VOID *PackageHdr, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, OUT HII_STRING_PACKAGE_INSTANCE **Package)
 
EFI_STATUS AdjustStringPackage (IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList)
 
EFI_STATUS ExportStringPackages (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_HANDLE Handle, IN HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, IN UINTN UsedSize, IN UINTN BufferSize, IN OUT VOID *Buffer, IN OUT UINTN *ResultSize)
 
EFI_STATUS RemoveStringPackages (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_HANDLE Handle, IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList)
 
EFI_STATUS InsertFontPackage (IN HII_DATABASE_PRIVATE_DATA *Private, IN VOID *PackageHdr, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, OUT HII_FONT_PACKAGE_INSTANCE **Package)
 
EFI_STATUS ExportFontPackages (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_HANDLE Handle, IN HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, IN UINTN UsedSize, IN UINTN BufferSize, IN OUT VOID *Buffer, IN OUT UINTN *ResultSize)
 
EFI_STATUS RemoveFontPackages (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_HANDLE Handle, IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList)
 
EFI_STATUS InsertImagePackage (IN VOID *PackageHdr, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, OUT HII_IMAGE_PACKAGE_INSTANCE **Package)
 
EFI_STATUS ExportImagePackages (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_HANDLE Handle, IN HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, IN UINTN UsedSize, IN UINTN BufferSize, IN OUT VOID *Buffer, IN OUT UINTN *ResultSize)
 
EFI_STATUS RemoveImagePackages (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_HANDLE Handle, IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList)
 
EFI_STATUS InsertSimpleFontPackage (IN VOID *PackageHdr, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, OUT HII_SIMPLE_FONT_PACKAGE_INSTANCE **Package)
 
EFI_STATUS ExportSimpleFontPackages (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_HANDLE Handle, IN HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, IN UINTN UsedSize, IN UINTN BufferSize, IN OUT VOID *Buffer, IN OUT UINTN *ResultSize)
 
EFI_STATUS RemoveSimpleFontPackages (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_HANDLE Handle, IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList)
 
EFI_STATUS InsertDevicePathPackage (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList)
 
EFI_STATUS ExportDevicePathPackage (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_HANDLE Handle, IN HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, IN UINTN UsedSize, IN UINTN BufferSize, IN OUT VOID *Buffer, IN OUT UINTN *ResultSize)
 
EFI_STATUS RemoveDevicePathPackage (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_HANDLE Handle, IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList)
 
EFI_STATUS AddDevicePathPackage (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN OUT HII_DATABASE_RECORD *DatabaseRecord)
 
EFI_STATUS InsertKeyboardLayoutPackage (IN VOID *PackageHdr, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, OUT HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE **Package)
 
EFI_STATUS ExportKeyboardLayoutPackages (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_HANDLE Handle, IN HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, IN UINTN UsedSize, IN UINTN BufferSize, IN OUT VOID *Buffer, IN OUT UINTN *ResultSize)
 
EFI_STATUS RemoveKeyboardLayoutPackages (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_HANDLE Handle, IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList)
 
EFI_STATUS AddPackages (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList, IN OUT HII_DATABASE_RECORD *DatabaseRecord)
 
EFI_STATUS ExportPackageList (IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_HANDLE Handle, IN HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList, IN OUT UINTN *UsedSize, IN UINTN BufferSize, OUT EFI_HII_PACKAGE_LIST_HEADER *Buffer)
 
EFI_STATUS HiiGetConfigRespInfo (IN CONST EFI_HII_DATABASE_PROTOCOL *This)
 
EFI_STATUS HiiGetDatabaseInfo (IN CONST EFI_HII_DATABASE_PROTOCOL *This)
 
EFI_STATUS EFIAPI HiiNewPackageList (IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList, IN CONST EFI_HANDLE DriverHandle OPTIONAL, OUT EFI_HII_HANDLE *Handle)
 
EFI_STATUS EFIAPI HiiRemovePackageList (IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HII_HANDLE Handle)
 
EFI_STATUS EFIAPI HiiUpdatePackageList (IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HII_HANDLE Handle, IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList)
 
EFI_STATUS EFIAPI HiiListPackageLists (IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN UINT8 PackageType, IN CONST EFI_GUID *PackageGuid, IN OUT UINTN *HandleBufferLength, OUT EFI_HII_HANDLE *Handle)
 
EFI_STATUS EFIAPI HiiExportPackageLists (IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HII_HANDLE Handle, IN OUT UINTN *BufferSize, OUT EFI_HII_PACKAGE_LIST_HEADER *Buffer)
 
EFI_STATUS EFIAPI HiiRegisterPackageNotify (IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN UINT8 PackageType, IN CONST EFI_GUID *PackageGuid, IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, OUT EFI_HANDLE *NotifyHandle)
 
EFI_STATUS EFIAPI HiiUnregisterPackageNotify (IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HANDLE NotificationHandle)
 
EFI_STATUS EFIAPI HiiFindKeyboardLayouts (IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN OUT UINT16 *KeyGuidBufferLength, OUT EFI_GUID *KeyGuidBuffer)
 
EFI_STATUS EFIAPI HiiGetKeyboardLayout (IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN CONST EFI_GUID *KeyGuid, IN OUT UINT16 *KeyboardLayoutLength, OUT EFI_HII_KEYBOARD_LAYOUT *KeyboardLayout)
 
EFI_STATUS EFIAPI HiiSetKeyboardLayout (IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN CONST EFI_GUID *KeyGuid)
 
EFI_STATUS EFIAPI HiiGetPackageListHandle (IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HII_HANDLE PackageListHandle, OUT EFI_HANDLE *DriverHandle)
 

Variables

EFI_HII_PACKAGE_LIST_HEADERgRTDatabaseInfoBuffer = NULL
 
EFI_STRING gRTConfigRespBuffer = NULL
 
UINTN gDatabaseInfoSize = 0
 
UINTN gConfigRespSize = 0
 
BOOLEAN gExportConfigResp = FALSE
 
UINTN gNvDefaultStoreSize = 0
 
SKU_ID gSkuId = 0xFFFFFFFFFFFFFFFF
 
LIST_ENTRY gVarStorageList = INITIALIZE_LIST_HEAD_VARIABLE (gVarStorageList)
 
EFI_LOCK mHiiDatabaseLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_NOTIFY)
 

Detailed Description

Implementation for EFI_HII_DATABASE_PROTOCOL.

Copyright (c) 2007 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Database.c.

Macro Definition Documentation

◆ BASE_NUMBER

#define BASE_NUMBER   10

Definition at line 11 of file Database.c.

Function Documentation

◆ AddDevicePathPackage()

EFI_STATUS AddDevicePathPackage ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_DATABASE_NOTIFY_TYPE  NotifyType,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath,
IN OUT HII_DATABASE_RECORD DatabaseRecord 
)

This function will insert a device path package to package list firstly then invoke notification functions if any. This is a internal function.

Parameters
PrivateHii database private structure.
NotifyTypeThe type of change concerning the database.
DevicePathPointer to a EFI_DEVICE_PATH_PROTOCOL protocol instance
DatabaseRecordPointer to a database record contains a package list which will be inserted to.
Return values
EFI_SUCCESSDevice path Package is inserted successfully.
EFI_OUT_OF_RESOURCESUnable to allocate necessary resources for the new Device path package.
EFI_INVALID_PARAMETERDevicePath is NULL or PackageList is NULL.

Definition at line 2801 of file Database.c.

◆ AddPackages()

EFI_STATUS AddPackages ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_DATABASE_NOTIFY_TYPE  NotifyType,
IN CONST EFI_HII_PACKAGE_LIST_HEADER PackageList,
IN OUT HII_DATABASE_RECORD DatabaseRecord 
)

This function will insert a package list to hii database firstly then invoke notification functions if any. It is the worker function of HiiNewPackageList and HiiUpdatePackageList.

This is a internal function.

Parameters
PrivateHii database private structure.
NotifyTypeThe type of change concerning the database.
PackageListPointer to a package list.
DatabaseRecordPointer to a database record contains a package list instance which will be inserted to.
Return values
EFI_SUCCESSAll incoming packages are inserted to current database.
EFI_OUT_OF_RESOURCESUnable to allocate necessary resources for the new Device path package.
EFI_INVALID_PARAMETERAny input parameter is invalid.

Definition at line 3067 of file Database.c.

◆ AdjustStringPackage()

EFI_STATUS AdjustStringPackage ( IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList)

Adjust all string packages in a single package list to have the same max string ID.

Parameters
PackageListPointer to a package list which will be adjusted.
Return values
EFI_SUCCESSAdjust all string packages successfully.
othersCan't adjust string packages.

Definition at line 1561 of file Database.c.

◆ AuthFindVariableData()

AUTHENTICATED_VARIABLE_HEADER * AuthFindVariableData ( IN VARIABLE_STORE_HEADER VariableStorage,
IN EFI_GUID VarGuid,
IN UINT32  VarAttribute,
IN CHAR16 *  VarName 
)

Find the matched variable from the input variable storage.

Parameters
[in]VariableStoragePoint to the variable storage header.
[in]VarGuidA unique identifier for the variable.
[in]VarAttributeThe attributes bitmask for the variable.
[in]VarNameA Null-terminated ascii string that is the name of the variable.
Returns
Pointer to the matched variable header or NULL if not found.

Definition at line 578 of file Database.c.

◆ ExportDevicePathPackage()

EFI_STATUS ExportDevicePathPackage ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_HANDLE  Handle,
IN HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList,
IN UINTN  UsedSize,
IN UINTN  BufferSize,
IN OUT VOID *  Buffer,
IN OUT UINTN ResultSize 
)

This function exports device path package to a buffer. This is a internal function.

Parameters
PrivateHii database private structure.
HandleIdentification of a package list.
PackageListPointer to a package list which will be exported.
UsedSizeThe length of buffer be used.
BufferSizeLength of the Buffer.
BufferAllocated space for storing exported data.
ResultSizeThe size of the already exported content of this package list.
Return values
EFI_SUCCESSDevice path Package is exported successfully.
EFI_INVALID_PARAMETERAny input parameter is invalid.

Definition at line 2675 of file Database.c.

◆ ExportFontPackages()

EFI_STATUS ExportFontPackages ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_HANDLE  Handle,
IN HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList,
IN UINTN  UsedSize,
IN UINTN  BufferSize,
IN OUT VOID *  Buffer,
IN OUT UINTN ResultSize 
)

This function exports Font packages to a buffer. This is a internal function.

Parameters
PrivateHii database private structure.
HandleIdentification of a package list.
PackageListPointer to a package list which will be exported.
UsedSizeThe length of buffer be used.
BufferSizeLength of the Buffer.
BufferAllocated space for storing exported data.
ResultSizeThe size of the already exported content of this package list.
Return values
EFI_SUCCESSFont Packages are exported successfully.
EFI_INVALID_PARAMETERAny input parameter is invalid.

Definition at line 1961 of file Database.c.

◆ ExportFormPackages()

EFI_STATUS ExportFormPackages ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_HANDLE  Handle,
IN HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList,
IN UINTN  UsedSize,
IN UINTN  BufferSize,
IN OUT VOID *  Buffer,
IN OUT UINTN ResultSize 
)

This function exports Form packages to a buffer. This is a internal function.

Parameters
PrivateHii database private structure.
HandleIdentification of a package list.
PackageListPointer to a package list which will be exported.
UsedSizeThe length of buffer be used.
BufferSizeLength of the Buffer.
BufferAllocated space for storing exported data.
ResultSizeThe size of the already exported content of this package list.
Return values
EFI_SUCCESSForm Packages are exported successfully.
EFI_INVALID_PARAMETERAny input parameter is invalid.

Definition at line 1279 of file Database.c.

◆ ExportGuidPackages()

EFI_STATUS ExportGuidPackages ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_HANDLE  Handle,
IN HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList,
IN UINTN  UsedSize,
IN UINTN  BufferSize,
IN OUT VOID *  Buffer,
IN OUT UINTN ResultSize 
)

This function exports GUID packages to a buffer. This is a internal function.

Parameters
PrivateHii database private structure.
HandleIdentification of a package list.
PackageListPointer to a package list which will be exported.
UsedSizeThe length of buffer be used.
BufferSizeLength of the Buffer.
BufferAllocated space for storing exported data.
ResultSizeThe size of the already exported content of this package list.
Return values
EFI_SUCCESSGuid Packages are exported successfully.
EFI_INVALID_PARAMETERAny input parameter is invalid.

Definition at line 434 of file Database.c.

◆ ExportImagePackages()

EFI_STATUS ExportImagePackages ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_HANDLE  Handle,
IN HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList,
IN UINTN  UsedSize,
IN UINTN  BufferSize,
IN OUT VOID *  Buffer,
IN OUT UINTN ResultSize 
)

This function exports Image packages to a buffer. This is a internal function.

Parameters
PrivateHii database private structure.
HandleIdentification of a package list.
PackageListPointer to a package list which will be exported.
UsedSizeThe length of buffer be used.
BufferSizeLength of the Buffer.
BufferAllocated space for storing exported data.
ResultSizeThe size of the already exported content of this package list.
Return values
EFI_SUCCESSImage Packages are exported successfully.
EFI_INVALID_PARAMETERAny input parameter is invalid.

Definition at line 2257 of file Database.c.

◆ ExportKeyboardLayoutPackages()

EFI_STATUS ExportKeyboardLayoutPackages ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_HANDLE  Handle,
IN HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList,
IN UINTN  UsedSize,
IN UINTN  BufferSize,
IN OUT VOID *  Buffer,
IN OUT UINTN ResultSize 
)

This function exports Keyboard Layout packages to a buffer. This is a internal function.

Parameters
PrivateHii database private structure.
HandleIdentification of a package list.
PackageListPointer to a package list which will be exported.
UsedSizeThe length of buffer be used.
BufferSizeLength of the Buffer.
BufferAllocated space for storing exported data.
ResultSizeThe size of the already exported content of this package list.
Return values
EFI_SUCCESSKeyboard Layout Packages are exported successfully.
EFI_INVALID_PARAMETERAny input parameter is invalid.

Definition at line 2933 of file Database.c.

◆ ExportPackageList()

EFI_STATUS ExportPackageList ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_HANDLE  Handle,
IN HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList,
IN OUT UINTN UsedSize,
IN UINTN  BufferSize,
OUT EFI_HII_PACKAGE_LIST_HEADER Buffer 
)

This function exports a package list to a buffer. It is the worker function of HiiExportPackageList.

This is a internal function.

Parameters
PrivateHii database private structure.
HandleIdentification of a package list.
PackageListPointer to a package list which will be exported.
UsedSizeThe length of buffer has been used by exporting package lists when Handle is NULL.
BufferSizeLength of the Buffer.
BufferAllocated space for storing exported data.
Return values
EFI_SUCCESSKeyboard Layout Packages are exported successfully.
EFI_INVALID_PARAMETERAny input parameter is invalid.

Definition at line 3320 of file Database.c.

◆ ExportSimpleFontPackages()

EFI_STATUS ExportSimpleFontPackages ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_HANDLE  Handle,
IN HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList,
IN UINTN  UsedSize,
IN UINTN  BufferSize,
IN OUT VOID *  Buffer,
IN OUT UINTN ResultSize 
)

This function exports SimpleFont packages to a buffer. This is a internal function.

Parameters
PrivateHii database private structure.
HandleIdentification of a package list.
PackageListPointer to a package list which will be exported.
UsedSizeThe length of buffer be used.
BufferSizeLength of the Buffer.
BufferAllocated space for storing exported data.
ResultSizeThe size of the already exported content of this package list.
Return values
EFI_SUCCESSSimpleFont Packages are exported successfully.
EFI_INVALID_PARAMETERAny input parameter is invalid.

Definition at line 2489 of file Database.c.

◆ ExportStringPackages()

EFI_STATUS ExportStringPackages ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_HANDLE  Handle,
IN HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList,
IN UINTN  UsedSize,
IN UINTN  BufferSize,
IN OUT VOID *  Buffer,
IN OUT UINTN ResultSize 
)

This function exports String packages to a buffer. This is a internal function.

Parameters
PrivateHii database private structure.
HandleIdentification of a package list.
PackageListPointer to a package list which will be exported.
UsedSizeThe length of buffer be used.
BufferSizeLength of the Buffer.
BufferAllocated space for storing exported data.
ResultSizeThe size of the already exported content of this package list.
Return values
EFI_SUCCESSString Packages are exported successfully.
EFI_INVALID_PARAMETERAny input parameter is invalid.

Definition at line 1650 of file Database.c.

◆ FindQuestionDefaultSetting()

EFI_STATUS FindQuestionDefaultSetting ( IN UINT16  DefaultId,
IN EFI_IFR_VARSTORE_EFI EfiVarStore,
IN EFI_IFR_QUESTION_HEADER IfrQuestionHdr,
OUT VOID *  ValueBuffer,
IN UINTN  Width,
IN BOOLEAN  BitFieldQuestion 
)

Find question default value from PcdNvStoreDefaultValueBuffer

Parameters
DefaultIdDefault store ID
EfiVarStorePoint to EFI VarStore header
IfrQuestionHdrPoint to Question header
ValueBufferPoint to Buffer includes the found default setting
WidthWidth of the default value
BitFieldQuestionWhether the Question is stored in Bit field.
Return values
EFI_SUCCESSQuestion default value is found.
EFI_NOT_FOUNDQuestion default value is not found.

Definition at line 659 of file Database.c.

◆ FindVariableData()

VARIABLE_HEADER * FindVariableData ( IN VARIABLE_STORE_HEADER VariableStorage,
IN EFI_GUID VarGuid,
IN UINT32  VarAttribute,
IN CHAR16 *  VarName 
)

Find the matched variable from the input variable storage.

Parameters
[in]VariableStoragePoint to the variable storage header.
[in]VarGuidA unique identifier for the variable.
[in]VarAttributeThe attributes bitmask for the variable.
[in]VarNameA Null-terminated ascii string that is the name of the variable.
Returns
Pointer to the matched variable header or NULL if not found.

Definition at line 617 of file Database.c.

◆ GenerateHiiDatabaseRecord()

EFI_STATUS GenerateHiiDatabaseRecord ( IN HII_DATABASE_PRIVATE_DATA Private,
OUT HII_DATABASE_RECORD **  DatabaseNode 
)

This function generates a HII_DATABASE_RECORD node and adds into hii database. This is a internal function.

Parameters
Privatehii database private structure
DatabaseNodeHII_DATABASE_RECORD node which is used to store a package list
Return values
EFI_SUCCESSA database record is generated successfully.
EFI_OUT_OF_RESOURCESUnable to allocate necessary resources for the new database contents.
EFI_INVALID_PARAMETERPrivate is NULL or DatabaseRecord is NULL.

Definition at line 42 of file Database.c.

◆ HiiExportPackageLists()

EFI_STATUS EFIAPI HiiExportPackageLists ( IN CONST EFI_HII_DATABASE_PROTOCOL This,
IN EFI_HII_HANDLE  Handle,
IN OUT UINTN BufferSize,
OUT EFI_HII_PACKAGE_LIST_HEADER Buffer 
)

This function will export one or all package lists in the database to a buffer. For each package list exported, this function will call functions registered with EXPORT_PACK and then copy the package list to the buffer.

Parameters
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
HandleAn EFI_HII_HANDLE that corresponds to the desired package list in the HII database to export or NULL to indicate all package lists should be exported.
BufferSizeOn input, a pointer to the length of the buffer. On output, the length of the buffer that is required for the exported data.
BufferA pointer to a buffer that will contain the results of the export function.
Return values
EFI_SUCCESSPackage exported.
EFI_BUFFER_TO_SMALLThe HandleBufferLength parameter indicates that Handle is too small to support the number of handles. HandleBufferLength is updated with a value that will enable the data to fit.
EFI_NOT_FOUNDThe specified Handle could not be found in the current database.
EFI_INVALID_PARAMETERBufferSize was NULL.
EFI_INVALID_PARAMETERThe value referenced by BufferSize was not zero and Buffer was NULL.

Definition at line 4219 of file Database.c.

◆ HiiFindKeyboardLayouts()

EFI_STATUS EFIAPI HiiFindKeyboardLayouts ( IN CONST EFI_HII_DATABASE_PROTOCOL This,
IN OUT UINT16 *  KeyGuidBufferLength,
OUT EFI_GUID KeyGuidBuffer 
)

This routine retrieves an array of GUID values for each keyboard layout that was previously registered in the system.

Parameters
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
KeyGuidBufferLengthOn input, a pointer to the length of the keyboard GUID buffer. On output, the length of the handle buffer that is required for the handles found.
KeyGuidBufferAn array of keyboard layout GUID instances returned.
Return values
EFI_SUCCESSKeyGuidBuffer was updated successfully.
EFI_BUFFER_TOO_SMALLThe KeyGuidBufferLength parameter indicates that KeyGuidBuffer is too small to support the number of GUIDs. KeyGuidBufferLength is updated with a value that will enable the data to fit.
EFI_INVALID_PARAMETERThe KeyGuidBufferLength is NULL.
EFI_INVALID_PARAMETERThe value referenced by KeyGuidBufferLength is not zero and KeyGuidBuffer is NULL.
EFI_NOT_FOUNDThere was no keyboard layout.

Definition at line 4487 of file Database.c.

◆ HiiGetConfigRespInfo()

EFI_STATUS HiiGetConfigRespInfo ( IN CONST EFI_HII_DATABASE_PROTOCOL This)

This function mainly use to get and update ConfigResp string.

Parameters
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
Return values
EFI_SUCCESSGet the information successfully.
EFI_OUT_OF_RESOURCESNot enough memory to store the Configuration Setting data.

Definition at line 3485 of file Database.c.

◆ HiiGetDatabaseInfo()

EFI_STATUS HiiGetDatabaseInfo ( IN CONST EFI_HII_DATABASE_PROTOCOL This)

This is an internal function,mainly use to get HiiDatabase information.

Parameters
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
Return values
EFI_SUCCESSGet the information successfully.
EFI_OUT_OF_RESOURCESNot enough memory to store the Hiidatabase data.

Definition at line 3549 of file Database.c.

◆ HiiGetKeyboardLayout()

EFI_STATUS EFIAPI HiiGetKeyboardLayout ( IN CONST EFI_HII_DATABASE_PROTOCOL This,
IN CONST EFI_GUID KeyGuid,
IN OUT UINT16 *  KeyboardLayoutLength,
OUT EFI_HII_KEYBOARD_LAYOUT KeyboardLayout 
)

This routine retrieves the requested keyboard layout. The layout is a physical description of the keys on a keyboard and the character(s) that are associated with a particular set of key strokes.

Parameters
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
KeyGuidA pointer to the unique ID associated with a given keyboard layout. If KeyGuid is NULL then the current layout will be retrieved.
KeyboardLayoutLengthOn input, a pointer to the length of the KeyboardLayout buffer. On output, the length of the data placed into KeyboardLayout.
KeyboardLayoutA pointer to a buffer containing the retrieved keyboard layout.
Return values
EFI_SUCCESSThe keyboard layout was retrieved successfully.
EFI_NOT_FOUNDThe requested keyboard layout was not found.
EFI_INVALID_PARAMETERThe KeyboardLayout or KeyboardLayoutLength was NULL.
EFI_BUFFER_TOO_SMALLThe KeyboardLayoutLength parameter indicates that KeyboardLayout is too small to support the requested keyboard layout. KeyboardLayoutLength is updated with a value that will enable the data to fit.

Definition at line 4594 of file Database.c.

◆ HiiGetPackageListHandle()

EFI_STATUS EFIAPI HiiGetPackageListHandle ( IN CONST EFI_HII_DATABASE_PROTOCOL This,
IN EFI_HII_HANDLE  PackageListHandle,
OUT EFI_HANDLE DriverHandle 
)

Return the EFI handle associated with a package list.

Parameters
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
PackageListHandleAn EFI_HII_HANDLE that corresponds to the desired package list in the HIIdatabase.
DriverHandleOn return, contains the EFI_HANDLE which was registered with the package list in NewPackageList().
Return values
EFI_SUCCESSThe DriverHandle was returned successfully.
EFI_INVALID_PARAMETERThe PackageListHandle was not valid or DriverHandle was NULL.
EFI_NOT_FOUNDThis PackageList handle can not be found in current database.

Definition at line 4775 of file Database.c.

◆ HiiListPackageLists()

EFI_STATUS EFIAPI HiiListPackageLists ( IN CONST EFI_HII_DATABASE_PROTOCOL This,
IN UINT8  PackageType,
IN CONST EFI_GUID PackageGuid,
IN OUT UINTN HandleBufferLength,
OUT EFI_HII_HANDLE Handle 
)

This function returns a list of the package handles of the specified type that are currently active in the database. The pseudo-type EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.

Parameters
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
PackageTypeSpecifies the package type of the packages to list or EFI_HII_PACKAGE_TYPE_ALL for all packages to be listed.
PackageGuidIf PackageType is EFI_HII_PACKAGE_TYPE_GUID, then this is the pointer to the GUID which must match the Guid field of EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must be NULL.
HandleBufferLengthOn input, a pointer to the length of the handle buffer. On output, the length of the handle buffer that is required for the handles found.
HandleAn array of EFI_HII_HANDLE instances returned.
Return values
EFI_SUCCESSThe matching handles are outputted successfully. HandleBufferLength is updated with the actual length.
EFI_BUFFER_TO_SMALLThe HandleBufferLength parameter indicates that Handle is too small to support the number of handles. HandleBufferLength is updated with a value that will enable the data to fit.
EFI_NOT_FOUNDNo matching handle could not be found in database.
EFI_INVALID_PARAMETERHandleBufferLength was NULL.
EFI_INVALID_PARAMETERThe value referenced by HandleBufferLength was not zero and Handle was NULL.
EFI_INVALID_PARAMETERPackageType is not a EFI_HII_PACKAGE_TYPE_GUID but PackageGuid is not NULL, PackageType is a EFI_HII_ PACKAGE_TYPE_GUID but PackageGuid is NULL.

Definition at line 4052 of file Database.c.

◆ HiiNewPackageList()

EFI_STATUS EFIAPI HiiNewPackageList ( IN CONST EFI_HII_DATABASE_PROTOCOL This,
IN CONST EFI_HII_PACKAGE_LIST_HEADER PackageList,
IN CONST EFI_HANDLE DriverHandle  OPTIONAL,
OUT EFI_HII_HANDLE Handle 
)

This function adds the packages in the package list to the database and returns a handle. If there is a EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.

Parameters
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
PackageListA pointer to an EFI_HII_PACKAGE_LIST_HEADER structure.
DriverHandleAssociate the package list with this EFI handle. If a NULL is specified, this data will not be associate with any drivers and cannot have a callback induced.
HandleA pointer to the EFI_HII_HANDLE instance.
Return values
EFI_SUCCESSThe package list associated with the Handle was added to the HII database.
EFI_OUT_OF_RESOURCESUnable to allocate necessary resources for the new database contents.
EFI_INVALID_PARAMETERPackageList is NULL or Handle is NULL.
EFI_INVALID_PARAMETERPackageListGuid already exists in database.

Definition at line 3622 of file Database.c.

◆ HiiRegisterPackageNotify()

EFI_STATUS EFIAPI HiiRegisterPackageNotify ( IN CONST EFI_HII_DATABASE_PROTOCOL This,
IN UINT8  PackageType,
IN CONST EFI_GUID PackageGuid,
IN CONST EFI_HII_DATABASE_NOTIFY  PackageNotifyFn,
IN EFI_HII_DATABASE_NOTIFY_TYPE  NotifyType,
OUT EFI_HANDLE NotifyHandle 
)

This function registers a function which will be called when specified actions related to packages of the specified type occur in the HII database. By registering a function, other HII-related drivers are notified when specific package types are added, removed or updated in the HII database. Each driver or application which registers a notification should use EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.

Parameters
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
PackageTypeSpecifies the package type of the packages to list or EFI_HII_PACKAGE_TYPE_ALL for all packages to be listed.
PackageGuidIf PackageType is EFI_HII_PACKAGE_TYPE_GUID, then this is the pointer to the GUID which must match the Guid field of EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must be NULL.
PackageNotifyFnPoints to the function to be called when the event specified by NotificationType occurs.
NotifyTypeDescribes the types of notification which this function will be receiving.
NotifyHandlePoints to the unique handle assigned to the registered notification. Can be used in EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() to stop notifications.
Return values
EFI_SUCCESSNotification registered successfully.
EFI_OUT_OF_RESOURCESUnable to allocate necessary data structures
EFI_INVALID_PARAMETERNotifyHandle is NULL.
EFI_INVALID_PARAMETERPackageGuid is not NULL when PackageType is not EFI_HII_PACKAGE_TYPE_GUID.
EFI_INVALID_PARAMETERPackageGuid is NULL when PackageType is EFI_HII_PACKAGE_TYPE_GUID.

Definition at line 4331 of file Database.c.

◆ HiiRemovePackageList()

EFI_STATUS EFIAPI HiiRemovePackageList ( IN CONST EFI_HII_DATABASE_PROTOCOL This,
IN EFI_HII_HANDLE  Handle 
)

This function removes the package list that is associated with Handle from the HII database. Before removing the package, any registered functions with the notification type REMOVE_PACK and the same package type will be called.

Parameters
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
HandleThe handle that was registered to the data that is requested for removal.
Return values
EFI_SUCCESSThe data associated with the Handle was removed from the HII database.
EFI_NOT_FOUNDThe specified handle is not in database.
EFI_INVALID_PARAMETERThe Handle was not valid.

Definition at line 3743 of file Database.c.

◆ HiiSetKeyboardLayout()

EFI_STATUS EFIAPI HiiSetKeyboardLayout ( IN CONST EFI_HII_DATABASE_PROTOCOL This,
IN CONST EFI_GUID KeyGuid 
)

This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID group type. This is so that agents which are sensitive to the current keyboard layout being changed can be notified of this change.

Parameters
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
KeyGuidA pointer to the unique ID associated with a given keyboard layout.
Return values
EFI_SUCCESSThe current keyboard layout was successfully set.
EFI_NOT_FOUNDThe referenced keyboard layout was not found, so action was taken.
EFI_INVALID_PARAMETERThe KeyGuid was NULL.

Definition at line 4696 of file Database.c.

◆ HiiUnregisterPackageNotify()

EFI_STATUS EFIAPI HiiUnregisterPackageNotify ( IN CONST EFI_HII_DATABASE_PROTOCOL This,
IN EFI_HANDLE  NotificationHandle 
)

Removes the specified HII database package-related notification.

Parameters
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
NotificationHandleThe handle of the notification function being unregistered.
Return values
EFI_SUCCESSNotification is unregistered successfully.
EFI_INVALID_PARAMETERThe Handle is invalid.
EFI_NOT_FOUNDThe incoming notification handle does not exist in current hii database.

Definition at line 4406 of file Database.c.

◆ HiiUpdatePackageList()

EFI_STATUS EFIAPI HiiUpdatePackageList ( IN CONST EFI_HII_DATABASE_PROTOCOL This,
IN EFI_HII_HANDLE  Handle,
IN CONST EFI_HII_PACKAGE_LIST_HEADER PackageList 
)

This function updates the existing package list (which has the specified Handle) in the HII databases, using the new package list specified by PackageList.

Parameters
ThisA pointer to the EFI_HII_DATABASE_PROTOCOL instance.
HandleThe handle that was registered to the data that is requested to be updated.
PackageListA pointer to an EFI_HII_PACKAGE_LIST_HEADER package.
Return values
EFI_SUCCESSThe HII database was successfully updated.
EFI_OUT_OF_RESOURCESUnable to allocate enough memory for the updated database.
EFI_INVALID_PARAMETERPackageList was NULL.
EFI_NOT_FOUNDThe specified Handle is not in database.

Definition at line 3898 of file Database.c.

◆ InsertDevicePathPackage()

EFI_STATUS InsertDevicePathPackage ( IN EFI_DEVICE_PATH_PROTOCOL DevicePath,
IN EFI_HII_DATABASE_NOTIFY_TYPE  NotifyType,
IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList 
)

This function insert a Device path package to a package list node. This is a internal function.

Parameters
DevicePathPointer to a EFI_DEVICE_PATH_PROTOCOL protocol instance
NotifyTypeThe type of change concerning the database.
PackageListPointer to a package list which will be inserted to.
Return values
EFI_SUCCESSDevice path Package is inserted successfully.
EFI_OUT_OF_RESOURCESUnable to allocate necessary resources for the new Device path package.
EFI_INVALID_PARAMETERDevicePath is NULL or PackageList is NULL.

Definition at line 2614 of file Database.c.

◆ InsertFontPackage()

EFI_STATUS InsertFontPackage ( IN HII_DATABASE_PRIVATE_DATA Private,
IN VOID *  PackageHdr,
IN EFI_HII_DATABASE_NOTIFY_TYPE  NotifyType,
IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList,
OUT HII_FONT_PACKAGE_INSTANCE **  Package 
)

This function insert a Font package to a package list node. This is a internal function.

Parameters
PrivateHii database private structure.
PackageHdrPointer to a buffer stored with Font package information.
NotifyTypeThe type of change concerning the database.
PackageListPointer to a package list which will be inserted to.
PackageCreated Font package
Return values
EFI_SUCCESSFont Package is inserted successfully.
EFI_OUT_OF_RESOURCESUnable to allocate necessary resources for the new Font package.
EFI_INVALID_PARAMETERPackageHdr is NULL or PackageList is NULL.
EFI_UNSUPPORTEDA font package with same EFI_FONT_INFO already exists in current hii database.

Definition at line 1804 of file Database.c.

◆ InsertFormPackage()

EFI_STATUS InsertFormPackage ( IN VOID *  PackageHdr,
IN EFI_HII_DATABASE_NOTIFY_TYPE  NotifyType,
IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList,
OUT HII_IFR_PACKAGE_INSTANCE **  Package 
)

This function insert a Form package to a package list node. This is a internal function.

Parameters
PackageHdrPointer to a buffer stored with Form package information.
NotifyTypeThe type of change concerning the database.
PackageListPointer to a package list which will be inserted to.
PackageCreated Form package
Return values
EFI_SUCCESSForm Package is inserted successfully.
EFI_OUT_OF_RESOURCESUnable to allocate necessary resources for the new Form package.
EFI_INVALID_PARAMETERPackageHdr is NULL or PackageList is NULL.

Definition at line 1198 of file Database.c.

◆ InsertGuidPackage()

EFI_STATUS InsertGuidPackage ( IN VOID *  PackageHdr,
IN EFI_HII_DATABASE_NOTIFY_TYPE  NotifyType,
IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList,
OUT HII_GUID_PACKAGE_INSTANCE **  Package 
)

This function insert a GUID package to a package list node. This is a internal function.

Parameters
PackageHdrPointer to a buffer stored with GUID package information.
NotifyTypeThe type of change concerning the database.
PackageListPointer to a package list which will be inserted to.
PackageCreated GUID package
Return values
EFI_SUCCESSGuid Package is inserted successfully.
EFI_OUT_OF_RESOURCESUnable to allocate necessary resources for the new Guid package.
EFI_INVALID_PARAMETERPackageHdr is NULL or PackageList is NULL.

Definition at line 374 of file Database.c.

◆ InsertImagePackage()

EFI_STATUS InsertImagePackage ( IN VOID *  PackageHdr,
IN EFI_HII_DATABASE_NOTIFY_TYPE  NotifyType,
IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList,
OUT HII_IMAGE_PACKAGE_INSTANCE **  Package 
)

This function insert a Image package to a package list node. This is a internal function.

Parameters
PackageHdrPointer to a buffer stored with Image package information.
NotifyTypeThe type of change concerning the database.
PackageListPointer to a package list which will be inserted to.
PackageCreated Image package
Return values
EFI_SUCCESSImage Package is inserted successfully.
EFI_OUT_OF_RESOURCESUnable to allocate necessary resources for the new Image package.
EFI_INVALID_PARAMETERPackageHdr is NULL or PackageList is NULL.

Definition at line 2131 of file Database.c.

◆ InsertKeyboardLayoutPackage()

EFI_STATUS InsertKeyboardLayoutPackage ( IN VOID *  PackageHdr,
IN EFI_HII_DATABASE_NOTIFY_TYPE  NotifyType,
IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList,
OUT HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE **  Package 
)

This function insert a Keyboard Layout package to a package list node. This is a internal function.

Parameters
PackageHdrPointer to a buffer stored with Keyboard Layout package information.
NotifyTypeThe type of change concerning the database.
PackageListPointer to a package list which will be inserted to.
PackageCreated Keyboard Layout package
Return values
EFI_SUCCESSKeyboard Layout Package is inserted successfully.
EFI_OUT_OF_RESOURCESUnable to allocate necessary resources for the new Keyboard Layout package.
EFI_INVALID_PARAMETERPackageHdr is NULL or PackageList is NULL.

Definition at line 2856 of file Database.c.

◆ InsertSimpleFontPackage()

EFI_STATUS InsertSimpleFontPackage ( IN VOID *  PackageHdr,
IN EFI_HII_DATABASE_NOTIFY_TYPE  NotifyType,
IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList,
OUT HII_SIMPLE_FONT_PACKAGE_INSTANCE **  Package 
)

This function insert a Simple Font package to a package list node. This is a internal function.

Parameters
PackageHdrPointer to a buffer stored with Simple Font package information.
NotifyTypeThe type of change concerning the database.
PackageListPointer to a package list which will be inserted to.
PackageCreated Simple Font package
Return values
EFI_SUCCESSSimple Font Package is inserted successfully.
EFI_OUT_OF_RESOURCESUnable to allocate necessary resources for the new Simple Font package.
EFI_INVALID_PARAMETERPackageHdr is NULL or PackageList is NULL.

Definition at line 2407 of file Database.c.

◆ InsertStringPackage()

EFI_STATUS InsertStringPackage ( IN HII_DATABASE_PRIVATE_DATA Private,
IN VOID *  PackageHdr,
IN EFI_HII_DATABASE_NOTIFY_TYPE  NotifyType,
IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList,
OUT HII_STRING_PACKAGE_INSTANCE **  Package 
)

This function insert a String package to a package list node. This is a internal function.

Parameters
PrivateHii database private structure.
PackageHdrPointer to a buffer stored with String package information.
NotifyTypeThe type of change concerning the database.
PackageListPointer to a package list which will be inserted to.
PackageCreated String package
Return values
EFI_SUCCESSString Package is inserted successfully.
EFI_OUT_OF_RESOURCESUnable to allocate necessary resources for the new String package.
EFI_INVALID_PARAMETERPackageHdr is NULL or PackageList is NULL.
EFI_UNSUPPORTEDA string package with the same language already exists in current package list.

Definition at line 1427 of file Database.c.

◆ InvokeRegisteredFunction()

EFI_STATUS InvokeRegisteredFunction ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_DATABASE_NOTIFY_TYPE  NotifyType,
IN VOID *  PackageInstance,
IN UINT8  PackageType,
IN EFI_HII_HANDLE  Handle 
)

This function invokes the matching registered function. This is a internal function.

Parameters
PrivateHII Database driver private structure.
NotifyTypeThe type of change concerning the database.
PackageInstancePoints to the package referred to by the notification.
PackageTypePackage type
HandleThe handle of the package list which contains the specified package.
Return values
EFI_SUCCESSAlready checked all registered function and invoked if matched.
EFI_INVALID_PARAMETERAny input parameter is not valid.

Definition at line 160 of file Database.c.

◆ IsEfiVarStoreQuestion()

UINTN IsEfiVarStoreQuestion ( EFI_IFR_QUESTION_HEADER IfrQuestionHdr,
EFI_IFR_VARSTORE_EFI **  EfiVarStoreList,
UINTN  EfiVarStoreNumber 
)

Check the input question related to EFI variable

Parameters
IfrQuestionHdrPoint to Question header
EfiVarStoreListPoint to EFI VarStore List
EfiVarStoreNumberThe number of EFI VarStore
Return values
IndexThe index of the found EFI varstore in EFI varstore list EfiVarStoreNumber will return if no EFI varstore is found.

Definition at line 550 of file Database.c.

◆ IsHiiHandleValid()

BOOLEAN IsHiiHandleValid ( EFI_HII_HANDLE  Handle)

This function checks whether a handle is a valid EFI_HII_HANDLE This is a internal function.

Parameters
HandlePointer to a EFI_HII_HANDLE
Return values
TRUEValid
FALSEInvalid

Definition at line 123 of file Database.c.

◆ RemoveDevicePathPackage()

EFI_STATUS RemoveDevicePathPackage ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_HANDLE  Handle,
IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList 
)

This function deletes Device Path package from a package list node. This is a internal function.

Parameters
PrivateHii database private data.
HandleHandle of the package list.
PackageListPackage List which contains the to be removed Device Path package.
Return values
EFI_SUCCESSDevice Path Package is deleted successfully.
EFI_INVALID_PARAMETERAny input parameter is not valid.

Definition at line 2742 of file Database.c.

◆ RemoveFontPackages()

EFI_STATUS RemoveFontPackages ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_HANDLE  Handle,
IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList 
)

This function deletes all Font packages from a package list node. This is a internal function.

Parameters
PrivateHii database private data.
HandleHandle of the package list which contains the to be removed Font packages.
PackageListPointer to a package list that contains removing packages.
Return values
EFI_SUCCESSFont Package(s) is deleted successfully.
EFI_INVALID_PARAMETERAny input parameter is not valid.

Definition at line 2039 of file Database.c.

◆ RemoveFormPackages()

EFI_STATUS RemoveFormPackages ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_HANDLE  Handle,
IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList 
)

This function deletes all Form packages from a package list node. This is a internal function.

Parameters
PrivateHii database private data.
HandleHandle of the package list which contains the to be removed Form packages.
PackageListPointer to a package list that contains removing packages.
Return values
EFI_SUCCESSForm Package(s) is deleted successfully.
EFI_INVALID_PARAMETERAny input parameter is not valid.

Definition at line 1357 of file Database.c.

◆ RemoveGuidPackages()

EFI_STATUS RemoveGuidPackages ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_HANDLE  Handle,
IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList 
)

This function deletes all GUID packages from a package list node. This is a internal function.

Parameters
PrivateHii database private data.
HandleHandle of the package list which contains the to be removed GUID packages.
PackageListPointer to a package list that contains removing packages.
Return values
EFI_SUCCESSGUID Package(s) is deleted successfully.
EFI_INVALID_PARAMETERAny input parameter is not valid.

Definition at line 498 of file Database.c.

◆ RemoveImagePackages()

EFI_STATUS RemoveImagePackages ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_HANDLE  Handle,
IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList 
)

This function deletes Image package from a package list node. This is a internal function.

Parameters
PrivateHii database private data.
HandleHandle of the package list which contains the to be removed Image packages.
PackageListPackage List which contains the to be removed Image package.
Return values
EFI_SUCCESSImage Package(s) is deleted successfully.
EFI_INVALID_PARAMETERAny input parameter is not valid.

Definition at line 2346 of file Database.c.

◆ RemoveKeyboardLayoutPackages()

EFI_STATUS RemoveKeyboardLayoutPackages ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_HANDLE  Handle,
IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList 
)

This function deletes all Keyboard Layout packages from a package list node. This is a internal function.

Parameters
PrivateHii database private data.
HandleHandle of the package list which contains the to be removed Keyboard Layout packages.
PackageListPointer to a package list that contains removing packages.
Return values
EFI_SUCCESSKeyboard Layout Package(s) is deleted successfully.
EFI_INVALID_PARAMETERAny input parameter is not valid.

Definition at line 3005 of file Database.c.

◆ RemoveSimpleFontPackages()

EFI_STATUS RemoveSimpleFontPackages ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_HANDLE  Handle,
IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList 
)

This function deletes all Simple Font packages from a package list node. This is a internal function.

Parameters
PrivateHii database private data.
HandleHandle of the package list which contains the to be removed Simple Font packages.
PackageListPointer to a package list that contains removing packages.
Return values
EFI_SUCCESSSimple Font Package(s) is deleted successfully.
EFI_INVALID_PARAMETERAny input parameter is not valid.

Definition at line 2558 of file Database.c.

◆ RemoveStringPackages()

EFI_STATUS RemoveStringPackages ( IN HII_DATABASE_PRIVATE_DATA Private,
IN EFI_HII_HANDLE  Handle,
IN OUT HII_DATABASE_PACKAGE_LIST_INSTANCE PackageList 
)

This function deletes all String packages from a package list node. This is a internal function.

Parameters
PrivateHii database private data.
HandleHandle of the package list which contains the to be removed String packages.
PackageListPointer to a package list that contains removing packages.
Return values
EFI_SUCCESSString Package(s) is deleted successfully.
EFI_INVALID_PARAMETERAny input parameter is not valid.

Definition at line 1728 of file Database.c.

◆ UpdateDefaultSettingInFormPackage()

VOID UpdateDefaultSettingInFormPackage ( HII_IFR_PACKAGE_INSTANCE FormPackage)

Update IFR default setting in Form Package.

Parameters
FormPackageForm Package to be updated

Definition at line 882 of file Database.c.

Variable Documentation

◆ gConfigRespSize

UINTN gConfigRespSize = 0

Definition at line 16 of file Database.c.

◆ gDatabaseInfoSize

UINTN gDatabaseInfoSize = 0

Definition at line 15 of file Database.c.

◆ gExportConfigResp

BOOLEAN gExportConfigResp = FALSE

Definition at line 17 of file Database.c.

◆ gNvDefaultStoreSize

UINTN gNvDefaultStoreSize = 0

Definition at line 18 of file Database.c.

◆ gRTConfigRespBuffer

EFI_STRING gRTConfigRespBuffer = NULL

Definition at line 14 of file Database.c.

◆ gRTDatabaseInfoBuffer

EFI_HII_PACKAGE_LIST_HEADER* gRTDatabaseInfoBuffer = NULL

Definition at line 13 of file Database.c.

◆ gSkuId

SKU_ID gSkuId = 0xFFFFFFFFFFFFFFFF

Definition at line 19 of file Database.c.

◆ gVarStorageList

LIST_ENTRY gVarStorageList = INITIALIZE_LIST_HEAD_VARIABLE (gVarStorageList)

Definition at line 20 of file Database.c.

◆ mHiiDatabaseLock

EFI_LOCK mHiiDatabaseLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_NOTIFY)

Definition at line 25 of file Database.c.