Home
last modified time | relevance | path

Searched hist:e53d120649d171c1e36abeab2a175db31cb9e63d (Results 1 – 1 of 1) sorted by relevance

/optee_os/core/mm/
H A Dcore_mmu.ce53d120649d171c1e36abeab2a175db31cb9e63d Tue Jul 16 16:31:34 UTC 2024 Jens Wiklander <jens.wiklander@linaro.org> core: add_phys_mem(): fix mergeable physical memory

The test in add_phys_mem() to see if two physical memory ranges can be
merged only checks for overlapping memory ranges, but consecutive ranges
are not detected even if they can be merged. Fix this by also checking
if the byte after the lowest range matches the beginning of the next
range.

The resulting merged entry might be mergeable with the previous or next
entry, so add checks for that and merge if possible.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>