1/* 2 * 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 9 * version 2 of the License, or (at your option) any later version. 10 * 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. 15 * 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/>. 18 */ 19#include "cpu.h" 20#include "helper.h" 21 22/*****************************************************************************/ 23/* SPR accesses */ 24 25#if !defined(CONFIG_USER_ONLY) 26/* 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! 30 */ 31target_ulong helper_load_epr(CPUPPCState *env) 32{ 33 return ldl_phys(env->mpic_cpu_base + 0xA0); 34} 35#endif 36