From patchwork Thu Dec 24 03:17:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 1420370 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flygoat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.a=rsa-sha256 header.s=fm1 header.b=yeqKWEcD; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=HpDNXtym; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D1b085536z9sWk for ; Thu, 24 Dec 2020 14:19:19 +1100 (AEDT) Received: from localhost ([::1]:40406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksH9n-00019U-BK for incoming@patchwork.ozlabs.org; Wed, 23 Dec 2020 22:19:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksH8s-00019D-6I for qemu-devel@nongnu.org; Wed, 23 Dec 2020 22:18:18 -0500 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:47053) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksH8q-0003YQ-HE for qemu-devel@nongnu.org; Wed, 23 Dec 2020 22:18:17 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id C2B96580372; Wed, 23 Dec 2020 22:18:15 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 23 Dec 2020 22:18:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm1; bh= DHvt6MI2JLWRt1yuHru/PbKgRfOr7OvUo2XE4nbTxoI=; b=yeqKWEcDjKtzLoHM SO+X2mOFFPMOzGRb/KPzdVjx9JZA6I5D0+rtaGMTJS2C2OaEZlFKLCT1HD1Eq7AF aKhw40RsrRdD9SanQbX8Xgrr1YeILEVyhJ4Q9pxBbb7xX8lCHVMCUCAaef0O4/WH apT3FhuhRoE/sJVBM1B0jrBlfkpa7KZLZKh/53t4bVm6+OXBbWmL26+Pq1VEiSzd gMJjOYGFqLBUEWArJnS4NWjuvX1XbwwE1do6V8FIvKxP8exzH1S3TcIprR7E4SsI pYlcVba7KZnUiHkm4IdddkZ3NBZKSt0oX/4vFYuqwxlYQWXT3Ir6kDUex+AXMwck BLQVNg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=DHvt6MI2JLWRt1yuHru/PbKgRfOr7OvUo2XE4nbTx oI=; b=HpDNXtymGAUVOk6FkzFwK8j+SGtmkVngoS4fMadKL71x6biVWRIE0wBpl IV0UK2OkdJGcOrV9xjUVLZAq5agGpaTDI+DLYacYUPF2S9UvyQR2hrOVE03F6K3z iV27gDcOcbBcQE/uG125+6IJBaDjPKnS1WeSmxeE0eary3x8TkufwbrI57hJMYy0 qMciMLM7tY8DALmh5iDELGNm3CRBKNQYZ11zYTdLHcWAXxT57IqCckByeifJmQe/ XU7qsXMg68cZBqcrgpF7fnojPMVlNyKkBWBfOiSWWE4AfGg3iMpc/jb6PN3ORCf2 0ozzdZ5qsidOHe3GQQZTaVZTShKeA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtkedgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfgggtgfesthekredtredtjeenucfhrhhomheplfhirgig uhhnucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhmqeenuc ggtffrrghtthgvrhhnpeehuddvtedtleehhefggeevteekkefhjedvjedtgfeugfekjedt vdevueejveekleenucfkphepvddvfedruddtgedrvdduvddrheelnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhirgiguhhnrdihrghnghes fhhlhihgohgrthdrtghomh X-ME-Proxy: Received: from localhost.localdomain (unknown [223.104.212.59]) by mail.messagingengine.com (Postfix) with ESMTPA id 366D31080063; Wed, 23 Dec 2020 22:18:10 -0500 (EST) From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH v3 1/8] hw/mips/fuloong2e: Remove define DEBUG_FULOONG2E_INIT Date: Thu, 24 Dec 2020 11:17:43 +0800 Message-Id: <20201224031750.52146-2-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201224031750.52146-1-jiaxun.yang@flygoat.com> References: <20201224031750.52146-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Received-SPF: permerror client-ip=66.111.4.229; envelope-from=jiaxun.yang@flygoat.com; helo=new3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, T_SPF_PERMERROR=0.01 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: Aleksandar Rikalo , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Cleber Rosa , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Seems useless.... Fixes: 051c190bce5 ("MIPS: Initial support of fulong mini pc (machine construction)") Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Huacai Chen --- hw/mips/fuloong2e.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index 9b0eb8a314..055b99e378 100644 --- a/hw/mips/fuloong2e.c +++ b/hw/mips/fuloong2e.c @@ -48,8 +48,6 @@ #include "sysemu/reset.h" #include "qemu/error-report.h" -#define DEBUG_FULOONG2E_INIT - #define ENVP_PADDR 0x2000 #define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR) #define ENVP_NB_ENTRIES 16 From patchwork Thu Dec 24 03:17:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 1420372 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flygoat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.a=rsa-sha256 header.s=fm1 header.b=gkwKDdKR; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=rYiTnJ9O; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D1b0F03h7z9sWb for ; Thu, 24 Dec 2020 14:19:24 +1100 (AEDT) Received: from localhost ([::1]:40740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksH9u-0001IT-UT for incoming@patchwork.ozlabs.org; Wed, 23 Dec 2020 22:19:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksH8y-0001Ff-8W for qemu-devel@nongnu.org; Wed, 23 Dec 2020 22:18:24 -0500 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:37673) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksH8w-0003aX-Ay for qemu-devel@nongnu.org; Wed, 23 Dec 2020 22:18:23 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id A100C580376; Wed, 23 Dec 2020 22:18:21 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 23 Dec 2020 22:18:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm1; bh= MffFNI7TRJHwRaMmr5C4c4PVgLMilFhSzqJIYp8Weww=; b=gkwKDdKRvpIU9Sxo fTXO/l/0SzkuErvDDZylpkN/ot8YrapMBHSC9LB7RIfQ+rT7+i66ZuB6binG0ksp Flnmb899+7tW8InOvJB0hsx4665ezxpj4OaX6dkLQFzmyVZcmxuF/8d5MPlruTTk K9RfN7e1HCBz+kCNkvr4dBCYYmejangiobC5Uj7GLQuI4M4aW9I/2BLHUl66h4fG NSAzR2skv1HCAE9wcgwPKLZUZb8g1Jyk+OCif5gDP0t+FEFEMzC0EOmgL4K31mPS 7PO0pgjKAR2fqOFBxCMWmI9t54Y3EAT7AiesE9arkh60gaBE/utAKgAdAcgqTMXE G5ypvA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=MffFNI7TRJHwRaMmr5C4c4PVgLMilFhSzqJIYp8We ww=; b=rYiTnJ9Oge6TYLNuSUBbPJOs+aTLDxZYDUPcZpCYWgn+hPF2pGcF29h5B OizdqO8x25PTQ6SvdlkFFfeUB/YgzlJ/IkB+wUoPAcpE68F9ZU9LFEEiKnF6AQ1L LVnNQXTU7JiIRJlVsIvR/8bt66qELkI+H6okAoyyMfWtRUGO5Xh0F1QfO1GwcPcM 53RfxMPa6Ut2uYLcfIyzCakFXeG4qPnbvqcg8CHBM4ztSO8h2m6gGtLy2DuiA0rY U8ALUPy2+hyHKD9H2+HgiqKNOZrq8i0IvObGfooI5glBUXxiv+t00hv3tK3wh7Lc Sql2wLhZ83B5dJjYrMp7fUgEOzwNg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtkedgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfgggtgfesthekredtredtjeenucfhrhhomheplfhirgig uhhnucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhmqeenuc ggtffrrghtthgvrhhnpeelteegfedvgeegtdffudejleeikefhgfelkedugfejledvveet tedugeelveffheenucffohhmrghinheplhhinhhugidqmhhiphhsrdhorhhgpdhlohhonh hgshhonhguvghvvghlohhpvghrrdgtohhmpdhgihhthhhusgdrtghomhdplhhoohhnghhs ohhnrdgtnhdplhgvmhhothgvrdgtohhmnecukfhppedvvdefrddutdegrddvuddvrdehle enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjihgr gihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Received: from localhost.localdomain (unknown [223.104.212.59]) by mail.messagingengine.com (Postfix) with ESMTPA id 1A59C108005F; Wed, 23 Dec 2020 22:18:15 -0500 (EST) From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH v3 2/8] hw/mips/fuloong2e: Relpace fault links Date: Thu, 24 Dec 2020 11:17:44 +0800 Message-Id: <20201224031750.52146-3-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201224031750.52146-1-jiaxun.yang@flygoat.com> References: <20201224031750.52146-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Received-SPF: permerror client-ip=66.111.4.229; envelope-from=jiaxun.yang@flygoat.com; helo=new3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, T_SPF_PERMERROR=0.01 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: Aleksandar Rikalo , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Cleber Rosa , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Websites are downing, but GitHub may last forever. Loongson even doesn't recogonize 2E as their products nowadays.. Signed-off-by: Jiaxun Yang Reviewed-by: Huacai Chen Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- hw/mips/fuloong2e.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index 055b99e378..d846ef7b00 100644 --- a/hw/mips/fuloong2e.c +++ b/hw/mips/fuloong2e.c @@ -14,8 +14,8 @@ * Fuloong 2e mini pc is based on ICT/ST Loongson 2e CPU (MIPS III like, 800MHz) * https://www.linux-mips.org/wiki/Fuloong_2E * - * Loongson 2e user manual: - * http://www.loongsondeveloper.com/doc/Loongson2EUserGuide.pdf + * Loongson 2e manuals: + * https://github.com/loongson-community/docs/tree/master/2E */ #include "qemu/osdep.h" @@ -61,14 +61,7 @@ * PMON is not part of qemu and released with BSD license, anyone * who want to build a pmon binary please first git-clone the source * from the git repository at: - * http://www.loongson.cn/support/git/pmon - * Then follow the "Compile Guide" available at: - * http://dev.lemote.com/code/pmon - * - * Notes: - * 1, don't use the source at http://dev.lemote.com/http_git/pmon.git - * 2, use "Bonito2edev" to replace "dir_corresponding_to_your_target_hardware" - * in the "Compile Guide". + * https://github.com/loongson-community/pmon */ #define FULOONG_BIOSNAME "pmon_2e.bin" From patchwork Thu Dec 24 03:17:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 1420376 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flygoat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.a=rsa-sha256 header.s=fm1 header.b=DpjNeHS5; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=piE6eIbA; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D1b3j1nyFz9sVk for ; Thu, 24 Dec 2020 14:22:25 +1100 (AEDT) Received: from localhost ([::1]:49148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksHCo-0004rj-2b for incoming@patchwork.ozlabs.org; Wed, 23 Dec 2020 22:22:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksH91-0001M6-K4 for qemu-devel@nongnu.org; Wed, 23 Dec 2020 22:18:27 -0500 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:54799) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksH90-0003bm-1i for qemu-devel@nongnu.org; Wed, 23 Dec 2020 22:18:27 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 9A47F580378; Wed, 23 Dec 2020 22:18:25 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 23 Dec 2020 22:18:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=lwQBPSZsDvt18 JuHo+yXJWbMqTcbBHyGLTFqhtMJHBg=; b=DpjNeHS5OG+tLSuKs7vwW2teHCwQr cYP63oIdlmHZVa8N3kEXMiChHAanfnIDbTUQry3tiU6aZzo39fG+OHdjQ8kqK9dF rgJ/gPizQ7w0x0xr7noAcBD/mynb8cTDYXPwTDYWY9LI7ACQ5x5tEvY3uvpUcn9s az2wns/SpYRwHbgvqcTsq+EFlsz2x6skL0gk2b5PDcBYLkDh/ept7V3BzZQI7EYw K3jsGa2A/LY1y8l2Li5bj7lbeDSJ713liSk4TlDwoikumb18r7tOCOqa6uYiFOe0 aQOk3LsetcMeE8EwG+XMB6NpWvAKZH28wNnyeXWi6My58OUuQ/v1IrsTA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=lwQBPSZsDvt18JuHo+yXJWbMqTcbBHyGLTFqhtMJHBg=; b=piE6eIbA ceMjIm5xEL2dnEQfH3kkY4OOfIDHjV902HjdDJOK1UA9XLCPOgVXCt1Q4MJudrhZ r3vU1fin0V2NdNHn+DeKUPso95UDZB8QxsRXPSgDeQLHldK64GQI3zuEyOXYdREU GO/o2EfI1xUMffQK8ZJOqpiA2A6ah3q+ynPi036a8D8wb6AVz8itIXdOddEmpj5L nrI8A1zHuW/yFydUBcAEG/qpxVtFNAgN802xTR4uSM9/nhU4DZFNTL/XT/84Aw4D XS5EnggJQst+rV3wRSrCsU/4xJTF5oi/BIjOAy146bZ/RMbXt+mc7NL4sEHpGCBP /t2NPoL0d02NIQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtkedgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflihgrgihu nhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqnecugg ftrfgrthhtvghrnhepjeeihffgteelkeelffdukedtheevudejvdegkeekjeefhffhhfet udetgfdtffeunecukfhppedvvdefrddutdegrddvuddvrdehleenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehf lhihghhorghtrdgtohhm X-ME-Proxy: Received: from localhost.localdomain (unknown [223.104.212.59]) by mail.messagingengine.com (Postfix) with ESMTPA id 0F5DA1080063; Wed, 23 Dec 2020 22:18:20 -0500 (EST) From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH v3 3/8] hw/pci-host/bonito: Fixup IRQ mapping Date: Thu, 24 Dec 2020 11:17:45 +0800 Message-Id: <20201224031750.52146-4-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201224031750.52146-1-jiaxun.yang@flygoat.com> References: <20201224031750.52146-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Received-SPF: permerror client-ip=66.111.4.229; envelope-from=jiaxun.yang@flygoat.com; helo=new3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, T_SPF_PERMERROR=0.01 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: Aleksandar Rikalo , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Cleber Rosa , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Accroading to arch/mips/pci/fixup-fuloong2e.c in kernel, despites south bridge IRQs needs special care, all other IRQ pins are mapped by 'LOONGSON_IRQ_BASE + 25 + pin'. As south bridge IRQs are all handled by ISA bus, we can make a simple direct mapping. Signed-off-by: Jiaxun Yang --- v3: Define BONITO_PCI_IRQ_BASE for readability (f4bug) --- hw/pci-host/bonito.c | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index a99eced065..3fad470fc6 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -62,6 +62,9 @@ #define DPRINTF(fmt, ...) #endif +/* PCI slots IRQ pins start position */ +#define BONITO_PCI_IRQ_BASE 25 + /* from linux soure code. include/asm-mips/mips-boards/bonito64.h*/ #define BONITO_BOOT_BASE 0x1fc00000 #define BONITO_BOOT_SIZE 0x00100000 @@ -546,19 +549,16 @@ static const MemoryRegionOps bonito_spciconf_ops = { .endianness = DEVICE_NATIVE_ENDIAN, }; -#define BONITO_IRQ_BASE 32 - static void pci_bonito_set_irq(void *opaque, int irq_num, int level) { BonitoState *s = opaque; qemu_irq *pic = s->pic; PCIBonitoState *bonito_state = s->pci_dev; - int internal_irq = irq_num - BONITO_IRQ_BASE; - if (bonito_state->regs[BONITO_INTEDGE] & (1 << internal_irq)) { + if (bonito_state->regs[BONITO_INTEDGE] & (1 << irq_num)) { qemu_irq_pulse(*pic); } else { /* level triggered */ - if (bonito_state->regs[BONITO_INTPOL] & (1 << internal_irq)) { + if (bonito_state->regs[BONITO_INTPOL] & (1 << irq_num)) { qemu_irq_raise(*pic); } else { qemu_irq_lower(*pic); @@ -566,25 +566,9 @@ static void pci_bonito_set_irq(void *opaque, int irq_num, int level) } } -/* map the original irq (0~3) to bonito irq (16~47, but 16~31 are unused) */ -static int pci_bonito_map_irq(PCIDevice *pci_dev, int irq_num) +static int pci_bonito_map_irq(PCIDevice *pci_dev, int pin) { - int slot; - - slot = (pci_dev->devfn >> 3); - - switch (slot) { - case 5: /* FULOONG2E_VIA_SLOT, SouthBridge, IDE, USB, ACPI, AC97, MC97 */ - return irq_num % 4 + BONITO_IRQ_BASE; - case 6: /* FULOONG2E_ATI_SLOT, VGA */ - return 4 + BONITO_IRQ_BASE; - case 7: /* FULOONG2E_RTL_SLOT, RTL8139 */ - return 5 + BONITO_IRQ_BASE; - case 8 ... 12: /* PCI slot 1 to 4 */ - return (slot - 8 + irq_num) + 6 + BONITO_IRQ_BASE; - default: /* Unknown device, don't do any translation */ - return irq_num; - } + return BONITO_PCI_IRQ_BASE + pin; } static void bonito_reset(void *opaque) From patchwork Thu Dec 24 03:17:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 1420378 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flygoat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.a=rsa-sha256 header.s=fm1 header.b=ylu/DWTp; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=RWdPskv7; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D1b7W6K4Mz9sVk for ; Thu, 24 Dec 2020 14:25:43 +1100 (AEDT) Received: from localhost ([::1]:57076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksHFz-0008Cd-SP for incoming@patchwork.ozlabs.org; Wed, 23 Dec 2020 22:25:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksH96-0001WY-Kd for qemu-devel@nongnu.org; Wed, 23 Dec 2020 22:18:32 -0500 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:56103) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksH94-0003db-Vf for qemu-devel@nongnu.org; Wed, 23 Dec 2020 22:18:32 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 8089558037A; Wed, 23 Dec 2020 22:18:30 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 23 Dec 2020 22:18:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=qqFEscVG+bgxX D41y6VOa/Ihx+II+1KvEVbjUp3LV4E=; b=ylu/DWTp1xNp8FEwUWyCo6Ag2LX2z qXKoZhr7gXhjvA66heXHis2Q6nIuotB5cHWXWSjKCaCLhtWnMUgk/yfsxNT5+zE0 DD2w7dE97/ntI0QL40p/4zyU7A8royJ/R8RlBg5yCei9jUpVHpH6rIEwCC9dtF2J C8xs23qMGhprqHdPXKx1C/jZafPNu63zyWP/sEaj3dYE+KKKHV1di+u4MxNuXX1+ 8JX7FpkEVj71+24KLe/GEk2K2d/h8WX3TEk6npw/FMehGUKzfkoU7p3QL7PYhc7R GOHOK37hdue9aENyBlfuyD6O+Q8Oh72iAyjNBiCo3AjCqmupmnwyigiEA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=qqFEscVG+bgxXD41y6VOa/Ihx+II+1KvEVbjUp3LV4E=; b=RWdPskv7 lnWghvYbek9srSlqwdmSXXtO22LGnrMLONSfwZ//o4dOEdQ4KMAt2kGSakOQcr87 78nGaarnjgKqXuQDrjPL6seF8OtU/nj0a9ziDWgcdH8WCypcrvxMvQ6BPgOgyPCa MACKiIrSVhYeyN39KzwQCXiRONAL9XMw5IkKGVOsX8D3gFBVfm2p58wmEoXdvP8I E7QqgrLltyvijnV2ONFoMThKShBe458HKnBvU+35zo8B/+cdyicb7jvMcH8kmQso 4uBRzAnyiRtF9n0bHvAS1egACSLpNpbGv/pLyC48S/xy/HAALSH+qLs05y2cdHfA FflPZCzdUt/dFw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtkedgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflihgrgihu nhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqnecugg ftrfgrthhtvghrnhepjeeihffgteelkeelffdukedtheevudejvdegkeekjeefhffhhfet udetgfdtffeunecukfhppedvvdefrddutdegrddvuddvrdehleenucevlhhushhtvghruf hiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehf lhihghhorghtrdgtohhm X-ME-Proxy: Received: from localhost.localdomain (unknown [223.104.212.59]) by mail.messagingengine.com (Postfix) with ESMTPA id 0E1E51080057; Wed, 23 Dec 2020 22:18:25 -0500 (EST) From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH v3 4/8] hw/pci-host/bonito: Fixup pci.lomem mapping Date: Thu, 24 Dec 2020 11:17:46 +0800 Message-Id: <20201224031750.52146-5-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201224031750.52146-1-jiaxun.yang@flygoat.com> References: <20201224031750.52146-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Received-SPF: permerror client-ip=66.111.4.229; envelope-from=jiaxun.yang@flygoat.com; helo=new3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, T_SPF_PERMERROR=0.01 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: Aleksandar Rikalo , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Cleber Rosa , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The original mapping had wrong base address. Signed-off-by: Jiaxun Yang --- hw/pci-host/bonito.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 3fad470fc6..737ee131e1 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -85,9 +85,8 @@ #define BONITO_PCILO_BASE_VA 0xb0000000 #define BONITO_PCILO_SIZE 0x0c000000 #define BONITO_PCILO_TOP (BONITO_PCILO_BASE + BONITO_PCILO_SIZE - 1) -#define BONITO_PCILO0_BASE 0x10000000 -#define BONITO_PCILO1_BASE 0x14000000 -#define BONITO_PCILO2_BASE 0x18000000 +#define BONITO_PCILOx_BASE(x) (BONITO_PCILO_BASE + BONITO_PCILOx_SIZE * x) +#define BONITO_PCILOx_SIZE 0x04000000 #define BONITO_PCIHI_BASE 0x20000000 #define BONITO_PCIHI_SIZE 0x60000000 #define BONITO_PCIHI_TOP (BONITO_PCIHI_BASE + BONITO_PCIHI_SIZE - 1) @@ -610,7 +609,7 @@ static void bonito_pcihost_realize(DeviceState *dev, Error **errp) { PCIHostState *phb = PCI_HOST_BRIDGE(dev); BonitoState *bs = BONITO_PCI_HOST_BRIDGE(dev); - MemoryRegion *pcimem_lo_alias = g_new(MemoryRegion, 3); + MemoryRegion *pcimem_lo_alias = g_new(MemoryRegion, 1); memory_region_init(&bs->pci_mem, OBJECT(dev), "pci.mem", BONITO_PCIHI_SIZE); phb->bus = pci_register_root_bus(dev, "pci", @@ -622,9 +621,10 @@ static void bonito_pcihost_realize(DeviceState *dev, Error **errp) char *name = g_strdup_printf("pci.lomem%zu", i); memory_region_init_alias(&pcimem_lo_alias[i], NULL, name, - &bs->pci_mem, i * 64 * MiB, 64 * MiB); + &bs->pci_mem, BONITO_PCILOx_BASE(i), + BONITO_PCILOx_SIZE); memory_region_add_subregion(get_system_memory(), - BONITO_PCILO_BASE + i * 64 * MiB, + BONITO_PCILOx_BASE(i), &pcimem_lo_alias[i]); g_free(name); } From patchwork Thu Dec 24 03:17:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 1420374 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flygoat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.a=rsa-sha256 header.s=fm1 header.b=X1yafc7o; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=NbYuGM5z; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D1b374d3pz9sVk for ; Thu, 24 Dec 2020 14:21:55 +1100 (AEDT) Received: from localhost ([::1]:48414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksHCL-0004ZG-Gr for incoming@patchwork.ozlabs.org; Wed, 23 Dec 2020 22:21:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksH9B-0001h3-PJ for qemu-devel@nongnu.org; Wed, 23 Dec 2020 22:18:37 -0500 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:45063) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksH99-0003ez-P4 for qemu-devel@nongnu.org; Wed, 23 Dec 2020 22:18:37 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 3A37958037C; Wed, 23 Dec 2020 22:18:35 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 23 Dec 2020 22:18:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=FU4aJSFS5rFt3 bqnOeKFgnYE4Dzduj1nMiub1KL2uww=; b=X1yafc7oTjHA2jsY7Oz4xni54/NhD tBLrlnFkFILmNOjLUtREcZ/OLPLaTgxNeqw44LEC+ScO99Xqo0TRnGiWZxPtcshX YLTLA8XDQpYeQuEYy/+n+R8zQbmsujCtApugErXeHucfecj2DTWawGrg+Ser1zA5 +u5c/rPgySKWO83k/BfmnDbDDSsSGXqXpjQHk4wWrWEbL1ke5JYbQPuQuo6Z1RyP DoGTmLsifUjNfdKAmjCh4ipnoWU/njt0p8tfmuFVwd8dHOVByEjD5G2wfAaiGWwj gE3FOiYsV439P0CgnCSg49p38xX60f03xwvMqP29d10Z7kxIx95jsPnyQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=FU4aJSFS5rFt3bqnOeKFgnYE4Dzduj1nMiub1KL2uww=; b=NbYuGM5z T2pXNqmn6l/VDECQeHHrRT/TZR25A0mwe/RhOHzLyCRp3QWrOadF2ISfvp0qB5uM 3p7W7ZJmLnOsqxDH21foLr/hBfpR+VW3jpu/vApVthGlKXM6FmsafgcKHrlPfyGS ojTpG1VxKcAXtqCn/HcfJmHLBAKdAGmT41h0EwN6fudFtZdvP3FzrkO6uGHda4jY Nj1gyTctzejxEE2MG9c14WtB8TV8pN1TosSz2mazsNilNouNbxGXM5EwgUwJCsC6 WhvzNPhC9oV8VBywxknh7mtpgN0sa2ligaDkpslYle3JNRO1zDNq/0Y5lQ2c79/i 8fNlF9LF1ZxgrQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtkedgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflihgrgihu nhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqnecugg ftrfgrthhtvghrnhepjeeihffgteelkeelffdukedtheevudejvdegkeekjeefhffhhfet udetgfdtffeunecukfhppedvvdefrddutdegrddvuddvrdehleenucevlhhushhtvghruf hiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehf lhihghhorghtrdgtohhm X-ME-Proxy: Received: from localhost.localdomain (unknown [223.104.212.59]) by mail.messagingengine.com (Postfix) with ESMTPA id F00C0108005F; Wed, 23 Dec 2020 22:18:30 -0500 (EST) From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH v3 5/8] hw/mips/fuloong2e: Remove unused env entry Date: Thu, 24 Dec 2020 11:17:47 +0800 Message-Id: <20201224031750.52146-6-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201224031750.52146-1-jiaxun.yang@flygoat.com> References: <20201224031750.52146-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Received-SPF: permerror client-ip=66.111.4.229; envelope-from=jiaxun.yang@flygoat.com; helo=new3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, T_SPF_PERMERROR=0.01 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: Aleksandar Rikalo , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Cleber Rosa , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" modetty is not handled by kernel and the parameter here seems unreasonable. Signed-off-by: Jiaxun Yang --- v3: Bring busclock back --- hw/mips/fuloong2e.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index d846ef7b00..c4843dd15e 100644 --- a/hw/mips/fuloong2e.c +++ b/hw/mips/fuloong2e.c @@ -159,10 +159,8 @@ static uint64_t load_kernel(CPUMIPSState *env) } /* Setup minimum environment variables */ - prom_set(prom_buf, index++, "busclock=33000000"); prom_set(prom_buf, index++, "cpuclock=100000000"); prom_set(prom_buf, index++, "memsize=%"PRIi64, loaderparams.ram_size / MiB); - prom_set(prom_buf, index++, "modetty0=38400n8r"); prom_set(prom_buf, index++, NULL); rom_add_blob_fixed("prom", prom_buf, prom_size, ENVP_PADDR); From patchwork Thu Dec 24 03:17:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 1420373 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flygoat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.a=rsa-sha256 header.s=fm1 header.b=vBOSIKNr; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=N5axCj8m; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D1b2603SFz9sWb for ; Thu, 24 Dec 2020 14:21:01 +1100 (AEDT) Received: from localhost ([::1]:43956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksHBT-0002dQ-Kx for incoming@patchwork.ozlabs.org; Wed, 23 Dec 2020 22:20:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksH9I-0001js-P4 for qemu-devel@nongnu.org; Wed, 23 Dec 2020 22:18:45 -0500 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:42719) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksH9F-0003gu-50 for qemu-devel@nongnu.org; Wed, 23 Dec 2020 22:18:44 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 74C0158037F; Wed, 23 Dec 2020 22:18:40 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 23 Dec 2020 22:18:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm1; bh= gRq/lWzmDb1ZoTgIPUIUxeQUs3mr1jtWNyEoDlXS4o8=; b=vBOSIKNr3Tmc2gVh 4SCdfyCZit4umfhebTnO4hmUbpUcL7p3awWbrVDwrlbaN8z68vPLYxxoLzLd/mRA Vbn2Tc/yGJyf1T4t6cZUIICSoi+5a/vRLnz2Sl6tXs7bc4pf7N24CoB2f8kbSsZb 6QAwB1vMl0ZCRAYNEAyUM7gHAKKUgd0OsFB5mlEcESZPiiHJWa5QWit3OyJ7L93y siXo3Yysc87BnRh1rFvms+HkOm51Jfi4mi3B9Uuaazap7P/zgiuxi4wXg7DZBgjW gVnd8lvPZgpeE3aPZQN9/IdRZ/RxNv0edJXUFclNGEH/Stlz8kgDDk88kIevXzAZ FPSejg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=gRq/lWzmDb1ZoTgIPUIUxeQUs3mr1jtWNyEoDlXS4 o8=; b=N5axCj8mkRfn0rbTwzOV/CXtSJlBkzAwd2aPGNiA6qKIpr3msI3un+MDY kKGOcvi5DrXvZwXmokvis6HnWnQzhWdGZr4yup6ceBMAybs5e87ukBspFjoj7D0J iLoPP7+s0r85U8VOjNg6dIcLEz//1Gj5mUF6Oiovmr/2kOigS9pqdo49Ma6Pjw36 jP5kdm1w8mEtI1Mkyin6CjaJ2nJ5LrvyzXt2mqbMsnqYSs/1v9n03fzHzmU+kwOx 4MIX0A7yfmJBensr+kMgTG90uaKN3nmspC67xxXsGOx4mVyujiVU2Zlb99ezKoaf 9/Cz8w+RkwDJLdlwsrRV82975UznQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtkedgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfgggtgfesthekredtredtjeenucfhrhhomheplfhirgig uhhnucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhmqeenuc ggtffrrghtthgvrhhnpeehuddvtedtleehhefggeevteekkefhjedvjedtgfeugfekjedt vdevueejveekleenucfkphepvddvfedruddtgedrvdduvddrheelnecuvehluhhsthgvrh fuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomhepjhhirgiguhhnrdihrghnghes fhhlhihgohgrthdrtghomh X-ME-Proxy: Received: from localhost.localdomain (unknown [223.104.212.59]) by mail.messagingengine.com (Postfix) with ESMTPA id BA4031080059; Wed, 23 Dec 2020 22:18:35 -0500 (EST) From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH v3 6/8] hw/mips/fuloong2e: Correct cpuclock env Date: Thu, 24 Dec 2020 11:17:48 +0800 Message-Id: <20201224031750.52146-7-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201224031750.52146-1-jiaxun.yang@flygoat.com> References: <20201224031750.52146-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Received-SPF: permerror client-ip=66.111.4.229; envelope-from=jiaxun.yang@flygoat.com; helo=new3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, T_SPF_PERMERROR=0.01 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: Aleksandar Rikalo , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Cleber Rosa , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" It was missed in 3ca7639ff00 ("hw/mips/fuloong2e: Set CPU frequency to 533 MHz"), we need to tell kernel correct clocks. Fixes: 3ca7639ff00 ("hw/mips/fuloong2e: Set CPU frequency to 533 MHz"). Signed-off-by: Jiaxun Yang Reviewed-by: Huacai Chen Reviewed-by: Philippe Mathieu-Daudé --- hw/mips/fuloong2e.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index c4843dd15e..2744b211fd 100644 --- a/hw/mips/fuloong2e.c +++ b/hw/mips/fuloong2e.c @@ -100,7 +100,7 @@ static void GCC_FMT_ATTR(3, 4) prom_set(uint32_t *prom_buf, int index, va_end(ap); } -static uint64_t load_kernel(CPUMIPSState *env) +static uint64_t load_kernel(MIPSCPU *cpu) { uint64_t kernel_entry, kernel_high, initrd_size; int index = 0; @@ -159,7 +159,7 @@ static uint64_t load_kernel(CPUMIPSState *env) } /* Setup minimum environment variables */ - prom_set(prom_buf, index++, "cpuclock=100000000"); + prom_set(prom_buf, index++, "cpuclock=%u", clock_get_hz(cpu->clock)); prom_set(prom_buf, index++, "memsize=%"PRIi64, loaderparams.ram_size / MiB); prom_set(prom_buf, index++, NULL); @@ -304,7 +304,7 @@ static void mips_fuloong2e_init(MachineState *machine) loaderparams.kernel_filename = kernel_filename; loaderparams.kernel_cmdline = kernel_cmdline; loaderparams.initrd_filename = initrd_filename; - kernel_entry = load_kernel(env); + kernel_entry = load_kernel(cpu); write_bootloader(env, memory_region_get_ram_ptr(bios), kernel_entry); } else { filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, From patchwork Thu Dec 24 03:17:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 1420377 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flygoat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.a=rsa-sha256 header.s=fm1 header.b=E6EW9j/M; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=eXMjpS2G; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D1b580c94z9sVk for ; Thu, 24 Dec 2020 14:23:40 +1100 (AEDT) Received: from localhost ([::1]:52284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksHE2-0006C6-1u for incoming@patchwork.ozlabs.org; Wed, 23 Dec 2020 22:23:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksH9N-0001kq-4h for qemu-devel@nongnu.org; Wed, 23 Dec 2020 22:18:50 -0500 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:56569) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksH9K-0003hu-Nx for qemu-devel@nongnu.org; Wed, 23 Dec 2020 22:18:48 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id EB9C4580387; Wed, 23 Dec 2020 22:18:45 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 23 Dec 2020 22:18:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=b5izmTwA3nYrF dHNrqlk5Uw2zV8hTbjkpHeUupc1mWc=; b=E6EW9j/MIIzt9eMFXbhuRfS8Jz9lg PuwV3IR1DiIDKKy8IO2sS6v+b7zqRjZdFSbA8D739XQbPO2FfcoFmAlxeCQ37nLx VIGavJJcpsEycpdT2t3WNnPnHOZtHh73ozen2ORYXAdv+5RwVJhAn6zUKva+bGNu KGVRBV0tPFdI83SBIj/a/qTijmfSR/LMXQwK+3KdVc3cUoqadZU4h2dUvDxxNMhK 2WTuU4JmKu+BVRdP6HIyZAlEyU4FFNv9Ld7tcQx1tqlhs1Qf9m4ZbCvnZcSThoms 6Yfcy/FOr4VuGHNrypH+hYBBqSz3KcDXADgqO7BbQfft/GccjYNcWAumg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=b5izmTwA3nYrFdHNrqlk5Uw2zV8hTbjkpHeUupc1mWc=; b=eXMjpS2G 16zqQfMKegwLoUHVZcS1Vni9ftl0l3WeWP7/yWHCQiXQP6/uldSH+M7Uftv8NeXv d/GEnIFMNit3DNYq1NyHaPVpzS23fwFmDi2HqXmN/vgZE4T/RlktlrrMyw2twskX sRut8FuO3MM57dxPCXHaR9nPRjhyZik+BCcjWnn1XkKodG999JWUa/oQ/oeaYPwh ECPbH02OzJ3zacsui6dMgrTX8DWhdjzkIZG5Io7HEfN62pZ3LgYcXnIINd4BqJan fB2IikiCdMuzF6q6f3lwWmnvdyf9VYqJ7G95Hg2P12sxri/X0JtR/e7QpB8PHfZe B3IwAGIpcwq03A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtkedgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflihgrgihu nhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqnecugg ftrfgrthhtvghrnhepjeeihffgteelkeelffdukedtheevudejvdegkeekjeefhffhhfet udetgfdtffeunecukfhppedvvdefrddutdegrddvuddvrdehleenucevlhhushhtvghruf hiiigvpeefnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehf lhihghhorghtrdgtohhm X-ME-Proxy: Received: from localhost.localdomain (unknown [223.104.212.59]) by mail.messagingengine.com (Postfix) with ESMTPA id DC6D91080059; Wed, 23 Dec 2020 22:18:40 -0500 (EST) From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH v3 7/8] hw/mips/fuloong2e: Add highmem support Date: Thu, 24 Dec 2020 11:17:49 +0800 Message-Id: <20201224031750.52146-8-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201224031750.52146-1-jiaxun.yang@flygoat.com> References: <20201224031750.52146-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Received-SPF: permerror client-ip=66.111.4.229; envelope-from=jiaxun.yang@flygoat.com; helo=new3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, T_SPF_PERMERROR=0.01 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: Aleksandar Rikalo , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Cleber Rosa , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" highmem starts at 0x20000000. Now we can have up to 2G RAM. Signed-off-by: Jiaxun Yang --- v2: Handle SPD for dual DIMM correctly. v3: Typo corrections --- hw/mips/fuloong2e.c | 61 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 12 deletions(-) diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index 2744b211fd..9c468974db 100644 --- a/hw/mips/fuloong2e.c +++ b/hw/mips/fuloong2e.c @@ -56,6 +56,7 @@ /* Fuloong 2e has a 512k flash: Winbond W39L040AP70Z */ #define BIOS_SIZE (512 * KiB) #define MAX_IDE_BUS 2 +#define HIGHMEM_START 0x20000000 /* * PMON is not part of qemu and released with BSD license, anyone @@ -71,7 +72,8 @@ #define FULOONG2E_RTL8139_SLOT 7 static struct _loaderparams { - int ram_size; + int ram_low_size; + int ram_high_size; const char *kernel_filename; const char *kernel_cmdline; const char *initrd_filename; @@ -128,14 +130,14 @@ static uint64_t load_kernel(MIPSCPU *cpu) initrd_size = get_image_size(loaderparams.initrd_filename); if (initrd_size > 0) { initrd_offset = ROUND_UP(kernel_high, INITRD_PAGE_SIZE); - if (initrd_offset + initrd_size > loaderparams.ram_size) { + if (initrd_offset + initrd_size > loaderparams.ram_low_size) { error_report("memory too small for initial ram disk '%s'", loaderparams.initrd_filename); exit(1); } initrd_size = load_image_targphys(loaderparams.initrd_filename, initrd_offset, - loaderparams.ram_size - initrd_offset); + loaderparams.ram_low_size - initrd_offset); } if (initrd_size == (target_ulong) -1) { error_report("could not load initial ram disk '%s'", @@ -160,7 +162,11 @@ static uint64_t load_kernel(MIPSCPU *cpu) /* Setup minimum environment variables */ prom_set(prom_buf, index++, "cpuclock=%u", clock_get_hz(cpu->clock)); - prom_set(prom_buf, index++, "memsize=%"PRIi64, loaderparams.ram_size / MiB); + prom_set(prom_buf, index++, "memsize=%"PRIi64, loaderparams.ram_low_size / MiB); + if (loaderparams.ram_high_size > 0) { + prom_set(prom_buf, index++, "highmemsize=%"PRIi64, + loaderparams.ram_high_size / MiB); + } prom_set(prom_buf, index++, NULL); rom_add_blob_fixed("prom", prom_buf, prom_size, ENVP_PADDR); @@ -186,7 +192,7 @@ static void write_bootloader(CPUMIPSState *env, uint8_t *base, p = (uint32_t *)(base + 0x040); bl_gen_jump_kernel(&p, ENVP_VADDR - 64, 2, ENVP_VADDR, - ENVP_VADDR + 8, loaderparams.ram_size, + ENVP_VADDR + 8, loaderparams.ram_low_size, kernel_addr); } @@ -258,8 +264,11 @@ static void mips_fuloong2e_init(MachineState *machine) const char *kernel_filename = machine->kernel_filename; const char *kernel_cmdline = machine->kernel_cmdline; const char *initrd_filename = machine->initrd_filename; + ram_addr_t ram_low_size, ram_high_size = 0; char *filename; MemoryRegion *address_space_mem = get_system_memory(); + MemoryRegion *ram_low_alias = g_new(MemoryRegion, 1); + MemoryRegion *ram_high_alias; MemoryRegion *bios = g_new(MemoryRegion, 1); long bios_size; uint8_t *spd_data; @@ -282,12 +291,31 @@ static void mips_fuloong2e_init(MachineState *machine) qemu_register_reset(main_cpu_reset, cpu); - /* TODO: support more than 256M RAM as highmem */ - if (machine->ram_size != 256 * MiB) { - error_report("Invalid RAM size, should be 256MB"); + if (machine->ram_size > 2 * GiB) { + error_report("Too much memory for this machine: %" PRId64 "MB," + " maximum 2048MB", machine->ram_size / MiB); exit(EXIT_FAILURE); } - memory_region_add_subregion(address_space_mem, 0, machine->ram); + + ram_low_size = MIN(machine->ram_size, 256 * MiB); + + memory_region_init_alias(ram_low_alias, NULL, + "ram_low_alias", + machine->ram, 0, + ram_low_size); + memory_region_add_subregion(address_space_mem, 0, + ram_low_alias); + + if (machine->ram_size > 256 * MiB) { + ram_high_alias = g_new(MemoryRegion, 1); + ram_high_size = machine->ram_size - ram_low_size; + memory_region_init_alias(ram_high_alias, NULL, + "ram_high_alias", + machine->ram, ram_low_size, + ram_high_size); + memory_region_add_subregion(address_space_mem, HIGHMEM_START, + ram_high_alias); + } /* Boot ROM */ memory_region_init_rom(bios, NULL, "fuloong2e.bios", BIOS_SIZE, @@ -300,7 +328,8 @@ static void mips_fuloong2e_init(MachineState *machine) */ if (kernel_filename) { - loaderparams.ram_size = machine->ram_size; + loaderparams.ram_low_size = ram_low_size; + loaderparams.ram_high_size = ram_high_size; loaderparams.kernel_filename = kernel_filename; loaderparams.kernel_cmdline = kernel_cmdline; loaderparams.initrd_filename = initrd_filename; @@ -345,8 +374,16 @@ static void mips_fuloong2e_init(MachineState *machine) } /* Populate SPD eeprom data */ - spd_data = spd_data_generate(DDR, machine->ram_size); - smbus_eeprom_init_one(smbus, 0x50, spd_data); + if (machine->ram_size <= 1 * GiB) { + /* It supports maximum of 1 GiB per DIMM */ + spd_data = spd_data_generate(DDR, machine->ram_size); + smbus_eeprom_init_one(smbus, 0x50, spd_data); + } else { + /* Split to dual DIMM for more than 1 GiB */ + spd_data = spd_data_generate(DDR, machine->ram_size / 2); + smbus_eeprom_init_one(smbus, 0x50, spd_data); + smbus_eeprom_init_one(smbus, 0x51, spd_data); + } mc146818_rtc_init(isa_bus, 2000, NULL); From patchwork Thu Dec 24 03:17:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 1420375 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flygoat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.a=rsa-sha256 header.s=fm1 header.b=Cs/sZust; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=Tn934DUr; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D1b390PFlz9sVk for ; Thu, 24 Dec 2020 14:21:57 +1100 (AEDT) Received: from localhost ([::1]:48496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksHCM-0004bK-UY for incoming@patchwork.ozlabs.org; Wed, 23 Dec 2020 22:21:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksH9S-0001mB-EH for qemu-devel@nongnu.org; Wed, 23 Dec 2020 22:18:54 -0500 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:54887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksH9P-0003je-Qw for qemu-devel@nongnu.org; Wed, 23 Dec 2020 22:18:54 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id C208F580389; Wed, 23 Dec 2020 22:18:50 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 23 Dec 2020 22:18:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=V0LuZZg623h5V 3lLsQ0jXCAD1bYriarzFcP5TppuE58=; b=Cs/sZust+SicqqqX84GexvtW/Z4yN dnwR6I88xEzoNIKY82MXZ9RhKcOUZ7JhcJZViUn3Wz/AA+w8DrpYcx1FCjEoQZBc BckbVpfA/9bF1kZbxT26sBm9FCxRiTod/YSPzD+fnx3Z8LPeaQr3u1RtBWXBSy7X oMkmFpK67gyq3UNN+l70ETWxnJjklyyGLZJD/HVsxIEEafefmxGRoVU6sRZWJtTz QyW4a8d6/0O7WvlZwwgtMHJkggDCkh5pYsmfVCVRkRRd5bG2Q5/zGUnhk66hM8vr /vZQ00hvRX66Rqu5kUI8/5FWgHJzj+yCPHepmoaFROcSImQP9+62KhM/g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=V0LuZZg623h5V3lLsQ0jXCAD1bYriarzFcP5TppuE58=; b=Tn934DUr nKOKGFgVIoRXpvwV7tT5lbCyZxm0Lk0KlRaNk3EVb7OW9zCC7MVPt6//JDLjf0og 226YQS9ka53wXpXugbadH3q93SHxwog2OuUfHVjK6R9vPoVkuq9WZKEB1x5D7Cn0 ULep6lBErYi+MbiL6IXQDxcelT+4vuy44EQ3wmkMpW9rnuUsCk7WiUlrLawbhRPg SIx0BO2cSbLgeXiQYj+KvcviF+SRHMiQ/6YXAD+3nL06xtZqrI7XFk80H5SAuqAG LmewaWbk1Zdd5nTdhnGsLHb0YQz4VNZKgZOfGPiS9Nb49NpHMnIvp1bLvVGpcec5 rc7LJq9LO+xkUQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtkedgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflihgrgihu nhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqnecugg ftrfgrthhtvghrnhepvdekieeutdejhfefgffhveeivdeitdegjeejudekgfejgeegudek ffegieffueffnecuffhomhgrihhnpeguvggsihgrnhdrohhrghenucfkphepvddvfedrud dtgedrvdduvddrheelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomh X-ME-Proxy: Received: from localhost.localdomain (unknown [223.104.212.59]) by mail.messagingengine.com (Postfix) with ESMTPA id 1E0A91080057; Wed, 23 Dec 2020 22:18:45 -0500 (EST) From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH v3 8/8] tests/acceptance: Test boot_linux_console for fuloong2e Date: Thu, 24 Dec 2020 11:17:50 +0800 Message-Id: <20201224031750.52146-9-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201224031750.52146-1-jiaxun.yang@flygoat.com> References: <20201224031750.52146-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Received-SPF: permerror client-ip=66.111.4.229; envelope-from=jiaxun.yang@flygoat.com; helo=new3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, T_SPF_PERMERROR=0.01 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: Aleksandar Rikalo , Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The kernel comes from debian archive so it's trusted. Signed-off-by: Jiaxun Yang Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo Reviewed-by: Huacai Chen Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/acceptance/boot_linux_console.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index cc6ec0f8c1..fb41bb7144 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -170,6 +170,27 @@ class BootLinuxConsole(LinuxKernelTest): console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + def test_mips64el_fuloong2e(self): + """ + :avocado: tags=arch:mips64el + :avocado: tags=machine:fuloong2e + :avocado: tags=endian:little + """ + deb_url = ('http://archive.debian.org/debian/pool/main/l/linux/' + 'linux-image-3.16.0-6-loongson-2e_3.16.56-1+deb8u1_mipsel.deb') + deb_hash = 'd04d446045deecf7b755ef576551de0c4184dd44' + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + kernel_path = self.extract_from_deb(deb_path, + '/boot/vmlinux-3.16.0-6-loongson-2e') + + self.vm.set_console() + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0' + self.vm.add_args('-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern = 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) + def test_mips_malta_cpio(self): """ :avocado: tags=arch:mips