mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
* Record-replay lockstep execution, log dumper and fixes (Alex, Pavel)
* SCSI fix to pass maximum transfer size (Daniel Barboza) * chardev fixes and improved iothread support (Daniel Berrangé, Peter) * checkpatch tweak (Eric) * make help tweak (Marc-André) * make more PCI NICs available with -net or -nic (myself) * change default q35 NIC to e1000e (myself) * SCSI support for NDOB bit (myself) * membarrier system call support (myself) * SuperIO refactoring (Philippe) * miscellaneous cleanups and fixes (Thomas) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQEcBAABAgAGBQJapqaMAAoJEL/70l94x66DQoUH/Rvg+a8giz/SrEA4P8D3Cb2z 4GNbNUUoy4oU0ltD5IAMskMwpOsvl1batE0D+pKIlfO9NV4+Cj2kpgo0p9TxoYqM VCby3wRtx27zb5nVytC6M++iIKXmeEMqXmFw61I6umddNPSl4IR3hiHEE0DM+7dV UPIOvJeEiazyQaw3Iw+ZctNn8dDBKc/+6oxP9xRcYTaZ6hB4G9RZkqGNNSLcJkk7 R0UotdjzIZhyWMOkjIwlpTF4sWv8gsYUV4bPYKMYho5B0Obda2dBM3I1kpA8yDa/ xZ5lheOaAVBZvM5aMIcaQPa65MO9hLyXFmhMOgyfpJhLBBz6Qpa4OLLI6DeTN+0= =UAgA -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging * Record-replay lockstep execution, log dumper and fixes (Alex, Pavel) * SCSI fix to pass maximum transfer size (Daniel Barboza) * chardev fixes and improved iothread support (Daniel Berrangé, Peter) * checkpatch tweak (Eric) * make help tweak (Marc-André) * make more PCI NICs available with -net or -nic (myself) * change default q35 NIC to e1000e (myself) * SCSI support for NDOB bit (myself) * membarrier system call support (myself) * SuperIO refactoring (Philippe) * miscellaneous cleanups and fixes (Thomas) # gpg: Signature made Mon 12 Mar 2018 16:10:52 GMT # gpg: using RSA key BFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: (69 commits) tcg: fix cpu_io_recompile replay: update documentation replay: save vmstate of the asynchronous events replay: don't process async events when warping the clock scripts/replay-dump.py: replay log dumper replay: avoid recursive call of checkpoints replay: check return values of fwrite replay: push replay_mutex_lock up the call tree replay: don't destroy mutex at exit replay: make locking visible outside replay code replay/replay-internal.c: track holding of replay_lock replay/replay.c: bump REPLAY_VERSION again replay: save prior value of the host clock replay: added replay log format description replay: fix save/load vm for non-empty queue replay: fixed replay_enable_events replay: fix processing async events cpu-exec: fix exception_index handling hw/i386/pc: Factor out the superio code hw/alpha/dp264: Use the TYPE_SMC37C669_SUPERIO ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org> # Conflicts: # default-configs/i386-softmmu.mak # default-configs/x86_64-softmmu.mak
This commit is contained in:
commit
3788c7b6e5
117 changed files with 1952 additions and 728 deletions
14
include/hw/char/parallel.h
Normal file
14
include/hw/char/parallel.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef HW_PARALLEL_H
|
||||
#define HW_PARALLEL_H
|
||||
|
||||
#include "exec/memory.h"
|
||||
#include "hw/isa/isa.h"
|
||||
#include "chardev/char.h"
|
||||
|
||||
void parallel_hds_isa_init(ISABus *bus, int n);
|
||||
|
||||
bool parallel_mm_init(MemoryRegion *address_space,
|
||||
hwaddr base, int it_shift, qemu_irq irq,
|
||||
Chardev *chr);
|
||||
|
||||
#endif
|
|
@ -1,6 +1,10 @@
|
|||
#ifndef HW_I8257_H
|
||||
#define HW_I8257_H
|
||||
|
||||
#include "hw/hw.h"
|
||||
#include "hw/isa/isa.h"
|
||||
#include "exec/ioport.h"
|
||||
|
||||
#define TYPE_I8257 "i8257"
|
||||
|
||||
typedef struct I8257Regs {
|
||||
|
@ -40,4 +44,6 @@ typedef struct I8257State {
|
|||
PortioList portio_pageh;
|
||||
} I8257State;
|
||||
|
||||
void i8257_dma_init(ISABus *bus, bool high_page_enable);
|
||||
|
||||
#endif
|
|
@ -114,6 +114,7 @@ struct PCMachineClass {
|
|||
/* Device configuration: */
|
||||
bool pci_enabled;
|
||||
bool kvmclock_enabled;
|
||||
const char *default_nic_model;
|
||||
|
||||
/* Compat options: */
|
||||
|
||||
|
@ -151,14 +152,6 @@ struct PCMachineClass {
|
|||
#define PC_MACHINE_CLASS(klass) \
|
||||
OBJECT_CLASS_CHECK(PCMachineClass, (klass), TYPE_PC_MACHINE)
|
||||
|
||||
/* parallel.c */
|
||||
|
||||
void parallel_hds_isa_init(ISABus *bus, int n);
|
||||
|
||||
bool parallel_mm_init(MemoryRegion *address_space,
|
||||
hwaddr base, int it_shift, qemu_irq irq,
|
||||
Chardev *chr);
|
||||
|
||||
/* i8259.c */
|
||||
|
||||
extern DeviceState *isa_pic;
|
||||
|
@ -196,15 +189,6 @@ void vmport_register(unsigned char command, VMPortReadFunc *func, void *opaque);
|
|||
void vmmouse_get_data(uint32_t *data);
|
||||
void vmmouse_set_data(const uint32_t *data);
|
||||
|
||||
/* pckbd.c */
|
||||
#define I8042_A20_LINE "a20"
|
||||
|
||||
void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,
|
||||
MemoryRegion *region, ram_addr_t size,
|
||||
hwaddr mask);
|
||||
void i8042_isa_mouse_fake_event(void *opaque);
|
||||
void i8042_setup_a20_line(ISADevice *dev, qemu_irq a20_out);
|
||||
|
||||
/* pc.c */
|
||||
extern int fd_bootchk;
|
||||
|
||||
|
@ -248,7 +232,7 @@ void pc_init_ne2k_isa(ISABus *bus, NICInfo *nd);
|
|||
void pc_cmos_init(PCMachineState *pcms,
|
||||
BusState *ide0, BusState *ide1,
|
||||
ISADevice *s);
|
||||
void pc_nic_init(ISABus *isa_bus, PCIBus *pci_bus);
|
||||
void pc_nic_init(PCMachineClass *pcmc, ISABus *isa_bus, PCIBus *pci_bus);
|
||||
void pc_pci_device_init(PCIBus *pci_bus);
|
||||
|
||||
typedef void (*cpu_set_smm_t)(int smm, void *arg);
|
||||
|
|
24
include/hw/input/i8042.h
Normal file
24
include/hw/input/i8042.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* QEMU PS/2 Controller
|
||||
*
|
||||
* Copyright (c) 2003 Fabrice Bellard
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
#ifndef HW_INPUT_I8042_H
|
||||
#define HW_INPUT_I8042_H
|
||||
|
||||
#include "hw/hw.h"
|
||||
#include "hw/isa/isa.h"
|
||||
|
||||
#define TYPE_I8042 "i8042"
|
||||
|
||||
#define I8042_A20_LINE "a20"
|
||||
|
||||
void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,
|
||||
MemoryRegion *region, ram_addr_t size,
|
||||
hwaddr mask);
|
||||
void i8042_isa_mouse_fake_event(void *opaque);
|
||||
void i8042_setup_a20_line(ISADevice *dev, qemu_irq a20_out);
|
||||
|
||||
#endif /* HW_INPUT_I8042_H */
|
|
@ -151,6 +151,4 @@ static inline ISABus *isa_bus_from_device(ISADevice *d)
|
|||
return ISA_BUS(qdev_get_parent_bus(DEVICE(d)));
|
||||
}
|
||||
|
||||
/* i8257.c */
|
||||
void DMA_init(ISABus *bus, int high_page_enable);
|
||||
#endif
|
||||
|
|
|
@ -25,30 +25,20 @@
|
|||
#ifndef QEMU_PC87312_H
|
||||
#define QEMU_PC87312_H
|
||||
|
||||
#include "hw/isa/isa.h"
|
||||
#include "hw/isa/superio.h"
|
||||
|
||||
|
||||
#define TYPE_PC87312 "pc87312"
|
||||
#define PC87312(obj) OBJECT_CHECK(PC87312State, (obj), TYPE_PC87312)
|
||||
#define TYPE_PC87312_SUPERIO "pc87312"
|
||||
#define PC87312(obj) OBJECT_CHECK(PC87312State, (obj), TYPE_PC87312_SUPERIO)
|
||||
|
||||
typedef struct PC87312State {
|
||||
ISADevice dev;
|
||||
/*< private >*/
|
||||
ISASuperIODevice parent_dev;
|
||||
/*< public >*/
|
||||
|
||||
uint32_t iobase;
|
||||
uint16_t iobase;
|
||||
uint8_t config; /* initial configuration */
|
||||
|
||||
struct {
|
||||
ISADevice *dev;
|
||||
} parallel;
|
||||
|
||||
struct {
|
||||
ISADevice *dev;
|
||||
} uart[2];
|
||||
|
||||
struct {
|
||||
ISADevice *dev;
|
||||
} fdc;
|
||||
|
||||
struct {
|
||||
ISADevice *dev;
|
||||
} ide;
|
||||
|
|
60
include/hw/isa/superio.h
Normal file
60
include/hw/isa/superio.h
Normal file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Generic ISA Super I/O
|
||||
*
|
||||
* Copyright (c) 2018 Philippe Mathieu-Daudé
|
||||
*
|
||||
* This code is licensed under the GNU GPLv2 and later.
|
||||
* See the COPYING file in the top-level directory.
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
#ifndef HW_ISA_SUPERIO_H
|
||||
#define HW_ISA_SUPERIO_H
|
||||
|
||||
#include "qemu-common.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "hw/isa/isa.h"
|
||||
|
||||
#define TYPE_ISA_SUPERIO "isa-superio"
|
||||
#define ISA_SUPERIO(obj) \
|
||||
OBJECT_CHECK(ISASuperIODevice, (obj), TYPE_ISA_SUPERIO)
|
||||
#define ISA_SUPERIO_GET_CLASS(obj) \
|
||||
OBJECT_GET_CLASS(ISASuperIOClass, (obj), TYPE_ISA_SUPERIO)
|
||||
#define ISA_SUPERIO_CLASS(klass) \
|
||||
OBJECT_CLASS_CHECK(ISASuperIOClass, (klass), TYPE_ISA_SUPERIO)
|
||||
|
||||
typedef struct ISASuperIODevice {
|
||||
/*< private >*/
|
||||
ISADevice parent_obj;
|
||||
/*< public >*/
|
||||
|
||||
ISADevice *parallel[MAX_PARALLEL_PORTS];
|
||||
ISADevice *serial[MAX_SERIAL_PORTS];
|
||||
ISADevice *floppy;
|
||||
ISADevice *kbc;
|
||||
ISADevice *ide;
|
||||
} ISASuperIODevice;
|
||||
|
||||
typedef struct ISASuperIOFuncs {
|
||||
size_t count;
|
||||
bool (*is_enabled)(ISASuperIODevice *sio, uint8_t index);
|
||||
uint16_t (*get_iobase)(ISASuperIODevice *sio, uint8_t index);
|
||||
unsigned int (*get_irq)(ISASuperIODevice *sio, uint8_t index);
|
||||
unsigned int (*get_dma)(ISASuperIODevice *sio, uint8_t index);
|
||||
} ISASuperIOFuncs;
|
||||
|
||||
typedef struct ISASuperIOClass {
|
||||
/*< private >*/
|
||||
ISADeviceClass parent_class;
|
||||
/*< public >*/
|
||||
DeviceRealize parent_realize;
|
||||
|
||||
ISASuperIOFuncs parallel;
|
||||
ISASuperIOFuncs serial;
|
||||
ISASuperIOFuncs floppy;
|
||||
ISASuperIOFuncs ide;
|
||||
} ISASuperIOClass;
|
||||
|
||||
#define TYPE_FDC37M81X_SUPERIO "fdc37m81x-superio"
|
||||
#define TYPE_SMC37C669_SUPERIO "smc37c669-superio"
|
||||
|
||||
#endif /* HW_ISA_SUPERIO_H */
|
|
@ -1,8 +1,10 @@
|
|||
#ifndef HW_VT82C686_H
|
||||
#define HW_VT82C686_H
|
||||
|
||||
#define TYPE_VT82C686B_SUPERIO "vt82c686b-superio"
|
||||
|
||||
/* vt82c686.c */
|
||||
ISABus *vt82c686b_init(PCIBus * bus, int devfn);
|
||||
ISABus *vt82c686b_isa_init(PCIBus * bus, int devfn);
|
||||
void vt82c686b_ac97_init(PCIBus *bus, int devfn);
|
||||
void vt82c686b_mc97_init(PCIBus *bus, int devfn);
|
||||
I2CBus *vt82c686b_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
|
||||
|
|
|
@ -7,11 +7,6 @@
|
|||
/* esp.c */
|
||||
#define ESP_MAX_DEVS 7
|
||||
typedef void (*ESPDMAMemoryReadWriteFunc)(void *opaque, uint8_t *buf, int len);
|
||||
void esp_init(hwaddr espaddr, int it_shift,
|
||||
ESPDMAMemoryReadWriteFunc dma_memory_read,
|
||||
ESPDMAMemoryReadWriteFunc dma_memory_write,
|
||||
void *dma_opaque, qemu_irq irq, qemu_irq *reset,
|
||||
qemu_irq *dma_enable);
|
||||
|
||||
#define ESP_REGS 16
|
||||
#define TI_BUFSZ 16
|
||||
|
@ -136,6 +131,11 @@ typedef struct {
|
|||
#define TCHI_FAS100A 0x4
|
||||
#define TCHI_AM53C974 0x12
|
||||
|
||||
ESPState *esp_init(hwaddr espaddr, int it_shift,
|
||||
ESPDMAMemoryReadWriteFunc dma_memory_read,
|
||||
ESPDMAMemoryReadWriteFunc dma_memory_write,
|
||||
void *dma_opaque, qemu_irq irq, qemu_irq *reset,
|
||||
qemu_irq *dma_enable);
|
||||
void esp_dma_enable(ESPState *s, int irq, int level);
|
||||
void esp_request_cancelled(SCSIRequest *req);
|
||||
void esp_command_complete(SCSIRequest *req, uint32_t status, size_t resid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue