From nobody Wed Nov 27 17:55:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1697756120; cv=none; d=zohomail.com; s=zohoarc; b=Xmvw3bOCHAqbopCH/N/mC7jPji//357jKJlYKP+SRvrPfpvc2Fe714T4PUXIqGayasbxebXznE28I3IO2wg10kkPOWcQBgQEA8XCkVYbmKGCeUIVfPAtjQbzMGs8zrVGRK7fn2ILQiQTSOZazsmme7iq28l463d0WBRvOgzGAuY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697756120; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6LZN+zubmHhO+uaM+6D6uVzUtBbayKZ2lae9p9VSofI=; b=YEtJqKHd8xvRB3T3tDRhxsymxlf3v2pLi19h1K+nwwTFAS3UifBOVy60pNHVvNXl3iKZbt7dJcpJz3bAdhtB0Wg2m6EVbTxgkVUHuhAxKqEBZZKsm90K8ZCcmGhabgFN3hBbXXo/OopRmB8LgP/zoDDDw9x/lRZSmsjalvo4Inc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697756120256799.6415327557694; Thu, 19 Oct 2023 15:55:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtbtI-00088D-8u; Thu, 19 Oct 2023 18:53:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtbtG-00086m-QR for qemu-devel@nongnu.org; Thu, 19 Oct 2023 18:53:18 -0400 Received: from dfw.source.kernel.org ([139.178.84.217]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtbtF-0002fg-6H for qemu-devel@nongnu.org; Thu, 19 Oct 2023 18:53:18 -0400 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 5E4E261DC9; Thu, 19 Oct 2023 22:53:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8904C433CA; Thu, 19 Oct 2023 22:53:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697755995; bh=LtsT3+C0oZ5sExfPYx4Q4kZBMR5ZW+7e31OtsUD5Rzo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o3SJE88dBFhCbXqg3BNN6MYeVGATJ56DpKNX/uFD97tw89WUa4DSfkh8x4AtMEn2X +jq50xy5vSoArwhML+ez3tLkYhvKW/MBkJ82ntMFnSS1zqVFj3sPTxIZp1ymVWBcW9 VDaOD95o1u0YXTAs8fTM1+ouiiT/aNp/nelWNUDdpYvyM4K93I/376gC8C3NFiGr86 +O5ALxUqtJSwUtOYefQl7rFwgNQRdAeXjUP/IAPEBiHw4E084T61P6GZB350xYHH3g LjHGd0tW4UK7AhRVobO4Eel//rULvi+9efibL7KHRKjBk8vlMO3+SCiH/a5JpNffUg rSe1HbK1L8F9Q== From: deller@kernel.org To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Helge Deller , Richard Henderson Subject: [PULL 08/11] hw/hppa: Export machine name, BTLBs, power-button address via fw_cfg Date: Fri, 20 Oct 2023 00:52:54 +0200 Message-ID: <20231019225257.383071-9-deller@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231019225257.383071-1-deller@kernel.org> References: <20231019225257.383071-1-deller@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=139.178.84.217; envelope-from=deller@kernel.org; helo=dfw.source.kernel.org X-Spam_score_int: -70 X-Spam_score: -7.1 X-Spam_bar: ------- X-Spam_report: (-7.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_HI=-5, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1697756121203100001 Content-Type: text/plain; charset="utf-8" From: Helge Deller Provide necessary info to SeaBIOS-hppa. Signed-off-by: Helge Deller --- hw/hppa/machine.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index c6d8deffcf..de925259ea 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -118,11 +118,13 @@ static void fw_cfg_boot_set(void *opaque, const char = *boot_device, fw_cfg_modify_i16(opaque, FW_CFG_BOOT_DEVICE, boot_device[0]); } =20 -static FWCfgState *create_fw_cfg(MachineState *ms) +static FWCfgState *create_fw_cfg(MachineState *ms, PCIBus *pci_bus) { FWCfgState *fw_cfg; uint64_t val; const char qemu_version[] =3D QEMU_VERSION; + MachineClass *mc =3D MACHINE_GET_CLASS(ms); + int len; =20 fw_cfg =3D 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); @@ -137,8 +139,20 @@ static FWCfgState *create_fw_cfg(MachineState *ms) fw_cfg_add_file(fw_cfg, "/etc/cpu/tlb_entries", g_memdup(&val, sizeof(val)), sizeof(val)); =20 + val =3D cpu_to_le64(HPPA_BTLB_ENTRIES); + fw_cfg_add_file(fw_cfg, "/etc/cpu/btlb_entries", + g_memdup(&val, sizeof(val)), sizeof(val)); + + len =3D strlen(mc->name) + 1; + fw_cfg_add_file(fw_cfg, "/etc/hppa/machine", + g_memdup(mc->name, len), len); + val =3D cpu_to_le64(HPA_POWER_BUTTON); - fw_cfg_add_file(fw_cfg, "/etc/power-button-addr", + fw_cfg_add_file(fw_cfg, "/etc/hppa/power-button-addr", + g_memdup(&val, sizeof(val)), sizeof(val)); + + val =3D cpu_to_le64(CPU_HPA + 24); + fw_cfg_add_file(fw_cfg, "/etc/hppa/DebugOutputPort", g_memdup(&val, sizeof(val)), sizeof(val)); =20 fw_cfg_add_i16(fw_cfg, FW_CFG_BOOT_DEVICE, ms->boot_config.order[0]); @@ -148,6 +162,8 @@ static FWCfgState *create_fw_cfg(MachineState *ms) g_memdup(qemu_version, sizeof(qemu_version)), sizeof(qemu_version)); =20 + fw_cfg_add_extra_pci_roots(pci_bus, fw_cfg); + return fw_cfg; } =20 @@ -250,7 +266,7 @@ static void machine_hppa_init(MachineState *machine) parallel_hds[0]); =20 /* fw_cfg configuration interface */ - create_fw_cfg(machine); + create_fw_cfg(machine, pci_bus); =20 /* SCSI disk setup. */ dev =3D DEVICE(pci_create_simple(pci_bus, -1, "lsi53c895a")); --=20 2.41.0