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
f89eea4e
Commit
f89eea4e
authored
Mar 24, 2020
by
Manish Pandey
Committed by
TrustedFirmware Code Review
Mar 24, 2020
Browse files
Merge "context: TPIDR_EL2 register not saved/restored" into integration
parents
0d5864d9
7f164a83
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/lib/el3_runtime/aarch64/context.h
View file @
f89eea4e
...
@@ -183,7 +183,7 @@
...
@@ -183,7 +183,7 @@
#define CTX_SPSR_EL2 U(0xd0)
#define CTX_SPSR_EL2 U(0xd0)
#define CTX_SP_EL2 U(0xd8)
#define CTX_SP_EL2 U(0xd8)
#define CTX_TCR_EL2 U(0xe0)
#define CTX_TCR_EL2 U(0xe0)
#define CTX_T
RFC
R_EL2 U(0xe8)
#define CTX_T
PID
R_EL2 U(0xe8)
#define CTX_TTBR0_EL2 U(0xf0)
#define CTX_TTBR0_EL2 U(0xf0)
#define CTX_VBAR_EL2 U(0xf8)
#define CTX_VBAR_EL2 U(0xf8)
#define CTX_VMPIDR_EL2 U(0x100)
#define CTX_VMPIDR_EL2 U(0x100)
...
@@ -234,11 +234,13 @@
...
@@ -234,11 +234,13 @@
#define CTX_VSESR_EL2 U(0x228)
#define CTX_VSESR_EL2 U(0x228)
#define CTX_VSTCR_EL2 U(0x230)
#define CTX_VSTCR_EL2 U(0x230)
#define CTX_VSTTBR_EL2 U(0x238)
#define CTX_VSTTBR_EL2 U(0x238)
#define CTX_TRFCR_EL2 U(0x240)
// Starting with Armv8.5
// Starting with Armv8.5
#define CTX_SCXTNUM_EL2 U(0x24
0
)
#define CTX_SCXTNUM_EL2 U(0x24
8
)
/* Align to the next 16 byte boundary */
/* Align to the next 16 byte boundary */
#define CTX_EL2_SYSREGS_END U(0x250)
#define CTX_EL2_SYSREGS_END U(0x250)
#endif
/* CTX_INCLUDE_EL2_REGS */
#endif
/* CTX_INCLUDE_EL2_REGS */
/*******************************************************************************
/*******************************************************************************
...
...
lib/el3_runtime/aarch64/context.S
View file @
f89eea4e
...
@@ -100,7 +100,7 @@ func el2_sysregs_context_save
...
@@ -100,7 +100,7 @@ func el2_sysregs_context_save
stp
x10
,
x11
,
[
x0
,
#
CTX_SPSR_EL2
]
stp
x10
,
x11
,
[
x0
,
#
CTX_SPSR_EL2
]
mrs
x12
,
tcr_el2
mrs
x12
,
tcr_el2
mrs
x13
,
TRFCR_EL
2
mrs
x13
,
tpidr_el
2
stp
x12
,
x13
,
[
x0
,
#
CTX_TCR_EL2
]
stp
x12
,
x13
,
[
x0
,
#
CTX_TCR_EL2
]
mrs
x14
,
ttbr0_el2
mrs
x14
,
ttbr0_el2
...
@@ -204,11 +204,14 @@ func el2_sysregs_context_save
...
@@ -204,11 +204,14 @@ func el2_sysregs_context_save
mrs
x16
,
vsttbr_el2
mrs
x16
,
vsttbr_el2
str
x16
,
[
x0
,
#
CTX_VSTTBR_EL2
]
str
x16
,
[
x0
,
#
CTX_VSTTBR_EL2
]
mrs
x17
,
TRFCR_EL2
str
x17
,
[
x0
,
#
CTX_TRFCR_EL2
]
#endif
#endif
#if ARM_ARCH_AT_LEAST(8, 5)
#if ARM_ARCH_AT_LEAST(8, 5)
mrs
x
17
,
scxtnum_el2
mrs
x
9
,
scxtnum_el2
str
x
17
,
[
x0
,
#
CTX_SCXTNUM_EL2
]
str
x
9
,
[
x0
,
#
CTX_SCXTNUM_EL2
]
#endif
#endif
ret
ret
...
@@ -289,7 +292,7 @@ func el2_sysregs_context_restore
...
@@ -289,7 +292,7 @@ func el2_sysregs_context_restore
ldp
x12
,
x13
,
[
x0
,
#
CTX_TCR_EL2
]
ldp
x12
,
x13
,
[
x0
,
#
CTX_TCR_EL2
]
msr
tcr_el2
,
x12
msr
tcr_el2
,
x12
msr
TRFCR_EL
2
,
x13
msr
tpidr_el
2
,
x13
ldp
x14
,
x15
,
[
x0
,
#
CTX_TTBR0_EL2
]
ldp
x14
,
x15
,
[
x0
,
#
CTX_TTBR0_EL2
]
msr
ttbr0_el2
,
x14
msr
ttbr0_el2
,
x14
...
@@ -391,11 +394,14 @@ func el2_sysregs_context_restore
...
@@ -391,11 +394,14 @@ func el2_sysregs_context_restore
ldr
x16
,
[
x0
,
#
CTX_VSTTBR_EL2
]
ldr
x16
,
[
x0
,
#
CTX_VSTTBR_EL2
]
msr
vsttbr_el2
,
x16
msr
vsttbr_el2
,
x16
ldr
x17
,
[
x0
,
#
CTX_TRFCR_EL2
]
msr
TRFCR_EL2
,
x17
#endif
#endif
#if ARM_ARCH_AT_LEAST(8, 5)
#if ARM_ARCH_AT_LEAST(8, 5)
ldr
x
17
,
[
x0
,
#
CTX_SCXTNUM_EL2
]
ldr
x
9
,
[
x0
,
#
CTX_SCXTNUM_EL2
]
msr
scxtnum_el2
,
x
17
msr
scxtnum_el2
,
x
9
#endif
#endif
ret
ret
...
...
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