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: 1387800 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bFNtNGqX; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CKcmz67xMz9sV0 for ; Tue, 27 Oct 2020 01:34:57 +1100 (AEDT) Received: from localhost ([::1]:52102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3aH-0007cE-SU for incoming@patchwork.ozlabs.org; Mon, 26 Oct 2020 10:34:53 -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+incoming=patchwork.ozlabs.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:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1387796 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ENSUSzPV; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CKcjc2Rmwz9sRK for ; Tue, 27 Oct 2020 01:32:04 +1100 (AEDT) Received: from localhost ([::1]:44076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3XW-000459-8M for incoming@patchwork.ozlabs.org; Mon, 26 Oct 2020 10:32:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX3W8-00042w-Fg for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:31704) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kX3W6-0007ye-Ki for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:36 -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=zqsl7zZ6X1tK0MSIXvFwmd7obaqTWznFlFsRMz4wnrU=; b=ENSUSzPVgZkfmsmZRePkj8HhqTPFJMnZRQ7261MjcHDNHUmPV8VbCi3D/Ubgd2z6qXSszJ heGF+4ocNQMYmhZyNJ5nh9wezz1Aw0QlZaFYaIcL+10sJbKuVgNcM0Zkom6RJODOrn+XmP 2GXdu8nq92Ffgxh7ROxa2xqXICq9hIs= 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-581-N_jYoP8VOQSh_x0yGPcL9g-1; Mon, 26 Oct 2020 10:30:31 -0400 X-MC-Unique: N_jYoP8VOQSh_x0yGPcL9g-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 555FDCFF26; 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 1406A104326F; Mon, 26 Oct 2020 14:30:30 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 02/15] digic: stash firmware into DigicState Date: Mon, 26 Oct 2020 10:30:15 -0400 Message-Id: <20201026143028.3034018-3-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: Peter Maydell , philmd@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Prepare for removing bios_name. Cc: Peter Maydell Signed-off-by: Paolo Bonzini --- hw/arm/digic_boards.c | 5 +++-- include/hw/arm/digic.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c index d5524d3e72..d320b54c44 100644 --- a/hw/arm/digic_boards.c +++ b/hw/arm/digic_boards.c @@ -55,6 +55,7 @@ static void digic4_board_init(MachineState *machine, DigicBoard *board) DigicState *s = DIGIC(object_new(TYPE_DIGIC)); MachineClass *mc = MACHINE_GET_CLASS(machine); + s->firmware = machine->firmware; if (machine->ram_size != mc->default_ram_size) { char *sz = size_to_str(mc->default_ram_size); error_report("Invalid RAM size, should be %s", sz); @@ -91,8 +92,8 @@ static void digic_load_rom(DigicState *s, hwaddr addr, return; } - if (bios_name) { - filename = bios_name; + if (s->firmware) { + filename = s->firmware; } else { filename = def_filename; } diff --git a/include/hw/arm/digic.h b/include/hw/arm/digic.h index 8f2735c284..421dae937e 100644 --- a/include/hw/arm/digic.h +++ b/include/hw/arm/digic.h @@ -36,6 +36,7 @@ struct DigicState { ARMCPU cpu; + const char *firmware; DigicTimerState timer[DIGIC4_NB_TIMERS]; DigicUartState uart; }; 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: 1387807 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=DVzlRx/b; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CKcrk20N2z9sSC for ; Tue, 27 Oct 2020 01:38:14 +1100 (AEDT) Received: from localhost ([::1]:60968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3dU-0002zB-9B for incoming@patchwork.ozlabs.org; Mon, 26 Oct 2020 10:38:12 -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+incoming=patchwork.ozlabs.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: 1387797 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=RO+v9Nb3; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CKck45Kz5z9sSC for ; Tue, 27 Oct 2020 01:32:28 +1100 (AEDT) Received: from localhost ([::1]:44244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3Xu-0004Ab-FS for incoming@patchwork.ozlabs.org; Mon, 26 Oct 2020 10:32:26 -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+incoming=patchwork.ozlabs.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: 1387801 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=hnuWwYpa; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CKcn009mBz9sVW for ; Tue, 27 Oct 2020 01:35:00 +1100 (AEDT) Received: from localhost ([::1]:52440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3aL-0007mO-US for incoming@patchwork.ozlabs.org; Mon, 26 Oct 2020 10:34:57 -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+incoming=patchwork.ozlabs.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:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1387811 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=aB6XbuTK; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CKcvz1dNmz9sSC for ; Tue, 27 Oct 2020 01:41:03 +1100 (AEDT) Received: from localhost ([::1]:41252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3gC-0006XK-JP for incoming@patchwork.ozlabs.org; Mon, 26 Oct 2020 10:41:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX3WB-00048J-FF 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]:30043) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kX3W8-0007z9-6J for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:39 -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=ONUppsAWFdB2ocGm/TxWIPzW/UrNtelTjJmplh/WUcg=; b=aB6XbuTKO8lkv2iKOoOFRj1GZu2JfI0MzX3oYgJ7oRtfigYNPxj/jk+vqTEOwtFT+wrRNK JqnRju9WrJb3p2bYqKt7GJQrR3PxkdeEGp0GZJVZCZdyu3IgyRVwf35IQw1FgP+ZV+1mih JsAJLCZE5eGj2DAIsIoN1vn26dJmbXo= 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-362-63z2rjjBNsixKGfX4bS6wQ-1; Mon, 26 Oct 2020 10:30:33 -0400 X-MC-Unique: 63z2rjjBNsixKGfX4bS6wQ-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 24BD2CFF3C; Mon, 26 Oct 2020 14:30:32 +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 ACF1C1002391; Mon, 26 Oct 2020 14:30:31 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 06/15] lm32: remove bios_name Date: Mon, 26 Oct 2020 10:30:19 -0400 Message-Id: <20201026143028.3034018-7-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: Michael Walle , philmd@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Cc: Michael Walle Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée --- hw/lm32/milkymist.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c index 9f8fe9fef1..c5d3d77a2b 100644 --- a/hw/lm32/milkymist.c +++ b/hw/lm32/milkymist.c @@ -108,6 +108,7 @@ static void milkymist_init(MachineState *machine) { MachineClass *mc = MACHINE_GET_CLASS(machine); + const char *bios_name = machine->firmware ? BIOS_FILENAME: const char *kernel_filename = machine->kernel_filename; const char *kernel_cmdline = machine->kernel_cmdline; const char *initrd_filename = machine->initrd_filename; @@ -162,9 +163,6 @@ milkymist_init(MachineState *machine) } /* load bios rom */ - if (bios_name == NULL) { - bios_name = BIOS_FILENAME; - } bios_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); if (bios_filename) { From patchwork Mon Oct 26 14:30:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1387798 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OQgZb3xM; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CKck60RgLz9sSC for ; Tue, 27 Oct 2020 01:32:30 +1100 (AEDT) Received: from localhost ([::1]:44378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3Xv-0004FD-Tl for incoming@patchwork.ozlabs.org; Mon, 26 Oct 2020 10:32:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX3WA-00047B-W1 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]:50272) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kX3W9-0007zQ-0Y 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=yelqOBS9IRH94Dyy5XS7fbg8WkiycDDMHuq9uuOUtFg=; b=OQgZb3xMTqCLXl8dV/tSLhoLaHCRdx7qy6zDMNREeaom+KeIqGqsf1GRskiSxPvn9mJ7gd JQ4b6Xq4LIyy5/uNlu47LREL1Fh9Qz8mEbc87AeqjDwxTDR+67ygRKPQ6K9mKmPSBvuVRl N2fHxB60rNOsn1+dmsZse/iiboN4Beo= 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-224-AebGZhB2NnWxLttrW-udOg-1; Mon, 26 Oct 2020 10:30:33 -0400 X-MC-Unique: AebGZhB2NnWxLttrW-udOg-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 905D7809DC8 for ; Mon, 26 Oct 2020 14:30:32 +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 3DE2710002A6; Mon, 26 Oct 2020 14:30:32 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 07/15] m68k: remove bios_name Date: Mon, 26 Oct 2020 10:30:20 -0400 Message-Id: <20201026143028.3034018-8-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: Laurent Vivier , philmd@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Cc: Laurent Vivier Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Acked-by: Laurent Vivier --- hw/m68k/mcf5208.c | 10 +++++----- hw/m68k/next-cube.c | 4 +--- hw/m68k/q800.c | 4 +--- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c index d310a98e7b..7c8ca5ddf6 100644 --- a/hw/m68k/mcf5208.c +++ b/hw/m68k/mcf5208.c @@ -301,17 +301,17 @@ static void mcf5208evb_init(MachineState *machine) /* 0xfc0a8000 SDRAM controller. */ /* Load firmware */ - if (bios_name) { + if (machine->firmware) { char *fn; uint8_t *ptr; - 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); } if (load_image_targphys(fn, 0x0, ROM_SIZE) < 8) { - error_report("Could not load ROM image '%s'", bios_name); + error_report("Could not load ROM image '%s'", machine->firmware); exit(1); } g_free(fn); @@ -323,7 +323,7 @@ static void mcf5208evb_init(MachineState *machine) /* Load kernel. */ if (!kernel_filename) { - if (qtest_enabled() || bios_name) { + if (qtest_enabled() || machine->firmware) { return; } error_report("Kernel image must be specified"); diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c index e7045980b7..37bc35dfa4 100644 --- a/hw/m68k/next-cube.c +++ b/hw/m68k/next-cube.c @@ -868,6 +868,7 @@ static void next_cube_init(MachineState *machine) MemoryRegion *bmapm1 = g_new(MemoryRegion, 1); MemoryRegion *bmapm2 = g_new(MemoryRegion, 1); MemoryRegion *sysmem = get_system_memory(); + const char *bios_name = machine->firmware ?: ROM_FILE; NeXTState *ns = NEXT_MACHINE(machine); DeviceState *dev; @@ -924,9 +925,6 @@ static void next_cube_init(MachineState *machine) sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, 0x0200e000); /* Load ROM here */ - if (bios_name == NULL) { - bios_name = ROM_FILE; - } /* still not sure if the rom should also be mapped at 0x0*/ memory_region_init_rom(rom, NULL, "next.rom", 0x20000, &error_fatal); memory_region_add_subregion(sysmem, 0x01000000, rom); diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index ce4b47c3e3..6ebcddcfb2 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -167,6 +167,7 @@ static void q800_init(MachineState *machine) const char *kernel_filename = machine->kernel_filename; const char *initrd_filename = machine->initrd_filename; const char *kernel_cmdline = machine->kernel_cmdline; + const char *bios_name = machine->firmware ?: MACROM_FILENAME; hwaddr parameters_base; CPUState *cs; DeviceState *dev; @@ -400,9 +401,6 @@ static void q800_init(MachineState *machine) rom = g_malloc(sizeof(*rom)); memory_region_init_rom(rom, NULL, "m68k_mac.rom", MACROM_SIZE, &error_abort); - if (bios_name == NULL) { - bios_name = MACROM_FILENAME; - } filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); memory_region_add_subregion(get_system_memory(), MACROM_ADDR, rom); From patchwork Mon Oct 26 14:30:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1387809 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=D8mgRh5p; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CKcrq2v5Wz9sT6 for ; Tue, 27 Oct 2020 01:38:18 +1100 (AEDT) Received: from localhost ([::1]:33126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3dY-00038m-PA for incoming@patchwork.ozlabs.org; Mon, 26 Oct 2020 10:38:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX3WG-0004M5-HC for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:59225) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kX3W9-0007zb-IT for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:44 -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=6GFpxH70jBdUc9bnsAYgZkItYUzh5HlSFFPFmot9nlE=; b=D8mgRh5psFW+bBRr+pTNtqdLZrJYLffeHqPSpMbL1SFPtNzgaCa5EoL7svH07k6k4RjmGp hOOaxy5q4vjE3bLc/6a307YMGRDeLYAB/YBHFPQpq+RXclbqFRPiAXeOFZODTJbisQ6U92 ZU89O33+GqUE3uhC2gfXjNz8KYop5Gs= 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-340-hQTKFSSIM9mjq3WhRnYaBg-1; Mon, 26 Oct 2020 10:30:33 -0400 X-MC-Unique: hQTKFSSIM9mjq3WhRnYaBg-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 EBE55804325 for ; Mon, 26 Oct 2020 14:30:32 +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 AA81F1002C00; Mon, 26 Oct 2020 14:30:32 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 08/15] mips: remove bios_name Date: Mon, 26 Oct 2020 10:30:21 -0400 Message-Id: <20201026143028.3034018-9-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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Cc: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- hw/mips/fuloong2e.c | 6 +++--- hw/mips/jazz.c | 6 +++--- hw/mips/malta.c | 6 +++--- hw/mips/mipssim.c | 6 +++--- hw/mips/r4k.c | 4 +--- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index a9e0c2f8d3..25b679011f 100644 --- a/hw/mips/fuloong2e.c +++ b/hw/mips/fuloong2e.c @@ -338,7 +338,7 @@ static void mips_fuloong2e_init(MachineState *machine) write_bootloader(env, memory_region_get_ram_ptr(bios), kernel_entry); } else { filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, - bios_name ?: FULOONG_BIOSNAME); + machine->firmware ?: FULOONG_BIOSNAME); if (filename) { bios_size = load_image_targphys(filename, 0x1fc00000LL, BIOS_SIZE); @@ -348,8 +348,8 @@ static void mips_fuloong2e_init(MachineState *machine) } if ((bios_size < 0 || bios_size > BIOS_SIZE) && - bios_name && !qtest_enabled()) { - error_report("Could not load MIPS bios '%s'", bios_name); + machine->firmware && !qtest_enabled()) { + error_report("Could not load MIPS bios '%s'", machine->firmware); exit(1); } } diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c index 71448f72ac..aa95c6a3d3 100644 --- a/hw/mips/jazz.c +++ b/hw/mips/jazz.c @@ -218,7 +218,7 @@ static void mips_jazz_init(MachineState *machine, memory_region_add_subregion(address_space, 0xfff00000LL, bios2); /* load the BIOS image. */ - filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name ?: BIOS_FILENAME); + filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, machine->firmware ?: BIOS_FILENAME); if (filename) { bios_size = load_image_targphys(filename, 0xfff00000LL, MAGNUM_BIOS_SIZE); @@ -227,8 +227,8 @@ static void mips_jazz_init(MachineState *machine, bios_size = -1; } if ((bios_size < 0 || bios_size > MAGNUM_BIOS_SIZE) - && bios_name && !qtest_enabled()) { - error_report("Could not load MIPS bios '%s'", bios_name); + && machine->firmware && !qtest_enabled()) { + error_report("Could not load MIPS bios '%s'", machine->firmware); exit(1); } diff --git a/hw/mips/malta.c b/hw/mips/malta.c index 9d1a3b50b7..ef369945d1 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -1333,7 +1333,7 @@ void mips_malta_init(MachineState *machine) if (!dinfo) { /* Load a BIOS image. */ filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, - bios_name ?: BIOS_FILENAME); + machine->firmware ?: BIOS_FILENAME); if (filename) { bios_size = load_image_targphys(filename, FLASH_ADDRESS, BIOS_SIZE); @@ -1342,8 +1342,8 @@ void mips_malta_init(MachineState *machine) bios_size = -1; } if ((bios_size < 0 || bios_size > BIOS_SIZE) && - bios_name && !qtest_enabled()) { - error_report("Could not load MIPS bios '%s'", bios_name); + machine->firmware && !qtest_enabled()) { + error_report("Could not load MIPS bios '%s'", machine->firmware); exit(1); } } diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c index aaa62a0f4b..cc9b0934b3 100644 --- a/hw/mips/mipssim.c +++ b/hw/mips/mipssim.c @@ -177,7 +177,7 @@ mips_mipssim_init(MachineState *machine) /* Map the BIOS / boot exception handler. */ memory_region_add_subregion(address_space_mem, 0x1fc00000LL, bios); /* Load a BIOS / boot exception handler image. */ - filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name ?: BIOS_FILENAME); + filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, machine->firmware ?: BIOS_FILENAME); if (filename) { bios_size = load_image_targphys(filename, 0x1fc00000LL, BIOS_SIZE); g_free(filename); @@ -185,9 +185,9 @@ mips_mipssim_init(MachineState *machine) bios_size = -1; } if ((bios_size < 0 || bios_size > BIOS_SIZE) && - bios_name && !qtest_enabled()) { + machine->firmware && !qtest_enabled()) { /* Bail out if we have neither a kernel image nor boot vector code. */ - error_report("Could not load MIPS bios '%s'", bios_name); + error_report("Could not load MIPS bios '%s'", machine->firmware); exit(1); } else { /* We have a boot vector start address. */ diff --git a/hw/mips/r4k.c b/hw/mips/r4k.c index 3830854342..b27be138a4 100644 --- a/hw/mips/r4k.c +++ b/hw/mips/r4k.c @@ -168,6 +168,7 @@ static const int sector_len = 32 * KiB; static void mips_r4k_init(MachineState *machine) { + const char *bios_name = machine->firmware ?: BIOS_FILENAME; const char *kernel_filename = machine->kernel_filename; const char *kernel_cmdline = machine->kernel_cmdline; const char *initrd_filename = machine->initrd_filename; @@ -221,9 +222,6 @@ void mips_r4k_init(MachineState *machine) * run. */ - if (bios_name == NULL) { - bios_name = BIOS_FILENAME; - } filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); if (filename) { bios_size = get_image_size(filename); 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: 1387806 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=EEdYg7Qe; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CKcrg12G1z9sTD for ; Tue, 27 Oct 2020 01:38:10 +1100 (AEDT) Received: from localhost ([::1]:60606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3dQ-0002q8-MO for incoming@patchwork.ozlabs.org; Mon, 26 Oct 2020 10:38:08 -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+incoming=patchwork.ozlabs.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:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1387813 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=YHpE67mY; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CKcyR3txMz9sT6 for ; Tue, 27 Oct 2020 01:43:11 +1100 (AEDT) Received: from localhost ([::1]:49136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3iH-0001Vr-8k for incoming@patchwork.ozlabs.org; Mon, 26 Oct 2020 10:43:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX3WD-0004Bz-Bl for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21384) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kX3WB-0007zy-4s for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:41 -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=G0aQcEKzxl9mU1pGa/tulErPIBkfTI0EJwleZBBrc3U=; b=YHpE67mYuDF+eT4RgRwBSgmG+lpCJm6pNlECH0cAtMIAXCpqpqZ2A/7lgHDL3my0InfDE6 7XrE6YknOnZs2pQ6zK05OS9ZIdijZmzKJDGmKx/0x6J+3YL+qoo+4rNn7BwAZlA2kBVLvc jen8OzqhK+ob5+bN1b2qAwsr+tQ7Z20= 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-353-SuzlOrguNqyCLPsxB_c0ZQ-1; Mon, 26 Oct 2020 10:30:35 -0400 X-MC-Unique: SuzlOrguNqyCLPsxB_c0ZQ-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 4BD321016CE2; 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 AF5895C1C5; Mon, 26 Oct 2020 14:30:33 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 10/15] ppc: remove bios_name Date: Mon, 26 Oct 2020 10:30:23 -0400 Message-Id: <20201026143028.3034018-11-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, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Cc: David Gibson Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée Acked-by: David Gibson --- hw/ppc/e500.c | 4 ++-- hw/ppc/mac_newworld.c | 4 +--- hw/ppc/mac_oldworld.c | 4 +--- hw/ppc/pnv.c | 5 +---- hw/ppc/ppc405_boards.c | 6 ++---- hw/ppc/prep.c | 4 +--- hw/ppc/spapr.c | 4 +--- 7 files changed, 9 insertions(+), 22 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index ae39b9358e..153a74c98c 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -1035,7 +1035,7 @@ void ppce500_init(MachineState *machine) * -kernel to users but allows them to run through u-boot as well. */ kernel_as_payload = false; - if (bios_name == NULL) { + if (machine->firmware == NULL) { if (machine->kernel_filename) { payload_name = machine->kernel_filename; kernel_as_payload = true; @@ -1043,7 +1043,7 @@ void ppce500_init(MachineState *machine) payload_name = "u-boot.e500"; } } else { - payload_name = bios_name; + payload_name = machine->firmware; } filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, payload_name); diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index f9a1cc8944..61c63819df 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -109,6 +109,7 @@ static void ppc_core99_reset(void *opaque) static void ppc_core99_init(MachineState *machine) { ram_addr_t ram_size = machine->ram_size; + const char *bios_name = machine->firmware ?: PROM_FILENAME; const char *kernel_filename = machine->kernel_filename; const char *kernel_cmdline = machine->kernel_cmdline; const char *initrd_filename = machine->initrd_filename; @@ -161,9 +162,6 @@ static void ppc_core99_init(MachineState *machine) &error_fatal); memory_region_add_subregion(get_system_memory(), PROM_BASE, bios); - if (!bios_name) { - bios_name = PROM_FILENAME; - } filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); if (filename) { /* Load OpenBIOS (ELF) */ diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 6c59aa5601..11623e8e67 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -83,6 +83,7 @@ static void ppc_heathrow_reset(void *opaque) static void ppc_heathrow_init(MachineState *machine) { ram_addr_t ram_size = machine->ram_size; + const char *bios_name = machine->firmware ?: PROM_FILENAME; const char *boot_device = machine->boot_order; PowerPCCPU *cpu = NULL; CPUPPCState *env = NULL; @@ -130,9 +131,6 @@ static void ppc_heathrow_init(MachineState *machine) &error_fatal); memory_region_add_subregion(get_system_memory(), PROM_BASE, bios); - if (!bios_name) { - bios_name = PROM_FILENAME; - } filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); if (filename) { /* Load OpenBIOS (ELF) */ diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index d9e52873ea..f2b1ee83d3 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -713,6 +713,7 @@ static void pnv_chip_power10_pic_print_info(PnvChip *chip, Monitor *mon) static void pnv_init(MachineState *machine) { + const char *bios_name = machine->firmware ?: FW_FILE_NAME; PnvMachineState *pnv = PNV_MACHINE(machine); MachineClass *mc = MACHINE_GET_CLASS(machine); char *fw_filename; @@ -739,10 +740,6 @@ static void pnv_init(MachineState *machine) pnv->pnor = PNV_PNOR(dev); /* load skiboot firmware */ - if (bios_name == NULL) { - bios_name = FW_FILE_NAME; - } - fw_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); if (!fw_filename) { error_report("Could not find OPAL firmware '%s'", bios_name); diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c index 4687715b15..c867e46330 100644 --- a/hw/ppc/ppc405_boards.c +++ b/hw/ppc/ppc405_boards.c @@ -141,6 +141,7 @@ static void ref405ep_fpga_init(MemoryRegion *sysmem, uint32_t base) static void ref405ep_init(MachineState *machine) { MachineClass *mc = MACHINE_GET_CLASS(machine); + const char *bios_name = machine->firmware ?: BIOS_FILENAME; const char *kernel_filename = machine->kernel_filename; const char *kernel_cmdline = machine->kernel_cmdline; const char *initrd_filename = machine->initrd_filename; @@ -206,8 +207,6 @@ static void ref405ep_init(MachineState *machine) memory_region_init_rom(bios, NULL, "ef405ep.bios", BIOS_SIZE, &error_fatal); - if (bios_name == NULL) - bios_name = BIOS_FILENAME; filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); if (filename) { bios_size = load_image_size(filename, @@ -425,6 +424,7 @@ static void taihu_cpld_init(MemoryRegion *sysmem, uint32_t base) static void taihu_405ep_init(MachineState *machine) { MachineClass *mc = MACHINE_GET_CLASS(machine); + const char *bios_name = machine->firmware ?: BIOS_FILENAME; const char *kernel_filename = machine->kernel_filename; const char *initrd_filename = machine->initrd_filename; char *filename; @@ -475,8 +475,6 @@ static void taihu_405ep_init(MachineState *machine) } else #endif { - if (bios_name == NULL) - bios_name = BIOS_FILENAME; bios = g_new(MemoryRegion, 1); memory_region_init_rom(bios, NULL, "taihu_405ep.bios", BIOS_SIZE, &error_fatal); diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 4a0cb434a6..c6b9d1ddcb 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -237,6 +237,7 @@ static int prep_set_cmos_checksum(DeviceState *dev, void *opaque) static void ibm_40p_init(MachineState *machine) { + const char *bios_name = machine->firmware ?: "openbios-ppc"; CPUPPCState *env = NULL; uint16_t cmos_checksum; PowerPCCPU *cpu; @@ -271,9 +272,6 @@ static void ibm_40p_init(MachineState *machine) /* PCI host */ dev = qdev_new("raven-pcihost"); - if (!bios_name) { - bios_name = "openbios-ppc"; - } qdev_prop_set_string(dev, "bios-name", bios_name); qdev_prop_set_uint32(dev, "elf-machine", PPC_ELF_MACHINE); pcihost = SYS_BUS_DEVICE(dev); diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 63315f2d0f..667d59e5ad 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2647,6 +2647,7 @@ static void spapr_machine_init(MachineState *machine) SpaprMachineState *spapr = SPAPR_MACHINE(machine); SpaprMachineClass *smc = SPAPR_MACHINE_GET_CLASS(machine); MachineClass *mc = MACHINE_GET_CLASS(machine); + const char *bios_name = machine->firmware ?: FW_FILE_NAME; const char *kernel_filename = machine->kernel_filename; const char *initrd_filename = machine->initrd_filename; PCIHostState *phb; @@ -2970,9 +2971,6 @@ static void spapr_machine_init(MachineState *machine) } } - if (bios_name == NULL) { - bios_name = FW_FILE_NAME; - } filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); if (!filename) { error_report("Could not find LPAR firmware '%s'", bios_name); 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: 1387810 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=hLulACsS; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CKcvY5DWGz9sSC for ; Tue, 27 Oct 2020 01:40:38 +1100 (AEDT) Received: from localhost ([::1]:40804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3fm-0006MU-Q4 for incoming@patchwork.ozlabs.org; Mon, 26 Oct 2020 10:40:34 -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+incoming=patchwork.ozlabs.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); From patchwork Mon Oct 26 14:30:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1387805 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=E+VomYOj; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CKcnH07sRz9sT6 for ; Tue, 27 Oct 2020 01:35:15 +1100 (AEDT) Received: from localhost ([::1]:52900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3aZ-0007xT-CZ for incoming@patchwork.ozlabs.org; Mon, 26 Oct 2020 10:35:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX3WC-0004AV-RT for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:20189) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kX3WB-0007zq-0G 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=1603722637; 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=JX0vJgS3VGlLfH377Qx81RfTnQlPwLnObP7fQPjkUnM=; b=E+VomYOjQMetX5PPSUpERWl/vPfy3/oFrJv0+CRHKBSNfKjVjT2Dmapf8CojkrkVJXS45K 2ujQQAzWnADG3lji6inGkaBISvCVwnOhAOPMWsxuIzdm/uiqoty3ug3zDa4EVicBmwEmqd cM9C02Ff85EY18XP6W1UImbYtxs0rD4= 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-524-vlXfVk-nOtmFX5YZEkb4wA-1; Mon, 26 Oct 2020 10:30:36 -0400 X-MC-Unique: vlXfVk-nOtmFX5YZEkb4wA-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 2416318C9F4C for ; Mon, 26 Oct 2020 14:30:35 +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 C600C5C1C5; Mon, 26 Oct 2020 14:30:34 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 12/15] s390: remove bios_name Date: Mon, 26 Oct 2020 10:30:25 -0400 Message-Id: <20201026143028.3034018-13-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=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: Thomas Huth , philmd@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Cc: Thomas Huth Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée Reviewed-by: Thomas Huth Reviewed-by: Cornelia Huck --- hw/s390x/ipl.c | 8 ++------ hw/s390x/s390-virtio-ccw.c | 3 ++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index 3d2652d75a..61e8c967d3 100644 --- a/hw/s390x/ipl.c +++ b/hw/s390x/ipl.c @@ -128,11 +128,7 @@ static void s390_ipl_realize(DeviceState *dev, Error **errp) if (!ipl->kernel || ipl->enforce_bios) { uint64_t fwbase = (MIN(ram_size, 0x80000000U) - 0x200000) & ~0xffffUL; - if (bios_name == NULL) { - bios_name = ipl->firmware; - } - - bios_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); + bios_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, ipl->firmware); if (bios_filename == NULL) { error_setg(errp, "could not find stage1 bootloader"); return; @@ -154,7 +150,7 @@ static void s390_ipl_realize(DeviceState *dev, Error **errp) g_free(bios_filename); if (bios_size == -1) { - error_setg(errp, "could not load bootloader '%s'", bios_name); + error_setg(errp, "could not load bootloader '%s'", ipl->firmware); return; } diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index e52182f946..a521eba673 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -258,7 +258,8 @@ static void ccw_init(MachineState *machine) /* get a BUS */ css_bus = virtual_css_bus_init(); s390_init_ipl_dev(machine->kernel_filename, machine->kernel_cmdline, - machine->initrd_filename, "s390-ccw.img", + machine->initrd_filename, + machine->firmware ?: "s390-ccw.img", "s390-netboot.img", true); dev = qdev_new(TYPE_S390_PCI_HOST_BRIDGE); From patchwork Mon Oct 26 14:30:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1387803 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=etZKggf+; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CKcn12X23z9sT6 for ; Tue, 27 Oct 2020 01:35:01 +1100 (AEDT) Received: from localhost ([::1]:52630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3aN-0007qo-0k for incoming@patchwork.ozlabs.org; Mon, 26 Oct 2020 10:34:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX3WF-0004IK-BS for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:45932) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kX3WB-00080C-Nk for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:42 -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=JzuUETko1M4XpcmxoRdk/zERLpcZe1vbNqseE2+QiSg=; b=etZKggf+kZ8LqTIVKto1uqhaw0qZ7VaowK29jp/1TCAygliYrBr5o9NPsoV/D3Jk2FYRi/ flkbQYS4o/oJ0GJksyGG208YLv34/H41VFJKOy8m0qYbtKncQSICi6vOJycgs4M1rrYD95 mjF+LK74uNcFSn2w+UUps+gX1W8pbjY= 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-560-SLVC6vxbMLOdxRzTXKMcGw-1; Mon, 26 Oct 2020 10:30:37 -0400 X-MC-Unique: SLVC6vxbMLOdxRzTXKMcGw-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 0B5C3804355; Mon, 26 Oct 2020 14:30:36 +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 3FD175C1C5; Mon, 26 Oct 2020 14:30:35 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 13/15] sh4: remove bios_name Date: Mon, 26 Oct 2020 10:30:26 -0400 Message-Id: <20201026143028.3034018-14-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=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, Yoshinori Sato Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Cc: Yoshinori Sato Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- hw/sh4/shix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/sh4/shix.c b/hw/sh4/shix.c index f410c08883..d9a9fcbc59 100644 --- a/hw/sh4/shix.c +++ b/hw/sh4/shix.c @@ -49,6 +49,7 @@ static void shix_init(MachineState *machine) MemoryRegion *sysmem = get_system_memory(); MemoryRegion *rom = g_new(MemoryRegion, 1); MemoryRegion *sdram = g_new(MemoryRegion, 2); + const char *bios_name = machine->firmware ?: BIOS_FILENAME; cpu = SUPERH_CPU(cpu_create(machine->cpu_type)); @@ -63,8 +64,6 @@ static void shix_init(MachineState *machine) memory_region_add_subregion(sysmem, 0x0c000000, &sdram[1]); /* Load BIOS in 0 (and access it through P2, 0xA0000000) */ - if (bios_name == NULL) - bios_name = BIOS_FILENAME; ret = load_image_targphys(bios_name, 0, 0x4000); if (ret < 0 && !qtest_enabled()) { error_report("Could not load SHIX bios '%s'", bios_name); From patchwork Mon Oct 26 14:30:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1387816 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=dNcZxmy7; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CKd1t384cz9sSC for ; Tue, 27 Oct 2020 01:46:10 +1100 (AEDT) Received: from localhost ([::1]:56970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3l8-0004k2-L7 for incoming@patchwork.ozlabs.org; Mon, 26 Oct 2020 10:46:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX3WE-0004GU-PT for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:30242) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kX3WC-00080T-Su for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603722639; 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=ET+rXC0AcJAQhzp2Gghq1VFYQ/vRNne+hjXiB0oh9pg=; b=dNcZxmy7d771NCTOEIUIX+lfNG4skNQ2K/39m/0xEQ/HfObDgMAfWsho9T10XAYtMrgkVt JaSGAJK58YDf9XazevuSkUX+cU7z+JvtUHZpVUrpHJ4lwun46ZZE2hmj8B+bx12jCaFOOd GtH8GV7hTib5vmE97E3acy/zSjWthf8= 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-22-OpBy43SxMxqlAgLo_ON9cQ-1; Mon, 26 Oct 2020 10:30:37 -0400 X-MC-Unique: OpBy43SxMxqlAgLo_ON9cQ-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 A8422EC134; Mon, 26 Oct 2020 14:30:36 +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 26FBB5C1C2; Mon, 26 Oct 2020 14:30:36 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 14/15] sparc: remove bios_name Date: Mon, 26 Oct 2020 10:30:27 -0400 Message-Id: <20201026143028.3034018-15-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=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: Mark Cave-Ayland , philmd@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Cc: Mark Cave-Ayland Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Acked-by: Mark Cave-Ayland --- hw/sparc/leon3.c | 4 +--- hw/sparc/sun4m.c | 2 +- hw/sparc64/sun4u.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index d40b7891f6..1c50b02f81 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -185,6 +185,7 @@ static void leon3_set_pil_in(void *opaque, int n, int level) static void leon3_generic_hw_init(MachineState *machine) { ram_addr_t ram_size = machine->ram_size; + const char *bios_name = machine->firmware ?: LEON3_PROM_FILENAME; const char *kernel_filename = machine->kernel_filename; SPARCCPU *cpu; CPUSPARCState *env; @@ -259,9 +260,6 @@ static void leon3_generic_hw_init(MachineState *machine) memory_region_add_subregion(address_space_mem, LEON3_PROM_OFFSET, prom); /* Load boot prom */ - if (bios_name == NULL) { - bios_name = LEON3_PROM_FILENAME; - } filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); if (filename) { diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 38d1e0fd12..81d4ae9385 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -878,7 +878,7 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, hwdef->max_mem - machine->ram_size); } - prom_init(hwdef->slavio_base, bios_name); + prom_init(hwdef->slavio_base, machine->firmware); slavio_intctl = slavio_intctl_init(hwdef->intctl_base, hwdef->intctl_base + 0x10000ULL, diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 05e659c8a4..50230d261a 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -578,7 +578,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem, /* set up devices */ ram_init(0, machine->ram_size); - prom_init(hwdef->prom_addr, bios_name); + prom_init(hwdef->prom_addr, machine->firmware); /* Init sabre (PCI host bridge) */ sabre = SABRE(qdev_new(TYPE_SABRE)); From patchwork Mon Oct 26 14:30:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1387808 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=G/uYFWLR; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CKcrl1Jbgz9sT6 for ; Tue, 27 Oct 2020 01:38:15 +1100 (AEDT) Received: from localhost ([::1]:32822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3dV-00031C-3S for incoming@patchwork.ozlabs.org; Mon, 26 Oct 2020 10:38:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX3WJ-0004Me-HP for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:49 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:60427) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kX3WD-00080h-D3 for qemu-devel@nongnu.org; Mon, 26 Oct 2020 10:30:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603722640; 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=vuKKjltZ65zd0yLoOQDLWBfxa5YvK11CmxvAJ/hWP64=; b=G/uYFWLRiiXnUyWoscmZYvllDrlvnqkQj1QGm/dwI9LFyFlKAwA+IiMDYrciChEFRH9HnB 66sk4MJiNhHAkh+kotfocQ+UmKV6LEDZK9arW8CxcxB0dnBLB/H+P0ESNDwDA879il2bEh Q+twZAqrwo+CILvDf1YEGdN5MwljHrw= 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-417-CAyexAHgObSRj_5-d_9Jew-1; Mon, 26 Oct 2020 10:30:38 -0400 X-MC-Unique: CAyexAHgObSRj_5-d_9Jew-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 11900804325 for ; Mon, 26 Oct 2020 14:30:37 +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 C2F0D5C1C5; Mon, 26 Oct 2020 14:30:36 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 15/15] vl: remove bios_name Date: Mon, 26 Oct 2020 10:30:28 -0400 Message-Id: <20201026143028.3034018-16-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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" bios_name was a legacy variable used by machine code, but it is no more. Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée Reviewed-by: Thomas Huth --- include/sysemu/sysemu.h | 1 - softmmu/vl.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 817ff4cf75..1336b4264a 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -8,7 +8,6 @@ /* vl.c */ -extern const char *bios_name; extern int only_migratable; extern const char *qemu_name; extern QemuUUID qemu_uuid; diff --git a/softmmu/vl.c b/softmmu/vl.c index b7d7f43c88..7909709879 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -119,7 +119,6 @@ static const char *data_dir[16]; static int data_dir_idx; -const char *bios_name = NULL; enum vga_retrace_method vga_retrace_method = VGA_RETRACE_DUMB; int display_opengl; const char* keyboard_layout = NULL; @@ -4205,7 +4204,6 @@ void qemu_init(int argc, char **argv, char **envp) kernel_filename = qemu_opt_get(machine_opts, "kernel"); initrd_filename = qemu_opt_get(machine_opts, "initrd"); kernel_cmdline = qemu_opt_get(machine_opts, "append"); - bios_name = qemu_opt_get(machine_opts, "firmware"); opts = qemu_opts_find(qemu_find_opts("boot-opts"), NULL); if (opts) {