]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 9247/1: mm: set readonly for MT_MEMORY_RO with ARM_LPAE
authorWang Kefeng <wangkefeng.wang@huawei.com>
Fri, 16 Sep 2022 11:10:49 +0000 (12:10 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 22 Sep 2022 07:29:04 +0000 (08:29 +0100)
commit7dce91b9121e660fbb22d061a94ccd1a3ec795fb
treeff75b1aca3add7ca40a8c05ebaf57071e8c03377
parent8df4d66036d136468d8b6642cd368e0aaf6424e9
ARM: 9247/1: mm: set readonly for MT_MEMORY_RO with ARM_LPAE

MT_MEMORY_RO is introduced by commit dfe4cb6c3e20 ("ARM: 9210/1:
Mark the FDT_FIXED sections as shareable"), which is a readonly
memory type for FDT area, but there are some different between
ARM_LPAE and non-ARM_LPAE, we need to setup PMD_SECT_AP2 and
L_PMD_SECT_RDONLY for MT_MEMORY_RO when ARM_LAPE enabled.

non-ARM_LPAE 0xff800000-0xffa00000           2M PGD KERNEL      ro NX SHD
ARM_LPAE 0xff800000-0xffc00000           4M PMD RW NX SHD
ARM_LPAE+fix 0xff800000-0xffc00000           4M PMD ro NX SHD

Fixes: dfe4cb6c3e20 ("ARM: 9210/1: Mark the FDT_FIXED sections as shareable")
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/mm/mmu.c