From patchwork Wed May 9 10:20:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Clark X-Patchwork-Id: 910738 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.b="Fb+H94pR"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40gsqz05h1z9s3Z for ; Wed, 9 May 2018 20:22:55 +1000 (AEST) Received: from localhost ([::1]:55539 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGMFI-0002Ho-LB for incoming@patchwork.ozlabs.org; Wed, 09 May 2018 06:22:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGMEe-0002HP-Qz for qemu-devel@nongnu.org; Wed, 09 May 2018 06:22:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGMEd-000431-7D for qemu-devel@nongnu.org; Wed, 09 May 2018 06:22:12 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:39067) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGMEd-000425-0N for qemu-devel@nongnu.org; Wed, 09 May 2018 06:22:11 -0400 Received: by mail-pf0-x242.google.com with SMTP id a22so11311147pfn.6 for ; Wed, 09 May 2018 03:22:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=47yxZp5RQJisSZM6EmazIPkrCG4NFFd5tAx3HJkDg/8=; b=Fb+H94pRDPLR/RwGT5aT5QYMXSkDsgjFR0PXpVEsh42qsA5onuAJyuyd24JIGmrY8z bIHwk0+9x0qkm6weAN2R55utBTunJv/Jqj6kE0ntfageufVkid0zCUdUOe0SYvPPDSiQ KVYve2oxGJXfgEIey+17dHJREnpoJCQKnH4wPg12yvwFsow7oNBEdr6BPCh6GUqiX+Mw +KTMYjsAj28svv18NFcehIzUnh5nqHlEXtxqZa3dyGmWQLOsXZWAMA3W8PCi4qOaNq7Q t8mkzg+sfGEVqNSR/2eZiMNe6rHGf7JoJGjnqGpmRlVixMpZVCpgxD7qoaeqyjc0aPci /ujQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=47yxZp5RQJisSZM6EmazIPkrCG4NFFd5tAx3HJkDg/8=; b=mC2BTHcyumIivBU3NmzJtYHpYbme3jXa+Yk3YloyrKqSCZr998XkSR8ja3vEo6cDFO ob4dj4FzxF+PFOkRjVptK1jAZhbMcQt9n0NDQU6bq4tP8SxhKOj6SCQ2BeHrN5NFo5G2 yq5jc6aY9UK7g+kOdeD3LeSo/MO7d/2Q7a2GT1/EeMOKu0GA/T1BSpm072SsK7FVFugg r7Z+9R1wx5iVAoA80yHQ1psk5DQlEWqBU2JkyjamTX5EvoUo4ry+U+0GJWpU4vIF+ryw XwIJvJlJ/XMZCwwUUfx/m6sT5WO2YsB0Wkit86LzM4UZcV3UzWnrU52znzSG9Giqa7fC EAPA== X-Gm-Message-State: ALQs6tBm9gxLeKj1czvVmK1K/iui4CO0aubg9mIK5T/g2833L8zEQDyi km5bAcYLkeIaX62J2Qm0A95WrxQ8nlU= X-Google-Smtp-Source: AB8JxZqVEf+Q8i39jiJmLHV8oRnVu/3pZ+pICQsYQSDLiv0U5jPsF4qEh47w14q//8kwj9pJSfGgfg== X-Received: by 10.98.55.69 with SMTP id e66mr25026640pfa.43.1525861330052; Wed, 09 May 2018 03:22:10 -0700 (PDT) Received: from localhost.localdomain (122-58-167-38-fibre.bb.spark.co.nz. [122.58.167.38]) by smtp.gmail.com with ESMTPSA id q62sm50086498pfd.172.2018.05.09.03.22.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 May 2018 03:22:09 -0700 (PDT) From: Michael Clark To: qemu-devel@nongnu.org Date: Wed, 9 May 2018 22:20:38 +1200 Message-Id: <1525861240-4130-2-git-send-email-mjc@sifive.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1525861240-4130-1-git-send-email-mjc@sifive.com> References: <1525861240-4130-1-git-send-email-mjc@sifive.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::242 Subject: [Qemu-devel] [PULL 1/3] riscv: spike: allow base == 0 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: patches@groups.riscv.org, KONRAD Frederic , Michael Clark Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: KONRAD Frederic The sanity check on base doesn't allow htif to be mapped @0. Check if the symbol exists instead so we can map it where we want. Reviewed-by: Michael Clark Signed-off-by: KONRAD Frederic Signed-off-by: Michael Clark Message-Id: <1525360636-18229-2-git-send-email-frederic.konrad@adacore.com> --- hw/riscv/riscv_htif.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/riscv/riscv_htif.c b/hw/riscv/riscv_htif.c index 3e17f3025106..be252ec8cce9 100644 --- a/hw/riscv/riscv_htif.c +++ b/hw/riscv/riscv_htif.c @@ -41,17 +41,20 @@ } while (0) static uint64_t fromhost_addr, tohost_addr; +static int address_symbol_set; void htif_symbol_callback(const char *st_name, int st_info, uint64_t st_value, - uint64_t st_size) + uint64_t st_size) { if (strcmp("fromhost", st_name) == 0) { + address_symbol_set |= 1; fromhost_addr = st_value; if (st_size != 8) { error_report("HTIF fromhost must be 8 bytes"); exit(1); } } else if (strcmp("tohost", st_name) == 0) { + address_symbol_set |= 2; tohost_addr = st_value; if (st_size != 8) { error_report("HTIF tohost must be 8 bytes"); @@ -248,7 +251,7 @@ HTIFState *htif_mm_init(MemoryRegion *address_space, MemoryRegion *main_mem, qemu_chr_fe_init(&s->chr, chr, &error_abort); qemu_chr_fe_set_handlers(&s->chr, htif_can_recv, htif_recv, htif_event, htif_be_change, s, NULL, true); - if (base) { + if (address_symbol_set == 3) { memory_region_init_io(&s->mmio, NULL, &htif_mm_ops, s, TYPE_HTIF_UART, size); memory_region_add_subregion(address_space, base, &s->mmio); From patchwork Wed May 9 10:20:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Clark X-Patchwork-Id: 910739 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.b="HttGwsnZ"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40gsr44l3Bz9s3Z for ; Wed, 9 May 2018 20:23:00 +1000 (AEST) Received: from localhost ([::1]:55541 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGMFO-0002LT-7u for incoming@patchwork.ozlabs.org; Wed, 09 May 2018 06:22:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGMEi-0002JD-5Q for qemu-devel@nongnu.org; Wed, 09 May 2018 06:22:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGMEh-00049Z-04 for qemu-devel@nongnu.org; Wed, 09 May 2018 06:22:16 -0400 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:44900) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGMEg-00048p-PR for qemu-devel@nongnu.org; Wed, 09 May 2018 06:22:14 -0400 Received: by mail-pf0-x244.google.com with SMTP id q22so25404640pff.11 for ; Wed, 09 May 2018 03:22:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=A6e+Oc96R/yne0h81eqyS2dKTfKs0vOv/Aj+HUAk7AM=; b=HttGwsnZdH8ALP5hCsMnZccx2Gy9gdsKIl03X25oA/EKseIjzQWmzy3ExUqvgpLIQT eXy6ibDvINn4Jqyde0oaFnyrDkO8+L56hZHoxhuTICNNAHqxQRqtllF6rN8LVh9qFZUZ 0/q5Tfr9FlxlWLmblOrh0essTNod7cEqxayK+bb5Sc3AIaAb4hPiNly/UiE15aRCvvmQ +DSzTLP8s+ugpWnV8DGfYERgywUdm9rXmKhKa2mvxq6b/Cpeao71VSU7ymwTc3H21dn2 UPr6U/xxVuPQpQQI2yKfDXvHKuZeD96Iy+Kx/WgkK7ROScpmyiWBorJzzdqW893Td6BK slew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=A6e+Oc96R/yne0h81eqyS2dKTfKs0vOv/Aj+HUAk7AM=; b=NhTXoXQfp7D15/MpbwPPgBjLz56xdpKowhR5Eh5wcO01GbeIg+tHe3ICIsEN2OhEeA UeD1TEGV/1hj3bF3eC9HdFz+deHHRBVbpvAvLMik+gxkTRzVqxcEj36d9LOTvQGDAc2l RxZ61CXGaTbMn9gY38GfXkkf7aqRo81tOxm815h3UQxr/VXkHoqOZizgOTQV6srFeBpR TEXygFBWqgdAPDOEidrj4tKqZTwzZQ5lX5QDaL3NWoOrE3WjfKPdKmzcscF2qfTh7xSL DEFc+716P3ShqiN/jKm5RZRSB42Ca5HDM5ZuotsTcq618rSfbN2Zpt1uTT9w2XTMV/iz nt/g== X-Gm-Message-State: ALQs6tANb2jte4POAV2TsNIr7MthMDNuZNFZdxJYTAq07QAI4c6CWAiU y+y2L2dkKSAT7DJ6rxpwrrJFCHI5huk= X-Google-Smtp-Source: AB8JxZqFwxMiRkFoXTmaEIAD0Sg9SxNTK75jT+1WP7Cv5ZOvOtzHRPf6Xq9SULmTm0/ZWOnaAQN5zw== X-Received: by 10.98.16.131 with SMTP id 3mr20410877pfq.229.1525861333562; Wed, 09 May 2018 03:22:13 -0700 (PDT) Received: from localhost.localdomain (122-58-167-38-fibre.bb.spark.co.nz. [122.58.167.38]) by smtp.gmail.com with ESMTPSA id q62sm50086498pfd.172.2018.05.09.03.22.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 May 2018 03:22:12 -0700 (PDT) From: Michael Clark To: qemu-devel@nongnu.org Date: Wed, 9 May 2018 22:20:39 +1200 Message-Id: <1525861240-4130-3-git-send-email-mjc@sifive.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1525861240-4130-1-git-send-email-mjc@sifive.com> References: <1525861240-4130-1-git-send-email-mjc@sifive.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::244 Subject: [Qemu-devel] [PULL 2/3] riscv: htif: increase the priority of the htif subregion X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: patches@groups.riscv.org, KONRAD Frederic , Michael Clark Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: KONRAD Frederic The htif device is supposed to be mapped over an other subregion. So increase its priority to one to avoid any conflict. Here is the output of info mtree: Before: (qemu) info mtree address-space: memory 0000000000000000-ffffffffffffffff (prio 0, i/o): system 0000000000000000-000000000000000f (prio 0, i/o): riscv.htif.uart 0000000000000000-0000000000011fff (prio 0, ram): riscv.spike.bootrom 0000000002000000-000000000200ffff (prio 0, i/o): riscv.sifive.clint 0000000080000000-0000000087ffffff (prio 0, ram): riscv.spike.ram address-space: I/O 0000000000000000-000000000000ffff (prio 0, i/o): io address-space: cpu-memory-0 0000000000000000-ffffffffffffffff (prio 0, i/o): system 0000000000000000-000000000000000f (prio 0, i/o): riscv.htif.uart 0000000000000000-0000000000011fff (prio 0, ram): riscv.spike.bootrom 0000000002000000-000000000200ffff (prio 0, i/o): riscv.sifive.clint 0000000080000000-0000000087ffffff (prio 0, ram): riscv.spike.ram After: (qemu) info mtree address-space: memory 0000000000000000-ffffffffffffffff (prio 0, i/o): system 0000000000000000-000000000000000f (prio 1, i/o): riscv.htif.uart 0000000000000000-0000000000011fff (prio 0, ram): riscv.spike.bootrom 0000000002000000-000000000200ffff (prio 0, i/o): riscv.sifive.clint 0000000080000000-0000000087ffffff (prio 0, ram): riscv.spike.ram address-space: I/O 0000000000000000-000000000000ffff (prio 0, i/o): io address-space: cpu-memory-0 0000000000000000-ffffffffffffffff (prio 0, i/o): system 0000000000000000-000000000000000f (prio 1, i/o): riscv.htif.uart 0000000000000000-0000000000011fff (prio 0, ram): riscv.spike.bootrom 0000000002000000-000000000200ffff (prio 0, i/o): riscv.sifive.clint 0000000080000000-0000000087ffffff (prio 0, ram): riscv.spike.ram Reviewed-by: Michael Clark Signed-off-by: KONRAD Frederic Signed-off-by: Michael Clark Message-Id: <1525360636-18229-3-git-send-email-frederic.konrad@adacore.com> --- hw/riscv/riscv_htif.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/riscv/riscv_htif.c b/hw/riscv/riscv_htif.c index be252ec8cce9..f73512941fb6 100644 --- a/hw/riscv/riscv_htif.c +++ b/hw/riscv/riscv_htif.c @@ -253,8 +253,9 @@ HTIFState *htif_mm_init(MemoryRegion *address_space, MemoryRegion *main_mem, htif_be_change, s, NULL, true); if (address_symbol_set == 3) { memory_region_init_io(&s->mmio, NULL, &htif_mm_ops, s, - TYPE_HTIF_UART, size); - memory_region_add_subregion(address_space, base, &s->mmio); + TYPE_HTIF_UART, size); + memory_region_add_subregion_overlap(address_space, base, + &s->mmio, 1); } return s; From patchwork Wed May 9 10:20:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Clark X-Patchwork-Id: 910742 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.b="LFvAkRH5"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40gstR5MfNz9s3q for ; Wed, 9 May 2018 20:25:03 +1000 (AEST) Received: from localhost ([::1]:55550 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGMHN-00045v-Eg for incoming@patchwork.ozlabs.org; Wed, 09 May 2018 06:25:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45285) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGMEk-0002LG-KO for qemu-devel@nongnu.org; Wed, 09 May 2018 06:22:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGMEj-0004Eq-Lj for qemu-devel@nongnu.org; Wed, 09 May 2018 06:22:18 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:46362) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGMEj-0004D0-GH for qemu-devel@nongnu.org; Wed, 09 May 2018 06:22:17 -0400 Received: by mail-pf0-x242.google.com with SMTP id p12so25387641pff.13 for ; Wed, 09 May 2018 03:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LgSDkSAYgyak4/h7FOuUBCmm7VzxdqbJE8EyVPLaDG0=; b=LFvAkRH5nI4rfUrLty2Sske1vpCi5098phLnRj6j4ujiXkh6rMtK2akyw63KY7TdDz ksFHqKSmH3BUdXQtBkv25w7K0hR7gn/5uoYjJqdwhnlQmQ80ZjDTve2SkDrtOpz0Klxd ubkbCTxCsU1M41JP0V6jvqEGfg2EB3ATRAk5dwyHqayUXlSCSuw0+WtzSaA2u5M+yyKC ZfjFKKIYfMP5xf55iD8J8Nfz9qrGct9mJLJ6QSJ5A5Y0Fp4zhiuhpLd8TBllwmV5+wzT s6LTx/bRyfh2OY7GHTRvnA0aWsm5kolFHA9Rtoou76ZuDs2MGwOLbL14P6KmXsf8X8pd UuGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LgSDkSAYgyak4/h7FOuUBCmm7VzxdqbJE8EyVPLaDG0=; b=WjdqlZGkSDqbtku7m/CeN1TM+YG6cmsFlZjY8s49I6ppMV44nU0zuBrnGGbPLejtQS bFKkiZnB7+eDHHANuAoR5xGbNykRmlI72Eb0PMOv8KGfXSZpu5l+HWdE+UTka7hMeQEa HaxK52JI0p+rKhemVLJ2iLLH/ULhFqdd+yNDpdeVOrOwaJjNBd7ot8CwtVpjGeTQir1u 5k/d4Kcj5O6/4sMIlR0dRKzkifEQk62yWs/9BEQXBdYv/o2DHtBQHRl/tDdHYipXu3Zw NHr23qnlVeGCaENMOMp+LrbvAAohaQsjWyQS/kWwT2yT6vBqE8Bv2vuO8V57pDv2cTCL ccpA== X-Gm-Message-State: ALQs6tC2OKLF51NyyKmPuYBtDalJV5HUA8IgvIo0++kmGtgK3eDOk/S9 EYCl86JdkK08CTLBFeMJCxqmet8Ida8= X-Google-Smtp-Source: AB8JxZqTbQn/G+ZinoM55XA0hk+qKPLyzJfwJ46Um2QbJZ+nNuRFHNBWO87Pg/vGqnV21WBCluMFTw== X-Received: by 2002:a63:7e58:: with SMTP id o24-v6mr36378097pgn.325.1525861336503; Wed, 09 May 2018 03:22:16 -0700 (PDT) Received: from localhost.localdomain (122-58-167-38-fibre.bb.spark.co.nz. [122.58.167.38]) by smtp.gmail.com with ESMTPSA id q62sm50086498pfd.172.2018.05.09.03.22.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 May 2018 03:22:16 -0700 (PDT) From: Michael Clark To: qemu-devel@nongnu.org Date: Wed, 9 May 2018 22:20:40 +1200 Message-Id: <1525861240-4130-4-git-send-email-mjc@sifive.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1525861240-4130-1-git-send-email-mjc@sifive.com> References: <1525861240-4130-1-git-send-email-mjc@sifive.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::242 Subject: [Qemu-devel] [PULL 3/3] riscv: requires libfdt X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: patches@groups.riscv.org, KONRAD Frederic , Michael Clark , qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: KONRAD Frederic When compiling on a machine without libfdt installed the configure script should try to get libfdt from the git or should die because otherwise CONFIG_LIBFDT is not set and the build process end in an error in the link phase.. eg: hw/riscv/virt.o: In function `riscv_virt_board_init': qemu/src/hw/riscv/virt.c:317: undefined reference to `qemu_fdt_setprop_cell' qemu/src/hw/riscv/virt.c:319: undefined reference to `qemu_fdt_setprop_cell' qemu/src/hw/riscv/virt.c:345: undefined reference to `qemu_fdt_dumpdtb' collect2: error: ld returned 1 exit status make[1]: *** [qemu-system-riscv64] Error 1 make: *** [subdir-riscv64-softmmu] Error 2 Cc: qemu-stable@nongnu.org Reviewed-by: Bastian Koppelmann Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Clark Signed-off-by: KONRAD Frederic Signed-off-by: Michael Clark Message-Id: <1525360636-18229-4-git-send-email-frederic.konrad@adacore.com> --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 1443422e83f1..479e9a787e6e 100755 --- a/configure +++ b/configure @@ -3761,7 +3761,7 @@ fi fdt_required=no for target in $target_list; do case $target in - aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu) + aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu|riscv*-softmmu) fdt_required=yes ;; esac