arm-trusted-firmware/plat/common/aarch32/platform_helpers.S
Yann Gautier 6dc5979a6c feat(debug): add helpers for aborts on AARCH32
New helper functions are created to handle data & prefetch aborts
in AARCH32. They call platform functions, just like what
report_exception is doing.
As extended MSR/MRS instructions (to access lr_abt in monitor mode)
are only available if CPU (Armv7) has virtualization extension,
the functions branch to original report_exception handlers if this is
not the case.
Those new helpers are created mainly to distinguish data and prefetch
aborts, as they both share the same mode.
This adds 40 bytes of code.

Change-Id: I5dd31930344ad4e3a658f8a9d366a87a300aeb67
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-10-03 14:42:40 +02:00

89 lines
2.5 KiB
ArmAsm

/*
* Copyright (c) 2016-2022, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch.h>
#include <asm_macros.S>
.weak plat_report_exception
.weak plat_report_prefetch_abort
.weak plat_report_data_abort
.weak plat_reset_handler
.weak plat_disable_acp
.weak bl1_plat_prepare_exit
.weak platform_mem_init
.weak plat_panic_handler
/* -----------------------------------------------------
* Placeholder function which should be redefined by
* each platform.
* -----------------------------------------------------
*/
func plat_report_exception
bx lr
endfunc plat_report_exception
/* -----------------------------------------------------
* Placeholder function which should be redefined by
* each platform.
* -----------------------------------------------------
*/
func plat_report_prefetch_abort
bx lr
endfunc plat_report_prefetch_abort
/* -----------------------------------------------------
* Placeholder function which should be redefined by
* each platform.
* -----------------------------------------------------
*/
func plat_report_data_abort
bx lr
endfunc plat_report_data_abort
/* -----------------------------------------------------
* Placeholder function which should be redefined by
* each platform.
* -----------------------------------------------------
*/
func plat_reset_handler
bx lr
endfunc plat_reset_handler
/* -----------------------------------------------------
* Placeholder function which should be redefined by
* each platform.
* -----------------------------------------------------
*/
func plat_disable_acp
bx lr
endfunc plat_disable_acp
/* ---------------------------------------------------------------------
* Placeholder function which should be redefined by
* each platform.
* ---------------------------------------------------------------------
*/
func platform_mem_init
bx lr
endfunc platform_mem_init
/* -----------------------------------------------------
* void bl1_plat_prepare_exit(entry_point_info_t *ep_info);
* Called before exiting BL1. Default: do nothing
* -----------------------------------------------------
*/
func bl1_plat_prepare_exit
bx lr
endfunc bl1_plat_prepare_exit
/* -----------------------------------------------------
* void plat_panic_handler(void) __dead2;
* Endless loop by default.
* -----------------------------------------------------
*/
func plat_panic_handler
b plat_panic_handler
endfunc plat_panic_handler