xref: /rk3399_ARM-atf/bl31/bl31_traps.c (revision ccd81f1e097c3eafe38523110c8eebabbe662508)
1*ccd81f1eSAndre Przywara /*
2*ccd81f1eSAndre Przywara  * Copyright (c) 2022, ARM Limited. All rights reserved.
3*ccd81f1eSAndre Przywara  *
4*ccd81f1eSAndre Przywara  * SPDX-License-Identifier: BSD-3-Clause
5*ccd81f1eSAndre Przywara  *
6*ccd81f1eSAndre Przywara  * Dispatch synchronous system register traps from lower ELs.
7*ccd81f1eSAndre Przywara  */
8*ccd81f1eSAndre Przywara 
9*ccd81f1eSAndre Przywara #include <bl31/sync_handle.h>
10*ccd81f1eSAndre Przywara #include <context.h>
11*ccd81f1eSAndre Przywara 
12*ccd81f1eSAndre Przywara int handle_sysreg_trap(uint64_t esr_el3, cpu_context_t *ctx)
13*ccd81f1eSAndre Przywara {
14*ccd81f1eSAndre Przywara 	switch (esr_el3 & ISS_SYSREG_OPCODE_MASK) {
15*ccd81f1eSAndre Przywara 	default:
16*ccd81f1eSAndre Przywara 		return TRAP_RET_UNHANDLED;
17*ccd81f1eSAndre Przywara 	}
18*ccd81f1eSAndre Przywara }
19