mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
efi_loader: let the variable driver patch out the runtime
Our variable services are only provided at boottime. Therefore when leaving boottime the variable function are replaced by dummy functions returning EFI_UNSUPPORTED. Move this patching of the runtime table to the variable services implementation. Executed it in ExitBootServices(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
24a238f763
commit
29018abb09
4 changed files with 48 additions and 10 deletions
|
@ -548,6 +548,50 @@ efi_status_t __efi_runtime EFIAPI efi_query_variable_info(
|
|||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
/**
|
||||
* efi_get_variable_runtime() - runtime implementation of GetVariable()
|
||||
*/
|
||||
static efi_status_t __efi_runtime EFIAPI
|
||||
efi_get_variable_runtime(u16 *variable_name, const efi_guid_t *vendor,
|
||||
u32 *attributes, efi_uintn_t *data_size, void *data)
|
||||
{
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
/**
|
||||
* efi_get_next_variable_name_runtime() - runtime implementation of
|
||||
* GetNextVariable()
|
||||
*/
|
||||
static efi_status_t __efi_runtime EFIAPI
|
||||
efi_get_next_variable_name_runtime(efi_uintn_t *variable_name_size,
|
||||
u16 *variable_name, const efi_guid_t *vendor)
|
||||
{
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
/**
|
||||
* efi_set_variable_runtime() - runtime implementation of SetVariable()
|
||||
*/
|
||||
static efi_status_t __efi_runtime EFIAPI
|
||||
efi_set_variable_runtime(u16 *variable_name, const efi_guid_t *vendor,
|
||||
u32 attributes, efi_uintn_t data_size,
|
||||
const void *data)
|
||||
{
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
/**
|
||||
* efi_variables_boot_exit_notify() - notify ExitBootServices() is called
|
||||
*/
|
||||
void efi_variables_boot_exit_notify(void)
|
||||
{
|
||||
efi_runtime_services.get_variable = efi_get_variable_runtime;
|
||||
efi_runtime_services.get_next_variable_name =
|
||||
efi_get_next_variable_name_runtime;
|
||||
efi_runtime_services.set_variable = efi_set_variable_runtime;
|
||||
efi_update_table_header_crc32(&efi_runtime_services.hdr);
|
||||
}
|
||||
|
||||
/**
|
||||
* efi_init_variables() - initialize variable services
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue