Commit 5c2ed61ce235fd835a3f594bc983dfc20959568c
Committed by
Bin Meng
1 parent
3c30fd6ae2
Exists in
v2017.01-smarct4x
and in
30 other branches
x86: qemu: add documentaion for the fw_cfg interface
Document the usage of 'qfw' command Signed-off-by: Miao Yan <yanmiaobest@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Showing 1 changed file with 31 additions and 3 deletions Side-by-side Diff
doc/README.x86
... | ... | @@ -295,9 +295,37 @@ |
295 | 295 | If you want to check both consoles, use '-serial stdio'. |
296 | 296 | |
297 | 297 | Multicore is also supported by QEMU via '-smp n' where n is the number of cores |
298 | -to instantiate. Currently the default U-Boot built for QEMU supports 2 cores. | |
299 | -In order to support more cores, you need add additional cpu nodes in the device | |
300 | -tree and change CONFIG_MAX_CPUS accordingly. | |
298 | +to instantiate. Note, the maximum supported CPU number in QEMU is 255. | |
299 | + | |
300 | +The fw_cfg interface in QEMU also provides information about kernel data, initrd, | |
301 | +command-line arguments and more. U-Boot supports directly accessing these informtion | |
302 | +from fw_cfg interface, this saves the time of loading them from hard disk or | |
303 | +network again, through emulated devices. To use it , simply providing them in | |
304 | +QEMU command line: | |
305 | + | |
306 | +$ qemu-system-i386 -nographic -bios path/to/u-boot.rom -m 1024 -kernel /path/to/bzImage | |
307 | + -append 'root=/dev/ram console=ttyS0' -initrd /path/to/initrd -smp 8 | |
308 | + | |
309 | +Note: -initrd and -smp are both optional | |
310 | + | |
311 | +Then start QEMU, in U-Boot command line use the following U-Boot command to setup kernel: | |
312 | + | |
313 | + => qfw | |
314 | +qfw - QEMU firmware interface | |
315 | + | |
316 | +Usage: | |
317 | +qfw <command> | |
318 | + - list : print firmware(s) currently loaded | |
319 | + - cpus : print online cpu number | |
320 | + - load <kernel addr> <initrd addr> : load kernel and initrd (if any) and setup for zboot | |
321 | + | |
322 | +=> qfw load | |
323 | +loading kernel to address 01000000 size 5d9d30 initrd 04000000 size 1b1ab50 | |
324 | + | |
325 | +Here the kernel (bzImage) is loaded to 01000000 and initrd is to 04000000. Then, 'zboot' | |
326 | +can be used to boot the kernel: | |
327 | + | |
328 | +=> zboot 02000000 - 04000000 1b1ab50 | |
301 | 329 | |
302 | 330 | CPU Microcode |
303 | 331 | ------------- |