首页 > 解决方案 > 关于 Linux 内核分页表

问题描述

我目前正在开发 linux 内核版本 5.10.39。我正在尝试在 arm a-78 cpu 内核上启动 linux 内核。

它成功执行了 head.s 文件中的指令......但是卡在了一条指令上,即 __relocate_kernel 函数中的 cmp x9, x10 。

我在哪里卡在下面定义的功能中。

SYM_FUNC_START_LOCAL(__relocate_kernel)

ldr w9, =__rela_offset  // Offset for the reloc table   
ldr w10, =__rela_size   // Size of the reloc table  

mov_q   x11, KIMAGE_VADDR       // default virtual offset
add x11, x11, x23           // actual virtual offset
add x9, x9, x11         // __va(.rela)
add x10, x9, x10            // __va(.rela) + sizeof(.rela)

cmp x9, x10
b.hs    1f
ldp x12, x13, [x9], #24
ldr x14, [x9, #-8]
cmp w13, #R_AARCH64_RELATIVE
b.ne    0b
add x14, x14, x23           // relocate
str x14, [x12, x23]
b   0b

解决方案是什么?这是 Pagetable 错误吗?

标签: linux-kernelarm

解决方案


推荐阅读