Skip to content
GitLab
Menu
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
10df3811
Unverified
Commit
10df3811
authored
May 15, 2018
by
Dimitris Papastamos
Committed by
GitHub
May 15, 2018
Browse files
Merge pull request #1376 from vwadekar/cm-init-actlr-el1
lib: el3_runtime: initialise actlr_el1 to hardware defaults
parents
2f1fbb4f
2ab9617e
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/el3_runtime/aarch64/context_mgmt.c
View file @
10df3811
...
...
@@ -65,7 +65,7 @@ static void cm_init_context_common(cpu_context_t *ctx, const entry_point_info_t
uint32_t
scr_el3
,
pmcr_el0
;
el3_state_t
*
state
;
gp_regs_t
*
gp_regs
;
unsigned
long
sctlr_elx
;
unsigned
long
sctlr_elx
,
actlr_elx
;
assert
(
ctx
);
...
...
@@ -178,6 +178,16 @@ static void cm_init_context_common(cpu_context_t *ctx, const entry_point_info_t
*/
write_ctx_reg
(
get_sysregs_ctx
(
ctx
),
CTX_SCTLR_EL1
,
sctlr_elx
);
/*
* Base the context ACTLR_EL1 on the current value, as it is
* implementation defined. The context restore process will write
* the value from the context to the actual register and can cause
* problems for processor cores that don't expect certain bits to
* be zero.
*/
actlr_elx
=
read_actlr_el1
();
write_ctx_reg
((
get_sysregs_ctx
(
ctx
)),
(
CTX_ACTLR_EL1
),
(
actlr_elx
));
if
(
security_state
==
SECURE
)
{
/*
* Initialise PMCR_EL0 for secure context only, setting all
...
...
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