Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1:kernel-2.6.32
kvm
kvm-qemu-pre11-multiboot-2.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kvm-qemu-pre11-multiboot-2.patch of Package kvm
From bf483392e6806225a7a7e03c57bad35530522cb9 Mon Sep 17 00:00:00 2001 From: Alexander Graf <agraf@suse.de> Date: Mon, 29 Jun 2009 15:37:38 +0200 Subject: [PATCH 2/5] Expose fw_cfg v2 Multiboot passes options to the option rom using the fw_cfg device. Right now, that device is local to the bochs_bios_init function. Let's change that and expose it, so everyone may put data in there. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- hw/pc.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) Index: qemu-kvm-0.10.5/hw/pc.c =================================================================== --- qemu-kvm-0.10.5.orig/hw/pc.c +++ qemu-kvm-0.10.5/hw/pc.c @@ -462,7 +462,7 @@ static void bochs_bios_write(void *opaqu } } -static void bochs_bios_init(void) +static void *bochs_bios_init(void) { void *fw_cfg; @@ -478,9 +478,12 @@ static void bochs_bios_init(void) register_ioport_write(0x503, 1, 1, bochs_bios_write, NULL); fw_cfg = fw_cfg_init(BIOS_CFG_IOPORT, BIOS_CFG_IOPORT + 1, 0, 0); + fw_cfg_add_i32(fw_cfg, FW_CFG_ID, 1); fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)ram_size); fw_cfg_add_bytes(fw_cfg, FW_CFG_ACPI_TABLES, acpi_tables, acpi_tables_len); + + return fw_cfg; } /* Generate an initial boot sector which sets state and jump to @@ -1309,6 +1312,7 @@ static void pc_init1(ram_addr_t ram_size int index; BlockDriverState *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; BlockDriverState *fd[MAX_FD]; + void *fw_cfg; if (ram_size >= 0xe0000000 ) { above_4g_mem_size = ram_size - 0xe0000000; @@ -1439,7 +1443,7 @@ vga_bios_error: /* map all the bios at the top of memory */ cpu_register_physical_memory((uint32_t)(-bios_size), bios_size, bios_offset | IO_MEM_ROM); - bochs_bios_init(); + fw_cfg = bochs_bios_init(); { ram_addr_t option_rom_offset;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor