1
0
Fork 0
forked from koniifer/ableos

ARM: Whoe knows

This commit is contained in:
able 2023-07-14 20:00:50 -05:00
parent d8a68aabee
commit 3a62f65cd1
2 changed files with 5 additions and 10 deletions

View file

@ -3,7 +3,8 @@ build-std = ["core", "compiler_builtins", "alloc"]
build-std-features = ["compiler-builtins-mem"] build-std-features = ["compiler-builtins-mem"]
[build] [build]
target = "./targets/x86_64-ableos.json" # target = "./targets/x86_64-ableos.json"
target = "./targets/aarch64-virt-ableos.json"
[target.'cfg(target_arch = "x86_64")'] [target.'cfg(target_arch = "x86_64")']
rustflags = ["-C", "target-feature=+rdrand"] rustflags = ["-C", "target-feature=+rdrand"]

View file

@ -1,15 +1,9 @@
//! //!
use core::ptr;
use limine::{TerminalRequest, TerminalResponse};
#[no_mangle] #[no_mangle]
unsafe extern "C" fn _kernel_start() -> ! { 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 {} loop {}
} }