Summarize the device tree

This commit is contained in:
2025-07-06 01:04:22 +02:00
parent 98a96fba86
commit ff02f911cd
2 changed files with 176 additions and 29 deletions

View File

@@ -30,11 +30,30 @@ kernel_main:
la t0, kernel_entry
csrw stvec, t0
# unimp
mv a0, a1
call device_tree
# Prepare the kernel root memory table.
la a0, __free_ram
li a1, 8
call write_x
la t0, __free_ram
srli t0, t0, 10
li t1, 0xf0000000
or t0, t0, t1
la t1, __free_ram
sw t0, (t1)
la t0, __free_ram
ori t0, t0, 1
csrw satp, t0
sfence.vma zero, zero
# Do nothing in a loop.
.Lkernel_main:
j .Lkernel_main