1/* 2 * Copyright (c) 2025, Arm Limited. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7#include <arch.h> 8#include <asm_macros.S> 9#include <common/bl_common.h> 10#include <veymont.h> 11#include <cpu_macros.S> 12#include <plat_macros.S> 13 14/* Hardware handled coherency */ 15#if HW_ASSISTED_COHERENCY == 0 16#error "Veymont must be compiled with HW_ASSISTED_COHERENCY enabled" 17#endif 18 19/* 64-bit only core */ 20#if CTX_INCLUDE_AARCH32_REGS == 1 21#error "Veymont supports only AArch64. Compile with CTX_INCLUDE_AARCH32_REGS=0" 22#endif 23 24#if ERRATA_SME_POWER_DOWN == 0 25#error "Veymont needs ERRATA_SME_POWER_DOWN=1 to powerdown correctly" 26#endif 27 28cpu_reset_prologue veymont 29 30cpu_reset_func_start veymont 31 /* ---------------------------------------------------- 32 * Disable speculative loads 33 * ---------------------------------------------------- 34 */ 35 msr SSBS, xzr 36 enable_mpmm 37cpu_reset_func_end veymont 38 39func veymont_core_pwr_dwn 40 /* --------------------------------------------------- 41 * Flip CPU power down bit in power control register. 42 * It will be set on powerdown and cleared on wakeup 43 * --------------------------------------------------- 44 */ 45 sysreg_bit_toggle VEYMONT_IMP_CPUPWRCTLR_EL1, \ 46 VEYMONT_IMP_CPUPWRCTLR_EL1_CORE_PWRDN_EN_BIT 47 isb 48 signal_pabandon_handled 49 ret 50endfunc veymont_core_pwr_dwn 51 52.section .rodata.veymont_regs, "aS" 53veymont_regs: /* The ASCII list of register names to be reported */ 54 .asciz "cpuectlr_el1", "" 55 56func veymont_cpu_reg_dump 57 adr x6, veymont_regs 58 mrs x8, VEYMONT_IMP_CPUECTLR_EL1 59 ret 60endfunc veymont_cpu_reg_dump 61 62declare_cpu_ops veymont, VEYMONT_MIDR, \ 63 veymont_reset_func, \ 64 veymont_core_pwr_dwn 65