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 FO0Fnx5obDUmYWkfb1zvrQwrWCth4CTQsY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kqwG Ys6GpTCDWs3whzX55vbG/lRvnVwCcFXViOfr4GfqQ31cXabrnNu6Av6gVOzp+F39/1bSnhZ7a bOYUzmpSZi1h6jETLmxZ9pxqW3VDNPY1cpBm7vdHUCCd9zk2GuChbgH/9r3rs+ohIp8nobbaW 6i5QCUob9NTPud0fhROXjKrqkL6kXYXQtiAm7JcbAI+kRk5fKnaBWa4XoBAcMbc2hswt7WrLM /QkhmQxQMP8tmGA7lZZC2LheCKSG3mSugSIYU+vrRn09CuUALqg/XPGLKdyxPEflOa7eYooat 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; }