qemu-log: Add new log category for guest bugs
[qemu/pbrook.git] / target-ppc / mpic_helper.c
blob2c6a4d30a9cf971cd1af4d93a6e862d5291f0bda
1 /*
2 * PowerPC emulation helpers for QEMU.
4 * Copyright (c) 2003-2007 Jocelyn Mayer
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
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 #include "cpu.h"
20 #include "helper.h"
22 /*****************************************************************************/
23 /* SPR accesses */
25 #if !defined(CONFIG_USER_ONLY)
27 * This is an ugly helper for EPR, which is basically the same as accessing
28 * the IACK (PIAC) register on the MPIC. Because we model the MPIC as a device
29 * that can only talk to the CPU through MMIO, let's access it that way!
31 target_ulong helper_load_epr(CPUPPCState *env)
33 return ldl_phys(env->mpic_cpu_base + 0xA0);
35 #endif