Tables
UEFI has a few table structures. These tables are how you get access to UEFI
services. In the specification and C API, EFI_SYSTEM_TABLE is the top-level
table that provides access to the other tables, EFI_BOOT_SERVICES and
EFI_RUNTIME_SERVICES.
In the uefi crate, these tables are modeled as modules rather than structs. The
functions in each module make use of a global pointer to the system table that
is set automatically by the entry macro.
-
uefi::system(EFI_SYSTEM_TABLEin the specification) provides access to system information such as the firmware vendor and version. It can also be used to access stdout/stderr/stdin. -
uefi::boot(EFI_BOOT_SERVICESin the specification) provides access to a wide array of services such as memory allocation, executable loading, and optional extension interfaces called protocols. Functions in this module can only be used while in the Boot Services stage. Afterexit_boot_serviceshas been called, these functions will panic. -
uefi::runtime(EFI_RUNTIME_SERVICESin the specification) provides access to a fairly limited set of services, including variable storage, system time, and virtual-memory mapping. Functions in this module are accessible during both the Boot Services and Runtime stages.