arm: Fix PMSA region mapping with 0x0 end address

A section may span up to the end of the address range.  In this case the
end address is zero.  Use the base address to check if a region should
be before another region.

Update #4202.
This commit is contained in:
Sebastian Huber
2022-06-03 07:40:19 +02:00
parent ed51fad53a
commit 0b9497a6dd

View File

@@ -153,7 +153,7 @@ size_t _AArch32_PMSA_Map_sections_to_regions(
}
}
if ( end <= region_base ) {
if ( base <= region_base ) {
size_t i;
if ( region_used >= region_max ) {