Type Alias r_efi::base::ImageEntryPoint

source ยท
pub type ImageEntryPoint = extern "efiapi" fn(_: Handle, _: *mut SystemTable) -> Status;
Expand description

Application Entry Point

This type defines the entry-point of UEFI applications. It is ABI and cannot be changed. Whenever you load UEFI images, the entry-point is called with this signature.

In most cases the UEFI image (or application) is unloaded when control returns from the entry point. In case of UEFI drivers, they can request to stay loaded until an explicit unload.

The system table is provided as mutable pointer. This is, because there is no guarantee that timer interrupts do not modify the table. Furthermore, exiting boot services causes several modifications on that table. And lastly, the system table lives longer than the function invocation, if invoked as an UEFI driver. In most cases it is perfectly fine to cast the pointer to a real rust reference. However, this should be an explicit decision by the caller.