From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598964422; cv=none; d=zohomail.com; s=zohoarc; b=eJzNf/9VGjmhMSjxi1bAwg1Vy0WMoCFnNa5MGBLFDze7Ze5KQxTstfQ5TGbl2GsroCR52+kKlKh0cL/IrxUQeozknBDfiih30/eck5lxPwNsU+S8NUw4hwGf6b4A3PEIIW0rQKVmewQkm71TxtTsMlnTagvAuSI87iq35zgbH8E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598964422; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=78kjqDSQRETmH1m8E9STeu2FmSiCV8hjec8rIj380SQ=; b=ljcEqXR+Z5MueizbZOrjjXqrHQwgHp/7ymUNvaMv+YKxfUljEaP/EqjWb+d7oh09vgaRjIWCoe1hynM72H7iNmiCXgeT+1IcFt3YQzTkDbcWTWsvftQt//2aTgfm5HP9fFJ3BaGImaicLxa+SI6BZuJLL6+E5yzy2g6FKu1Q6Lw= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598964422506656.4483273897196; Tue, 1 Sep 2020 05:47:02 -0700 (PDT) Received: from localhost ([::1]:33614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5gj-0006OE-Hd for importer@patchew.org; Tue, 01 Sep 2020 08:47:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fQ-0004dG-Gb for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:40 -0400 Received: from smtpout1.mo804.mail-out.ovh.net ([79.137.123.220]:42631) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fL-0001PT-Sf for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:40 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.109.138.188]) by mo804.mail-out.ovh.net (Postfix) with ESMTPS id 240525CC5355; Tue, 1 Sep 2020 14:45:31 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:30 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G003393a8f20-65bd-4d7f-b31e-17dd5b6fe3f5, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 01/20] m25p80: Return the JEDEC ID twice for mx25l25635e Date: Tue, 1 Sep 2020 14:45:06 +0200 Message-ID: <20200901124525.220252-2-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: a5c907b7-7bca-4074-9967-54a108aaafbb X-Ovh-Tracer-Id: 4785637558170651616 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheehfeegjeeitdfffeetjeduveejueefuefgtdefueelueetveeliefhhffgtdelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheptghlgheskhgrohgurdhorhhg Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=79.137.123.220; envelope-from=clg@kaod.org; helo=smtpout1.mo804.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:31 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Erik Smit , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" The mx25l25635e returns the JEDEC ID twice when issuing a RDID command : [ 2.512027] aspeed-smc 1e630000.spi: reading JEDEC ID C2:20:19:C2:20:19 This can break some firmware testing for this condition on the supermicrox11-bmc machine. Reported-by: Erik Smit Message-Id: <20200819100956.2216690-2-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- hw/block/m25p80.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 82270884416e..605ff55c6756 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -217,7 +217,7 @@ static const FlashPartInfo known_devices[] =3D { { INFO("mx25l6405d", 0xc22017, 0, 64 << 10, 128, 0) }, { INFO("mx25l12805d", 0xc22018, 0, 64 << 10, 256, 0) }, { INFO("mx25l12855e", 0xc22618, 0, 64 << 10, 256, 0) }, - { INFO("mx25l25635e", 0xc22019, 0, 64 << 10, 512, 0) }, + { INFO6("mx25l25635e", 0xc22019, 0xc22019, 64 << 10, 512, 0) }, { INFO("mx25l25655e", 0xc22619, 0, 64 << 10, 512, 0) }, { INFO("mx66u51235f", 0xc2253a, 0, 64 << 10, 1024, ER_4K | ER_32= K) }, { INFO("mx66u1g45g", 0xc2253b, 0, 64 << 10, 2048, ER_4K | ER_32= K) }, --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598964414; cv=none; d=zohomail.com; s=zohoarc; b=f6N85vXo/w95y1SZErWaeidhdENnCUEdi9H6fo/5mqcGfityX420Hm/pRZmX5irj5PMOnvKFnScRFsotHc6Jmt8MW5A39fOpqNZQkc1fSHfuBYTtidT3PfVIJpVF0LHD5EsIuIVT4ZQzvx010H2d0l49O09vH855lpis6SdKssw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598964414; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zL1v8vuiDK+4H+9w2V/IEQxV6eU32MbYff+vT7cILGU=; b=YNf/aNNaoSfGIX2637ZqjLCpaeHZlDLf/AMJm6EMcXbbMIM0G+pWyVOIOqQ+9TuonbT4wJkF/XdYuBMeo+k4QVsOUXgCkWz9+mlA54nV2eek0lGtoKslPEPrNvuKhsdJ6wSTJDw91GlIwZWXOxeJzCzh0GLVfQj6y4f8HBzq450= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598964414736304.3254739137328; Tue, 1 Sep 2020 05:46:54 -0700 (PDT) Received: from localhost ([::1]:33344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5ga-0006Hg-Kx for importer@patchew.org; Tue, 01 Sep 2020 08:46:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fO-0004bZ-KO for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:38 -0400 Received: from smtpout1.mo804.mail-out.ovh.net ([79.137.123.220]:45437) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fL-0001Pd-SV for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:38 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.109.138.188]) by mo804.mail-out.ovh.net (Postfix) with ESMTPS id 577285CC5358; Tue, 1 Sep 2020 14:45:31 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:30 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G0039899d085-dbe3-4954-b709-d43aadecbaac, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 02/20] m25p80: Add support for n25q512ax3 Date: Tue, 1 Sep 2020 14:45:07 +0200 Message-ID: <20200901124525.220252-3-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: b5edaceb-d5c4-4926-adf0-679260891b16 X-Ovh-Tracer-Id: 4785919029466991584 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhephfekveeuieehvddvgeefhfevieeiieehuedutedtuefhueehhfdttdehgeeigeehnecuffhomhgrihhnpehmihgtrhhonhdrtghomhenucfkpheptddrtddrtddrtddpfeejrdehledrudegvddrleelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpqdhouhhtpdhhvghlohepmhigphhlrghnhedrmhgrihhlrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpegtlhhgsehkrghougdrohhrghdprhgtphhtthhopegtlhhgsehkrghougdrohhrgh Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=79.137.123.220; envelope-from=clg@kaod.org; helo=smtpout1.mo804.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:31 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Joel Stanley Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Datasheet available here : https://www.micron.com/-/media/client/global/Documents/Products/Data%20Shee= t/NOR%20Flash/Serial%20NOR/N25Q/n25q_512mb_1ce_3v_65nm.pdf Reviewed-by: Joel Stanley Message-Id: <20200819100956.2216690-4-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- hw/block/m25p80.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 605ff55c6756..62ba6aaf01cf 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -237,6 +237,7 @@ static const FlashPartInfo known_devices[] =3D { { INFO("n25q128", 0x20ba18, 0, 64 << 10, 256, 0) }, { INFO("n25q256a", 0x20ba19, 0, 64 << 10, 512, ER_4K) }, { INFO("n25q512a", 0x20ba20, 0, 64 << 10, 1024, ER_4K) }, + { INFO("n25q512ax3", 0x20ba20, 0x1000, 64 << 10, 1024, ER_4K) }, { INFO_STACKED("n25q00", 0x20ba21, 0x1000, 64 << 10, 2048, ER_4K, 4= ) }, { INFO_STACKED("n25q00a", 0x20bb21, 0x1000, 64 << 10, 2048, ER_4K, 4= ) }, { INFO_STACKED("mt25ql01g", 0x20ba21, 0x1040, 64 << 10, 2048, ER_4K, 2= ) }, --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598964518; cv=none; d=zohomail.com; s=zohoarc; b=dTKTRHSCHvRMjR/nXb8L+au9fh2OaCw3CkST1DABCGbEHbUAmPK841fyy+n5vIFhpWYUMOR4ecOtLQl0acB7TlSsnxrBmzDmnjjN1LY6C142x/jUFoptN+aBb6rSriNuTh/cnl0sxhPnAGcC3kZ8i1AAz+rwaK3qWkHeXzeg14Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598964518; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Hn8P92qk06IeUdJKqK/As1C8E6ScOmN9m4CqCmvOan4=; b=PRCpkLRzxHLfhfR19LXcV0YrYXkY8dJkjA7wOzlfbsQjSL7EePQ3ul5SbKQ6hN7GytqpPqXLxigyxLls+tgjdGkvOyuxEdlLWyEgPuNDyehA+JSriyH2IVi7c8BXlb1Ef1PEWnidIRltUfe+dNvLDxLMJ1RgEfkVriaegFgTyD4= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598964518666829.2461190666661; Tue, 1 Sep 2020 05:48:38 -0700 (PDT) Received: from localhost ([::1]:41914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5iH-0001JS-Rr for importer@patchew.org; Tue, 01 Sep 2020 08:48:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33674) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fR-0004ed-8L for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:41 -0400 Received: from smtpout1.mo804.mail-out.ovh.net ([79.137.123.220]:46147) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fM-0001Pf-C8 for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:40 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.109.138.188]) by mo804.mail-out.ovh.net (Postfix) with ESMTPS id E95295CC535B; Tue, 1 Sep 2020 14:45:31 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:31 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G003761c2c86-22b6-42bc-808a-1d1cdfac51cb, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 03/20] aspeed/scu: Fix valid access size on AST2400 Date: Tue, 1 Sep 2020 14:45:08 +0200 Message-ID: <20200901124525.220252-4-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: 2063d41f-e671-4fc5-bf20-ad7ab33a329b X-Ovh-Tracer-Id: 4785919032676158371 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheehfeegjeeitdfffeetjeduveejueefuefgtdefueelueetveeliefhhffgtdelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheptghlgheskhgrohgurdhorhhg Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=79.137.123.220; envelope-from=clg@kaod.org; helo=smtpout1.mo804.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:31 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Erik Smit , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Joel Stanley Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" The read access size of the SCU registers can be 1/2/4 bytes and write is 4 bytes and all Aspeed models would need a .valid.accepts() handler. For the moment, set the min access size to 1 byte to cover both read and write operations on the AST2400 but keep the min access size of the other SoCs to 4 bytes as this is an unusual access size. This fixes support for some old firmware doing 2 bytes reads on the AST2400 SoC. Reported-by: Erik Smit Reviewed-by: Joel Stanley Message-Id: <20200819100956.2216690-5-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- hw/misc/aspeed_scu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/misc/aspeed_scu.c b/hw/misc/aspeed_scu.c index ec4fef900e27..764222404bef 100644 --- a/hw/misc/aspeed_scu.c +++ b/hw/misc/aspeed_scu.c @@ -328,9 +328,10 @@ static const MemoryRegionOps aspeed_ast2400_scu_ops = =3D { .read =3D aspeed_scu_read, .write =3D aspeed_ast2400_scu_write, .endianness =3D DEVICE_LITTLE_ENDIAN, - .valid.min_access_size =3D 4, - .valid.max_access_size =3D 4, - .valid.unaligned =3D false, + .valid =3D { + .min_access_size =3D 1, + .max_access_size =3D 4, + }, }; =20 static const MemoryRegionOps aspeed_ast2500_scu_ops =3D { --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598964606; cv=none; d=zohomail.com; s=zohoarc; b=JuUO7wXSub/Hgxf4bBNmMV+1TIvxvl2aNjQLJDGOEjpXH+rxB4d3ZfhLxhfXslLxR9YE+K38VheG0pLAdbXCWx9wGXEVxfft+mbbviERLj6P/WjzRHzeSPoZqCPLnxX+iEc16on+e7aDHkMe4YTGy1SQD4HF+pCtyY14uJQaZQI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598964606; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uwcRi3wWDOoR7quSAxrQSXL4Wz15V3DV88l0dvqDnJ0=; b=XTGcRy9QzNivRAOFXORxA1KSXWpEOmlMxVmCZqTCRJSAl1DwD0SMLeQHqIMejGlGUttlS7oT/ZZEeOJimYNzoR9TAyuKEzjxrEu454tL2DjwZikx+zZGqCMtiRvwQ+ZxqMggD5t7E28IUUg3QRky14cdzRx5vzK7pKCyyjr//W8= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 159896460675652.57923316537858; Tue, 1 Sep 2020 05:50:06 -0700 (PDT) Received: from localhost ([::1]:49748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5jh-0004a9-Ry for importer@patchew.org; Tue, 01 Sep 2020 08:50:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fR-0004f9-GZ for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:41 -0400 Received: from smtpout1.mo804.mail-out.ovh.net ([79.137.123.220]:51409) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fM-0001Pm-C6 for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:41 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.109.138.188]) by mo804.mail-out.ovh.net (Postfix) with ESMTPS id 240815CC535F; Tue, 1 Sep 2020 14:45:32 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:31 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G003825684e9-8088-4571-a0ff-8ffaa53cbc2c, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 04/20] hw/arm/aspeed: Add board model for Supermicro X11 BMC Date: Tue, 1 Sep 2020 14:45:09 +0200 Message-ID: <20200901124525.220252-5-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: 36e6a0c2-287a-401d-b69c-b3f7d58aca4b X-Ovh-Tracer-Id: 4785919031238101923 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheejteehuddtieetgffhueevvdelleekffejudefieegjeegheehueelgfeglefgnecuffhomhgrihhnpehsuhhpvghrmhhitghrohdrtghomhenucfkpheptddrtddrtddrtddpfeejrdehledrudegvddrleelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpqdhouhhtpdhhvghlohepmhigphhlrghnhedrmhgrihhlrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpegtlhhgsehkrghougdrohhrghdprhgtphhtthhopegtlhhgsehkrghougdrohhrgh Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=79.137.123.220; envelope-from=clg@kaod.org; helo=smtpout1.mo804.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:31 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Erik Smit , Joel Stanley , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Erik Smit The BMC Firmware can be downloaded from : https://www.supermicro.com/en/products/motherboard/X11SSL-F Signed-off-by: Erik Smit Reviewed-by: Joel Stanley Reviewed-by: C=C3=A9dric Le Goater [ clg: Prettified Erik's name in email Modified commit log ] Message-Id: <20200715173418.186-1-erik.lucas.smit@gmail.com> Message-Id: <20200819100956.2216690-6-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- hw/arm/aspeed.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 8109cc6d2d24..8bfb1c79ddc5 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -57,6 +57,20 @@ struct AspeedMachineState { SCU_HW_STRAP_VGA_SIZE_SET(VGA_16M_DRAM) | \ SCU_AST2400_HW_STRAP_BOOT_MODE(AST2400_SPI_BOOT)) =20 +/* TODO: Find the actual hardware value */ +#define SUPERMICROX11_BMC_HW_STRAP1 ( \ + SCU_AST2400_HW_STRAP_DRAM_SIZE(DRAM_SIZE_128MB) | \ + SCU_AST2400_HW_STRAP_DRAM_CONFIG(2) | \ + SCU_AST2400_HW_STRAP_ACPI_DIS | \ + SCU_AST2400_HW_STRAP_SET_CLK_SOURCE(AST2400_CLK_48M_IN) | \ + SCU_HW_STRAP_VGA_CLASS_CODE | \ + SCU_HW_STRAP_LPC_RESET_PIN | \ + SCU_HW_STRAP_SPI_MODE(SCU_HW_STRAP_SPI_M_S_EN) | \ + SCU_AST2400_HW_STRAP_SET_CPU_AHB_RATIO(AST2400_CPU_AHB_RATIO_2_1) = | \ + SCU_HW_STRAP_SPI_WIDTH | \ + SCU_HW_STRAP_VGA_SIZE_SET(VGA_16M_DRAM) | \ + SCU_AST2400_HW_STRAP_BOOT_MODE(AST2400_SPI_BOOT)) + /* AST2500 evb hardware value: 0xF100C2E6 */ #define AST2500_EVB_HW_STRAP1 (( \ AST2500_HW_STRAP1_DEFAULTS | \ @@ -603,6 +617,23 @@ static void aspeed_machine_palmetto_class_init(ObjectC= lass *oc, void *data) aspeed_soc_num_cpus(amc->soc_name); }; =20 +static void aspeed_machine_supermicrox11_bmc_class_init(ObjectClass *oc, + void *data) +{ + MachineClass *mc =3D MACHINE_CLASS(oc); + AspeedMachineClass *amc =3D ASPEED_MACHINE_CLASS(oc); + + mc->desc =3D "Supermicro X11 BMC (ARM926EJ-S)"; + amc->soc_name =3D "ast2400-a1"; + amc->hw_strap1 =3D SUPERMICROX11_BMC_HW_STRAP1; + amc->fmc_model =3D "mx25l25635e"; + amc->spi_model =3D "mx25l25635e"; + amc->num_cs =3D 1; + amc->macs_mask =3D ASPEED_MAC0_ON | ASPEED_MAC1_ON; + amc->i2c_init =3D palmetto_bmc_i2c_init; + mc->default_ram_size =3D 256 * MiB; +} + static void aspeed_machine_ast2500_evb_class_init(ObjectClass *oc, void *d= ata) { MachineClass *mc =3D MACHINE_CLASS(oc); @@ -731,6 +762,10 @@ static const TypeInfo aspeed_machine_types[] =3D { .name =3D MACHINE_TYPE_NAME("palmetto-bmc"), .parent =3D TYPE_ASPEED_MACHINE, .class_init =3D aspeed_machine_palmetto_class_init, + }, { + .name =3D MACHINE_TYPE_NAME("supermicrox11-bmc"), + .parent =3D TYPE_ASPEED_MACHINE, + .class_init =3D aspeed_machine_supermicrox11_bmc_class_init, }, { .name =3D MACHINE_TYPE_NAME("ast2500-evb"), .parent =3D TYPE_ASPEED_MACHINE, --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598964518; cv=none; d=zohomail.com; s=zohoarc; b=HOhX/n36BXmn0tIfhTgUQ7Km1CEt0JYYKQhLRJ1VnxisagiOOzSYGcSGbbFX9nPgusGzTM0lwehzBWgLpYazXIKLn9shHYlEs7QELl3nLaFKju53ZkN3SRv1oKERY7PDiUIGQPe6e3+XHmmHwffkCV9tM4AOWELXUzUjIYXDUbE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598964518; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ym498QJTUIXGXQ6FIiDLAVkwqnhaqdxMANEbeoDMZrA=; b=hERmUGBQ9INjx27MfLGqZBn74uu1CrhOOI6itTPXg3SmI4KBiT8otsroZ929KBCKN2qTDkhN6cx/+MsMhdd453DFyQjQglOisCRsr6QZY4o1lpZuAfhdgRP5Blrr3VJ1vktQn/VIMpN6eUf8MMQ1AiKrEI82swA5SEmqwdzbXXM= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598964518075562.9073993800018; Tue, 1 Sep 2020 05:48:38 -0700 (PDT) Received: from localhost ([::1]:41862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5iH-0001I9-91 for importer@patchew.org; Tue, 01 Sep 2020 08:48:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fP-0004bo-5i for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:39 -0400 Received: from smtpout1.mo529.mail-out.ovh.net ([178.32.125.2]:56631) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fL-0001Qz-Sl for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:38 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.108.4.108]) by mo529.mail-out.ovh.net (Postfix) with ESMTPS id 8813C563B954; Tue, 1 Sep 2020 14:45:32 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:31 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G00384827f71-701d-4661-840d-b1912642d67b, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 05/20] aspeed/smc: Fix MemoryRegionOps definition Date: Tue, 1 Sep 2020 14:45:10 +0200 Message-ID: <20200901124525.220252-6-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: 1e64f420-cd02-406a-868c-f6335defd7c7 X-Ovh-Tracer-Id: 4786200504106716067 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheehfeegjeeitdfffeetjeduveejueefuefgtdefueelueetveeliefhhffgtdelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheptghlgheskhgrohgurdhorhhg Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=178.32.125.2; envelope-from=clg@kaod.org; helo=smtpout1.mo529.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:33 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Joel Stanley , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , "Michael S . Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Unaligned access support is a leftover from the initial commit. There is no such need on this device register mapping. Remove it. Cc: Michael S. Tsirkin Reviewed-by: Joel Stanley Message-Id: <20200819100956.2216690-7-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- hw/ssi/aspeed_smc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index 4fab1f5f855e..0646e0dca72e 100644 --- a/hw/ssi/aspeed_smc.c +++ b/hw/ssi/aspeed_smc.c @@ -1299,10 +1299,8 @@ static const MemoryRegionOps aspeed_smc_ops =3D { .read =3D aspeed_smc_read, .write =3D aspeed_smc_write, .endianness =3D DEVICE_LITTLE_ENDIAN, - .valid.unaligned =3D true, }; =20 - /* * Initialize the custom address spaces for DMAs */ --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598964414; cv=none; d=zohomail.com; s=zohoarc; b=XRJsaLRvxE/c98fDl+eGcmkJD4UvhM7hUFSdIkrJTgVvISWwHE+fcYB6UvY4jU3B6wwFaAJO34ZB+560Looch86rC7QIsrtnsB0lOeU1FIPbSS3iX7pcUnZ+dRcFxbgUC7I/KK+NpCcMXXGII+zA2wCIb0tHFUzBriw82jid198= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598964414; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pd8X97dN0BWmbe7mTwHf7Czq2S2TbXaRKx/W9uGyLXM=; b=bEkCKO5kEpT7ZfkmNe+CxmsA08Lh8qAbD4iHTMMZ5l3vLAQw62fngmjZkLjEO+P24aMwj2q62KmV9XEJ8rnruq1d2HI/kfUqKQPbMjntrdioPs0AZ4d/VzDDkMoz6LHzCIDZEYvF5MduEUqBxtjMXNEQWPsfUOUOYsiUqDL0RVk= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15989644145809.407270414621507; Tue, 1 Sep 2020 05:46:54 -0700 (PDT) Received: from localhost ([::1]:33320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5gb-0006H1-1N for importer@patchew.org; Tue, 01 Sep 2020 08:46:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33556) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fN-0004bN-Sz for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:37 -0400 Received: from smtpout1.mo529.mail-out.ovh.net ([178.32.125.2]:48295) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fL-0001R0-Sn for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:37 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.108.4.108]) by mo529.mail-out.ovh.net (Postfix) with ESMTPS id 19C60563B957; Tue, 1 Sep 2020 14:45:33 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:32 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G003a7c15809-189f-4328-ace7-c8972639dce1, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 06/20] aspeed/smc: Fix max_slaves of the legacy SMC device Date: Tue, 1 Sep 2020 14:45:11 +0200 Message-ID: <20200901124525.220252-7-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: 92a7da52-fc41-42af-8c1f-3effb92b3a1b X-Ovh-Tracer-Id: 4786200507512228832 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheehfeegjeeitdfffeetjeduveejueefuefgtdefueelueetveeliefhhffgtdelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheptghlgheskhgrohgurdhorhhg Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=178.32.125.2; envelope-from=clg@kaod.org; helo=smtpout1.mo529.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:33 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Joel Stanley Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" The legacy controller only has one slave. Reviewed-by: Joel Stanley Message-Id: <20200819100956.2216690-8-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- hw/ssi/aspeed_smc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index 0646e0dca72e..8c79a5552f93 100644 --- a/hw/ssi/aspeed_smc.c +++ b/hw/ssi/aspeed_smc.c @@ -259,7 +259,7 @@ static const AspeedSMCController controllers[] =3D { .r_timings =3D R_TIMINGS, .nregs_timings =3D 1, .conf_enable_w0 =3D CONF_ENABLE_W0, - .max_slaves =3D 5, + .max_slaves =3D 1, .segments =3D aspeed_segments_legacy, .flash_window_base =3D ASPEED_SOC_SMC_FLASH_BASE, .flash_window_size =3D 0x6000000, --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598964609; cv=none; d=zohomail.com; s=zohoarc; b=Oqbeu7TCOXLU2zTK6Ls8QRk71QnGaDQIfbijQ9d9ql7CQP/m/9AE0sEUOHZdFNs/lSaEEJ/43UuSCxOJK6U5gGuuq9sgdW1Qf2KKsK/rZ3gfNsW+MepcWFqNajeTbYh8MM9KTko5m/bYLEiKnUQA+igOBWYoxrWMCTkyv3OoiXM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598964609; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jU9l+2j/tMj8ww0nyqELRvsTLdC6VQxmSM5JpAoYEG4=; b=FpiDtNJImDYAi0n/QbCINUGnoWSydjgos4wLAV76Bjwx13MFBbE+ym1OFfDxIyW+b2ZoSYv3JCR0KVHd5xckzGGbGH0qCU5UqbTOzgwsSxQGMIBGgtQoUGcJyN0DAS/QeGcd6jMjfITMvc4CGl0W6qBWLICsv2GtODqCaFksgU0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598964609733333.2384798846689; Tue, 1 Sep 2020 05:50:09 -0700 (PDT) Received: from localhost ([::1]:50038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5jk-0004hO-RB for importer@patchew.org; Tue, 01 Sep 2020 08:50:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fQ-0004dY-KS for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:40 -0400 Received: from smtpout1.mo529.mail-out.ovh.net ([178.32.125.2]:33779) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fM-0001RE-C7 for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:40 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.108.4.108]) by mo529.mail-out.ovh.net (Postfix) with ESMTPS id 33193563B958; Tue, 1 Sep 2020 14:45:33 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:32 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G003c25efb09-f62d-462a-8264-0cbfbb349265, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 07/20] aspeed/sdhci: Fix reset sequence Date: Tue, 1 Sep 2020 14:45:12 +0200 Message-ID: <20200901124525.220252-8-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: 92f8a6a4-1429-4caa-8fbe-2208d6fb91b6 X-Ovh-Tracer-Id: 4786481982081633187 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheehfeegjeeitdfffeetjeduveejueefuefgtdefueelueetveeliefhhffgtdelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheptghlgheskhgrohgurdhorhhg Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=178.32.125.2; envelope-from=clg@kaod.org; helo=smtpout1.mo529.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:33 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Eddie James , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Joel Stanley Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" BIT(0) of the ASPEED_SDHCI_INFO register is set by SW and polled until the bit is cleared by HW. Use the number of supported slots to define the default value of this register (The AST2600 eMMC Controller only has one). Fix the reset sequence by clearing automatically the RESET bit. Cc: Eddie James Fixes: 2bea128c3d0b ("hw/sd/aspeed_sdhci: New device") Reviewed-by: Joel Stanley Message-Id: <20200819100956.2216690-9-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- hw/sd/aspeed_sdhci.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/sd/aspeed_sdhci.c b/hw/sd/aspeed_sdhci.c index 22cafce0fbdc..4f24b7d2f942 100644 --- a/hw/sd/aspeed_sdhci.c +++ b/hw/sd/aspeed_sdhci.c @@ -16,7 +16,9 @@ #include "hw/qdev-properties.h" =20 #define ASPEED_SDHCI_INFO 0x00 -#define ASPEED_SDHCI_INFO_RESET 0x00030000 +#define ASPEED_SDHCI_INFO_SLOT1 (1 << 17) +#define ASPEED_SDHCI_INFO_SLOT0 (1 << 16) +#define ASPEED_SDHCI_INFO_RESET (1 << 0) #define ASPEED_SDHCI_DEBOUNCE 0x04 #define ASPEED_SDHCI_DEBOUNCE_RESET 0x00000005 #define ASPEED_SDHCI_BUS 0x08 @@ -67,6 +69,10 @@ static void aspeed_sdhci_write(void *opaque, hwaddr addr= , uint64_t val, AspeedSDHCIState *sdhci =3D opaque; =20 switch (addr) { + case ASPEED_SDHCI_INFO: + /* The RESET bit automatically clears. */ + sdhci->regs[TO_REG(addr)] =3D (uint32_t)val & ~ASPEED_SDHCI_INFO_R= ESET; + break; case ASPEED_SDHCI_SDIO_140: sdhci->slots[0].capareg =3D (uint64_t)(uint32_t)val; break; @@ -155,7 +161,11 @@ static void aspeed_sdhci_reset(DeviceState *dev) AspeedSDHCIState *sdhci =3D ASPEED_SDHCI(dev); =20 memset(sdhci->regs, 0, ASPEED_SDHCI_REG_SIZE); - sdhci->regs[TO_REG(ASPEED_SDHCI_INFO)] =3D ASPEED_SDHCI_INFO_RESET; + + sdhci->regs[TO_REG(ASPEED_SDHCI_INFO)] =3D ASPEED_SDHCI_INFO_SLOT0; + if (sdhci->num_slots =3D=3D 2) { + sdhci->regs[TO_REG(ASPEED_SDHCI_INFO)] |=3D ASPEED_SDHCI_INFO_SLOT= 1; + } sdhci->regs[TO_REG(ASPEED_SDHCI_DEBOUNCE)] =3D ASPEED_SDHCI_DEBOUNCE_R= ESET; } =20 --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598964516; cv=none; d=zohomail.com; s=zohoarc; b=D6FktaXI5nUUdbNFVRktKDsAbD/icKtH8pxtLGzemQaP9gqHq3yU107q9DOPo26Cu/LjQ3Xv0RelkwodVe1QI8qoX7VHqyxvlf/kJVbHCRDz67o5P/W79rt/JeUCt9Lm+IOi3LqudvyaVPekD+j5w9Zg4S0eB43B9d9PuLTzUyw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598964516; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ypGaAIJO7uHqL/JbBZ1lIL4od9uITXLKu+w4ZgkqCeI=; b=mZv8tmvSHOdVaOuhneKEHun12vu0Q0T3jzxy8cMDrrUFnxN5z7HE7eG1WMFgcSTMqD2hPaxD6nkr5R6MYyWREb9gEueblUWO+7+2IXaw5yN2EN2GTmWrxP77u3XekajnqOyQ11ERLlzfUD4b55twlqnFCvLgEKdNjQAnSsSIF7c= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598964516481561.2572286699506; Tue, 1 Sep 2020 05:48:36 -0700 (PDT) Received: from localhost ([::1]:41626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5iF-0001CD-GT for importer@patchew.org; Tue, 01 Sep 2020 08:48:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fP-0004cC-UX for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:39 -0400 Received: from smtpout1.mo529.mail-out.ovh.net ([178.32.125.2]:37563) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fM-0001RI-C7 for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:39 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.108.4.108]) by mo529.mail-out.ovh.net (Postfix) with ESMTPS id 892E1563B95D; Tue, 1 Sep 2020 14:45:33 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:33 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G003d0e3953c-bcca-4e9f-adf3-e0c47fa0b0fe, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 08/20] ftgmac100: Fix registers that can be read Date: Tue, 1 Sep 2020 14:45:13 +0200 Message-ID: <20200901124525.220252-9-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: 7a8a2380-a0b2-4d45-87a3-5a52e0a54a7f X-Ovh-Tracer-Id: 4786481982425238310 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheehfeegjeeitdfffeetjeduveejueefuefgtdefueelueetveeliefhhffgtdelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheptghlgheskhgrohgurdhorhhg Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=178.32.125.2; envelope-from=clg@kaod.org; helo=smtpout1.mo529.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:33 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Joel Stanley , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Frederic Konrad Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Receive Ring Base Address Register (RXR_BADR) and the Normal Priority Transmit Receive Ring Base Address Register (NPTXR_BADR) can also be read. Cc: Frederic Konrad Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Joel Stanley Message-Id: <20200819100956.2216690-10-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- hw/net/ftgmac100.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/net/ftgmac100.c b/hw/net/ftgmac100.c index 5f4b26fc5f3c..0348fcf45676 100644 --- a/hw/net/ftgmac100.c +++ b/hw/net/ftgmac100.c @@ -669,6 +669,10 @@ static uint64_t ftgmac100_read(void *opaque, hwaddr ad= dr, unsigned size) return s->math[0]; case FTGMAC100_MATH1: return s->math[1]; + case FTGMAC100_RXR_BADR: + return s->rx_ring; + case FTGMAC100_NPTXR_BADR: + return s->tx_ring; case FTGMAC100_ITC: return s->itc; case FTGMAC100_DBLAC: --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598964717; cv=none; d=zohomail.com; s=zohoarc; b=Fl279p+NtzszTvOKY2zDR5VMki2wD8WOFHRs0rKGC5f35RgLXbT3ocWTbBHZGXU0OyrtgVElz47alMpHqF18eJY+BMFi9ARMGtfkT+UKk+GEIpZGuf8s7i8+Ks8YP5rypAkSCqYz4w6eZrQs92KAR8oMpAaaVdGLd3rylLBQ9LE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598964717; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kRJsBBBaPrrDgeU0tTgKsWWYZpeujFiq3joFfalxz1I=; b=KZAZcko8wO9+FZGUiKlCc0SeQb50LmtsMvGwrnGZ3w4fFvBs+ErLfS/lQ2/g9wp7/VifIDBUGyhY4vbugLUHo4tver7PoG45NN5u8Q97WHUU9Pf3KMbzSiUiPxQRtC69dXAQjNHzhHcn9rb2sEJwX5YBO2vKomI770jDMRyY/SE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598964717842207.35446293179984; Tue, 1 Sep 2020 05:51:57 -0700 (PDT) Received: from localhost ([::1]:58182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5lU-00089w-V0 for importer@patchew.org; Tue, 01 Sep 2020 08:51:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fT-0004je-1t for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:43 -0400 Received: from smtpout1.mo804.mail-out.ovh.net ([79.137.123.220]:51309) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fP-0001UA-IK for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:42 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.109.143.103]) by mo804.mail-out.ovh.net (Postfix) with ESMTPS id EF5695CC5369; Tue, 1 Sep 2020 14:45:33 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:33 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G00332cc62d9-c584-466e-96c6-1195bd14ad9f, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 09/20] ftgmac100: Fix interrupt status "Packet transmitted on ethernet" Date: Tue, 1 Sep 2020 14:45:14 +0200 Message-ID: <20200901124525.220252-10-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: 9e9a9f52-2e93-442a-ab7c-0a79ec653a1f X-Ovh-Tracer-Id: 4786481983226022819 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheehfeegjeeitdfffeetjeduveejueefuefgtdefueelueetveeliefhhffgtdelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheptghlgheskhgrohgurdhorhhg Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=79.137.123.220; envelope-from=clg@kaod.org; helo=smtpout1.mo804.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:31 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Joel Stanley , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Frederic Konrad Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" The second field of the TX descriptor has a set of flags to choose when the transmit interrupt is raised : after the packet has been sent on the ethernet or after it has been moved into the TX FIFO. But we don't model that today. Simply raise the "Packet transmitted on ethernet" interrupt status bit as soon as the packet is sent by QEMU. Cc: Frederic Konrad Reviewed-by: Joel Stanley Message-Id: <20200819100956.2216690-11-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- hw/net/ftgmac100.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/net/ftgmac100.c b/hw/net/ftgmac100.c index 0348fcf45676..aa3c05ef9882 100644 --- a/hw/net/ftgmac100.c +++ b/hw/net/ftgmac100.c @@ -547,9 +547,7 @@ static void ftgmac100_do_tx(FTGMAC100State *s, uint32_t= tx_ring, qemu_send_packet(qemu_get_queue(s->nic), s->frame, frame_size); ptr =3D s->frame; frame_size =3D 0; - if (flags & FTGMAC100_TXDES1_TXIC) { - s->isr |=3D FTGMAC100_INT_XPKT_ETH; - } + s->isr |=3D FTGMAC100_INT_XPKT_ETH; } =20 if (flags & FTGMAC100_TXDES1_TX2FIC) { --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598964720; cv=none; d=zohomail.com; s=zohoarc; b=InEfH7G4W0yfJD1CtwR5UocUT9CFMYIMJ2WIWEXu3ZRkzloPM/t33QweXrHSOJ9Pa3PTugb+mT4heDx7c7PBqu69VeBCd8DcqtSedbsYx2Y8pB+hT1W1VSjigLDyTrrnnc+qS1+/yXGeID7xaWGhGYH/lnSsDOtWdrdXPjcnPLU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598964720; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=w4Zc+D5uVYfiITNAAoM0wo0FnGiDPwOYVPo1yswTJAQ=; b=n2BmnhSxPA34Tx7PmaIIidMdG0bnd2FgEB3lLnb+g8knOgTbgfL4sqMutZJts0h+AFTFBUs3gdP/jvx8e438PZCvKo9kxKE7nQLw5Pz35z5fUaqCbOo5KgQk4cRkcKuB4knqI9M67bXnDAqTkpJ9mGQl3mVAAr+i7JyjmWo7R5k= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598964720106961.8011765570972; Tue, 1 Sep 2020 05:52:00 -0700 (PDT) Received: from localhost ([::1]:58424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5lX-0008GC-Aw for importer@patchew.org; Tue, 01 Sep 2020 08:51:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fW-0004sQ-Ck for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:46 -0400 Received: from smtpout1.mo804.mail-out.ovh.net ([79.137.123.220]:53923) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fP-0001U9-IX for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:46 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.109.143.118]) by mo804.mail-out.ovh.net (Postfix) with ESMTPS id 49FEA5CC536C; Tue, 1 Sep 2020 14:45:34 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:33 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G003cd17b65e-ab21-462c-a3f4-a3abb94ea6c6, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 10/20] ftgmac100: Fix interrupt status "Packet moved to RX FIFO" Date: Tue, 1 Sep 2020 14:45:15 +0200 Message-ID: <20200901124525.220252-11-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: 46bf8e90-227c-4dab-abd6-5d6e320b7a21 X-Ovh-Tracer-Id: 4786763454875012003 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheehfeegjeeitdfffeetjeduveejueefuefgtdefueelueetveeliefhhffgtdelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheptghlgheskhgrohgurdhorhhg Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=79.137.123.220; envelope-from=clg@kaod.org; helo=smtpout1.mo804.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:31 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Joel Stanley , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Frederic Konrad Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" As we don't model the RX or TX FIFO, raise the "Packet moved to RX FIFO" interrupt status bit as soon as we are handling a RX packet. Cc: Frederic Konrad Reviewed-by: Joel Stanley Message-Id: <20200819100956.2216690-12-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- hw/net/ftgmac100.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/net/ftgmac100.c b/hw/net/ftgmac100.c index aa3c05ef9882..5c0fe2d8cb75 100644 --- a/hw/net/ftgmac100.c +++ b/hw/net/ftgmac100.c @@ -950,6 +950,7 @@ static ssize_t ftgmac100_receive(NetClientState *nc, co= nst uint8_t *buf, break; } =20 + s->isr |=3D FTGMAC100_INT_RPKT_FIFO; addr =3D s->rx_descriptor; while (size > 0) { if (!ftgmac100_can_receive(nc)) { @@ -1001,8 +1002,6 @@ static ssize_t ftgmac100_receive(NetClientState *nc, = const uint8_t *buf, /* Last buffer in frame. */ bd.des0 |=3D flags | FTGMAC100_RXDES0_LRS; s->isr |=3D FTGMAC100_INT_RPKT_BUF; - } else { - s->isr |=3D FTGMAC100_INT_RPKT_FIFO; } ftgmac100_write_bd(&bd, addr); if (bd.des0 & s->rxdes0_edorr) { --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598965121; cv=none; d=zohomail.com; s=zohoarc; b=Qx5NrRrTagW03DAWbBxlAPXC6u0nBB0OQR0KZtPv4yrJ93+Rjsh3fJf3w8/OLU413u/doh04SwoNF595MktDptKpF4nNXBz6ZZVSjZcSkgmQ4Ezf16xChz/7nUQNh1qB7OBPw7Raob4bb6VkE1Q9w6J490xjRn6a8cKVDGNUQOo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598965121; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=m9ibAqYbBGsDQts4lSSYN6ncRWHZAv7XmW9gNbbics0=; b=FWGSuRkCQXw1MccP32czyC13poJ82aFSVh9Brxv+sPzA3jpuAOJQm8OYHJ6VsO9gqfTc5DZWZzJTJafR5QlaXP3ecU0vIdy8wwVJB65Cl1x56XjI9hFwyUWr2JDD+lGZ9Y/N3rXEtB60UXGV4qI1OEUDYTPfu7/kQrOT1pgdfXU= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598965121350546.043613487548; Tue, 1 Sep 2020 05:58:41 -0700 (PDT) Received: from localhost ([::1]:60486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5s0-0003l8-K9 for importer@patchew.org; Tue, 01 Sep 2020 08:58:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fc-000569-Tg for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:54 -0400 Received: from smtpout1.mo529.mail-out.ovh.net ([178.32.125.2]:49409) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fa-0001US-Ab for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:52 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.109.146.131]) by mo529.mail-out.ovh.net (Postfix) with ESMTPS id 059CD563B99B; Tue, 1 Sep 2020 14:45:39 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:34 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G00319202576-4534-4769-abbb-5a4b97c9302a, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 11/20] ftgmac100: Change interrupt status when a DMA error occurs Date: Tue, 1 Sep 2020 14:45:16 +0200 Message-ID: <20200901124525.220252-12-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: bab664f8-82dc-4e9a-bf08-edd1e679dc55 X-Ovh-Tracer-Id: 4786763456668666787 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheehfeegjeeitdfffeetjeduveejueefuefgtdefueelueetveeliefhhffgtdelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpeelnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheptghlgheskhgrohgurdhorhhg Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=178.32.125.2; envelope-from=clg@kaod.org; helo=smtpout1.mo529.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:33 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Joel Stanley , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Frederic Konrad Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" The model uses today the "Normal priority transmit buffer unavailable" interrupt status which it is not appropriate. According to the Aspeed specs, no interrupts are raised in that case. An "AHB error" status seems like a better modeling choice for all implementations since it is covered by the Linux kernel. Cc: Frederic Konrad Reviewed-by: Joel Stanley Message-Id: <20200819100956.2216690-13-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- hw/net/ftgmac100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/ftgmac100.c b/hw/net/ftgmac100.c index 5c0fe2d8cb75..014980d30aca 100644 --- a/hw/net/ftgmac100.c +++ b/hw/net/ftgmac100.c @@ -517,7 +517,7 @@ static void ftgmac100_do_tx(FTGMAC100State *s, uint32_t= tx_ring, if (dma_memory_read(&address_space_memory, bd.des3, ptr, len)) { qemu_log_mask(LOG_GUEST_ERROR, "%s: failed to read packet @ 0x= %x\n", __func__, bd.des3); - s->isr |=3D FTGMAC100_INT_NO_NPTXBUF; + s->isr |=3D FTGMAC100_INT_AHB_ERR; break; } =20 --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598964420; cv=none; d=zohomail.com; s=zohoarc; b=dtAvhpn2SE2JZx8Ccb3Tu31b0o1+VLL+XDk+uRuDNEYtA7Q8Bfxu0UZaFDO0MaSK+dRjtn16fuauJyPl6r/Xg+qvvFqQABxuLXfG69JVxuNV8pYZ0rGrRdIvyLSqKET8UeJiC+JTFg8AKl3H1O5xU4foRrI4f3pIJmz7Q4gjUjo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598964420; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=60abLHmIj+BbQpMsaWxqzJHDPgo5adWpaqHxDUwsWqo=; b=iwx6aURjrooMj0pzbC+r0NzOEAPwhytjJSuAAqxirrik8RaadOMV8Qki4uKc2QJbDvs56xNXsDXb1X9h9MCP8cGv6EIlGyLVPqYmL64Jzzfiq+Jgx2U3VeNzA1L1Ifi+cWQ8vufXhZR/ThwTpIHVG5C2SiSmRrIGYCkE+5VhMcg= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598964420668867.267923540399; Tue, 1 Sep 2020 05:47:00 -0700 (PDT) Received: from localhost ([::1]:33512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5gh-0006Lq-Sr for importer@patchew.org; Tue, 01 Sep 2020 08:46:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fP-0004bs-CB for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:39 -0400 Received: from smtpout1.mo529.mail-out.ovh.net ([178.32.125.2]:49769) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fM-0001Rp-5j for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:39 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.108.16.95]) by mo529.mail-out.ovh.net (Postfix) with ESMTPS id F3336563B96C; Tue, 1 Sep 2020 14:45:34 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:34 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G0032f5ad522-1b41-4091-82da-76474610f969, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 12/20] ftgmac100: Check for invalid len and address before doing a DMA transfer Date: Tue, 1 Sep 2020 14:45:17 +0200 Message-ID: <20200901124525.220252-13-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: e12fbb83-8bbb-4674-9739-82e3230ffca7 X-Ovh-Tracer-Id: 4786763455483186083 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheehfeegjeeitdfffeetjeduveejueefuefgtdefueelueetveeliefhhffgtdelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheptghlgheskhgrohgurdhorhhg Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=178.32.125.2; envelope-from=clg@kaod.org; helo=smtpout1.mo529.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:33 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Joel Stanley , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Frederic Konrad Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" According to the Aspeed specs, no interrupts are raised in that case but a "Tx-packets lost" status seems like a good modeling choice for all implementations. It is covered by the Linux kernel. Cc: Frederic Konrad Reviewed-by: Joel Stanley Message-Id: <20200819100956.2216690-14-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- hw/net/ftgmac100.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/net/ftgmac100.c b/hw/net/ftgmac100.c index 014980d30aca..280aa3d3a1e2 100644 --- a/hw/net/ftgmac100.c +++ b/hw/net/ftgmac100.c @@ -507,6 +507,15 @@ static void ftgmac100_do_tx(FTGMAC100State *s, uint32_= t tx_ring, } =20 len =3D FTGMAC100_TXDES0_TXBUF_SIZE(bd.des0); + if (!len) { + /* + * 0 is an invalid size, however the HW does not raise any + * interrupt. Flag an error because the guest is buggy. + */ + qemu_log_mask(LOG_GUEST_ERROR, "%s: invalid segment size\n", + __func__); + } + if (frame_size + len > sizeof(s->frame)) { qemu_log_mask(LOG_GUEST_ERROR, "%s: frame too big : %d bytes\n= ", __func__, len); --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598964907; cv=none; d=zohomail.com; s=zohoarc; b=AP0Zc/D5fwkvzxTywHyiQL0mz03iB+NfKCEb8BwPUHZ6A7pWFVwu2ebYK7fV9E1ITuO8yqfGBSyng9fJqGvl9YqE43r03GKJfAoJ/4mTb4tOezJFc7AD7NVoxCdrzz4fjzT22vJqerTl0VHMsFQSK51f9NQS5AaL2f9rszfX6vM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598964907; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SZcYY0Zrl4DeMRBMr9qk8qO/mTt5Oqv4UIA5z7Ew4jo=; b=d+s8KdHoAdXQHFG27CjN3VR6IsWUW4mYI9B/V/fqUtifQO9zh5bQdCxtYAYn1Gb/EY8VVth3A9KtPCLaAKYob5mHSh8HnhvZ80qCc/uZarV4DPU3cbSpFJKvbhc4siQLcbVCzZA3eBQIVuTK6iRFc6FfxCFtl8bv7r+4fHAS+zE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598964907956691.697063380926; Tue, 1 Sep 2020 05:55:07 -0700 (PDT) Received: from localhost ([::1]:46172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5oZ-0006FD-3x for importer@patchew.org; Tue, 01 Sep 2020 08:55:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fV-0004qF-KY for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:45 -0400 Received: from smtpout1.mo804.mail-out.ovh.net ([79.137.123.220]:43007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fR-0001Us-5A for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:45 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.109.156.44]) by mo804.mail-out.ovh.net (Postfix) with ESMTPS id 7C2345CC537A; Tue, 1 Sep 2020 14:45:35 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:34 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G003c1fea4e1-1739-410e-b00c-59f00a43bbb0, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 13/20] ftgmac100: Fix integer overflow in ftgmac100_do_tx() Date: Tue, 1 Sep 2020 14:45:18 +0200 Message-ID: <20200901124525.220252-14-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: 04b970e8-b546-473d-9fc6-572e04b4a514 X-Ovh-Tracer-Id: 4787044930205748006 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheehfeegjeeitdfffeetjeduveejueefuefgtdefueelueetveeliefhhffgtdelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheptghlgheskhgrohgurdhorhhg Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=79.137.123.220; envelope-from=clg@kaod.org; helo=smtpout1.mo804.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:31 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Mauro Matteo Cascella , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Ziming Zhang , Frederic Konrad Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" When inserting the VLAN tag in packets, memmove() can generate an integer overflow for packets whose length is less than 12 bytes. Move the VLAN insertion when the last segment of the frame is reached and check length against the size of the ethernet header (14 bytes) to avoid the crash. Return FTGMAC100_INT_XPKT_LOST status if the frame is too small. This seems like a good modeling choice even if Aspeed does not specify anything in that case. Cc: Frederic Konrad Cc: Mauro Matteo Cascella Reported-by: Ziming Zhang Message-Id: <20200819100956.2216690-15-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- hw/net/ftgmac100.c | 55 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/hw/net/ftgmac100.c b/hw/net/ftgmac100.c index 280aa3d3a1e2..7c9fa720df03 100644 --- a/hw/net/ftgmac100.c +++ b/hw/net/ftgmac100.c @@ -481,6 +481,37 @@ static int ftgmac100_write_bd(FTGMAC100Desc *bd, dma_a= ddr_t addr) return 0; } =20 +static int ftgmac100_insert_vlan(FTGMAC100State *s, int frame_size, + uint8_t vlan_tci) +{ + uint8_t *vlan_hdr =3D s->frame + (ETH_ALEN * 2); + uint8_t *payload =3D vlan_hdr + sizeof(struct vlan_header); + + if (frame_size < sizeof(struct eth_header)) { + qemu_log_mask(LOG_GUEST_ERROR, + "%s: frame too small for VLAN insertion : %d bytes\n= ", + __func__, frame_size); + s->isr |=3D FTGMAC100_INT_XPKT_LOST; + goto out; + } + + if (frame_size + sizeof(struct vlan_header) > sizeof(s->frame)) { + qemu_log_mask(LOG_GUEST_ERROR, + "%s: frame too big : %d bytes\n", + __func__, frame_size); + s->isr |=3D FTGMAC100_INT_XPKT_LOST; + frame_size -=3D sizeof(struct vlan_header); + } + + memmove(payload, vlan_hdr, frame_size - (ETH_ALEN * 2)); + stw_be_p(vlan_hdr, ETH_P_VLAN); + stw_be_p(vlan_hdr + 2, vlan_tci); + frame_size +=3D sizeof(struct vlan_header); + +out: + return frame_size; +} + static void ftgmac100_do_tx(FTGMAC100State *s, uint32_t tx_ring, uint32_t tx_descriptor) { @@ -530,25 +561,17 @@ static void ftgmac100_do_tx(FTGMAC100State *s, uint32= _t tx_ring, break; } =20 - /* Check for VLAN */ - if (bd.des0 & FTGMAC100_TXDES0_FTS && - bd.des1 & FTGMAC100_TXDES1_INS_VLANTAG && - be16_to_cpu(PKT_GET_ETH_HDR(ptr)->h_proto) !=3D ETH_P_VLAN) { - if (frame_size + len + 4 > sizeof(s->frame)) { - qemu_log_mask(LOG_GUEST_ERROR, "%s: frame too big : %d byt= es\n", - __func__, len); - s->isr |=3D FTGMAC100_INT_XPKT_LOST; - len =3D sizeof(s->frame) - frame_size - 4; - } - memmove(ptr + 16, ptr + 12, len - 12); - stw_be_p(ptr + 12, ETH_P_VLAN); - stw_be_p(ptr + 14, bd.des1); - len +=3D 4; - } - ptr +=3D len; frame_size +=3D len; if (bd.des0 & FTGMAC100_TXDES0_LTS) { + + /* Check for VLAN */ + if (flags & FTGMAC100_TXDES1_INS_VLANTAG && + be16_to_cpu(PKT_GET_ETH_HDR(s->frame)->h_proto) !=3D ETH_P= _VLAN) { + frame_size =3D ftgmac100_insert_vlan(s, frame_size, + FTGMAC100_TXDES1_VLANTAG_CI(fl= ags)); + } + if (flags & FTGMAC100_TXDES1_IP_CHKSUM) { net_checksum_calculate(s->frame, frame_size); } --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598964716; cv=none; d=zohomail.com; s=zohoarc; b=JZPzM8U3MHZQFlDjG4hLAd8EnHcf6GqI2MnYiYd8fFz3XaeGMfbL/C7VohY09lGT0pyrj5gb96DNRaglT1JlW/c6eVu5IXnYg0iO7CfCIz0oc4SYULTYJH8txAMbMqWZfw7wuW8pEIUYnusopOIgXONICmrJ9PITgvV+QIMQV1k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598964716; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XH33yYhhjitQsbXf8/W6OXHxFo0SHkDbryNgn48I4vo=; b=BQ164RJPucStl7W6BhAXc0vOMy86PzpZ0uCLx7ksI3wW4O7Wa3rBBZjl3AyIygFAdgHbizZAOVM2mLFwrn6wKmIykhEjHZ8RJZjrjX56LQwwsqr89kRpMGmbIFyZEc0PcrVoFZj+p9ncSUY7aGkzCEgBDirwKPa9hoy3zxzx21c= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598964716173191.82319592058275; Tue, 1 Sep 2020 05:51:56 -0700 (PDT) Received: from localhost ([::1]:57870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5lS-000829-FX for importer@patchew.org; Tue, 01 Sep 2020 08:51:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fS-0004j3-RN for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:42 -0400 Received: from smtpout1.mo529.mail-out.ovh.net ([178.32.125.2]:51705) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fO-0001Tv-NZ for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:42 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.108.20.54]) by mo529.mail-out.ovh.net (Postfix) with ESMTPS id D3610563B978; Tue, 1 Sep 2020 14:45:35 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:35 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G003d04f5113-fdec-4199-ab5f-ac3fc945d93f, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 14/20] ftgmac100: Improve software reset Date: Tue, 1 Sep 2020 14:45:19 +0200 Message-ID: <20200901124525.220252-15-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: 1f6b8c7f-e054-4cb0-bed9-60dab8709f09 X-Ovh-Tracer-Id: 4787044930193230816 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheehfeegjeeitdfffeetjeduveejueefuefgtdefueelueetveeliefhhffgtdelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheptghlgheskhgrohgurdhorhhg Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=178.32.125.2; envelope-from=clg@kaod.org; helo=smtpout1.mo529.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:33 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Frederic Konrad Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" The software reset of the MAC needs a finer granularity. Some settings in MACCR are kept. Cc: Frederic Konrad Fixes: bd44300d1afc ("net: add FTGMAC100 support") Message-Id: <20200819100956.2216690-16-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- hw/net/ftgmac100.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/hw/net/ftgmac100.c b/hw/net/ftgmac100.c index 7c9fa720df03..782ff192cedc 100644 --- a/hw/net/ftgmac100.c +++ b/hw/net/ftgmac100.c @@ -649,10 +649,8 @@ static uint32_t ftgmac100_rxpoll(FTGMAC100State *s) return cnt / div[speed]; } =20 -static void ftgmac100_reset(DeviceState *d) +static void ftgmac100_do_reset(FTGMAC100State *s, bool sw_reset) { - FTGMAC100State *s =3D FTGMAC100(d); - /* Reset the FTGMAC100 */ s->isr =3D 0; s->ier =3D 0; @@ -671,7 +669,12 @@ static void ftgmac100_reset(DeviceState *d) s->fear1 =3D 0; s->tpafcr =3D 0xf1; =20 - s->maccr =3D 0; + if (sw_reset) { + s->maccr &=3D FTGMAC100_MACCR_GIGA_MODE | FTGMAC100_MACCR_FAST_MOD= E; + } else { + s->maccr =3D 0; + } + s->phycr =3D 0; s->phydata =3D 0; s->fcr =3D 0x400; @@ -680,6 +683,11 @@ static void ftgmac100_reset(DeviceState *d) phy_reset(s); } =20 +static void ftgmac100_reset(DeviceState *d) +{ + ftgmac100_do_reset(FTGMAC100(d), false); +} + static uint64_t ftgmac100_read(void *opaque, hwaddr addr, unsigned size) { FTGMAC100State *s =3D FTGMAC100(opaque); @@ -824,7 +832,7 @@ static void ftgmac100_write(void *opaque, hwaddr addr, case FTGMAC100_MACCR: /* MAC Device control */ s->maccr =3D value; if (value & FTGMAC100_MACCR_SW_RST) { - ftgmac100_reset(DEVICE(s)); + ftgmac100_do_reset(s, true); } =20 if (ftgmac100_can_receive(qemu_get_queue(s->nic))) { --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598964822; cv=none; d=zohomail.com; s=zohoarc; b=CcXwK+RvCNQ8Vup/nyjeOuOYGUIN//trB9x7wdaY28ICgEoC7z6c2YMhQljoGdaqIBO0rlaJ1/zXxfkMx7LT6BTeLidmYkGc15trhrF7GJAsWvdkAbJQI0VRYxOqyPm/mA7x/xW+FW7LcEDc+OCUZ8m5KjxBP4If0ZsCnubn1Mk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598964822; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UhalBy4Up18g4VW2dtffz092SF0pOoHsq9ffmXdMR5g=; b=Y2OdZLbrTDZ9On+jPFYylJIzWlGoMhEHC9X77+RVwwUYmVqEsOw6oxa1gj85Rgsgnx+MOV25i5Vox0KtXw/0KVS/aZzgi8lQ0j8TxYBKoosGZSjArATGyK6kgSI+EB877oKzsEfHtFWUjEj0Azt0g4aygW9pi+DEMHP07nyvg0k= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598964822655434.9793237886445; Tue, 1 Sep 2020 05:53:42 -0700 (PDT) Received: from localhost ([::1]:38358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5nB-000381-Tu for importer@patchew.org; Tue, 01 Sep 2020 08:53:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fT-0004kf-GF for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:43 -0400 Received: from smtpout1.mo529.mail-out.ovh.net ([178.32.125.2]:32781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fO-0001Tw-NR for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:43 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.109.138.194]) by mo529.mail-out.ovh.net (Postfix) with ESMTPS id 34BDE563B97A; Tue, 1 Sep 2020 14:45:36 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:35 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G0037be8d732-ab06-4baf-9150-6c16740a6382, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 15/20] aspeed/sdmc: Perform memory training Date: Tue, 1 Sep 2020 14:45:20 +0200 Message-ID: <20200901124525.220252-16-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: 65c2ef45-5d1d-4103-9121-b36d2c5145c7 X-Ovh-Tracer-Id: 4787326406157700064 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheehfeegjeeitdfffeetjeduveejueefuefgtdefueelueetveeliefhhffgtdelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheptghlgheskhgrohgurdhorhhg Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=178.32.125.2; envelope-from=clg@kaod.org; helo=smtpout1.mo529.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:33 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Joel Stanley , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Joel Stanley This allows qemu to run the "normal" power on reset boot path through u-boot, where the DDR is trained. An enhancement would be to have the SCU bit stick across qemu reboots, but be unset on initial boot. Proper modelling would be to discard all writes to the phy setting regs at offset 0x100 - 0x400 and to model the phy status regs at offset 0x400. The status regs model would only need to account for offets 0x00, 0x50, 0x68 and 0x7c. Signed-off-by: Joel Stanley [ clg: checkpatch fixes ] Message-Id: <20200819100956.2216690-17-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- include/hw/misc/aspeed_sdmc.h | 13 ++++++++++++- hw/misc/aspeed_scu.c | 2 +- hw/misc/aspeed_sdmc.c | 19 +++++++++++++++++-- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/include/hw/misc/aspeed_sdmc.h b/include/hw/misc/aspeed_sdmc.h index cea1e67fe365..c6226957dd3d 100644 --- a/include/hw/misc/aspeed_sdmc.h +++ b/include/hw/misc/aspeed_sdmc.h @@ -17,7 +17,18 @@ #define TYPE_ASPEED_2500_SDMC TYPE_ASPEED_SDMC "-ast2500" #define TYPE_ASPEED_2600_SDMC TYPE_ASPEED_SDMC "-ast2600" =20 -#define ASPEED_SDMC_NR_REGS (0x174 >> 2) +/* + * SDMC has 174 documented registers. In addition the u-boot device tree + * describes the following regions: + * - PHY status regs at offset 0x400, length 0x200 + * - PHY setting regs at offset 0x100, length 0x300 + * + * There are two sets of MRS (Mode Registers) configuration in ast2600 mem= ory + * system: one is in the SDRAM MC (memory controller) which is used in run + * time, and the other is in the DDR-PHY IP which is used during DDR-PHY + * training. + */ +#define ASPEED_SDMC_NR_REGS (0x500 >> 2) =20 typedef struct AspeedSDMCState { /*< private >*/ diff --git a/hw/misc/aspeed_scu.c b/hw/misc/aspeed_scu.c index 764222404bef..dc6dd87c22f4 100644 --- a/hw/misc/aspeed_scu.c +++ b/hw/misc/aspeed_scu.c @@ -656,7 +656,7 @@ static const uint32_t ast2600_a1_resets[ASPEED_AST2600_= SCU_NR_REGS] =3D { [AST2600_SYS_RST_CTRL2] =3D 0xFFFFFFFC, [AST2600_CLK_STOP_CTRL] =3D 0xFFFF7F8A, [AST2600_CLK_STOP_CTRL2] =3D 0xFFF0FFF0, - [AST2600_SDRAM_HANDSHAKE] =3D 0x00000040, /* SoC completed DRAM ini= t */ + [AST2600_SDRAM_HANDSHAKE] =3D 0x00000000, [AST2600_HPLL_PARAM] =3D 0x1000405F, [AST2600_CHIP_ID0] =3D 0x1234ABCD, [AST2600_CHIP_ID1] =3D 0x88884444, diff --git a/hw/misc/aspeed_sdmc.c b/hw/misc/aspeed_sdmc.c index 855848b7d23a..ff2809a09965 100644 --- a/hw/misc/aspeed_sdmc.c +++ b/hw/misc/aspeed_sdmc.c @@ -113,7 +113,7 @@ static uint64_t aspeed_sdmc_read(void *opaque, hwaddr a= ddr, unsigned size) if (addr >=3D ARRAY_SIZE(s->regs)) { qemu_log_mask(LOG_GUEST_ERROR, "%s: Out-of-bounds read at offset 0x%" HWADDR_PRIx "= \n", - __func__, addr); + __func__, addr * 4); return 0; } =20 @@ -206,6 +206,19 @@ static void aspeed_sdmc_reset(DeviceState *dev) =20 /* Set ram size bit and defaults values */ s->regs[R_CONF] =3D asc->compute_conf(s, 0); + + /* + * PHY status: + * - set phy status ok (set bit 1) + * - initial PVT calibration ok (clear bit 3) + * - runtime calibration ok (clear bit 5) + */ + s->regs[0x100] =3D BIT(1); + + /* PHY eye window: set all as passing */ + s->regs[0x100 | (0x68 / 4)] =3D 0xff; + s->regs[0x100 | (0x7c / 4)] =3D 0xff; + s->regs[0x100 | (0x50 / 4)] =3D 0xfffffff; } =20 static void aspeed_sdmc_get_ram_size(Object *obj, Visitor *v, const char *= name, @@ -443,7 +456,9 @@ static void aspeed_2600_sdmc_write(AspeedSDMCState *s, = uint32_t reg, } =20 if (reg !=3D R_PROT && s->regs[R_PROT] =3D=3D PROT_SOFTLOCKED) { - qemu_log_mask(LOG_GUEST_ERROR, "%s: SDMC is locked!\n", __func__); + qemu_log_mask(LOG_GUEST_ERROR, + "%s: SDMC is locked! (write to MCR%02x blocked)\n", + __func__, reg * 4); return; } =20 --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598964819; cv=none; d=zohomail.com; s=zohoarc; b=YoHTK4rB6BpnOzlfioUJQyli0IWwZvCu3qC49TzSzBM0gGj4e1+3zqKhuuRU4ZhnRNdjf2QUJ4YNetk+r65VX9TF98Eu2CrKscU2rZkXQGs465EtYCxibWdo30U4NPZyuvlcjfinvKFZ7rvT9rll3aIkNPZBNWh4olBLBpjjjh8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598964819; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jDJL+tBqlNBVp9owkmEy5OJtdL3mxmnC84qlbcvjRpo=; b=elRup+uFW7UfavFygAelGOoZ9knThPNbKwjDrokqL3p1KtT2hZfv3tm8PmoxyhwXXMC3JelPKgoj0NuN9I3xYDH+TF6qgOoQWhwFPlMEZPiqpMQNF5KgYdDzwFhqrU71l6jru1RI4q2G5lGt7TduRXzRprReH4cER0hw/7vBFNI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598964819206108.05284037861315; Tue, 1 Sep 2020 05:53:39 -0700 (PDT) Received: from localhost ([::1]:37962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5n8-0002yS-Cd for importer@patchew.org; Tue, 01 Sep 2020 08:53:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fU-0004nR-GN for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:44 -0400 Received: from smtpout1.mo529.mail-out.ovh.net ([178.32.125.2]:55293) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fQ-0001UH-0q for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:44 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.108.16.8]) by mo529.mail-out.ovh.net (Postfix) with ESMTPS id 97B0D563B984; Tue, 1 Sep 2020 14:45:36 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:36 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G003c03a6c99-a9b2-4a87-8cd8-3b8d46a6d1b0, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 16/20] aspeed/sdmc: Allow writes to unprotected registers Date: Tue, 1 Sep 2020 14:45:21 +0200 Message-ID: <20200901124525.220252-17-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: f6dff2bb-3e28-4c35-8827-5f8863af130b X-Ovh-Tracer-Id: 4787326407464618976 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheehfeegjeeitdfffeetjeduveejueefuefgtdefueelueetveeliefhhffgtdelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheptghlgheskhgrohgurdhorhhg Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=178.32.125.2; envelope-from=clg@kaod.org; helo=smtpout1.mo529.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:33 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Joel Stanley , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Joel Stanley A subset of registers are not protected by the lock behaviour, so allow unconditionally writing to those. Signed-off-by: Joel Stanley Message-Id: <20200819100956.2216690-18-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- hw/misc/aspeed_sdmc.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/hw/misc/aspeed_sdmc.c b/hw/misc/aspeed_sdmc.c index ff2809a09965..81c73450ab5d 100644 --- a/hw/misc/aspeed_sdmc.c +++ b/hw/misc/aspeed_sdmc.c @@ -33,15 +33,28 @@ /* Configuration Register */ #define R_CONF (0x04 / 4) =20 +/* Interrupt control/status */ +#define R_ISR (0x50 / 4) + /* Control/Status Register #1 (ast2500) */ #define R_STATUS1 (0x60 / 4) #define PHY_BUSY_STATE BIT(0) #define PHY_PLL_LOCK_STATUS BIT(4) =20 +/* Reserved */ +#define R_MCR6C (0x6c / 4) + #define R_ECC_TEST_CTRL (0x70 / 4) #define ECC_TEST_FINISHED BIT(12) #define ECC_TEST_FAIL BIT(13) =20 +#define R_TEST_START_LEN (0x74 / 4) +#define R_TEST_FAIL_DQ (0x78 / 4) +#define R_TEST_INIT_VAL (0x7c / 4) +#define R_DRAM_SW (0x88 / 4) +#define R_DRAM_TIME (0x8c / 4) +#define R_ECC_ERR_INJECT (0xb4 / 4) + /* * Configuration register Ox4 (for Aspeed AST2400 SOC) * @@ -449,6 +462,20 @@ static uint32_t aspeed_2600_sdmc_compute_conf(AspeedSD= MCState *s, uint32_t data) static void aspeed_2600_sdmc_write(AspeedSDMCState *s, uint32_t reg, uint32_t data) { + /* Unprotected registers */ + switch (reg) { + case R_ISR: + case R_MCR6C: + case R_TEST_START_LEN: + case R_TEST_FAIL_DQ: + case R_TEST_INIT_VAL: + case R_DRAM_SW: + case R_DRAM_TIME: + case R_ECC_ERR_INJECT: + s->regs[reg] =3D data; + return; + } + if (s->regs[R_PROT] =3D=3D PROT_HARDLOCKED) { qemu_log_mask(LOG_GUEST_ERROR, "%s: SDMC is locked until system re= set!\n", __func__); --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598964907; cv=none; d=zohomail.com; s=zohoarc; b=Ohc1ltIPLgsb+V/X9KTtszlSvOdQoC5DkFy2xymQ1kks7XHH2wIRx+Uk0NfYvKt8oyyaO4ckusqbGvthUT1uHgM5EEDdwEiZ3upUB7NtYMiCh91kv8FDLd5ViS0BV57BZdN6IKVYZwMcCYoXeTuuejKYkSITX8ohCbDlDlIjGCM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598964907; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=VjBLCosLg1fGXFf35wHboO0DtU2mBkBy4Y/r4fKEATE=; b=MXbsFEMXr9yrYZm6yxzFdpOI29JNjYI8ZfVjoLXKkmceyKGy7+VU4mY2hmPSt577gc7SAbmujpDkw2C/wtusBeC4sEncmIytCFTCzxVDfM0LK+qT2zE0upLQMH4GCdnqDK4jup1SZbFDgUrp9yG/Dq5X4PCtgYhmW3k8MIeIA24= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598964907930679.2638761173001; Tue, 1 Sep 2020 05:55:07 -0700 (PDT) Received: from localhost ([::1]:46236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5oZ-0006Gh-5W for importer@patchew.org; Tue, 01 Sep 2020 08:55:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fe-00056E-3G for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:54 -0400 Received: from smtpout1.mo529.mail-out.ovh.net ([178.32.125.2]:33667) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fa-0001Uf-Md for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:53 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.109.146.131]) by mo529.mail-out.ovh.net (Postfix) with ESMTPS id 1A006563B99D; Tue, 1 Sep 2020 14:45:39 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:36 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G003b618e4ae-2cdc-4408-9c0a-d1cff65a76d9, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 17/20] aspeed/sdmc: Simplify calculation of RAM bits Date: Tue, 1 Sep 2020 14:45:22 +0200 Message-ID: <20200901124525.220252-18-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: 736c19d0-dcee-434a-9e9d-c63ba3baf843 X-Ovh-Tracer-Id: 4787326407273581536 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheehfeegjeeitdfffeetjeduveejueefuefgtdefueelueetveeliefhhffgtdelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpeelnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheptghlgheskhgrohgurdhorhhg Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=178.32.125.2; envelope-from=clg@kaod.org; helo=smtpout1.mo529.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:33 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Joel Stanley Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Changes in commit 533eb415df2e ("arm/aspeed: actually check RAM size") introduced a 'valid_ram_sizes' array which can be used to compute the associated bit field value encoding the RAM size. The field is simply the index of the array. Reviewed-by: Joel Stanley Message-Id: <20200819100956.2216690-19-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- hw/misc/aspeed_sdmc.c | 79 ++++++++++++++----------------------------- 1 file changed, 25 insertions(+), 54 deletions(-) diff --git a/hw/misc/aspeed_sdmc.c b/hw/misc/aspeed_sdmc.c index 81c73450ab5d..08f856cbda7e 100644 --- a/hw/misc/aspeed_sdmc.c +++ b/hw/misc/aspeed_sdmc.c @@ -159,57 +159,6 @@ static const MemoryRegionOps aspeed_sdmc_ops =3D { .valid.max_access_size =3D 4, }; =20 -static int ast2400_rambits(AspeedSDMCState *s) -{ - switch (s->ram_size >> 20) { - case 64: - return ASPEED_SDMC_DRAM_64MB; - case 128: - return ASPEED_SDMC_DRAM_128MB; - case 256: - return ASPEED_SDMC_DRAM_256MB; - case 512: - return ASPEED_SDMC_DRAM_512MB; - default: - g_assert_not_reached(); - break; - } -} - -static int ast2500_rambits(AspeedSDMCState *s) -{ - switch (s->ram_size >> 20) { - case 128: - return ASPEED_SDMC_AST2500_128MB; - case 256: - return ASPEED_SDMC_AST2500_256MB; - case 512: - return ASPEED_SDMC_AST2500_512MB; - case 1024: - return ASPEED_SDMC_AST2500_1024MB; - default: - g_assert_not_reached(); - break; - } -} - -static int ast2600_rambits(AspeedSDMCState *s) -{ - switch (s->ram_size >> 20) { - case 256: - return ASPEED_SDMC_AST2600_256MB; - case 512: - return ASPEED_SDMC_AST2600_512MB; - case 1024: - return ASPEED_SDMC_AST2600_1024MB; - case 2048: - return ASPEED_SDMC_AST2600_2048MB; - default: - g_assert_not_reached(); - break; - } -} - static void aspeed_sdmc_reset(DeviceState *dev) { AspeedSDMCState *s =3D ASPEED_SDMC(dev); @@ -324,10 +273,32 @@ static const TypeInfo aspeed_sdmc_info =3D { .abstract =3D true, }; =20 +static int aspeed_sdmc_get_ram_bits(AspeedSDMCState *s) +{ + AspeedSDMCClass *asc =3D ASPEED_SDMC_GET_CLASS(s); + int i; + + /* + * The bitfield value encoding the RAM size is the index of the + * possible RAM size array + */ + for (i =3D 0; asc->valid_ram_sizes[i]; i++) { + if (s->ram_size =3D=3D asc->valid_ram_sizes[i]) { + return i; + } + } + + /* + * Invalid RAM sizes should have been excluded when setting the + * SoC RAM size. + */ + g_assert_not_reached(); +} + static uint32_t aspeed_2400_sdmc_compute_conf(AspeedSDMCState *s, uint32_t= data) { uint32_t fixed_conf =3D ASPEED_SDMC_VGA_COMPAT | - ASPEED_SDMC_DRAM_SIZE(ast2400_rambits(s)); + ASPEED_SDMC_DRAM_SIZE(aspeed_sdmc_get_ram_bits(s)); =20 /* Make sure readonly bits are kept */ data &=3D ~ASPEED_SDMC_READONLY_MASK; @@ -385,7 +356,7 @@ static uint32_t aspeed_2500_sdmc_compute_conf(AspeedSDM= CState *s, uint32_t data) uint32_t fixed_conf =3D ASPEED_SDMC_HW_VERSION(1) | ASPEED_SDMC_VGA_APERTURE(ASPEED_SDMC_VGA_64MB) | ASPEED_SDMC_CACHE_INITIAL_DONE | - ASPEED_SDMC_DRAM_SIZE(ast2500_rambits(s)); + ASPEED_SDMC_DRAM_SIZE(aspeed_sdmc_get_ram_bits(s)); =20 /* Make sure readonly bits are kept */ data &=3D ~ASPEED_SDMC_AST2500_READONLY_MASK; @@ -451,7 +422,7 @@ static uint32_t aspeed_2600_sdmc_compute_conf(AspeedSDM= CState *s, uint32_t data) { uint32_t fixed_conf =3D ASPEED_SDMC_HW_VERSION(3) | ASPEED_SDMC_VGA_APERTURE(ASPEED_SDMC_VGA_64MB) | - ASPEED_SDMC_DRAM_SIZE(ast2600_rambits(s)); + ASPEED_SDMC_DRAM_SIZE(aspeed_sdmc_get_ram_bits(s)); =20 /* Make sure readonly bits are kept (use ast2500 mask) */ data &=3D ~ASPEED_SDMC_AST2500_READONLY_MASK; --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598964609; cv=none; d=zohomail.com; s=zohoarc; b=EQznZi/iWCl0/cN6SQOAxpsQqVfFwZHBcAFlAr2A15a1MQJa0Jf/mOlwzlP8+Har79ijS2vTdVgPF2/OsPKEJfF7IJ6Ke4OYBoII/ITHjPzdEk+lC4rbwV5j1LP5A7JoV8+RAAV/caWV3xxew4Ucu6j6FOxc5xeaZX9qnBqdGbo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598964609; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UPcdwSWSBPRpx2GR8pJi9doE24iVFpFMmP3P8jp90tU=; b=eNaQ8IpgfVy7xfPZifTwegbqQH7XnMw3QZWTCp/SmzW0ih1cItqhrlgLLLuRcsr+CYq3jcbalje2ThmMITkTSzzGHwYTMmuW0z9rs9luARbmKyJ1ymWqdQEQk8AAuxWUaHai62JbVacapJBj0G9OkVXEbCw+6ovytJ8pzT990aw= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598964609936580.3238551429368; Tue, 1 Sep 2020 05:50:09 -0700 (PDT) Received: from localhost ([::1]:50068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5jl-0004iG-2r for importer@patchew.org; Tue, 01 Sep 2020 08:50:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fU-0004oQ-T7 for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:44 -0400 Received: from smtpout1.mo529.mail-out.ovh.net ([178.32.125.2]:41615) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fQ-0001UI-0u for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:44 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.108.20.120]) by mo529.mail-out.ovh.net (Postfix) with ESMTPS id 4F090563B98F; Tue, 1 Sep 2020 14:45:37 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:36 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G00355cbe9b0-2869-45ad-9ff4-7794dc6ffac6, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 18/20] aspeed/smc: Open AHB window of the second chip of the AST2600 FMC controller Date: Tue, 1 Sep 2020 14:45:23 +0200 Message-ID: <20200901124525.220252-19-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: c8d9690e-d1bb-480e-a3b6-b7ca4f532d6f X-Ovh-Tracer-Id: 4787607879833390048 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheehfeegjeeitdfffeetjeduveejueefuefgtdefueelueetveeliefhhffgtdelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheptghlgheskhgrohgurdhorhhg Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=178.32.125.2; envelope-from=clg@kaod.org; helo=smtpout1.mo529.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:33 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Joel Stanley Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" This change works around the HW default values to be able to test the Tacoma board with -kernel command line option. This was required when we had both flash chips enabled in the device tree, otherwise Linux would fail to probe the entire controller leaving it with no rootfs. Reviewed-by: Joel Stanley Message-Id: <20200819100956.2216690-20-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- hw/ssi/aspeed_smc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index 8c79a5552f93..795784e5f364 100644 --- a/hw/ssi/aspeed_smc.c +++ b/hw/ssi/aspeed_smc.c @@ -230,7 +230,7 @@ static void aspeed_smc_reg_to_segment(const AspeedSMCSt= ate *s, uint32_t reg, =20 static const AspeedSegments aspeed_segments_ast2600_fmc[] =3D { { 0x0, 128 * MiB }, /* start address is readonly */ - { 0x0, 0 }, /* disabled */ + { 128 * MiB, 128 * MiB }, /* default is disabled but needed for -kerne= l */ { 0x0, 0 }, /* disabled */ }; =20 --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598964825; cv=none; d=zohomail.com; s=zohoarc; b=KoE42meCN2j0oZmFiQm3YiEHOL4fvY9iP++T6H3HNzRcjZ+2gAhV/nDIav4Pc+uJN9VfdI3XBOMpwQBPWHJxNwxg66JO0Fs/LHGDsT7A7YB1t7CvdwAs/qtqSpFRti3ZpmoVGw+526tz5nqh7Cr8VxVPsmbdZ/qsMpPAxDmaX+E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598964825; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=H2pEoHb4mN5Pfit6Vk2MLZ9F/DmyzjSTOulaRjMrc/Y=; b=h8EA+5qL5LxXhd3vSTaKqJp2HEED2toxbWlSj3RizoprpRDBQY1O6ZfyXXECjbaaCTF9g2bT9PWTHt/JzNpuzFxfJR68J4xTj5Nc8lwDC2cE2fSVKsDWAoR57p2wkPOBzc6d1a0Z4f/6BL5exrvjv5tCaxol9HuoEnTnrFvhBr8= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598964825496817.768405692951; Tue, 1 Sep 2020 05:53:45 -0700 (PDT) Received: from localhost ([::1]:38500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5nD-0003BY-Nc for importer@patchew.org; Tue, 01 Sep 2020 08:53:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fX-0004vC-Ck for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:47 -0400 Received: from smtpout1.mo804.mail-out.ovh.net ([79.137.123.220]:59491) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fR-0001Ut-6b for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:46 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.109.146.59]) by mo804.mail-out.ovh.net (Postfix) with ESMTPS id B9C8A5CC5388; Tue, 1 Sep 2020 14:45:37 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:37 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G003f223603c-1975-4c9d-84a0-a570bc32bfdd, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 19/20] arm: aspeed: add strap define `25HZ` of AST2500 Date: Tue, 1 Sep 2020 14:45:24 +0200 Message-ID: <20200901124525.220252-20-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: 20935444-2da4-4470-bbbd-6a3a2737a2b7 X-Ovh-Tracer-Id: 4787607879411731424 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheehfeegjeeitdfffeetjeduveejueefuefgtdefueelueetveeliefhhffgtdelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpeehnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheptghlgheskhgrohgurdhorhhg Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=79.137.123.220; envelope-from=clg@kaod.org; helo=smtpout1.mo804.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:31 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Igor Kononenko , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Igor Kononenko Provide a definition for the "25Hz reference clock input mode" strap Signed-off-by: Igor Kononenko Reviewed-by: C=C3=A9dric Le Goater Message-Id: <20200811203502.20382-1-i.kononenko@yadro.com> Message-Id: <20200819100956.2216690-21-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- include/hw/misc/aspeed_scu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/misc/aspeed_scu.h b/include/hw/misc/aspeed_scu.h index a6739bb846b6..9cd530afa23a 100644 --- a/include/hw/misc/aspeed_scu.h +++ b/include/hw/misc/aspeed_scu.h @@ -286,6 +286,7 @@ uint32_t aspeed_scu_get_apb_freq(AspeedSCUState *s); #define SCU_AST2500_HW_STRAP_ESPI_FLASH_ENABLE (0x1 << 26) #define SCU_AST2500_HW_STRAP_ESPI_ENABLE (0x1 << 25) #define SCU_AST2500_HW_STRAP_DDR4_ENABLE (0x1 << 24) +#define SCU_AST2500_HW_STRAP_25HZ_CLOCK_MODE (0x1 << 23) =20 #define SCU_AST2500_HW_STRAP_ACPI_ENABLE (0x1 << 19) #define SCU_AST2500_HW_STRAP_USBCKI_FREQ (0x1 << 18) --=20 2.25.4 From nobody Mon Feb 9 11:07:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1598965017; cv=none; d=zohomail.com; s=zohoarc; b=XQUy6trLsKHc+TKejN1W7NCCYkVf4EPyoPdH42AqKjjO91F7XvyVjiaKWR+Ozo8bxXctOb1I9ELsr9TVImNE3tmKZVSu1M5vtQ2mpxf1ppIu3YY9+xPs91RsoPosJL1s5idaDI8KY7/3QkLH9HgoNpf3XSxGg1YAI86Am/jqzC8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598965017; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ViBm0EGADiVejDCinPafkxKr/K6j2z75CjeIMCe7fl4=; b=V7nXcbhlAaNA9PQJ+aQg+T8l5Kx/6LyHPx6xQ4biaEsZgpTl8ilsLsIJ/5bFU0AsW2KcIAPb3R3pgzemR3iPLkTUK76huVVY6ETUpRdEI53vLiD7K9pZzR88mJMJBeTE5W8un4ICRqT9GxFN4+OLnXJJn/R2oQJBt3lXOeiUPVY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598965017825189.84426742443281; Tue, 1 Sep 2020 05:56:57 -0700 (PDT) Received: from localhost ([::1]:52972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD5qK-0000gp-7T for importer@patchew.org; Tue, 01 Sep 2020 08:56:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33764) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fV-0004qc-Pr for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:45 -0400 Received: from smtpout1.mo529.mail-out.ovh.net ([178.32.125.2]:48985) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD5fQ-0001UT-9x for qemu-devel@nongnu.org; Tue, 01 Sep 2020 08:45:45 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.109.146.239]) by mo529.mail-out.ovh.net (Postfix) with ESMTPS id 02811563B994; Tue, 1 Sep 2020 14:45:38 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 1 Sep 2020 14:45:37 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G003eea385af-0c0b-456e-9639-be16ba038e50, 38EE1E9FF4E34D4C85F4190D418CEE501B878519) smtp.auth=clg@kaod.org From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Subject: [PULL 20/20] hw: add a number of SPI-flash's of m25p80 family Date: Tue, 1 Sep 2020 14:45:25 +0200 Message-ID: <20200901124525.220252-21-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200901124525.220252-1-clg@kaod.org> References: <20200901124525.220252-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG7EX1.mxp5.local (172.16.2.61) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: f2d657bf-3924-4989-9346-bd6a8627bace X-Ovh-Tracer-Id: 4787607881630976992 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfhisehtkeertdertdejnecuhfhrohhmpeevrogurhhitgcunfgvucfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepheehfeegjeeitdfffeetjeduveejueefuefgtdefueelueetveeliefhhffgtdelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpeelnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheptghlgheskhgrohgurdhorhhg Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=178.32.125.2; envelope-from=clg@kaod.org; helo=smtpout1.mo529.mail-out.ovh.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 08:45:33 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Igor Kononenko , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Igor Kononenko Support a following SPI flashes: * mx66l51235f * mt25ql512ab Signed-off-by: Igor Kononenko Reviewed-by: C=C3=A9dric Le Goater Message-Id: <20200811203724.20699-1-i.kononenko@yadro.com> Message-Id: <20200819100956.2216690-22-clg@kaod.org> Signed-off-by: C=C3=A9dric Le Goater --- hw/block/m25p80.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 62ba6aaf01cf..15824450cd10 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -219,6 +219,7 @@ static const FlashPartInfo known_devices[] =3D { { INFO("mx25l12855e", 0xc22618, 0, 64 << 10, 256, 0) }, { INFO6("mx25l25635e", 0xc22019, 0xc22019, 64 << 10, 512, 0) }, { INFO("mx25l25655e", 0xc22619, 0, 64 << 10, 512, 0) }, + { INFO("mx66l51235f", 0xc2201a, 0, 64 << 10, 1024, ER_4K | ER_32= K) }, { INFO("mx66u51235f", 0xc2253a, 0, 64 << 10, 1024, ER_4K | ER_32= K) }, { INFO("mx66u1g45g", 0xc2253b, 0, 64 << 10, 2048, ER_4K | ER_32= K) }, { INFO("mx66l1g45g", 0xc2201b, 0, 64 << 10, 2048, ER_4K | ER_32= K) }, @@ -238,6 +239,7 @@ static const FlashPartInfo known_devices[] =3D { { INFO("n25q256a", 0x20ba19, 0, 64 << 10, 512, ER_4K) }, { INFO("n25q512a", 0x20ba20, 0, 64 << 10, 1024, ER_4K) }, { INFO("n25q512ax3", 0x20ba20, 0x1000, 64 << 10, 1024, ER_4K) }, + { INFO("mt25ql512ab", 0x20ba20, 0x1044, 64 << 10, 1024, ER_4K | ER_32K= ) }, { INFO_STACKED("n25q00", 0x20ba21, 0x1000, 64 << 10, 2048, ER_4K, 4= ) }, { INFO_STACKED("n25q00a", 0x20bb21, 0x1000, 64 << 10, 2048, ER_4K, 4= ) }, { INFO_STACKED("mt25ql01g", 0x20ba21, 0x1040, 64 << 10, 2048, ER_4K, 2= ) }, --=20 2.25.4