diff options
author | Andrew Thoelke <andrew.thoelke@arm.com> | 2014-05-22 12:30:37 +0100 |
---|---|---|
committer | Andrew Thoelke <andrew.thoelke@arm.com> | 2014-05-22 12:30:37 +0100 |
commit | ba9dbd10399c57e6bd4f19f2f5904b06f26d3ee4 (patch) | |
tree | bd066f88c09ca2369031a5adb2fc631def7502ef | |
parent | 39f6a68bd1c4d6c44fc0608289259c87b8ecbb6c (diff) | |
parent | bb5ffdba18198cffa7480c7dd66c3e0d60a7af30 (diff) | |
download | trusted-firmware-a-ba9dbd10399c57e6bd4f19f2f5904b06f26d3ee4.tar.gz |
Merge pull request #83 from athoelke/at/tf-issues-126
Set SCR_EL3.RW correctly before exiting bl31_main
-rw-r--r-- | bl31/bl31_main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bl31/bl31_main.c b/bl31/bl31_main.c index 5a09829bae..561dbab8c3 100644 --- a/bl31/bl31_main.c +++ b/bl31/bl31_main.c @@ -169,9 +169,15 @@ void bl31_prepare_next_image_entry() assert(next_image_info); scr = read_scr(); + scr &= ~SCR_NS_BIT; if (image_type == NON_SECURE) scr |= SCR_NS_BIT; + scr &= ~SCR_RW_BIT; + if ((next_image_info->spsr & (1 << MODE_RW_SHIFT)) == + (MODE_RW_64 << MODE_RW_SHIFT)) + scr |= SCR_RW_BIT; + /* * Tell the context mgmt. library to ensure that SP_EL3 points to * the right context to exit from EL3 correctly. |