diff --git a/uefi/src/runtime.rs b/uefi/src/runtime.rs index 56015bc60..49ff3ff6c 100644 --- a/uefi/src/runtime.rs +++ b/uefi/src/runtime.rs @@ -5,10 +5,16 @@ //! functions after exiting boot services; see the "Calling Convention" section //! of the UEFI specification for details. -use crate::table::{self}; -use crate::{Result, StatusExt}; +use crate::table::boot::MemoryDescriptor; +use crate::table::runtime::{ + ResetType, RuntimeServices, VariableAttributes, VariableStorageInfo, VariableVendor, +}; +use crate::{table, CStr16, Result, Status, StatusExt}; use core::ptr::{self, NonNull}; +#[cfg(feature = "alloc")] +use {crate::table::runtime::VariableKey, alloc::boxed::Box, alloc::vec::Vec}; + pub use crate::table::runtime::{Daylight, Time, TimeCapabilities, TimeError, TimeParams}; fn runtime_services_raw_panicking() -> NonNull { @@ -18,6 +24,14 @@ fn runtime_services_raw_panicking() -> NonNull NonNull { + let st = table::system_table_runtime().expect("runtime services are not available"); + let ptr: *const _ = unsafe { st.runtime_services() }; + NonNull::new(ptr.cast_mut()).unwrap() +} + /// Query the current time and date information. pub fn get_time() -> Result