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 36cpu_reset_func_end veymont 37 38func veymont_core_pwr_dwn 39 /* --------------------------------------------------- 40 * Flip CPU power down bit in power control register. 41 * It will be set on powerdown and cleared on wakeup 42 * --------------------------------------------------- 43 */ 44 sysreg_bit_toggle VEYMONT_IMP_CPUPWRCTLR_EL1, \ 45 VEYMONT_IMP_CPUPWRCTLR_EL1_CORE_PWRDN_EN_BIT 46 isb 47 signal_pabandon_handled 48 ret 49endfunc veymont_core_pwr_dwn 50 51.section .rodata.veymont_regs, "aS" 52veymont_regs: /* The ASCII list of register names to be reported */ 53 .asciz "cpuectlr_el1", "" 54 55func veymont_cpu_reg_dump 56 adr x6, veymont_regs 57 mrs x8, VEYMONT_IMP_CPUECTLR_EL1 58 ret 59endfunc veymont_cpu_reg_dump 60 61declare_cpu_ops veymont, VEYMONT_MIDR, \ 62 veymont_reset_func, \ 63 veymont_core_pwr_dwn 64