From patchwork Sun May 10 21:01:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1287411 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=bnUq7SQB; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49KxMw6xgVz9sSd for ; Mon, 11 May 2020 07:02:19 +1000 (AEST) Received: from localhost ([::1]:45272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXt5V-00077z-AZ for incoming@patchwork.ozlabs.org; Sun, 10 May 2020 17:02:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXt4r-00073R-59 for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:37 -0400 Received: from mail-ej1-x642.google.com ([2a00:1450:4864:20::642]:45333) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXt4q-00015R-C1 for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:36 -0400 Received: by mail-ej1-x642.google.com with SMTP id yc10so4296672ejb.12 for ; Sun, 10 May 2020 14:01:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4xpV43cJtjJhTGNuwU3vJ0xowPTiH8xsSOamwFx2umU=; b=bnUq7SQBGH34mmIjPwfHTqyfQJgChk3LmtgX5yjF65dLb9TtSZTGYvvq7uE/hBrUNQ wTPW77ZkABLX2VaCFgv3JFTzERV/NT6hiR12lYYQCL/xkpwWSriKWVmrazuCNaCZToOn x7Ra7cfCSUBq26b1P3dMXxTs8NSGJL1pr6XPkUfHnjdN3gmUBOVOyYBMlFBbz10tckc1 gLqK8X/CYtF296Or792cXLHmnzPTnhCE+M1KY/IuiOdiwwyIAsVoTHzQgsU70CdZ5h64 bDauYsN4fNmZwc8fObJiKsdzRRapZ94uadf8B439AsWFRu/0bHvuOXe2zr5/MNJie04x Or6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=4xpV43cJtjJhTGNuwU3vJ0xowPTiH8xsSOamwFx2umU=; b=OOapKkevyfUjxQFnStpCfTtmm7/q6SumUGghw2Oea6xHdGeSzMNxHinI6C/38U9/LT HSh5k85rzUixoxENsqULIVJyjidNnfMxLQZ0tlD+4vSYBy5dkXq5aC+m8JOHJkCjcdDt kdbuOig9mIF9MN6XahLoKbnKvMprqymZROu2795TeWyC7gHGGgJlO+/3QnDN8TRth4sM i0wNzm+h/OCjs1WTHwBivIe74ZA9/bxpctVJscsm5rdytTUJVFVGec45+x9M4MHtBLPR EkUr96QEVO/ZrSTXM5jeIayMG9NMC8qfyq5mOG6bPlSykbA8A8H/vquF2T0rLllH6A2/ wqzA== X-Gm-Message-State: AGi0PuYjN3GIgETDTVDQNhPp7AEkwQkz91FC9Lffm4ZJwsZa0wf2CIXb x3QsXkrBhRXBkH/wRzB5U7VW1z/SHC8= X-Google-Smtp-Source: APiQypL169Auu2EzRXblkbgLNKZEeT9/XxpJvoDVptfurJvOEQAO166ziZU+o+hapoT/jHfz7eJ2hg== X-Received: by 2002:a17:906:ca14:: with SMTP id jt20mr10164192ejb.233.1589144494588; Sun, 10 May 2020 14:01:34 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id d15sm921152ejr.50.2020.05.10.14.01.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 14:01:33 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 01/12] MAINTAINERS: Add Huacai Chen as fuloong2e co-maintainer Date: Sun, 10 May 2020 23:01:17 +0200 Message-Id: <20200510210128.18343-2-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200510210128.18343-1-f4bug@amsat.org> References: <20200510210128.18343-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::642; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-x642.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Markovic , Paolo Bonzini , Huacai Chen , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Huacai Chen I submitted the MIPS/fuloong2e support about ten years ago, and after that I became a MIPS kernel developer. Last year, Philippe Mathieu- Daudé asked me that whether I can be a reviewer of MIPS/fuloong2e, and I promised that I will do some QEMU work in the next year (i.e., 2020 and later). I think now (and also in future) I can have some spare time, so I can finally do some real work on QEMU/MIPS. And if possible, I hope I can be a co-maintainer of MIPS/fuloong2e. Cc: Jiaxun Yang Signed-off-by: Huacai Chen Message-Id: <1586337380-25217-3-git-send-email-chenhc@lemote.com> [PMD: Added Jiaxun Yang as reviewer] Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1f84e3ae2c..aa5c54c75a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1075,8 +1075,10 @@ S: Obsolete F: hw/mips/mips_r4k.c Fulong 2E +M: Huacai Chen M: Philippe Mathieu-Daudé M: Aleksandar Markovic +R: Jiaxun Yang S: Odd Fixes F: hw/mips/mips_fulong2e.c F: hw/isa/vt82c686.c From patchwork Sun May 10 21:01:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1287416 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=eBtQpJEI; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49KxQJ4y3Tz9sSd for ; Mon, 11 May 2020 07:04:24 +1000 (AEST) Received: from localhost ([::1]:53792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXt7W-0002xH-Di for incoming@patchwork.ozlabs.org; Sun, 10 May 2020 17:04:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXt4s-00076L-Da for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:38 -0400 Received: from mail-ej1-x642.google.com ([2a00:1450:4864:20::642]:34440) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXt4r-00015X-QP for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:38 -0400 Received: by mail-ej1-x642.google.com with SMTP id s9so6209888eju.1 for ; Sun, 10 May 2020 14:01:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=INiH/hiJ+WGtAmJUDmdS9OFn2OmFj310/NQ1BEXJmuM=; b=eBtQpJEI8y+EPVT4bZvJ612r7SrP/j8NZ7Wpj2Sej94Xm7r9qyPUMjQWuK1bkObWt+ JeiS1LQEPxtmBOaqmHdT7ahxTUnN1Y9ujKs2J4KMuPio3xwBEPzo/bongGLfqO5fkgWQ JZ2ciQySh9UzaIzGXR2XCw96Qm1Kh+NEPSHxDGIgj/rzGIgYo0N0AKhYgjmsyms6r/vk +VwYrASuI7bXQgdBGpmXxfZNzw2KvKNAoKhGss8SIXuujHlt90Pfrbg4NK720+8f8kYJ kXbxbLdOZ6P6rOzYrRml322Zg7kR4U9MM4xD9y7Co7aXWkYaO6ORLG/F5r4VsuBhZSPY Q7+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=INiH/hiJ+WGtAmJUDmdS9OFn2OmFj310/NQ1BEXJmuM=; b=cvZ/odkCMh1T39X4BBM5wpIXrpXhFLw8ZY1fgauGQWp6t7gzwMQjOv6YjD7m/4VXK2 JyanLwtJZnlE0uKuwVZH2kqAcUxmiqjHQbW2ujiS2N+Y5AQuMRD5MJDP1+rWKZROVHt5 MomZjJy4WHz59lTC93itZlbGgfVCELy2wlrpwMByuZX9OIQPR+KImcmEvbH0q6Jg+HBX 6qYBgAGJfyb1PrXfBvu2Nm/+MTvp5l6oenRb7+zu1tMVriR8NrDJ9//UbqzKtg2cIC+/ RnwA5lTg9/vtHHvMJycsmu/2G9YYNE+dkGfjDnQdEoJnm5yg01tKm1sW/g1Jzk4Psigy EFRg== X-Gm-Message-State: AGi0PuYkCSzJrcZ+EO+No7EDpiiq3OATwfXiOYYYOtuEa8cU3CdhglBy V4hbsqQ0FB8qiNmT0vMf6qWr8ZgaVhs= X-Google-Smtp-Source: APiQypIYFmVrFBhF4Mr4GGBHzBLgGzbzSybB5vkCOD8Wm5HPr79ytmmjYoHeLBL5r8QnQQCTrgzb4A== X-Received: by 2002:a17:906:2b96:: with SMTP id m22mr10561807ejg.330.1589144496393; Sun, 10 May 2020 14:01:36 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id d15sm921152ejr.50.2020.05.10.14.01.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 14:01:35 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 02/12] hw/mips/fuloong2e: Rename PMON BIOS name Date: Sun, 10 May 2020 23:01:18 +0200 Message-Id: <20200510210128.18343-3-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200510210128.18343-1-f4bug@amsat.org> References: <20200510210128.18343-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::642; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-x642.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Markovic , Paolo Bonzini , Huacai Chen , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" I'm not sure where 'pmon_fulong2e.bin' comes from. As I always found this bios named 'pmon_2e.bin', rename the definition. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/mips_fulong2e.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index ef02d54b33..f067fa9720 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -69,7 +69,7 @@ * 2, use "Bonito2edev" to replace "dir_corresponding_to_your_target_hardware" * in the "Compile Guide". */ -#define FULONG_BIOSNAME "pmon_fulong2e.bin" +#define FULONG_BIOSNAME "pmon_2e.bin" /* PCI SLOT in fulong 2e */ #define FULONG2E_VIA_SLOT 5 From patchwork Sun May 10 21:01:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1287413 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=nd0VSjkO; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49KxMx3yM0z9sSg for ; Mon, 11 May 2020 07:02:21 +1000 (AEST) Received: from localhost ([::1]:45364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXt5X-0007HT-8r for incoming@patchwork.ozlabs.org; Sun, 10 May 2020 17:02:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXt4v-0007Bl-Ec for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:42 -0400 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]:44021) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXt4t-00015x-V0 for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:41 -0400 Received: by mail-ed1-x544.google.com with SMTP id g9so1683301edw.10 for ; Sun, 10 May 2020 14:01:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+ZxNxslkecYKX5bxxdVY39Xg+MqGP6GRs661eU+PrOc=; b=nd0VSjkOzx4wZE4yfHeg48nPpmhdlQY+3MC+d7MMVNeqtSqE9+z9MkO62ibInFBuKk +c95ytRjX5gJbsKNo+BkWXkaTjL+6vy84iYf8K5Bksg2B5V4RgjNCzSTs4CACmxkNEYR iIEreaP4PS641abVl8l5LYkioe55raCklnXtZP7yfXexDkd3EnJovP8Qs9i8hu8pTD+Q GJN0qTQucPS38AXwm2CSikwqC3IizEaqc7+ncZ9G8RaQ6HetbckytRT9OBNp0xzkT5w0 qjkBMfPG3r5BPL7QLdiXf16giWPPwWhiSmTkfbQ+8oAOwiv6cRPqpRfuXgxzToyUil6i 2MMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=+ZxNxslkecYKX5bxxdVY39Xg+MqGP6GRs661eU+PrOc=; b=Bbt5shhzOo+VvHAk5x2fK0gosYC69nl2q57up+2js+3a4LyqsD/wkVhVBhnn5zCTX+ yzFKtaYgYLBecRU12DHjivoDw9w7dBWo3KwGBd59N1YlZL5mD8SH3GiSKiDYG0Qer9yN B5BdrY3h6WurYaGkx+is603RejoHrEGynXm6S4oxFC1qvgl7ACztk4CA8y4r0udctZ4l oys/xYBSjKU5T1I+ZNQu/BYhRrXmNooPPJHNt1LsOmZKfTZRNbioCQdouxj5Bu3DMHYe PjMYQHGaewskfdhO1JK9tgZfswgcsIwyf5ylH8a/JSWyp9YUcexni3MoXPP4/3KIJKrT tJzg== X-Gm-Message-State: AGi0Pua39few++SBtx0ccvmrRKzLPRM7n7ALbyw/FjW+2Gm8TZIIEBHk VbzPF6X1DKz7fHmZlAMRjO8Bu5zv8fA= X-Google-Smtp-Source: APiQypKRqF9l2r5+e9JdH3s/YQq+YwyrzzCNfUrOxujBOvnWWx7bOmuw0cznetegtXdLkQvxuu068Q== X-Received: by 2002:a50:d0d7:: with SMTP id g23mr4850665edf.163.1589144498141; Sun, 10 May 2020 14:01:38 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id d15sm921152ejr.50.2020.05.10.14.01.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 14:01:37 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 03/12] hw/mips/fuloong2e: Move code and update a comment Date: Sun, 10 May 2020 23:01:19 +0200 Message-Id: <20200510210128.18343-4-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200510210128.18343-1-f4bug@amsat.org> References: <20200510210128.18343-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::544; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ed1-x544.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Markovic , Paolo Bonzini , Huacai Chen , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Move the RAM-related call closer to the RAM creation block, rename the ROM comment. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Huacai Chen --- hw/mips/mips_fulong2e.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index f067fa9720..4e1a3646af 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -316,12 +316,11 @@ static void mips_fulong2e_init(MachineState *machine) error_report("Invalid RAM size, should be 256MB"); exit(EXIT_FAILURE); } + memory_region_add_subregion(address_space_mem, 0, machine->ram); - /* allocate RAM */ + /* Boot ROM */ memory_region_init_rom(bios, NULL, "fulong2e.bios", BIOS_SIZE, &error_fatal); - - memory_region_add_subregion(address_space_mem, 0, machine->ram); memory_region_add_subregion(address_space_mem, 0x1fc00000LL, bios); /* From patchwork Sun May 10 21:01:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1287417 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=AxbqBKUn; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49KxSG3Vp8z9sSc for ; Mon, 11 May 2020 07:06:06 +1000 (AEST) Received: from localhost ([::1]:58882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXt9A-0005GY-9o for incoming@patchwork.ozlabs.org; Sun, 10 May 2020 17:06:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXt4x-0007FH-VZ for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:44 -0400 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]:35202) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXt4v-000167-Oq for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:43 -0400 Received: by mail-ej1-x643.google.com with SMTP id q8so6202401eja.2 for ; Sun, 10 May 2020 14:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1ThLD8vMioUEp8RwiXErdzx6S9+lgzaN9JJAAWuoUJc=; b=AxbqBKUnxKkyQqbP3uTGSKYHLFopp383tu8MvwKNC729vB22PcUNoI8Dr+4TdUdloW LlsCiCFaJnJdQ1iaX/Hb6Ok38FPTvPCJOkt+rgzxJ9tIo2TcdNABOloSF8wxQpLD/af5 voWAtQktnQJFTdrcQfqxD7KEdlqlBjUkdNqbBmp8aM0f4XhAwPOyaSXnu3rJGZTTjbUE GK4MiDUiasWu2q3aZDwGF83Tw0oS+FOJ7xFzeldZ0OQyXVbJtpZ+Pks3oUXtCoyuZhiZ cNchQby0/qzd0UbYexkCMFNqt21FaIRK3iaLtvqo8UQaJ76ohjoQzlyv/FdsSIolLGeY 1Yvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=1ThLD8vMioUEp8RwiXErdzx6S9+lgzaN9JJAAWuoUJc=; b=cMk1X8Pe6EakgOFxO7ihupJnhnU9sl0v8QhPB+UHYGnucBBpBQHg6upzidSYLtIwSN tc/7ZX4YgZUaK/sbp6hpttQtdbRHvO5L+udJ8MMvFo+EnIPShArtPZgJRSI4U2o0Y+/h hvlPlT/39Pecwef9UNgrnNhDlSkyWIAjXxFV7fRHSs2yoV8lVKJ9Tdc4wRa85INcfA+s Jr25bXk30NZGJJlch8mi2g73+HfkPxdcrCCqL81d32P45YiDq0LujAPJ5tvR5O4mdn/T c7dgA04S8r1GBDEVmUXmqFBDbfX8mESl04iK2BotlzAeCPSaHz4wkGEVYqnDOG60t61I FNcQ== X-Gm-Message-State: AGi0Pub0vjzaiPsdC8BVGBL5UbbVpWoWcLo0V8kKE799cY2/z0vqZ/SN DEZ4ykUIuQ/C91/RPeYp89bFs44qSHY= X-Google-Smtp-Source: APiQypLYBXz4LzeHe3LTnRoem+ebGMBIt33f63CtfW92ERzjSymjUbhT0kbyzvl6CM9a6ge8DIZraw== X-Received: by 2002:a17:906:1804:: with SMTP id v4mr11143825eje.104.1589144500030; Sun, 10 May 2020 14:01:40 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id d15sm921152ejr.50.2020.05.10.14.01.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 14:01:39 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 04/12] hw/mips/fuloong2e: Fix typo in Fuloong machine name Date: Sun, 10 May 2020 23:01:20 +0200 Message-Id: <20200510210128.18343-5-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200510210128.18343-1-f4bug@amsat.org> References: <20200510210128.18343-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::643; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-x643.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Markovic , Aleksandar Markovic , Paolo Bonzini , Huacai Chen , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We always miswrote the Fuloong machine... Fix its name. Add an machine alias to the previous name for backward compatibility. Suggested-by: Aleksandar Markovic Signed-off-by: Philippe Mathieu-Daudé --- docs/system/target-mips.rst | 2 +- default-configs/mips64el-softmmu.mak | 2 +- hw/isa/vt82c686.c | 2 +- hw/mips/{mips_fulong2e.c => fuloong2e.c} | 46 ++++++++++++------------ hw/pci-host/bonito.c | 8 ++--- tests/qtest/endianness-test.c | 2 +- MAINTAINERS | 4 +-- hw/mips/Kconfig | 2 +- hw/mips/Makefile.objs | 2 +- 9 files changed, 36 insertions(+), 34 deletions(-) rename hw/mips/{mips_fulong2e.c => fuloong2e.c} (91%) diff --git a/docs/system/target-mips.rst b/docs/system/target-mips.rst index 2736fd0509..cd2a931edf 100644 --- a/docs/system/target-mips.rst +++ b/docs/system/target-mips.rst @@ -74,7 +74,7 @@ The MIPS Magnum R4000 emulation supports: - G364 framebuffer -The Fulong 2E emulation supports: +The Fuloong 2E emulation supports: - Loongson 2E CPU diff --git a/default-configs/mips64el-softmmu.mak b/default-configs/mips64el-softmmu.mak index 8b0c9b1e15..9f8a3ef156 100644 --- a/default-configs/mips64el-softmmu.mak +++ b/default-configs/mips64el-softmmu.mak @@ -2,7 +2,7 @@ include mips-softmmu-common.mak CONFIG_IDE_VIA=y -CONFIG_FULONG=y +CONFIG_FULOONG=y CONFIG_ATI_VGA=y CONFIG_RTL8139_PCI=y CONFIG_JAZZ=y diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index d9b51fce8d..fac4e56b7d 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -503,7 +503,7 @@ static void via_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_via; /* * Reason: part of VIA VT82C686 southbridge, needs to be wired up, - * e.g. by mips_fulong2e_init() + * e.g. by mips_fuloong2e_init() */ dc->user_creatable = false; } diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/fuloong2e.c similarity index 91% rename from hw/mips/mips_fulong2e.c rename to hw/mips/fuloong2e.c index 4e1a3646af..624c46a4fd 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/fuloong2e.c @@ -1,5 +1,5 @@ /* - * QEMU fulong 2e mini pc support + * QEMU fuloong 2e mini pc support * * Copyright (c) 2008 yajin (yajin@vm-kernel.org) * Copyright (c) 2009 chenming (chenming@rdc.faw.com.cn) @@ -11,8 +11,8 @@ */ /* - * Fulong 2e mini pc is based on ICT/ST Loongson 2e CPU (MIPS III like, 800MHz) - * http://www.linux-mips.org/wiki/Fulong + * Fuloong 2e mini pc is based on ICT/ST Loongson 2e CPU (MIPS III like, 800MHz) + * https://www.linux-mips.org/wiki/Fuloong_2E * * Loongson 2e user manual: * http://www.loongsondeveloper.com/doc/Loongson2EUserGuide.pdf @@ -46,13 +46,13 @@ #include "sysemu/reset.h" #include "qemu/error-report.h" -#define DEBUG_FULONG2E_INIT +#define DEBUG_FULOONG2E_INIT #define ENVP_ADDR 0x80002000l #define ENVP_NB_ENTRIES 16 #define ENVP_ENTRY_SIZE 256 -/* fulong 2e has a 512k flash: Winbond W39L040AP70Z */ +/* Fuloong 2e has a 512k flash: Winbond W39L040AP70Z */ #define BIOS_SIZE (512 * KiB) #define MAX_IDE_BUS 2 @@ -69,12 +69,12 @@ * 2, use "Bonito2edev" to replace "dir_corresponding_to_your_target_hardware" * in the "Compile Guide". */ -#define FULONG_BIOSNAME "pmon_2e.bin" +#define FULOONG_BIOSNAME "pmon_2e.bin" -/* PCI SLOT in fulong 2e */ -#define FULONG2E_VIA_SLOT 5 -#define FULONG2E_ATI_SLOT 6 -#define FULONG2E_RTL8139_SLOT 7 +/* PCI SLOT in Fuloong 2e */ +#define FULOONG2E_VIA_SLOT 5 +#define FULOONG2E_ATI_SLOT 6 +#define FULOONG2E_RTL8139_SLOT 7 static struct _loaderparams { int ram_size; @@ -279,7 +279,7 @@ static void network_init(PCIBus *pci_bus) const char *default_devaddr = NULL; if (i == 0 && (!nd->model || strcmp(nd->model, "rtl8139") == 0)) { - /* The fulong board has a RTL8139 card using PCI SLOT 7 */ + /* The Fuloong board has a RTL8139 card using PCI SLOT 7 */ default_devaddr = "07"; } @@ -287,7 +287,7 @@ static void network_init(PCIBus *pci_bus) } } -static void mips_fulong2e_init(MachineState *machine) +static void mips_fuloong2e_init(MachineState *machine) { const char *kernel_filename = machine->kernel_filename; const char *kernel_cmdline = machine->kernel_cmdline; @@ -316,11 +316,12 @@ static void mips_fulong2e_init(MachineState *machine) error_report("Invalid RAM size, should be 256MB"); exit(EXIT_FAILURE); } - memory_region_add_subregion(address_space_mem, 0, machine->ram); - /* Boot ROM */ - memory_region_init_rom(bios, NULL, "fulong2e.bios", BIOS_SIZE, + /* allocate RAM */ + memory_region_init_rom(bios, NULL, "fuloong2e.bios", BIOS_SIZE, &error_fatal); + + memory_region_add_subregion(address_space_mem, 0, machine->ram); memory_region_add_subregion(address_space_mem, 0x1fc00000LL, bios); /* @@ -337,7 +338,7 @@ static void mips_fulong2e_init(MachineState *machine) write_bootloader(env, memory_region_get_ram_ptr(bios), kernel_entry); } else { if (bios_name == NULL) { - bios_name = FULONG_BIOSNAME; + bios_name = FULOONG_BIOSNAME; } filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); if (filename) { @@ -363,7 +364,7 @@ static void mips_fulong2e_init(MachineState *machine) pci_bus = bonito_init((qemu_irq *)&(env->irq[2])); /* South bridge -> IP5 */ - vt82c686b_southbridge_init(pci_bus, FULONG2E_VIA_SLOT, env->irq[5], + vt82c686b_southbridge_init(pci_bus, FULOONG2E_VIA_SLOT, env->irq[5], &smbus, &isa_bus); /* GPU */ @@ -384,14 +385,15 @@ static void mips_fulong2e_init(MachineState *machine) network_init(pci_bus); } -static void mips_fulong2e_machine_init(MachineClass *mc) +static void mips_fuloong2e_machine_init(MachineClass *mc) { - mc->desc = "Fulong 2e mini pc"; - mc->init = mips_fulong2e_init; + mc->desc = "Fuloong 2e mini pc"; + mc->alias = "fulong2e"; /* Incorrect name used up to QEMU 4.2 */ + mc->init = mips_fuloong2e_init; mc->block_default_type = IF_IDE; mc->default_cpu_type = MIPS_CPU_TYPE_NAME("Loongson-2E"); mc->default_ram_size = 256 * MiB; - mc->default_ram_id = "fulong2e.ram"; + mc->default_ram_id = "fuloong2e.ram"; } -DEFINE_MACHINE("fulong2e", mips_fulong2e_machine_init) +DEFINE_MACHINE("fuloong2e", mips_fuloong2e_machine_init) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index cc6545c8a8..b9bfe3c417 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -11,7 +11,7 @@ */ /* - * fulong 2e mini pc has a bonito north bridge. + * fuloong 2e mini pc has a bonito north bridge. */ /* @@ -559,11 +559,11 @@ static int pci_bonito_map_irq(PCIDevice *pci_dev, int irq_num) slot = (pci_dev->devfn >> 3); switch (slot) { - case 5: /* FULONG2E_VIA_SLOT, SouthBridge, IDE, USB, ACPI, AC97, MC97 */ + case 5: /* FULOONG2E_VIA_SLOT, SouthBridge, IDE, USB, ACPI, AC97, MC97 */ return irq_num % 4 + BONITO_IRQ_BASE; - case 6: /* FULONG2E_ATI_SLOT, VGA */ + case 6: /* FULOONG2E_ATI_SLOT, VGA */ return 4 + BONITO_IRQ_BASE; - case 7: /* FULONG2E_RTL_SLOT, RTL8139 */ + case 7: /* FULOONG2E_RTL_SLOT, RTL8139 */ return 5 + BONITO_IRQ_BASE; case 8 ... 12: /* PCI slot 1 to 4 */ return (slot - 8 + irq_num) + 6 + BONITO_IRQ_BASE; diff --git a/tests/qtest/endianness-test.c b/tests/qtest/endianness-test.c index 2798802c63..cc088ac01a 100644 --- a/tests/qtest/endianness-test.c +++ b/tests/qtest/endianness-test.c @@ -33,7 +33,7 @@ static const TestCase test_cases[] = { { "mips64", "pica61", 0x90000000, .bswap = true }, { "mips64", "mips", 0x14000000, .bswap = true }, { "mips64", "malta", 0x10000000, .bswap = true }, - { "mips64el", "fulong2e", 0x1fd00000 }, + { "mips64el", "fuloong2e", 0x1fd00000 }, { "ppc", "g3beige", 0xfe000000, .bswap = true, .superio = "i82378" }, { "ppc", "40p", 0x80000000, .bswap = true }, { "ppc", "bamboo", 0xe8000000, .bswap = true, .superio = "i82378" }, diff --git a/MAINTAINERS b/MAINTAINERS index aa5c54c75a..50f6a5f1bb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1074,13 +1074,13 @@ R: Aleksandar Rikalo S: Obsolete F: hw/mips/mips_r4k.c -Fulong 2E +Fuloong 2E M: Huacai Chen M: Philippe Mathieu-Daudé M: Aleksandar Markovic R: Jiaxun Yang S: Odd Fixes -F: hw/mips/mips_fulong2e.c +F: hw/mips/fuloong2e.c F: hw/isa/vt82c686.c F: hw/pci-host/bonito.c F: include/hw/isa/vt82c686.h diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig index 2c2adbc42a..cd38546689 100644 --- a/hw/mips/Kconfig +++ b/hw/mips/Kconfig @@ -41,7 +41,7 @@ config JAZZ select DS1225Y select JAZZ_LED -config FULONG +config FULOONG bool config MIPS_CPS diff --git a/hw/mips/Makefile.objs b/hw/mips/Makefile.objs index 525809af07..8ab41edc3f 100644 --- a/hw/mips/Makefile.objs +++ b/hw/mips/Makefile.objs @@ -3,6 +3,6 @@ obj-$(CONFIG_R4K) += mips_r4k.o obj-$(CONFIG_MALTA) += gt64xxx_pci.o mips_malta.o obj-$(CONFIG_MIPSSIM) += mips_mipssim.o obj-$(CONFIG_JAZZ) += mips_jazz.o -obj-$(CONFIG_FULONG) += mips_fulong2e.o +obj-$(CONFIG_FULOONG) += fuloong2e.o obj-$(CONFIG_MIPS_CPS) += cps.o obj-$(CONFIG_MIPS_BOSTON) += boston.o From patchwork Sun May 10 21:01:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1287414 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=UkhvGcaf; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49KxMz0LSLz9sSc for ; Mon, 11 May 2020 07:02:22 +1000 (AEST) Received: from localhost ([::1]:45450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXt5Y-0007My-Gi for incoming@patchwork.ozlabs.org; Sun, 10 May 2020 17:02:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXt4x-0007FI-W4 for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:44 -0400 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]:34855) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXt4x-00016G-9h for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:43 -0400 Received: by mail-ed1-x541.google.com with SMTP id h15so3897782edv.2 for ; Sun, 10 May 2020 14:01:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+8JRvFNRcXTIFmUjOpwGkhhocKvXrzubaGtLH/+phWc=; b=UkhvGcafC1WLA02XEgfJwZaDnXKTne00koNyzc+xMEbN8enfImt8rE9jv+NWE8Zqgp bIZAxNlYfRxGNotOpEK5zut0hhorXZUUiVtrEvwlA3xxYwJVC2FeKzIwsUzj9eYvnQSf OalBe3zDrNIz0fTkjSD4MDP3mRf8vrlq1DkiEck+5areTakJLzUcMwd5qy08N9S3y/7B OszKaJbQc11xsikJrj8hLZGhyaD9zQh/JT1l1vBvCmty0PR1jLwYQrQnY+QzC/22rNfZ FsVGOcInzu5FelFTbOGkfzOWv0+/9kMXM+uVP9NxR0ZBVmWPFRKzankKbfJWx/PFH7H+ 3Hrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=+8JRvFNRcXTIFmUjOpwGkhhocKvXrzubaGtLH/+phWc=; b=rinDKnazgqHpfQBjv1/vJ1uzFcbgstswFOSicvYivC7IlptiHPeiICWvZacKTm9d1X GwpsY2ursJYshpYPyOHNTSjoL6QvzTY9m1p39/SuCHsACSG9Icxcv1BIh3BQ89txfahw wtuMbDUC5cfJ5e750oDpIYmoq1tR3PmIuDzCUBebsuNARFIQNVb3zCDk2xgr3UirMdgC 8SIOw3o+wU8l4pUMwvHjTlRhWcPB6dpFLPYnK0hq5iUBdI7Jx/zcj9x9U5JP22IXiP6a VgefZ79VoCxbasNagutvw546qd/8gNYQVThLKNYFjdxKP8nkpKYf3TDkQ4Ep9j5aIc8w vAQA== X-Gm-Message-State: AGi0PuaMvXzK5w7zewWdN9witGyE3vDRyNv89o3prPmYzIycTzd69Uh+ owNlmObbL1ca+mwGlK/Xo6ffH33M1Jg= X-Google-Smtp-Source: APiQypIsdAbUhiN+KoO/9H7cEVcnhsqu+LzqhQZvQrMQ5bfNUC6Gvz6cvQDpev7Q/gf5SWkKJcY24Q== X-Received: by 2002:a50:8b42:: with SMTP id l60mr10567401edl.55.1589144501743; Sun, 10 May 2020 14:01:41 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id d15sm921152ejr.50.2020.05.10.14.01.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 14:01:41 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 05/12] hw/pci-host: Use CONFIG_PCI_BONITO to select the Bonito North Bridge Date: Sun, 10 May 2020 23:01:21 +0200 Message-Id: <20200510210128.18343-6-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200510210128.18343-1-f4bug@amsat.org> References: <20200510210128.18343-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::541; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ed1-x541.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Huacai Chen , Jiaxun Yang , Aleksandar Markovic , Aleksandar Markovic , Paolo Bonzini , Huacai Chen , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Ease the kconfig selection by introducing CONFIG_PCI_BONITO to select the Bonito North Bridge. Reviewed-by: Aleksandar Markovic Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Huacai Chen --- hw/mips/Kconfig | 1 + hw/pci-host/Kconfig | 4 ++++ hw/pci-host/Makefile.objs | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig index cd38546689..67d39c56a4 100644 --- a/hw/mips/Kconfig +++ b/hw/mips/Kconfig @@ -43,6 +43,7 @@ config JAZZ config FULOONG bool + select PCI_BONITO config MIPS_CPS bool diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig index 9642c77e98..8db41edc7e 100644 --- a/hw/pci-host/Kconfig +++ b/hw/pci-host/Kconfig @@ -55,3 +55,7 @@ config PCI_EXPRESS_DESIGNWARE bool select PCI_EXPRESS select MSI_NONBROKEN + +config PCI_BONITO + select PCI + bool diff --git a/hw/pci-host/Makefile.objs b/hw/pci-host/Makefile.objs index 8c87e8494d..e422e0aca0 100644 --- a/hw/pci-host/Makefile.objs +++ b/hw/pci-host/Makefile.objs @@ -12,7 +12,7 @@ common-obj-$(CONFIG_PPCE500_PCI) += ppce500.o common-obj-$(CONFIG_VERSATILE_PCI) += versatile.o common-obj-$(CONFIG_PCI_SABRE) += sabre.o -common-obj-$(CONFIG_FULONG) += bonito.o +common-obj-$(CONFIG_PCI_BONITO) += bonito.o common-obj-$(CONFIG_PCI_I440FX) += i440fx.o common-obj-$(CONFIG_XEN_IGD_PASSTHROUGH) += xen_igd_pt.o common-obj-$(CONFIG_PCI_EXPRESS_Q35) += q35.o From patchwork Sun May 10 21:01:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1287418 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=R6blrxJL; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49KxTL1PhPz9sSc for ; Mon, 11 May 2020 07:07:02 +1000 (AEST) Received: from localhost ([::1]:32884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXtA4-0006qJ-0t for incoming@patchwork.ozlabs.org; Sun, 10 May 2020 17:07:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXt4z-0007JW-S5 for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:47 -0400 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]:42067) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXt4z-00016T-4V for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:45 -0400 Received: by mail-ed1-x541.google.com with SMTP id s10so6189419edy.9 for ; Sun, 10 May 2020 14:01:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BXdTrm0G7e8AJaMl1cQX+rO0kJVj/ZnPckUe++HqUug=; b=R6blrxJLXjFopvNoqjcbWyGA0Tx2C5Ho57LJOBFAsi+UIoBntgsouUwP4NedlHP+41 FSR1g4zzpWnWamBjfUrzJHvI7kMXm+QqVRmPR568ef4cTn8xPjjhDl0o8wOox3piyp4q txJnM4lkPNs9egQm/EeJj1qdfllhzkx0pfQRxJOt7cxjI3UdWA1KJDOXi2JaNftCDxOj uM4j3gF8sf5nxRoaLvV9Oo0noJBA/hlaO/D7Ihc6R9zAm9dKtpsWTElFtApC5+orKIvq dsPO7Wgi4jPxaVFtX2Zn6OcFp/4+B96Vz4Rx2DRPWpw2h95kIv59HJKAqZUW2eq8hG0A 0SYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=BXdTrm0G7e8AJaMl1cQX+rO0kJVj/ZnPckUe++HqUug=; b=LE3FNNEzRSPBR51cRPOAxvqjmtaazhlTOx4m7x8zW/k1QdECdKA/+4GSDM0+nNW2uX 6levq8PE/9TUxtTt2gnP3IhbDiHjWbXhGSYseq2Utq2dQf15T5FukXIWvEegciE2JcKB t14zGQLJfYW9LZxEj6pkkARGaSNATD06Dk3QpHKRHAxGgQvgwbzcm7O9a8jrCGDiw8ne AZtYkT+4AhpFo+U0vgNLp+wuS85hZTfzeM4V8lPV8cdcmRxNESy6I9pxNWNKXtRqG3Ty dAeNf974ObCMK/V2VQucwf7crp27TdUoIbLp9q6xIgTJusGU6F/HOILRPcTtrzcnLtBe glkQ== X-Gm-Message-State: AGi0PuafQL3wtkPi+ZtKBstJNvmbWZYQWMXUwWygJQTZHfEYOHlRzq9X TO+97BPsewdUj5/6lY60ujK1+nwZ2iA= X-Google-Smtp-Source: APiQypJd3X5j25RzbHX5+Dee748Upsxfeezlggd4uhxe70bm5KdIiYOjCNeBzNFcibw5/D/KWT5KXQ== X-Received: by 2002:a05:6402:1d1c:: with SMTP id dg28mr10856953edb.315.1589144503742; Sun, 10 May 2020 14:01:43 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id d15sm921152ejr.50.2020.05.10.14.01.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 14:01:42 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 06/12] hw/pci-host/bonito: Fix DPRINTF() format strings Date: Sun, 10 May 2020 23:01:22 +0200 Message-Id: <20200510210128.18343-7-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200510210128.18343-1-f4bug@amsat.org> References: <20200510210128.18343-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::541; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ed1-x541.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Markovic , Paolo Bonzini , Huacai Chen , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Huacai Chen --- hw/pci-host/bonito.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index b9bfe3c417..10ead31e4f 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -239,7 +239,7 @@ static void bonito_writel(void *opaque, hwaddr addr, saddr = addr >> 2; - DPRINTF("bonito_writel "TARGET_FMT_plx" val %x saddr %x\n", + DPRINTF("bonito_writel "TARGET_FMT_plx" val %lx saddr %x\n", addr, val, saddr); switch (saddr) { case BONITO_BONPONCFG: @@ -327,7 +327,7 @@ static void bonito_pciconf_writel(void *opaque, hwaddr addr, PCIBonitoState *s = opaque; PCIDevice *d = PCI_DEVICE(s); - DPRINTF("bonito_pciconf_writel "TARGET_FMT_plx" val %x\n", addr, val); + DPRINTF("bonito_pciconf_writel "TARGET_FMT_plx" val %lx\n", addr, val); d->config_write(d, addr, val, 4); } @@ -474,7 +474,7 @@ static void bonito_spciconf_write(void *opaque, hwaddr addr, uint64_t val, uint32_t pciaddr; uint16_t status; - DPRINTF("bonito_spciconf_write "TARGET_FMT_plx" size %d val %x\n", + DPRINTF("bonito_spciconf_write "TARGET_FMT_plx" size %d val %lx\n", addr, size, val); pciaddr = bonito_sbridge_pciaddr(s, addr); From patchwork Sun May 10 21:01:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1287419 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=BPgszTLe; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49KxVZ3cQgz9sSc for ; Mon, 11 May 2020 07:08:06 +1000 (AEST) Received: from localhost ([::1]:35058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXtB6-0000E6-7e for incoming@patchwork.ozlabs.org; Sun, 10 May 2020 17:08:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXt53-0007OG-Dd for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:49 -0400 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]:36224) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXt51-00016a-Cv for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:48 -0400 Received: by mail-ej1-x643.google.com with SMTP id z5so5392807ejb.3 for ; Sun, 10 May 2020 14:01:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gEArLcdVFbJa5wuXqVtjUOCd7tloprZST1TLvA6aPgg=; b=BPgszTLex8FCtSMffY6aAHz8T7k64zx3u6G1BEGSP3dYbD2FPuQ7t3OZZ+FkoeAe/V FCy9zmDdrkHmmw4wfWmr58RmfCqSN96Pq7mA1O+aGALRmA4oJwCvl+M96N3ZsMKSUzT7 vviR01ddeiAEs4uzBmgVAulingKuuzTlgy1WaQOdCQJAtm4bqmM42vE/xQJPNSzJIpMR ON+dJCoQR5cyPdIJeuTjpib7y51T9lTbQrzEdGFQAZeytNP/bkFEy4yO34K46JukBY2e Z7zOEWDdLwUsg1/6lVsv7fDKeAW/+Yg/xaZde0RhjCV//PighnD0yIYsplXH0Nvb2Utj /SEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=gEArLcdVFbJa5wuXqVtjUOCd7tloprZST1TLvA6aPgg=; b=fjzuSYaSDT2st7FgJU9yIDWLWsTRfQvtu3qX7LxVfIMmqFvJ7osEVlhwHFRlBBq4hJ bpoeFrzgIAygOJUqOIVWqmAi5HDh7M5FtPrzkx/Cg+gqI/BXVtOFeg+Wg7AaIvtF5hEb pDgjbt5eJYfFtgeNVcfO+w/NbWfFpiXrDPSjxHiy6KJLYN1OC5vDlc0NAL2lh1I1RgYd XhbCTFwLdqevWQ9VedwGIEFykofhBsSKH1r03jnsD0AFehdViR/qwsoO9Jsd1jqKDzNo mua5EZGbkV09M0uUfJd/lLMjBhrSl024OOUtha4KWgmorMvFTiWp8FdJCSy8psJIexCh wWFA== X-Gm-Message-State: AGi0Pub/aKai5SKyZpAVTT8teRYVcR//cn144cZ15oI6vjlD/pb+NcZT xCjgl8PdgGEQCQagWYifHjyeGu78wao= X-Google-Smtp-Source: APiQypI8vAWsC49U84xRyk7hrGOMA3Ca9DpvjVKp5L0Ublw06S+z/eMkLROJOpJhfM9yYWSlXUNKPw== X-Received: by 2002:a17:906:3952:: with SMTP id g18mr10982023eje.191.1589144505540; Sun, 10 May 2020 14:01:45 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id d15sm921152ejr.50.2020.05.10.14.01.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 14:01:44 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 07/12] hw/pci-host/bonito: Map peripheral using physical address Date: Sun, 10 May 2020 23:01:23 +0200 Message-Id: <20200510210128.18343-8-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200510210128.18343-1-f4bug@amsat.org> References: <20200510210128.18343-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::643; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-x643.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Markovic , Paolo Bonzini , Huacai Chen , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Peripherals are mapped at physical address on busses. Only CPU/IOMMU can use virtual addresses. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic --- hw/pci-host/bonito.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 10ead31e4f..7ed462ffb5 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -647,12 +647,12 @@ static void bonito_realize(PCIDevice *dev, Error **errp) memory_region_init_io(&s->iomem_ldma, OBJECT(s), &bonito_ldma_ops, s, "ldma", 0x100); sysbus_init_mmio(sysbus, &s->iomem_ldma); - sysbus_mmio_map(sysbus, 3, 0xbfe00200); + sysbus_mmio_map(sysbus, 3, 0x1fe00200); memory_region_init_io(&s->iomem_cop, OBJECT(s), &bonito_cop_ops, s, "cop", 0x100); sysbus_init_mmio(sysbus, &s->iomem_cop); - sysbus_mmio_map(sysbus, 4, 0xbfe00300); + sysbus_mmio_map(sysbus, 4, 0x1fe00300); /* Map PCI IO Space 0x1fd0 0000 - 0x1fd1 0000 */ memory_region_init_alias(&s->bonito_pciio, OBJECT(s), "isa_mmio", From patchwork Sun May 10 21:01:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1287415 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=XtZzbUXx; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49KxQG2PG1z9sSd for ; Mon, 11 May 2020 07:04:22 +1000 (AEST) Received: from localhost ([::1]:53522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXt7T-0002r5-Ua for incoming@patchwork.ozlabs.org; Sun, 10 May 2020 17:04:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXt54-0007Pn-2z for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:51 -0400 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]:33723) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXt53-00016h-61 for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:49 -0400 Received: by mail-ej1-x643.google.com with SMTP id nv1so6204151ejb.0 for ; Sun, 10 May 2020 14:01:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RQF0AIKv5jY/IdYIv+ZhyhMOTflQHjTZ2jYUwkEq1vA=; b=XtZzbUXx2u9LILr4KkET2BaOdIk2n+4GvRBfzhOUapPMkFvAUAZ+Q/v/hSnS8hssZt kSDj6HArDA30ZTzwa83gfqWFuYpwqHgrBFx9fLwLx6IK8uERZbcvnb6oMJSsnEBfuAGk 4ieeazU62TuCN0CyKPR2K987s9bQoJW9Jf1xmQXPgCXURy30yPpGb0zdCh2moloBNknj bGh5w/FhEUNZEOam1p1E2k5j0RY3bsz0iowWNKKc6XUjF5ecw0A8IXkgIy9mA8qAcuQ8 vLypSHhirXUbYk9drPBQPj8N0bNjKjvi8TrKTtnrrX+YEQqxypBwu8Zljkc7dG1CO3zy ydxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=RQF0AIKv5jY/IdYIv+ZhyhMOTflQHjTZ2jYUwkEq1vA=; b=T+jSP9pFAkl7yJ3l5dgMD3pIOHZ0HyC5gzcJndOaceqBZt9z/5JHpuSuckkV6wOCnX pncRuXz9cEdz9TjC6KhKvcSWSeHxBdCUG3PCFv4c/KPTMAeVvBBmvyXqzlZ+ZxlsJZ+f S72jNyoj25SJke05bu5xtT2Zb2hPdtCSTdmgo7lQqgF6dRIRsady+OW3sV1o6oq9kswi N0CuNf6929dq7Koreol69ZsmaxJxz2c+bBjYGAgOqhotNTqOi3CbT/vIEA0FtdflpDLq Mtbme3eFy7SPOKaGVZBz/OSVRhrp3dAbzbAFVa81iGbYhc7slpqqiy4rdNNbXDmOfZMx todQ== X-Gm-Message-State: AGi0PuZayO3H1ffEFf+jCVDZlZnqcpK/aG7N9jJkvD2qyKuSXzMPuZat z9R0HPsmZ1BpUXsbz2DfxOZ0WhfQ1ok= X-Google-Smtp-Source: APiQypJguef/0Wk97lVqhjPJ6X9mmKks1nlVC2PgMFmVNjT43chokAFJDyJn+ITMrPnnrodUzMBVlg== X-Received: by 2002:a17:906:4147:: with SMTP id l7mr9861603ejk.360.1589144507366; Sun, 10 May 2020 14:01:47 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id d15sm921152ejr.50.2020.05.10.14.01.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 14:01:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 08/12] hw/pci-host/bonito: Map all the Bonito64 I/O range Date: Sun, 10 May 2020 23:01:24 +0200 Message-Id: <20200510210128.18343-9-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200510210128.18343-1-f4bug@amsat.org> References: <20200510210128.18343-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::643; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-x643.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Markovic , Paolo Bonzini , Huacai Chen , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" To ease following guest accesses to the Bonito64 chipset, map its I/O range as UnimplementedDevice. We can now see the accesses to unimplemented peripheral using the '-d unimp' command line option. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic --- hw/pci-host/bonito.c | 3 +++ hw/pci-host/Kconfig | 1 + 2 files changed, 4 insertions(+) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 7ed462ffb5..9761780f44 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -48,6 +48,7 @@ #include "sysemu/reset.h" #include "sysemu/runstate.h" #include "exec/address-spaces.h" +#include "hw/misc/unimp.h" /* #define DEBUG_BONITO */ @@ -644,6 +645,8 @@ static void bonito_realize(PCIDevice *dev, Error **errp) sysbus_init_mmio(sysbus, &phb->data_mem); sysbus_mmio_map(sysbus, 2, BONITO_SPCICONFIG_BASE); + create_unimplemented_device("bonito", BONITO_REG_BASE, BONITO_REG_SIZE); + memory_region_init_io(&s->iomem_ldma, OBJECT(s), &bonito_ldma_ops, s, "ldma", 0x100); sysbus_init_mmio(sysbus, &s->iomem_ldma); diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig index 8db41edc7e..036a61877a 100644 --- a/hw/pci-host/Kconfig +++ b/hw/pci-host/Kconfig @@ -58,4 +58,5 @@ config PCI_EXPRESS_DESIGNWARE config PCI_BONITO select PCI + select UNIMP bool From patchwork Sun May 10 21:01:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1287420 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=aTKTgX8u; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49KxWc0vHFz9sSc for ; Mon, 11 May 2020 07:09:00 +1000 (AEST) Received: from localhost ([::1]:37286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXtBx-00019x-UH for incoming@patchwork.ozlabs.org; Sun, 10 May 2020 17:08:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXt57-0007WI-1G for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:53 -0400 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]:36240) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXt55-00016w-D9 for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:51 -0400 Received: by mail-ed1-x543.google.com with SMTP id b91so1984992edf.3 for ; Sun, 10 May 2020 14:01:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mmHaPOER59FIZy5I04bKapXn8WezFDdBC08nDY63Daw=; b=aTKTgX8uydWqTwDfZ1S7QC+Viz74HDPSWAhviukCF7EIBQoWiuJ9wrAju1LZaHXY+P sXBYs+PUTK55dWNv1jZsPhAHDTI8UZVutX2wVJBpYSfhX1+Vjdwu+7/I/I90b9P03bk8 yw1DtZo7WBX3xIiyjyBJ5V9jaoD5UzBCjaT+WuaFgPMbjcUAAgPxBBL3R2cRl1KZ7Yns 0qBLoEN8L3GAuc8u3vdsgFeyjdK9s2JZKb7yVqpmS5lG5og1RKxCLQCitEAhYWe6Gii6 CblRirU3MqoYqgDCbdLvyb7PC0tw5GF2d1jWO9eUydcOa0rPyhe1HfW/kVgKi+22ffUm rt9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=mmHaPOER59FIZy5I04bKapXn8WezFDdBC08nDY63Daw=; b=cX2gBavKQnc7rCt7UOw0ftNOyaWv0QmMJ4CVxaAjPbnO+9/bUvLwv4+72QarVGweFc Gs/bWr4XGbqKm4mcfTAjoRlgmgE+GcToBun9AR7dH64Q758+7zX9uDE40RNqgYafs2tq S4S+oKnk+2Ea1SqLsPXpOsH/2ZN7hGmHRPLQLEl6nSpCDy1LG+T3D5/dk84ZXTJylH++ 2dhJvSbLXmWVHNwHHWBPJ9+gZ1D4nLMRHltA1zKZEaFysiRQ+MtDpPUD2oaLv8N72oVR CB9AW3VhaMiLpLnGgci0kDkdyUFm22AZv9yBlg9pD6yP8Ogr80Uf3xxx9zFkjnCLA6zK jrCQ== X-Gm-Message-State: AOAM53152yTGYyyGggHkO+IdA5WvkQvYZESa9UbFaQBt6jbWUemwT82a j2UqHoOyhD1fQOUt0aaxioKJuuEot2w= X-Google-Smtp-Source: ABdhPJzj2Cgl5x65+MPo3TFEj/K9OFbF8B+Z+SQUf1uo1la3eBMBqL0lKll6HgHV7GYU3T5daaUeTw== X-Received: by 2002:a50:fd15:: with SMTP id i21mr50855eds.104.1589144509247; Sun, 10 May 2020 14:01:49 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id d15sm921152ejr.50.2020.05.10.14.01.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 14:01:48 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 09/12] hw/pci-host/bonito: Map the different PCI ranges more detailled Date: Sun, 10 May 2020 23:01:25 +0200 Message-Id: <20200510210128.18343-10-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200510210128.18343-1-f4bug@amsat.org> References: <20200510210128.18343-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::543; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ed1-x543.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Markovic , Paolo Bonzini , Huacai Chen , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Better describe the Bonito64 MEM HI/LO and I/O PCI ranges, add more PCI regions as unimplemented. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 9761780f44..90a6c52a38 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -39,6 +39,7 @@ */ #include "qemu/osdep.h" +#include "qemu/units.h" #include "qemu/error-report.h" #include "hw/pci/pci.h" #include "hw/irq.h" @@ -82,7 +83,7 @@ #define BONITO_PCILO1_BASE 0x14000000 #define BONITO_PCILO2_BASE 0x18000000 #define BONITO_PCIHI_BASE 0x20000000 -#define BONITO_PCIHI_SIZE 0x20000000 +#define BONITO_PCIHI_SIZE 0x60000000 #define BONITO_PCIHI_TOP (BONITO_PCIHI_BASE + BONITO_PCIHI_SIZE - 1) #define BONITO_PCIIO_BASE 0x1fd00000 #define BONITO_PCIIO_BASE_VA 0xbfd00000 @@ -606,13 +607,25 @@ static void bonito_pcihost_realize(DeviceState *dev, Error **errp) PCIHostState *phb = PCI_HOST_BRIDGE(dev); BonitoState *bs = BONITO_PCI_HOST_BRIDGE(dev); - memory_region_init(&bs->pci_mem, OBJECT(dev), "pci.mem", BONITO_PCILO_SIZE); + memory_region_init(&bs->pci_mem, OBJECT(dev), "pci.mem", BONITO_PCIHI_SIZE); phb->bus = pci_register_root_bus(DEVICE(dev), "pci", pci_bonito_set_irq, pci_bonito_map_irq, dev, &bs->pci_mem, get_system_io(), 0x28, 32, TYPE_PCI_BUS); - memory_region_add_subregion(get_system_memory(), BONITO_PCILO_BASE, - &bs->pci_mem); + + MemoryRegion *pcimem_lo_alias = g_new(MemoryRegion, 3); + for (size_t i = 0; i < 3; i++) { + char *name = g_strdup_printf("pci.lomem%zu", i); + + memory_region_init_alias(&pcimem_lo_alias[i], NULL, name, + &bs->pci_mem, i * 64 * MiB, 64 * MiB); + memory_region_add_subregion(get_system_memory(), + BONITO_PCILO_BASE + i * 64 * MiB, + &pcimem_lo_alias[i]); + g_free(name); + } + + create_unimplemented_device("pci.io", 0x1fd00000, 1 * MiB); } static void bonito_realize(PCIDevice *dev, Error **errp) @@ -620,6 +633,7 @@ static void bonito_realize(PCIDevice *dev, Error **errp) PCIBonitoState *s = PCI_BONITO(dev); SysBusDevice *sysbus = SYS_BUS_DEVICE(s->pcihost); PCIHostState *phb = PCI_HOST_BRIDGE(s->pcihost); + BonitoState *bs = BONITO_PCI_HOST_BRIDGE(s->pcihost); /* * Bonito North Bridge, built on FPGA, @@ -652,6 +666,7 @@ static void bonito_realize(PCIDevice *dev, Error **errp) sysbus_init_mmio(sysbus, &s->iomem_ldma); sysbus_mmio_map(sysbus, 3, 0x1fe00200); + /* PCI copier */ memory_region_init_io(&s->iomem_cop, OBJECT(s), &bonito_cop_ops, s, "cop", 0x100); sysbus_init_mmio(sysbus, &s->iomem_cop); @@ -669,6 +684,13 @@ static void bonito_realize(PCIDevice *dev, Error **errp) sysbus_init_mmio(sysbus, &s->bonito_localio); sysbus_mmio_map(sysbus, 6, BONITO_DEV_BASE); + MemoryRegion *pcimem_alias = g_new(MemoryRegion, 1); + memory_region_init_alias(pcimem_alias, NULL, "pci.mem.alias", + &bs->pci_mem, 0, BONITO_PCIHI_SIZE); + memory_region_add_subregion(get_system_memory(), + 0x20000000ul, pcimem_alias); + create_unimplemented_device("PCI_2", 0x80000000ul, 2 * GiB); /* pci_hi */ + /* set the default value of north bridge pci config */ pci_set_word(dev->config + PCI_COMMAND, 0x0000); pci_set_word(dev->config + PCI_STATUS, 0x0000); From patchwork Sun May 10 21:01:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1287421 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=k5OSVWyB; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49KxYH4C8lz9sSd for ; Mon, 11 May 2020 07:10:27 +1000 (AEST) Received: from localhost ([::1]:39502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXtDM-0002WC-RD for incoming@patchwork.ozlabs.org; Sun, 10 May 2020 17:10:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXt58-0007ZH-2e for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:55 -0400 Received: from mail-ej1-x644.google.com ([2a00:1450:4864:20::644]:37742) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXt56-000170-Tb for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:53 -0400 Received: by mail-ej1-x644.google.com with SMTP id re23so6189200ejb.4 for ; Sun, 10 May 2020 14:01:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wMvH9BzemTZbwCS6RWBUJZxryrrXNUHuOYFdwrB8eMY=; b=k5OSVWyBf+P8i9VvIOgfFCNLkJHrylHyFw38C2qAtK2WgqMC+5dY2H9UIHpD8HGp/H LgkolNlIGOwAHWWQmrgAd8uWmmEyF42YQ6QD/xPZ4Xp0QapfNrRLegIQobIN2nG3TOdS aRYoGlylfUfh6PalooCFxz4hP+ucDIcJnehAQBYUN2cYUwnxEdKj5ci/+VFg0hAH4EDX pk3dsEHCvcAbF3hjjXKWb/QpHqYt5Z8n+DASV5FAbAA9+6fCUtJyWW4kRpIhiEh8t9BB 1ZD4qJ3C7hMNbu0nZSSruL2Uc57A4Olb94noe92KbNj+QtjMUwLUDSCDAlUSkuPe3DM5 9yvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=wMvH9BzemTZbwCS6RWBUJZxryrrXNUHuOYFdwrB8eMY=; b=iLjAfQ77tj34uSVzw1GK2Eb9G7ACE5pld438jT5hEK1RVHUfU1h4f58ljEmi8MgbSi vtfnbpDE9q9JcJBZD1/tzep0x4mPwugxcWO0uAYPI/9/l1kyDPHruoXNYtv6TBav6NSb +3hQipMtSD6d0QghEdk0fKuJmlvR0s0e03whEq5DQihOYsKkQP5BecsGgVMWSxjCr/cJ z/bgO1EnteCDeeHZ19yhd0PypU24tliz+PVcpjVpNsIFSsvta5fxZ/jV14EkxkkCeFtp XZvU6SYBPoyslt+BqIxKlB4tnDObVYr0tVQNS5X45+ICDS+TYRczlkoYPQsv16B5jq8j FyTg== X-Gm-Message-State: AOAM531Se0v4Qu0ZMzjNHN+V4c7xQWdPG4Aikr2J/6IaJxmpqkI8PUpX El3pER0t3LHMQmdQlC2+x/fYLUbaGJ0= X-Google-Smtp-Source: ABdhPJys1BPBGEqm3ZH0YAZYDro4mCz1ueJoxljkqZkugQkAfxlcRUtiO2h1/QyWOJySA671474xdQ== X-Received: by 2002:a17:906:2311:: with SMTP id l17mr2136877eja.323.1589144510993; Sun, 10 May 2020 14:01:50 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id d15sm921152ejr.50.2020.05.10.14.01.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 14:01:50 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 10/12] hw/pci-host/bonito: Better describe the I/O CS regions Date: Sun, 10 May 2020 23:01:26 +0200 Message-Id: <20200510210128.18343-11-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200510210128.18343-1-f4bug@amsat.org> References: <20200510210128.18343-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::644; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-x644.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Markovic , Paolo Bonzini , Huacai Chen , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Better describe the I/O CS regions, add the ROMCS region. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic --- hw/pci-host/bonito.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 90a6c52a38..335c7787eb 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -672,6 +672,8 @@ static void bonito_realize(PCIDevice *dev, Error **errp) sysbus_init_mmio(sysbus, &s->iomem_cop); sysbus_mmio_map(sysbus, 4, 0x1fe00300); + create_unimplemented_device("ROMCS", 0x1c000000, 60 * MiB); + /* Map PCI IO Space 0x1fd0 0000 - 0x1fd1 0000 */ memory_region_init_alias(&s->bonito_pciio, OBJECT(s), "isa_mmio", get_system_io(), 0, BONITO_PCIIO_SIZE); @@ -679,10 +681,17 @@ static void bonito_realize(PCIDevice *dev, Error **errp) sysbus_mmio_map(sysbus, 5, BONITO_PCIIO_BASE); /* add pci local io mapping */ - memory_region_init_alias(&s->bonito_localio, OBJECT(s), "isa_mmio", - get_system_io(), 0, BONITO_DEV_SIZE); + + memory_region_init_alias(&s->bonito_localio, OBJECT(s), "IOCS[0]", + get_system_io(), 0, 256 * KiB); sysbus_init_mmio(sysbus, &s->bonito_localio); sysbus_mmio_map(sysbus, 6, BONITO_DEV_BASE); + create_unimplemented_device("IOCS[1]", BONITO_DEV_BASE + 1 * 256 * KiB, + 256 * KiB); + create_unimplemented_device("IOCS[2]", BONITO_DEV_BASE + 2 * 256 * KiB, + 256 * KiB); + create_unimplemented_device("IOCS[3]", BONITO_DEV_BASE + 3 * 256 * KiB, + 256 * KiB); MemoryRegion *pcimem_alias = g_new(MemoryRegion, 1); memory_region_init_alias(pcimem_alias, NULL, "pci.mem.alias", From patchwork Sun May 10 21:01:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1287423 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=sylXiCRa; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49KxZY259sz9sSc for ; Mon, 11 May 2020 07:11:33 +1000 (AEST) Received: from localhost ([::1]:41728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXtER-0004At-3P for incoming@patchwork.ozlabs.org; Sun, 10 May 2020 17:11:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXt5B-0007fP-3G for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:57 -0400 Received: from mail-ej1-x641.google.com ([2a00:1450:4864:20::641]:38812) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXt59-00017R-Eu for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:55 -0400 Received: by mail-ej1-x641.google.com with SMTP id a2so6200865ejx.5 for ; Sun, 10 May 2020 14:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ayYsOE2ekE5zXVDs2oP9hlJpdQM4y7RMHn3xiibRt4E=; b=sylXiCRa4NluLp9RptVwUNHWKqcEojov0WI71qgh0bHeSPwrm9Ef3+AS6D7kjthYKs UL+a5VY8SBujp9GY7TQfOjoDReY0K6gX8i8nPp4M8cXZax9sKKp+yCQEm/SzTk3GrqRU ncN3Jw+ULmatyfypyUwBwRJu4QZC//TzhMM5W5yvskhHGpMfhf3CSWV51u45GyM1SYjh 4TxkQrHXEBPW2raqBHV8jRqGfzrf6M0Dt7ScH8SZchD2N211L7m1io8+ez+54ARKAs1q IyUrwXzjfy08gU/FiSs+dIRa7DT1Vwb+8Yff6jtIWOO40NrUL9iW0o4On7O4KSll9uOh 86Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ayYsOE2ekE5zXVDs2oP9hlJpdQM4y7RMHn3xiibRt4E=; b=JRTagMUs62cpul9bQgM8NbohXMy11nIDXXuC1uloOFtWM94D+zAYeJ2hFdMP/fU6m5 MVbnFmrMm94VDbl/vMmpR0Tompy9/+PkOe7J8r13L39G7/6lJH8DVVntFh4q+w5dFrBh was2VT4ootkvr6Hr05akl0BtTvLTyMVNWbRPRtjfFXwWasS3Lz/fOZMFRGkld3np89cy csH3OJ3ai8uA64slpBvNfiTnJ7ScQdNiQ0vjp6Q3X2a2btyS2ohNsuLEGscnPWYGnXqm /jnvbLMnGVMG3/n3EiRWezVq5bmFy8RIpPj6uBoR4JGOoL6QJ+CsBdN4gthtZS/bSM7K U/IA== X-Gm-Message-State: AGi0PuYTuMnPMXgkAu6wUk5YAsltEl6M8iFt7Zs0unYzg+Msk/6F1pgQ 5ybuhayc7VSbuuPXooZQxBwo0gRO4x4= X-Google-Smtp-Source: APiQypKnETHJa0KI2o/OOQ2J86zPQr7AH3gg3oq8xZwaso8MXX+FP7p7G56cEbwg64D0jbfPJgbTIA== X-Received: by 2002:a17:906:17c1:: with SMTP id u1mr10929661eje.47.1589144513942; Sun, 10 May 2020 14:01:53 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id d15sm921152ejr.50.2020.05.10.14.01.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 14:01:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 11/12] hw/pci-host/bonito: Set the Config register reset value with FIELD_DP32 Date: Sun, 10 May 2020 23:01:27 +0200 Message-Id: <20200510210128.18343-12-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200510210128.18343-1-f4bug@amsat.org> References: <20200510210128.18343-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::641; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-x641.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Markovic , Paolo Bonzini , Huacai Chen , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Describe some Config registers fields with the registerfields API. Use the FIELD_DP32() macro to set the BONGENCFG register bits at reset. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic --- hw/pci-host/bonito.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 335c7787eb..86aceb333a 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -50,6 +50,7 @@ #include "sysemu/runstate.h" #include "exec/address-spaces.h" #include "hw/misc/unimp.h" +#include "hw/registerfields.h" /* #define DEBUG_BONITO */ @@ -112,8 +113,19 @@ /* Power on register */ #define BONITO_BONPONCFG (0x00 >> 2) /* 0x100 */ + +/* PCI configuration register */ #define BONITO_BONGENCFG_OFFSET 0x4 #define BONITO_BONGENCFG (BONITO_BONGENCFG_OFFSET >> 2) /*0x104 */ +REG32(BONGENCFG, 0x104) +FIELD(BONGENCFG, DEBUGMODE, 0, 1) +FIELD(BONGENCFG, SNOOP, 1, 1) +FIELD(BONGENCFG, CPUSELFRESET, 2, 1) +FIELD(BONGENCFG, BYTESWAP, 6, 1) +FIELD(BONGENCFG, UNCACHED, 7, 1) +FIELD(BONGENCFG, PREFETCH, 8, 1) +FIELD(BONGENCFG, WRITEBEHIND, 9, 1) +FIELD(BONGENCFG, PCIQUEUE, 12, 1) /* 2. IO & IDE configuration */ #define BONITO_IODEVCFG (0x08 >> 2) /* 0x108 */ @@ -577,11 +589,18 @@ static int pci_bonito_map_irq(PCIDevice *pci_dev, int irq_num) static void bonito_reset(void *opaque) { PCIBonitoState *s = opaque; + uint32_t val = 0; /* set the default value of north bridge registers */ s->regs[BONITO_BONPONCFG] = 0xc40; - s->regs[BONITO_BONGENCFG] = 0x1384; + val = FIELD_DP32(val, BONGENCFG, PCIQUEUE, 1); + val = FIELD_DP32(val, BONGENCFG, WRITEBEHIND, 1); + val = FIELD_DP32(val, BONGENCFG, PREFETCH, 1); + val = FIELD_DP32(val, BONGENCFG, UNCACHED, 1); + val = FIELD_DP32(val, BONGENCFG, CPUSELFRESET, 1); + s->regs[BONITO_BONGENCFG] = val; + s->regs[BONITO_IODEVCFG] = 0x2bff8010; s->regs[BONITO_SDCFG] = 0x255e0091; From patchwork Sun May 10 21:01:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1287424 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=WqoXu9wZ; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Kxbh4lQhz9sSc for ; Mon, 11 May 2020 07:12:30 +1000 (AEST) Received: from localhost ([::1]:43886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXtFK-00053Q-V7 for incoming@patchwork.ozlabs.org; Sun, 10 May 2020 17:12:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXt5C-0007kB-II for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:58 -0400 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]:36225) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXt5B-00017b-Qy for qemu-devel@nongnu.org; Sun, 10 May 2020 17:01:58 -0400 Received: by mail-ej1-x643.google.com with SMTP id z5so5393187ejb.3 for ; Sun, 10 May 2020 14:01:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1cJ5MBtfm5U9bUfRE1+Uv1c5Y0Ygwr9qTN/mJlJtXvc=; b=WqoXu9wZb/bqTgN4dO+eKuvahc49X6gJY9xAGr/unrFae8yxJ/yDRx/O093EC0LoV5 te9oLVY7qA8QcfsYB9b/vXtlbniJPFz/oDbtglZwkdqeOvW07gNPckykztCRY6nxe5BQ zEOH3d+sJaEDb+gVQiFzzTu6GgoL9LetaWj6+3ZN8V319zYQbmkV8iGAsoXljN0bC2lL dIy9/2xCd9EkCfSTcLIfHz7W4XbrYpm8Xad9z3uk8hWlapnBzmIuDfKf5E9+jO3ZALPd q8BwCNS8wqpeo1vhOzh6zrq1ZDdljyvT1ohfsu8iIBjTyjF0+wU/0zi1Axg3JU96PHUE rakA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=1cJ5MBtfm5U9bUfRE1+Uv1c5Y0Ygwr9qTN/mJlJtXvc=; b=aBYxZMUuq4Ks6IaPD0dme6vt+/7I+ufcnTx+C6YXlDFGvMbiYe94f/baYkmG3Jh/zU 9HOtKNNQrDemzSlsXC4rgS//Q9YZmnAV8g3mgeEcn/c7As7pa/0OzGnxiRvmnuVn4Idn SMntJ8owKOpxQ43yzK7t9h2PEfqI8AOR96cERon4T1JgKoKZ/ApYRsssxjWyHAjnd3GR m7trWb4Vvfpb+zXeHL5RdLTfK3d+slEreHEnYG1Eejwkx3DTlTbZyMy7FmQ035WYftlZ T9dnEuPf95KJLnVhhRfit5eUtVbVopJ8zA6jjmZRViMWOfZ3qY8iJ0UNpYWjA0KXsif9 xODw== X-Gm-Message-State: AOAM5313/3+CizE1lIGQXKTc+wHFwmfXNHUWFVB8ECROR/f9MCmDbcmK jLJfYl+3nCk5A9voyM2uwr+fm0Nja8Y= X-Google-Smtp-Source: ABdhPJyElAPPG067++3HlLFky7vz1MCCrjzsGj7ynYZU6lV2wqqXVY148M3Q8RfnO5hEwMeACnBEig== X-Received: by 2002:a17:907:1189:: with SMTP id uz9mr42717ejb.53.1589144516285; Sun, 10 May 2020 14:01:56 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id d15sm921152ejr.50.2020.05.10.14.01.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 14:01:55 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [NOTFORMERGE PATCH 12/12] POC hw/pci-host/bonito: Fix BONGENCFG value after a warm-reset Date: Sun, 10 May 2020 23:01:28 +0200 Message-Id: <20200510210128.18343-13-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200510210128.18343-1-f4bug@amsat.org> References: <20200510210128.18343-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::643; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ej1-x643.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Damien Hedde , Thomas Huth , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Jiaxun Yang , Aleksandar Markovic , Paolo Bonzini , Huacai Chen , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The CPUSELFRESET bit should only be set on COLD reset. To have the PMON firmware behave correctly after WARM reset, we need to clear this bit. Signed-off-by: Philippe Mathieu-Daudé --- Cc: Damien Hedde --- hw/pci-host/bonito.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 86aceb333a..60eab867f0 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -586,6 +586,12 @@ static int pci_bonito_map_irq(PCIDevice *pci_dev, int irq_num) } } +static ResetType bonito_reset_type(PCIBonitoState *s) +{ + /* TODO: Use resettable_get_type(s) to also return RESET_TYPE_WARM */ + return RESET_TYPE_COLD; +} + static void bonito_reset(void *opaque) { PCIBonitoState *s = opaque; @@ -598,7 +604,8 @@ static void bonito_reset(void *opaque) val = FIELD_DP32(val, BONGENCFG, WRITEBEHIND, 1); val = FIELD_DP32(val, BONGENCFG, PREFETCH, 1); val = FIELD_DP32(val, BONGENCFG, UNCACHED, 1); - val = FIELD_DP32(val, BONGENCFG, CPUSELFRESET, 1); + val = FIELD_DP32(val, BONGENCFG, CPUSELFRESET, + bonito_reset_type(s) == RESET_TYPE_COLD); s->regs[BONITO_BONGENCFG] = val; s->regs[BONITO_IODEVCFG] = 0x2bff8010;