QEMU AArch64 Virt Bare Bones with Kernel in Assembly
Posted: Sat Mar 16, 2024 2:39 pm
Hello,
I am starting my OSDev journey and I was really happy to find the barebones for the QEmu virt platform, so thank you very much for that.
I myself am trying to build a basic OS for ARMv8 AArch64 using assembly only so I spent some time porting the code you provided for the kernel.c file to assembly.
Here is the result, feel free to add it to the page if you believe it might be a nice addition.
Kind regards.
I am starting my OSDev journey and I was really happy to find the barebones for the QEmu virt platform, so thank you very much for that.
I myself am trying to build a basic OS for ARMv8 AArch64 using assembly only so I spent some time porting the code you provided for the kernel.c file to assembly.
Here is the result, feel free to add it to the page if you believe it might be a nice addition.
Kind regards.
Code: Select all
.global kmain
.data
uartdr: .quad 0x9000000
message: .asciz "Hello, World!"
.text
print:
ldr x2, [x0]
cmp x2, #0
beq end
strb w2, [x1]
add x0, x0, #1
bl print
end:
ret
kmain:
ldr x0, =message
ldr x1, uartdr
bl print