From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkE4y-0005kO-Ug for qemu-devel@nongnu.org; Fri, 31 Oct 2014 11:26:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjxxV-000621-AU for qemu-devel@nongnu.org; Thu, 30 Oct 2014 18:12:51 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:46840) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjxxV-00061L-5M for qemu-devel@nongnu.org; Thu, 30 Oct 2014 18:12:45 -0400 Received: by mail-pa0-f52.google.com with SMTP id fa1so6284224pad.25 for ; Thu, 30 Oct 2014 15:12:44 -0700 (PDT) From: Greg Bellows Date: Thu, 30 Oct 2014 17:12:01 -0500 Message-Id: <1414707132-24588-6-git-send-email-greg.bellows@linaro.org> In-Reply-To: <1414707132-24588-1-git-send-email-greg.bellows@linaro.org> References: <1414707132-24588-1-git-send-email-greg.bellows@linaro.org> Subject: [Qemu-devel] [PATCH v2 05/16] hw/intc/arm_gic: Add ns_access() function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, peter.maydell@linaro.org, serge.fdrv@gmail.com, edgar.iglesias@gmail.com, aggelerf@ethz.ch, christoffer.dall@linaro.org Cc: daniel.thompson@linaro.org From: Fabian Aggeler Security Extensions for GICv1 and GICv2 use register banking to provide transparent access to seperate Secure and Non-secure copies of GIC configuration registers. This function will later be replaced by code determining the security state of a read/write access to a register. Signed-off-by: Fabian Aggeler --- hw/intc/arm_gic.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index 0ee7778..bee71a1 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -45,6 +45,13 @@ static inline int gic_get_current_cpu(GICState *s) return 0; } +/* Security state of a read / write access */ +static inline bool ns_access(void) +{ + /* TODO: use actual security state */ + return true; +} + /* TODO: Many places that call this routine could be optimized. */ /* Update interrupt status after enabled or pending bits have been changed. */ void gic_update(GICState *s) -- 1.8.3.2