--- zzzz-none-000/linux-4.19.183/arch/arm/mm/init.c 2021-03-24 10:07:39.000000000 +0000 +++ bcm63-7530ax-756/linux-4.19.183/arch/arm/mm/init.c 2023-06-28 08:54:18.000000000 +0000 @@ -296,7 +296,10 @@ if (mdesc->reserve) mdesc->reserve(); + avm_mtdram_mem_reserve(); + early_init_fdt_reserve_self(); + early_init_fdt_scan_reserved_mem(); /* reserve memory for DMA contiguous allocations */ @@ -773,8 +776,12 @@ static inline void fix_kernmem_perms(void) { } #endif /* CONFIG_STRICT_KERNEL_RWX */ -void free_initmem(void) +void __init avm_mtd_cleanup(void) __weak; +void __init avm_mtd_cleanup(void) {} + +void __ref free_initmem(void) { + avm_mtd_cleanup(); fix_kernmem_perms(); poison_init_mem(__init_begin, __init_end - __init_begin);