1/* 2 * Copyright (c) 2014-2015, ARM Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6#include <aem_generic.h> 7#include <arch.h> 8#include <asm_macros.S> 9#include <cpu_macros.S> 10 11func aem_generic_core_pwr_dwn 12 /* --------------------------------------------- 13 * Disable the Data Cache. 14 * --------------------------------------------- 15 */ 16 mrs x1, sctlr_el3 17 bic x1, x1, #SCTLR_C_BIT 18 msr sctlr_el3, x1 19 isb 20 21 mov x0, #DCCISW 22 23 /* --------------------------------------------- 24 * Flush L1 cache to PoU. 25 * --------------------------------------------- 26 */ 27 b dcsw_op_louis 28endfunc aem_generic_core_pwr_dwn 29 30 31func aem_generic_cluster_pwr_dwn 32 /* --------------------------------------------- 33 * Disable the Data Cache. 34 * --------------------------------------------- 35 */ 36 mrs x1, sctlr_el3 37 bic x1, x1, #SCTLR_C_BIT 38 msr sctlr_el3, x1 39 isb 40 41 /* --------------------------------------------- 42 * Flush L1 and L2 caches to PoC. 43 * --------------------------------------------- 44 */ 45 mov x0, #DCCISW 46 b dcsw_op_all 47endfunc aem_generic_cluster_pwr_dwn 48 49#if REPORT_ERRATA 50/* 51 * Errata printing function for AEM. Must follow AAPCS. 52 */ 53func aem_generic_errata_report 54 ret 55endfunc aem_generic_errata_report 56#endif 57 58 /* --------------------------------------------- 59 * This function provides cpu specific 60 * register information for crash reporting. 61 * It needs to return with x6 pointing to 62 * a list of register names in ascii and 63 * x8 - x15 having values of registers to be 64 * reported. 65 * --------------------------------------------- 66 */ 67.section .rodata.aem_generic_regs, "aS" 68aem_generic_regs: /* The ascii list of register names to be reported */ 69 .asciz "" /* no registers to report */ 70 71func aem_generic_cpu_reg_dump 72 adr x6, aem_generic_regs 73 ret 74endfunc aem_generic_cpu_reg_dump 75 76 77/* cpu_ops for Base AEM FVP */ 78declare_cpu_ops aem_generic, BASE_AEM_MIDR, CPU_NO_RESET_FUNC, \ 79 aem_generic_core_pwr_dwn, \ 80 aem_generic_cluster_pwr_dwn 81 82/* cpu_ops for Foundation FVP */ 83declare_cpu_ops aem_generic, FOUNDATION_AEM_MIDR, CPU_NO_RESET_FUNC, \ 84 aem_generic_core_pwr_dwn, \ 85 aem_generic_cluster_pwr_dwn 86