xref: /rk3399_ARM-atf/plat/allwinner/common/include/plat_macros.S (revision 58032586f88980c03969e47bcc9a84b5abc788e2)
1*58032586SSamuel Holland/*
2*58032586SSamuel Holland * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
3*58032586SSamuel Holland *
4*58032586SSamuel Holland * SPDX-License-Identifier: BSD-3-Clause
5*58032586SSamuel Holland */
6*58032586SSamuel Holland
7*58032586SSamuel Holland#ifndef __PLAT_MACROS_S__
8*58032586SSamuel Holland#define __PLAT_MACROS_S__
9*58032586SSamuel Holland
10*58032586SSamuel Holland#include <arm_macros.S>
11*58032586SSamuel Holland#include <sunxi_mmap.h>
12*58032586SSamuel Holland
13*58032586SSamuel Holland	/* ---------------------------------------------
14*58032586SSamuel Holland	 * The below required platform porting macro
15*58032586SSamuel Holland	 * prints out relevant GIC and CCI registers
16*58032586SSamuel Holland	 * whenever an unhandled exception is taken in
17*58032586SSamuel Holland	 * BL31.
18*58032586SSamuel Holland	 * Clobbers: x0 - x10, x16, x17, sp
19*58032586SSamuel Holland	 * ---------------------------------------------
20*58032586SSamuel Holland	 */
21*58032586SSamuel Holland	.macro plat_crash_print_regs
22*58032586SSamuel Holland	mov_imm	x17, SUNXI_GICC_BASE
23*58032586SSamuel Holland	mov_imm	x16, SUNXI_GICD_BASE
24*58032586SSamuel Holland	arm_print_gic_regs
25*58032586SSamuel Holland	.endm
26*58032586SSamuel Holland
27*58032586SSamuel Holland#endif /* __PLAT_MACROS_S__ */
28