summaryrefslogtreecommitdiff
path: root/common/bl_common.c
diff options
context:
space:
mode:
authorVikram Kanigiri <vikram.kanigiri@arm.com>2015-07-23 11:16:28 +0100
committerVikram Kanigiri <vikram.kanigiri@arm.com>2015-09-02 13:48:45 +0100
commita2f8b16650ab3d80864c0edfa205c2c8dd012b8d (patch)
tree5dcb8b750a49b4aef85310dc6cef818d309363ac /common/bl_common.c
parente04723e21362c322b7725662871153dadb9d3167 (diff)
Ensure BL2 security state is secure
BL2 loads secure runtime code(BL3-1, BL3-2) and hence it has to run in secure world otherwise BL3-1/BL3-2 have to execute from non-secure memory. Hence, This patch removes the change_security_state() call in bl1_run_bl2() and replaces it with an assert to confirm the BL2 as secure. Fixes ARM-software/tf-issues#314 Change-Id: I611b83f5c4090e58a76a2e950b0d797b46df3c29
Diffstat (limited to 'common/bl_common.c')
-rw-r--r--common/bl_common.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/common/bl_common.c b/common/bl_common.c
index 3088cb06..73c615e5 100644
--- a/common/bl_common.c
+++ b/common/bl_common.c
@@ -59,19 +59,6 @@ static inline unsigned int is_page_aligned (unsigned long addr) {
return (addr & (page_size - 1)) == 0;
}
-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
- scr |= SCR_NS_BIT;
-
- write_scr(scr);
-}
-
/******************************************************************************
* Determine whether the memory region delimited by 'addr' and 'size' is free,
* given the extents of free memory.