pub fn init(st: &SystemTable<Boot>) -> Result {
    unsafe {
        // Avoid double initialization.
        if SYSTEM_TABLE.is_some() {
            return Status::SUCCESS.into();
        }

        // Setup the system table singleton
        SYSTEM_TABLE = Some(st.unsafe_clone());

        // Setup logging and memory allocation
        let boot_services = st.boot_services();
        init_logger(st);
        uefi::alloc::init(boot_services);

        // Schedule these tools to be disabled on exit from UEFI boot services
        boot_services
            .create_event(
                EventType::SIGNAL_EXIT_BOOT_SERVICES,
                Tpl::NOTIFY,
                Some(exit_boot_services),
            )
            .map_inner(|_| ())
    }
}
/// Initialize the UEFI utility library.
///
/// This must be called as early as possible,
/// before trying to use logging or memory allocation capabilities.
Initialize the UEFI utility library.
This must be called as early as possible,
before trying to use logging or memory allocation capabilities.
Initialize the UEFI utility library . This must be called as early as possible before trying to use logging or memory allocation capabilities .
pub fn init(st: &SystemTable<Boot>) -> Result {
    unsafe {
        // Avoid double initialization.
        if SYSTEM_TABLE.is_some() {
            return Status::SUCCESS.into();
        }
        // Setup the system table singleton
        SYSTEM_TABLE = Some(st.unsafe_clone());
        // Setup logging and memory allocation
        let boot_services = st.boot_services();
        init_logger(st);
        uefi::alloc::init(boot_services);
        // Schedule these tools to be disabled on exit from UEFI boot services
        boot_services
            .create_event(
                EventType::SIGNAL_EXIT_BOOT_SERVICES,
                Tpl::NOTIFY,
                Some(exit_boot_services),
            )
            .map_inner(|_| ())
    }
}
pub fn init ( st : & SystemTable < Boot > ) -> Result { unsafe { // Avoid double initialization. if SYSTEM_TABLE . is_some ( ) { return Status :: SUCCESS . into ( ) ; } // Setup the system table singleton SYSTEM_TABLE = Some ( st . unsafe_clone ( ) ) ; // Setup logging and memory allocation let boot_services = st . boot_services ( ) ; init_logger ( st ) ; uefi :: alloc :: init ( boot_services ) ; // Schedule these tools to be disabled on exit from UEFI boot services boot_services . create_event ( EventType :: SIGNAL_EXIT_BOOT_SERVICES , Tpl :: NOTIFY , Some ( exit_boot_services ) , ) . map_inner ( | _ | ( ) ) } }
Initialize the UEFI utility library.
Initialize the UEFI utility library .
st
&SystemTable<Boot>