From patchwork Wed Aug 31 15:45:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Beschow X-Patchwork-Id: 1672375 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=pNt4ME3Q; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MHpWW2jkZz1yh5 for ; Thu, 1 Sep 2022 01:49:11 +1000 (AEST) Received: from localhost ([::1]:42968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTPxk-0002gc-QX for incoming@patchwork.ozlabs.org; Wed, 31 Aug 2022 11:49:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTPvC-0002fI-Mz; Wed, 31 Aug 2022 11:46:31 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]:34650) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTPvA-000363-O4; Wed, 31 Aug 2022 11:46:30 -0400 Received: by mail-ej1-x62d.google.com with SMTP id y3so29260675ejc.1; Wed, 31 Aug 2022 08:46:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=qBQXGdEdLbOLX0OHWScH3MtFtN8XYLsC1g6zk3UIblA=; b=pNt4ME3QndjTwtJ719j4uXaTUzS7CdAbuF0+3mCzHn58IqNCLkN6XCLZb/uHIwoqWV cAR0H+UZci+9f/8+S5zep8/VUyVGh1+EX1wSFdq/BZwr6tGuSDxPjBkGVu3c98KdsHyy ev065rkYgW7ce+wt9HYeAtRcgPhVqyJuJi+qzsJoGsS5vnv2FqRdOcR0D7I7RtlK2Zc7 keIYdOP55dGbm53BF6cPqm6glA6XEbci/d7AqIDvGYZHNYvqAx+yJ2EQvs+iZZHYsMj0 Rpcj/OzmG49zWKfiqg96zqrDz7CqzmFUsrcfer3q9/37Q5iPaMat+SXPFlQnPX4JCR3J frdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=qBQXGdEdLbOLX0OHWScH3MtFtN8XYLsC1g6zk3UIblA=; b=1ITHr7f0Yk5ohqI+XQ4ZSpdAbf7RMSsUuE5dtnhO5Rnf1zqVyw6QqYeffLqAVueBoN bF09dMZ3FNHU3I5QhGz7DYLe9otkELvks770/HHScGt0eigZngde0nuONV07wVuxv7kO gHrGJnV1I/ZA2JVm9muzHFf3S7px2U2cWxHUAvpYvOr/gbc9Vd8XxyLDnFX3hbJObgpC IBI5iZWj9E2D1swO94dZq/hxwSYT+gLyMA7aCGv5R7SeFNdOMmVfgjw0g71zxshaULXP C2WjGIHooElxxgtEUA62KqtMFAAsGQudAvwjIHT7spYuM0SCeOWpZft2Xix63BfJyEuG jQGg== X-Gm-Message-State: ACgBeo3VIHBoof3RL23RopndcYRgm4msBLXlhif8jpgETDQGkLYI0NcZ X0LMrq+HhkKNqv85sFgYEMShhdLql84= X-Google-Smtp-Source: AA6agR6Tc9wU+WL4l0iHwBvnLUreECRtwWiQHZD3R/tNeTrphKvLniV1Gl7CS4FLSKoyYN8jcXLgEg== X-Received: by 2002:a17:906:5a44:b0:741:7925:d42a with SMTP id my4-20020a1709065a4400b007417925d42amr11296061ejc.611.1661960785085; Wed, 31 Aug 2022 08:46:25 -0700 (PDT) Received: from osoxes.fritz.box (p200300faaf0bb2009c4947838afc41b6.dip0.t-ipconnect.de. [2003:fa:af0b:b200:9c49:4783:8afc:41b6]) by smtp.gmail.com with ESMTPSA id k9-20020a508ac9000000b00445e930e20esm9252123edk.64.2022.08.31.08.46.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Aug 2022 08:46:24 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: BALATON Zoltan , John Snow , qemu-ppc@nongnu.org, Huacai Chen , qemu-block@nongnu.org, Jiaxun Yang , Gerd Hoffmann , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bernhard Beschow Subject: [PATCH v4 00/12] Instantiate VT82xx functions in host device Date: Wed, 31 Aug 2022 17:45:53 +0200 Message-Id: <20220831154605.12773-1-shentey@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=shentey@gmail.com; helo=mail-ej1-x62d.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" v3: * Fix in comment: AC97 Modem -> MC97 Modem (Zoltan) * Introduce TYPE_VT82C686B_USB_UHCI define (Zoltan) * Introduce TYPE_VIA_IDE define (for consistency) v3: * Replace pre increment by post increment in for loop (Zoltan) * Move class defines close to where the class is defined (Zoltan) Testing done: * `make check-avocado` Passes for boot_linux_console.py for mips64el_fuloong2e * `qemu-system-ppc -machine pegasos2 -rtc base=localtime -device ati-vga,guest_hwcursor=true,romfile="" -cdrom morphos-3.17.iso -kernel morphos-3.17/boot.img` Boots successfully and it is possible to open games and tools. v2: * Keep the call to pci_ide_create_devs() in board code for consistency (Zoltan) * Create rtc-time alias in board rather than in south bridge code * Remove stale comments about PCI functions (Zoltan) v1: This series instantiates all PCI functions of the VT82xx south bridges in the south bridges themselves. For the IDE function this is especially important since its interrupt routing is configured in the ISA function, hence doesn't make sense to instantiate it as a "Frankenstein" device. The interrupt routing is currently hardcoded and changing that is currently not in the scope of this series. Testing done: * `qemu-system-ppc -machine pegasos2 -rtc base=localtime -device ati-vga,guest_hwcursor=true,romfile="" -cdrom morphos-3.17.iso -kernel morphos-3.17/boot.img` Boots successfully and it is possible to open games and tools. * I was unable to test the fuloong2e board even before this series since it seems to be unfinished [1]. A buildroot-baked kernel [2] booted but doesn't find its root partition, though the issues could be in the buildroot receipt I created. [1] https://osdn.net/projects/qmiga/wiki/SubprojectPegasos2 [2] https://github.com/shentok/buildroot/commits/fuloong2e Bernhard Beschow (12): hw/isa/vt82c686: Resolve chip-specific realize methods hw/isa/vt82c686: Resolve unneeded attribute hw/isa/vt82c686: Prefer pci_address_space() over get_system_memory() hw/isa/vt82c686: Reuse errp hw/isa/vt82c686: Introduce TYPE_VIA_IDE define hw/isa/vt82c686: Instantiate IDE function in host device hw/isa/vt82c686: Introduce TYPE_VT82C686B_USB_UHCI define hw/isa/vt82c686: Instantiate USB functions in host device hw/isa/vt82c686: Instantiate PM function in host device hw/isa/vt82c686: Instantiate AC97 and MC97 functions in host device hw/isa/vt82c686: Embed RTCState in host device hw/isa/vt82c686: Create rtc-time alias in boards instead configs/devices/mips64el-softmmu/default.mak | 1 - hw/ide/via.c | 2 +- hw/isa/Kconfig | 1 + hw/isa/vt82c686.c | 120 +++++++++++++++---- hw/mips/fuloong2e.c | 21 ++-- hw/ppc/Kconfig | 1 - hw/ppc/pegasos2.c | 25 ++-- hw/usb/vt82c686-uhci-pci.c | 4 +- include/hw/isa/vt82c686.h | 4 +- 9 files changed, 121 insertions(+), 58 deletions(-)