diff options
author | danh-arm <dan.handley@arm.com> | 2014-07-28 14:33:44 +0100 |
---|---|---|
committer | danh-arm <dan.handley@arm.com> | 2014-07-28 14:33:44 +0100 |
commit | dd2bdee61682df0ec65dfc43371c126a86a30c30 (patch) | |
tree | 12e1fca8b8e84230029bc9b6efa7f41b031ab069 /common | |
parent | 6397bf6a99d785caa9b50016cd6c8eb76083c117 (diff) | |
parent | d3280beb700321b0ef47b4f61d84667ba501bc61 (diff) |
Merge pull request #177 from jcastillo-arm/jc/tf-issues/096
Rework incorrect use of assert() and panic() in codebase
Diffstat (limited to 'common')
-rw-r--r-- | common/bl_common.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/bl_common.c b/common/bl_common.c index 60b63f18..d2c60eff 100644 --- a/common/bl_common.c +++ b/common/bl_common.c @@ -61,12 +61,11 @@ void change_security_state(unsigned int target_security_state) { unsigned long scr = read_scr(); + assert(sec_state_is_valid(target_security_state)); if (target_security_state == SECURE) scr &= ~SCR_NS_BIT; - else if (target_security_state == NON_SECURE) - scr |= SCR_NS_BIT; else - assert(0); + scr |= SCR_NS_BIT; write_scr(scr); } |