arm64 page size的设置

在arch/arm64/include/asm/page-def.h路径中有如下定义, 通过CONFIG_ARM64_PAGE_SHIFT来指定
/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT      CONFIG_ARM64_PAGE_SHIFT
#define PAGE_SIZE       (_AC(1, UL) << PAGE_SHIFT)
#define PAGE_MASK       (~(PAGE_SIZE-1))
可以在build/include/generated/autoconf.h看到代码里生成的page shift的大小,具体配置在arch/arm64/Kconfig中, 默认为12,也就是默认页面大小为4KiB
choice
    prompt "Page size"
    default ARM64_4K_PAGES
    help
      Page size (translation granule) configuration.
config ARM64_4K_PAGES
    bool "4KB"
    help
      This feature enables 4KB pages support.

config ARM64_16K_PAGES
    bool "16KB"
    help
      The system will use 16KB pages support. AArch32 emulation
      requires applications compiled with 16K (or a multiple of 16K)
      aligned segments.

config ARM64_64K_PAGES
    bool "64KB"
    help
      This feature enables 64KB pages support (4KB by default)
      allowing only two levels of page tables and faster TLB
      look-up. AArch32 emulation requires applications compiled
      with 64K aligned segments.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值