aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Whitehorn <nwhitehorn@freebsd.org>2012-03-03 06:36:36 +0000
committerAlexander Graf <agraf@suse.de>2012-03-15 13:12:11 +0100
commit2e06214f22e080be4a8a17b0fae3b4c03b0aa3ea (patch)
treed756433c55824a60c8a3f670ecf5eb3a95e548ef
parent76ab9583cea5c742f32743cc65abc326719bd646 (diff)
downloadqemu-2e06214f22e080be4a8a17b0fae3b4c03b0aa3ea.zip
qemu-2e06214f22e080be4a8a17b0fae3b4c03b0aa3ea.tar.gz
qemu-2e06214f22e080be4a8a17b0fae3b4c03b0aa3ea.tar.bz2
PPC: Add PIR register to POWER7 CPU
The POWER7 emulation is missing the Processor Identification Register, mandatory in recent POWER CPUs, that is required for SMP on at least some operating systems (e.g. FreeBSD) to function properly. This patch copies the existing PIR code from the other CPUs that implement it. Signed-off-by: Nathan Whitehorn <nwhitehorn@freebsd.org> Signed-off-by: Alexander Graf <agraf@suse.de>
-rw-r--r--target-ppc/translate_init.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index c707959..5a958b9 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -6588,6 +6588,11 @@ static void init_proc_POWER7 (CPUPPCState *env)
gen_spr_7xx(env);
/* Time base */
gen_tbl(env);
+ /* Processor identification */
+ spr_register(env, SPR_PIR, "PIR",
+ SPR_NOACCESS, SPR_NOACCESS,
+ &spr_read_generic, &spr_write_pir,
+ 0x00000000);
#if !defined(CONFIG_USER_ONLY)
/* PURR & SPURR: Hack - treat these as aliases for the TB for now */
spr_register(env, SPR_PURR, "PURR",