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
fe4604f4
Commit
fe4604f4
authored
5 years ago
by
Alexei Fedorov
Committed by
TrustedFirmware Code Review
5 years ago
Browse files
Options
Download
Plain Diff
Merge "Enable AMU for Cortex-Hercules" into integration
parents
df42c311
3d08461a
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
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/lib/cpus/aarch64/cortex_hercules.h
+16
-0
include/lib/cpus/aarch64/cortex_hercules.h
lib/cpus/aarch64/cortex_hercules.S
+36
-1
lib/cpus/aarch64/cortex_hercules.S
with
52 additions
and
1 deletion
+52
-1
include/lib/cpus/aarch64/cortex_hercules.h
View file @
fe4604f4
...
...
@@ -22,4 +22,20 @@
#define CORTEX_HERCULES_CPUPWRCTLR_EL1 S3_0_C15_C2_7
#define CORTEX_HERCULES_CPUPWRCTLR_EL1_CORE_PWRDN_EN_BIT U(1)
/*******************************************************************************
* CPU Auxiliary Control register specific definitions.
******************************************************************************/
#define CORTEX_HERCULES_ACTLR_TAM_BIT (ULL(1) << 30)
/*******************************************************************************
* CPU Activity Monitor Unit register specific definitions.
******************************************************************************/
#define CPUAMCNTENCLR0_EL0 S3_3_C15_C2_4
#define CPUAMCNTENSET0_EL0 S3_3_C15_C2_5
#define CPUAMCNTENCLR1_EL0 S3_3_C15_C3_0
#define CPUAMCNTENSET1_EL0 S3_3_C15_C3_1
#define CORTEX_HERCULES_AMU_GROUP0_MASK U(0xF)
#define CORTEX_HERCULES_AMU_GROUP1_MASK U(0x7)
#endif
/* CORTEX_HERCULES_H */
This diff is collapsed.
Click to expand it.
lib/cpus/aarch64/cortex_hercules.S
View file @
fe4604f4
...
...
@@ -14,6 +14,35 @@
/*
Hardware
handled
coherency
*/
#if HW_ASSISTED_COHERENCY == 0
#error "cortex_hercules must be compiled with HW_ASSISTED_COHERENCY enabled"
#endif
/
*
-------------------------------------------------
*
The
CPU
Ops
reset
function
for
Cortex
-
Hercules
*
-------------------------------------------------
*/
#if ENABLE_AMU
func
cortex_hercules_reset_func
/
*
Make
sure
accesses
from
EL0
/
EL1
and
EL2
are
not
trapped
to
EL3
*/
mrs
x0
,
actlr_el3
bic
x0
,
x0
,
#
CORTEX_HERCULES_ACTLR_TAM_BIT
msr
actlr_el3
,
x0
/
*
Make
sure
accesses
from
non
-
secure
EL0
/
EL1
are
not
trapped
to
EL2
*/
mrs
x0
,
actlr_el2
bic
x0
,
x0
,
#
CORTEX_HERCULES_ACTLR_TAM_BIT
msr
actlr_el2
,
x0
/
*
Enable
group0
counters
*/
mov
x0
,
#
CORTEX_HERCULES_AMU_GROUP0_MASK
msr
CPUAMCNTENSET0_EL0
,
x0
/
*
Enable
group1
counters
*/
mov
x0
,
#
CORTEX_HERCULES_AMU_GROUP1_MASK
msr
CPUAMCNTENSET1_EL0
,
x0
isb
ret
endfunc
cortex_hercules_reset_func
#endif
/
*
---------------------------------------------
...
...
@@ -60,6 +89,12 @@ func cortex_hercules_cpu_reg_dump
ret
endfunc
cortex_hercules_cpu_reg_dump
#if ENABLE_AMU
#define HERCULES_RESET_FUNC cortex_hercules_reset_func
#else
#define HERCULES_RESET_FUNC CPU_NO_RESET_FUNC
#endif
declare_cpu_ops
cortex_hercules
,
CORTEX_HERCULES_MIDR
,
\
CPU_NO
_RESET_FUNC
,
\
HERCULES
_RESET_FUNC
,
\
cortex_hercules_core_pwr_dwn
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