//! boom — crash-containment probe (ADR 0006 Phase 2 gate). //! //! Deliberately faults on an unmapped address. The kernel must kill only //! this task; the shell survives and `jobs` shows the corpse. #![no_std] #![no_main] #[panic_handler] fn panic(_info: &core::panic::PanicInfo) -> ! { loop { core::hint::spin_loop(); } } /// The image entry point — the loader jumps here with the ABI arguments. #[unsafe(no_mangle)] pub extern "C" fn efi_main( _exports: &'static rsapi::Exports, _argc: usize, _argv: *const rsapi::Arg, ) -> i32 { // Canonical-but-unmapped address (below 2^47, above any RAM/MMIO): // the page walk terminates at a not-present entry → #PF with // CR2 = address. Same trick as the built-in `fault` command. unsafe { let p = 0x4000_0000_0000usize as *mut u64; p.write_volatile(0xDEAD_BEEF); } 0 }