aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-06-04 09:26:29 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-06-04 09:26:29 -0500
commite47dccc64b6ca570e4db96fd5fdb3bef251eb559 (patch)
treefc2730c03eff0d93d0af7c8ee2327f4f7b0d14ea /include
parent171392406d8e230d62e5ebf4805f71460854b8ec (diff)
parentc3c4fe35be9f6c37388ba7615c6c33e8f4034438 (diff)
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
pci: misc cleanups This includes some pci-related cleanups, and fw cfg cleanups which will be useful for on-going pci related work. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Sun 02 Jun 2013 02:46:52 PM CDT using RSA key ID D28D5469 # gpg: Can't check signature: public key not found # By Michael S. Tsirkin (8) and Laszlo Ersek (1) # Via Michael S. Tsirkin * mst/tags/for_anthony: pvpanic: use FWCfgState explicitly fw_cfg: fw_cfg is a singleton fw_cfg: add API to find FW cfg object fw_cfg: move typedef to qemu/typedefs.h refer to FWCfgState explicitly apic: rename apic specific bitopts firmware_abi: move to include/hw/nvram/ dec.c - move to pci-bridge q35: set fw_name Message-id: 1370202787-3712-1-git-send-email-mst@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/i386/pc.h18
-rw-r--r--include/hw/loader.h3
-rw-r--r--include/hw/nvram/fw_cfg.h4
-rw-r--r--include/hw/nvram/openbios_firmware_abi.h (renamed from include/hw/sparc/firmware_abi.h)0
-rw-r--r--include/qemu/typedefs.h1
5 files changed, 15 insertions, 11 deletions
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 663426cee8..b4c8a74ef7 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -80,14 +80,14 @@ void pc_acpi_smi_interrupt(void *opaque, int irq, int level);
void pc_cpus_init(const char *cpu_model, DeviceState *icc_bridge);
void pc_hot_add_cpu(const int64_t id, Error **errp);
void pc_acpi_init(const char *default_dsdt);
-void *pc_memory_init(MemoryRegion *system_memory,
- const char *kernel_filename,
- const char *kernel_cmdline,
- const char *initrd_filename,
- ram_addr_t below_4g_mem_size,
- ram_addr_t above_4g_mem_size,
- MemoryRegion *rom_memory,
- MemoryRegion **ram_memory);
+FWCfgState *pc_memory_init(MemoryRegion *system_memory,
+ const char *kernel_filename,
+ const char *kernel_cmdline,
+ const char *initrd_filename,
+ ram_addr_t below_4g_mem_size,
+ ram_addr_t above_4g_mem_size,
+ MemoryRegion *rom_memory,
+ MemoryRegion **ram_memory);
qemu_irq *pc_allocate_cpu_irq(void);
DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus);
void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,
@@ -111,7 +111,7 @@ void ioapic_init_gsi(GSIState *gsi_state, const char *parent_name);
i2c_bus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
qemu_irq sci_irq, qemu_irq smi_irq,
- int kvm_enabled, void *fw_cfg);
+ int kvm_enabled, FWCfgState *fw_cfg);
void piix4_smbus_register_device(SMBusDevice *dev, uint8_t addr);
/* hpet.c */
diff --git a/include/hw/loader.h b/include/hw/loader.h
index 0958f06934..15d4cc9a55 100644
--- a/include/hw/loader.h
+++ b/include/hw/loader.h
@@ -1,6 +1,7 @@
#ifndef LOADER_H
#define LOADER_H
#include "qapi/qmp/qdict.h"
+#include "hw/nvram/fw_cfg.h"
/* loader.c */
int get_image_size(const char *filename);
@@ -30,7 +31,7 @@ int rom_add_blob(const char *name, const void *blob, size_t len,
int rom_add_elf_program(const char *name, void *data, size_t datasize,
size_t romsize, hwaddr addr);
int rom_load_all(void);
-void rom_set_fw(void *f);
+void rom_set_fw(FWCfgState *f);
int rom_copy(uint8_t *dest, hwaddr addr, size_t size);
void *rom_ptr(hwaddr addr);
void do_info_roms(Monitor *mon, const QDict *qdict);
diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h
index 3e4a3347e8..f60dd676c8 100644
--- a/include/hw/nvram/fw_cfg.h
+++ b/include/hw/nvram/fw_cfg.h
@@ -6,6 +6,7 @@
#include <stddef.h>
#include "exec/hwaddr.h"
+#include "qemu/typedefs.h"
#endif
#define FW_CFG_SIGNATURE 0x00
@@ -60,7 +61,6 @@ typedef struct FWCfgFiles {
typedef void (*FWCfgCallback)(void *opaque, uint8_t *data);
-typedef struct FWCfgState FWCfgState;
void fw_cfg_add_bytes(FWCfgState *s, uint16_t key, void *data, size_t len);
void fw_cfg_add_string(FWCfgState *s, uint16_t key, const char *value);
void fw_cfg_add_i16(FWCfgState *s, uint16_t key, uint16_t value);
@@ -73,6 +73,8 @@ void fw_cfg_add_file(FWCfgState *s, const char *filename, void *data,
FWCfgState *fw_cfg_init(uint32_t ctl_port, uint32_t data_port,
hwaddr crl_addr, hwaddr data_addr);
+FWCfgState *fw_cfg_find(void);
+
#endif /* NO_QEMU_PROTOS */
#endif
diff --git a/include/hw/sparc/firmware_abi.h b/include/hw/nvram/openbios_firmware_abi.h
index 5e6e5d4d34..5e6e5d4d34 100644
--- a/include/hw/sparc/firmware_abi.h
+++ b/include/hw/nvram/openbios_firmware_abi.h
diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index 93aae81a82..afe4ec76e1 100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -61,5 +61,6 @@ typedef struct EventNotifier EventNotifier;
typedef struct VirtIODevice VirtIODevice;
typedef struct QEMUSGList QEMUSGList;
typedef struct SHPCDevice SHPCDevice;
+typedef struct FWCfgState FWCfgState;
#endif /* QEMU_TYPEDEFS_H */