summaryrefslogtreecommitdiff
path: root/bl2
diff options
context:
space:
mode:
authorJuan Castillo <juan.castillo@arm.com>2015-08-17 10:43:27 +0100
committerJuan Castillo <juan.castillo@arm.com>2015-08-20 16:44:02 +0100
commitfedbc0497bb0407fc1d55430eae1938712f1afe8 (patch)
tree35dd097425d463bd9fdcf2b8c8f3ecec54fb796b /bl2
parentaaa0567c38ea6f08d68ce64210800b51a8872c13 (diff)
TBB: abort boot if BL3-2 cannot be authenticated
BL3-2 image (Secure Payload) is optional. If the image cannot be loaded a warning message is printed and the boot process continues. According to the TBBR document, this behaviour should not apply in case of an authentication error, where the boot process should be aborted. This patch modifies the load_auth_image() function to distinguish between a load error and an authentication error. The caller uses the return value to abort the boot process or continue. In case of authentication error, the memory region used to store the image is wiped clean. Change-Id: I534391d526d514b2a85981c3dda00de67e0e7992
Diffstat (limited to 'bl2')
-rw-r--r--bl2/bl2_main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/bl2/bl2_main.c b/bl2/bl2_main.c
index 4c190025..71940a62 100644
--- a/bl2/bl2_main.c
+++ b/bl2/bl2_main.c
@@ -238,8 +238,14 @@ void bl2_main(void)
}
e = load_bl32(bl2_to_bl31_params);
- if (e)
- WARN("Failed to load BL3-2 (%i)\n", e);
+ if (e) {
+ if (e == LOAD_AUTH_ERR) {
+ ERROR("Failed to authenticate BL3-2\n");
+ panic();
+ } else {
+ WARN("Failed to load BL3-2 (%i)\n", e);
+ }
+ }
e = load_bl33(bl2_to_bl31_params);
if (e) {