template <class... Items>
class EfiBootShim
Defined at line 125 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/efi-boot-shim.h
This has the boot_shim::BootShim
<
...> API with additional features. It
implicitly includes the EFI-based items listed above as well as any others
given in the Items... list, for use with Get
<
...> et al. It also implicitly
provides a special ZBI_TYPE_MEM_CONFIG item generated from EFI data, but not
part of the usual per-item API. Instead, that item is handled specially as
part of the LoadAndBoot() method, described below.
Public Methods
void EfiBootShim<Items...> (const char * name, FILE * log)
Defined at line 135 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/efi-boot-shim.h
void EfiBootShim<Items...> (const char * name, FILE * log)
Defined at line 135 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/efi-boot-shim.h
template <typename... T>
bool Check (const char * what, const fit::result<efi_status, T...> & result)
Defined at line 140 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/efi-boot-shim.h
template <typename... T>
bool Check (const char * what, const fit::result<efi_status, T...> & result)
Defined at line 140 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/efi-boot-shim.h
template <typename... T>
bool Check (const char * what, const fit::result<efi_status, T...> & result)
Defined at line 140 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/efi-boot-shim.h
fit::result<Error> Init (efi_system_table * systab)
Initialize the shim items using the UEFI System Table. This
initializes all the standard item types from EfiBootShimBase.
Each of Items... may have one of these methods:
* void Init(efi_system_table* systab, const char* shim_name, FILE* log);
* fit::result
<efi
_status> Init(efi_system_table* systab,
const char* shim_name, FILE* log);
* fit::result
<Error
> Init(efi_system_table* systab,
const char* shim_name, FILE* log);
Each item that does will have its method called here. The caller of this
Init() method is responsible for initializing any items that use different
Init() signatures.
Defined at line 160 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/efi-boot-shim.h
const std::optional<acpi_lite::AcpiParser> & acpi ()
If Init() found ACPI tables via the UEFI tables, this will be set.
Defined at line 180 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/efi-boot-shim.h
Error LoadAndBoot (efi_boot_services * boot_services, efi_handle image_handle, LoadFunction load, LastChanceFunction last_chance, BootFunction boot)
This manages the entire loading and booting sequence via callbacks.
It only returns for error cases.
First, it loads and split the input ZBI and prepare the data ZBI with shim
items. The load function is called with the extra data capacity to leave
in the DataZbi for shim items. It may be called multiple times if the
capacity has to be increased. It should return the DataZbi container
loaded from the input ZBI with at least that much capacity remaining.
This will then append all the shim items, and call ExitBootServices()
immediately after calling last_chance(). This is final opportunity to use
UEFI Boot Services and prevent booting; it's the place for final logging.
After ExitBootServices succeeds, boot(zbi) is called with the final
location of the data ZBI, and must not return. It should immediately boot
into the new kernel without doing anything that might attempt to use UEFI
calls. (This is why it's done via callback rather than returning to the
caller, where many destructors would ordinarily run.)
Defined at line 198 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/efi-boot-shim.h
Error LoadAndBoot (efi_boot_services * boot_services, efi_handle image_handle, LoadFunction load, LastChanceFunction last_chance, BootFunction boot)
This manages the entire loading and booting sequence via callbacks.
It only returns for error cases.
First, it loads and split the input ZBI and prepare the data ZBI with shim
items. The load function is called with the extra data capacity to leave
in the DataZbi for shim items. It may be called multiple times if the
capacity has to be increased. It should return the DataZbi container
loaded from the input ZBI with at least that much capacity remaining.
This will then append all the shim items, and call ExitBootServices()
immediately after calling last_chance(). This is final opportunity to use
UEFI Boot Services and prevent booting; it's the place for final logging.
After ExitBootServices succeeds, boot(zbi) is called with the final
location of the data ZBI, and must not return. It should immediately boot
into the new kernel without doing anything that might attempt to use UEFI
calls. (This is why it's done via callback rather than returning to the
caller, where many destructors would ordinarily run.)
Defined at line 198 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/efi-boot-shim.h
Error LoadAndBoot (efi_boot_services * boot_services, efi_handle image_handle, LoadFunction load, LastChanceFunction last_chance, BootFunction boot)
This manages the entire loading and booting sequence via callbacks.
It only returns for error cases.
First, it loads and split the input ZBI and prepare the data ZBI with shim
items. The load function is called with the extra data capacity to leave
in the DataZbi for shim items. It may be called multiple times if the
capacity has to be increased. It should return the DataZbi container
loaded from the input ZBI with at least that much capacity remaining.
This will then append all the shim items, and call ExitBootServices()
immediately after calling last_chance(). This is final opportunity to use
UEFI Boot Services and prevent booting; it's the place for final logging.
After ExitBootServices succeeds, boot(zbi) is called with the final
location of the data ZBI, and must not return. It should immediately boot
into the new kernel without doing anything that might attempt to use UEFI
calls. (This is why it's done via callback rather than returning to the
caller, where many destructors would ordinarily run.)
Defined at line 198 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/efi-boot-shim.h
Error LoadAndBoot (efi_boot_services * boot_services, efi_handle image_handle, LoadFunction load, LastChanceFunction last_chance, BootFunction boot)
This manages the entire loading and booting sequence via callbacks.
It only returns for error cases.
First, it loads and split the input ZBI and prepare the data ZBI with shim
items. The load function is called with the extra data capacity to leave
in the DataZbi for shim items. It may be called multiple times if the
capacity has to be increased. It should return the DataZbi container
loaded from the input ZBI with at least that much capacity remaining.
This will then append all the shim items, and call ExitBootServices()
immediately after calling last_chance(). This is final opportunity to use
UEFI Boot Services and prevent booting; it's the place for final logging.
After ExitBootServices succeeds, boot(zbi) is called with the final
location of the data ZBI, and must not return. It should immediately boot
into the new kernel without doing anything that might attempt to use UEFI
calls. (This is why it's done via callback rather than returning to the
caller, where many destructors would ordinarily run.)
Defined at line 198 of file ../../zircon/kernel/phys/lib/boot-shim/include/lib/boot-shim/efi-boot-shim.h