diff options
author | Helge Deller <deller@gmx.de> | 2020-08-09 17:06:50 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2020-09-02 23:16:49 +0200 |
commit | 32ff8bf248add5f2e64e75d3706c29a4f323832e (patch) | |
tree | 620485c5da375d414cbb1cd0b5fb8fccf3fe0a15 /hw/hppa | |
parent | df5c6a50944697bf1373582dcea719697edbc9ed (diff) |
hw/hppa: Store boot device in fw_cfg section
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'hw/hppa')
-rw-r--r-- | hw/hppa/machine.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index e9d84d0f03..4b35afc9d5 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -58,6 +58,12 @@ static uint64_t cpu_hppa_to_phys(void *opaque, uint64_t addr) static HPPACPU *cpu[HPPA_MAX_CPUS]; static uint64_t firmware_entry; +static void fw_cfg_boot_set(void *opaque, const char *boot_device, + Error **errp) +{ + fw_cfg_modify_i16(opaque, FW_CFG_BOOT_DEVICE, boot_device[0]); +} + static FWCfgState *create_fw_cfg(MachineState *ms) { FWCfgState *fw_cfg; @@ -80,6 +86,9 @@ static FWCfgState *create_fw_cfg(MachineState *ms) fw_cfg_add_file(fw_cfg, "/etc/cpu/btlb_entries", g_memdup(&val, sizeof(val)), sizeof(val)); + fw_cfg_add_i16(fw_cfg, FW_CFG_BOOT_DEVICE, ms->boot_order[0]); + qemu_register_boot_set(fw_cfg_boot_set, fw_cfg); + return fw_cfg; } |