Revision 2a7a47fc

b/hw/ppce500_mpc8544ds.c
469 469
        irqs[i][OPENPIC_OUTPUT_INT] = input[PPCE500_INPUT_INT];
470 470
        irqs[i][OPENPIC_OUTPUT_CINT] = input[PPCE500_INPUT_CINT];
471 471
        env->spr[SPR_BOOKE_PIR] = env->cpu_index = i;
472
        env->mpic_cpu_base = MPC8544_MPIC_REGS_BASE + 0x20000;
472 473

  
473 474
        ppc_booke_timers_init(env, 400000000, PPC_TIMER_E500);
474 475

  
b/target-ppc/Makefile.objs
9 9
obj-y += timebase_helper.o
10 10
obj-y += misc_helper.o
11 11
obj-y += mem_helper.o
12
obj-y += mpic_helper.o
b/target-ppc/cpu.h
1066 1066
    target_ulong ivor_mask;
1067 1067
    target_ulong ivpr_mask;
1068 1068
    target_ulong hreset_vector;
1069
    target_phys_addr_t mpic_cpu_base;
1069 1070
#endif
1070 1071

  
1071 1072
    /* Those resources are used only during code translation */
b/target-ppc/helper.h
405 405
DEF_HELPER_2(store_40x_sler, void, env, tl)
406 406
DEF_HELPER_2(store_booke_tcr, void, env, tl)
407 407
DEF_HELPER_2(store_booke_tsr, void, env, tl)
408
DEF_HELPER_1(load_epr, tl, env)
408 409
DEF_HELPER_3(store_ibatl, void, env, i32, tl)
409 410
DEF_HELPER_3(store_ibatu, void, env, i32, tl)
410 411
DEF_HELPER_3(store_dbatl, void, env, i32, tl)
b/target-ppc/mpic_helper.c
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
 */
31
target_ulong helper_load_epr(CPUPPCState *env)
32
{
33
    return ldl_phys(env->mpic_cpu_base + 0xA0);
34
}
35
#endif

Also available in: Unified diff