diff options
| author | Helge Deller <deller@gmx.de> | 2023-06-24 00:28:44 +0200 |
|---|---|---|
| committer | Helge Deller <deller@gmx.de> | 2023-06-24 13:39:48 +0200 |
| commit | 069d296669448b9eef72c6332ae84af962d9582c (patch) | |
| tree | 8e076d30fb8343305ac9af80180eff10ee6feaf5 /hw/hppa/machine.c | |
| parent | 50ba97e928b44ff5bc731c9ffe68d86acbe44639 (diff) | |
| download | focaccia-qemu-069d296669448b9eef72c6332ae84af962d9582c.tar.gz focaccia-qemu-069d296669448b9eef72c6332ae84af962d9582c.zip | |
target/hppa: Provide qemu version via fw_cfg to firmware
Give current QEMU version string to SeaBIOS-hppa via fw_cfg interface so that the firmware can show the QEMU version in the boot menu info. Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'hw/hppa/machine.c')
| -rw-r--r-- | hw/hppa/machine.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index 9facef7f14..866e11d208 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -122,6 +122,7 @@ static FWCfgState *create_fw_cfg(MachineState *ms) { FWCfgState *fw_cfg; uint64_t val; + const char qemu_version[] = QEMU_VERSION; fw_cfg = fw_cfg_init_mem(FW_CFG_IO_BASE, FW_CFG_IO_BASE + 4); fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, ms->smp.cpus); @@ -147,6 +148,10 @@ static FWCfgState *create_fw_cfg(MachineState *ms) fw_cfg_add_i16(fw_cfg, FW_CFG_BOOT_DEVICE, ms->boot_config.order[0]); qemu_register_boot_set(fw_cfg_boot_set, fw_cfg); + fw_cfg_add_file(fw_cfg, "/etc/qemu-version", + g_memdup(qemu_version, sizeof(qemu_version)), + sizeof(qemu_version)); + return fw_cfg; } |