Re: [U-Boot] [PATCH v4 8/8] x86: qemu: add documentaion for the fw_cfg interface

2016-01-03 Thread Bin Meng
Hi Miao,

On Thu, Dec 31, 2015 at 10:55 AM, Miao Yan  wrote:
> 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

Please move the ',' to the end of the line above

> +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 0200 initrd 0400, size 0x1b1ab50

This 'size' looks confusing as it is unclear which size is this for.
So we may need enhance 'fw load' to print kernel size as well,
something like:

loading kernel to address 0200 size , initrd 0400 size
. Note you can omit 0x in the size to keep consitency.

> +
> +Here the kernel (bzImage) is loaded to 0200 and initrd is to 0x0400. 
> Then, 'zboot'
> +can be used to boot the kernel:
> +
> +=> zboot 0200 - 0400 1b1ab50
>
>  CPU Microcode
>  -
> --
> 1.9.1
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 8/8] x86: qemu: add documentaion for the fw_cfg interface

2015-12-30 Thread Miao Yan
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 0200 initrd 0400, size 0x1b1ab50
+
+Here the kernel (bzImage) is loaded to 0200 and initrd is to 0x0400. 
Then, 'zboot'
+can be used to boot the kernel:
+
+=> zboot 0200 - 0400 1b1ab50
 
 CPU Microcode
 -
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 8/8] x86: qemu: add documentaion for the fw_cfg interface

2015-12-30 Thread Simon Glass
Hi Miao,

On 30 December 2015 at 19:55, Miao Yan  wrote:
> 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.

This is a little unclear, because it seems like your code actually
fixes this by automatically supporting more CPUs.

> +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 0200 initrd 0400, size 0x1b1ab50
> +
> +Here the kernel (bzImage) is loaded to 0200 and initrd is to 0x0400. 
> Then, 'zboot'
> +can be used to boot the kernel:
> +
> +=> zboot 0200 - 0400 1b1ab50
>
>  CPU Microcode
>  -
> --
> 1.9.1
>

Great documentation!

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot