• Huacai Chen's avatar
    LoongArch: Jump to the link address before enable PG · ab2579d7
    Huacai Chen authored
    The kernel entry points of both boot CPU (i.e., kernel_entry) and non-
    boot CPUs (i.e., smpboot_entry) may be physical address from BootLoader
    (in DA mode or identity-mapping PG mode). So we should jump to the link
    address before PG enabled (because DA is disabled at the same time) and
    just after DMW configured.
    
    Specifically: With some older firmwares, non-boot CPUs started with PG
    enabled, but this need firmware cooperation in the form of a temporary
    page table, which is deemed unnecessary. OTOH, latest firmware versions
    configure the non-boot CPUs to start in DA mode, so kernel-side changes
    are needed.
    Reviewed-by: default avatarWANG Xuerui <git@xen0n.name>
    Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
    ab2579d7
head.S 2.37 KB