Hi Luigi,
On 3/11/26 6:43 AM, Luigi Leonardi wrote:
Add a machine property to pass a debug level to EDK2 firmware via the
device tree. The value is set as an "edk2,debug-level" property on all
pl011 UART nodes.
This is to create a runtime parameter to set the verbosity of the debug
log on the serial ports in edk2. Currently, the only way to set the
verbosity is a compile-time option.
DT is used because the fw_cfg interface is not yet initialized in early
boot phases.
Corresponding edk2 PR: https://github.com/tianocore/edk2/pull/12277
Suggested-by: Gerd Hoffmann <[email protected]>
Signed-off-by: Luigi Leonardi <[email protected]>
---
docs/system/arm/virt.rst | 6 ++++++
hw/arm/virt.c | 38 ++++++++++++++++++++++++++++++++++++++
include/hw/arm/virt.h | 2 ++
3 files changed, 46 insertions(+)
I am not sure if maintainer want to have bootloader specific options in
machine code.
Alternatively, it's possible to dump virt dtb, modify it, and pass it.
$ ./build/qemu-system-aarch64 -M virt,dtb=file.dtb
$ ... modify dt ...
$ ./build/qemu-system-aarch64 -M virt,dtb=file.dtb
It has the advantage to be extensible to any other kind of options you
want to pass through dtb without needing modification on QEMU itself,
the downside being that it's less convenient than a command line option.
Regards,
Pierrick