#![no_std] #![allow(dead_code)] #[path = "../../src/nvidia/kernel/pf_software.rs"] mod pf_software; #[path = "../../src/nvidia/kernel/registry.rs"] mod registry; #[path = "../../src/nvidia/kernel/software_manager.rs"] mod software_manager; #[path = "../../src/nvidia/kernel/system_os.rs"] mod system_os; #[path = "../../src/nvidia/kernel/system_platform.rs"] mod system_platform; use core::num::NonZeroU64; use software_manager::Manager; #[unsafe(no_mangle)] pub static SM_INIT: fn(nv_rs_core::hypervisor::HypervisorType) -> Result<(), i32> = software_manager::initialize; #[unsafe(no_mangle)] pub static SM_SHUT: fn() -> Result<(), i32> = software_manager::shutdown; #[unsafe(no_mangle)] pub static SM_RANGE: fn(&mut Manager) -> Result = Manager::reserve_device_range; #[unsafe(no_mangle)] pub static SM_KEY: fn(&mut Manager) -> Result = Manager::allocate_timeout_key; fn scoped_key() -> Result { software_manager::with(|m| m.allocate_timeout_key().map(|id| id.0)) } #[unsafe(no_mangle)] pub static SM_WITH: fn() -> Result = scoped_key; #[panic_handler] fn panic(_: &core::panic::PanicInfo<'_>) -> ! { unsafe { core::arch::asm!("ud2", options(noreturn, nostack)) } }