mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-22 20:38:03 +00:00
refactor(plat/ea_handler): Use default ea handler implementation for panic
Put default ea handler implementation into function plat_default_ea_handler() which just print verbose information and panic, so it can be called also from overwritten / weak function plat_ea_handler() implementation. Replace every custom implementation of printing verbose error message of external aborts in custom plat_ea_handler() functions by a common implementation from plat_default_ea_handler() function. Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I15897f61b62b4c3c29351e693f51d4df381f3b98
This commit is contained in:
parent
c87f2c1dd3
commit
30e8fa7e77
5 changed files with 11 additions and 18 deletions
|
@ -141,6 +141,8 @@ int plat_sdei_validate_entry_point(uintptr_t ep, unsigned int client_mode);
|
||||||
void plat_sdei_handle_masked_trigger(uint64_t mpidr, unsigned int intr);
|
void plat_sdei_handle_masked_trigger(uint64_t mpidr, unsigned int intr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void plat_default_ea_handler(unsigned int ea_reason, uint64_t syndrome, void *cookie,
|
||||||
|
void *handle, uint64_t flags);
|
||||||
void plat_ea_handler(unsigned int ea_reason, uint64_t syndrome, void *cookie,
|
void plat_ea_handler(unsigned int ea_reason, uint64_t syndrome, void *cookie,
|
||||||
void *handle, uint64_t flags);
|
void *handle, uint64_t flags);
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#pragma weak plat_sdei_validate_entry_point
|
#pragma weak plat_sdei_validate_entry_point
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#pragma weak plat_ea_handler
|
#pragma weak plat_ea_handler = plat_default_ea_handler
|
||||||
|
|
||||||
void bl31_plat_runtime_setup(void)
|
void bl31_plat_runtime_setup(void)
|
||||||
{
|
{
|
||||||
|
@ -79,7 +79,7 @@ static const char *get_el_str(unsigned int el)
|
||||||
#endif /* !ENABLE_BACKTRACE */
|
#endif /* !ENABLE_BACKTRACE */
|
||||||
|
|
||||||
/* RAS functions common to AArch64 ARM platforms */
|
/* RAS functions common to AArch64 ARM platforms */
|
||||||
void plat_ea_handler(unsigned int ea_reason, uint64_t syndrome, void *cookie,
|
void plat_default_ea_handler(unsigned int ea_reason, uint64_t syndrome, void *cookie,
|
||||||
void *handle, uint64_t flags)
|
void *handle, uint64_t flags)
|
||||||
{
|
{
|
||||||
#if RAS_EXTENSION
|
#if RAS_EXTENSION
|
||||||
|
|
|
@ -7,17 +7,15 @@
|
||||||
#include <common/bl_common.h>
|
#include <common/bl_common.h>
|
||||||
#include <common/debug.h>
|
#include <common/debug.h>
|
||||||
#include <arch_helpers.h>
|
#include <arch_helpers.h>
|
||||||
|
#include <plat/common/platform.h>
|
||||||
|
|
||||||
#define ADVK_SERROR_SYNDROME 0xbf000002
|
#define ADVK_SERROR_SYNDROME 0xbf000002
|
||||||
|
|
||||||
void plat_ea_handler(unsigned int ea_reason, uint64_t syndrome, void *cookie,
|
void plat_ea_handler(unsigned int ea_reason, uint64_t syndrome, void *cookie,
|
||||||
void *handle, uint64_t flags)
|
void *handle, uint64_t flags)
|
||||||
{
|
{
|
||||||
if (syndrome != ADVK_SERROR_SYNDROME) {
|
if (syndrome == ADVK_SERROR_SYNDROME)
|
||||||
ERROR("Unhandled External Abort received on 0x%lx at EL3!\n",
|
return;
|
||||||
read_mpidr_el1());
|
|
||||||
ERROR(" exception reason=%u syndrome=0x%llx\n", ea_reason,
|
plat_default_ea_handler(ea_reason, syndrome, cookie, handle, flags);
|
||||||
syndrome);
|
|
||||||
panic();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -493,9 +493,6 @@ void plat_ea_handler(unsigned int ea_reason, uint64_t syndrome, void *cookie,
|
||||||
#if RAS_EXTENSION
|
#if RAS_EXTENSION
|
||||||
tegra194_ea_handler(ea_reason, syndrome, cookie, handle, flags);
|
tegra194_ea_handler(ea_reason, syndrome, cookie, handle, flags);
|
||||||
#else
|
#else
|
||||||
ERROR("Unhandled External Abort received on 0x%llx at EL3!\n",
|
plat_default_ea_handler(ea_reason, syndrome, cookie, handle, flags);
|
||||||
read_mpidr_el1());
|
|
||||||
ERROR(" exception reason=%u syndrome=0x%lx\n", ea_reason, syndrome);
|
|
||||||
panic();
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,11 +60,7 @@ void plat_ea_handler(unsigned int ea_reason, uint64_t syndrome, void *cookie,
|
||||||
if (fixed)
|
if (fixed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ERROR("Unhandled External Abort received on 0x%lx at EL3!\n",
|
plat_default_ea_handler(ea_reason, syndrome, cookie, handle, flags);
|
||||||
read_mpidr_el1());
|
|
||||||
ERROR(" exception reason=%u syndrome=0x%llx\n", ea_reason, syndrome);
|
|
||||||
|
|
||||||
panic();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <drivers/renesas/rcar/console/console.h>
|
#include <drivers/renesas/rcar/console/console.h>
|
||||||
|
|
Loading…
Add table
Reference in a new issue