Implement BlGetConfigurationTable() routine
This commit is contained in:
parent
cd59c1e80d
commit
508fd27e92
@ -76,6 +76,7 @@ typedef EFI_STATUS (*PBL_FRAMEBUFFER_GET_DISPLAY_INFORMATION)(OUT PXTBL_FRAMEBUF
|
|||||||
typedef EFI_STATUS (*PBL_FRAMEBUFFER_INITIALIZE)();
|
typedef EFI_STATUS (*PBL_FRAMEBUFFER_INITIALIZE)();
|
||||||
typedef EFI_STATUS (*PBL_FREE_PAGES)(IN ULONGLONG Size, IN EFI_PHYSICAL_ADDRESS Memory);
|
typedef EFI_STATUS (*PBL_FREE_PAGES)(IN ULONGLONG Size, IN EFI_PHYSICAL_ADDRESS Memory);
|
||||||
typedef EFI_STATUS (*PBL_FREE_POOL)(IN PVOID Memory);
|
typedef EFI_STATUS (*PBL_FREE_POOL)(IN PVOID Memory);
|
||||||
|
typedef EFI_STATUS (*PBL_GET_CONFIGURATION_TABLE)(IN PEFI_GUID TableGuid, OUT PVOID *Table);
|
||||||
typedef VOID (*PBL_GET_MAPPINGS_COUNT)(IN PXTBL_PAGE_MAPPING PageMap, OUT PULONG NumberOfMappings);
|
typedef VOID (*PBL_GET_MAPPINGS_COUNT)(IN PXTBL_PAGE_MAPPING PageMap, OUT PULONG NumberOfMappings);
|
||||||
typedef EFI_STATUS (*PBL_GET_MEMORY_MAP)(OUT PEFI_MEMORY_MAP MemoryMap);
|
typedef EFI_STATUS (*PBL_GET_MEMORY_MAP)(OUT PEFI_MEMORY_MAP MemoryMap);
|
||||||
typedef PLIST_ENTRY (*PBL_GET_MODULES_LIST)();
|
typedef PLIST_ENTRY (*PBL_GET_MODULES_LIST)();
|
||||||
@ -354,6 +355,7 @@ typedef struct _XTBL_LOADER_PROTOCOL
|
|||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
PBL_EXIT_BOOT_SERVICES ExitBootServices;
|
PBL_EXIT_BOOT_SERVICES ExitBootServices;
|
||||||
|
PBL_GET_CONFIGURATION_TABLE GetConfigurationTable;
|
||||||
PBL_GET_SECURE_BOOT_STATUS GetSecureBootStatus;
|
PBL_GET_SECURE_BOOT_STATUS GetSecureBootStatus;
|
||||||
PBL_LOAD_EFI_IMAGE LoadEfiImage;
|
PBL_LOAD_EFI_IMAGE LoadEfiImage;
|
||||||
PBL_POWER_SYSTEM RebootSystem;
|
PBL_POWER_SYSTEM RebootSystem;
|
||||||
|
@ -66,6 +66,43 @@ BlExitBootServices()
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the address of a reqested system configuration table.
|
||||||
|
*
|
||||||
|
* @param TableGuid
|
||||||
|
* Supplies a GUID of the configuration table.
|
||||||
|
*
|
||||||
|
* @param Table
|
||||||
|
* Supplies a pointer to the memory area where the table address will be stored.
|
||||||
|
*
|
||||||
|
* @return This routine returns a status code.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTCDECL
|
||||||
|
EFI_STATUS
|
||||||
|
BlGetConfigurationTable(IN PEFI_GUID TableGuid,
|
||||||
|
OUT PVOID *Table)
|
||||||
|
{
|
||||||
|
SIZE_T Index;
|
||||||
|
|
||||||
|
/* Iterate through all system configuration tables */
|
||||||
|
for(Index = 0; Index < EfiSystemTable->NumberOfTableEntries; Index++)
|
||||||
|
{
|
||||||
|
/* Check if this table matches requested table */
|
||||||
|
if(RtlCompareGuids((PGUID)&(EfiSystemTable->ConfigurationTable[Index].VendorGuid), (PGUID)TableGuid))
|
||||||
|
{
|
||||||
|
/* Found requested table, return success */
|
||||||
|
*Table = EfiSystemTable->ConfigurationTable[Index].VendorTable;
|
||||||
|
return STATUS_EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Table not found */
|
||||||
|
*Table = NULL;
|
||||||
|
return STATUS_EFI_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether SecureBoot is enabled or not.
|
* Checks whether SecureBoot is enabled or not.
|
||||||
*
|
*
|
||||||
|
@ -130,6 +130,11 @@ XTCDECL
|
|||||||
PWCHAR
|
PWCHAR
|
||||||
BlGetConfigValue(IN CONST PWCHAR ConfigName);
|
BlGetConfigValue(IN CONST PWCHAR ConfigName);
|
||||||
|
|
||||||
|
XTCDECL
|
||||||
|
EFI_STATUS
|
||||||
|
BlGetConfigurationTable(IN PEFI_GUID TableGuid,
|
||||||
|
OUT PVOID *Table);
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BlGetEfiPath(IN PWCHAR SystemPath,
|
BlGetEfiPath(IN PWCHAR SystemPath,
|
||||||
|
@ -653,6 +653,7 @@ BlpInstallXtLoaderProtocol()
|
|||||||
BlpLdrProtocol.Tui.DisplayProgressDialog = BlDisplayProgressDialog;
|
BlpLdrProtocol.Tui.DisplayProgressDialog = BlDisplayProgressDialog;
|
||||||
BlpLdrProtocol.Tui.UpdateProgressBar = BlUpdateProgressBar;
|
BlpLdrProtocol.Tui.UpdateProgressBar = BlUpdateProgressBar;
|
||||||
BlpLdrProtocol.Util.ExitBootServices = BlExitBootServices;
|
BlpLdrProtocol.Util.ExitBootServices = BlExitBootServices;
|
||||||
|
BlpLdrProtocol.Util.GetConfigurationTable = BlGetConfigurationTable;
|
||||||
BlpLdrProtocol.Util.GetSecureBootStatus = BlGetSecureBootStatus;
|
BlpLdrProtocol.Util.GetSecureBootStatus = BlGetSecureBootStatus;
|
||||||
BlpLdrProtocol.Util.LoadEfiImage = BlLoadEfiImage;
|
BlpLdrProtocol.Util.LoadEfiImage = BlLoadEfiImage;
|
||||||
BlpLdrProtocol.Util.RebootSystem = BlRebootSystem;
|
BlpLdrProtocol.Util.RebootSystem = BlRebootSystem;
|
||||||
|
Loading…
Reference in New Issue
Block a user