From patchwork Thu Dec 31 02:55:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miao Yan X-Patchwork-Id: 561836 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 7E365140C1E for ; Thu, 31 Dec 2015 13:57:04 +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=ddNHOAzi; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C02664BB0D; Thu, 31 Dec 2015 03:56:36 +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 vBW2mkYy9_zV; Thu, 31 Dec 2015 03:56:36 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 59E434BA37; Thu, 31 Dec 2015 03:56:31 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D69014BA8F for ; Thu, 31 Dec 2015 03:55:47 +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 vpebwsS8Ohjd for ; Thu, 31 Dec 2015 03:55:47 +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-pf0-f181.google.com (mail-pf0-f181.google.com [209.85.192.181]) by theia.denx.de (Postfix) with ESMTPS id 858744BA86 for ; Thu, 31 Dec 2015 03:55:37 +0100 (CET) Received: by mail-pf0-f181.google.com with SMTP id q63so113854312pfb.0 for ; Wed, 30 Dec 2015 18:55:37 -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=D+Z2s2GUQRgIe/LHxq9nQoLmCCh9VnccDhmWb+1vHsk=; b=ddNHOAziWf+HZOsrYreX4UG+xNPV2KkPkokurfN2yU5gVGFnrERqqH1JWFLlcKMMGm HuiNZSrWUC39l3JdzXphWV+RuD/F8u/w9Z1A/coibbknEF+NY/O/jS55ik82ziUC5pVN wnfT0sv8rrFaK7GxhWYuSXbwv4G1QmiEWheqhki6MvEYfatO0AjPZT9ZbYoD/7ES0MqU fTu5YsU0ZFK5UDMou+UjANVVd/hzP/0nxDLb5AJ6c+czAbJyP847R4eYLdMns8Sfdkbr 3CCwg2eT89JRkJ4lILzKsPCioBLbhNqNHE7GnpyNiRkOonYDSBBCG5Un1ysS19/TK5Tm 9vtQ== X-Received: by 10.98.18.71 with SMTP id a68mr35458045pfj.50.1451530536454; Wed, 30 Dec 2015 18:55:36 -0800 (PST) Received: from pa-dbc1131.eng.vmware.com ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id 7sm92818872pfb.62.2015.12.30.18.55.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 30 Dec 2015 18:55:35 -0800 (PST) From: Miao Yan To: u-boot@lists.denx.de, bmeng.cn@gmail.com, sjg@chromium.org Date: Wed, 30 Dec 2015 18:55:25 -0800 Message-Id: <1451530525-30913-9-git-send-email-yanmiaobest@gmail.com> X-Mailer: git-send-email 2.6.3.444.gfd13a2e In-Reply-To: <1451530525-30913-1-git-send-email-yanmiaobest@gmail.com> References: <1451530525-30913-1-git-send-email-yanmiaobest@gmail.com> Subject: [U-Boot] [PATCH v4 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 'fw' command Signed-off-by: Miao Yan --- Changes in v4: - limit maximum supported cpu number to 32 doc/README.x86 | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/doc/README.x86 b/doc/README.x86 index 1271e5e..aa3010d 100644 --- a/doc/README.x86 +++ b/doc/README.x86 @@ -295,9 +295,38 @@ 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, due space limitations in dtb, the maximum supported CPU +number is 32. + +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: + + => fw +fw - QEMU firmware interface + +Usage: +fw + - list : print firmware(s) currently loaded + - cpus : print online cpu number + - load : load kernel and initrd (if any) and setup for zboot + +=> fw load +loading kernel to address 02000000 initrd 04000000, size 0x1b1ab50 + +Here the kernel (bzImage) is loaded to 02000000 and initrd is to 0x04000000. Then, 'zboot' +can be used to boot the kernel: + +=> zboot 02000000 - 04000000 1b1ab50 CPU Microcode -------------