mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
Move QOM typedefs and add missing includes
Some typedefs and macros are defined after the type check macros. This makes it difficult to automatically replace their definitions with OBJECT_DECLARE_TYPE. Patch generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=QOMStructTypedefSplit $(git grep -l '' -- '*.[ch]') which will split "typdef struct { ... } TypedefName" declarations. Followed by: $ ./scripts/codeconverter/converter.py -i --pattern=MoveSymbols \ $(git grep -l '' -- '*.[ch]') which will: - move the typedefs and #defines above the type check macros - add missing #include "qom/object.h" lines if necessary Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-9-ehabkost@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-10-ehabkost@redhat.com> Message-Id: <20200831210740.126168-11-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
1c8eef0227
commit
db1015e92e
796 changed files with 3378 additions and 1823 deletions
|
@ -16,8 +16,9 @@
|
|||
#include "migration/vmstate.h"
|
||||
#include "qemu/module.h"
|
||||
#include "ui/console.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
typedef struct {
|
||||
struct ADS7846State {
|
||||
SSISlave ssidev;
|
||||
qemu_irq interrupt;
|
||||
|
||||
|
@ -27,7 +28,8 @@ typedef struct {
|
|||
|
||||
int cycle;
|
||||
int output;
|
||||
} ADS7846State;
|
||||
};
|
||||
typedef struct ADS7846State ADS7846State;
|
||||
|
||||
#define TYPE_ADS7846 "ads7846"
|
||||
#define ADS7846(obj) OBJECT_CHECK(ADS7846State, (obj), TYPE_ADS7846)
|
||||
|
|
|
@ -22,8 +22,10 @@
|
|||
#include "ui/console.h"
|
||||
#include "trace.h"
|
||||
#include "framebuffer.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_ARTIST "artist"
|
||||
typedef struct ARTISTState ARTISTState;
|
||||
#define ARTIST(obj) OBJECT_CHECK(ARTISTState, (obj), TYPE_ARTIST)
|
||||
|
||||
#ifdef HOST_WORDS_BIGENDIAN
|
||||
|
@ -40,7 +42,7 @@ struct vram_buffer {
|
|||
unsigned int height;
|
||||
};
|
||||
|
||||
typedef struct ARTISTState {
|
||||
struct ARTISTState {
|
||||
SysBusDevice parent_obj;
|
||||
|
||||
QemuConsole *con;
|
||||
|
@ -103,7 +105,7 @@ typedef struct ARTISTState {
|
|||
uint32_t font_write_pos_y;
|
||||
|
||||
int draw_line_pattern;
|
||||
} ARTISTState;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
ARTIST_BUFFER_AP = 1,
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "hw/pci/pci.h"
|
||||
#include "hw/i2c/bitbang_i2c.h"
|
||||
#include "vga_int.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
/*#define DEBUG_ATI*/
|
||||
|
||||
|
@ -29,6 +30,7 @@
|
|||
#define PCI_DEVICE_ID_ATI_RADEON_QY 0x5159
|
||||
|
||||
#define TYPE_ATI_VGA "ati-vga"
|
||||
typedef struct ATIVGAState ATIVGAState;
|
||||
#define ATI_VGA(obj) OBJECT_CHECK(ATIVGAState, (obj), TYPE_ATI_VGA)
|
||||
|
||||
typedef struct ATIVGARegs {
|
||||
|
@ -82,7 +84,7 @@ typedef struct ATIVGARegs {
|
|||
uint32_t default_sc_bottom_right;
|
||||
} ATIVGARegs;
|
||||
|
||||
typedef struct ATIVGAState {
|
||||
struct ATIVGAState {
|
||||
PCIDevice dev;
|
||||
VGACommonState vga;
|
||||
char *model;
|
||||
|
@ -97,7 +99,7 @@ typedef struct ATIVGAState {
|
|||
MemoryRegion io;
|
||||
MemoryRegion mm;
|
||||
ATIVGARegs regs;
|
||||
} ATIVGAState;
|
||||
};
|
||||
|
||||
const char *ati_reg_name(int num);
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "ui/console.h"
|
||||
#include "ui/qemu-pixman.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
typedef struct BochsDisplayMode {
|
||||
pixman_format_code_t format;
|
||||
|
@ -29,7 +30,7 @@ typedef struct BochsDisplayMode {
|
|||
uint64_t size;
|
||||
} BochsDisplayMode;
|
||||
|
||||
typedef struct BochsDisplayState {
|
||||
struct BochsDisplayState {
|
||||
/* parent */
|
||||
PCIDevice pci;
|
||||
|
||||
|
@ -53,7 +54,8 @@ typedef struct BochsDisplayState {
|
|||
|
||||
/* device state */
|
||||
BochsDisplayMode mode;
|
||||
} BochsDisplayState;
|
||||
};
|
||||
typedef struct BochsDisplayState BochsDisplayState;
|
||||
|
||||
#define TYPE_BOCHS_DISPLAY "bochs-display"
|
||||
#define BOCHS_DISPLAY(obj) OBJECT_CHECK(BochsDisplayState, (obj), \
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "qemu/log.h"
|
||||
#include "qemu/module.h"
|
||||
#include "trace.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
/* Change to 1 to enable debugging */
|
||||
#define DEBUG_CG3 0
|
||||
|
@ -65,9 +66,10 @@
|
|||
#define CG3_VRAM_OFFSET 0x800000
|
||||
|
||||
#define TYPE_CG3 "cgthree"
|
||||
typedef struct CG3State CG3State;
|
||||
#define CG3(obj) OBJECT_CHECK(CG3State, (obj), TYPE_CG3)
|
||||
|
||||
typedef struct CG3State {
|
||||
struct CG3State {
|
||||
SysBusDevice parent_obj;
|
||||
|
||||
QemuConsole *con;
|
||||
|
@ -82,7 +84,7 @@ typedef struct CG3State {
|
|||
uint8_t r[256], g[256], b[256];
|
||||
uint16_t width, height, depth;
|
||||
uint8_t dac_index, dac_state;
|
||||
} CG3State;
|
||||
};
|
||||
|
||||
static void cg3_update_display(void *opaque)
|
||||
{
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "migration/vmstate.h"
|
||||
#include "ui/pixel_ops.h"
|
||||
#include "cirrus_vga_internal.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
|
@ -178,10 +179,11 @@ typedef void (*cirrus_fill_t)(struct CirrusVGAState *s,
|
|||
uint32_t dstaddr, int dst_pitch,
|
||||
int width, int height);
|
||||
|
||||
typedef struct PCICirrusVGAState {
|
||||
struct PCICirrusVGAState {
|
||||
PCIDevice dev;
|
||||
CirrusVGAState cirrus_vga;
|
||||
} PCICirrusVGAState;
|
||||
};
|
||||
typedef struct PCICirrusVGAState PCICirrusVGAState;
|
||||
|
||||
#define TYPE_PCI_CIRRUS_VGA "cirrus-vga"
|
||||
#define PCI_CIRRUS_VGA(obj) \
|
||||
|
|
|
@ -30,16 +30,18 @@
|
|||
#include "hw/qdev-properties.h"
|
||||
#include "hw/isa/isa.h"
|
||||
#include "cirrus_vga_internal.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_ISA_CIRRUS_VGA "isa-cirrus-vga"
|
||||
typedef struct ISACirrusVGAState ISACirrusVGAState;
|
||||
#define ISA_CIRRUS_VGA(obj) \
|
||||
OBJECT_CHECK(ISACirrusVGAState, (obj), TYPE_ISA_CIRRUS_VGA)
|
||||
|
||||
typedef struct ISACirrusVGAState {
|
||||
struct ISACirrusVGAState {
|
||||
ISADevice parent_obj;
|
||||
|
||||
CirrusVGAState cirrus_vga;
|
||||
} ISACirrusVGAState;
|
||||
};
|
||||
|
||||
static void isa_cirrus_vga_realizefn(DeviceState *dev, Error **errp)
|
||||
{
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "qemu/bswap.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qemu/log.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
/* Debug messages configuration */
|
||||
#define EXYNOS4210_FIMD_DEBUG 0
|
||||
|
@ -293,10 +294,11 @@ struct Exynos4210fimdWindow {
|
|||
};
|
||||
|
||||
#define TYPE_EXYNOS4210_FIMD "exynos4210.fimd"
|
||||
typedef struct Exynos4210fimdState Exynos4210fimdState;
|
||||
#define EXYNOS4210_FIMD(obj) \
|
||||
OBJECT_CHECK(Exynos4210fimdState, (obj), TYPE_EXYNOS4210_FIMD)
|
||||
|
||||
typedef struct {
|
||||
struct Exynos4210fimdState {
|
||||
SysBusDevice parent_obj;
|
||||
|
||||
MemoryRegion iomem;
|
||||
|
@ -325,7 +327,7 @@ typedef struct {
|
|||
uint8_t *ifb; /* Internal frame buffer */
|
||||
bool invalidate; /* Image needs to be redrawn */
|
||||
bool enabled; /* Display controller is enabled */
|
||||
} Exynos4210fimdState;
|
||||
};
|
||||
|
||||
/* Perform byte/halfword/word swap of data according to WINCON */
|
||||
static inline void fimd_swap_data(unsigned int swap_ctl, uint64_t *data)
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "trace.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
typedef struct G364State {
|
||||
/* hardware */
|
||||
|
@ -486,13 +487,14 @@ static void g364fb_init(DeviceState *dev, G364State *s)
|
|||
}
|
||||
|
||||
#define TYPE_G364 "sysbus-g364"
|
||||
typedef struct G364SysBusState G364SysBusState;
|
||||
#define G364(obj) OBJECT_CHECK(G364SysBusState, (obj), TYPE_G364)
|
||||
|
||||
typedef struct {
|
||||
struct G364SysBusState {
|
||||
SysBusDevice parent_obj;
|
||||
|
||||
G364State g364;
|
||||
} G364SysBusState;
|
||||
};
|
||||
|
||||
static void g364fb_sysbus_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
|
|
|
@ -29,22 +29,24 @@
|
|||
#include "trace.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
typedef enum {
|
||||
REDRAW_NONE = 0, REDRAW_SEGMENTS = 1, REDRAW_BACKGROUND = 2,
|
||||
} screen_state_t;
|
||||
|
||||
#define TYPE_JAZZ_LED "jazz-led"
|
||||
typedef struct LedState LedState;
|
||||
#define JAZZ_LED(obj) OBJECT_CHECK(LedState, (obj), TYPE_JAZZ_LED)
|
||||
|
||||
typedef struct LedState {
|
||||
struct LedState {
|
||||
SysBusDevice parent_obj;
|
||||
|
||||
MemoryRegion iomem;
|
||||
uint8_t segments;
|
||||
QemuConsole *con;
|
||||
screen_state_t state;
|
||||
} LedState;
|
||||
};
|
||||
|
||||
static uint64_t jazz_led_read(void *opaque, hwaddr addr,
|
||||
unsigned int size)
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include <X11/Xlib.h>
|
||||
#include <epoxy/gl.h>
|
||||
#include <epoxy/glx.h>
|
||||
#include "qom/object.h"
|
||||
|
||||
enum {
|
||||
R_CTL = 0,
|
||||
|
@ -82,6 +83,7 @@ struct vertex {
|
|||
} QEMU_PACKED;
|
||||
|
||||
#define TYPE_MILKYMIST_TMU2 "milkymist-tmu2"
|
||||
typedef struct MilkymistTMU2State MilkymistTMU2State;
|
||||
#define MILKYMIST_TMU2(obj) \
|
||||
OBJECT_CHECK(MilkymistTMU2State, (obj), TYPE_MILKYMIST_TMU2)
|
||||
|
||||
|
@ -98,7 +100,6 @@ struct MilkymistTMU2State {
|
|||
GLXFBConfig glx_fb_config;
|
||||
GLXContext glx_context;
|
||||
};
|
||||
typedef struct MilkymistTMU2State MilkymistTMU2State;
|
||||
|
||||
static const int glx_fbconfig_attr[] = {
|
||||
GLX_GREEN_SIZE, 5,
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "ui/pixel_ops.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define BITS 8
|
||||
#include "migration/vmstate.h"
|
||||
|
@ -68,6 +69,7 @@ enum {
|
|||
};
|
||||
|
||||
#define TYPE_MILKYMIST_VGAFB "milkymist-vgafb"
|
||||
typedef struct MilkymistVgafbState MilkymistVgafbState;
|
||||
#define MILKYMIST_VGAFB(obj) \
|
||||
OBJECT_CHECK(MilkymistVgafbState, (obj), TYPE_MILKYMIST_VGAFB)
|
||||
|
||||
|
@ -84,7 +86,6 @@ struct MilkymistVgafbState {
|
|||
|
||||
uint32_t regs[R_MAX];
|
||||
};
|
||||
typedef struct MilkymistVgafbState MilkymistVgafbState;
|
||||
|
||||
static int vgafb_enabled(MilkymistVgafbState *s)
|
||||
{
|
||||
|
|
|
@ -30,7 +30,9 @@
|
|||
#include "framebuffer.h"
|
||||
#include "ui/pixel_ops.h"
|
||||
#include "hw/m68k/next-cube.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
typedef struct NeXTFbState NeXTFbState;
|
||||
#define NEXTFB(obj) OBJECT_CHECK(NeXTFbState, (obj), TYPE_NEXTFB)
|
||||
|
||||
struct NeXTFbState {
|
||||
|
@ -44,7 +46,6 @@ struct NeXTFbState {
|
|||
uint32_t rows;
|
||||
int invalidate;
|
||||
};
|
||||
typedef struct NeXTFbState NeXTFbState;
|
||||
|
||||
static void nextfb_draw_line(void *opaque, uint8_t *d, const uint8_t *s,
|
||||
int width, int pitch)
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "qemu/timer.h"
|
||||
#include "qemu/log.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define PL110_CR_EN 0x001
|
||||
#define PL110_CR_BGR 0x100
|
||||
|
@ -48,9 +49,10 @@ enum pl110_version
|
|||
};
|
||||
|
||||
#define TYPE_PL110 "pl110"
|
||||
typedef struct PL110State PL110State;
|
||||
#define PL110(obj) OBJECT_CHECK(PL110State, (obj), TYPE_PL110)
|
||||
|
||||
typedef struct PL110State {
|
||||
struct PL110State {
|
||||
SysBusDevice parent_obj;
|
||||
|
||||
MemoryRegion iomem;
|
||||
|
@ -73,7 +75,7 @@ typedef struct PL110State {
|
|||
uint32_t palette[256];
|
||||
uint32_t raw_palette[128];
|
||||
qemu_irq irq;
|
||||
} PL110State;
|
||||
};
|
||||
|
||||
static int vmstate_pl110_post_load(void *opaque, int version_id);
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "ui/qemu-spice.h"
|
||||
#include "ui/spice-display.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
enum qxl_mode {
|
||||
QXL_MODE_UNDEFINED,
|
||||
|
@ -27,7 +28,7 @@ enum qxl_mode {
|
|||
#define QXL_PAGE_BITS 12
|
||||
#define QXL_PAGE_SIZE (1 << QXL_PAGE_BITS);
|
||||
|
||||
typedef struct PCIQXLDevice {
|
||||
struct PCIQXLDevice {
|
||||
PCIDevice pci;
|
||||
PortioList vga_port_list;
|
||||
SimpleSpiceDisplay ssd;
|
||||
|
@ -126,7 +127,8 @@ typedef struct PCIQXLDevice {
|
|||
int num_dirty_rects;
|
||||
QXLRect dirty[QXL_NUM_DIRTY_RECTS];
|
||||
QEMUBH *update_area_bh;
|
||||
} PCIQXLDevice;
|
||||
};
|
||||
typedef struct PCIQXLDevice PCIQXLDevice;
|
||||
|
||||
#define TYPE_PCI_QXL "pci-qxl"
|
||||
#define PCI_QXL(obj) OBJECT_CHECK(PCIQXLDevice, (obj), TYPE_PCI_QXL)
|
||||
|
|
|
@ -5,14 +5,16 @@
|
|||
#include "hw/qdev-properties.h"
|
||||
#include "hw/display/ramfb.h"
|
||||
#include "ui/console.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
typedef struct RAMFBStandaloneState RAMFBStandaloneState;
|
||||
#define RAMFB(obj) OBJECT_CHECK(RAMFBStandaloneState, (obj), TYPE_RAMFB_DEVICE)
|
||||
|
||||
typedef struct RAMFBStandaloneState {
|
||||
struct RAMFBStandaloneState {
|
||||
SysBusDevice parent_obj;
|
||||
QemuConsole *con;
|
||||
RAMFBState *state;
|
||||
} RAMFBStandaloneState;
|
||||
};
|
||||
|
||||
static void display_update_wrapper(void *dev)
|
||||
{
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "migration/vmstate.h"
|
||||
#include "hw/display/i2c-ddc.h"
|
||||
#include "trace.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define SII9022_SYS_CTRL_DATA 0x1a
|
||||
#define SII9022_SYS_CTRL_PWR_DWN 0x10
|
||||
|
@ -35,16 +36,17 @@
|
|||
#define SII9022_INT_STATUS_PLUGGED 0x04;
|
||||
|
||||
#define TYPE_SII9022 "sii9022"
|
||||
typedef struct sii9022_state sii9022_state;
|
||||
#define SII9022(obj) OBJECT_CHECK(sii9022_state, (obj), TYPE_SII9022)
|
||||
|
||||
typedef struct sii9022_state {
|
||||
struct sii9022_state {
|
||||
I2CSlave parent_obj;
|
||||
uint8_t ptr;
|
||||
bool addr_byte;
|
||||
bool ddc_req;
|
||||
bool ddc_skip_finish;
|
||||
bool ddc;
|
||||
} sii9022_state;
|
||||
};
|
||||
|
||||
static const VMStateDescription vmstate_sii9022 = {
|
||||
.name = "sii9022",
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "ui/pixel_ops.h"
|
||||
#include "qemu/bswap.h"
|
||||
#include "trace.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define MMIO_BASE_OFFSET 0x3e00000
|
||||
#define MMIO_SIZE 0x200000
|
||||
|
@ -1931,10 +1932,11 @@ static const VMStateDescription vmstate_sm501_state = {
|
|||
};
|
||||
|
||||
#define TYPE_SYSBUS_SM501 "sysbus-sm501"
|
||||
typedef struct SM501SysBusState SM501SysBusState;
|
||||
#define SYSBUS_SM501(obj) \
|
||||
OBJECT_CHECK(SM501SysBusState, (obj), TYPE_SYSBUS_SM501)
|
||||
|
||||
typedef struct {
|
||||
struct SM501SysBusState {
|
||||
/*< private >*/
|
||||
SysBusDevice parent_obj;
|
||||
/*< public >*/
|
||||
|
@ -1942,7 +1944,7 @@ typedef struct {
|
|||
uint32_t vram_size;
|
||||
uint32_t base;
|
||||
SerialMM serial;
|
||||
} SM501SysBusState;
|
||||
};
|
||||
|
||||
static void sm501_realize_sysbus(DeviceState *dev, Error **errp)
|
||||
{
|
||||
|
@ -2034,15 +2036,16 @@ static const TypeInfo sm501_sysbus_info = {
|
|||
};
|
||||
|
||||
#define TYPE_PCI_SM501 "sm501"
|
||||
typedef struct SM501PCIState SM501PCIState;
|
||||
#define PCI_SM501(obj) OBJECT_CHECK(SM501PCIState, (obj), TYPE_PCI_SM501)
|
||||
|
||||
typedef struct {
|
||||
struct SM501PCIState {
|
||||
/*< private >*/
|
||||
PCIDevice parent_obj;
|
||||
/*< public >*/
|
||||
SM501State state;
|
||||
uint32_t vram_size;
|
||||
} SM501PCIState;
|
||||
};
|
||||
|
||||
static void sm501_realize_pci(PCIDevice *dev, Error **errp)
|
||||
{
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "migration/vmstate.h"
|
||||
#include "qemu/module.h"
|
||||
#include "ui/console.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
//#define DEBUG_SSD0303 1
|
||||
|
||||
|
@ -46,9 +47,10 @@ enum ssd0303_cmd {
|
|||
};
|
||||
|
||||
#define TYPE_SSD0303 "ssd0303"
|
||||
typedef struct ssd0303_state ssd0303_state;
|
||||
#define SSD0303(obj) OBJECT_CHECK(ssd0303_state, (obj), TYPE_SSD0303)
|
||||
|
||||
typedef struct {
|
||||
struct ssd0303_state {
|
||||
I2CSlave parent_obj;
|
||||
|
||||
QemuConsole *con;
|
||||
|
@ -63,7 +65,7 @@ typedef struct {
|
|||
enum ssd0303_mode mode;
|
||||
enum ssd0303_cmd cmd_state;
|
||||
uint8_t framebuffer[132*8];
|
||||
} ssd0303_state;
|
||||
};
|
||||
|
||||
static uint8_t ssd0303_recv(I2CSlave *i2c)
|
||||
{
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "migration/vmstate.h"
|
||||
#include "qemu/module.h"
|
||||
#include "ui/console.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
//#define DEBUG_SSD0323 1
|
||||
|
||||
|
@ -47,7 +48,7 @@ enum ssd0323_mode
|
|||
SSD0323_DATA
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct ssd0323_state {
|
||||
SSISlave ssidev;
|
||||
QemuConsole *con;
|
||||
|
||||
|
@ -64,7 +65,8 @@ typedef struct {
|
|||
int32_t remap;
|
||||
uint32_t mode;
|
||||
uint8_t framebuffer[128 * 80 / 2];
|
||||
} ssd0323_state;
|
||||
};
|
||||
typedef struct ssd0323_state ssd0323_state;
|
||||
|
||||
#define TYPE_SSD0323 "ssd0323"
|
||||
#define SSD0323(obj) OBJECT_CHECK(ssd0323_state, (obj), TYPE_SSD0323)
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "migration/vmstate.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/module.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TCX_ROM_FILE "QEMU,tcx.bin"
|
||||
#define FCODE_MAX_ROM_SIZE 0x10000
|
||||
|
@ -55,9 +56,10 @@
|
|||
#define TCX_THC_CURSBITS 0x980
|
||||
|
||||
#define TYPE_TCX "SUNW,tcx"
|
||||
typedef struct TCXState TCXState;
|
||||
#define TCX(obj) OBJECT_CHECK(TCXState, (obj), TYPE_TCX)
|
||||
|
||||
typedef struct TCXState {
|
||||
struct TCXState {
|
||||
SysBusDevice parent_obj;
|
||||
|
||||
QemuConsole *con;
|
||||
|
@ -93,7 +95,7 @@ typedef struct TCXState {
|
|||
uint32_t cursbits[32];
|
||||
uint16_t cursx;
|
||||
uint16_t cursy;
|
||||
} TCXState;
|
||||
};
|
||||
|
||||
static void tcx_set_dirty(TCXState *s, ram_addr_t addr, int len)
|
||||
{
|
||||
|
|
|
@ -32,17 +32,19 @@
|
|||
#include "qemu/timer.h"
|
||||
#include "hw/loader.h"
|
||||
#include "hw/qdev-properties.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_ISA_VGA "isa-vga"
|
||||
typedef struct ISAVGAState ISAVGAState;
|
||||
#define ISA_VGA(obj) OBJECT_CHECK(ISAVGAState, (obj), TYPE_ISA_VGA)
|
||||
|
||||
typedef struct ISAVGAState {
|
||||
struct ISAVGAState {
|
||||
ISADevice parent_obj;
|
||||
|
||||
struct VGACommonState state;
|
||||
PortioList portio_vga;
|
||||
PortioList portio_vbe;
|
||||
} ISAVGAState;
|
||||
};
|
||||
|
||||
static void vga_isa_reset(DeviceState *dev)
|
||||
{
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "qemu/timer.h"
|
||||
#include "hw/loader.h"
|
||||
#include "hw/display/edid.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
enum vga_pci_flags {
|
||||
PCI_VGA_FLAG_ENABLE_MMIO = 1,
|
||||
|
@ -41,7 +42,7 @@ enum vga_pci_flags {
|
|||
PCI_VGA_FLAG_ENABLE_EDID = 3,
|
||||
};
|
||||
|
||||
typedef struct PCIVGAState {
|
||||
struct PCIVGAState {
|
||||
PCIDevice dev;
|
||||
VGACommonState vga;
|
||||
uint32_t flags;
|
||||
|
@ -49,7 +50,8 @@ typedef struct PCIVGAState {
|
|||
MemoryRegion mmio;
|
||||
MemoryRegion mrs[4];
|
||||
uint8_t edid[256];
|
||||
} PCIVGAState;
|
||||
};
|
||||
typedef struct PCIVGAState PCIVGAState;
|
||||
|
||||
#define TYPE_PCI_VGA "pci-vga"
|
||||
#define PCI_VGA(obj) OBJECT_CHECK(PCIVGAState, (obj), TYPE_PCI_VGA)
|
||||
|
|
|
@ -11,16 +11,18 @@
|
|||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "hw/virtio/virtio-gpu-pci.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_VHOST_USER_GPU_PCI "vhost-user-gpu-pci"
|
||||
typedef struct VhostUserGPUPCI VhostUserGPUPCI;
|
||||
#define VHOST_USER_GPU_PCI(obj) \
|
||||
OBJECT_CHECK(VhostUserGPUPCI, (obj), TYPE_VHOST_USER_GPU_PCI)
|
||||
|
||||
typedef struct VhostUserGPUPCI {
|
||||
struct VhostUserGPUPCI {
|
||||
VirtIOGPUPCIBase parent_obj;
|
||||
|
||||
VhostUserGPU vdev;
|
||||
} VhostUserGPUPCI;
|
||||
};
|
||||
|
||||
static void vhost_user_gpu_pci_initfn(Object *obj)
|
||||
{
|
||||
|
|
|
@ -11,17 +11,19 @@
|
|||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "virtio-vga.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_VHOST_USER_VGA "vhost-user-vga"
|
||||
|
||||
typedef struct VhostUserVGA VhostUserVGA;
|
||||
#define VHOST_USER_VGA(obj) \
|
||||
OBJECT_CHECK(VhostUserVGA, (obj), TYPE_VHOST_USER_VGA)
|
||||
|
||||
typedef struct VhostUserVGA {
|
||||
struct VhostUserVGA {
|
||||
VirtIOVGABase parent_obj;
|
||||
|
||||
VhostUserGPU vdev;
|
||||
} VhostUserVGA;
|
||||
};
|
||||
|
||||
static void vhost_user_vga_inst_initfn(Object *obj)
|
||||
{
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "hw/virtio/virtio.h"
|
||||
#include "hw/virtio/virtio-bus.h"
|
||||
#include "hw/virtio/virtio-gpu-pci.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
static Property virtio_gpu_pci_base_properties[] = {
|
||||
DEFINE_VIRTIO_GPU_PCI_PROPERTIES(VirtIOPCIProxy),
|
||||
|
@ -65,13 +66,14 @@ static const TypeInfo virtio_gpu_pci_base_info = {
|
|||
};
|
||||
|
||||
#define TYPE_VIRTIO_GPU_PCI "virtio-gpu-pci"
|
||||
typedef struct VirtIOGPUPCI VirtIOGPUPCI;
|
||||
#define VIRTIO_GPU_PCI(obj) \
|
||||
OBJECT_CHECK(VirtIOGPUPCI, (obj), TYPE_VIRTIO_GPU_PCI)
|
||||
|
||||
typedef struct VirtIOGPUPCI {
|
||||
struct VirtIOGPUPCI {
|
||||
VirtIOGPUPCIBase parent_obj;
|
||||
VirtIOGPU vdev;
|
||||
} VirtIOGPUPCI;
|
||||
};
|
||||
|
||||
static void virtio_gpu_initfn(Object *obj)
|
||||
{
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "qapi/error.h"
|
||||
#include "qemu/module.h"
|
||||
#include "virtio-vga.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
static void virtio_vga_base_invalidate_display(void *opaque)
|
||||
{
|
||||
|
@ -202,14 +203,15 @@ static TypeInfo virtio_vga_base_info = {
|
|||
|
||||
#define TYPE_VIRTIO_VGA "virtio-vga"
|
||||
|
||||
typedef struct VirtIOVGA VirtIOVGA;
|
||||
#define VIRTIO_VGA(obj) \
|
||||
OBJECT_CHECK(VirtIOVGA, (obj), TYPE_VIRTIO_VGA)
|
||||
|
||||
typedef struct VirtIOVGA {
|
||||
struct VirtIOVGA {
|
||||
VirtIOVGABase parent_obj;
|
||||
|
||||
VirtIOGPU vdev;
|
||||
} VirtIOVGA;
|
||||
};
|
||||
|
||||
static void virtio_vga_inst_initfn(Object *obj)
|
||||
{
|
||||
|
|
|
@ -3,11 +3,14 @@
|
|||
|
||||
#include "hw/virtio/virtio-gpu-pci.h"
|
||||
#include "vga_int.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
/*
|
||||
* virtio-vga-base: This extends VirtioPCIProxy.
|
||||
*/
|
||||
#define TYPE_VIRTIO_VGA_BASE "virtio-vga-base"
|
||||
typedef struct VirtIOVGABase VirtIOVGABase;
|
||||
typedef struct VirtIOVGABaseClass VirtIOVGABaseClass;
|
||||
#define VIRTIO_VGA_BASE(obj) \
|
||||
OBJECT_CHECK(VirtIOVGABase, (obj), TYPE_VIRTIO_VGA_BASE)
|
||||
#define VIRTIO_VGA_BASE_GET_CLASS(obj) \
|
||||
|
@ -15,18 +18,18 @@
|
|||
#define VIRTIO_VGA_BASE_CLASS(klass) \
|
||||
OBJECT_CLASS_CHECK(VirtIOVGABaseClass, klass, TYPE_VIRTIO_VGA_BASE)
|
||||
|
||||
typedef struct VirtIOVGABase {
|
||||
struct VirtIOVGABase {
|
||||
VirtIOPCIProxy parent_obj;
|
||||
|
||||
VirtIOGPUBase *vgpu;
|
||||
VGACommonState vga;
|
||||
MemoryRegion vga_mrs[3];
|
||||
} VirtIOVGABase;
|
||||
};
|
||||
|
||||
typedef struct VirtIOVGABaseClass {
|
||||
struct VirtIOVGABaseClass {
|
||||
VirtioPCIClass parent_class;
|
||||
|
||||
DeviceReset parent_reset;
|
||||
} VirtIOVGABaseClass;
|
||||
};
|
||||
|
||||
#endif /* VIRTIO_VGA_H */
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "hw/pci/pci.h"
|
||||
#include "hw/qdev-properties.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#undef VERBOSE
|
||||
#define HW_RECT_ACCEL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue