Struct uefi::table::runtime::RuntimeServices [−][src]
#[repr(C)]pub struct RuntimeServices { /* fields omitted */ }
Expand description
Contains pointers to all of the runtime services.
This table, and the function pointers it contains are valid even after the UEFI OS loader and OS have taken control of the platform.
Implementations
Query the current time and date information and the RTC capabilities
Sets the current local time and date information
During runtime, if a PC-AT CMOS device is present in the platform, the
caller must synchronize access to the device before calling set_time
.
Safety
Undefined behavior could happen if multiple tasks try to use this function at the same time without synchronisation.
Changes the runtime addressing mode of EFI firmware from physical to virtual.
Safety
Setting new virtual memory map is unsafe and may cause undefined behaviors.
Get the size (in bytes) of a variable. This can be used to find out how
big of a buffer should be passed in to get_variable
.
pub fn get_variable<'a>(
&self,
name: &CStr16,
vendor: &Guid,
buf: &'a mut [u8]
) -> Result<(&'a [u8], VariableAttributes)>
pub fn get_variable<'a>(
&self,
name: &CStr16,
vendor: &Guid,
buf: &'a mut [u8]
) -> Result<(&'a [u8], VariableAttributes)>
Get the contents and attributes of a variable. The size of buf
must
be at least as big as the variable’s size, although it can be
larger. If it is too small, BUFFER_TOO_SMALL
is returned.
On success, a tuple containing the variable’s value (a slice of buf
)
and the variable’s attributes is returned.
pub fn set_variable(
&self,
name: &CStr16,
vendor: &Guid,
attributes: VariableAttributes,
data: &[u8]
) -> Result
pub fn set_variable(
&self,
name: &CStr16,
vendor: &Guid,
attributes: VariableAttributes,
data: &[u8]
) -> Result
Set the value of a variable. This can be used to create a new variable,
update an existing variable, or (when the size of data
is zero)
delete a variable.