Boot services are services provided by the system’s firmware until the operating system takes over control over the hardware by calling exitBootServices.
Boot Services must not be used after exitBootServices has been called. The only exception is getMemoryMap, which may be used after the first unsuccessful call to exitBootServices. After successfully calling exitBootServices, system_table.console_in_handle, system_table.con_in, system_table.console_out_handle, system_table.con_out, system_table.standard_error_handle, system_table.std_err, and system_table.boot_services should be set to null. After setting these attributes to null, system_table.hdr.crc32 must be recomputed.
As the boot_services table may grow with new UEFI versions, it is important to check hdr.header_size.
Fields
hdr: TableHeader,
raiseTpl: *const fn (usize) callconv(cc) usize,
Raises a task’s priority level and returns its previous level.
restoreTpl: *const fn (usize) callconv(cc) void,
Restores a task’s priority level to its previous value.
allocatePages: *const fn (AllocateType, MemoryType, usize, *[*]align(4096) u8) callconv(cc) Status,
Allocates memory pages from the system.
getMemoryMap: *const fn (*usize, ?[*]MemoryDescriptor, *usize, *usize, *u32) callconv(cc) Status,
Returns the current memory map.
allocatePool: *const fn (MemoryType, usize, *[*]align(8) u8) callconv(cc) Status,
Allocates pool memory.
createEvent: *const fn (u32, usize, ?*const fn (Event, ?*anyopaque) callconv(cc) void, ?*const anyopaque, *Event) callconv(cc) Status,
Creates an event.
setTimer: *const fn (Event, TimerDelay, u64) callconv(cc) Status,
Sets the type of timer and the trigger time for a timer event.
Stops execution until an event is signaled.
installProtocolInterface: *const fn (Handle, *const align(8) Guid, EfiInterfaceType, *anyopaque) callconv(cc) Status,
Installs a protocol interface on a device handle. If the handle does not exist, it is created and added to the list of handles in the system. installMultipleProtocolInterfaces() performs more error checking than installProtocolInterface(), so its use is recommended over this.
reinstallProtocolInterface: *const fn (Handle, *const align(8) Guid, *anyopaque, *anyopaque) callconv(cc) Status,
Reinstalls a protocol interface on a device handle
uninstallProtocolInterface: *const fn (Handle, *const align(8) Guid, *anyopaque) callconv(cc) Status,
Removes a protocol interface from a device handle. Usage of uninstallMultipleProtocolInterfaces is recommended over this.
Queries a handle to determine if it supports a specified protocol.
reserved: *anyopaque,
Creates an event that is to be signaled whenever an interface is installed for a specified protocol.
locateHandle: *const fn (LocateSearchType, ?*const align(8) Guid, ?*const anyopaque, *usize, [*]Handle) callconv(cc) Status,
Returns an array of handles that support a specified protocol.
locateDevicePath: *const fn (*const align(8) Guid, **const DevicePathProtocol, *?Handle) callconv(cc) Status,
Locates the handle to a device on the device path that supports the specified protocol
Adds, updates, or removes a configuration table entry from the EFI System Table.
loadImage: *const fn (bool, Handle, ?*const DevicePathProtocol, ?[*]const u8, usize, *?Handle) callconv(cc) Status,
Loads an EFI image into memory.
Transfers control to a loaded image’s entry point.
Terminates a loaded EFI image and returns control to boot services.
Returns a monotonically increasing count for the platform.
Sets the system’s watchdog timer.
connectController: *const fn (Handle, ?Handle, ?*DevicePathProtocol, bool) callconv(cc) Status,
Connects one or more drives to a controller.
openProtocol: *const fn (Handle, *const align(8) Guid, *?*anyopaque, ?Handle, ?Handle, OpenProtocolAttributes) callconv(cc) Status,
Queries a handle to determine if it supports a specified protocol.
Closes a protocol on a handle that was opened using openProtocol().
openProtocolInformation: *const fn (Handle, *const align(8) Guid, *[*]ProtocolInformationEntry, *usize) callconv(cc) Status,
Retrieves the list of agents that currently have a protocol interface opened.
Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated from pool.
locateHandleBuffer: *const fn (LocateSearchType, ?*const align(8) Guid, ?*const anyopaque, *usize, *[*]Handle) callconv(cc) Status,
Returns an array of handles that support the requested protocol in a buffer allocated from pool.
locateProtocol: *const fn (*const align(8) Guid, ?*const anyopaque, *?*anyopaque) callconv(cc) Status,
Returns the first protocol instance that matches the given protocol.
Installs one or more protocol interfaces into the boot services environment
Removes one or more protocol interfaces into the boot services environment
Computes and returns a 32-bit CRC for a data buffer.
copyMem: *const fn ([*]u8, [*]const u8, usize) callconv(cc) void,
Copies the contents of one buffer to another buffer
setMem: *const fn ([*]u8, usize, u8) callconv(cc) void,
Fills a buffer with a specified value
createEventEx: *const fn (u32, usize, EfiEventNotify, *const anyopaque, *const align(8) Guid, *Event) callconv(cc) Status,
Creates an event in a group.
Functions
fn openProtocolSt(self: *BootServices, comptime protocol: type, handle: Handle) !*protocol
Opens a protocol with a structure as the loaded image for a UEFI application