root / target-ppc / mpic_helper.c @ a8170e5e
History | View | Annotate | Download (1.2 kB)
1 | 2a7a47fc | Alexander Graf | /*
|
---|---|---|---|
2 | 2a7a47fc | Alexander Graf | * PowerPC emulation helpers for QEMU.
|
3 | 2a7a47fc | Alexander Graf | *
|
4 | 2a7a47fc | Alexander Graf | * Copyright (c) 2003-2007 Jocelyn Mayer
|
5 | 2a7a47fc | Alexander Graf | *
|
6 | 2a7a47fc | Alexander Graf | * This library is free software; you can redistribute it and/or
|
7 | 2a7a47fc | Alexander Graf | * modify it under the terms of the GNU Lesser General Public
|
8 | 2a7a47fc | Alexander Graf | * License as published by the Free Software Foundation; either
|
9 | 2a7a47fc | Alexander Graf | * version 2 of the License, or (at your option) any later version.
|
10 | 2a7a47fc | Alexander Graf | *
|
11 | 2a7a47fc | Alexander Graf | * This library is distributed in the hope that it will be useful,
|
12 | 2a7a47fc | Alexander Graf | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 | 2a7a47fc | Alexander Graf | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14 | 2a7a47fc | Alexander Graf | * Lesser General Public License for more details.
|
15 | 2a7a47fc | Alexander Graf | *
|
16 | 2a7a47fc | Alexander Graf | * You should have received a copy of the GNU Lesser General Public
|
17 | 2a7a47fc | Alexander Graf | * License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
18 | 2a7a47fc | Alexander Graf | */
|
19 | 2a7a47fc | Alexander Graf | #include "cpu.h" |
20 | 2a7a47fc | Alexander Graf | #include "helper.h" |
21 | 2a7a47fc | Alexander Graf | |
22 | 2a7a47fc | Alexander Graf | /*****************************************************************************/
|
23 | 2a7a47fc | Alexander Graf | /* SPR accesses */
|
24 | 2a7a47fc | Alexander Graf | |
25 | 2a7a47fc | Alexander Graf | #if !defined(CONFIG_USER_ONLY)
|
26 | 2a7a47fc | Alexander Graf | /*
|
27 | 2a7a47fc | Alexander Graf | * This is an ugly helper for EPR, which is basically the same as accessing
|
28 | 2a7a47fc | Alexander Graf | * the IACK (PIAC) register on the MPIC. Because we model the MPIC as a device
|
29 | 2a7a47fc | Alexander Graf | * that can only talk to the CPU through MMIO, let's access it that way!
|
30 | 2a7a47fc | Alexander Graf | */
|
31 | 2a7a47fc | Alexander Graf | target_ulong helper_load_epr(CPUPPCState *env) |
32 | 2a7a47fc | Alexander Graf | { |
33 | 2a7a47fc | Alexander Graf | return ldl_phys(env->mpic_cpu_base + 0xA0); |
34 | 2a7a47fc | Alexander Graf | } |
35 | 2a7a47fc | Alexander Graf | #endif |