On Fri, Jul 04, 2025 at 09:54:27AM +0000, Michal Orzel wrote:
> Harden the code by panicing if direct map is too small for current memory

NIT: s/panicing/panicking

> layout taking into account possible PDX compression. Otherwise the assert
> is observed:
> Assertion '(mfn_to_pdx(maddr_to_mfn(ma)) - directmap_base_pdx) < 
> (DIRECTMAP_SIZE >> PAGE_SHIFT)' failed at ./arch/arm/include/asm/mmu/mm.h:72
> 
> At the moment, we don't set max_pdx denoting maximum usable PDX which
> should be based on max_page. Consolidate setting of max_page and max_pdx
> in init_pdx() for both arm32 and arm64. max_pdx will be used in the
> future to set up frametable mappings respecting the PDX grouping.
> 
> Signed-off-by: Michal Orzel <michal.or...@amd.com>
Reviewed-by: Hari Limaye <hari.lim...@arm.com>
Tested-by: Hari Limaye <hari.lim...@arm.com>

LGTM! Tested (compilation) via both Arm AArch32 and AArch64 builds.

Many thanks,
Hari

Reply via email to