From patchwork Wed Nov 21 23:31:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 10693307 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 18AE914DE for ; Wed, 21 Nov 2018 23:57:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 074102B802 for ; Wed, 21 Nov 2018 23:57:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA1FC2BB82; Wed, 21 Nov 2018 23:57:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,SUBJ_OBFU_PUNCT_MANY autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 69B0E2B802 for ; Wed, 21 Nov 2018 23:57:54 +0000 (UTC) Received: from localhost ([::1]:43153 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPcNV-0008Od-FQ for patchwork-qemu-devel@patchwork.kernel.org; Wed, 21 Nov 2018 18:57:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPcKw-0006Tx-Rh for qemu-devel@nongnu.org; Wed, 21 Nov 2018 18:55:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPcKs-000588-U5 for qemu-devel@nongnu.org; Wed, 21 Nov 2018 18:55:14 -0500 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:32785) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gPcKq-00051k-QO for qemu-devel@nongnu.org; Wed, 21 Nov 2018 18:55:10 -0500 Received: by mail-pl1-x642.google.com with SMTP id z23so7680077plo.0 for ; Wed, 21 Nov 2018 15:54:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=subject:date:message-id:cc:from:to; bh=kpofsyvNhScQEI5gH8wT/08wxouwuLWWIJjXwHlk18s=; b=AtAta2rmc/MY3tjblXAimVR8D335EtXxUfSwzwF0fUcIp+MtKqcuz82IXll8CJf4Xc TOGjGyNmuYkhOtuSDs9yPC1rJz2fNAOeHWMEXgCfA0fhOeGkDI/Ui97MfHeWGmYVCBUC wls27E76Yl/HVSBn2jY8sM6/tgl/UJaeA3rDiLOj0FIzGJJMRSJ9zWEVJ5p8gfr1JGmc 5Vf/JLRiJcTMdZT3Wrwtk/gGCSoGREYuNg68FPQ4GSMSr1UGBijKAdHrnC/xkLJSrAN0 sH9qbLixjq5CVQKQrx7gMk5C81Z7ocBZcHYuR43NopfP5dmyAmG2QL7Brf8q9/hNfZBD 1hBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:cc:from:to; bh=kpofsyvNhScQEI5gH8wT/08wxouwuLWWIJjXwHlk18s=; b=ZAmYWLsHJKwSsYGKgCdihjKm4s38gmVFNkMo47bRwsBnyofBHozxWJC8GhnOt1VdC6 FN39OsnggzPA9azfJ4RrpyxXKOOHs70xG3wAOGVdoZnxQCs40UWYYQYzNDLGtRZEEv1Z MWbU1fYYt/oGjhUIyD37cYhDU6dylVpqslTa2m2H1gpC0BkU+jaCzYrwPDlmI3PKYaRz 7HlknxT+0N3HzmCA+EacsrQO+hAG2IEAkRx2RxT+/R4VRTSfy2mygN60RsA3TKzBSrqp G1N9+Jt9jLeITotPTRzVs4JiepSea2fLUEXtSA/4v+iAf99Q+ioaFIwsfiOH11rHaAI0 Iz8g== X-Gm-Message-State: AA+aEWZHJ7pAizzRYsday7CdofRvrlvO9O1rQr2qJSTKceVjh1ikxB8a pfkEBqAwEZaMmT5GKgZqKEswebeomQ0= X-Google-Smtp-Source: AFSGD/WwtI4BZGwifUPbINlauxRg44QvWUtXNkOc/hXlEbUP4RTk86SVSYrok420rcVgDkCj0VlQKg== X-Received: by 2002:a65:63d3:: with SMTP id n19mr7986333pgv.179.1542844497790; Wed, 21 Nov 2018 15:54:57 -0800 (PST) Received: from localhost ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id 19sm49767430pfs.108.2018.11.21.15.54.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Nov 2018 15:54:56 -0800 (PST) Date: Wed, 21 Nov 2018 15:31:23 -0800 Message-Id: <20181121233123.6408-1-palmer@sifive.com> X-Mailer: git-send-email 2.18.1 From: Palmer Dabbelt To: qemu-riscv@nongnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::642 Subject: [Qemu-devel] [PATCH for-3.2] RISC-V: Deprecate hifive_e and hifive_u machines 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: Palmer Dabbelt , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP These machines had names that were too general: there are many E and U machines, and it's easy for users to get confused about which one is which. The one configuration that can faithfully match an existing ASIC-based board has been renamed to 'sifive-hifive1', we'll work through the emulation fidelity issues apparent in the other targets before adding machines for those. Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_e.c | 26 ++++++++++++++++++++++++-- hw/riscv/sifive_u.c | 2 ++ qemu-deprecated.texi | 7 +++++++ 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/hw/riscv/sifive_e.c b/hw/riscv/sifive_e.c index cb513cc3bb50..439d20e0efe7 100644 --- a/hw/riscv/sifive_e.c +++ b/hw/riscv/sifive_e.c @@ -95,7 +95,7 @@ static void sifive_mmio_emulate(MemoryRegion *parent, const char *name, memory_region_add_subregion(parent, offset, mock_mmio); } -static void riscv_sifive_e_init(MachineState *machine) +static void riscv_sifive_hifive1_init(MachineState *machine) { const struct MemmapEntry *memmap = sifive_e_memmap; @@ -135,6 +135,17 @@ static void riscv_sifive_e_init(MachineState *machine) } } +static void riscv_sifive_e_init(MachineState *machine) +{ +#if defined(TARGET_RISCV32) + warn_report("The sifive_e machine is deprecated in favor of sifive-hifive1"); +#else + warn_report("The sifive_e machine is deprecated."); +#endif + + return riscv_sifive_hifive1_init(machine); +} + static void riscv_sifive_e_soc_init(Object *obj) { SiFiveESoCState *s = RISCV_E_SOC(obj); @@ -213,13 +224,24 @@ static void riscv_sifive_e_soc_realize(DeviceState *dev, Error **errp) static void riscv_sifive_e_machine_init(MachineClass *mc) { - mc->desc = "RISC-V Board compatible with SiFive E SDK"; + mc->desc = "(deprecated) RISC-V Board compatible with SiFive E SDK"; mc->init = riscv_sifive_e_init; mc->max_cpus = 1; } DEFINE_MACHINE("sifive_e", riscv_sifive_e_machine_init) +#if defined(TARGET_RISCV32) +static void riscv_sifive_hifive1_machine_init(MachineClass *mc) +{ + mc->desc = "SiFive's HiFive1 Development Board"; + mc->init = riscv_sifive_hifive1_init; + mc->max_cpus = 1; +} + +DEFINE_MACHINE("sifive-hifive1", riscv_sifive_hifive1_machine_init) +#endif + static void riscv_sifive_e_soc_class_init(ObjectClass *oc, void *data) { DeviceClass *dc = DEVICE_CLASS(oc); diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c index ef07df244241..0ce6a9dd2609 100644 --- a/hw/riscv/sifive_u.c +++ b/hw/riscv/sifive_u.c @@ -238,6 +238,8 @@ static void create_fdt(SiFiveUState *s, const struct MemmapEntry *memmap, static void riscv_sifive_u_init(MachineState *machine) { + warn_report("The sifive_u machine is deprecated."); + const struct MemmapEntry *memmap = sifive_u_memmap; SiFiveUState *s = g_new0(SiFiveUState, 1); diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index cb4291f1e5bc..f50696d3dc53 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -148,6 +148,13 @@ This machine type uses an unmaintained firmware, broken in lots of ways, and unable to start post-2004 operating systems. 40p machine type should be used instead. +@subsection sifive_e and sifive_u (RISC-V) (since 3.2) + +The names for these machine types are a bit too ambiguous. The 32-bit sifive_e +machine has been replaced by the 'sifive-hifive1' machine, which closely +matches that hardware. The 'virt' machine type should be used instead of all +others. + @section Device options @subsection Block device options