From patchwork Tue Aug 21 13:28:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 960350 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41vskT3rNqz9s5b for ; Wed, 22 Aug 2018 00:00:01 +1000 (AEST) Received: from localhost ([::1]:53751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fs7CP-0000XM-8v for incoming@patchwork.ozlabs.org; Tue, 21 Aug 2018 09:59:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fs6i8-00064x-Hi for qemu-devel@nongnu.org; Tue, 21 Aug 2018 09:28:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fs6i7-0003vv-Nw for qemu-devel@nongnu.org; Tue, 21 Aug 2018 09:28:40 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:44756) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fs6i3-0003S5-Nb; Tue, 21 Aug 2018 09:28:35 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1fs6hj-000492-F9; Tue, 21 Aug 2018 14:28:15 +0100 From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Tue, 21 Aug 2018 14:28:03 +0100 Message-Id: <20180821132811.17675-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180821132811.17675-1-peter.maydell@linaro.org> References: <20180821132811.17675-1-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH 1/9] hw/intc/arm_gic: Document QEMU interface X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Luc Michel , patches@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The GICv2's QEMU interface (sysbus MMIO regions, IRQs, etc) is now quite complicated with the addition of the virtualization extensions. Add a comment in the header file which documents it. Signed-off-by: Peter Maydell --- I needed to write this out to figure out what I was connecting to what in the a15mpcore object :-) --- include/hw/intc/arm_gic.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/include/hw/intc/arm_gic.h b/include/hw/intc/arm_gic.h index 42bb535fd45..989bc837606 100644 --- a/include/hw/intc/arm_gic.h +++ b/include/hw/intc/arm_gic.h @@ -18,6 +18,41 @@ * with this program; if not, see . */ +/* + * QEMU interface: + * + QOM property "num-cpu": number of CPUs to support + * + QOM property "num-irq": number of IRQs (including both SPIs and PPIs) + * + QOM property "revision": GIC version (1 or 2), or 0 for the 11MPCore GIC + * + QOM property "has-security-extensions": set true if the GIC should + * implement the security extensions + * + QOM property "has-virtualization-extensions": set true if the GIC should + * implement the virtualization extensions + * + unnamed GPIO inputs: (where P is number of PPIs, i.e. num-irq - 32) + * [0..P-1] SPIs + * [P..P+31] PPIs for CPU 0 + * [P+32..P+63] PPIs for CPU 1 + * ... + * + sysbus IRQ 0 : IRQ + * + sysbus IRQ 1 : FIQ + * + sysbus IRQ 2 : VIRQ (exists even if virt extensions not present) + * + sysbus IRQ 3 : VFIQ (exists even if virt extensions not present) + * + sysbus IRQ 4 : maintenance IRQ for CPU i/f 0 (only if virt extns present) + * + sysbus IRQ 5 : maintenance IRQ for CPU i/f 1 (only if virt extns present) + * ... + * + sysbus MMIO regions: (in order; numbers will vary depending on + * whether virtualization extensions are present and on number of cores) + * - distributor registers (GICD*) + * - CPU interface for the accessing core (GICC*) + * - virtual interface control registers (GICH*) (only if virt extns present) + * - virtual CPU interface for the accessing core (GICV*) (only if virt) + * - CPU 0 CPU interface registers + * - CPU 1 CPU interface registers + * ... + * - CPU 0 VCPU interface registers (only if virt extns present) + * - CPU 1 VCPU interface registers (only if virt extns present) + * ... + */ + #ifndef HW_ARM_GIC_H #define HW_ARM_GIC_H