ableos/kernel/src/arch/aarch64/mod.rs

28 lines
489 B
Rust

//!
use core::ptr;
#[no_mangle]
unsafe extern "C" fn _kernel_start() -> ! {
const UART0: *mut u8 = 0x0900_0000 as *mut u8;
let out_str = b"AArch64 Bare Metal";
for byte in out_str {
unsafe {
ptr::write_volatile(UART0, *byte);
}
}
loop {}
}
pub fn log(_args: core::fmt::Arguments<'_>) -> core::fmt::Result {
panic!()
}
pub fn sloop() -> ! {
loop {}
}
pub fn hardware_random_u64() -> u64 {
0
}
pub const PAGE_SIZE: usize = 10;