mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-09-06 01:43:39 +00:00
QEMU set irq0override in fw_cfg
Hi, After discussing the issue with Avi, Gleb and a couple others on irq, we came to the conclusion that it is preferred to have QEMU request features from the BIOS, rather than notifying the BIOS that it is running on QEMU or KVM. This way memory ranges can change etc. and an older BIOS will continue to work on newer QEMU if it receives the info as a fw_cfg value. This one also matches what qemu-kvm does for irq0override, except I haven't made it configurable. I leave that as an exercise for whoever would be interested in switching off irq0override. Thanks, Jes Set irq0 override in fw_cfg, informing the BIOS that QEMU expects override on irq0. This matches qemu-kvm, and will help sharing a single BIOS binary. Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
e8b5439495
commit
6b35e7bf48
2
hw/pc.c
2
hw/pc.c
|
@ -54,6 +54,7 @@
|
|||
#define BIOS_CFG_IOPORT 0x510
|
||||
#define FW_CFG_ACPI_TABLES (FW_CFG_ARCH_LOCAL + 0)
|
||||
#define FW_CFG_SMBIOS_ENTRIES (FW_CFG_ARCH_LOCAL + 1)
|
||||
#define FW_CFG_IRQ0_OVERRIDE (FW_CFG_ARCH_LOCAL + 2)
|
||||
|
||||
#define MAX_IDE_BUS 2
|
||||
|
||||
|
@ -476,6 +477,7 @@ static void *bochs_bios_init(void)
|
|||
fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)ram_size);
|
||||
fw_cfg_add_bytes(fw_cfg, FW_CFG_ACPI_TABLES, (uint8_t *)acpi_tables,
|
||||
acpi_tables_len);
|
||||
fw_cfg_add_bytes(fw_cfg, FW_CFG_IRQ0_OVERRIDE, &irq0override, 1);
|
||||
|
||||
smbios_table = smbios_get_table(&smbios_len);
|
||||
if (smbios_table)
|
||||
|
|
1
sysemu.h
1
sysemu.h
|
@ -113,6 +113,7 @@ extern int vga_interface_type;
|
|||
extern int graphic_width;
|
||||
extern int graphic_height;
|
||||
extern int graphic_depth;
|
||||
extern uint8_t irq0override;
|
||||
extern DisplayType display_type;
|
||||
extern const char *keyboard_layout;
|
||||
extern int win2k_install_hack;
|
||||
|
|
Loading…
Reference in a new issue