From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3stB-0007JD-Gl for qemu-devel@nongnu.org; Sat, 03 Mar 2012 12:37:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3ssq-0000Uw-AY for qemu-devel@nongnu.org; Sat, 03 Mar 2012 12:37:01 -0500 Received: from adsum.doit.wisc.edu ([144.92.197.210]:64587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3ssq-0000UW-7D for qemu-devel@nongnu.org; Sat, 03 Mar 2012 12:36:40 -0500 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0M0B00B02I51AS00@smtpauth1.wiscmail.wisc.edu> for qemu-devel@nongnu.org; Sat, 03 Mar 2012 10:36:37 -0600 (CST) Received: from comporellon.tachypleus.net ([unknown] [76.210.72.39]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0M0B0050LI50MC10@smtpauth1.wiscmail.wisc.edu> for qemu-devel@nongnu.org; Sat, 03 Mar 2012 10:36:36 -0600 (CST) Date: Sat, 03 Mar 2012 10:36:36 -0600 From: Nathan Whitehorn Message-id: <4F524894.7060208@freebsd.org> Subject: [Qemu-devel] [PATCH] PPC: Add PIR register to POWER7 CPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers 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 --- target-ppc/translate_init.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 8a7233f..01f4030 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -6537,6 +6537,11 @@ static void init_proc_POWER7 (CPUPPCState *env) /* Time base */ gen_tbl(env); #if !defined(CONFIG_USER_ONLY) + /* Processor identification */ + spr_register(env, SPR_PIR, "PIR", + SPR_NOACCESS, SPR_NOACCESS, + &spr_read_generic, &spr_write_pir, + 0x00000000); /* PURR & SPURR: Hack - treat these as aliases for the TB for now */ spr_register(env, SPR_PURR, "PURR", &spr_read_purr, SPR_NOACCESS, -- 1.7.9