From patchwork Sun Jun 16 14:28:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yoshinori Sato X-Patchwork-Id: 166955 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1786041ilk; Sun, 16 Jun 2019 07:42:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+PzjFkWohn3GRjK1FLVWBaKUdiUUIDx2nnotsG+iUlcoz13SycCufUaT37TTkF8iO+G8b X-Received: by 2002:ae9:ebd1:: with SMTP id b200mr85756277qkg.152.1560696136048; Sun, 16 Jun 2019 07:42:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560696136; cv=none; d=google.com; s=arc-20160816; b=UNsVOJM+3S8127LvX4OFz58i9CyD+VZFDvXA1MGW4TPbAPHvNaoX9C8nBz1cSDdnmn kWe1musQi3FCD9kISGybcyQ9RtCa0FWMhtaIVsUzinaBu7Lb86THfHG/GPtWOiVNwglv JOfdY9UPURnqUwOHM4l8KzT5nktEJINV0LnoXpCOV3jt7NoHpJZvwSxamUxJFZm5Ol7V 4tuHxYYul7APRLPi5eAH02u5hnseu0db6OGIRbCo1vR4A+DA0ppZRU0SsAfC6C5dyKfb cpQRAGSSshjJFBmg71Qm0cTZuLurlMWew6BT+8dZoRMmfyr5lb9REF/ESe1+51VrtQ03 UVQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from; bh=WTgAchzxuRanviydbtTayWihIIXZsydUrp9wH71Hxc4=; b=AH7Oszm8DoBGb+6D+Qq/99CfmGJobqqzYHrYPAEK1HsmhXA/hwyQlfYM8iNBwPsKrz b425L9UT1fuKgrh8V76sflpqOdHvpaCz0ecXuiUJbmszZaAfQwzQkHXLtgP6DNvNKc3U 9mQe2nDYckXCDzi98sNKWNuWxVAj/rW9falfGVtB0zPFNxwvHDY0LgJ2IAm8IFvyjo9L CyrOSIcyUEtF8SKBCbGc6EZX5S9/oDsEZ98+nK/j9xax+P3WcvTUWy1mKJ0cFX7Z3sRG UrcVQiRIbb90t0g1Ki/oh8btLFMTggAN4TnFVHEKMaIhKPNPyrex4neARx3BNP4wxmgX V7TQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z52si5789424qvc.58.2019.06.16.07.42.15 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 16 Jun 2019 07:42:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:40398 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcWMJ-0006kW-MQ for patch@linaro.org; Sun, 16 Jun 2019 10:42:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36372) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcW9Y-0005LH-DX for qemu-devel@nongnu.org; Sun, 16 Jun 2019 10:29:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcW9W-0002NH-VP for qemu-devel@nongnu.org; Sun, 16 Jun 2019 10:29:04 -0400 Received: from mail03.asahi-net.or.jp ([202.224.55.15]:60461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hcW9W-0002AU-IJ for qemu-devel@nongnu.org; Sun, 16 Jun 2019 10:29:02 -0400 Received: from h61-195-96-97.vps.ablenet.jp (h61-195-96-97.ablenetvps.ne.jp [61.195.96.97]) (Authenticated sender: PQ4Y-STU) by mail03.asahi-net.or.jp (Postfix) with ESMTPA id A71C649FFA; Sun, 16 Jun 2019 23:28:50 +0900 (JST) Received: from yo-satoh-debian.localdomain (ZM005235.ppp.dion.ne.jp [222.8.5.235]) by h61-195-96-97.vps.ablenet.jp (Postfix) with ESMTPSA id 63C5F240085; Sun, 16 Jun 2019 23:28:50 +0900 (JST) From: Yoshinori Sato To: qemu-devel@nongnu.org Date: Sun, 16 Jun 2019 23:28:30 +0900 Message-Id: <20190616142836.10614-19-ysato@users.sourceforge.jp> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190616142836.10614-1-ysato@users.sourceforge.jp> References: <20190616142836.10614-1-ysato@users.sourceforge.jp> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 202.224.55.15 Subject: [Qemu-devel] [PATCH v20 18/24] hw/rx: Honor -accel qtest 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@linaro.org, Richard Henderson , Yoshinori Sato , philmd@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Issue an error if no kernel, no bios, and not qtest'ing. Fixes make check-qtest-rx: test/qom-test. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Yoshinori Sato Message-Id: <20190607091116.49044-16-ysato@users.sourceforge.jp> Tested-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- We could squash this with the previous patch Signed-off-by: Yoshinori Sato --- hw/rx/rx62n.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -- 2.11.0 diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c index 74d2fd0ee3..05d82d0b8f 100644 --- a/hw/rx/rx62n.c +++ b/hw/rx/rx62n.c @@ -21,11 +21,13 @@ #include "qemu/osdep.h" #include "qapi/error.h" +#include "qemu/error-report.h" #include "hw/hw.h" #include "hw/rx/rx62n.h" #include "hw/loader.h" #include "hw/sysbus.h" #include "sysemu/sysemu.h" +#include "sysemu/qtest.h" #include "cpu.h" /* @@ -190,8 +192,14 @@ static void rx62n_realize(DeviceState *dev, Error **errp) memory_region_init_rom(&s->c_flash, NULL, "codeflash", RX62N_CFLASH_SIZE, errp); memory_region_add_subregion(s->sysmem, RX62N_CFLASH_BASE, &s->c_flash); + if (!s->kernel) { - rom_add_file_fixed(bios_name, RX62N_CFLASH_BASE, 0); + 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 */