]> git.proxmox.com Git - qemu.git/blame - hw/g364fb.c
ui: move files to ui/ and include/ui/
[qemu.git] / hw / g364fb.c
CommitLineData
1fc3d392
AJ
1/*
2 * QEMU G364 framebuffer Emulator.
3 *
97a3f6ff 4 * Copyright (c) 2007-2011 Herve Poussineau
1fc3d392
AJ
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of
9 * the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
fad6cb1a 16 * You should have received a copy of the GNU General Public License along
8167ee88 17 * with this program; if not, see <http://www.gnu.org/licenses/>.
1fc3d392
AJ
18 */
19
20#include "hw.h"
28ecbaee
PB
21#include "ui/console.h"
22#include "ui/pixel_ops.h"
b213b370 23#include "trace.h"
97a3f6ff 24#include "sysbus.h"
0add30cf 25
1fc3d392 26typedef struct G364State {
0add30cf
AJ
27 /* hardware */
28 uint8_t *vram;
97a3f6ff 29 uint32_t vram_size;
0add30cf 30 qemu_irq irq;
97a3f6ff
HP
31 MemoryRegion mem_vram;
32 MemoryRegion mem_ctrl;
0add30cf
AJ
33 /* registers */
34 uint8_t color_palette[256][3];
35 uint8_t cursor_palette[3][3];
36 uint16_t cursor[512];
37 uint32_t cursor_position;
1fc3d392 38 uint32_t ctla;
0add30cf
AJ
39 uint32_t top_of_screen;
40 uint32_t width, height; /* in pixels */
1fc3d392
AJ
41 /* display refresh support */
42 DisplayState *ds;
0add30cf
AJ
43 int depth;
44 int blanked;
1fc3d392
AJ
45} G364State;
46
97a3f6ff
HP
47#define REG_BOOT 0x000000
48#define REG_DISPLAY 0x000118
49#define REG_VDISPLAY 0x000150
50#define REG_CTLA 0x000300
51#define REG_TOP 0x000400
52#define REG_CURS_PAL 0x000508
53#define REG_CURS_POS 0x000638
54#define REG_CLR_PAL 0x000800
55#define REG_CURS_PAT 0x001000
56#define REG_RESET 0x100000
0add30cf
AJ
57
58#define CTLA_FORCE_BLANK 0x00000400
59#define CTLA_NO_CURSOR 0x00800000
60
1213406b
BS
61#define G364_PAGE_SIZE 4096
62
97a3f6ff 63static inline int check_dirty(G364State *s, ram_addr_t page)
0add30cf 64{
cd7a45c9
BS
65 return memory_region_get_dirty(&s->mem_vram, page, G364_PAGE_SIZE,
66 DIRTY_MEMORY_VGA);
0add30cf
AJ
67}
68
69static inline void reset_dirty(G364State *s,
c227f099 70 ram_addr_t page_min, ram_addr_t page_max)
0add30cf 71{
97a3f6ff
HP
72 memory_region_reset_dirty(&s->mem_vram,
73 page_min,
1213406b 74 page_max + G364_PAGE_SIZE - page_min - 1,
97a3f6ff 75 DIRTY_MEMORY_VGA);
0add30cf
AJ
76}
77
78static void g364fb_draw_graphic8(G364State *s)
1fc3d392 79{
0add30cf
AJ
80 int i, w;
81 uint8_t *vram;
82 uint8_t *data_display, *dd;
c227f099 83 ram_addr_t page, page_min, page_max;
0add30cf
AJ
84 int x, y;
85 int xmin, xmax;
86 int ymin, ymax;
87 int xcursor, ycursor;
88 unsigned int (*rgb_to_pixel)(unsigned int r, unsigned int g, unsigned int b);
89
0e1f5a0c 90 switch (ds_get_bits_per_pixel(s->ds)) {
1fc3d392 91 case 8:
0add30cf
AJ
92 rgb_to_pixel = rgb_to_pixel8;
93 w = 1;
1fc3d392
AJ
94 break;
95 case 15:
0add30cf
AJ
96 rgb_to_pixel = rgb_to_pixel15;
97 w = 2;
1fc3d392
AJ
98 break;
99 case 16:
0add30cf
AJ
100 rgb_to_pixel = rgb_to_pixel16;
101 w = 2;
1fc3d392
AJ
102 break;
103 case 32:
0add30cf
AJ
104 rgb_to_pixel = rgb_to_pixel32;
105 w = 4;
1fc3d392
AJ
106 break;
107 default:
b213b370
HP
108 hw_error("g364: unknown host depth %d",
109 ds_get_bits_per_pixel(s->ds));
1fc3d392
AJ
110 return;
111 }
112
97a3f6ff 113 page = 0;
c227f099 114 page_min = (ram_addr_t)-1;
0add30cf
AJ
115 page_max = 0;
116
117 x = y = 0;
118 xmin = s->width;
119 xmax = 0;
120 ymin = s->height;
121 ymax = 0;
122
123 if (!(s->ctla & CTLA_NO_CURSOR)) {
124 xcursor = s->cursor_position >> 12;
125 ycursor = s->cursor_position & 0xfff;
126 } else {
127 xcursor = ycursor = -65;
128 }
129
130 vram = s->vram + s->top_of_screen;
131 /* XXX: out of range in vram? */
132 data_display = dd = ds_get_data(s->ds);
133 while (y < s->height) {
97a3f6ff 134 if (check_dirty(s, page)) {
0add30cf
AJ
135 if (y < ymin)
136 ymin = ymax = y;
c227f099 137 if (page_min == (ram_addr_t)-1)
0add30cf
AJ
138 page_min = page;
139 page_max = page;
140 if (x < xmin)
141 xmin = x;
1213406b 142 for (i = 0; i < G364_PAGE_SIZE; i++) {
0add30cf
AJ
143 uint8_t index;
144 unsigned int color;
145 if (unlikely((y >= ycursor && y < ycursor + 64) &&
146 (x >= xcursor && x < xcursor + 64))) {
147 /* pointer area */
148 int xdiff = x - xcursor;
149 uint16_t curs = s->cursor[(y - ycursor) * 8 + xdiff / 8];
150 int op = (curs >> ((xdiff & 7) * 2)) & 3;
151 if (likely(op == 0)) {
152 /* transparent */
153 index = *vram;
154 color = (*rgb_to_pixel)(
155 s->color_palette[index][0],
156 s->color_palette[index][1],
157 s->color_palette[index][2]);
158 } else {
159 /* get cursor color */
160 index = op - 1;
161 color = (*rgb_to_pixel)(
162 s->cursor_palette[index][0],
163 s->cursor_palette[index][1],
164 s->cursor_palette[index][2]);
165 }
166 } else {
167 /* normal area */
168 index = *vram;
169 color = (*rgb_to_pixel)(
170 s->color_palette[index][0],
171 s->color_palette[index][1],
172 s->color_palette[index][2]);
173 }
174 memcpy(dd, &color, w);
175 dd += w;
176 x++;
177 vram++;
178 if (x == s->width) {
179 xmax = s->width - 1;
180 y++;
181 if (y == s->height) {
182 ymax = s->height - 1;
183 goto done;
184 }
185 data_display = dd = data_display + ds_get_linesize(s->ds);
186 xmin = 0;
187 x = 0;
188 }
189 }
190 if (x > xmax)
191 xmax = x;
192 if (y > ymax)
193 ymax = y;
194 } else {
195 int dy;
c227f099 196 if (page_min != (ram_addr_t)-1) {
0add30cf 197 reset_dirty(s, page_min, page_max);
c227f099 198 page_min = (ram_addr_t)-1;
0add30cf 199 page_max = 0;
a93a4a22
GH
200 dpy_gfx_update(s->ds, xmin, ymin,
201 xmax - xmin + 1, ymax - ymin + 1);
0add30cf
AJ
202 xmin = s->width;
203 xmax = 0;
204 ymin = s->height;
205 ymax = 0;
206 }
1213406b 207 x += G364_PAGE_SIZE;
0add30cf
AJ
208 dy = x / s->width;
209 x = x % s->width;
210 y += dy;
1213406b 211 vram += G364_PAGE_SIZE;
0add30cf
AJ
212 data_display += dy * ds_get_linesize(s->ds);
213 dd = data_display + x * w;
214 }
1213406b 215 page += G364_PAGE_SIZE;
0add30cf
AJ
216 }
217
218done:
c227f099 219 if (page_min != (ram_addr_t)-1) {
a93a4a22 220 dpy_gfx_update(s->ds, xmin, ymin, xmax - xmin + 1, ymax - ymin + 1);
0add30cf
AJ
221 reset_dirty(s, page_min, page_max);
222 }
1fc3d392
AJ
223}
224
0add30cf 225static void g364fb_draw_blank(G364State *s)
1fc3d392
AJ
226{
227 int i, w;
228 uint8_t *d;
229
0add30cf
AJ
230 if (s->blanked) {
231 /* Screen is already blank. No need to redraw it */
1fc3d392 232 return;
0add30cf 233 }
1fc3d392 234
0add30cf 235 w = s->width * ((ds_get_bits_per_pixel(s->ds) + 7) >> 3);
0e1f5a0c 236 d = ds_get_data(s->ds);
0add30cf 237 for (i = 0; i < s->height; i++) {
1fc3d392 238 memset(d, 0, w);
0e1f5a0c 239 d += ds_get_linesize(s->ds);
1fc3d392 240 }
221bb2d5 241
a93a4a22 242 dpy_gfx_update(s->ds, 0, 0, s->width, s->height);
0add30cf 243 s->blanked = 1;
1fc3d392
AJ
244}
245
1fc3d392
AJ
246static void g364fb_update_display(void *opaque)
247{
248 G364State *s = opaque;
1fc3d392 249
e9a07334
JK
250 qemu_flush_coalesced_mmio_buffer();
251
0add30cf 252 if (s->width == 0 || s->height == 0)
221bb2d5
AJ
253 return;
254
0add30cf
AJ
255 if (s->width != ds_get_width(s->ds) || s->height != ds_get_height(s->ds)) {
256 qemu_console_resize(s->ds, s->width, s->height);
221bb2d5 257 }
0add30cf
AJ
258
259 if (s->ctla & CTLA_FORCE_BLANK) {
260 g364fb_draw_blank(s);
261 } else if (s->depth == 8) {
262 g364fb_draw_graphic8(s);
263 } else {
b213b370 264 error_report("g364: unknown guest depth %d", s->depth);
1fc3d392 265 }
0add30cf
AJ
266
267 qemu_irq_raise(s->irq);
1fc3d392
AJ
268}
269
86178a57 270static inline void g364fb_invalidate_display(void *opaque)
1fc3d392
AJ
271{
272 G364State *s = opaque;
0add30cf
AJ
273
274 s->blanked = 0;
fd4aa979 275 memory_region_set_dirty(&s->mem_vram, 0, s->vram_size);
1fc3d392
AJ
276}
277
97a3f6ff 278static void g364fb_reset(G364State *s)
1fc3d392 279{
0add30cf
AJ
280 qemu_irq_lower(s->irq);
281
282 memset(s->color_palette, 0, sizeof(s->color_palette));
283 memset(s->cursor_palette, 0, sizeof(s->cursor_palette));
284 memset(s->cursor, 0, sizeof(s->cursor));
285 s->cursor_position = 0;
286 s->ctla = 0;
287 s->top_of_screen = 0;
288 s->width = s->height = 0;
289 memset(s->vram, 0, s->vram_size);
97a3f6ff 290 g364fb_invalidate_display(s);
1fc3d392
AJ
291}
292
d7098135
LC
293static void g364fb_screen_dump(void *opaque, const char *filename, bool cswitch,
294 Error **errp)
1fc3d392
AJ
295{
296 G364State *s = opaque;
61a3f955 297 int ret, y, x;
1fc3d392
AJ
298 uint8_t index;
299 uint8_t *data_buffer;
300 FILE *f;
301
e9a07334
JK
302 qemu_flush_coalesced_mmio_buffer();
303
0add30cf 304 if (s->depth != 8) {
61a3f955 305 error_setg(errp, "g364: unknown guest depth %d", s->depth);
0add30cf
AJ
306 return;
307 }
308
1fc3d392 309 f = fopen(filename, "wb");
61a3f955
LC
310 if (!f) {
311 error_setg(errp, "failed to open file '%s': %s", filename,
312 strerror(errno));
1fc3d392 313 return;
61a3f955 314 }
1fc3d392 315
0add30cf
AJ
316 if (s->ctla & CTLA_FORCE_BLANK) {
317 /* blank screen */
61a3f955
LC
318 ret = fprintf(f, "P4\n%d %d\n", s->width, s->height);
319 if (ret < 0) {
320 goto write_err;
321 }
0add30cf 322 for (y = 0; y < s->height; y++)
61a3f955
LC
323 for (x = 0; x < s->width; x++) {
324 ret = fputc(0, f);
325 if (ret == EOF) {
326 goto write_err;
327 }
328 }
0add30cf
AJ
329 } else {
330 data_buffer = s->vram + s->top_of_screen;
61a3f955
LC
331 ret = fprintf(f, "P6\n%d %d\n%d\n", s->width, s->height, 255);
332 if (ret < 0) {
333 goto write_err;
334 }
0add30cf
AJ
335 for (y = 0; y < s->height; y++)
336 for (x = 0; x < s->width; x++, data_buffer++) {
337 index = *data_buffer;
61a3f955
LC
338 ret = fputc(s->color_palette[index][0], f);
339 if (ret == EOF) {
340 goto write_err;
341 }
342 ret = fputc(s->color_palette[index][1], f);
343 if (ret == EOF) {
344 goto write_err;
345 }
346 ret = fputc(s->color_palette[index][2], f);
347 if (ret == EOF) {
348 goto write_err;
349 }
1fc3d392 350 }
0add30cf
AJ
351 }
352
61a3f955 353out:
1fc3d392 354 fclose(f);
61a3f955
LC
355 return;
356
357write_err:
358 error_setg(errp, "failed to write to file '%s': %s", filename,
359 strerror(errno));
360 unlink(filename);
361 goto out;
1fc3d392
AJ
362}
363
364/* called for accesses to io ports */
97a3f6ff 365static uint64_t g364fb_ctrl_read(void *opaque,
a8170e5e 366 hwaddr addr,
97a3f6ff 367 unsigned int size)
1fc3d392 368{
0add30cf 369 G364State *s = opaque;
1fc3d392
AJ
370 uint32_t val;
371
0add30cf
AJ
372 if (addr >= REG_CURS_PAT && addr < REG_CURS_PAT + 0x1000) {
373 /* cursor pattern */
374 int idx = (addr - REG_CURS_PAT) >> 3;
375 val = s->cursor[idx];
376 } else if (addr >= REG_CURS_PAL && addr < REG_CURS_PAL + 0x18) {
377 /* cursor palette */
378 int idx = (addr - REG_CURS_PAL) >> 3;
379 val = ((uint32_t)s->cursor_palette[idx][0] << 16);
380 val |= ((uint32_t)s->cursor_palette[idx][1] << 8);
381 val |= ((uint32_t)s->cursor_palette[idx][2] << 0);
382 } else {
383 switch (addr) {
0add30cf
AJ
384 case REG_DISPLAY:
385 val = s->width / 4;
386 break;
387 case REG_VDISPLAY:
388 val = s->height * 2;
389 break;
390 case REG_CTLA:
391 val = s->ctla;
392 break;
393 default:
394 {
b213b370
HP
395 error_report("g364: invalid read at [" TARGET_FMT_plx "]",
396 addr);
0add30cf
AJ
397 val = 0;
398 break;
399 }
400 }
1fc3d392
AJ
401 }
402
b213b370 403 trace_g364fb_read(addr, val);
1fc3d392
AJ
404
405 return val;
406}
407
0add30cf 408static void g364fb_update_depth(G364State *s)
1fc3d392 409{
38972938 410 static const int depths[8] = { 1, 2, 4, 8, 15, 16, 0 };
0add30cf
AJ
411 s->depth = depths[(s->ctla & 0x00700000) >> 20];
412}
1fc3d392 413
0add30cf
AJ
414static void g364_invalidate_cursor_position(G364State *s)
415{
fd4aa979 416 int ymin, ymax, start, end;
1fc3d392 417
0add30cf
AJ
418 /* invalidate only near the cursor */
419 ymin = s->cursor_position & 0xfff;
420 ymax = MIN(s->height, ymin + 64);
421 start = ymin * ds_get_linesize(s->ds);
422 end = (ymax + 1) * ds_get_linesize(s->ds);
1fc3d392 423
fd4aa979 424 memory_region_set_dirty(&s->mem_vram, start, end - start);
0add30cf
AJ
425}
426
97a3f6ff 427static void g364fb_ctrl_write(void *opaque,
a8170e5e 428 hwaddr addr,
97a3f6ff
HP
429 uint64_t val,
430 unsigned int size)
0add30cf
AJ
431{
432 G364State *s = opaque;
433
b213b370 434 trace_g364fb_write(addr, val);
0add30cf
AJ
435
436 if (addr >= REG_CLR_PAL && addr < REG_CLR_PAL + 0x800) {
1fc3d392 437 /* color palette */
0add30cf
AJ
438 int idx = (addr - REG_CLR_PAL) >> 3;
439 s->color_palette[idx][0] = (val >> 16) & 0xff;
440 s->color_palette[idx][1] = (val >> 8) & 0xff;
441 s->color_palette[idx][2] = val & 0xff;
442 g364fb_invalidate_display(s);
443 } else if (addr >= REG_CURS_PAT && addr < REG_CURS_PAT + 0x1000) {
444 /* cursor pattern */
445 int idx = (addr - REG_CURS_PAT) >> 3;
446 s->cursor[idx] = val;
447 g364fb_invalidate_display(s);
448 } else if (addr >= REG_CURS_PAL && addr < REG_CURS_PAL + 0x18) {
449 /* cursor palette */
450 int idx = (addr - REG_CURS_PAL) >> 3;
451 s->cursor_palette[idx][0] = (val >> 16) & 0xff;
452 s->cursor_palette[idx][1] = (val >> 8) & 0xff;
453 s->cursor_palette[idx][2] = val & 0xff;
454 g364fb_invalidate_display(s);
1fc3d392
AJ
455 } else {
456 switch (addr) {
97a3f6ff
HP
457 case REG_BOOT: /* Boot timing */
458 case 0x00108: /* Line timing: half sync */
459 case 0x00110: /* Line timing: back porch */
460 case 0x00120: /* Line timing: short display */
461 case 0x00128: /* Frame timing: broad pulse */
462 case 0x00130: /* Frame timing: v sync */
463 case 0x00138: /* Frame timing: v preequalise */
464 case 0x00140: /* Frame timing: v postequalise */
465 case 0x00148: /* Frame timing: v blank */
466 case 0x00158: /* Line timing: line time */
467 case 0x00160: /* Frame store: line start */
468 case 0x00168: /* vram cycle: mem init */
469 case 0x00170: /* vram cycle: transfer delay */
470 case 0x00200: /* vram cycle: mask register */
471 /* ignore */
472 break;
473 case REG_TOP:
474 s->top_of_screen = val;
475 g364fb_invalidate_display(s);
476 break;
477 case REG_DISPLAY:
478 s->width = val * 4;
479 break;
480 case REG_VDISPLAY:
481 s->height = val / 2;
482 break;
483 case REG_CTLA:
484 s->ctla = val;
485 g364fb_update_depth(s);
486 g364fb_invalidate_display(s);
487 break;
488 case REG_CURS_POS:
489 g364_invalidate_cursor_position(s);
490 s->cursor_position = val;
491 g364_invalidate_cursor_position(s);
492 break;
493 case REG_RESET:
494 g364fb_reset(s);
495 break;
496 default:
497 error_report("g364: invalid write of 0x%" PRIx64
498 " at [" TARGET_FMT_plx "]", val, addr);
499 break;
1fc3d392
AJ
500 }
501 }
0add30cf 502 qemu_irq_lower(s->irq);
1fc3d392
AJ
503}
504
97a3f6ff
HP
505static const MemoryRegionOps g364fb_ctrl_ops = {
506 .read = g364fb_ctrl_read,
507 .write = g364fb_ctrl_write,
508 .endianness = DEVICE_LITTLE_ENDIAN,
509 .impl.min_access_size = 4,
510 .impl.max_access_size = 4,
1fc3d392
AJ
511};
512
97a3f6ff 513static int g364fb_post_load(void *opaque, int version_id)
1fc3d392
AJ
514{
515 G364State *s = opaque;
0add30cf
AJ
516
517 /* force refresh */
518 g364fb_update_depth(s);
519 g364fb_invalidate_display(s);
1fc3d392 520
0add30cf 521 return 0;
1fc3d392
AJ
522}
523
97a3f6ff
HP
524static const VMStateDescription vmstate_g364fb = {
525 .name = "g364fb",
526 .version_id = 1,
527 .minimum_version_id = 1,
528 .minimum_version_id_old = 1,
529 .post_load = g364fb_post_load,
530 .fields = (VMStateField[]) {
531 VMSTATE_VBUFFER_UINT32(vram, G364State, 1, NULL, 0, vram_size),
532 VMSTATE_BUFFER_UNSAFE(color_palette, G364State, 0, 256 * 3),
533 VMSTATE_BUFFER_UNSAFE(cursor_palette, G364State, 0, 9),
534 VMSTATE_UINT16_ARRAY(cursor, G364State, 512),
535 VMSTATE_UINT32(cursor_position, G364State),
536 VMSTATE_UINT32(ctla, G364State),
537 VMSTATE_UINT32(top_of_screen, G364State),
538 VMSTATE_UINT32(width, G364State),
539 VMSTATE_UINT32(height, G364State),
540 VMSTATE_END_OF_LIST()
541 }
542};
1fc3d392 543
97a3f6ff 544static void g364fb_init(DeviceState *dev, G364State *s)
1fc3d392 545{
97a3f6ff 546 s->vram = g_malloc0(s->vram_size);
1fc3d392 547
3023f332
AL
548 s->ds = graphic_console_init(g364fb_update_display,
549 g364fb_invalidate_display,
550 g364fb_screen_dump, NULL, s);
1fc3d392 551
97a3f6ff 552 memory_region_init_io(&s->mem_ctrl, &g364fb_ctrl_ops, s, "ctrl", 0x180000);
c5705a77 553 memory_region_init_ram_ptr(&s->mem_vram, "vram",
97a3f6ff 554 s->vram_size, s->vram);
c5705a77 555 vmstate_register_ram(&s->mem_vram, dev);
97a3f6ff
HP
556 memory_region_set_coalescing(&s->mem_vram);
557}
558
559typedef struct {
560 SysBusDevice busdev;
561 G364State g364;
562} G364SysBusState;
1fc3d392 563
97a3f6ff
HP
564static int g364fb_sysbus_init(SysBusDevice *dev)
565{
566 G364State *s = &FROM_SYSBUS(G364SysBusState, dev)->g364;
567
568 g364fb_init(&dev->qdev, s);
569 sysbus_init_irq(dev, &s->irq);
750ecd44
AK
570 sysbus_init_mmio(dev, &s->mem_ctrl);
571 sysbus_init_mmio(dev, &s->mem_vram);
1fc3d392
AJ
572
573 return 0;
574}
97a3f6ff
HP
575
576static void g364fb_sysbus_reset(DeviceState *d)
577{
578 G364SysBusState *s = DO_UPCAST(G364SysBusState, busdev.qdev, d);
579 g364fb_reset(&s->g364);
580}
581
999e12bb
AL
582static Property g364fb_sysbus_properties[] = {
583 DEFINE_PROP_HEX32("vram_size", G364SysBusState, g364.vram_size,
584 8 * 1024 * 1024),
585 DEFINE_PROP_END_OF_LIST(),
586};
587
588static void g364fb_sysbus_class_init(ObjectClass *klass, void *data)
589{
39bffca2 590 DeviceClass *dc = DEVICE_CLASS(klass);
999e12bb
AL
591 SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
592
593 k->init = g364fb_sysbus_init;
39bffca2
AL
594 dc->desc = "G364 framebuffer";
595 dc->reset = g364fb_sysbus_reset;
596 dc->vmsd = &vmstate_g364fb;
597 dc->props = g364fb_sysbus_properties;
999e12bb
AL
598}
599
39bffca2
AL
600static TypeInfo g364fb_sysbus_info = {
601 .name = "sysbus-g364",
602 .parent = TYPE_SYS_BUS_DEVICE,
603 .instance_size = sizeof(G364SysBusState),
604 .class_init = g364fb_sysbus_class_init,
97a3f6ff
HP
605};
606
83f7d43a 607static void g364fb_register_types(void)
97a3f6ff 608{
39bffca2 609 type_register_static(&g364fb_sysbus_info);
97a3f6ff
HP
610}
611
83f7d43a 612type_init(g364fb_register_types)