From nobody Mon May 20 14:56:41 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666813746; cv=none; d=zohomail.com; s=zohoarc; b=ZC1ugQX/UFgYeHDhVkYfnlwWo1/W7OuddDkK/cg1V4gxnNExNf/aYumy6q03aoOrv68hhn+B3yUr0AL/T5kWlBJlUt16ceWkoXqVxU+j8fOHD/bkeAGNQDGyehm0kCd6/Hy5L9juNf7G6ov9G1p2lekzVdjMCMsVPxXLuYqIJcs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666813746; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=74DDUYUGfeWypaCG02ItfjGfd6cxkR71vlmSf2VE7U4=; b=c3xZ0mY6S3CZgrnkzLjCHBW+ZPtUZEvLN4IBpj8flUIf8xFgZFw8R4h4k4U6mrKBAB44k9CEg+kA3lsizqMU8TkrXiZ4OyccmPrJx5Jxa2XsjdY6WCYbV8+/UMHnAb9znKQlkZACsNYbtH5TjRGeiioIGq0G8Vnu8//z5aZP96s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16668137460480.49940686275476764; Wed, 26 Oct 2022 12:49:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onmMb-0003et-Fg; Wed, 26 Oct 2022 15:46:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onmME-0002Tn-1i for qemu-devel@nongnu.org; Wed, 26 Oct 2022 15:46:35 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onmMA-00072H-7P for qemu-devel@nongnu.org; Wed, 26 Oct 2022 15:46:33 -0400 Received: by mail-wr1-x42e.google.com with SMTP id a14so25425445wru.5 for ; Wed, 26 Oct 2022 12:46:29 -0700 (PDT) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id j8-20020a05600c190800b003b47e8a5d22sm3058441wmq.23.2022.10.26.12.46.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 26 Oct 2022 12:46:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=74DDUYUGfeWypaCG02ItfjGfd6cxkR71vlmSf2VE7U4=; b=nsApW0arGsOqF+SyXpo1/yhstAHOOGWB2zIzfF6pre6KDDaWba3M/ktfZZjTgkcYyy nEqSf9HVYh7CPpDazizcEAZmGRUb/iff+cqut2SYWF70MfrJ52dD98WJ18WSF5ffZQT7 IzleLgsgTJimQL8VokjSd2BavlbZM1eUFYC7qsF0NgmUnQuSiINxXiA9vqonHru1oIoY oJHmhGCqsW5dR6wTAy7CQ6b8qqjpsAbslMfgE+8bniFCa1VzJq6FH+bnesWMLB67dl9g 7Q3W6tl2iHilBhnLUtavWEY+lvbDLKbKlVpOxTHA6V+IGa9oEro3EoOxElJ3Od1z60pv mkHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=74DDUYUGfeWypaCG02ItfjGfd6cxkR71vlmSf2VE7U4=; b=RuEkicnkHdWjx4BBssrHEgfKxVt1pQtsreNLVg55UnolhqDlqOfGsOUuGW2sZ5qu84 jOwJzX8IX6VvI2E1gQ+jCwRHutPkhP1iH4JdO2tPIy1LfSn8h3fdduBoXIPpCWkOXr6L 6SiQeh7D+6+Ua8L2GQds9jvBPy+wWVCuSOYVRfgf81eq8EL5/GkSlI8Ti2upvWmE3Eyn SwZ71eFK+S53POcWU/ogH5J/Cgk0b+/CVGuqC352JP4B8DAf4jviOl7OptQD2Z0DAhYI hbvd8m6Ra+v/XJIR9Wu4b7flf0fnMEzftWYM+rWcRGA5WSlGOYZWL/3elBa4NBScixdS q8ew== X-Gm-Message-State: ACrzQf0mSPXnViY5OvmMj5HhQ9GDZRvqldonB2VGw0D1JtVeHmfa3Psd +2sUAsM2IZgtRI5RBHji9U1Dpw== X-Google-Smtp-Source: AMsMyM7H4oSSp1lIVvYWf3obnSCosyel39KH6qEx+AbWLUgPXTAu1fCkBVbdgHa3Rr/x3lo4uJgq9Q== X-Received: by 2002:a05:6000:1864:b0:22e:5e05:b1f7 with SMTP id d4-20020a056000186400b0022e5e05b1f7mr29630127wri.226.1666813588094; Wed, 26 Oct 2022 12:46:28 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Bernhard Beschow , qemu-devel@nongnu.org Cc: Jiaxun Yang , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aurelien Jarno , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/3] hw/mips/malta: Introduce PIIX4_PCI_DEVFN definition Date: Wed, 26 Oct 2022 21:46:17 +0200 Message-Id: <20221026194619.28880-2-philmd@linaro.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221026194619.28880-1-philmd@linaro.org> References: <20221026194619.28880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666813747895100007 The PIIX4 PCI-ISA bridge function is always located at 10:0. Since we want to re-use its address, add the PIIX4_PCI_DEVFN definition. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/mips/malta.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/mips/malta.c b/hw/mips/malta.c index 272d93eea7..df0f448b67 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -72,6 +72,8 @@ =20 #define MAX_IDE_BUS 2 =20 +#define PIIX4_PCI_DEVFN PCI_DEVFN(10, 0) + typedef struct { MemoryRegion iomem; MemoryRegion iomem_lo; /* 0 - 0x900 */ @@ -1377,7 +1379,7 @@ void mips_malta_init(MachineState *machine) empty_slot_init("GT64120", 0, 0x20000000); =20 /* Southbridge */ - piix4 =3D pci_create_simple_multifunction(pci_bus, PCI_DEVFN(10, 0), t= rue, + piix4 =3D pci_create_simple_multifunction(pci_bus, PIIX4_PCI_DEVFN, tr= ue, TYPE_PIIX4_PCI_DEVICE); dev =3D DEVICE(piix4); isa_bus =3D ISA_BUS(qdev_get_child_bus(dev, "isa.0")); --=20 2.37.3 From nobody Mon May 20 14:56:41 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666813744; cv=none; d=zohomail.com; s=zohoarc; b=MV/uR/5owf5TYcS534OGF+lihuEHQPbyFikcK1NgBvC+tAP3wNDiC7EgCouuU8HvOxUFJREV5V/4OKN3D3XUcIrjo92paVDPTQ0be4wvDieyO7LYgVLLAPU/ydUm72s0FcwSVLYtdq3Js6uzmYtSDNfoPe0LgwSAoyJDZ2IMdSM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666813744; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=622bstx+b/J583b5PKPx60lVjqF4abbcPq+aoKN4uak=; b=c4h/psKyl9VKWYuzVKxJVFrQ2IC8thIzJxraYDMy29jpAubCEvZi3cWPilExbBRmOc5tLTIN0v4oNk8ys61bL8WTvWj9H0ELqe8MiRvanrUmIYLpekgumLU7xCKe4FUFULtsb35ExrrUebX6OpNfej1JKSzYbqPq5DalnOAxWow= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666813744126873.8687978106711; Wed, 26 Oct 2022 12:49:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onmMf-0004Dz-4E; Wed, 26 Oct 2022 15:47:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onmMJ-0002o1-T6 for qemu-devel@nongnu.org; Wed, 26 Oct 2022 15:46:42 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onmMG-00072q-Fo for qemu-devel@nongnu.org; Wed, 26 Oct 2022 15:46:38 -0400 Received: by mail-wm1-x329.google.com with SMTP id n14so6731087wmq.3 for ; Wed, 26 Oct 2022 12:46:34 -0700 (PDT) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id bi15-20020a05600c3d8f00b003b497138093sm2513127wmb.47.2022.10.26.12.46.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 26 Oct 2022 12:46:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=622bstx+b/J583b5PKPx60lVjqF4abbcPq+aoKN4uak=; b=ShmBVx1z1J49kk92fR6aMB5+9hBVQRjreebQLU9XyV855yFQjzi6+vxTat5U2/F3O6 a0fdZpmn/9w2F07j6gY/I5Fih7aGee6+pRJye3RigV5Tjhn1tmDY2ffdFB4QdLnS/0wJ NdjDnCrrQ6ULWun2wSRzOWz2GhRRliPbCbV4rn+Oq3SG5J3iWulu0Lx+m7bPSnv5r/FC Cek9qB6uyFFRmBWuveUFzw94KQ3zhI9FAKTXkJL/rIvBgfUy4KZGyl9UqT7fxEWHYpRE PK8EkYByXWdZ5RvyZ78xZnQMQw9U5XiVYfYZt4EvfLaCbZwxg8DiD1+NlYVHpTayzycN BQVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=622bstx+b/J583b5PKPx60lVjqF4abbcPq+aoKN4uak=; b=tkJQ8m1DMs0JuMRllVaCCSpo0TrFrqs6HLDOz6YbEwaktfISlDpoXN2udMU2+Ez13r YAVUH9GXnfcBD3KNsdC5thQ0pdNB0anSpE/pO7obwSIU1xjIjtnAaFtfg8ffCumkXtPS 0Xax04X0mIM292Su4fCe7+omQZb2XKlX7C/wzIUL6JLvw92auArxu9w69Io0NN8rp8to 4i/bnXRQ493rEZC/HnOsgZ1lviYp4OtNU0lGiQJ8+APPIBrBHUwx4bdkEjkuLadmO9n5 pUbgJLEuDkdHZCGWbw2Zdfl019wDSpY2X4FfOPsp1SFRTB7AQe335QqAzgv8sGzCEnuy RJHQ== X-Gm-Message-State: ACrzQf3b3ygV0uJn+6ocC/rHtE923YVNu4DOCZrig0AkC8i8RkznzHVM dWtJCzn+Y3+6uKJm8RpsF5x94w== X-Google-Smtp-Source: AMsMyM7NI8e+ELGmorAM0ukC34ppZq5G1V9gn4vCWNT8dmdIleQPT3TB54SrHV/N+Ed584Hs+BQGpA== X-Received: by 2002:a05:600c:3147:b0:3c6:f871:1fec with SMTP id h7-20020a05600c314700b003c6f8711fecmr3685274wmo.71.1666813593193; Wed, 26 Oct 2022 12:46:33 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Bernhard Beschow , qemu-devel@nongnu.org Cc: Jiaxun Yang , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aurelien Jarno , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/3] hw/mips/malta: Set PIIX4 IRQ routes in embedded bootloader Date: Wed, 26 Oct 2022 21:46:18 +0200 Message-Id: <20221026194619.28880-3-philmd@linaro.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221026194619.28880-1-philmd@linaro.org> References: <20221026194619.28880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666813746130100003 Linux kernel expects the northbridge & southbridge chipsets configured by the BIOS firmware. We emulate that by writing a tiny bootloader code in write_bootloader(). Upon introduction in commit 5c2b87e34d ("PIIX4 support"), the PIIX4 configuration space included values specific to the Malta board. Set the Malta-specific IRQ routing values in the embedded bootloader, so the next commit can remove the Malta specific bits from the PIIX4 PCI-ISA bridge and make it generic (matching the real hardware). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- FIXME: Missing the nanoMIPS counter-part! --- hw/mips/malta.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/hw/mips/malta.c b/hw/mips/malta.c index df0f448b67..f0b98922f2 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -804,6 +804,8 @@ static void write_bootloader_nanomips(uint8_t *base, ui= nt64_t run_addr, stw_p(p++, 0x8422); stw_p(p++, 0x9088); /* sw t0, 0x88(t1) */ =20 + /* TODO set PIIX IRQC[A:D] routing values! */ + stw_p(p++, 0xe320 | NM_HI1(kernel_entry)); =20 stw_p(p++, NM_HI2(kernel_entry)); @@ -841,6 +843,9 @@ static void write_bootloader_nanomips(uint8_t *base, ui= nt64_t run_addr, static void write_bootloader(uint8_t *base, uint64_t run_addr, uint64_t kernel_entry) { + const char pci_pins_cfg[PCI_NUM_PINS] =3D { + 10, 10, 11, 11 /* PIIX IRQRC[A:D] */ + }; uint32_t *p; =20 /* Small bootloader */ @@ -915,6 +920,20 @@ static void write_bootloader(uint8_t *base, uint64_t r= un_addr, =20 #undef cpu_to_gt32 =20 + /* + * The PIIX ISA bridge is on PCI bus 0 dev 10 func 0. + * Load the PIIX IRQC[A:D] routing config address, then + * write routing configuration to the config data register. + */ + bl_gen_write_u32(&p, /* GT_PCI0_CFGADDR */ + cpu_mips_phys_to_kseg1(NULL, 0x1be00000 + 0xcf8), + bswap32((1 << 31) /* ConfigEn */ + | PCI_BUILD_BDF(0, PIIX4_PCI_DEVFN) << 8 + | PIIX_PIRQCA)); + bl_gen_write_u32(&p, /* GT_PCI0_CFGDATA */ + cpu_mips_phys_to_kseg1(NULL, 0x1be00000 + 0xcfc), + bswap32(ldl_le_p(pci_pins_cfg))); + bl_gen_jump_kernel(&p, true, ENVP_VADDR - 64, /* --=20 2.37.3 From nobody Mon May 20 14:56:41 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666813839; cv=none; d=zohomail.com; s=zohoarc; b=Pfae4MNi4vOWdaEv/8sucBv+R1mBokc+fz3HQxWjUHcpkn/b9A6okqVv8v192UmbpVPzM/g3XycgwwW9zQRZs4xRKxOdmFwVAWEcxjomUnvK3PkiukeSViSa2AjQxT3zaqFh6o5JWogzgeIHoChs498zQ8YR2JT2giUda48Z8wU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666813839; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=FideTTwLBlaM3Uj+ggSbpikD+Db2qX3oNiUh+CsQYlw=; b=hnfcJLitFsat4DbUAxXmjv4OW2C76Xxb1hLi/HN7kqEBW+gnT3+Z/lP1ou3fS66HwsvNZ5OQDAMoVSGDPBzNwEZc18jRY2vmgtChxjR0eYxLEDLCc9p95el/kXDZO5INqv9MHa8e98naZArZdhhcdHdJlErjUDlMhl1JDNDcVFg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666813839165772.1994612476267; Wed, 26 Oct 2022 12:50:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onmMe-00046f-3Z; Wed, 26 Oct 2022 15:47:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onmMN-0002wr-Ob for qemu-devel@nongnu.org; Wed, 26 Oct 2022 15:46:47 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onmMM-00073Y-6e for qemu-devel@nongnu.org; Wed, 26 Oct 2022 15:46:43 -0400 Received: by mail-wm1-x335.google.com with SMTP id r6-20020a1c4406000000b003cf4d389c41so1416214wma.3 for ; Wed, 26 Oct 2022 12:46:41 -0700 (PDT) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id x13-20020a5d490d000000b00236674840e9sm5908156wrq.59.2022.10.26.12.46.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 26 Oct 2022 12:46:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FideTTwLBlaM3Uj+ggSbpikD+Db2qX3oNiUh+CsQYlw=; b=yu1ceNDVH81LxEyeI1nO/XErjQQL2jyh42S4582vkKFMIN9r04hTw4O1So+/kBjRMD 5dDipl11lI01ItBtU3AXX3YDpIHXpUoe3DuQoKFxETpRzEL39E9gCUstSgILTblBUjrb LlLYnQV7Fun8K3QHHfZYEItGXDtxjhPFUd82UzJmwovCzQcQJb2WyBJ6qBMJtMivpyZ4 QzeUUtJtQBiJEUB81drjvlK5DcNVkhAj8BRJyYq3Pn9IhWcbm3ux75DVJLgs5RW9Xlrt XRhFcMFGO+97brM5DDGx8LOsbiop90IS6yoy+GV9Lq7zjAXmyKoxrgzUS4jaqYlZpmho Scaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FideTTwLBlaM3Uj+ggSbpikD+Db2qX3oNiUh+CsQYlw=; b=GZ0SC9jMTWtmAq2+6jHTiHkMgI6OQbE1aI2D68dHLydfYBGbGHBc9gDT4a2zioP9pW 4C1InNHm5mBuxSAv9LCRbK7oE17VKsG54lJxClx2xLHcvb+LJEd1o3psq8Fiu+W1KyCq h/cEtjwnmmgPQcOkcyQWzScp5sVt8xJMqOgEeCA4KvGobV6fHDjzmycuv6f5+JWhTdvx qyIpa9payB3ylxXOyCBHzq518/EHnAcx/dgaXhYpBA07EdgjcUac9EvrLavuglPG2zae N8GIoAMnKV2Oody+CDl0zAb0YFyoD7Ej4I7bNXPm6HtijL4rI9Zxrke1sa5hikSqshWA ICfA== X-Gm-Message-State: ACrzQf2G8LZGsGymTgeJvXbqHoUmPCIhJO7eTkyw0oG+sA0Uym+iIjqO hYZnXxrkkSPhH3h9YmJ9YO6iqA== X-Google-Smtp-Source: AMsMyM6Q38d8s9NFSUAYxIWn49V6Plbc6NoM71jdnUVe4gKryVNqawYUtqkuK53DX/akeRPy82aCEA== X-Received: by 2002:a05:600c:3b97:b0:3c7:14f0:f8d2 with SMTP id n23-20020a05600c3b9700b003c714f0f8d2mr3634432wms.159.1666813598434; Wed, 26 Oct 2022 12:46:38 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Bernhard Beschow , qemu-devel@nongnu.org Cc: Jiaxun Yang , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aurelien Jarno , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 3/3] hw/isa/piix4: Correct IRQRC[A:D] reset values Date: Wed, 26 Oct 2022 21:46:19 +0200 Message-Id: <20221026194619.28880-4-philmd@linaro.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221026194619.28880-1-philmd@linaro.org> References: <20221026194619.28880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666813840495100001 IRQRC[A:D] registers reset value is 0x80. We were forcing the MIPS Malta machine routing to be able to boot a Linux kernel without any bootloader. We now have these registers initialized in the Malta machine write_bootloader(), so we can use the correct reset values. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/piix4.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 15f344dbb7..a2165c6a49 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -115,10 +115,10 @@ static void piix4_isa_reset(DeviceState *dev) pci_conf[0x4c] =3D 0x4d; pci_conf[0x4e] =3D 0x03; pci_conf[0x4f] =3D 0x00; - pci_conf[0x60] =3D 0x0a; // PCI A -> IRQ 10 - pci_conf[0x61] =3D 0x0a; // PCI B -> IRQ 10 - pci_conf[0x62] =3D 0x0b; // PCI C -> IRQ 11 - pci_conf[0x63] =3D 0x0b; // PCI D -> IRQ 11 + pci_conf[0x60] =3D 0x80; + pci_conf[0x61] =3D 0x80; + pci_conf[0x62] =3D 0x80; + pci_conf[0x63] =3D 0x80; pci_conf[0x69] =3D 0x02; pci_conf[0x70] =3D 0x80; pci_conf[0x76] =3D 0x0c; --=20 2.37.3