qemu: Simplify the image size calculation
Patch introduce the macro NS_IMAGE_MAX_SIZE to simplify the image size
calculation. Use of additional parenthesis removes the possibility of
improper calculations due nested macro expansion for subtraction.
In case of platforms with DRAM window over 32bits, patch also removes
potential problems with type casting, as meminfo.image_size is uint32_t
but macro calculations were done in 64bit space.

Signed-off-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
Change-Id: I2d05a2d9dd6000dba6114df53262995cf85af018
1 parent 301d27d commit 9a006ad10509cf158089470ef713f7edde073eaf
@Radoslaw Biernacki Radoslaw Biernacki authored on 17 May 2018
Sandrine Bailleux committed on 18 Sep 2019
Showing 2 changed files
View
plat/qemu/common/qemu_bl2_mem_params_desc.c
View
plat/qemu/qemu/include/platform_def.h