From patchwork Tue Dec 20 19:11:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Langsdorf X-Patchwork-Id: 132504 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 C4602B6FDD for ; Wed, 21 Dec 2011 06:11:58 +1100 (EST) Received: from localhost ([::1]:35318 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rd56S-0005gb-00 for incoming@patchwork.ozlabs.org; Tue, 20 Dec 2011 14:11:56 -0500 Received: from eggs.gnu.org ([140.186.70.92]:47468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rd56G-0005dT-61 for qemu-devel@nongnu.org; Tue, 20 Dec 2011 14:11:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rd569-00065x-Re for qemu-devel@nongnu.org; Tue, 20 Dec 2011 14:11:44 -0500 Received: from smtp191.dfw.emailsrvr.com ([67.192.241.191]:51183) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rd569-00065l-KB for qemu-devel@nongnu.org; Tue, 20 Dec 2011 14:11:37 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp19.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 3EE783C8459; Tue, 20 Dec 2011 14:11:37 -0500 (EST) X-Virus-Scanned: OK Received: by smtp19.relay.dfw1a.emailsrvr.com (Authenticated sender: mark.langsdorf-AT-calxeda.com) with ESMTPSA id D04EE3C83EF; Tue, 20 Dec 2011 14:11:36 -0500 (EST) Message-ID: <4EF0DDEB.40302@calxeda.com> Date: Tue, 20 Dec 2011 13:11:39 -0600 From: Mark Langsdorf User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0 MIME-Version: 1.0 To: qemu-devel@nongnu.org, peter.maydell@linaro.org, paul@codesourcery.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 67.192.241.191 Subject: [Qemu-devel] [PATCH 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 Signed-off-by: Rob Herring Signed-off-by: Mark Langsdorf --- hw/arm_gic.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) return s->enabled; @@ -284,6 +284,9 @@ static uint32_t gic_dist_readb(void *opaque, target_phys_addr_t offset) return 0; #endif goto bad_reg; + } else if (offset < 0x100) { + /* Interrupt Security */ + return 0; } else if (offset < 0x200) { /* Interrupt Set/Clear Enable. */ if (offset < 0x180) @@ -404,7 +407,7 @@ static void gic_dist_writeb(void *opaque, target_phys_addr_t offset, int cpu; cpu = gic_get_current_cpu(); - if (offset < 0x100) { + if (offset < 0x80) { #ifdef NVIC goto bad_reg; #else @@ -417,6 +420,9 @@ static void gic_dist_writeb(void *opaque, target_phys_addr_t offset, goto bad_reg; } #endif + } else if (offset < 0x100) { + /* Interrupt Security Registers */ + /* ignore */ } else if (offset < 0x180) { /* Interrupt Set Enable. */ irq = (offset - 0x100) * 8 + GIC_BASE_IRQ; diff --git a/hw/arm_gic.c b/hw/arm_gic.c index 9b52119..5974c2f 100644 --- a/hw/arm_gic.c +++ b/hw/arm_gic.c @@ -274,7 +274,7 @@ static uint32_t gic_dist_readb(void *opaque, target_phys_addr_t offset) cpu = gic_get_current_cpu(); cm = 1 << cpu; - if (offset < 0x100) { + if (offset < 0x80) { #ifndef NVIC if (offset == 0)