From patchwork Sat Aug 17 07:36:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yoshinori Sato X-Patchwork-Id: 171532 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp420888ily; Sat, 17 Aug 2019 00:45:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxw5MY7hjBdmtf8wcvwIAkR5SXUoGmdrizPiBPy/dJB3H0Bu5Yq5+RxiUnq78INPwciEDw4 X-Received: by 2002:a0c:d407:: with SMTP id t7mr4368771qvh.168.1566027935226; Sat, 17 Aug 2019 00:45:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566027935; cv=none; d=google.com; s=arc-20160816; b=03r78PdeQ/9dchqWS635suVSinEM5upVHxmpaZdWKMpfvIT5uXszHNVekIRMwHgc5M 9G7iDxUe7YH6w6eug2e+XlF8D4/mE9yhDB+rBX/tb+w5IyuIo/gKKXf1wBTO3UvZ1uAo Fbf4B0yoEFaTXeMYiD9aOpKIPuxzUhaEIP1xK2kqDoswb48q9owWaQYU8MH4LAOqc+GA pLE9QWBZVeOPdTNVc0rCsKs4PZHhZLuET9C5RWlqTYonKLsDR8S882eAn7WoHlpLZdA6 LxSkV/Pvpx3nnF7cGQBf4gXo+fHOh4ria9jhMfJbRN4oYgR14x2on/z+A7m2Muegb6ZM p4Yg== 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=BqIje9R/fZhXCbTqyx3JZFqMJZJuF6BOqFoM5qIgV5o=; b=mvC21n9DsqNjesA4E84Ia79W02RPuoBv/OC+vBSWSUkzj7fOSoPFNLWN/u3GNxixGR ZTQPrTBqYEgkd2Qw+DLSlZ/mdLU9vhQM4cvZKLkJbE41616Y7sbXUj0i3J+Y8h2JXQtG rwwEg+mPl1PBbjcR8iSgk16j4Jr9saJOQVRERS+4uj2uDlxJLiizfepCbT5pkCmsjuBL zr81KLcAvks8Jl7XV6167FcDybS0HAEclOkzm5BBGfxPc41/fgyr6IKXN4o+2tlV/jra mKMWKR5RxCUah6E1xVzBxNOO0jS6lpHghuw789KMX/alrf2+dSi5L8JyGjb8ls06wGsU Y+UQ== 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 h3si4866037qkm.355.2019.08.17.00.45.35 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 17 Aug 2019 00:45:35 -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]:34702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hytP4-0000jH-H0 for patch@linaro.org; Sat, 17 Aug 2019 03:45:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41176) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hytGe-00073h-4R for qemu-devel@nongnu.org; Sat, 17 Aug 2019 03:36:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hytGd-0006kQ-1A for qemu-devel@nongnu.org; Sat, 17 Aug 2019 03:36:52 -0400 Received: from mail03.asahi-net.or.jp ([202.224.55.15]:47824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hytGc-0006ZF-PB for qemu-devel@nongnu.org; Sat, 17 Aug 2019 03:36:50 -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 1ED3E5728F; Sat, 17 Aug 2019 16:36:40 +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 C9ABA240086; Sat, 17 Aug 2019 16:36:39 +0900 (JST) From: Yoshinori Sato To: qemu-devel@nongnu.org Date: Sat, 17 Aug 2019 16:36:24 +0900 Message-Id: <20190817073628.94473-19-ysato@users.sourceforge.jp> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190817073628.94473-1-ysato@users.sourceforge.jp> References: <20190817073628.94473-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 v23 18/22] 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, imammedo@redhat.com, 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 ac47f2a397..a0986fd15e 100644 --- a/hw/rx/rx62n.c +++ b/hw/rx/rx62n.c @@ -21,12 +21,14 @@ #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 "hw/qdev-properties.h" #include "sysemu/sysemu.h" +#include "sysemu/qtest.h" #include "cpu.h" /* @@ -191,8 +193,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 */