diff options
-rw-r--r-- | include/lib/cpus/aarch64/denver.h | 8 | ||||
-rw-r--r-- | lib/cpus/aarch64/denver.S | 9 |
2 files changed, 16 insertions, 1 deletions
diff --git a/include/lib/cpus/aarch64/denver.h b/include/lib/cpus/aarch64/denver.h index d8c4d2e79..f145fbb59 100644 --- a/include/lib/cpus/aarch64/denver.h +++ b/include/lib/cpus/aarch64/denver.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -20,6 +20,12 @@ /* CPU state ids - implementation defined */ #define DENVER_CPU_STATE_POWER_DOWN U(0x3) +/* Core power management states */ +#define DENVER_CPU_PMSTATE_C1 U(0x1) +#define DENVER_CPU_PMSTATE_C6 U(0x6) +#define DENVER_CPU_PMSTATE_C7 U(0x7) +#define DENVER_CPU_PMSTATE_MASK U(0xF) + #ifndef __ASSEMBLY__ /* Disable Dynamic Code Optimisation */ diff --git a/lib/cpus/aarch64/denver.S b/lib/cpus/aarch64/denver.S index caf74d7b9..c873f2e3e 100644 --- a/lib/cpus/aarch64/denver.S +++ b/lib/cpus/aarch64/denver.S @@ -237,6 +237,15 @@ func denver_reset_func #endif /* ---------------------------------------------------- + * Reset ACTLR.PMSTATE to C1 state + * ---------------------------------------------------- + */ + mrs x0, actlr_el1 + bic x0, x0, #DENVER_CPU_PMSTATE_MASK + orr x0, x0, #DENVER_CPU_PMSTATE_C1 + msr actlr_el1, x0 + + /* ---------------------------------------------------- * Enable dynamic code optimizer (DCO) * ---------------------------------------------------- */ |