Platform: Fix boundary MPU region allocation

The Armv8-M implementation of tfm_hal_bind_boundary() increments the
MPU region number before creating the region, which creates a one region
gap after the static regions. Fix it to increment after. Also, move the
MPU disable to after the check to avoid leaving the MPU disabled in case
the check fails and the function returns early.

Signed-off-by: Jamie Fox <jamie.fox@arm.com>
Change-Id: Ib74a64db8f45400792e38df1c5bfdfbe43acfed6
1 file changed