Diff for /qemu/vl.h between versions and

version, 2018/04/24 16:40:48 version, 2018/04/24 16:42:49
Line 37 Line 37
 #include <unistd.h>  #include <unistd.h>
 #include <fcntl.h>  #include <fcntl.h>
 #include <sys/stat.h>  #include <sys/stat.h>
 #include "audio/audio.h"  
 #ifndef O_LARGEFILE  #ifndef O_LARGEFILE
 #define O_LARGEFILE 0  #define O_LARGEFILE 0
Line 47 Line 46
 #endif  #endif
 #ifdef _WIN32  #ifdef _WIN32
   #include <windows.h>
   #define fsync _commit
 #define lseek _lseeki64  #define lseek _lseeki64
 #define ENOTSUP 4096  #define ENOTSUP 4096
 /* XXX: find 64 bit version */  extern int qemu_ftruncate64(int, int64_t);
 #define ftruncate chsize  #define ftruncate qemu_ftruncate64
 static inline char *realpath(const char *path, char *resolved_path)  static inline char *realpath(const char *path, char *resolved_path)
 {  {
     _fullpath(resolved_path, path, _MAX_PATH);      _fullpath(resolved_path, path, _MAX_PATH);
     return resolved_path;      return resolved_path;
 }  }
   #define PRId64 "I64d"
   #define PRIx64 "I64x"
   #define PRIu64 "I64u"
   #define PRIo64 "I64o"
 #endif  #endif
 #ifdef QEMU_TOOL  #ifdef QEMU_TOOL
Line 70  static inline char *realpath(const char  Line 77  static inline char *realpath(const char 
 #else  #else
   #include "audio/audio.h"
 #include "cpu.h"  #include "cpu.h"
 #include "gdbstub.h"  #include "gdbstub.h"
Line 145  extern int usb_enabled; Line 153  extern int usb_enabled;
 extern int smp_cpus;  extern int smp_cpus;
 /* XXX: make it dynamic */  /* XXX: make it dynamic */
 #if defined (TARGET_PPC)  #if defined (TARGET_PPC) || defined (TARGET_SPARC64)
 #define BIOS_SIZE ((512 + 32) * 1024)  #define BIOS_SIZE ((512 + 32) * 1024)
 #elif defined(TARGET_MIPS)  #elif defined(TARGET_MIPS)
 #define BIOS_SIZE (128 * 1024)  #define BIOS_SIZE (128 * 1024)
Line 218  typedef int PollingFunc(void *opaque); Line 226  typedef int PollingFunc(void *opaque);
 int qemu_add_polling_cb(PollingFunc *func, void *opaque);  int qemu_add_polling_cb(PollingFunc *func, void *opaque);
 void qemu_del_polling_cb(PollingFunc *func, void *opaque);  void qemu_del_polling_cb(PollingFunc *func, void *opaque);
   #ifdef _WIN32
   /* Wait objects handling */
   typedef void WaitObjectFunc(void *opaque);
   int qemu_add_wait_object(HANDLE handle, WaitObjectFunc *func, void *opaque);
   void qemu_del_wait_object(HANDLE handle, WaitObjectFunc *func, void *opaque);
 /* character device */  /* character device */
 #define CHR_EVENT_BREAK 0 /* serial break char */  #define CHR_EVENT_BREAK 0 /* serial break char */
Line 374  int qemu_timer_pending(QEMUTimer *ts); Line 390  int qemu_timer_pending(QEMUTimer *ts);
 extern int64_t ticks_per_sec;  extern int64_t ticks_per_sec;
 extern int pit_min_timer_count;  extern int pit_min_timer_count;
   int64_t cpu_get_ticks(void);
 void cpu_enable_ticks(void);  void cpu_enable_ticks(void);
 void cpu_disable_ticks(void);  void cpu_disable_ticks(void);
Line 496  int bdrv_write(BlockDriverState *bs, int Line 513  int bdrv_write(BlockDriverState *bs, int
 void bdrv_get_geometry(BlockDriverState *bs, int64_t *nb_sectors_ptr);  void bdrv_get_geometry(BlockDriverState *bs, int64_t *nb_sectors_ptr);
 int bdrv_commit(BlockDriverState *bs);  int bdrv_commit(BlockDriverState *bs);
 void bdrv_set_boot_sector(BlockDriverState *bs, const uint8_t *data, int size);  void bdrv_set_boot_sector(BlockDriverState *bs, const uint8_t *data, int size);
   /* Ensure contents are flushed to disk.  */
   void bdrv_flush(BlockDriverState *bs);
 #define BDRV_TYPE_HD     0  #define BDRV_TYPE_HD     0
 #define BDRV_TYPE_CDROM  1  #define BDRV_TYPE_CDROM  1
Line 593  typedef struct PCIIORegion { Line 612  typedef struct PCIIORegion {
 #define PCI_ROM_SLOT 6  #define PCI_ROM_SLOT 6
 #define PCI_NUM_REGIONS 7  #define PCI_NUM_REGIONS 7
   #define PCI_DEVICES_MAX 64
   #define PCI_VENDOR_ID           0x00    /* 16 bits */
   #define PCI_DEVICE_ID           0x02    /* 16 bits */
   #define PCI_COMMAND             0x04    /* 16 bits */
   #define  PCI_COMMAND_IO         0x1     /* Enable response in I/O space */
   #define  PCI_COMMAND_MEMORY     0x2     /* Enable response in Memory space */
   #define PCI_CLASS_DEVICE        0x0a    /* Device class */
   #define PCI_INTERRUPT_LINE      0x3c    /* 8 bits */
   #define PCI_INTERRUPT_PIN       0x3d    /* 8 bits */
   #define PCI_MIN_GNT             0x3e    /* 8 bits */
   #define PCI_MAX_LAT             0x3f    /* 8 bits */
 struct PCIDevice {  struct PCIDevice {
     /* PCI config space */      /* PCI config space */
     uint8_t config[256];      uint8_t config[256];
Line 606  struct PCIDevice { Line 639  struct PCIDevice {
     /* do not access the following fields */      /* do not access the following fields */
     PCIConfigReadFunc *config_read;      PCIConfigReadFunc *config_read;
     PCIConfigWriteFunc *config_write;      PCIConfigWriteFunc *config_write;
       /* ??? This is a PC-specific hack, and should be removed.  */
     int irq_index;      int irq_index;
 };  };
Line 627  void pci_default_write_config(PCIDevice  Line 661  void pci_default_write_config(PCIDevice 
 void generic_pci_save(QEMUFile* f, void *opaque);  void generic_pci_save(QEMUFile* f, void *opaque);
 int generic_pci_load(QEMUFile* f, void *opaque, int version_id);  int generic_pci_load(QEMUFile* f, void *opaque, int version_id);
 extern struct PIIX3State *piix3_state;  typedef void (*pci_set_irq_fn)(PCIDevice *pci_dev, void *pic,
                                  int irq_num, int level);
   PCIBus *pci_register_bus(pci_set_irq_fn set_irq, void *pic, int devfn_min);
   void pci_nic_init(PCIBus *bus, NICInfo *nd);
   void pci_data_write(void *opaque, uint32_t addr, uint32_t val, int len);
   uint32_t pci_data_read(void *opaque, uint32_t addr, int len);
   int pci_bus_num(PCIBus *s);
   void pci_for_each_device(void (*fn)(PCIDevice *d));
 PCIBus *i440fx_init(void);  
 void piix3_init(PCIBus *bus);  
 void pci_bios_init(void);  
 void pci_info(void);  void pci_info(void);
 /* temporary: will be moved in platform specific file */  /* prep_pci.c */
 void pci_set_pic(PCIBus *bus, SetIRQFunc *set_irq, void *irq_opaque);  
 PCIBus *pci_prep_init(void);  PCIBus *pci_prep_init(void);
 PCIBus *pci_grackle_init(uint32_t base);  
 PCIBus *pci_pmac_init(void);  
 PCIBus *pci_apb_init(target_ulong special_base, target_ulong mem_base);  
 void pci_nic_init(PCIBus *bus, NICInfo *nd);  /* grackle_pci.c */
   PCIBus *pci_grackle_init(uint32_t base, void *pic);
   /* unin_pci.c */
   PCIBus *pci_pmac_init(void *pic);
   /* apb_pci.c */
   PCIBus *pci_apb_init(target_ulong special_base, target_ulong mem_base,
                        void *pic);
   PCIBus *pci_vpb_init(void *pic);
   /* piix_pci.c */
   PCIBus *i440fx_init(void);
   int piix3_init(PCIBus *bus);
   void pci_bios_init(void);
 /* openpic.c */  /* openpic.c */
 typedef struct openpic_t openpic_t;  typedef struct openpic_t openpic_t;
Line 671  extern struct soundhw soundhw[]; Line 721  extern struct soundhw soundhw[];
 /* vga.c */  /* vga.c */
 #define VGA_RAM_SIZE (4096 * 1024)  #define VGA_RAM_SIZE (8192 * 1024)
 struct DisplayState {  struct DisplayState {
     uint8_t *data;      uint8_t *data;
     int linesize;      int linesize;
     int depth;      int depth;
       int bgr; /* BGR color order instead of RGB. Only valid for depth == 32 */
     int width;      int width;
     int height;      int height;
     void *opaque;      void *opaque;
Line 725  void isa_ide_init(int iobase, int iobase Line 776  void isa_ide_init(int iobase, int iobase
                   BlockDriverState *hd0, BlockDriverState *hd1);                    BlockDriverState *hd0, BlockDriverState *hd1);
 void pci_cmd646_ide_init(PCIBus *bus, BlockDriverState **hd_table,  void pci_cmd646_ide_init(PCIBus *bus, BlockDriverState **hd_table,
                          int secondary_ide_enabled);                           int secondary_ide_enabled);
 void pci_piix3_ide_init(PCIBus *bus, BlockDriverState **hd_table);  void pci_piix3_ide_init(PCIBus *bus, BlockDriverState **hd_table, int devfn);
 int pmac_ide_init (BlockDriverState **hd_table,  int pmac_ide_init (BlockDriverState **hd_table,
                    SetIRQFunc *set_irq, void *irq_opaque, int irq);                     SetIRQFunc *set_irq, void *irq_opaque, int irq);
   /* cdrom.c */
   int cdrom_read_toc(int nb_sectors, uint8_t *buf, int msf, int start_track);
   int cdrom_read_toc_raw(int nb_sectors, uint8_t *buf, int msf, int session_num);
 /* es1370.c */  /* es1370.c */
 int es1370_init (PCIBus *bus, AudioState *s);  int es1370_init (PCIBus *bus, AudioState *s);
Line 774  void pci_ne2000_init(PCIBus *bus, NICInf Line 829  void pci_ne2000_init(PCIBus *bus, NICInf
 void pci_rtl8139_init(PCIBus *bus, NICInfo *nd);  void pci_rtl8139_init(PCIBus *bus, NICInfo *nd);
   /* pcnet.c */
   void pci_pcnet_init(PCIBus *bus, NICInfo *nd);
 /* pckbd.c */  /* pckbd.c */
 void kbd_init(void);  void kbd_init(void);
Line 840  int pit_get_out(PITState *pit, int chann Line 899  int pit_get_out(PITState *pit, int chann
 void pcspk_init(PITState *);  void pcspk_init(PITState *);
 int pcspk_audio_init(AudioState *);  int pcspk_audio_init(AudioState *);
   /* acpi.c */
   extern int acpi_enabled;
   void piix4_pm_init(PCIBus *bus, int devfn);
   void acpi_bios_init(void);
 /* pc.c */  /* pc.c */
 extern QEMUMachine pc_machine;  extern QEMUMachine pc_machine;
 extern QEMUMachine isapc_machine;  extern QEMUMachine isapc_machine;
   extern int fd_bootchk;
 void ioport_set_a20(int enable);  void ioport_set_a20(int enable);
 int ioport_get_a20(void);  int ioport_get_a20(void);
Line 985  int cuda_init(SetIRQFunc *set_irq, void  Line 1050  int cuda_init(SetIRQFunc *set_irq, void 
 /* usb ports of the VM */  /* usb ports of the VM */
 #define MAX_VM_USB_PORTS 8  void qemu_register_usb_port(USBPort *port, void *opaque, int index,
                               usb_attachfn attach);
 extern USBPort *vm_usb_ports[MAX_VM_USB_PORTS];  #define VM_USB_HUB_SIZE 8
 extern USBDevice *vm_usb_hub;  
 void do_usb_add(const char *devname);  void do_usb_add(const char *devname);
 void do_usb_del(const char *devname);  void do_usb_del(const char *devname);
 void usb_info(void);  void usb_info(void);
   /* scsi-disk.c */
   typedef struct SCSIDevice SCSIDevice;
   typedef void (*scsi_completionfn)(void *, uint32_t, int);
   SCSIDevice *scsi_disk_init(BlockDriverState *bdrv,
                              scsi_completionfn completion,
                              void *opaque);
   void scsi_disk_destroy(SCSIDevice *s);
   int32_t scsi_send_command(SCSIDevice *s, uint32_t tag, uint8_t *buf, int lun);
   int scsi_read_data(SCSIDevice *s, uint8_t *data, uint32_t len);
   int scsi_write_data(SCSIDevice *s, uint8_t *data, uint32_t len);
   /* lsi53c895a.c */
   void lsi_scsi_attach(void *opaque, BlockDriverState *bd, int id);
   void *lsi_scsi_init(PCIBus *bus, int devfn);
 /* integratorcp.c */  /* integratorcp.c */
 extern QEMUMachine integratorcp926_machine;  extern QEMUMachine integratorcp926_machine;
 extern QEMUMachine integratorcp1026_machine;  extern QEMUMachine integratorcp1026_machine;
Line 1061  int sh7750_register_io_device(struct SH7 Line 1143  int sh7750_register_io_device(struct SH7
 /* tc58128.c */  /* tc58128.c */
 int tc58128_init(struct SH7750State *s, char *zone1, char *zone2);  int tc58128_init(struct SH7750State *s, char *zone1, char *zone2);
   /* NOR flash devices */
   typedef struct pflash_t pflash_t;
   pflash_t *pflash_register (target_ulong base, ram_addr_t off,
                              BlockDriverState *bs,
                              target_ulong sector_len, int nb_blocs, int width,
                              uint16_t id0, uint16_t id1, 
                              uint16_t id2, uint16_t id3);
 #endif /* defined(QEMU_TOOL) */  #endif /* defined(QEMU_TOOL) */
 /* monitor.c */  /* monitor.c */

Removed from v.  
changed lines
  Added in v.