| 1 | /* |
| 2 | * QEMU Macintosh Nubus Virtio MMIO card |
| 3 | * |
| 4 | * Copyright (c) 2023 Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
| 5 | * |
| 6 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 7 | */ |
| 8 | |
| 9 | #ifndef HW_NUBUS_VIRTIO_MMIO_H |
| 10 | #define HW_NUBUS_VIRTIO_MMIO_H |
| 11 | |
| 12 | #include "hw/nubus/nubus.h" |
| 13 | #include "qom/object.h" |
| 14 | #include "hw/intc/goldfish_pic.h" |
| 15 | #include "hw/virtio/virtio-mmio.h" |
| 16 | |
| 17 | #define TYPE_NUBUS_VIRTIO_MMIO "nubus-virtio-mmio" |
| 18 | OBJECT_DECLARE_TYPE(NubusVirtioMMIO, NubusVirtioMMIODeviceClass, |
| 19 | NUBUS_VIRTIO_MMIO) |
| 20 | |
| 21 | struct NubusVirtioMMIODeviceClass { |
| 22 | DeviceClass parent_class; |
| 23 | |
| 24 | DeviceRealize parent_realize; |
| 25 | }; |
| 26 | |
| 27 | #define NUBUS_VIRTIO_MMIO_NUM_DEVICES 32 |
| 28 | |
| 29 | struct NubusVirtioMMIO { |
| 30 | NubusDevice parent_obj; |
| 31 | |
| 32 | GoldfishPICState pic; |
| 33 | VirtIOMMIOProxy virtio_mmio[NUBUS_VIRTIO_MMIO_NUM_DEVICES]; |
| 34 | }; |
| 35 | |
| 36 | #endif |