blob: e734b26671e6224e6797dbb86557e33b0af209af [file] [log] [blame]
Heinrich Schuchardt8d01c5c2021-02-20 10:00:19 +01001.. SPDX-License-Identifier: GPL-2.0+
2
3qfw command
4===========
5
6Synopsis
7--------
8
9::
10
11 qfw list
12 qfw cpus
13 qfw load [kernel_addr [initrd_addr]]
14
15Description
16-----------
17
Heinrich Schuchardt6d5a7c02023-11-09 08:32:06 -080018The *qfw* command is used to retrieve information from the QEMU firmware.
Heinrich Schuchardt8d01c5c2021-02-20 10:00:19 +010019
20The *qfw list* sub-command displays the QEMU firmware files.
21
22The *qfw cpus* sub-command displays the available CPUs.
23
24The *qfw load* command is used to load a kernel and an initial RAM disk.
25
26kernel_addr
27 address to which the file specified by the -kernel parameter of QEMU shall
28 be loaded. Defaults to environment variable *loadaddr* and further to
Tom Rini6ec41ad2021-08-23 10:25:29 -040029 the value of *CONFIG_SYS_LOAD_ADDR*.
Heinrich Schuchardt8d01c5c2021-02-20 10:00:19 +010030
31initrd_addr
32 address to which the file specified by the -initrd parameter of QEMU shall
33 be loaded. Defaults to environment variable *ramdiskaddr* and further to
Tom Rini0d5392d2022-12-04 10:13:39 -050034 the value of *CFG_RAMDISK_ADDR*.
Heinrich Schuchardt8d01c5c2021-02-20 10:00:19 +010035
36Examples
37--------
38
39QEMU firmware files are listed via the *qfw list* command:
40
41::
42
43 => qfw list
Simon Glass30e0bb82023-07-15 21:38:48 -060044 00000000 bios-geometry
45 00000000 bootorder
46 000f0060 etc/acpi/rsdp
47 bed14040 etc/acpi/tables
48 00000000 etc/boot-fail-wait
49 00000000 etc/e820
50 00000000 etc/smbios/smbios-anchor
51 00000000 etc/smbios/smbios-tables
52 00000000 etc/system-states
53 00000000 etc/table-loader
54 00000000 etc/tpm/log
55 00000000 genroms/kvmvapic.bin
56
57Where an address is shown, it indicates where the data is available for
58inspection, e.g. using the :doc:`md`.
Heinrich Schuchardt8d01c5c2021-02-20 10:00:19 +010059
60The available CPUs can be shown via the *qfw cpus* command:
61
62::
63
64 => qfw cpu
65 2 cpu(s) online
66
67The *-kernel* and *-initrd* parameters allow to specify a kernel and an
68initial RAM disk for QEMU:
69
70.. code-block:: bash
71
72 $ qemu-system-x86_64 -machine pc-i440fx-2.5 -bios u-boot.rom -m 1G \
73 -nographic -kernel vmlinuz -initrd initrd
74
75Now the kernel and the initial RAM disk can be loaded to the U-Boot memory via
76the *qfw load* command and booted thereafter.
77
78::
79
80 => qfw load ${kernel_addr_r} ${ramdisk_addr_r}
81 loading kernel to address 0000000001000000 size 5048f0 initrd 0000000004000000 size 3c94891
82 => zboot 1000000 5048f0 4000000 3c94891
83 Valid Boot Flag
84 Magic signature found
85 Linux kernel version 4.19.0-14-amd64 (debian-kernel@lists.debian.org) #1 SMP Debian 4.19.171-2 (2021-01-30)
86 Building boot_params at 0x00090000
87 Loading bzImage at address 100000 (5260160 bytes)
88
89Configuration
90-------------
91
92The qfw command is only available if CONFIG_CMD_QFW=y.