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