1
私はLinuxカーネルを読んでいますが、私はMMU関連の部分に興味があります。Linuxカーネルmmu create_page_tables
__create_page_tables:
pgtbl x25, x26, x28 // idmap_pg_dir and swapper_pg_dir addresses
mov x27, lr
/*
* Invalidate the idmap and swapper page tables to avoid potential
* dirty cache lines being evicted.
*/
mov x0, x25
add x1, x26, #SWAPPER_DIR_SIZE
bl __inval_cache_range
/*
* Clear the idmap and swapper page tables.
*/
mov x0, x25
add x6, x26, #SWAPPER_DIR_SIZE
1: stp xzr, xzr, [x0], #16
stp xzr, xzr, [x0], #16
stp xzr, xzr, [x0], #16
stp xzr, xzr, [x0], #16
cmp x0, x6
b.lo 1b
ldr x7, =MM_MMUFLAGS
/*
* Create the identity mapping.
*/
**add x0, x25, #PAGE_SIZE // section table address**
ldr x3, =KERNEL_START
add x3, x3, x28 // __pa(KERNEL_START)
create_pgd_entry x25, x0, x3, x5, x6
ldr x6, =KERNEL_END
mov x5, x3 // __pa(KERNEL_START)
add x6, x6, x28 // __pa(KERNEL_END)
create_block_map x0, x7, x3, x5, x6
私はこのコードを理解していない:ARM64のCPUでは、以下のコードがある
add x0, x25, #PAGE_SIZE
私の理解ではx25
あるアドレスidmap_pg_dir
であり、我々はPAGE_SIZE
を追加する必要はありませんそれに。 PAGE_SIZE
をx25
に追加するのはなぜですか?