[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 3/8] hw/hppa: Store boot device in fw_cfg section
From: |
Helge Deller |
Subject: |
[PATCH v3 3/8] hw/hppa: Store boot device in fw_cfg section |
Date: |
Wed, 2 Sep 2020 21:34:51 +0200 |
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Helge Deller <deller@gmx.de>
---
hw/hppa/machine.c | 9 +++++++++
1 file changed, 9 insertions(+)
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;
}
--
2.21.3
- [PATCH v3 0/8] hppa: power button support, artist graphics fixes, firmware fixes, ..., Helge Deller, 2020/09/02
- [PATCH v3 4/8] hw/hppa: Change fw_cfg port address, Helge Deller, 2020/09/02
- [PATCH v3 6/8] hw/hppa: Add power button emulation, Helge Deller, 2020/09/02
- [PATCH v3 2/8] hw/hppa: Make number of TLB and BTLB entries configurable, Helge Deller, 2020/09/02
- [PATCH v3 5/8] hw/hppa: Tell SeaBIOS port address of fw_cfg, Helge Deller, 2020/09/02
- [PATCH v3 1/8] seabios-hppa: Update SeaBIOS to hppa-qemu-5.2-2 tag, Helge Deller, 2020/09/02
- [PATCH v3 3/8] hw/hppa: Store boot device in fw_cfg section,
Helge Deller <=
- [PATCH v3 7/8] hw/display/artist: Fix artist screen resolution, Helge Deller, 2020/09/02
- [PATCH v3 8/8] target/hppa: Fix boot with old Linux installation CDs, Helge Deller, 2020/09/02