arm-trusted-firmware/bl31/bl31_traps.c
Andre Przywara ccd81f1e09 feat(el3-runtime): introduce system register trap handler
At the moment we only handle SMC traps from lower ELs, but ignore any
other synchronous traps and just panic.
To cope with system register traps, which we might need to emulate,
introduce a C function to handle those traps, and wire that up in the
exception handler to be called.

We provide a dispatcher function (in C), that will call platform
specific implementation for certain (classes of) system registers.
For now this is empty.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Change-Id: If147bcb49472eb02791498700300926afbcf75ff
2022-12-21 10:25:25 +00:00

18 lines
378 B
C

/*
* Copyright (c) 2022, ARM Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
* Dispatch synchronous system register traps from lower ELs.
*/
#include <bl31/sync_handle.h>
#include <context.h>
int handle_sysreg_trap(uint64_t esr_el3, cpu_context_t *ctx)
{
switch (esr_el3 & ISS_SYSREG_OPCODE_MASK) {
default:
return TRAP_RET_UNHANDLED;
}
}