Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 1 | /* |
Sandrine Bailleux | d481759 | 2016-01-13 14:57:38 +0000 | [diff] [blame] | 2 | * Copyright (c) 2014-2016, ARM Limited and Contributors. All rights reserved. |
Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions are met: |
| 6 | * |
| 7 | * Redistributions of source code must retain the above copyright notice, this |
| 8 | * list of conditions and the following disclaimer. |
| 9 | * |
| 10 | * Redistributions in binary form must reproduce the above copyright notice, |
| 11 | * this list of conditions and the following disclaimer in the documentation |
| 12 | * and/or other materials provided with the distribution. |
| 13 | * |
| 14 | * Neither the name of ARM nor the names of its contributors may be used |
| 15 | * to endorse or promote products derived from this software without specific |
| 16 | * prior written permission. |
| 17 | * |
| 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
| 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 28 | * POSSIBILITY OF SUCH DAMAGE. |
| 29 | */ |
Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 30 | #include <arch.h> |
Andrew Thoelke | 38bde41 | 2014-03-18 13:46:55 +0000 | [diff] [blame] | 31 | #include <asm_macros.S> |
Soby Mathew | 802f865 | 2014-08-14 16:19:29 +0100 | [diff] [blame] | 32 | #include <assert_macros.S> |
Yatharth Kochar | 36433d1 | 2014-11-20 18:09:41 +0000 | [diff] [blame] | 33 | #include <bl_common.h> |
Soby Mathew | 8e2f287 | 2014-08-14 12:49:05 +0100 | [diff] [blame] | 34 | #include <cortex_a57.h> |
Soby Mathew | c704cbc | 2014-08-14 11:33:56 +0100 | [diff] [blame] | 35 | #include <cpu_macros.S> |
Soby Mathew | 6b28c57 | 2016-03-21 10:36:47 +0000 | [diff] [blame] | 36 | #include <debug.h> |
Soby Mathew | c704cbc | 2014-08-14 11:33:56 +0100 | [diff] [blame] | 37 | #include <plat_macros.S> |
Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 38 | |
Soby Mathew | 8e2f287 | 2014-08-14 12:49:05 +0100 | [diff] [blame] | 39 | /* --------------------------------------------- |
| 40 | * Disable L1 data cache and unified L2 cache |
| 41 | * --------------------------------------------- |
| 42 | */ |
| 43 | func cortex_a57_disable_dcache |
| 44 | mrs x1, sctlr_el3 |
| 45 | bic x1, x1, #SCTLR_C_BIT |
| 46 | msr sctlr_el3, x1 |
| 47 | isb |
| 48 | ret |
Kévin Petit | a877c25 | 2015-03-24 14:03:57 +0000 | [diff] [blame] | 49 | endfunc cortex_a57_disable_dcache |
Soby Mathew | 8e2f287 | 2014-08-14 12:49:05 +0100 | [diff] [blame] | 50 | |
| 51 | /* --------------------------------------------- |
| 52 | * Disable all types of L2 prefetches. |
| 53 | * --------------------------------------------- |
| 54 | */ |
| 55 | func cortex_a57_disable_l2_prefetch |
| 56 | mrs x0, CPUECTLR_EL1 |
| 57 | orr x0, x0, #CPUECTLR_DIS_TWD_ACC_PFTCH_BIT |
| 58 | mov x1, #CPUECTLR_L2_IPFTCH_DIST_MASK |
| 59 | orr x1, x1, #CPUECTLR_L2_DPFTCH_DIST_MASK |
| 60 | bic x0, x0, x1 |
| 61 | msr CPUECTLR_EL1, x0 |
| 62 | isb |
Soby Mathew | 1604fa0 | 2014-09-22 12:15:26 +0100 | [diff] [blame] | 63 | dsb ish |
Soby Mathew | 8e2f287 | 2014-08-14 12:49:05 +0100 | [diff] [blame] | 64 | ret |
Kévin Petit | a877c25 | 2015-03-24 14:03:57 +0000 | [diff] [blame] | 65 | endfunc cortex_a57_disable_l2_prefetch |
Soby Mathew | 8e2f287 | 2014-08-14 12:49:05 +0100 | [diff] [blame] | 66 | |
| 67 | /* --------------------------------------------- |
| 68 | * Disable intra-cluster coherency |
| 69 | * --------------------------------------------- |
| 70 | */ |
| 71 | func cortex_a57_disable_smp |
| 72 | mrs x0, CPUECTLR_EL1 |
| 73 | bic x0, x0, #CPUECTLR_SMP_BIT |
| 74 | msr CPUECTLR_EL1, x0 |
| 75 | ret |
Kévin Petit | a877c25 | 2015-03-24 14:03:57 +0000 | [diff] [blame] | 76 | endfunc cortex_a57_disable_smp |
Soby Mathew | 8e2f287 | 2014-08-14 12:49:05 +0100 | [diff] [blame] | 77 | |
| 78 | /* --------------------------------------------- |
| 79 | * Disable debug interfaces |
| 80 | * --------------------------------------------- |
| 81 | */ |
| 82 | func cortex_a57_disable_ext_debug |
| 83 | mov x0, #1 |
| 84 | msr osdlr_el1, x0 |
| 85 | isb |
| 86 | dsb sy |
| 87 | ret |
Kévin Petit | a877c25 | 2015-03-24 14:03:57 +0000 | [diff] [blame] | 88 | endfunc cortex_a57_disable_ext_debug |
Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 89 | |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 90 | /* -------------------------------------------------- |
| 91 | * Errata Workaround for Cortex A57 Errata #806969. |
| 92 | * This applies only to revision r0p0 of Cortex A57. |
| 93 | * Inputs: |
| 94 | * x0: variant[4:7] and revision[0:3] of current cpu. |
Soby Mathew | b5a6304 | 2015-01-29 12:00:58 +0000 | [diff] [blame] | 95 | * Clobbers : x0 - x5 |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 96 | * -------------------------------------------------- |
Soby Mathew | 802f865 | 2014-08-14 16:19:29 +0100 | [diff] [blame] | 97 | */ |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 98 | func errata_a57_806969_wa |
| 99 | /* |
| 100 | * Compare x0 against revision r0p0 |
| 101 | */ |
| 102 | cbz x0, apply_806969 |
Soby Mathew | 6b28c57 | 2016-03-21 10:36:47 +0000 | [diff] [blame] | 103 | #if LOG_LEVEL >= LOG_LEVEL_VERBOSE |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 104 | b print_revision_warning |
| 105 | #else |
| 106 | ret |
Soby Mathew | 802f865 | 2014-08-14 16:19:29 +0100 | [diff] [blame] | 107 | #endif |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 108 | apply_806969: |
| 109 | mrs x1, CPUACTLR_EL1 |
Soby Mathew | 802f865 | 2014-08-14 16:19:29 +0100 | [diff] [blame] | 110 | orr x1, x1, #CPUACTLR_NO_ALLOC_WBWA |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 111 | msr CPUACTLR_EL1, x1 |
| 112 | ret |
Kévin Petit | a877c25 | 2015-03-24 14:03:57 +0000 | [diff] [blame] | 113 | endfunc errata_a57_806969_wa |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 114 | |
| 115 | |
| 116 | /* --------------------------------------------------- |
| 117 | * Errata Workaround for Cortex A57 Errata #813420. |
| 118 | * This applies only to revision r0p0 of Cortex A57. |
| 119 | * Inputs: |
| 120 | * x0: variant[4:7] and revision[0:3] of current cpu. |
Soby Mathew | b5a6304 | 2015-01-29 12:00:58 +0000 | [diff] [blame] | 121 | * Clobbers : x0 - x5 |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 122 | * --------------------------------------------------- |
| 123 | */ |
| 124 | func errata_a57_813420_wa |
| 125 | /* |
| 126 | * Compare x0 against revision r0p0 |
| 127 | */ |
| 128 | cbz x0, apply_813420 |
Soby Mathew | 6b28c57 | 2016-03-21 10:36:47 +0000 | [diff] [blame] | 129 | #if LOG_LEVEL >= LOG_LEVEL_VERBOSE |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 130 | b print_revision_warning |
| 131 | #else |
| 132 | ret |
Soby Mathew | 802f865 | 2014-08-14 16:19:29 +0100 | [diff] [blame] | 133 | #endif |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 134 | apply_813420: |
| 135 | mrs x1, CPUACTLR_EL1 |
Soby Mathew | 802f865 | 2014-08-14 16:19:29 +0100 | [diff] [blame] | 136 | orr x1, x1, #CPUACTLR_DCC_AS_DCCI |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 137 | msr CPUACTLR_EL1, x1 |
| 138 | ret |
Kévin Petit | a877c25 | 2015-03-24 14:03:57 +0000 | [diff] [blame] | 139 | endfunc errata_a57_813420_wa |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 140 | |
Sandrine Bailleux | d481759 | 2016-01-13 14:57:38 +0000 | [diff] [blame] | 141 | /* -------------------------------------------------------------------- |
| 142 | * Disable the over-read from the LDNP instruction. |
| 143 | * |
| 144 | * This applies to all revisions <= r1p2. The performance degradation |
| 145 | * observed with LDNP/STNP has been fixed on r1p3 and onwards. |
| 146 | * |
| 147 | * Inputs: |
| 148 | * x0: variant[4:7] and revision[0:3] of current cpu. |
| 149 | * Clobbers : x0 - x5, x30 |
| 150 | * --------------------------------------------------------------------- |
| 151 | */ |
| 152 | func a57_disable_ldnp_overread |
| 153 | /* |
| 154 | * Compare x0 against revision r1p2 |
| 155 | */ |
| 156 | cmp x0, #0x12 |
| 157 | b.ls disable_hint |
Soby Mathew | 6b28c57 | 2016-03-21 10:36:47 +0000 | [diff] [blame] | 158 | #if LOG_LEVEL >= LOG_LEVEL_VERBOSE |
Sandrine Bailleux | d481759 | 2016-01-13 14:57:38 +0000 | [diff] [blame] | 159 | b print_revision_warning |
| 160 | #else |
| 161 | ret |
| 162 | #endif |
| 163 | disable_hint: |
| 164 | mrs x1, CPUACTLR_EL1 |
| 165 | orr x1, x1, #CPUACTLR_DIS_OVERREAD |
| 166 | msr CPUACTLR_EL1, x1 |
| 167 | ret |
| 168 | endfunc a57_disable_ldnp_overread |
| 169 | |
Sandrine Bailleux | a7e0c53 | 2016-04-14 13:32:31 +0100 | [diff] [blame^] | 170 | /* --------------------------------------------------- |
| 171 | * Errata Workaround for Cortex A57 Errata #826974. |
| 172 | * This applies only to revision <= r1p1 of Cortex A57. |
| 173 | * Inputs: |
| 174 | * x0: variant[4:7] and revision[0:3] of current cpu. |
| 175 | * Clobbers : x0 - x5 |
| 176 | * --------------------------------------------------- |
| 177 | */ |
| 178 | func errata_a57_826974_wa |
| 179 | /* |
| 180 | * Compare x0 against revision r1p1 |
| 181 | */ |
| 182 | cmp x0, #0x11 |
| 183 | b.ls apply_826974 |
| 184 | #if LOG_LEVEL >= LOG_LEVEL_VERBOSE |
| 185 | b print_revision_warning |
| 186 | #else |
| 187 | ret |
| 188 | #endif |
| 189 | apply_826974: |
| 190 | mrs x1, CPUACTLR_EL1 |
| 191 | orr x1, x1, #CPUACTLR_DIS_LOAD_PASS_DMB |
| 192 | msr CPUACTLR_EL1, x1 |
| 193 | ret |
| 194 | endfunc errata_a57_826974_wa |
| 195 | |
| 196 | |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 197 | /* ------------------------------------------------- |
| 198 | * The CPU Ops reset function for Cortex-A57. |
Soby Mathew | b5a6304 | 2015-01-29 12:00:58 +0000 | [diff] [blame] | 199 | * Clobbers: x0-x5, x15, x19, x30 |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 200 | * ------------------------------------------------- |
| 201 | */ |
| 202 | func cortex_a57_reset_func |
| 203 | mov x19, x30 |
| 204 | mrs x0, midr_el1 |
| 205 | |
| 206 | /* |
| 207 | * Extract the variant[20:23] and revision[0:3] from x0 |
Soby Mathew | b5a6304 | 2015-01-29 12:00:58 +0000 | [diff] [blame] | 208 | * and pack it in x15[0:7] as variant[4:7] and revision[0:3]. |
| 209 | * First extract x0[16:23] to x15[0:7] and zero fill the rest. |
| 210 | * Then extract x0[0:3] into x15[0:3] retaining other bits. |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 211 | */ |
Soby Mathew | b5a6304 | 2015-01-29 12:00:58 +0000 | [diff] [blame] | 212 | ubfx x15, x0, #(MIDR_VAR_SHIFT - MIDR_REV_BITS), #(MIDR_REV_BITS + MIDR_VAR_BITS) |
| 213 | bfxil x15, x0, #MIDR_REV_SHIFT, #MIDR_REV_BITS |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 214 | |
| 215 | #if ERRATA_A57_806969 |
Soby Mathew | b5a6304 | 2015-01-29 12:00:58 +0000 | [diff] [blame] | 216 | mov x0, x15 |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 217 | bl errata_a57_806969_wa |
Soby Mathew | 802f865 | 2014-08-14 16:19:29 +0100 | [diff] [blame] | 218 | #endif |
| 219 | |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 220 | #if ERRATA_A57_813420 |
Soby Mathew | b5a6304 | 2015-01-29 12:00:58 +0000 | [diff] [blame] | 221 | mov x0, x15 |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 222 | bl errata_a57_813420_wa |
| 223 | #endif |
Yatharth Kochar | 36433d1 | 2014-11-20 18:09:41 +0000 | [diff] [blame] | 224 | |
Sandrine Bailleux | d481759 | 2016-01-13 14:57:38 +0000 | [diff] [blame] | 225 | #if A57_DISABLE_NON_TEMPORAL_HINT |
| 226 | mov x0, x15 |
| 227 | bl a57_disable_ldnp_overread |
| 228 | #endif |
| 229 | |
Sandrine Bailleux | a7e0c53 | 2016-04-14 13:32:31 +0100 | [diff] [blame^] | 230 | #if ERRATA_A57_826974 |
| 231 | mov x0, x15 |
| 232 | bl errata_a57_826974_wa |
| 233 | #endif |
| 234 | |
Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 235 | /* --------------------------------------------- |
Sandrine Bailleux | f12a31d | 2016-01-29 14:37:58 +0000 | [diff] [blame] | 236 | * Enable the SMP bit. |
Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 237 | * --------------------------------------------- |
| 238 | */ |
Andrew Thoelke | f977ed8 | 2014-04-28 12:32:02 +0100 | [diff] [blame] | 239 | mrs x0, CPUECTLR_EL1 |
Achin Gupta | 4f6ad66 | 2013-10-25 09:08:21 +0100 | [diff] [blame] | 240 | orr x0, x0, #CPUECTLR_SMP_BIT |
Andrew Thoelke | f977ed8 | 2014-04-28 12:32:02 +0100 | [diff] [blame] | 241 | msr CPUECTLR_EL1, x0 |
Andrew Thoelke | 42e75a7 | 2014-04-28 12:28:39 +0100 | [diff] [blame] | 242 | isb |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 243 | ret x19 |
Kévin Petit | a877c25 | 2015-03-24 14:03:57 +0000 | [diff] [blame] | 244 | endfunc cortex_a57_reset_func |
Soby Mathew | c704cbc | 2014-08-14 11:33:56 +0100 | [diff] [blame] | 245 | |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 246 | /* ---------------------------------------------------- |
| 247 | * The CPU Ops core power down function for Cortex-A57. |
| 248 | * ---------------------------------------------------- |
| 249 | */ |
Soby Mathew | 8e2f287 | 2014-08-14 12:49:05 +0100 | [diff] [blame] | 250 | func cortex_a57_core_pwr_dwn |
| 251 | mov x18, x30 |
| 252 | |
| 253 | /* --------------------------------------------- |
| 254 | * Turn off caches. |
| 255 | * --------------------------------------------- |
| 256 | */ |
| 257 | bl cortex_a57_disable_dcache |
| 258 | |
| 259 | /* --------------------------------------------- |
| 260 | * Disable the L2 prefetches. |
| 261 | * --------------------------------------------- |
| 262 | */ |
| 263 | bl cortex_a57_disable_l2_prefetch |
| 264 | |
| 265 | /* --------------------------------------------- |
Soby Mathew | 42aa5eb | 2014-09-02 10:47:33 +0100 | [diff] [blame] | 266 | * Flush L1 caches. |
Soby Mathew | 8e2f287 | 2014-08-14 12:49:05 +0100 | [diff] [blame] | 267 | * --------------------------------------------- |
| 268 | */ |
| 269 | mov x0, #DCCISW |
Soby Mathew | 42aa5eb | 2014-09-02 10:47:33 +0100 | [diff] [blame] | 270 | bl dcsw_op_level1 |
Soby Mathew | 8e2f287 | 2014-08-14 12:49:05 +0100 | [diff] [blame] | 271 | |
| 272 | /* --------------------------------------------- |
| 273 | * Come out of intra cluster coherency |
| 274 | * --------------------------------------------- |
| 275 | */ |
| 276 | bl cortex_a57_disable_smp |
| 277 | |
| 278 | /* --------------------------------------------- |
| 279 | * Force the debug interfaces to be quiescent |
| 280 | * --------------------------------------------- |
| 281 | */ |
| 282 | mov x30, x18 |
| 283 | b cortex_a57_disable_ext_debug |
Kévin Petit | a877c25 | 2015-03-24 14:03:57 +0000 | [diff] [blame] | 284 | endfunc cortex_a57_core_pwr_dwn |
Soby Mathew | 8e2f287 | 2014-08-14 12:49:05 +0100 | [diff] [blame] | 285 | |
Soby Mathew | c088433 | 2014-09-22 12:11:36 +0100 | [diff] [blame] | 286 | /* ------------------------------------------------------- |
| 287 | * The CPU Ops cluster power down function for Cortex-A57. |
| 288 | * ------------------------------------------------------- |
| 289 | */ |
Soby Mathew | 8e2f287 | 2014-08-14 12:49:05 +0100 | [diff] [blame] | 290 | func cortex_a57_cluster_pwr_dwn |
| 291 | mov x18, x30 |
| 292 | |
| 293 | /* --------------------------------------------- |
| 294 | * Turn off caches. |
| 295 | * --------------------------------------------- |
| 296 | */ |
| 297 | bl cortex_a57_disable_dcache |
| 298 | |
| 299 | /* --------------------------------------------- |
| 300 | * Disable the L2 prefetches. |
| 301 | * --------------------------------------------- |
| 302 | */ |
| 303 | bl cortex_a57_disable_l2_prefetch |
| 304 | |
Soby Mathew | 937488b | 2014-09-22 14:13:34 +0100 | [diff] [blame] | 305 | #if !SKIP_A57_L1_FLUSH_PWR_DWN |
Soby Mathew | 42aa5eb | 2014-09-02 10:47:33 +0100 | [diff] [blame] | 306 | /* ------------------------------------------------- |
| 307 | * Flush the L1 caches. |
| 308 | * ------------------------------------------------- |
| 309 | */ |
| 310 | mov x0, #DCCISW |
| 311 | bl dcsw_op_level1 |
Soby Mathew | 937488b | 2014-09-22 14:13:34 +0100 | [diff] [blame] | 312 | #endif |
Soby Mathew | 8e2f287 | 2014-08-14 12:49:05 +0100 | [diff] [blame] | 313 | /* --------------------------------------------- |
| 314 | * Disable the optional ACP. |
| 315 | * --------------------------------------------- |
| 316 | */ |
| 317 | bl plat_disable_acp |
| 318 | |
Soby Mathew | 42aa5eb | 2014-09-02 10:47:33 +0100 | [diff] [blame] | 319 | /* ------------------------------------------------- |
| 320 | * Flush the L2 caches. |
| 321 | * ------------------------------------------------- |
Soby Mathew | 8e2f287 | 2014-08-14 12:49:05 +0100 | [diff] [blame] | 322 | */ |
| 323 | mov x0, #DCCISW |
Soby Mathew | 42aa5eb | 2014-09-02 10:47:33 +0100 | [diff] [blame] | 324 | bl dcsw_op_level2 |
Soby Mathew | 8e2f287 | 2014-08-14 12:49:05 +0100 | [diff] [blame] | 325 | |
| 326 | /* --------------------------------------------- |
| 327 | * Come out of intra cluster coherency |
| 328 | * --------------------------------------------- |
| 329 | */ |
| 330 | bl cortex_a57_disable_smp |
| 331 | |
| 332 | /* --------------------------------------------- |
| 333 | * Force the debug interfaces to be quiescent |
| 334 | * --------------------------------------------- |
| 335 | */ |
| 336 | mov x30, x18 |
| 337 | b cortex_a57_disable_ext_debug |
Kévin Petit | a877c25 | 2015-03-24 14:03:57 +0000 | [diff] [blame] | 338 | endfunc cortex_a57_cluster_pwr_dwn |
Soby Mathew | 8e2f287 | 2014-08-14 12:49:05 +0100 | [diff] [blame] | 339 | |
Soby Mathew | 38b4bc9 | 2014-08-14 13:36:41 +0100 | [diff] [blame] | 340 | /* --------------------------------------------- |
| 341 | * This function provides cortex_a57 specific |
| 342 | * register information for crash reporting. |
| 343 | * It needs to return with x6 pointing to |
| 344 | * a list of register names in ascii and |
| 345 | * x8 - x15 having values of registers to be |
| 346 | * reported. |
| 347 | * --------------------------------------------- |
| 348 | */ |
| 349 | .section .rodata.cortex_a57_regs, "aS" |
| 350 | cortex_a57_regs: /* The ascii list of register names to be reported */ |
| 351 | .asciz "cpuectlr_el1", "" |
| 352 | |
| 353 | func cortex_a57_cpu_reg_dump |
| 354 | adr x6, cortex_a57_regs |
| 355 | mrs x8, CPUECTLR_EL1 |
| 356 | ret |
Kévin Petit | a877c25 | 2015-03-24 14:03:57 +0000 | [diff] [blame] | 357 | endfunc cortex_a57_cpu_reg_dump |
Soby Mathew | 38b4bc9 | 2014-08-14 13:36:41 +0100 | [diff] [blame] | 358 | |
| 359 | |
Soby Mathew | c704cbc | 2014-08-14 11:33:56 +0100 | [diff] [blame] | 360 | declare_cpu_ops cortex_a57, CORTEX_A57_MIDR |