feat(cpus): add a64fx cpu to tf-a

while sbsa maintainers upstream decide whether new cpus types
should be in, add fujitsu a64fx cpu type in advance

Signed-off-by: Itaru Kitayama <itaru.kitayama@fujitsu.com>
Change-Id: I521a62f1233f3fe6e92f040edaff2cc60a1bd874
This commit is contained in:
Itaru Kitayama 2022-07-04 14:36:00 +09:00
parent caca0e57b8
commit 74ec90e69b
2 changed files with 64 additions and 0 deletions

View file

@ -0,0 +1,15 @@
/*
* Copyright (c) 2022, Fujitsu Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef A64FX_H
#define A64FX_H
#include <lib/utils_def.h>
/* A64FX midr for revision 0 */
#define A64FX_MIDR U(0x461f0010)
#endif /* A64FX_H */

49
lib/cpus/aarch64/a64fx.S Normal file
View file

@ -0,0 +1,49 @@
/*
* Copyright (c) 2022, Fujitsu Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch.h>
#include <asm_macros.S>
#include <assert_macros.S>
#include <a64fx.h>
#include <cpu_macros.S>
#include <plat_macros.S>
func a64fx_core_pwr_dwn
endfunc a64fx_core_pwr_dwn
func a64fx_cluster_pwr_dwn
endfunc a64fx_cluster_pwr_dwn
#if REPORT_ERRATA
/*
* Errata printing function for A64FX. Must follow AAPCS.
*/
func a64fx_errata_report
ret
endfunc a64fx_errata_report
#endif
/* ---------------------------------------------
* This function provides cpu specific
* register information for crash reporting.
* It needs to return with x6 pointing to
* a list of register names in ascii and
* x8 - x15 having values of registers to be
* reported.
* ---------------------------------------------
*/
.section .rodata.a64fx_regs, "aS"
a64fx_regs: /* The ascii list of register names to be reported */
.asciz ""
func a64fx_cpu_reg_dump
adr x6, a64fx_regs
ret
endfunc a64fx_cpu_reg_dump
declare_cpu_ops a64fx, A64FX_MIDR, CPU_NO_RESET_FUNC \
a64fx_core_pwr_dwn, \
a64fx_cluster_pwr_dwn