From patchwork Mon Sep 10 20:46:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 968240 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=none (p=none dis=none) header.from=ilande.co.uk Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 428KqT3FWgz9s3l for ; Tue, 11 Sep 2018 06:47:33 +1000 (AEST) Received: from localhost ([::1]:53916 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzT5n-0006AJ-4B for incoming@patchwork.ozlabs.org; Mon, 10 Sep 2018 16:47:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzT5C-000694-K0 for qemu-devel@nongnu.org; Mon, 10 Sep 2018 16:46:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fzT59-00036t-Cg for qemu-devel@nongnu.org; Mon, 10 Sep 2018 16:46:54 -0400 Received: from chuckie.co.uk ([82.165.15.123]:36851 helo=s16892447.onlinehome-server.info) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fzT59-000364-53; Mon, 10 Sep 2018 16:46:51 -0400 Received: from host86-138-87-37.range86-138.btcentralplus.com ([86.138.87.37] helo=kentang.home) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fzT5C-0001Wq-7N; Mon, 10 Sep 2018 21:46:55 +0100 From: Mark Cave-Ayland To: hpoussin@reactos.org, david@gibson.dropbear.id.au, pbonzini@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, qemu-ppc@nongnu.org Date: Mon, 10 Sep 2018 21:46:29 +0100 Message-Id: <20180910204631.24106-1-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.11.0 X-SA-Exim-Connect-IP: 86.138.87.37 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 82.165.15.123 Subject: [Qemu-devel] [PATCH v3 0/2] 40p: fix PCI interrupt routing 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: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" According to the PReP specification section 6.1.6 "System Interrupt Assignments", all PCI interrupts are routed via IRQ 15. In the case of the 40p machine this isn't quite true in that it has a routing quirk: the LSI SCSI device is always routed to IRQ 13. At least Linux and NetBSD compare the model name presented by the firmware to "IBM PPS Model 6015", and if it matches will active this quirk. In order for guest OSs to make use of the fixed IRQ routing, the model name in the residual data must be changed in OpenBIOS using the diff below: With the above OpenBIOS patch applied as well as this patchset, it is now possible to boot the sandalfoot zImage all the way through to a working userspace when using OpenBIOS. (Note: this patchset requires the changes in my previous patchset "scsi: replace lsi53c895a_create() and lsi53c810_create() functions) Signed-off-by: Mark Cave-Ayland Based-on: <20180907125653.5010-1-mark.cave-ayland@ilande.co.uk> v3: - Add external IRQ to LSI SCSI device instead of hacking the PCI interrupt routing as suggested by David - Rebase onto the patches from v2 already applied to ppc-for-3.1 v2: - Add OR gate as recommended by Zoltan and implement routing quirk by hacking the raven PCI interrupt routing Mark Cave-Ayland (2): lsi53c895a: add optional external IRQ via qdev 40p: add fixed IRQ routing for LSI SCSI device hw/ppc/prep.c | 11 ++++++----- hw/scsi/lsi53c895a.c | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 7 deletions(-) Reviewed-by: Hervé Poussineau Tested-by: Hervé Poussineau diff --git a/arch/ppc/qemu/context.c b/arch/ppc/qemu/context.c index 06e0122..5815895 100644 --- a/arch/ppc/qemu/context.c +++ b/arch/ppc/qemu/context.c @@ -111,7 +111,7 @@ static void * residual_build(uint32_t memsize, uint32_t load_base, uint32_t load_size) { residual_t *res; - const unsigned char model[] = "Qemu\0PPC\0"; + const unsigned char model[] = "IBM PPS Model 6015\0"; int i; res = malloc(sizeof(residual_t));