forked from AbleOS/ableos
ARM: Whoe knows
This commit is contained in:
parent
d8a68aabee
commit
3a62f65cd1
|
@ -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"]
|
||||||
|
|
|
@ -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 {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue