hw/arm/sbsa-ref: Remove unnecessary check for secure_sysmem == NULL
[qemu/ar7.git] / tests / libqos / virtio-mmio.h
blob17a17141c3da64cc92b98b77bdaf58969a6538fc
1 /*
2 * libqos virtio MMIO definitions
4 * Copyright (c) 2014 Marc MarĂ­
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
8 */
10 #ifndef LIBQOS_VIRTIO_MMIO_H
11 #define LIBQOS_VIRTIO_MMIO_H
13 #include "libqos/virtio.h"
14 #include "libqos/qgraph.h"
16 #define QVIRTIO_MMIO_MAGIC_VALUE 0x000
17 #define QVIRTIO_MMIO_VERSION 0x004
18 #define QVIRTIO_MMIO_DEVICE_ID 0x008
19 #define QVIRTIO_MMIO_VENDOR_ID 0x00C
20 #define QVIRTIO_MMIO_HOST_FEATURES 0x010
21 #define QVIRTIO_MMIO_HOST_FEATURES_SEL 0x014
22 #define QVIRTIO_MMIO_GUEST_FEATURES 0x020
23 #define QVIRTIO_MMIO_GUEST_FEATURES_SEL 0x024
24 #define QVIRTIO_MMIO_GUEST_PAGE_SIZE 0x028
25 #define QVIRTIO_MMIO_QUEUE_SEL 0x030
26 #define QVIRTIO_MMIO_QUEUE_NUM_MAX 0x034
27 #define QVIRTIO_MMIO_QUEUE_NUM 0x038
28 #define QVIRTIO_MMIO_QUEUE_ALIGN 0x03C
29 #define QVIRTIO_MMIO_QUEUE_PFN 0x040
30 #define QVIRTIO_MMIO_QUEUE_NOTIFY 0x050
31 #define QVIRTIO_MMIO_INTERRUPT_STATUS 0x060
32 #define QVIRTIO_MMIO_INTERRUPT_ACK 0x064
33 #define QVIRTIO_MMIO_DEVICE_STATUS 0x070
34 #define QVIRTIO_MMIO_DEVICE_SPECIFIC 0x100
36 typedef struct QVirtioMMIODevice {
37 QOSGraphObject obj;
38 QVirtioDevice vdev;
39 QTestState *qts;
40 uint64_t addr;
41 uint32_t page_size;
42 uint32_t features; /* As it cannot be read later, save it */
43 } QVirtioMMIODevice;
45 extern const QVirtioBus qvirtio_mmio;
47 void qvirtio_mmio_init_device(QVirtioMMIODevice *dev, QTestState *qts,
48 uint64_t addr, uint32_t page_size);
50 #endif