From patchwork Mon Oct 26 14:30:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 302017 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=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 A3314C2D0A3 for ; Mon, 26 Oct 2020 14:36:07 +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 1AFAC20780 for ; Mon, 26 Oct 2020 14:36:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bFNtNGqX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1AFAC20780 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3bS-0000ze-6i for qemu-devel@archiver.kernel.org; Mon, 26 Oct 2020 10:36:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX3W7-00042a-MR for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:32522) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kX3W6-0007yc-1N for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603722633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4Koqn9GJy0PBFiRRv3ablUTRY7jW5iM9Vw5JfK16g7U=; b=bFNtNGqXv4HQ6YvunhX1/Mku20JRuhmAZB/98KG/I2R+8uTGdGo8WKGZ77f4sFefO3VI6G bZNAqbM5EqjzhyrcUeHqJxHLry7nGrjlhtCcFYCAPIZMA734lL9IpYflNGpDaefxRZnMRN X8NT6X5nvhAQOqATNVE4cZdtbkD4wQw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-278-X2Tq6n_-PbKZV_rGYpPIBQ-1; Mon, 26 Oct 2020 10:30:31 -0400 X-MC-Unique: X2Tq6n_-PbKZV_rGYpPIBQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EDA00101F7A5; Mon, 26 Oct 2020 14:30:29 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9E1351002391; Mon, 26 Oct 2020 14:30:29 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 01/15] alpha: remove bios_name Date: Mon, 26 Oct 2020 10:30:14 -0400 Message-Id: <20201026143028.3034018-2-pbonzini@redhat.com> In-Reply-To: <20201026143028.3034018-1-pbonzini@redhat.com> References: <20201026143028.3034018-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/25 21:03:19 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=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: Richard Henderson , philmd@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Cc: Richard Henderson Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- hw/alpha/dp264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c index 4d24518d1d..c4d407a9f1 100644 --- a/hw/alpha/dp264.c +++ b/hw/alpha/dp264.c @@ -107,7 +107,7 @@ static void clipper_init(MachineState *machine) but one explicitly written for the emulation, we might as well load it directly from and ELF image. */ palcode_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, - bios_name ? bios_name : "palcode-clipper"); + machine->firmware ?: "palcode-clipper"); if (palcode_filename == NULL) { error_report("no palcode provided"); exit(1); From patchwork Mon Oct 26 14:30:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 302014 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=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 6496EC4363A for ; Mon, 26 Oct 2020 14:38:43 +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 0487E2168B for ; Mon, 26 Oct 2020 14:38:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DVzlRx/b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0487E2168B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3dy-0004ex-33 for qemu-devel@archiver.kernel.org; Mon, 26 Oct 2020 10:38:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX3W9-00044m-Rn for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:38323) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kX3W6-0007yh-Lu for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603722633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r3li5OQv5njVdQAQl/B/nGvaueuiWERo40ET4aTjiwQ=; b=DVzlRx/bHiaEBGQCe7iUfc+XXm5aMy5jfFXDMNmE9MZHAK68nzMqHFhaLidd57hB8FqiWY tr7ROFYLiuItkE6Cqoh6crUygq+0j8MIh4HxDgBN5TIRpZCY0EBaPXkc/I6RL04gqh8rLs lYMJL6b8p3xObckIh/dFMb5bJi/TFy4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-228-MnmpeqPjPfytuj5mBIh7Tg-1; Mon, 26 Oct 2020 10:30:31 -0400 X-MC-Unique: MnmpeqPjPfytuj5mBIh7Tg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C22591016CE6; Mon, 26 Oct 2020 14:30:30 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 702C010021AA; Mon, 26 Oct 2020 14:30:30 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 03/15] arm: remove bios_name Date: Mon, 26 Oct 2020 10:30:16 -0400 Message-Id: <20201026143028.3034018-4-pbonzini@redhat.com> In-Reply-To: <20201026143028.3034018-1-pbonzini@redhat.com> References: <20201026143028.3034018-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/25 21:03:19 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=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: Peter Maydell , philmd@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Get the firmware name from the MachineState object. Cc: Peter Maydell Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée --- hw/arm/cubieboard.c | 2 +- hw/arm/highbank.c | 8 ++++---- hw/arm/npcm7xx_boards.c | 5 +---- hw/arm/orangepi.c | 2 +- hw/arm/sbsa-ref.c | 2 ++ hw/arm/vexpress.c | 8 ++++---- hw/arm/virt.c | 2 ++ 7 files changed, 15 insertions(+), 14 deletions(-) diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c index 1c6c792eb6..9d0d728180 100644 --- a/hw/arm/cubieboard.c +++ b/hw/arm/cubieboard.c @@ -40,7 +40,7 @@ static void cubieboard_init(MachineState *machine) DeviceState *carddev; /* BIOS is not supported by this board */ - if (bios_name) { + if (machine->firmware) { error_report("BIOS not supported for this machine"); exit(1); } diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c index da0510d7ce..8c18971790 100644 --- a/hw/arm/highbank.c +++ b/hw/arm/highbank.c @@ -295,16 +295,16 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id) memory_region_init_ram(sysram, NULL, "highbank.sysram", 0x8000, &error_fatal); memory_region_add_subregion(sysmem, 0xfff88000, sysram); - if (bios_name != NULL) { - sysboot_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); + if (machine->firmware != NULL) { + sysboot_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, machine->firmware); if (sysboot_filename != NULL) { if (load_image_targphys(sysboot_filename, 0xfff88000, 0x8000) < 0) { - error_report("Unable to load %s", bios_name); + error_report("Unable to load %s", machine->firmware); exit(1); } g_free(sysboot_filename); } else { - error_report("Unable to find %s", bios_name); + error_report("Unable to find %s", machine->firmware); exit(1); } } diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c index 79e2e2744c..9821013bc6 100644 --- a/hw/arm/npcm7xx_boards.c +++ b/hw/arm/npcm7xx_boards.c @@ -33,13 +33,10 @@ static const char npcm7xx_default_bootrom[] = "npcm7xx_bootrom.bin"; static void npcm7xx_load_bootrom(MachineState *machine, NPCM7xxState *soc) { + const char *bios_name = machine->firmware ?: npcm7xx_default_bootrom; g_autofree char *filename = NULL; int ret; - if (!bios_name) { - bios_name = npcm7xx_default_bootrom; - } - filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); if (!filename) { error_report("Could not find ROM image '%s'", bios_name); diff --git a/hw/arm/orangepi.c b/hw/arm/orangepi.c index 17a568a2b4..d6306dfdda 100644 --- a/hw/arm/orangepi.c +++ b/hw/arm/orangepi.c @@ -41,7 +41,7 @@ static void orangepi_init(MachineState *machine) DeviceState *carddev; /* BIOS is not supported by this board */ - if (bios_name) { + if (machine->firmware) { error_report("BIOS not supported for this machine"); exit(1); } diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index 01863510d0..8372ed901d 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -294,6 +294,7 @@ static bool sbsa_firmware_init(SBSAMachineState *sms, MemoryRegion *sysmem, MemoryRegion *secure_sysmem) { + const char *bios_name; int i; BlockBackend *pflash_blk0; @@ -307,6 +308,7 @@ static bool sbsa_firmware_init(SBSAMachineState *sms, pflash_blk0 = pflash_cfi01_get_blk(sms->flash[0]); + bios_name = MACHINE(sms)->firmware; if (bios_name) { char *fname; MemoryRegion *mr; diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index 531f3a122a..1adb663d77 100644 --- a/hw/arm/vexpress.c +++ b/hw/arm/vexpress.c @@ -560,7 +560,7 @@ static void vexpress_common_init(MachineState *machine) /* * If a bios file was provided, attempt to map it into memory */ - if (bios_name) { + if (machine->firmware) { char *fn; int image_size; @@ -570,16 +570,16 @@ static void vexpress_common_init(MachineState *machine) "but you cannot use both options at once"); exit(1); } - fn = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); + fn = qemu_find_file(QEMU_FILE_TYPE_BIOS, machine->firmware); if (!fn) { - error_report("Could not find ROM image '%s'", bios_name); + error_report("Could not find ROM image '%s'", machine->firmware); exit(1); } image_size = load_image_targphys(fn, map[VE_NORFLASH0], VEXPRESS_FLASH_SIZE); g_free(fn); if (image_size < 0) { - error_report("Could not load ROM image '%s'", bios_name); + error_report("Could not load ROM image '%s'", machine->firmware); exit(1); } } diff --git a/hw/arm/virt.c b/hw/arm/virt.c index e465a988d6..5c7e3d18db 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1047,6 +1047,7 @@ static bool virt_firmware_init(VirtMachineState *vms, MemoryRegion *secure_sysmem) { int i; + const char *bios_name; BlockBackend *pflash_blk0; /* Map legacy -drive if=pflash to machine properties */ @@ -1059,6 +1060,7 @@ static bool virt_firmware_init(VirtMachineState *vms, pflash_blk0 = pflash_cfi01_get_blk(vms->flash[0]); + bios_name = MACHINE(vms)->firmware; if (bios_name) { char *fname; MemoryRegion *mr; From patchwork Mon Oct 26 14:30:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 302018 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=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 B1118C55178 for ; Mon, 26 Oct 2020 14:33:42 +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 4157920780 for ; Mon, 26 Oct 2020 14:33:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="RO+v9Nb3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4157920780 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:48230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3Z7-00061J-4n for qemu-devel@archiver.kernel.org; Mon, 26 Oct 2020 10:33:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX3WA-00046l-Os for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:44363) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kX3W8-0007zB-2i for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603722635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rX+Fb0ofI4sAprt4OiKFl2wdVtmp7wSTpoUMdVCDy+w=; b=RO+v9Nb3NcUv+hM4/qydMhKIT9u5NUQB6l5RVlR7XiwCVN2PANAfrLxaUX77UqP3t69qYm 2voIxkfXSj/sJjlR2Lz3PHsBdJSzwy0WoTCsTBz1cGUfQKZxpkfsAxxVl3O4NTEbEipFLo r9lOTum0LROnpNwdpxPka1MBlsDAux0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-220-hYv36cAiMQahscFDH9itSg-1; Mon, 26 Oct 2020 10:30:32 -0400 X-MC-Unique: hYv36cAiMQahscFDH9itSg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 39192804320; Mon, 26 Oct 2020 14:30:31 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id DB932104326F; Mon, 26 Oct 2020 14:30:30 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 04/15] hppa: remove bios_name Date: Mon, 26 Oct 2020 10:30:17 -0400 Message-Id: <20201026143028.3034018-5-pbonzini@redhat.com> In-Reply-To: <20201026143028.3034018-1-pbonzini@redhat.com> References: <20201026143028.3034018-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/25 21:03:19 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=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: Richard Henderson , philmd@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Cc: Richard Henderson Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- hw/hppa/machine.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index d5164457ee..5e745d5ea9 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -213,8 +213,7 @@ static void machine_hppa_init(MachineState *machine) but one explicitly written for the emulation, we might as well load it directly from an ELF image. */ firmware_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, - bios_name ? bios_name : - "hppa-firmware.img"); + machine->firmware ?: "hppa-firmware.img"); if (firmware_filename == NULL) { error_report("no firmware provided"); exit(1); From patchwork Mon Oct 26 14:30:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 302016 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=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS 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 21099C2D0A3 for ; Mon, 26 Oct 2020 14:36:15 +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 6D66620780 for ; Mon, 26 Oct 2020 14:36:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hnuWwYpa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D66620780 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3bZ-00017z-Gb for qemu-devel@archiver.kernel.org; Mon, 26 Oct 2020 10:36:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX3W9-000448-B6 for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36545) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kX3W7-0007yz-8R for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603722634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HGz4sZRZl+4wxAmY2w5b8flBmG5J6M3AZqNYoVUladM=; b=hnuWwYpauXiVeHcFgykQWRdiKBETvYzMnBHyLMcB2qu6g/Xi/0kqS2q0rY5ZoOk08TexLH 4kim+I7Zqj4Y6f+t9WWyO6KIM7JThwALnbdtZ4raTkJrf+NsoMdhLw+yc6ZYuGdOst/l9c FQ28b5ud2YiHhuU5HYWN1/MIui4PKp0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-39-j_f8yrT7OJOvyd7xyx1zYA-1; Mon, 26 Oct 2020 10:30:32 -0400 X-MC-Unique: j_f8yrT7OJOvyd7xyx1zYA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 938741016CF0 for ; Mon, 26 Oct 2020 14:30:31 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 526341002391; Mon, 26 Oct 2020 14:30:31 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 05/15] i386: remove bios_name Date: Mon, 26 Oct 2020 10:30:18 -0400 Message-Id: <20201026143028.3034018-6-pbonzini@redhat.com> In-Reply-To: <20201026143028.3034018-1-pbonzini@redhat.com> References: <20201026143028.3034018-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/26 02:39:09 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=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: philmd@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée --- hw/i386/microvm.c | 7 +++---- hw/i386/pc_sysfw.c | 4 ++-- hw/i386/x86.c | 10 ++++------ include/hw/i386/x86.h | 3 ++- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 5428448b70..6cda3014d6 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -154,6 +154,7 @@ static void create_gpex(MicrovmMachineState *mms) static void microvm_devices_init(MicrovmMachineState *mms) { + const char *default_firmware; X86MachineState *x86ms = X86_MACHINE(mms); ISABus *isa_bus; ISADevice *rtc_state; @@ -259,12 +260,10 @@ static void microvm_devices_init(MicrovmMachineState *mms) serial_hds_isa_init(isa_bus, 0, 1); } - if (bios_name == NULL) { - bios_name = x86_machine_is_acpi_enabled(x86ms) + default_firmware = x86_machine_is_acpi_enabled(x86ms) ? MICROVM_BIOS_FILENAME : MICROVM_QBOOT_FILENAME; - } - x86_bios_rom_init(get_system_memory(), true); + x86_bios_rom_init(MACHINE(mms), default_firmware, get_system_memory(), true); } static void microvm_memory_init(MicrovmMachineState *mms) diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c index b6c0822fe3..0187f0a934 100644 --- a/hw/i386/pc_sysfw.c +++ b/hw/i386/pc_sysfw.c @@ -222,7 +222,7 @@ void pc_system_firmware_init(PCMachineState *pcms, BlockBackend *pflash_blk[ARRAY_SIZE(pcms->flash)]; if (!pcmc->pci_enabled) { - x86_bios_rom_init(rom_memory, true); + x86_bios_rom_init(MACHINE(pcms), "bios.bin", rom_memory, true); return; } @@ -243,7 +243,7 @@ void pc_system_firmware_init(PCMachineState *pcms, if (!pflash_blk[0]) { /* Machine property pflash0 not set, use ROM mode */ - x86_bios_rom_init(rom_memory, false); + x86_bios_rom_init(MACHINE(pcms), "bios.bin", rom_memory, false); } else { if (kvm_enabled() && !kvm_readonly_mem_enabled()) { /* diff --git a/hw/i386/x86.c b/hw/i386/x86.c index 5944fc44ed..836d388248 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -54,8 +54,6 @@ #include CONFIG_DEVICES #include "kvm_i386.h" -#define BIOS_FILENAME "bios.bin" - /* Physical Address of PVH entry point read from kernel ELF NOTE */ static size_t pvh_start_addr; @@ -1051,17 +1049,17 @@ void x86_load_linux(X86MachineState *x86ms, nb_option_roms++; } -void x86_bios_rom_init(MemoryRegion *rom_memory, bool isapc_ram_fw) +void x86_bios_rom_init(MachineState *ms, const char *default_firmware, + MemoryRegion *rom_memory, bool isapc_ram_fw) { + const char *bios_name; char *filename; MemoryRegion *bios, *isa_bios; int bios_size, isa_bios_size; int ret; /* BIOS load */ - if (bios_name == NULL) { - bios_name = BIOS_FILENAME; - } + bios_name = ms->firmware ?: default_firmware; filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); if (filename) { bios_size = get_image_size(filename); diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h index bfa9cb2a25..e92ddeaed1 100644 --- a/include/hw/i386/x86.h +++ b/include/hw/i386/x86.h @@ -101,7 +101,8 @@ void x86_cpu_unplug_request_cb(HotplugHandler *hotplug_dev, void x86_cpu_unplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp); -void x86_bios_rom_init(MemoryRegion *rom_memory, bool isapc_ram_fw); +void x86_bios_rom_init(MachineState *ms, const char *default_firmware, + MemoryRegion *rom_memory, bool isapc_ram_fw); void x86_load_linux(X86MachineState *x86ms, FWCfgState *fw_cfg, From patchwork Mon Oct 26 14:30:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 302015 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=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS 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 53426C4363A for ; Mon, 26 Oct 2020 14:38:39 +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 EE3432168B for ; Mon, 26 Oct 2020 14:38:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="EEdYg7Qe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EE3432168B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3du-0004Wo-2F for qemu-devel@archiver.kernel.org; Mon, 26 Oct 2020 10:38:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX3WB-00047a-4f for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:45111) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kX3W9-0007zW-Ad for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603722636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KXOCfimPTpAKQGEmMMCUZMn3gdqTKwWHbweGzqMtqK8=; b=EEdYg7QepZRGp7DJn9/+nnRkhijlu3Ku5DCaPHOziMJ1r7t+ymkUKMiVK9LmDRbX1/+Beu cyCBvJC8CJVYWlCm0QCbnRaTOXXIRJX87BmQkQtPiO40NAtiRmD9bkdK+AK7iQoSst3W5Q JrnGzuoKHkrgib632cyHXi+MPmznG7E= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-402-ISV44jd3M2uj4aJyiL_X7Q-1; Mon, 26 Oct 2020 10:30:34 -0400 X-MC-Unique: ISV44jd3M2uj4aJyiL_X7Q-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 51E0F1800D42 for ; Mon, 26 Oct 2020 14:30:33 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 118D510021AA; Mon, 26 Oct 2020 14:30:33 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 09/15] moxie: remove bios_name Date: Mon, 26 Oct 2020 10:30:22 -0400 Message-Id: <20201026143028.3034018-10-pbonzini@redhat.com> In-Reply-To: <20201026143028.3034018-1-pbonzini@redhat.com> References: <20201026143028.3034018-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=63.128.21.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/25 21:03:19 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=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: philmd@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée --- hw/moxie/moxiesim.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/moxie/moxiesim.c b/hw/moxie/moxiesim.c index a765e9f6be..d07d504c0d 100644 --- a/hw/moxie/moxiesim.c +++ b/hw/moxie/moxiesim.c @@ -133,9 +133,9 @@ static void moxiesim_init(MachineState *machine) loader_params.initrd_filename = initrd_filename; load_kernel(cpu, &loader_params); } - if (bios_name) { - if (load_image_targphys(bios_name, FIRMWARE_BASE, FIRMWARE_SIZE) < 0) { - error_report("Failed to load firmware '%s'", bios_name); + if (machine->firmware) { + if (load_image_targphys(machine->firmware, FIRMWARE_BASE, FIRMWARE_SIZE) < 0) { + error_report("Failed to load firmware '%s'", machine->firmware); } } From patchwork Mon Oct 26 14:30:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 302013 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=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS 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 5F933C4363A for ; Mon, 26 Oct 2020 14:41:33 +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 05C7D2168B for ; Mon, 26 Oct 2020 14:41:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hLulACsS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 05C7D2168B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3gi-00087W-2A for qemu-devel@archiver.kernel.org; Mon, 26 Oct 2020 10:41:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX3WC-0004AJ-M3 for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:46387) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kX3WA-0007zt-R9 for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603722638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rDdDqJVLC/h+U8bbNB21NrI6c1AJxdnI3Ofzcz2HJeE=; b=hLulACsSFuZSPKdoQ0owIYpD0n8v1rxHGBvgj9r2c1LyRvbt/Wm70B0IE5dvGKKK094Roi oYvHWyCoZrujeqaEQyMin/aADzvQ01C+UNQd7lhw8zrR0g0MZ4q8pT3m+/E6/abcwVSolL 9meg58kI7bdWzTG3cgX0jbIkh1Wp2Ns= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-5-c96D8TY-Or61MRju1LnCSQ-1; Mon, 26 Oct 2020 10:30:35 -0400 X-MC-Unique: c96D8TY-Or61MRju1LnCSQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AB443101F7AB for ; Mon, 26 Oct 2020 14:30:34 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 679245C1DC; Mon, 26 Oct 2020 14:30:34 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 11/15] rx: move BIOS load from MCU to board Date: Mon, 26 Oct 2020 10:30:24 -0400 Message-Id: <20201026143028.3034018-12-pbonzini@redhat.com> In-Reply-To: <20201026143028.3034018-1-pbonzini@redhat.com> References: <20201026143028.3034018-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/26 02:39:09 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=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: philmd@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The ROM loader state is global and not part of the MCU, and the BIOS is in machine->firmware. So just like the kernel case, load it in the board. Cc: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- hw/rx/rx-gdbsim.c | 7 +++++++ hw/rx/rx62n.c | 9 --------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c index 417ec0564b..040006c1c5 100644 --- a/hw/rx/rx-gdbsim.c +++ b/hw/rx/rx-gdbsim.c @@ -142,6 +142,13 @@ static void rx_gdbsim_init(MachineState *machine) /* Set dtb address to R1 */ RX_CPU(first_cpu)->env.regs[1] = SDRAM_BASE + dtb_offset; } + } else { + if (machine->firmware) { + rom_add_file_fixed(machine->firmware, RX62N_CFLASH_BASE, 0); + } else if (!qtest_enabled()) { + error_report("No bios or kernel specified"); + exit(1); + } } } diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c index 6eb4eea700..17ec73fc7b 100644 --- a/hw/rx/rx62n.c +++ b/hw/rx/rx62n.c @@ -245,15 +245,6 @@ static void rx62n_realize(DeviceState *dev, Error **errp) rxc->rom_flash_size, &error_abort); memory_region_add_subregion(s->sysmem, RX62N_CFLASH_BASE, &s->c_flash); - if (!s->kernel) { - if (bios_name) { - rom_add_file_fixed(bios_name, RX62N_CFLASH_BASE, 0); - } else if (!qtest_enabled()) { - error_report("No bios or kernel specified"); - exit(1); - } - } - /* Initialize CPU */ object_initialize_child(OBJECT(s), "cpu", &s->cpu, TYPE_RX62N_CPU); qdev_realize(DEVICE(&s->cpu), NULL, &error_abort);