Received: from eggs.gnu.org ([208.118.235.92]:41081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S89Zk-0002gw-96 for qemu-devel@nongnu.org; Thu, 15 Mar 2012 08:14:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S89Zd-0002QA-3t for qemu-devel@nongnu.org; Thu, 15 Mar 2012 08:14:35 -0400 From: Alexander Graf Date: Thu, 15 Mar 2012 13:14:15 +0100 Message-Id: <1331813662-15141-10-git-send-email-agraf@suse.de> In-Reply-To: <1331813662-15141-1-git-send-email-agraf@suse.de> References: <1331813662-15141-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 09/16] PPC: Add PIR register to POWER7 CPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel qemu-devel Cc: blauwirbel@gmail.com, qemu-ppc@nongnu.org, Nathan Whitehorn , aurelien@aurel32.net From: Nathan Whitehorn 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 Signed-off-by: Alexander Graf --- 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 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", -- 1.6.0.2