On 01.08.2023 16:30, Oleksii Kurochko wrote:
> @@ -54,3 +70,17 @@ ENTRY(reset_stack)
>  
>          ret
>  
> +        .section .text.ident, "ax", %progbits
> +
> +ENTRY(turn_on_mmu)
> +        sfence.vma
> +
> +        li      t0, RV_STAGE1_MODE
> +        slli    t0, t0, SATP_MODE_SHIFT
> +
> +        la      t1, stage1_pgtbl_root
> +        srl     t1, t1, PAGE_SHIFT

I think it would be good to be consistent in the use of pseudo insns:
Above you use slli, so here it would want to be srli (or the other
way around).

Jan

> +        or      t1, t1, t0
> +        csrw    CSR_SATP, t1
> +
> +        jr      a0


Reply via email to