Patch set 35:Code-Review -1
2 comments:
File src/mainboard/emulation/qemu-aarch64/exception.c:
Patch Set #33, Line 19: return EXC_RET_IGNORED;
Sorry, I'm still not sure what EXC_RET_HANDLED and EXC_RET_IGNORED are doing. […]
No, you should only have one exception handler. You cannot remove exception handlers, so you need to change the behavior of the one you have. So something like this:
static enum {
ABORT_CHECKER_NOT_REGISTERED,
ABORT_CHECKER_DEACTIVATED,
ABORT_CHECKER_NOT_TRIGGERED,
ABORT_CHECKER_TRIGGERED,
} abort_state = ABORT_CHECKER_NOT_REGISTERED;
static int abort_checker(struct exc_state *state, uint64_t vector_id)
{
if (abort_state == ABORT_CHECKER_DEACTIVATED)
return EXC_RET_IGNORED;
if (raw_read_esr_el3() >> 26 != 0x25)
return EXC_RET_IGNORED; /* not a data abort */
abort_state = ABORT_CHECKER_TRIGGERED;
state->elx.elr += sizeof(uint32_t); /* jump over faulting instruction */
raw_write_elr_el3(state->elx.elr);
return EXC_RET_HANDLED;
}
static int probe_mb(...)
{
[...]
if (ENV_ARM64) {
read32((void *)addr);
return abort_state == ABORT_CHECKER_NOT_TRIGGERED;
}
[...]
}
static int probe_ramsize(void)
{
if (ENV_ARM64) {
if (abort_state == ABORT_CHECKER_NOT_REGISTERED)
exception_handler_register(EXC_VID_CUR_SP_EL0_SERR);
abort_state = ABORT_CHECKER_NOT_TRIGGERED;
}
[...]
if (ENV_ARM64)
abort_state = ABORT_CHECKER_DEACTIVATED;
}
File src/mainboard/emulation/qemu-aarch64/include/mainboard/exception.h:
If you're leaving the exception stuff for another patch then please remove this file.
To view, visit change 33387. To unsubscribe, or for help writing mail filters, visit settings.