From patchwork Thu Dec 22 18:20:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Langsdorf X-Patchwork-Id: 132873 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 17F9CB71AA for ; Fri, 23 Dec 2011 05:20:41 +1100 (EST) Received: from localhost ([::1]:48353 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdnFt-0003y3-IY for incoming@patchwork.ozlabs.org; Thu, 22 Dec 2011 13:20:37 -0500 Received: from eggs.gnu.org ([140.186.70.92]:57571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdnFh-0003xi-Ht for qemu-devel@nongnu.org; Thu, 22 Dec 2011 13:20:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RdnFf-0001Fo-ON for qemu-devel@nongnu.org; Thu, 22 Dec 2011 13:20:25 -0500 Received: from smtp201.dfw.emailsrvr.com ([67.192.241.201]:42173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdnFf-0001FF-LL for qemu-devel@nongnu.org; Thu, 22 Dec 2011 13:20:23 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp10.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 51DBE1B82AB; Thu, 22 Dec 2011 13:20:22 -0500 (EST) X-Virus-Scanned: OK Received: by smtp10.relay.dfw1a.emailsrvr.com (Authenticated sender: mark.langsdorf-AT-calxeda.com) with ESMTPSA id 15AB91B825B; Thu, 22 Dec 2011 13:20:22 -0500 (EST) From: Mark Langsdorf To: qemu-devel@nongnu.org Date: Thu, 22 Dec 2011 12:20:09 -0600 Message-Id: <1324578014-24746-5-git-send-email-mark.langsdorf@calxeda.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1324578014-24746-1-git-send-email-mark.langsdorf@calxeda.com> References: <1324578014-24746-1-git-send-email-mark.langsdorf@calxeda.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 67.192.241.201 Cc: kwolf@redhat.com, peter.maydell@linaro.org, Rob Herring , paul@codesourcery.com, Mark Langsdorf Subject: [Qemu-devel] [PATCH v2 4/9] arm: add dummy gic security registers X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Rob Herring Implement handling for the RAZ/WI gic security registers. Signed-off-by: Rob Herring Signed-off-by: Mark Langsdorf Reviewed-by: Peter Maydell --- Changes from v1 Moved handling back inside the 0-0x100 block Added more clarifying comments hw/arm_gic.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/arm_gic.c b/hw/arm_gic.c index 9b52119..0339cf5 100644 --- a/hw/arm_gic.c +++ b/hw/arm_gic.c @@ -282,6 +282,10 @@ static uint32_t gic_dist_readb(void *opaque, target_phys_addr_t offset) return ((GIC_NIRQ / 32) - 1) | ((NUM_CPU(s) - 1) << 5); if (offset < 0x08) return 0; + if (offset >= 0x80) { + /* Interrupt Security , RAZ/WI */ + return 0; + } #endif goto bad_reg; } else if (offset < 0x200) { @@ -413,6 +417,8 @@ static void gic_dist_writeb(void *opaque, target_phys_addr_t offset, DPRINTF("Distribution %sabled\n", s->enabled ? "En" : "Dis"); } else if (offset < 4) { /* ignored. */ + } else if (offset >= 0x80) { + /* Interrupt Security Registers, RAZ/WI */ } else { goto bad_reg; }