misc_helper.c (f003109f710bb39a78c27ce18aa10579340f5a3f) | misc_helper.c (7b694df6a6deeac8ede0512f983c70463968021a) |
---|---|
1/* 2 * Miscellaneous PowerPC emulation helpers for QEMU. 3 * 4 * Copyright (c) 2003-2007 Jocelyn Mayer 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either --- 11 unchanged lines hidden (view full) --- 20#include "qemu/osdep.h" 21#include "qemu/log.h" 22#include "cpu.h" 23#include "exec/exec-all.h" 24#include "exec/helper-proto.h" 25#include "qemu/error-report.h" 26#include "qemu/main-loop.h" 27#include "mmu-book3s-v3.h" | 1/* 2 * Miscellaneous PowerPC emulation helpers for QEMU. 3 * 4 * Copyright (c) 2003-2007 Jocelyn Mayer 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either --- 11 unchanged lines hidden (view full) --- 20#include "qemu/osdep.h" 21#include "qemu/log.h" 22#include "cpu.h" 23#include "exec/exec-all.h" 24#include "exec/helper-proto.h" 25#include "qemu/error-report.h" 26#include "qemu/main-loop.h" 27#include "mmu-book3s-v3.h" |
28#include "hw/ppc/ppc.h" |
|
28 29#include "helper_regs.h" 30 31/*****************************************************************************/ 32/* SPR accesses */ 33void helper_load_dump_spr(CPUPPCState *env, uint32_t sprn) 34{ 35 qemu_log("Read SPR %d %03x => " TARGET_FMT_lx "\n", sprn, sprn, --- 132 unchanged lines hidden (view full) --- 168 } 169 170 return dpdes; 171} 172 173void helper_store_dpdes(CPUPPCState *env, target_ulong val) 174{ 175 PowerPCCPU *cpu = env_archcpu(env); | 29 30#include "helper_regs.h" 31 32/*****************************************************************************/ 33/* SPR accesses */ 34void helper_load_dump_spr(CPUPPCState *env, uint32_t sprn) 35{ 36 qemu_log("Read SPR %d %03x => " TARGET_FMT_lx "\n", sprn, sprn, --- 132 unchanged lines hidden (view full) --- 169 } 170 171 return dpdes; 172} 173 174void helper_store_dpdes(CPUPPCState *env, target_ulong val) 175{ 176 PowerPCCPU *cpu = env_archcpu(env); |
176 CPUState *cs = CPU(cpu); | |
177 178 helper_hfscr_facility_check(env, HFSCR_MSGP, "store DPDES", HFSCR_IC_MSGP); 179 180 /* TODO: TCG supports only one thread */ 181 if (val & ~0x1) { 182 qemu_log_mask(LOG_GUEST_ERROR, "Invalid DPDES register value " 183 TARGET_FMT_lx"\n", val); 184 return; 185 } 186 | 177 178 helper_hfscr_facility_check(env, HFSCR_MSGP, "store DPDES", HFSCR_IC_MSGP); 179 180 /* TODO: TCG supports only one thread */ 181 if (val & ~0x1) { 182 qemu_log_mask(LOG_GUEST_ERROR, "Invalid DPDES register value " 183 TARGET_FMT_lx"\n", val); 184 return; 185 } 186 |
187 if (val & 0x1) { 188 env->pending_interrupts |= PPC_INTERRUPT_DOORBELL; 189 cpu_interrupt(cs, CPU_INTERRUPT_HARD); 190 } else { 191 env->pending_interrupts &= ~PPC_INTERRUPT_DOORBELL; 192 } | 187 ppc_set_irq(cpu, PPC_INTERRUPT_DOORBELL, val & 0x1); |
193} 194#endif /* defined(TARGET_PPC64) */ 195 196void helper_store_pidr(CPUPPCState *env, target_ulong val) 197{ 198 env->spr[SPR_BOOKS_PID] = val; 199 tlb_flush(env_cpu(env)); 200} --- 72 unchanged lines hidden --- | 188} 189#endif /* defined(TARGET_PPC64) */ 190 191void helper_store_pidr(CPUPPCState *env, target_ulong val) 192{ 193 env->spr[SPR_BOOKS_PID] = val; 194 tlb_flush(env_cpu(env)); 195} --- 72 unchanged lines hidden --- |