Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
604d5da6
Commit
604d5da6
authored
9 years ago
by
danh-arm
Browse files
Options
Download
Plain Diff
Merge pull request #383 from vikramkanigiri/vk/tf-issues-314-v1
Ensure BL2 security state is secure
parents
02516ae4
a2f8b166
master
v2.5
v2.5-rc1
v2.5-rc0
v2.4
v2.4-rc2
v2.4-rc1
v2.4-rc0
v2.3
v2.3-rc2
v2.3-rc1
v2.3-rc0
v2.2
v2.2-rc2
v2.2-rc1
v2.2-rc0
v2.1
v2.1-rc1
v2.1-rc0
v2.0
v2.0-rc0
v1.6
v1.6-rc1
v1.6-rc0
v1.5
v1.5-rc3
v1.5-rc2
v1.5-rc1
v1.5-rc0
v1.4
v1.4-rc0
v1.3
v1.3_rc2
v1.3_rc1
v1.3-rc0
v1.2
v1.2-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
bl1/bl1_main.c
+5
-3
bl1/bl1_main.c
common/bl_common.c
+0
-13
common/bl_common.c
include/common/bl_common.h
+0
-1
include/common/bl_common.h
with
5 additions
and
17 deletions
+5
-17
bl1/bl1_main.c
View file @
604d5da6
...
...
@@ -44,14 +44,16 @@
******************************************************************************/
static
void
__dead2
bl1_run_bl2
(
entry_point_info_t
*
bl2_ep
)
{
/* Check bl2 security state is expected as secure */
assert
(
GET_SECURITY_STATE
(
bl2_ep
->
h
.
attr
)
==
SECURE
);
/* Check NS Bit is also set as secure */
assert
(
!
(
read_scr_el3
()
&
SCR_NS_BIT
));
bl1_arch_next_el_setup
();
/* Tell next EL what we want done */
bl2_ep
->
args
.
arg0
=
RUN_IMAGE
;
if
(
GET_SECURITY_STATE
(
bl2_ep
->
h
.
attr
)
==
NON_SECURE
)
change_security_state
(
GET_SECURITY_STATE
(
bl2_ep
->
h
.
attr
));
write_spsr_el3
(
bl2_ep
->
spsr
);
write_elr_el3
(
bl2_ep
->
pc
);
...
...
This diff is collapsed.
Click to expand it.
common/bl_common.c
View file @
604d5da6
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
include/common/bl_common.h
View file @
604d5da6
...
...
@@ -234,7 +234,6 @@ CASSERT(sizeof(unsigned long) ==
* Function & variable prototypes
******************************************************************************/
unsigned
long
page_align
(
unsigned
long
,
unsigned
);
void
change_security_state
(
unsigned
int
);
unsigned
long
image_size
(
unsigned
int
image_id
);
int
load_image
(
meminfo_t
*
mem_layout
,
unsigned
int
image_id
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help