mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) iQEcBAABAgAGBQJRq6EsAAoJECgfDbjSjVRplKYIALtUF6RtKyOR6bSo1YvI203y huzLkLP675D2cEFbjBsjJFLcQPXUbj78taePMgFwlLzKWCrV0wTuAX21Sd3m4i/p P4BZzXd50EgRwxtpTBOu7jgboZbL/3TuVpRYDiGz5pRnWw/NBOPYbbi1Trj53nXg lwOq8E1HZyBo7pniLkYsUuScXzmqQ5qqNDU0r5eQURKkqaIXJN6ZFlXb0N6IgWMZ ytX5FGi22pIzQwf5oxKRrIbko1dyy+Jn5xoykEz9AbP+mt+kvTqjAkzO7cCSCmSq DOYQT4EsGnokM2CVwdZEbjgjJ+nTrzwf7VbvMIlWOSHyPYBBMjBXXYhwsC/fuU8= =Adz/ -----END PGP SIGNATURE----- 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>
This commit is contained in:
commit
e47dccc64b
22 changed files with 78 additions and 62 deletions
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue