rpi3: fix RPI3_PRELOADED_DTB_BASE usage
authorIgor Opaniuk <igor.opaniuk@linaro.org>
Wed, 16 Jan 2019 21:59:41 +0000 (23:59 +0200)
committerIgor Opaniuk <igor.opaniuk@linaro.org>
Wed, 16 Jan 2019 22:15:56 +0000 (00:15 +0200)
commiteabbdafe9106f3f91caa160c9f10754c3cad7973
tree1a28dc39b330fe3c4d1f4b059df89a2edc83f453
parentedcb50abe7b4a4e168a36e12168bf5e7a8b28700
rpi3: fix RPI3_PRELOADED_DTB_BASE usage

In case if `RPI3_PRELOADED_DTB_BASE` isn't defined explicitly with
proper pre-loaded DTB address, `add_define` macro defined in
`make_helpers/build_macros.mk` still supplies this definition to the
compiler like `-DRPI3_PRELOADED_DTB_BASE`, and it's obviously is set to
default value 1.

This simply leads to the wrong `MAP_NS_DTB` region definition (base_va
is set `0x1` instead of `0x00010000`) in `plat/rpi3/rpi3_common.c`:

Which causes aligment check to fail in `mmap_add_region_check()`:
VERBOSE: base_pa: 0x00000001, base_va: 0x00000001, size: 0x00010000
...
ERROR:   mmap_add_region_check() failed. error -22

Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
plat/rpi3/platform.mk
plat/rpi3/rpi3_bl31_setup.c