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
e4d3c51d
Commit
e4d3c51d
authored
Dec 09, 2015
by
danh-arm
Browse files
Merge pull request #460 from sandrine-bailleux/sb/init-vttbrel2-vmid
Initialize VTTBR_EL2 when bypassing EL2
parents
7e473eae
85d80e55
Changes
2
Hide whitespace changes
Inline
Side-by-side
bl31/context_mgmt.c
View file @
e4d3c51d
...
...
@@ -330,6 +330,14 @@ void cm_prepare_el3_exit(uint32_t security_state)
/* Set VPIDR, VMPIDR to match MIDR, MPIDR */
write_vpidr_el2
(
read_midr_el1
());
write_vmpidr_el2
(
read_mpidr_el1
());
/*
* Reset VTTBR_EL2.
* Needed because cache maintenance operations depend on
* the VMID even when non-secure EL1&0 stage 2 address
* translation are disabled.
*/
write_vttbr_el2
(
0
);
}
}
...
...
include/lib/aarch64/arch_helpers.h
View file @
e4d3c51d
...
...
@@ -270,6 +270,8 @@ DEFINE_SYSREG_RW_FUNCS(ttbr0_el3)
DEFINE_SYSREG_RW_FUNCS
(
ttbr1_el1
)
DEFINE_SYSREG_RW_FUNCS
(
vttbr_el2
)
DEFINE_SYSREG_RW_FUNCS
(
cptr_el2
)
DEFINE_SYSREG_RW_FUNCS
(
cptr_el3
)
...
...
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