Fix sections to map

As highlighted by z08053520@126.com, MMU mapping functions tee_mmu_is_mapped()
and tee_mmu_map_io() wrongly compute the number of sections to check / map.

This patch checks / maps only the relevant sections.

Signed-off-by: Pascal Brand <pascal.brand@st.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: SkyZhang <z08053520@126.com>
Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
1.Fix user heap corruption by usr_params

Avoids corruption of heap by usr_params, and vice versa, when
stack_size+heap_size is a multiple of 1 MiB. usr_params was
previously unintentionally stored just outside the allocated
stack. If there is not enough padding between stack and heap,
usr_params will overwrite a part of the heap.

2.remove the 1MB limitation of heap_size+stack_size

Signed-off-by: "Rock P. Zhang" <RockPZhang@viatech.com.cn>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
core_tlb_maintenance(TLBINV_BY_ASID) is on

It also contains code style cleanup

Signed-off-by: Pascal Brand <pascal.brand@st.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)