Hi Diego,

On Monday, 28 September 2026 at 01:39, Diego Meretta <[email protected]> 
wrote:

> Rework of the previously sent patch, with the review comments
> addressed: ceiling division for the kernel superpage count, a 1GiB
> gigapage direct map over phys_mem_start + phys_mem_size with every PA
> mapped at DIRECT_MAP_VA_BASE + PA (phystokv contract) and RW
> permissions, a temporary identity map so execution survives enabling
> satp, and kernel_virtual_start placed after the kernel image mapping.
> 

Thanks for your patch! This revision looks good, and I applied it.

> While testing this locally I found an issue that prevents the kernel
> from reaching this code at all with the current toolchain defaults.
> If this looks good, I will send the next patch about that finding.
> 

Could you kindly pull latest changes in the branch high-address-kernel 
and confirm whether the issue still persists? I found a problem that 
only occurs when the kernel is compiled with -O0 and subsequently fixed 
it. If that fix is unrelated, I will be glad to hear the issue you are 
running into and try reproducing it in my testing setup.

I am currently able to build and reach the GNU Mach banner on QEMU after 
pmap_bootstrap.

> * riscv64/riscv64/pmap.c: Include <string.h> and <riscv64/proc_reg.h>.
> (pmap_bootstrap): Implement Sv39 bootstrap.
> * riscv64/riscv64/pmap.h (RISCV_L1_SPAN, RISCV_L2_SPAN, round_l1,
> trunc_l1, round_l2, trunc_l2, RISCV_PTE_LEAF_RWX, RISCV_PTE_LEAF_RW):
> New macros.
>
> [...]
>
> --
> 2.43.0

Hakan

Reply via email to