# HG changeset patch
# User Jerone Young <[EMAIL PROTECTED]>
# Date 1204046245 21600
# Branch merge
# Node ID 1980deb2bddff30c2f798d33937759a7ce91c242
# Parent e1260182b60d6d6716870c3bff82f503fad868fb
Fix PowerPC Qemu CPU initilization when using target-ppc/fake-exec.c
Signed-off-by: Jerone Young <[EMAIL PROTECTED]>
diff --git a/qemu/target-ppc/fake-exec.c b/qemu/target-ppc/fake-exec.c
--- a/qemu/target-ppc/fake-exec.c
+++ b/qemu/target-ppc/fake-exec.c
@@ -19,6 +19,22 @@
#include "cpu.h"
#include "exec-all.h"
+
+
+struct ppc_def_t {
+ const unsigned char *name;
+ uint32_t pvr;
+ uint32_t svr;
+ uint64_t insns_flags;
+ uint64_t msr_mask;
+ powerpc_mmu_t mmu_model;
+ powerpc_excp_t excp_model;
+ powerpc_input_t bus_model;
+ uint32_t flags;
+ int bfd_mach;
+ void (*init_proc)(CPUPPCState *env);
+ int (*check_pow)(CPUPPCState *env);
+};
int code_copy_enabled = 0;
@@ -60,13 +76,26 @@ int cpu_ppc_gen_code(CPUState *env, Tran
return 0;
}
+void init_proc_ppc440ep_kvm(CPUPPCState *env)
+{
+ ppc40x_irq_init(env);
+}
+
+static ppc_def_t ppc440ep_kvm = {
+ .name = "440EP KVM",
+ .mmu_model = POWERPC_MMU_SOFT_4xx, /*XXX needed for GDB stub */
+ .init_proc = init_proc_ppc440ep_kvm,
+};
+
const ppc_def_t *cpu_ppc_find_by_name (const unsigned char *name)
{
- return NULL;
+ return &ppc440ep_kvm;
}
int cpu_ppc_register_internal (CPUPPCState *env, const ppc_def_t *def)
{
+ env->mmu_model = def->mmu_model;
+ (*def->init_proc)(env);
return 0;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel