From patchwork Mon Jan 4 08:00:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miao Yan X-Patchwork-Id: 562263 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3E0C41402DE for ; Mon, 4 Jan 2016 19:02:51 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=IqRu8MYv; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 988BA4B8C3; Mon, 4 Jan 2016 09:01:53 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fw_A08CX6cbP; Mon, 4 Jan 2016 09:01:53 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D7B364B801; Mon, 4 Jan 2016 09:01:32 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5A9604B83F for ; Mon, 4 Jan 2016 09:01:30 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pmJlUbMQYL8O for ; Mon, 4 Jan 2016 09:01:30 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by theia.denx.de (Postfix) with ESMTPS id 7823E4B841 for ; Mon, 4 Jan 2016 09:01:08 +0100 (CET) Received: by mail-pa0-f42.google.com with SMTP id do7so1622900pab.2 for ; Mon, 04 Jan 2016 00:01:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=zIg1wIKseCs6YCmNXF6I5jMAZxOHz22uqlQ8dU6RwS0=; b=IqRu8MYvInh4nCMkmp0sRBJgarYWlqyxsfkj73azsRtdeUPNMCR/yA4WXuCMjfyeBX 898MvjB9NLal/IXXjkn9GyiY/7JbuCI4gurk0cI3ABsdeJd5nh/9QTcELjCzjJeqV0n0 yQV7azgzqA2y3OVIyk19NzRY10LoHIMxH5jJlJ19ijeky3vMumK0u9unNqsH6/qncYtc Epa0Qrz6BN+vaYPYf06uk71+bwrR6S/STi7wijFVVLvTD+OzQonjiVAL1kBmFVg7uOql 6SHV2XSzDspTtvwQsOpRQBajpM7WCI9sz/YcVbipJ8gLzDDR7HuZWmoXTuWAMuel1UDN 0vJg== X-Received: by 10.66.155.8 with SMTP id vs8mr125206154pab.18.1451894467196; Mon, 04 Jan 2016 00:01:07 -0800 (PST) Received: from pa-dbc1131.eng.vmware.com ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id p17sm89768592pfi.54.2016.01.04.00.01.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Jan 2016 00:01:06 -0800 (PST) From: Miao Yan To: u-boot@lists.denx.de, sjg@chromium.org, bmeng.cn@gmail.com Date: Mon, 4 Jan 2016 00:00:55 -0800 Message-Id: <1451894455-39387-9-git-send-email-yanmiaobest@gmail.com> X-Mailer: git-send-email 2.6.3.444.gfd13a2e In-Reply-To: <1451894455-39387-1-git-send-email-yanmiaobest@gmail.com> References: <1451894455-39387-1-git-send-email-yanmiaobest@gmail.com> Subject: [U-Boot] [PATCH v5 8/8] x86: qemu: add documentaion for the fw_cfg interface X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Document the usage of 'qfw' command Signed-off-by: Miao Yan Reviewed-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v5: - maximum supported is 255 now which is imposed by QEMU - 'fw' to 'qfw' doc/README.x86 | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/doc/README.x86 b/doc/README.x86 index 1271e5e..36aaef0 100644 --- a/doc/README.x86 +++ b/doc/README.x86 @@ -295,9 +295,37 @@ show QEMU's VGA console window. Note this will disable QEMU's serial output. If you want to check both consoles, use '-serial stdio'. Multicore is also supported by QEMU via '-smp n' where n is the number of cores -to instantiate. Currently the default U-Boot built for QEMU supports 2 cores. -In order to support more cores, you need add additional cpu nodes in the device -tree and change CONFIG_MAX_CPUS accordingly. +to instantiate. Note, the maximum supported CPU number in QEMU is 255. + +The fw_cfg interface in QEMU also provides information about kernel data, initrd, +command-line arguments and more. U-Boot supports directly accessing these informtion +from fw_cfg interface, this saves the time of loading them from hard disk or +network again, through emulated devices. To use it , simply providing them in +QEMU command line: + +$ qemu-system-i386 -nographic -bios path/to/u-boot.rom -m 1024 -kernel /path/to/bzImage + -append 'root=/dev/ram console=ttyS0' -initrd /path/to/initrd -smp 8 + +Note: -initrd and -smp are both optional + +Then start QEMU, in U-Boot command line use the following U-Boot command to setup kernel: + + => qfw +qfw - QEMU firmware interface + +Usage: +qfw + - list : print firmware(s) currently loaded + - cpus : print online cpu number + - load : load kernel and initrd (if any) and setup for zboot + +=> qfw load +loading kernel to address 01000000 size 5d9d30 initrd 04000000 size 1b1ab50 + +Here the kernel (bzImage) is loaded to 01000000 and initrd is to 04000000. Then, 'zboot' +can be used to boot the kernel: + +=> zboot 02000000 - 04000000 1b1ab50 CPU Microcode -------------