mirror of
https://github.com/xemu-project/xemu.git
synced 2026-07-11 01:24:41 +02:00
target/hppa: call plugin trap callbacks
We identified a number of exceptions as interrupts, and we assume every other exception is a (syncroneous) exceptions. PA-RISC appears to not have any form of host-call. This change places the hook for PA-RISC targets. Signed-off-by: Julian Ganz <neither@nut.email> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20251027110344.2289945-15-alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
#include "exec/helper-proto.h"
|
#include "exec/helper-proto.h"
|
||||||
#include "hw/core/cpu.h"
|
#include "hw/core/cpu.h"
|
||||||
#include "hw/hppa/hppa_hardware.h"
|
#include "hw/hppa/hppa_hardware.h"
|
||||||
|
#include "qemu/plugin.h"
|
||||||
|
|
||||||
static void eval_interrupt(HPPACPU *cpu)
|
static void eval_interrupt(HPPACPU *cpu)
|
||||||
{
|
{
|
||||||
@@ -95,6 +96,7 @@ void hppa_cpu_do_interrupt(CPUState *cs)
|
|||||||
CPUHPPAState *env = &cpu->env;
|
CPUHPPAState *env = &cpu->env;
|
||||||
int i = cs->exception_index;
|
int i = cs->exception_index;
|
||||||
uint64_t old_psw, old_gva_offset_mask;
|
uint64_t old_psw, old_gva_offset_mask;
|
||||||
|
uint64_t last_pc = cs->cc->get_pc(cs);
|
||||||
|
|
||||||
/* As documented in pa2.0 -- interruption handling. */
|
/* As documented in pa2.0 -- interruption handling. */
|
||||||
/* step 1 */
|
/* step 1 */
|
||||||
@@ -212,6 +214,21 @@ void hppa_cpu_do_interrupt(CPUState *cs)
|
|||||||
env->iasq_f = 0;
|
env->iasq_f = 0;
|
||||||
env->iasq_b = 0;
|
env->iasq_b = 0;
|
||||||
|
|
||||||
|
switch (i) {
|
||||||
|
case EXCP_HPMC:
|
||||||
|
case EXCP_POWER_FAIL:
|
||||||
|
case EXCP_RC:
|
||||||
|
case EXCP_EXT_INTERRUPT:
|
||||||
|
case EXCP_LPMC:
|
||||||
|
case EXCP_PER_INTERRUPT:
|
||||||
|
case EXCP_TOC:
|
||||||
|
qemu_plugin_vcpu_interrupt_cb(cs, last_pc);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
qemu_plugin_vcpu_exception_cb(cs, last_pc);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (qemu_loglevel_mask(CPU_LOG_INT)) {
|
if (qemu_loglevel_mask(CPU_LOG_INT)) {
|
||||||
static const char * const names[] = {
|
static const char * const names[] = {
|
||||||
[EXCP_HPMC] = "high priority machine check",
|
[EXCP_HPMC] = "high priority machine check",
|
||||||
|
|||||||
Reference in New Issue
Block a user