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