Skip to content

Commit

Permalink
fix(linker): Extra memory removed from dmem_phys_beg
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
miguelafsilva5 committed Nov 27, 2024
1 parent 5116da5 commit a7716bd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -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(.);
Expand Down

0 comments on commit a7716bd

Please sign in to comment.