1
0
Fork 0
forked from AbleOS/ableos
ableos/kernel/src/arch/aarch64/mod.rs

28 lines
489 B
Rust
Raw Normal View History

2023-07-13 22:41:09 -05:00
//!
use core::ptr;
2023-07-13 22:41:09 -05:00
#[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;