From patchwork Sat Dec 19 07:12:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 11983361 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B872CC4361B for ; Sat, 19 Dec 2020 07:14:12 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 204C223A9F for ; Sat, 19 Dec 2020 07:14:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 204C223A9F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=flygoat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqWRP-0006KN-01 for qemu-devel@archiver.kernel.org; Sat, 19 Dec 2020 02:14:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqWQO-0005Q6-QW for qemu-devel@nongnu.org; Sat, 19 Dec 2020 02:13:08 -0500 Received: from relay1.mymailcheap.com ([149.56.97.132]:43111) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqWQN-0003vm-An for qemu-devel@nongnu.org; Sat, 19 Dec 2020 02:13:08 -0500 Received: from filter2.mymailcheap.com (filter2.mymailcheap.com [91.134.140.82]) by relay1.mymailcheap.com (Postfix) with ESMTPS id 40E763F201; Sat, 19 Dec 2020 07:13:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by filter2.mymailcheap.com (Postfix) with ESMTP id 867F72A524; Sat, 19 Dec 2020 08:13:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mymailcheap.com; s=default; t=1608361985; bh=SmpCn0QVYIFFEZ0CJpU7NG27FM9Oa4phXycKb6IE7/0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NQDVSFoK8ozOu2fDKzLUwddzVYlrWjlOY1KBW6jlKx9UPg/g+JtqthkLjH57dUHcB fpOV13WZj261kVH/hqSyBZxIx27qziBlB6czC/ak7u2RVm8IUjnhAlEPuTRYVViS5E a3Rl+BUvS9VyqFqlZlCNmgnsa7twlgbeCZUsF48k= X-Virus-Scanned: Debian amavisd-new at filter2.mymailcheap.com Received: from filter2.mymailcheap.com ([127.0.0.1]) by localhost (filter2.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vVqwNalZI7yU; Sat, 19 Dec 2020 08:13:04 +0100 (CET) Received: from mail20.mymailcheap.com (mail20.mymailcheap.com [51.83.111.147]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by filter2.mymailcheap.com (Postfix) with ESMTPS; Sat, 19 Dec 2020 08:13:04 +0100 (CET) Received: from [213.133.102.83] (ml.mymailcheap.com [213.133.102.83]) by mail20.mymailcheap.com (Postfix) with ESMTP id 3B8AF41009; Sat, 19 Dec 2020 07:13:04 +0000 (UTC) Authentication-Results: mail20.mymailcheap.com; dkim=pass (1024-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.b="hCUoQKQZ"; dkim-atps=neutral AI-Spam-Status: Not processed Received: from localhost.localdomain (unknown [180.97.240.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail20.mymailcheap.com (Postfix) with ESMTPSA id 95DC941009; Sat, 19 Dec 2020 07:12:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=default; t=1608361976; bh=SmpCn0QVYIFFEZ0CJpU7NG27FM9Oa4phXycKb6IE7/0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hCUoQKQZwPYkqZciZzQohM8Ed/fU6q0QzSLValFkkUcc+aquQyyOek+8t2beIXpXd uNnjhwpqz91HIQPbPSGGANWqvJY7P/lwMCp3AP4Th/6uEXzeMM/iNpOsS1Nwt0CrQV cbNj/meKR7nqIBjxrzWZG36bmXTVeOHyADBJgXok= From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH v2 1/8] hw/mips/fuloong2e: Remove define DEBUG_FULOONG2E_INIT Date: Sat, 19 Dec 2020 15:12:28 +0800 Message-Id: <20201219071235.35040-2-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201219071235.35040-1-jiaxun.yang@flygoat.com> References: <20201219071235.35040-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 X-Spamd-Result: default: False [4.90 / 10.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(0.00)[flygoat.com:s=default]; RECEIVED_SPAMHAUS_CSS(1.00)[180.97.240.22:received]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RECEIVED_SPAMHAUS_XBL(3.00)[180.97.240.22:received]; MIME_GOOD(-0.10)[text/plain]; R_SPF_SOFTFAIL(0.00)[~all:c]; RCPT_COUNT_FIVE(0.00)[6]; ML_SERVERS(-3.10)[213.133.102.83]; DKIM_TRACE(0.00)[flygoat.com:+]; DMARC_POLICY_ALLOW(0.00)[flygoat.com,none]; MID_CONTAINS_FROM(1.00)[]; DMARC_POLICY_ALLOW_WITH_FAILURES(0.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:213.133.96.0/19, country:DE]; RCVD_COUNT_TWO(0.00)[2]; HFILTER_HELO_BAREIP(3.00)[213.133.102.83,1] X-Rspamd-Queue-Id: 3B8AF41009 X-Rspamd-Server: mail20.mymailcheap.com X-Spam: Yes Received-SPF: pass client-ip=149.56.97.132; envelope-from=jiaxun.yang@flygoat.com; helo=relay1.mymailcheap.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: chenhuacai@kernel.org, f4bug@amsat.org, wainersm@redhat.com, crosa@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.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 Sat Dec 19 07:12:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 11983363 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-21.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FD6EC4361B for ; Sat, 19 Dec 2020 07:16:23 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 48C6B23A9F for ; Sat, 19 Dec 2020 07:16:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 48C6B23A9F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=flygoat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqWTW-0007ke-Bw for qemu-devel@archiver.kernel.org; Sat, 19 Dec 2020 02:16:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqWQV-0005Ze-Hj for qemu-devel@nongnu.org; Sat, 19 Dec 2020 02:13:15 -0500 Received: from relay3.mymailcheap.com ([217.182.66.161]:59417) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqWQT-0003yH-Bw for qemu-devel@nongnu.org; Sat, 19 Dec 2020 02:13:15 -0500 Received: from filter1.mymailcheap.com (filter1.mymailcheap.com [149.56.130.247]) by relay3.mymailcheap.com (Postfix) with ESMTPS id 63C063F1CC; Sat, 19 Dec 2020 08:13:11 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by filter1.mymailcheap.com (Postfix) with ESMTP id 92C3A2A36B; Sat, 19 Dec 2020 02:13:10 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mymailcheap.com; s=default; t=1608361990; bh=2+7b1V6sX6lzEhvcVS0K0xxRl7BGggaKpH0uZu7Hefg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=umlS8epCHUHs1+FiZCbqPi8N3h70/1dXAuHkcjMw7ZXqr/mgIuv/SfIWhRtOyIns7 Hu3uiXZsSdtwmd1NSyOO5L9s79xWE3QRUFi12TuV4mfIvw730ruHzNVuM9N/oSAOZW ZZVLErNL96CMeLhZxiaiMj87XmmVWpOZkG6iYgYY= X-Virus-Scanned: Debian amavisd-new at filter1.mymailcheap.com Received: from filter1.mymailcheap.com ([127.0.0.1]) by localhost (filter1.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2afsN4Dphuoj; Sat, 19 Dec 2020 02:13:09 -0500 (EST) Received: from mail20.mymailcheap.com (mail20.mymailcheap.com [51.83.111.147]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by filter1.mymailcheap.com (Postfix) with ESMTPS; Sat, 19 Dec 2020 02:13:09 -0500 (EST) Received: from [213.133.102.83] (ml.mymailcheap.com [213.133.102.83]) by mail20.mymailcheap.com (Postfix) with ESMTP id 4350F41E18; Sat, 19 Dec 2020 07:13:08 +0000 (UTC) Authentication-Results: mail20.mymailcheap.com; dkim=pass (1024-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.b="Ya1LvveA"; dkim-atps=neutral AI-Spam-Status: Not processed Received: from localhost.localdomain (unknown [180.97.240.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail20.mymailcheap.com (Postfix) with ESMTPSA id 3241041009; Sat, 19 Dec 2020 07:12:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=default; t=1608361980; bh=2+7b1V6sX6lzEhvcVS0K0xxRl7BGggaKpH0uZu7Hefg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ya1LvveA2m/yXlY6ixhtDjSMvsRXlKHR00IgViS+YMzz0iSJfe0OnrA652sSm4lSI /6z2mnYNBUP3O3/KO3pyhY4Cj4NcXKA4iyUnmDYYiueLHPJ66xvGDAImYVKt4mTxNW AHaoiUZ6QnPksbw1oLXHZ98iqVKhLch69le+aR0M= From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH v2 2/8] hw/mips/fuloong2e: Relpace fault links Date: Sat, 19 Dec 2020 15:12:29 +0800 Message-Id: <20201219071235.35040-3-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201219071235.35040-1-jiaxun.yang@flygoat.com> References: <20201219071235.35040-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 X-Spamd-Result: default: False [8.90 / 10.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(0.00)[flygoat.com:s=default]; RECEIVED_SPAMHAUS_CSS(1.00)[180.97.240.22:received]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; RCPT_COUNT_FIVE(0.00)[6]; ML_SERVERS(-3.10)[213.133.102.83]; DKIM_TRACE(0.00)[flygoat.com:+]; DMARC_POLICY_ALLOW(0.00)[flygoat.com,none]; MID_CONTAINS_FROM(1.00)[]; DMARC_POLICY_ALLOW_WITH_FAILURES(0.00)[]; RECEIVED_SPAMHAUS_XBL(3.00)[180.97.240.22:received]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:213.133.96.0/19, country:DE]; RCVD_COUNT_TWO(0.00)[2]; HFILTER_HELO_BAREIP(3.00)[213.133.102.83,1] X-Rspamd-Queue-Id: 4350F41E18 X-Rspamd-Server: mail20.mymailcheap.com X-Spam: Yes Received-SPF: pass client-ip=217.182.66.161; envelope-from=jiaxun.yang@flygoat.com; helo=relay3.mymailcheap.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: chenhuacai@kernel.org, f4bug@amsat.org, wainersm@redhat.com, crosa@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.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: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Huacai Chen --- 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 Sat Dec 19 07:18:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 11983365 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FF8DC4361B for ; Sat, 19 Dec 2020 07:20:05 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id AEDF223B03 for ; Sat, 19 Dec 2020 07:20:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AEDF223B03 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=flygoat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqWX5-0001Q8-EK for qemu-devel@archiver.kernel.org; Sat, 19 Dec 2020 02:20:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqWVp-0000WU-7J for qemu-devel@nongnu.org; Sat, 19 Dec 2020 02:18:45 -0500 Received: from relay2.mymailcheap.com ([217.182.66.162]:43392) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqWVn-0006K5-5M for qemu-devel@nongnu.org; Sat, 19 Dec 2020 02:18:44 -0500 Received: from filter1.mymailcheap.com (filter1.mymailcheap.com [149.56.130.247]) by relay2.mymailcheap.com (Postfix) with ESMTPS id 219783ECD9; Sat, 19 Dec 2020 08:18:41 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by filter1.mymailcheap.com (Postfix) with ESMTP id 4642E2A374; Sat, 19 Dec 2020 02:18:40 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mymailcheap.com; s=default; t=1608362320; bh=9GAlcZiIpk5OxCQ9VlVskCbXgWc7zag2riobEZWFmJU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wqcYbRuip5ayattSQh6GnXnn6UZTviNF1uZmK0/q3NuVETU098JZwyAvwCkIJi/Cj kAZYTlUBSFbSPOkq4BJC4XFygiO2tHi/jhNk/QfyyPax4E8Nimx+YADkZrVNZ76qO1 kinZ0fAFEWyK9z0YH1gbSSuRCdpfFdx5eIlhPFW8= X-Virus-Scanned: Debian amavisd-new at filter1.mymailcheap.com Received: from filter1.mymailcheap.com ([127.0.0.1]) by localhost (filter1.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aVhZg5Wvecso; Sat, 19 Dec 2020 02:18:39 -0500 (EST) Received: from mail20.mymailcheap.com (mail20.mymailcheap.com [51.83.111.147]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by filter1.mymailcheap.com (Postfix) with ESMTPS; Sat, 19 Dec 2020 02:18:39 -0500 (EST) Received: from [213.133.102.83] (ml.mymailcheap.com [213.133.102.83]) by mail20.mymailcheap.com (Postfix) with ESMTP id 71DF742F8B; Sat, 19 Dec 2020 07:18:38 +0000 (UTC) Authentication-Results: mail20.mymailcheap.com; dkim=pass (1024-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.b="aLu2DX3G"; dkim-atps=neutral AI-Spam-Status: Not processed Received: from localhost.localdomain (unknown [180.97.240.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail20.mymailcheap.com (Postfix) with ESMTPSA id 0572541009; Sat, 19 Dec 2020 07:18:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=default; t=1608362313; bh=9GAlcZiIpk5OxCQ9VlVskCbXgWc7zag2riobEZWFmJU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aLu2DX3GXjWHqamq+HcbBjkzxIDPdBxx8UdXPcEDnzCehaF/wnUDe+/9tycvqDNTV WiPujqPINTzqG9D37jr8P4DmUpr+UpWTzuEs8ST+161XX5MXlvPYzNwSHgn7R7CxHZ OLRxUdaK+WqOSITOlWlDA3jFjT03rE3NZRbSrDH4= From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH v2 3/8] hw/pci-host/bonito: Fixup IRQ mapping Date: Sat, 19 Dec 2020 15:18:15 +0800 Message-Id: <20201219071816.37963-1-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201219071235.35040-1-jiaxun.yang@flygoat.com> References: <20201219071235.35040-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 X-Spamd-Result: default: False [8.90 / 10.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_XBL(3.00)[180.97.240.22:received]; R_DKIM_ALLOW(0.00)[flygoat.com:s=default]; RECEIVED_SPAMHAUS_CSS(1.00)[180.97.240.22:received]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCPT_COUNT_FIVE(0.00)[6]; ARC_NA(0.00)[]; ML_SERVERS(-3.10)[213.133.102.83]; DKIM_TRACE(0.00)[flygoat.com:+]; DMARC_POLICY_ALLOW(0.00)[flygoat.com,none]; MID_CONTAINS_FROM(1.00)[]; DMARC_POLICY_ALLOW_WITH_FAILURES(0.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:213.133.96.0/19, country:DE]; RCVD_COUNT_TWO(0.00)[2]; HFILTER_HELO_BAREIP(3.00)[213.133.102.83,1] X-Rspamd-Queue-Id: 71DF742F8B X-Rspamd-Server: mail20.mymailcheap.com X-Spam: Yes Received-SPF: pass client-ip=217.182.66.162; envelope-from=jiaxun.yang@flygoat.com; helo=relay2.mymailcheap.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: chenhuacai@kernel.org, f4bug@amsat.org, wainersm@redhat.com, crosa@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.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 simply remove BONITO_IRQ_BASE and direct map IRQs here. Signed-off-by: Jiaxun Yang --- hw/pci-host/bonito.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index a99eced065..43b79448a9 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -546,19 +546,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 +563,10 @@ 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) +/* PCI slots IRQ pins started from 25 */ +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 25 + pin; } static void bonito_reset(void *opaque) From patchwork Sat Dec 19 07:18:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 11983367 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E381C4361B for ; Sat, 19 Dec 2020 07:20:17 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0434B23B03 for ; Sat, 19 Dec 2020 07:20:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0434B23B03 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=flygoat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqWXI-0001ZP-0r for qemu-devel@archiver.kernel.org; Sat, 19 Dec 2020 02:20:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqWVy-0000jA-7Y for qemu-devel@nongnu.org; Sat, 19 Dec 2020 02:18:54 -0500 Received: from relay1.mymailcheap.com ([149.56.97.132]:33408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqWVv-0006Nu-Mv for qemu-devel@nongnu.org; Sat, 19 Dec 2020 02:18:52 -0500 Received: from filter2.mymailcheap.com (filter2.mymailcheap.com [91.134.140.82]) by relay1.mymailcheap.com (Postfix) with ESMTPS id ABAAC3F201; Sat, 19 Dec 2020 07:18:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by filter2.mymailcheap.com (Postfix) with ESMTP id F18A42A524; Sat, 19 Dec 2020 08:18:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mymailcheap.com; s=default; t=1608362330; bh=eKoDjSU09L+lCJ3Pvy0RBeJSqAVU9BqQvA7QQSHj1V4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j0RBNvOfcesrQqRHOzVMzakJ/4I2mbUai7Q2VOYDQo3Q9yvkfqWAd5W4/pX4u7qXt SoZwxuGFbhLn6VVXTvMNCWar6GzweV7WEucrfSa9O06UU+YBD8F3Fp54wITjYbRIe9 UFQ4Cdpuq8XyxjaU3t7R5frkYLn/wpAF7jY6TkqU= X-Virus-Scanned: Debian amavisd-new at filter2.mymailcheap.com Received: from filter2.mymailcheap.com ([127.0.0.1]) by localhost (filter2.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6b_xEY6NfsfY; Sat, 19 Dec 2020 08:18:48 +0100 (CET) Received: from mail20.mymailcheap.com (mail20.mymailcheap.com [51.83.111.147]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by filter2.mymailcheap.com (Postfix) with ESMTPS; Sat, 19 Dec 2020 08:18:47 +0100 (CET) Received: from [213.133.102.83] (ml.mymailcheap.com [213.133.102.83]) by mail20.mymailcheap.com (Postfix) with ESMTP id AB8A741009; Sat, 19 Dec 2020 07:18:47 +0000 (UTC) Authentication-Results: mail20.mymailcheap.com; dkim=pass (1024-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.b="sAgNLeEO"; dkim-atps=neutral AI-Spam-Status: Not processed Received: from localhost.localdomain (unknown [180.97.240.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail20.mymailcheap.com (Postfix) with ESMTPSA id BFD0141009; Sat, 19 Dec 2020 07:18:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=default; t=1608362319; bh=eKoDjSU09L+lCJ3Pvy0RBeJSqAVU9BqQvA7QQSHj1V4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sAgNLeEOwPqvDQVvrPZovfVqp+kveMyBD6Iv6Ppqs2VewvgS6KY/GTLzwAWy3ytUz 9RvWbK9PXq1wOdRaZ4gxabRTnpPGQqgPAVHvxRUlJWTuxmwQMGHgXDZMXJJgI8MgH8 kZZUCyEy3LkM5NX6vWMoUp9flskCXmlZtMfxhxbo= From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH v2 4/8] hw/pci-host/bonito: Fixup pci.lomem mapping Date: Sat, 19 Dec 2020 15:18:16 +0800 Message-Id: <20201219071816.37963-2-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201219071235.35040-1-jiaxun.yang@flygoat.com> References: <20201219071235.35040-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 X-Spamd-Result: default: False [8.90 / 10.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(0.00)[flygoat.com:s=default]; RECEIVED_SPAMHAUS_CSS(1.00)[180.97.240.22:received]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; RCPT_COUNT_FIVE(0.00)[6]; ML_SERVERS(-3.10)[213.133.102.83]; DKIM_TRACE(0.00)[flygoat.com:+]; DMARC_POLICY_ALLOW(0.00)[flygoat.com,none]; MID_CONTAINS_FROM(1.00)[]; DMARC_POLICY_ALLOW_WITH_FAILURES(0.00)[]; RECEIVED_SPAMHAUS_XBL(3.00)[180.97.240.22:received]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:213.133.96.0/19, country:DE]; RCVD_COUNT_TWO(0.00)[2]; HFILTER_HELO_BAREIP(3.00)[213.133.102.83,1] X-Rspamd-Queue-Id: AB8A741009 X-Rspamd-Server: mail20.mymailcheap.com X-Spam: Yes Received-SPF: pass client-ip=149.56.97.132; envelope-from=jiaxun.yang@flygoat.com; helo=relay1.mymailcheap.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: chenhuacai@kernel.org, f4bug@amsat.org, wainersm@redhat.com, crosa@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The original mapping had wrong base address. Fix by correct the base adress and merge three alias into a single. Signed-off-by: Jiaxun Yang --- hw/pci-host/bonito.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 43b79448a9..3a31ba42f2 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -608,7 +608,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", @@ -616,16 +616,11 @@ static void bonito_pcihost_realize(DeviceState *dev, Error **errp) dev, &bs->pci_mem, get_system_io(), 0x28, 32, TYPE_PCI_BUS); - for (size_t i = 0; i < 3; i++) { - char *name = g_strdup_printf("pci.lomem%zu", i); - - memory_region_init_alias(&pcimem_lo_alias[i], NULL, name, - &bs->pci_mem, i * 64 * MiB, 64 * MiB); - memory_region_add_subregion(get_system_memory(), - BONITO_PCILO_BASE + i * 64 * MiB, - &pcimem_lo_alias[i]); - g_free(name); - } + memory_region_init_alias(pcimem_lo_alias, OBJECT(dev), "pci.lomem", + &bs->pci_mem, BONITO_PCILO_BASE, + BONITO_PCILO_SIZE); + memory_region_add_subregion(get_system_memory(), BONITO_PCILO_BASE, + pcimem_lo_alias); create_unimplemented_device("pci.io", BONITO_PCIIO_BASE, 1 * MiB); } From patchwork Sat Dec 19 07:21:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 11983369 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23BC9C4361B for ; Sat, 19 Dec 2020 07:23:12 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 9459423B03 for ; Sat, 19 Dec 2020 07:23:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9459423B03 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=flygoat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqWa6-0003Em-Ag for qemu-devel@archiver.kernel.org; Sat, 19 Dec 2020 02:23:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqWZG-0002cO-18 for qemu-devel@nongnu.org; Sat, 19 Dec 2020 02:22:18 -0500 Received: from relay2.mymailcheap.com ([151.80.165.199]:35373) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqWZA-0007nn-Tp for qemu-devel@nongnu.org; Sat, 19 Dec 2020 02:22:17 -0500 Received: from filter2.mymailcheap.com (filter2.mymailcheap.com [91.134.140.82]) by relay2.mymailcheap.com (Postfix) with ESMTPS id 081933ECDA; Sat, 19 Dec 2020 08:22:10 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by filter2.mymailcheap.com (Postfix) with ESMTP id D99ED2A524; Sat, 19 Dec 2020 08:22:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mymailcheap.com; s=default; t=1608362529; bh=dyKoXVD/Q8mN6CiIF+05QataG8bsUQl+A1JiBrXzgnY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JWNYnrCINUTdI5JVd+x5AIPHs4Qh2zCFfXBsv3shmboCJbr1R/Cocg0bASYr+UYrS ckjjExMDFrRVW92VeeT1jXTuMDHK7H2grKIztkuCuC19RxFi3G7Qs+P/XcdLetmk64 tYc/9arTEIsUZHRtw5EX1Z53dD84iCiKmOT90jfY= X-Virus-Scanned: Debian amavisd-new at filter2.mymailcheap.com Received: from filter2.mymailcheap.com ([127.0.0.1]) by localhost (filter2.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kWzRDMc7l3BQ; Sat, 19 Dec 2020 08:22:08 +0100 (CET) Received: from mail20.mymailcheap.com (mail20.mymailcheap.com [51.83.111.147]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by filter2.mymailcheap.com (Postfix) with ESMTPS; Sat, 19 Dec 2020 08:22:08 +0100 (CET) Received: from [213.133.102.83] (ml.mymailcheap.com [213.133.102.83]) by mail20.mymailcheap.com (Postfix) with ESMTP id 7FF1C42F8B; Sat, 19 Dec 2020 07:22:08 +0000 (UTC) Authentication-Results: mail20.mymailcheap.com; dkim=pass (1024-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.b="F0lH/9sZ"; dkim-atps=neutral AI-Spam-Status: Not processed Received: from localhost.localdomain (unknown [180.97.240.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail20.mymailcheap.com (Postfix) with ESMTPSA id 5A92441E18; Sat, 19 Dec 2020 07:21:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=default; t=1608362525; bh=dyKoXVD/Q8mN6CiIF+05QataG8bsUQl+A1JiBrXzgnY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F0lH/9sZK9JGYRTqo5N+KFXnUqJbKBvC1dT5QnRDG9pxmsbtvN2ETIi7R0X22WKL+ MhxSQWtjnjiWksV6mF5QjB0hoa9zMHTolFDtWN76l8Yo88Payyc8prCtx9Wm3rNFsm /KMak2Qq8Y8BViBx/aapz91VuXMc0l2o1X8xydvU= From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH v2 5/8] hw/mips/fuloong2e: Remove unused env entry Date: Sat, 19 Dec 2020 15:21:38 +0800 Message-Id: <20201219072139.39347-1-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201219071235.35040-1-jiaxun.yang@flygoat.com> References: <20201219071235.35040-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 X-Spamd-Result: default: False [8.90 / 10.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(0.00)[flygoat.com:s=default]; RECEIVED_SPAMHAUS_CSS(1.00)[180.97.240.22:received]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; RCPT_COUNT_FIVE(0.00)[6]; ML_SERVERS(-3.10)[213.133.102.83]; DKIM_TRACE(0.00)[flygoat.com:+]; DMARC_POLICY_ALLOW(0.00)[flygoat.com,none]; MID_CONTAINS_FROM(1.00)[]; DMARC_POLICY_ALLOW_WITH_FAILURES(0.00)[]; RECEIVED_SPAMHAUS_XBL(3.00)[180.97.240.22:received]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:213.133.96.0/19, country:DE]; RCVD_COUNT_TWO(0.00)[2]; HFILTER_HELO_BAREIP(3.00)[213.133.102.83,1] X-Rspamd-Queue-Id: 7FF1C42F8B X-Rspamd-Server: mail20.mymailcheap.com X-Spam: Yes Received-SPF: pass client-ip=151.80.165.199; envelope-from=jiaxun.yang@flygoat.com; helo=relay2.mymailcheap.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: chenhuacai@kernel.org, f4bug@amsat.org, wainersm@redhat.com, crosa@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" modetty and busclock is not handled by kernel and the parameter here seems unreasonable. Signed-off-by: Jiaxun Yang 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 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 Sat Dec 19 07:21:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 11983371 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DADFCC4361B for ; Sat, 19 Dec 2020 07:25:50 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 377D123B19 for ; Sat, 19 Dec 2020 07:25:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 377D123B19 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=flygoat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqWce-0004jh-W2 for qemu-devel@archiver.kernel.org; Sat, 19 Dec 2020 02:25:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqWZT-0002lo-UY for qemu-devel@nongnu.org; Sat, 19 Dec 2020 02:22:31 -0500 Received: from relay4.mymailcheap.com ([137.74.80.154]:50947) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqWZS-0007un-2z for qemu-devel@nongnu.org; Sat, 19 Dec 2020 02:22:31 -0500 Received: from filter2.mymailcheap.com (filter2.mymailcheap.com [91.134.140.82]) by relay4.mymailcheap.com (Postfix) with ESMTPS id 5AE883F162; Sat, 19 Dec 2020 08:22:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by filter2.mymailcheap.com (Postfix) with ESMTP id 2A2E52A524; Sat, 19 Dec 2020 08:22:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mymailcheap.com; s=default; t=1608362548; bh=zkf8OP88hZRH0n+IZi2DL1V5j7BrE4FS4wH4Q9tOVEw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U0wlZm19kMcZmuqlMqWRnZQ7xKYR3Hx0oXzZmiKUQ3eTNzpD53opSrAwwAfX/boBQ uyjJPPTLr2Kc8uEq0pMlEoOl6CuqlYRGgCCn51k0w9+iy32P9iPi7Z0VHulvWUYTGM I4kBPmAgxKWhX7vCFaHwly+I1MqJVpn03cBuR/Cg= X-Virus-Scanned: Debian amavisd-new at filter2.mymailcheap.com Received: from filter2.mymailcheap.com ([127.0.0.1]) by localhost (filter2.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gQHDqy8-bp12; Sat, 19 Dec 2020 08:22:27 +0100 (CET) Received: from mail20.mymailcheap.com (mail20.mymailcheap.com [51.83.111.147]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by filter2.mymailcheap.com (Postfix) with ESMTPS; Sat, 19 Dec 2020 08:22:27 +0100 (CET) Received: from [213.133.102.83] (ml.mymailcheap.com [213.133.102.83]) by mail20.mymailcheap.com (Postfix) with ESMTP id DE3A941009; Sat, 19 Dec 2020 07:22:26 +0000 (UTC) Authentication-Results: mail20.mymailcheap.com; dkim=pass (1024-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.b="tvn2cDJp"; dkim-atps=neutral AI-Spam-Status: Not processed Received: from localhost.localdomain (unknown [180.97.240.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail20.mymailcheap.com (Postfix) with ESMTPSA id 5C19541E18; Sat, 19 Dec 2020 07:22:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=default; t=1608362535; bh=zkf8OP88hZRH0n+IZi2DL1V5j7BrE4FS4wH4Q9tOVEw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tvn2cDJpOmJ9K9XiVMvba9g7r8CygALoTEx30RrQx2m4B8+7aQq+FjQcS2Aoepx3v pepKzquk54h94c8JwNnlnKkq5jVDi9LmYhZa2Lrc1c93Uw6H//IoeFBqAVDME4FWDz quITOa9YYIRn5AUJrdmYtffe26bJmKYR+yH/GAXE= From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH v2 6/8] hw/mips/fuloong2e: Correct cpuclock env Date: Sat, 19 Dec 2020 15:21:39 +0800 Message-Id: <20201219072139.39347-2-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201219071235.35040-1-jiaxun.yang@flygoat.com> References: <20201219071235.35040-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 X-Spamd-Result: default: False [8.90 / 10.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(0.00)[flygoat.com:s=default]; RECEIVED_SPAMHAUS_CSS(1.00)[180.97.240.22:received]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; RCPT_COUNT_FIVE(0.00)[6]; ML_SERVERS(-3.10)[213.133.102.83]; DKIM_TRACE(0.00)[flygoat.com:+]; DMARC_POLICY_ALLOW(0.00)[flygoat.com,none]; MID_CONTAINS_FROM(1.00)[]; DMARC_POLICY_ALLOW_WITH_FAILURES(0.00)[]; RECEIVED_SPAMHAUS_XBL(3.00)[180.97.240.22:received]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:213.133.96.0/19, country:DE]; RCVD_COUNT_TWO(0.00)[2]; HFILTER_HELO_BAREIP(3.00)[213.133.102.83,1] X-Rspamd-Queue-Id: DE3A941009 X-Rspamd-Server: mail20.mymailcheap.com X-Spam: Yes Received-SPF: pass client-ip=137.74.80.154; envelope-from=jiaxun.yang@flygoat.com; helo=relay4.mymailcheap.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: chenhuacai@kernel.org, f4bug@amsat.org, wainersm@redhat.com, crosa@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.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: Philippe Mathieu-Daudé Reviewed-by: Huacai Chen --- 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 Sat Dec 19 07:23:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 11983373 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3E69C3526C for ; Sat, 19 Dec 2020 07:25:51 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 46FB823B19 for ; Sat, 19 Dec 2020 07:25:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46FB823B19 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=flygoat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqWcg-0004lh-4b for qemu-devel@archiver.kernel.org; Sat, 19 Dec 2020 02:25:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqWar-0003qr-CP for qemu-devel@nongnu.org; Sat, 19 Dec 2020 02:23:57 -0500 Received: from relay1.mymailcheap.com ([144.217.248.100]:58578) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqWao-0008QN-Ke for qemu-devel@nongnu.org; Sat, 19 Dec 2020 02:23:56 -0500 Received: from filter1.mymailcheap.com (filter1.mymailcheap.com [149.56.130.247]) by relay1.mymailcheap.com (Postfix) with ESMTPS id 5B2563F202; Sat, 19 Dec 2020 07:23:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by filter1.mymailcheap.com (Postfix) with ESMTP id 42C342A374; Sat, 19 Dec 2020 02:23:51 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mymailcheap.com; s=default; t=1608362631; bh=uA2bJbWIb3kc5yACc/sM6b8KUw3r9+UGTPYWRnrDYOs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZLRi+1Rznq82/0+bs5VV9fo63cEddaZ07afLkFuD7vk7U3OR+B9zh+hXhbBR7H5gY Ii09cL7prtPljfl3u2eK/YpUVL/exFFoHxYBMnhxtz8luE3wSppkMAkW6MwuVEjnI6 g8Lmr628K6nUi5cAAxe6SdVD1/IH64PLVbl0QKVQ= X-Virus-Scanned: Debian amavisd-new at filter1.mymailcheap.com Received: from filter1.mymailcheap.com ([127.0.0.1]) by localhost (filter1.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KtuY0XAlO3dE; Sat, 19 Dec 2020 02:23:50 -0500 (EST) Received: from mail20.mymailcheap.com (mail20.mymailcheap.com [51.83.111.147]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by filter1.mymailcheap.com (Postfix) with ESMTPS; Sat, 19 Dec 2020 02:23:49 -0500 (EST) Received: from [148.251.23.173] (ml.mymailcheap.com [148.251.23.173]) by mail20.mymailcheap.com (Postfix) with ESMTP id EDE2741E18; Sat, 19 Dec 2020 07:23:48 +0000 (UTC) Authentication-Results: mail20.mymailcheap.com; dkim=pass (1024-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.b="qdhpo010"; dkim-atps=neutral AI-Spam-Status: Not processed Received: from localhost.localdomain (unknown [180.97.240.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail20.mymailcheap.com (Postfix) with ESMTPSA id 300D442F8B; Sat, 19 Dec 2020 07:23:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=default; t=1608362624; bh=uA2bJbWIb3kc5yACc/sM6b8KUw3r9+UGTPYWRnrDYOs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qdhpo0109LoIFMcdsbeb3542F9HrnUE4rAPtDqBeShQcRSh1JtvQyLH1dsh7PRxH2 nWuWic8ogMDQzs3Bt2pb2ubtVHJxTxetp9ksJ4TF+ItJu44kmEdoIOMQ/jg+qsNI81 aefwdIB9Gkb5UWgP5wmr+LiNc+u6mjoO1pFRI0JU= From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH v2 7/8] hw/mips/fuloong2e: Add highmem support Date: Sat, 19 Dec 2020 15:23:25 +0800 Message-Id: <20201219072326.40157-1-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201219071235.35040-1-jiaxun.yang@flygoat.com> References: <20201219071235.35040-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 X-Spamd-Result: default: False [8.90 / 10.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_XBL(3.00)[180.97.240.22:received]; R_DKIM_ALLOW(0.00)[flygoat.com:s=default]; RECEIVED_SPAMHAUS_CSS(1.00)[180.97.240.22:received]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCPT_COUNT_FIVE(0.00)[6]; ARC_NA(0.00)[]; ML_SERVERS(-3.10)[148.251.23.173]; DKIM_TRACE(0.00)[flygoat.com:+]; DMARC_POLICY_ALLOW(0.00)[flygoat.com,none]; MID_CONTAINS_FROM(1.00)[]; DMARC_POLICY_ALLOW_WITH_FAILURES(0.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:148.251.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; HFILTER_HELO_BAREIP(3.00)[148.251.23.173,1] X-Rspamd-Queue-Id: EDE2741E18 X-Rspamd-Server: mail20.mymailcheap.com X-Spam: Yes Received-SPF: pass client-ip=144.217.248.100; envelope-from=jiaxun.yang@flygoat.com; helo=relay1.mymailcheap.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: chenhuacai@kernel.org, f4bug@amsat.org, wainersm@redhat.com, crosa@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" highmem started from 0x20000000. Now we can have up to 2G RAM. Signed-off-by: Jiaxun Yang Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Huacai Chen --- v2: Handle SPD for dual DIMM correctly. --- 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..8a4bebe066 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 maxium 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 Sat Dec 19 07:23:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 11983375 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52E55C4361B for ; Sat, 19 Dec 2020 07:29:46 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id D649F23B23 for ; Sat, 19 Dec 2020 07:29:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D649F23B23 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=flygoat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqWgS-0006YQ-PU for qemu-devel@archiver.kernel.org; Sat, 19 Dec 2020 02:29:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqWb5-000442-Kk for qemu-devel@nongnu.org; Sat, 19 Dec 2020 02:24:11 -0500 Received: from relay2.mymailcheap.com ([151.80.165.199]:53459) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqWb3-000050-NV for qemu-devel@nongnu.org; Sat, 19 Dec 2020 02:24:11 -0500 Received: from filter1.mymailcheap.com (filter1.mymailcheap.com [149.56.130.247]) by relay2.mymailcheap.com (Postfix) with ESMTPS id CFE283ECDA; Sat, 19 Dec 2020 08:24:06 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by filter1.mymailcheap.com (Postfix) with ESMTP id 1FC862A374; Sat, 19 Dec 2020 02:24:06 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mymailcheap.com; s=default; t=1608362646; bh=1h22Q81ELmn0MngW57iPmDs3dEPNoGgS5R+YZl2qWC4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IZby4Y9simOvN9Kf2eyvYamCiJUMxZdwghvOkXnV1yRW54KmPimX7rlzqVD4JGhn+ K4HiekA/jn2EU9jQwVzUClnDz57ltfr++AA/ReUJxPQbNuPqaW4DwdQY4pwp8su3Pw gmmyuYDRwxGQqMUWQGVsTL7Tzs1l2QkzOej/Zs40= X-Virus-Scanned: Debian amavisd-new at filter1.mymailcheap.com Received: from filter1.mymailcheap.com ([127.0.0.1]) by localhost (filter1.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B-Zgs47iHl2h; Sat, 19 Dec 2020 02:24:05 -0500 (EST) Received: from mail20.mymailcheap.com (mail20.mymailcheap.com [51.83.111.147]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by filter1.mymailcheap.com (Postfix) with ESMTPS; Sat, 19 Dec 2020 02:24:05 -0500 (EST) Received: from [148.251.23.173] (ml.mymailcheap.com [148.251.23.173]) by mail20.mymailcheap.com (Postfix) with ESMTP id 3F25C41E18; Sat, 19 Dec 2020 07:24:04 +0000 (UTC) Authentication-Results: mail20.mymailcheap.com; dkim=pass (1024-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.b="g5WH1VOM"; dkim-atps=neutral AI-Spam-Status: Not processed Received: from localhost.localdomain (unknown [180.97.240.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail20.mymailcheap.com (Postfix) with ESMTPSA id F08FC42F8B; Sat, 19 Dec 2020 07:23:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=default; t=1608362636; bh=1h22Q81ELmn0MngW57iPmDs3dEPNoGgS5R+YZl2qWC4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g5WH1VOMLhy9oHqU9hQK5L0kGKG825nMjTkJ6hb+qtG7NduC2w5BO/PqlGVZhCp8v DPOcF11uQdU3IxzmIzurFx/OlIhJWH6fbPZ7f5KNUQwAGUTiM46h+cqWD6byPAgYIn zansrugdnmb4AWXp+r7H7Xj9Ro6hBFKkKiWt+P2U= From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH v2 8/8] tests/acceptance: Test boot_linux_console for fuloong2e Date: Sat, 19 Dec 2020 15:23:26 +0800 Message-Id: <20201219072326.40157-2-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201219071235.35040-1-jiaxun.yang@flygoat.com> References: <20201219071235.35040-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 X-Spamd-Result: default: False [8.90 / 10.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(0.00)[flygoat.com:s=default]; RECEIVED_SPAMHAUS_CSS(1.00)[180.97.240.22:received]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; RCPT_COUNT_FIVE(0.00)[6]; ML_SERVERS(-3.10)[148.251.23.173]; DKIM_TRACE(0.00)[flygoat.com:+]; DMARC_POLICY_ALLOW(0.00)[flygoat.com,none]; MID_CONTAINS_FROM(1.00)[]; DMARC_POLICY_ALLOW_WITH_FAILURES(0.00)[]; RECEIVED_SPAMHAUS_XBL(3.00)[180.97.240.22:received]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:148.251.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; HFILTER_HELO_BAREIP(3.00)[148.251.23.173,1] X-Rspamd-Queue-Id: 3F25C41E18 X-Rspamd-Server: mail20.mymailcheap.com X-Spam: Yes Received-SPF: pass client-ip=151.80.165.199; envelope-from=jiaxun.yang@flygoat.com; helo=relay2.mymailcheap.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: chenhuacai@kernel.org, f4bug@amsat.org, wainersm@redhat.com, crosa@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The kernel comes from debian archive so it's trusted. Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo Reviewed-by: Huacai Chen --- 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