diff options
author | Juan Castillo <juan.castillo@arm.com> | 2015-11-06 10:01:37 +0000 |
---|---|---|
committer | Juan Castillo <juan.castillo@arm.com> | 2015-11-13 10:51:26 +0000 |
commit | 5ea8aa722dfe9f5aa8e5a07b159750c8df880d69 (patch) | |
tree | 799c7c90b5b6d5c483cd5fb2f77020b6ef8e3d6a /include/stdlib/string.h | |
parent | 4266228306de468dff34609581474f2f43d781fa (diff) |
Add NULL pointer check before reading BL32 entry point information
BL2 is responsible for loading BL32 and passing a pointer to the
BL32 entrypoint info to BL31 in the BL31 parameters. If no BL32
image is loaded, a NULL pointer is passed. The platform is
responsible for accessing BL31 parameters and extracting the
corresponding BL32 EP info.
In ARM platforms, arm_bl31_early_platform_setup() dereferences the
pointer to the BL32 EP info without checking first if the pointer
is NULL. This will cause an exception if a BL32 entrypoint has not
been populated by BL2. FVP and Juno are not affected because they
always define BL32_BASE, irrespective of whether a BL32 image is
included in the FIP or not.
This patches fixes the issue by checking the BL32 ep_info pointer
before trying to access the data.
If `RESET_TO_BL31` is enabled, the BL32 entrypoint is not
populated if BL32_BASE is not defined.
NOTE: Maintainers of partner platforms should check for this issue
in their ports.
Fixes ARM-software/tf-issues#320
Change-Id: I31456155503f2765766e8b7cd30ab4a40958fb96
Diffstat (limited to 'include/stdlib/string.h')
0 files changed, 0 insertions, 0 deletions