From patchwork Thu Aug 27 20:35:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 275332 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=-12.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, 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 E84EEC433E1 for ; Thu, 27 Aug 2020 20:44:56 +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 B89FA20825 for ; Thu, 27 Aug 2020 20:44:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="g4OY8V7R" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B89FA20825 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:54368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBOlT-0004PJ-Ns for qemu-devel@archiver.kernel.org; Thu, 27 Aug 2020 16:44:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBOcV-0007p4-PV for qemu-devel@nongnu.org; Thu, 27 Aug 2020 16:35:40 -0400 Received: from mout.gmx.net ([212.227.15.18]:59535) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBOcR-0001Wp-3M for qemu-devel@nongnu.org; Thu, 27 Aug 2020 16:35:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1598560521; bh=xGoJxgZ7IVup4dbsseRwpe8Ye66tYZj9bPxD1FAfhqQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=g4OY8V7Rz6ldWd17ZLLHtmm+nWVF0lYCWnTXxvl/mk/kUO+R+0AYGpvCxW9SnGZI5 IbAe1Rjos6er7RWoV8fidE6FpJWx/iypMPhi9lP+vNFmw0JoM0LNTkeOMH8CRnc1Ri uWogKTLLVSOq8/pGsWxvXYTNuHX3onbPDuYcrers= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from ls3530.fritz.box ([92.116.181.35]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1ML9uK-1juPzm3emQ-00IGiQ; Thu, 27 Aug 2020 22:35:20 +0200 From: Helge Deller To: qemu-devel@nongnu.org Subject: [PATCH 2/5] hw/hppa: Make number of TLB and BTLB entries configurable Date: Thu, 27 Aug 2020 22:35:14 +0200 Message-Id: <20200827203517.29404-3-deller@gmx.de> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200827203517.29404-1-deller@gmx.de> References: <20200827203517.29404-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:SSesNdgd1VaeG+r8fHaitRYIWSzZvR4MREF7LlJI4EzQcAvkt6+ Yynz9QCIfSKvcTkpZraV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/IG XhcfrV/SO4bUQ6tE30Y+68v9HuUTmk23f26AhHfQABwLNtmC4mfU+doXDM4gZ+MMlWqALWPdd jpCM9vRUb+6VAXsCXBd1DxPMNa4dcQEvBiKHB5+OcEU42LRirPYQgEf/iNl6sFAtv3GiCXn8Y 90dL4jxB+hYd50dnm0bfulsvNf6ErqAAHRml+w+Enpg+qGl+zW4Z9Vogo+54w11okCUhTjO/8 spprPrer899pJiN+2j9Ycy9Mrr0PzpJSnI007Q/e5uXDrLlPtsEhygV+MK+pcD+GhwdV9veXD Hl+FRHlPEegW4z3oWf/WtW7oMLKz0l1v0hIApVubg8kumvZ3i1tfQ9vS1FfWPz0MjIVTmCLUo PQ7G1WEEF0+WsW+Bm Received-SPF: pass client-ip=212.227.15.18; envelope-from=deller@gmx.de; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/27 16:35:24 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Helge Deller , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Until now the TLB size was fixed at 256 entries. To allow operating systems to utilize more TLB entries in the future, we need to tell firmware how many TLB entries we actually support in the emulation. Firmware then reports this to the operating system via the PDC_CACHE_INFO call. This patch simply does the preparation to allow more TLB entries. Signed-off-by: Helge Deller --- hw/hppa/machine.c | 8 ++++++++ target/hppa/cpu.h | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) -- 2.21.3 diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index 90aeefe2a4..e9d84d0f03 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -72,6 +72,14 @@ static FWCfgState *create_fw_cfg(MachineState *ms) fw_cfg_add_file(fw_cfg, "/etc/firmware-min-version", g_memdup(&val, sizeof(val)), sizeof(val)); + val = cpu_to_le64(HPPA_TLB_ENTRIES); + fw_cfg_add_file(fw_cfg, "/etc/cpu/tlb_entries", + g_memdup(&val, sizeof(val)), sizeof(val)); + + val = cpu_to_le64(HPPA_BTLB_ENTRIES); + fw_cfg_add_file(fw_cfg, "/etc/cpu/btlb_entries", + g_memdup(&val, sizeof(val)), sizeof(val)); + return fw_cfg; } diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index 801a4fb1ba..440104dc3c 100644 --- a/target/hppa/cpu.h +++ b/target/hppa/cpu.h @@ -196,9 +196,12 @@ struct CPUHPPAState { target_ureg shadow[7]; /* shadow registers */ /* ??? The number of entries isn't specified by the architecture. */ + #define HPPA_TLB_ENTRIES 256 + #define HPPA_BTLB_ENTRIES 0 + /* ??? Implement a unified itlb/dtlb for the moment. */ /* ??? We should use a more intelligent data structure. */ - hppa_tlb_entry tlb[256]; + hppa_tlb_entry tlb[HPPA_TLB_ENTRIES]; uint32_t tlb_last; }; From patchwork Thu Aug 27 20:35:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 275334 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=-12.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, 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 87EADC433E1 for ; Thu, 27 Aug 2020 20:39:28 +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 45BA320825 for ; Thu, 27 Aug 2020 20:39:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="fJZyZnH1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 45BA320825 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:46964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBOgA-000163-MU for qemu-devel@archiver.kernel.org; Thu, 27 Aug 2020 16:39:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBOcN-0007lX-IH for qemu-devel@nongnu.org; Thu, 27 Aug 2020 16:35:31 -0400 Received: from mout.gmx.net ([212.227.15.18]:57651) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBOcJ-0001V6-T6 for qemu-devel@nongnu.org; Thu, 27 Aug 2020 16:35:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1598560521; bh=vw8bGZyavPiuNJqGPu8Pu9oaZpooKHADWrXrJJKoI0U=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=fJZyZnH1MW5uUA87T/FI9viuDipNgy+iW12yhC8v2Q1DysuQIQvKu+Sc9VD8cSCZ/ Pm3khQVOOVpEqNVk+ZzTCqiQl9LQx2LOIkp/bSPBYGBW3ck6ehVpehkBtBuHoFzjUg OVLiZ5g1qWTL2e9LMLBIfvy7PNvpxjta7mlps718= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from ls3530.fritz.box ([92.116.181.35]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MjS5A-1kruRX09hS-00kuTa; Thu, 27 Aug 2020 22:35:21 +0200 From: Helge Deller To: qemu-devel@nongnu.org Subject: [PATCH 3/5] hw/hppa: Store boot device in fw_cfg section Date: Thu, 27 Aug 2020 22:35:15 +0200 Message-Id: <20200827203517.29404-4-deller@gmx.de> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200827203517.29404-1-deller@gmx.de> References: <20200827203517.29404-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:y+BaNieFhgukXqtpKUmgv+nB7fnoH4zSRllYEicGmQmWPl+buGu FO0Fnx5obDUmYWkfb1zvrQwrWCth4CTQsYPQg/tU84JFcIPcTYD+RrHrPt5hOArAPgR6ChH MppUM/Gxmb9sRZu8x8zsOOx3LTIEJk2Vjv5BFF24ENNT0CLX6HQhcGk9jYna5TuZhq9jAGo vHnQk09mNzDDDWcrY2tRg== X-UI-Out-Filterresults: notjunk:1; V03:K0:5NhQpBOEF2I=:Xbijeik0xnGE9PVB3+aMyF 51Gk2RyLYAITE5c6ORYC44nC0Eu/HyD4/Ev79g96AmokDsju0LUtA2iqVy3RISoYO4SUGOGIM UFHsrhBpUkuhf2L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PEflOa7eYooat 7b+UYYxBPtXIVJQvi3Exfg8mY5xxz0c2NDEXPO3xwD1eAPr8GbiH8TShNk2O4K6DWZ9TpXt+h leRAfWKaG2mF9qSAh Received-SPF: pass client-ip=212.227.15.18; envelope-from=deller@gmx.de; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/27 16:35:24 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Helge Deller , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Helge Deller --- hw/hppa/machine.c | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.21.3 diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index e9d84d0f03..4b35afc9d5 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -58,6 +58,12 @@ static uint64_t cpu_hppa_to_phys(void *opaque, uint64_t addr) static HPPACPU *cpu[HPPA_MAX_CPUS]; static uint64_t firmware_entry; +static void fw_cfg_boot_set(void *opaque, const char *boot_device, + Error **errp) +{ + fw_cfg_modify_i16(opaque, FW_CFG_BOOT_DEVICE, boot_device[0]); +} + static FWCfgState *create_fw_cfg(MachineState *ms) { FWCfgState *fw_cfg; @@ -80,6 +86,9 @@ static FWCfgState *create_fw_cfg(MachineState *ms) fw_cfg_add_file(fw_cfg, "/etc/cpu/btlb_entries", g_memdup(&val, sizeof(val)), sizeof(val)); + fw_cfg_add_i16(fw_cfg, FW_CFG_BOOT_DEVICE, ms->boot_order[0]); + qemu_register_boot_set(fw_cfg_boot_set, fw_cfg); + return fw_cfg; } From patchwork Thu Aug 27 20:35:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 275333 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=-12.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, 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 A63BAC433E1 for ; Thu, 27 Aug 2020 20:39:40 +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 665EB20825 for ; Thu, 27 Aug 2020 20:39:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="jUzT+LAm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 665EB20825 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBOgN-0001Fd-FN for qemu-devel@archiver.kernel.org; Thu, 27 Aug 2020 16:39:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBOca-0007r5-2s for qemu-devel@nongnu.org; Thu, 27 Aug 2020 16:35:44 -0400 Received: from mout.gmx.net ([212.227.15.19]:50063) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBOcU-0001Wy-LC for qemu-devel@nongnu.org; Thu, 27 Aug 2020 16:35:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1598560521; bh=GfAPOzRoNtv6AQhGQrz6LyS411L8skaDZnE6D/yVaAY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=jUzT+LAmIwW95FLhGoGNus66afloudSMl2A4tb06DA0p6/jjoN3DE/avXAQSSsa7n OLdhSKtYgdbxNTNT7z6Cx6wEJMmmP+R4EGZt3Z3+pC7GOFpimWTddj2mFbbZ8bcK0l ibQbHQyPW2Tb1LWI3zBNjT6J9O+jhQeIWe9KLzhg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from ls3530.fritz.box ([92.116.181.35]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MdNY2-1kkjQv0qRc-00ZO9w; Thu, 27 Aug 2020 22:35:21 +0200 From: Helge Deller To: qemu-devel@nongnu.org Subject: [PATCH 4/5] hw/hppa: Inform SeaBIOS about fw_cfg port address Date: Thu, 27 Aug 2020 22:35:16 +0200 Message-Id: <20200827203517.29404-5-deller@gmx.de> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200827203517.29404-1-deller@gmx.de> References: <20200827203517.29404-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:Sv4H8Z5VfW29P/71RunDSvZ0S3eb9+SxNIw1KsLfvBpS8nH5XJ3 doLxzBukwebbKRpawbZF+c6Oux7k/SVGvYRu4SdIBGIcdfZVKYjdAPkrWkremEy+kNG1pUS 5ad+SbMwUwV3b1XlY18UhJDu/pRYmkIa54AhuAlZu8Sfab9RmiLzTrTHleMw9XtO4OE8Ai6 3yI66GfPyxZF8h7MKwf3w== X-UI-Out-Filterresults: notjunk:1; V03:K0:xtIir5blvKA=:m5JAW6vEETSj3t5mvNr5VT ffUYIlVJ35W5XuxblfIQHHzFjnC/TMRvjpkyWeXLf47quswbkUVn/JATNcac53w+4frxV+hot RqLg3g/Z7tY7yVa2VbyhS3kEIeicFiJk943tjouEHYPGDYRM7GsdEv1nciW3HtFjZdO30GNSh GyVElkUsG+1Gt9mk5Q1kJSKzpVlhRN+im7xVwTQcts1we7YuOxPPVEr7dtdj1pbXRWJ8H+O31 bUovow6W2kA3lqHM/krInLYXehjxeFctEJC/UMQeb0pW4q5Mn857EKEhCnP+KbHbcyerROXs8 H0LtRMJ0PiScGdU6idemzaVSKolhWxUkQbu5doUiLgM3Pp7WmE841rw8wqOXQCYtA/lVZ2Gs5 aazgnngM+ylIwW7BS5kmXuzhLVJkcWehZ5alzap7yocLmx8A/syWW7Tjxl2xi7cI/ogPTK7+7 3hF5R1Fvy1HIrkE6z6SeFm8xLIrQJISuD2UmQBlRnclAIYIh7Ex8pzzSnyQ1LJXz/pITATynA 6H+3E1CYU/BCwwsWDMV5mBOZOerKPFRerV4Vat9o7KaCROh+incsE39bguwnHdfV8hsIwPhri 39jaN8GgsNtgPGbNbXAm/2PMn9dYVBjvrrLgBL9w811GDV02oqllVrGVDlO/62QdBohZ2NFEx u0lNnqwbeL98a1Eh2HmpjckjlprnBbew/LcKagbWkUsuZGGLMHpXBTFqreoSFWGwv3CMt4dwd IZOlu6LZzQHtUcRVIF/UiC1sODcMtEehexxanIucoMTYFT240kiTMgklMQxQbECAqdvUKBr4k /c9cWvCaixL6n7IJzUr8SdsS//UTFZSooBbJt1+Oq0DgSZrF3JkOLAJ3qWBr5DcrnoL6wN4PB hFStkjBhLKxJo7mcik4o+zRipjqjfzSR3ooBDFG7lGf37K9R7p3DSGtb4vt+Uhi9uc7lYIYR/ zWn1lc1X3ZMs3venYtrtPOI6C2UhbrO4XZAAEHHlD/NGhygFhkM3AnB9Km/+tsi4XNwtlpeoK O+0ECRzmB8MCdhIMy7lVABDugATEPtteNNQfYOqkwq4Hphht10laLgoxUHSFqEXISaGLukYqz +Tc5Yxvef10+KLk0yC8VilLutxLSozoCuLEraVu955fW6YCh4K6RqjjT+61pI7Vn0PPxmbwp2 Jg2olQqGsFoxMfi8QGfiMWX242/mM+msfeYO7i3NlPvuUpVIGnYc2mKwnLSCham4BgD4QyMWQ yg3q0jwf7rt9BoZOp Received-SPF: pass client-ip=212.227.15.19; envelope-from=deller@gmx.de; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/27 16:35:28 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Helge Deller , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Helge Deller --- hw/hppa/hppa_hardware.h | 3 +-- hw/hppa/machine.c | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) -- 2.21.3 diff --git a/hw/hppa/hppa_hardware.h b/hw/hppa/hppa_hardware.h index cdb7fa6240..bc258895c9 100644 --- a/hw/hppa/hppa_hardware.h +++ b/hw/hppa/hppa_hardware.h @@ -38,8 +38,7 @@ #define PORT_PCI_CMD (PCI_HPA + DINO_PCI_ADDR) #define PORT_PCI_DATA (PCI_HPA + DINO_CONFIG_DATA) -/* QEMU fw_cfg interface port */ -#define QEMU_FW_CFG_IO_BASE (MEMORY_HPA + 0x80) +#define FW_CFG_IO_BASE 0xfffa0000 #define PORT_SERIAL1 (DINO_UART_HPA + 0x800) #define PORT_SERIAL2 (LASI_UART_HPA + 0x800) diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index 4b35afc9d5..2bed49807b 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -69,7 +69,7 @@ static FWCfgState *create_fw_cfg(MachineState *ms) FWCfgState *fw_cfg; uint64_t val; - fw_cfg = fw_cfg_init_mem(QEMU_FW_CFG_IO_BASE, QEMU_FW_CFG_IO_BASE + 4); + fw_cfg = fw_cfg_init_mem(FW_CFG_IO_BASE, FW_CFG_IO_BASE + 4); fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, ms->smp.cpus); fw_cfg_add_i16(fw_cfg, FW_CFG_MAX_CPUS, HPPA_MAX_CPUS); fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, ram_size); @@ -290,6 +290,9 @@ static void machine_hppa_init(MachineState *machine) /* tell firmware how many SMP CPUs to present in inventory table */ cpu[0]->env.gr[21] = smp_cpus; + + /* tell firmware fw_cfg port */ + cpu[0]->env.gr[19] = FW_CFG_IO_BASE; } static void hppa_machine_reset(MachineState *ms) @@ -317,6 +320,8 @@ static void hppa_machine_reset(MachineState *ms) cpu[0]->env.gr[24] = 'c'; /* gr22/gr23 unused, no initrd while reboot. */ cpu[0]->env.gr[21] = smp_cpus; + /* tell firmware fw_cfg port */ + cpu[0]->env.gr[19] = FW_CFG_IO_BASE; }