From a7716bd80e8db2d4f461b3921864ed82a5a0e01c Mon Sep 17 00:00:00 2001 From: Miguel Silva Date: Wed, 27 Nov 2024 11:37:58 +0000 Subject: [PATCH] fix(linker): Extra memory removed from dmem_phys_beg For non-mmu system, extra memory was being allocated for the vms. This space is only required in mmu-based systems. For MPU ones, this space is already allocated between vm_image_start and vm_image_end. Signed-off-by: Miguel Silva --- src/linker.ld | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/linker.ld b/src/linker.ld index 0c4bcea2..80d3fff3 100644 --- a/src/linker.ld +++ b/src/linker.ld @@ -89,7 +89,12 @@ SECTIONS . = ALIGN(PAGE_SIZE); _image_end = ABSOLUTE(.); + +#ifdef MEM_PROT_MMU _dmem_phys_beg = ABSOLUTE(.) + extra_allocated_phys_mem; +#else + _dmem_phys_beg = ABSOLUTE(.); +#endif . = ALIGN(PAGE_SIZE); _dmem_beg = ABSOLUTE(.);