Reposting because I forgot to CC the mailing list. Sorry for the duplicate.
-- Hi Diego, Sorry for my late reply. I moved to Germany last week, and I could only now start looking at my stuff. On Wednesday, 21 October 2026 at 01:19, Santi cluke <[email protected]> wrote: > Hi Hakan, > > dtb_load() currently keeps the raw pointer OpenSBI passes in a1. Once > the lower identity mapping is removed (keeping only the direct map of > RAM), that pointer is no longer safe to dereference. On QEMU virt the > DTB sits in RAM, inside the region whose identity mapping would go > away. > > How should the kernel reach the DTB from then on? > > (a) through the direct map, i.e. phystokv(dtb), leaving the blob > where the firmware put it (this is what the aarch64 port does); > (b) copy it into allocated memory before the switch and use the copy. > > Which approach do you prefer? I prefer the former. > > Regards, > Diego Today I implemented pmap_map_bd and pmap_enter, you can take a look if you want. The kernel now reaches to machine_init and the UART driver works as expected, through virtual memory this time. This week I'll take a look at implementing jumping-to-high-memory and removing the identity mapping. It should be quite straightforward. We already have the virtual memory mapping ready. After that, I _think_ we can start looking at thread-state saving and interrupts. If something else depends on that, we need to check that too. I will check the aarch64 port again and see what Sergey does. We are now entering Mach territory that I am not familiar with, so I will need to read a bit. Hakan
