From: Jerone Young <jyoung5@us.ibm.com>
To: kvm-devel@lists.sourceforge.net
Cc: kvm-ppc-devel@lists.sourceforge.net
Subject: [PATCH] Fix PowerPC Qemu CPU initilization when using target-ppc/fake-exec.c
Date: Tue, 26 Feb 2008 11:18:30 -0600 [thread overview]
Message-ID: <1980deb2bddff30c2f79.1204046310@thinkpad.austin.ibm.com> (raw)
# HG changeset patch
# User Jerone Young <jyoung5@us.ibm.com>
# 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 <jyoung5@us.ibm.com>
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/
next reply other threads:[~2008-02-26 17:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-26 17:18 Jerone Young [this message]
2008-02-26 19:18 ` [kvm-ppc-devel] [PATCH] Fix PowerPC Qemu CPU initilization when using target-ppc/fake-exec.c Hollis Blanchard
2008-02-27 10:38 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1980deb2bddff30c2f79.1204046310@thinkpad.austin.ibm.com \
--to=jyoung5@us.ibm.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=kvm-ppc-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox