From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7B4D9C433F5 for ; Thu, 27 Jan 2022 06:11:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0444482133; Thu, 27 Jan 2022 07:11:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="a9rrwVpL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2522181B53; Thu, 27 Jan 2022 07:11:40 +0100 (CET) Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2D09280F3F for ; Thu, 27 Jan 2022 07:11:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=apatel@ventanamicro.com Received: by mail-pf1-x42f.google.com with SMTP id n32so1718168pfv.11 for ; Wed, 26 Jan 2022 22:11:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=twiyr0GIKp9Bne9m2AfKdWvNUQjfEx0gpJswHWSp218=; b=a9rrwVpLjEKQYbKeTHScCvVDIHZaofbEoRjNFsouFUUuIjg6Sb8i4Z2bEEd60e+WKd uuaTd74eD9lu5N0UwY5F33VXWE7Yq7GkjiBK8Ga2LwxL7N/LWnUzWWDyMrbHNWreMWvR bK5rSB+jh/MI4uSQry9GaquziCfFg0eyrk6cZhLfZWjdUfJcuNw7+fVs9RpAKCsy23HA PeSuWAXgZeNH7YDKhF+EWtcsvybLCuYfBg3SS0QusbbR0PvQygHGkA0k0/F04T8I+YM6 llhFf4nJw/NUiQt30WFKfgXXGDBDGBSk7j3+OcTf8bDRZRBHJwbspv9En0+M1mlviu/q Bvtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=twiyr0GIKp9Bne9m2AfKdWvNUQjfEx0gpJswHWSp218=; b=0g5WIUjS9WSeK7kjb4/IHNOzTFSf+DqE5bS7VPEzKG00TEMlz7kpk+Nx6FEj/Bq/Rj NlqKYP0/XMvIjTb6pvX/sqi2G2UAM9LAoeWw9kb0Hm7deyZAwshZzaVMNWO66s+q3V+S zbgV/bX2At8nQG0bo+QisNI4cotEVUlP3AZySMkYwq7YZADb6LUkwIn26zyVNA7gir7z EnkNKkwdH8ljkwZw9Nx2x0MxEIl0g90KgtW+dHqrqNoFNAKcuohIEmFAL6kLUmupoGP+ bMF241m57FxxwLwE8VvSdUDn0VGOdGJiMdPdA7VuSQjYht+1VvZcx6XedQa81DCu8g6b i5gQ== X-Gm-Message-State: AOAM531m6hirIa5X/bUGyQ3NzCE9WowuoGcqdN+H9vUWgR/1jne2biOY U1S7aeeIZvDBoe7/V9VtkjV1MQ== X-Google-Smtp-Source: ABdhPJwMQdg1oLYOFn/xFklALN6gjcuhgcd2fj/HV3m9qLfZPa7cWqR7Fydp9LyuZlna8ckFGMW4LQ== X-Received: by 2002:a63:874a:: with SMTP id i71mr1718444pge.576.1643263895371; Wed, 26 Jan 2022 22:11:35 -0800 (PST) Received: from localhost.localdomain ([171.61.74.240]) by smtp.gmail.com with ESMTPSA id j4sm4732441pjv.46.2022.01.26.22.11.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jan 2022 22:11:34 -0800 (PST) From: Anup Patel To: Rick Chen , Bin Meng Cc: Atish Patra , Alistair Francis , Anup Patel , U-Boot Mailing List , Anup Patel Subject: [PATCH v2 0/4] QEMU spike machine support for U-Boot Date: Thu, 27 Jan 2022 11:41:06 +0530 Message-Id: <20220127061110.721103-1-apatel@ventanamicro.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean We can use same U-Boot binary compiled using qemu-riscv64_smode_defconfig on QEMU virt machine and QEMU spike machine. To achieve this, we need HTIF console support for U-Boot QEMU RISC-V board hence this series. To test this series with latest OpenSBI, we can use the following command: qemu-system-riscv64 -M spike -m 256M -display none -serial stdio \ -bios opensbi/build/platform/generic/firmware/fw_jump.bin -kernel \ ./u-boot/u-boot.bin These patch can be found in qemu_riscv_htif_v2 branch at: https://github.com/avpatel/u-boot.git Changes since v1: - Use ofnode_by_compatible() in PATCH3 - Updated QEMU RISC-V documentation in PATCH4 Anup Patel (4): serial: Add RISC-V HTIF console driver riscv: qemu: Enable HTIF console support riscv: qemu: Implement is_flash_available() for MTD NOR doc: qemu-riscv: Update documentation for QEMU spike machine board/emulation/qemu-riscv/Kconfig | 1 + board/emulation/qemu-riscv/qemu-riscv.c | 12 ++ doc/board/emulation/qemu-riscv.rst | 48 ++++--- drivers/serial/Kconfig | 8 ++ drivers/serial/Makefile | 1 + drivers/serial/serial_htif.c | 178 ++++++++++++++++++++++++ 6 files changed, 232 insertions(+), 16 deletions(-) create mode 100644 drivers/serial/serial_htif.c -- 2.25.1