From patchwork Tue Jun 22 13:16:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1495675 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=lNXuk+Ng; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G8RlT6Rczz9sVp for ; Tue, 22 Jun 2021 23:17:41 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A0493829E7; Tue, 22 Jun 2021 15:16:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="lNXuk+Ng"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4AE79829CF; Tue, 22 Jun 2021 15:16:51 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) (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 E121D829AE for ; Tue, 22 Jun 2021 15:16:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bmeng.cn@gmail.com Received: by mail-pf1-x431.google.com with SMTP id 21so1410130pfp.3 for ; Tue, 22 Jun 2021 06:16:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3QGEx2harsscxSE9VG3jmsf2kGD2yCF9mga9ZXZ7rqA=; b=lNXuk+NgEKkEp4tzKzjqh7xB8u6DDyVBN0RjwsMqSzS8b0OE3Q7WPEy2Zljd+EdQOu 7AJFYn+EgCXinHcMOj9plCzrESrMJPRAkBqNcddLrLw8v9MBlpO4lNJi4+08ta0xdL9N soqbyVO09LK9ImJFmJISsP60FiNRZldL4h/qudo7vYYX8RmpMnYkHCtEBteap6GTW6ph uC07PB3xf2mulSoiGoxJBaTyrNp4PqrtR7tML+ixn8ZrOAzScurw0E5G2e1AClMViH+5 D6phX7cBjpFb/+xl12SK23gX+KE4GtaEbku7cpLCMB/MJVJmwCnXK4E//Tmjm3BGhsUy AXNQ== 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=3QGEx2harsscxSE9VG3jmsf2kGD2yCF9mga9ZXZ7rqA=; b=nShTtPd1nUZRMP3Mh+xWA4jdQ1z4CQla69C67uHQCI7dFsvT3fner6nbm53mE0PdWY zOrdFrVdh3jjfoNJbFwfYXpPT819P+A+N98bGInJEp7DJ6tyaN9Q6qYrICJfdxVaLrKS B7Ue3gtuhUfZ5N8urMtqxL1E6oLp02m0KyPODeZzEddQX5AZEajRUAt5aitl7xd1LwOJ fKoS6eTeMCcPLA7MHHAYLwOJ8rmQt3VNlMHqyoOhjmQgOm6H/+/IhBbgg4hVSeaeH7UC 2owb5FD39T/cLTFbkt3KLM69P0ZEgX5CQtgJECylzATwhx/GIg1YG9KPNSN60C9ZUACQ 5yew== X-Gm-Message-State: AOAM531A1YFv2EuE+Skk5TLe5ogEHfXqUHMhBUXzs4BANeV9oLzT1OsY JsDAx9RzxBjZczWDsB7erT8= X-Google-Smtp-Source: ABdhPJzkjxQo4PJDt0j10KgRemc6A0ytyFEyQoegtowtooU2KN5vCfYqeUTQ3vSWAsJU+uWLYy6z8Q== X-Received: by 2002:a63:5d5c:: with SMTP id o28mr3796409pgm.22.1624367804134; Tue, 22 Jun 2021 06:16:44 -0700 (PDT) Received: from i9-aorus-gtx1080.localdomain (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id j24sm18456482pfe.58.2021.06.22.06.16.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Jun 2021 06:16:43 -0700 (PDT) From: Bin Meng To: Tom Rini , u-boot@lists.denx.de Cc: Bin Meng Subject: [PATCH v2 6/7] doc: develop: Convert README.nvme to reST Date: Tue, 22 Jun 2021 21:16:22 +0800 Message-Id: <20210622131623.21265-6-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210622131623.21265-1-bmeng.cn@gmail.com> References: <20210622131623.21265-1-bmeng.cn@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean This converts the existing README.nvme to reST, and puts it under the develop/driver-model/ directory. Signed-off-by: Bin Meng --- Changes in v2: - new patch: Convert README.nvme to reST doc/develop/driver-model/index.rst | 1 + .../driver-model/nvme.rst} | 25 ++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) rename doc/{README.nvme => develop/driver-model/nvme.rst} (88%) diff --git a/doc/develop/driver-model/index.rst b/doc/develop/driver-model/index.rst index 10a76256b0..7366ef818c 100644 --- a/doc/develop/driver-model/index.rst +++ b/doc/develop/driver-model/index.rst @@ -19,6 +19,7 @@ subsystems i2c-howto livetree migration + nvme of-plat pci-info pmic-framework diff --git a/doc/README.nvme b/doc/develop/driver-model/nvme.rst similarity index 88% rename from doc/README.nvme rename to doc/develop/driver-model/nvme.rst index e8f9be149e..736c0a063d 100644 --- a/doc/README.nvme +++ b/doc/develop/driver-model/nvme.rst @@ -1,11 +1,13 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# Copyright (C) 2017 NXP Semiconductors -# Copyright (C) 2017 Bin Meng +.. SPDX-License-Identifier: GPL-2.0+ +.. Copyright (C) 2017 NXP Semiconductors +.. Copyright (C) 2017 Bin Meng -What is NVMe +NVMe Support ============ +What is NVMe +------------ + NVM Express (NVMe) is a register level interface that allows host software to communicate with a non-volatile memory subsystem. This interface is optimized for enterprise and client solid state drives, typically attached to the PCI @@ -48,6 +50,8 @@ identified. To list all of the NVMe hard disks, try: +.. code-block:: none + => nvme info Device 0: Vendor: 0x8086 Rev: 8DV10131 Prod: CVFT535600LS400BGN Type: Hard Disk @@ -55,10 +59,14 @@ To list all of the NVMe hard disks, try: and print out detailed information for controller and namespaces via: +.. code-block:: none + => nvme detail Raw block read/write to can be done via the 'nvme read/write' commands: +.. code-block:: none + => nvme read a0000000 0 11000 => tftp 80000000 /tftpboot/kernel.itb @@ -66,6 +74,8 @@ Raw block read/write to can be done via the 'nvme read/write' commands: Of course, file system command can be used on the NVMe hard disk as well: +.. code-block:: none + => fatls nvme 0:1 32376967 kernel.itb 22929408 100m @@ -81,4 +91,7 @@ QEMU supports NVMe emulation and we can test NVMe driver with QEMU x86 running U-Boot. Please see README.x86 for how to build u-boot.rom image for QEMU x86. Example command line to call QEMU x86 below with emulated NVMe device: -$ ./qemu-system-i386 -drive file=nvme.img,if=none,id=drv0 -device nvme,drive=drv0,serial=QEMUNVME0001 -bios u-boot.rom + +.. code-block:: bash + + $ ./qemu-system-i386 -drive file=nvme.img,if=none,id=drv0 -device nvme,drive=drv0,serial=QEMUNVME0001 -bios u-boot.rom