summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/hw/arm/bcm2835_peripherals.h2
-rw-r--r--include/hw/arm/virt.h1
-rw-r--r--include/hw/misc/bcm2835_rng.h27
-rw-r--r--include/hw/sd/bcm2835_sdhost.h48
-rw-r--r--include/qemu-common.h2
-rw-r--r--include/qemu/throttle-options.h92
6 files changed, 171 insertions, 1 deletions
diff --git a/include/hw/arm/bcm2835_peripherals.h b/include/hw/arm/bcm2835_peripherals.h
index e12ae3721a..31241c799d 100644
--- a/include/hw/arm/bcm2835_peripherals.h
+++ b/include/hw/arm/bcm2835_peripherals.h
@@ -19,6 +19,7 @@
#include "hw/dma/bcm2835_dma.h"
#include "hw/intc/bcm2835_ic.h"
#include "hw/misc/bcm2835_property.h"
+#include "hw/misc/bcm2835_rng.h"
#include "hw/misc/bcm2835_mbox.h"
#include "hw/sd/sdhci.h"
@@ -41,6 +42,7 @@ typedef struct BCM2835PeripheralState {
BCM2835DMAState dma;
BCM2835ICState ic;
BCM2835PropertyState property;
+ BCM2835RngState rng;
BCM2835MboxState mboxes;
SDHCIState sdhci;
} BCM2835PeripheralState;
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
index 58ce74e0e5..33b0ff3892 100644
--- a/include/hw/arm/virt.h
+++ b/include/hw/arm/virt.h
@@ -93,6 +93,7 @@ typedef struct {
FWCfgState *fw_cfg;
bool secure;
bool highmem;
+ bool its;
bool virt;
int32_t gic_version;
struct arm_boot_info bootinfo;
diff --git a/include/hw/misc/bcm2835_rng.h b/include/hw/misc/bcm2835_rng.h
new file mode 100644
index 0000000000..41a531bce7
--- /dev/null
+++ b/include/hw/misc/bcm2835_rng.h
@@ -0,0 +1,27 @@
+/*
+ * BCM2835 Random Number Generator emulation
+ *
+ * Copyright (C) 2017 Marcin Chojnacki <marcinch7@gmail.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef BCM2835_RNG_H
+#define BCM2835_RNG_H
+
+#include "hw/sysbus.h"
+
+#define TYPE_BCM2835_RNG "bcm2835-rng"
+#define BCM2835_RNG(obj) \
+ OBJECT_CHECK(BCM2835RngState, (obj), TYPE_BCM2835_RNG)
+
+typedef struct {
+ SysBusDevice busdev;
+ MemoryRegion iomem;
+
+ uint32_t rng_ctrl;
+ uint32_t rng_status;
+} BCM2835RngState;
+
+#endif
diff --git a/include/hw/sd/bcm2835_sdhost.h b/include/hw/sd/bcm2835_sdhost.h
new file mode 100644
index 0000000000..7520dd6507
--- /dev/null
+++ b/include/hw/sd/bcm2835_sdhost.h
@@ -0,0 +1,48 @@
+/*
+ * Raspberry Pi (BCM2835) SD Host Controller
+ *
+ * Copyright (c) 2017 Antfield SAS
+ *
+ * Authors:
+ * Clement Deschamps <clement.deschamps@antfield.fr>
+ * Luc Michel <luc.michel@antfield.fr>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef BCM2835_SDHOST_H
+#define BCM2835_SDHOST_H
+
+#include "hw/sysbus.h"
+#include "hw/sd/sd.h"
+
+#define TYPE_BCM2835_SDHOST "bcm2835-sdhost"
+#define BCM2835_SDHOST(obj) \
+ OBJECT_CHECK(BCM2835SDHostState, (obj), TYPE_BCM2835_SDHOST)
+
+#define BCM2835_SDHOST_FIFO_LEN 16
+
+typedef struct {
+ SysBusDevice busdev;
+ SDBus sdbus;
+ MemoryRegion iomem;
+
+ uint32_t cmd;
+ uint32_t cmdarg;
+ uint32_t status;
+ uint32_t rsp[4];
+ uint32_t config;
+ uint32_t edm;
+ uint32_t vdd;
+ uint32_t hbct;
+ uint32_t hblc;
+ int32_t fifo_pos;
+ int32_t fifo_len;
+ uint32_t fifo[BCM2835_SDHOST_FIFO_LEN];
+ uint32_t datacnt;
+
+ qemu_irq irq;
+} BCM2835SDHostState;
+
+#endif
diff --git a/include/qemu-common.h b/include/qemu-common.h
index 1430390eb6..d218821c14 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -19,7 +19,7 @@
#include "qemu/option.h"
/* Copyright string for -version arguments, About dialogs, etc */
-#define QEMU_COPYRIGHT "Copyright (c) 2003-2016 " \
+#define QEMU_COPYRIGHT "Copyright (c) 2003-2017 " \
"Fabrice Bellard and the QEMU Project developers"
/* main function, renamed */
diff --git a/include/qemu/throttle-options.h b/include/qemu/throttle-options.h
new file mode 100644
index 0000000000..3133d1ca40
--- /dev/null
+++ b/include/qemu/throttle-options.h
@@ -0,0 +1,92 @@
+/*
+ * QEMU throttling command line options
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or
+ * (at your option) any later version.
+ *
+ * See the COPYING file in the top-level directory for details.
+ *
+ */
+#ifndef THROTTLE_OPTIONS_H
+#define THROTTLE_OPTIONS_H
+
+#define THROTTLE_OPTS \
+ { \
+ .name = "throttling.iops-total",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "limit total I/O operations per second",\
+ },{ \
+ .name = "throttling.iops-read",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "limit read operations per second",\
+ },{ \
+ .name = "throttling.iops-write",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "limit write operations per second",\
+ },{ \
+ .name = "throttling.bps-total",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "limit total bytes per second",\
+ },{ \
+ .name = "throttling.bps-read",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "limit read bytes per second",\
+ },{ \
+ .name = "throttling.bps-write",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "limit write bytes per second",\
+ },{ \
+ .name = "throttling.iops-total-max",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "I/O operations burst",\
+ },{ \
+ .name = "throttling.iops-read-max",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "I/O operations read burst",\
+ },{ \
+ .name = "throttling.iops-write-max",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "I/O operations write burst",\
+ },{ \
+ .name = "throttling.bps-total-max",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "total bytes burst",\
+ },{ \
+ .name = "throttling.bps-read-max",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "total bytes read burst",\
+ },{ \
+ .name = "throttling.bps-write-max",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "total bytes write burst",\
+ },{ \
+ .name = "throttling.iops-total-max-length",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "length of the iops-total-max burst period, in seconds",\
+ },{ \
+ .name = "throttling.iops-read-max-length",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "length of the iops-read-max burst period, in seconds",\
+ },{ \
+ .name = "throttling.iops-write-max-length",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "length of the iops-write-max burst period, in seconds",\
+ },{ \
+ .name = "throttling.bps-total-max-length",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "length of the bps-total-max burst period, in seconds",\
+ },{ \
+ .name = "throttling.bps-read-max-length",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "length of the bps-read-max burst period, in seconds",\
+ },{ \
+ .name = "throttling.bps-write-max-length",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "length of the bps-write-max burst period, in seconds",\
+ },{ \
+ .name = "throttling.iops-size",\
+ .type = QEMU_OPT_NUMBER,\
+ .help = "when limiting by iops max size of an I/O in bytes",\
+ }
+
+#endif