[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v19 16/21] hw/rx: Restrict the RX62N microcontroller
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [PATCH v19 16/21] hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core |
Date: |
Tue, 11 Jun 2019 13:37:26 +0200 |
While the VIRT machine can use different microcontrollers,
the RX62N microcontroller is tied to the RX62N CPU core.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/rx/rx-virt.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/rx/rx-virt.c b/hw/rx/rx-virt.c
index ed0a3a1da0..797a090173 100644
--- a/hw/rx/rx-virt.c
+++ b/hw/rx/rx-virt.c
@@ -17,6 +17,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/error-report.h"
#include "qapi/error.h"
#include "qemu-common.h"
#include "cpu.h"
@@ -34,6 +35,7 @@
static void rxvirt_init(MachineState *machine)
{
+ MachineClass *mc = MACHINE_GET_CLASS(machine);
RX62NState *s = g_new(RX62NState, 1);
MemoryRegion *sysmem = get_system_memory();
MemoryRegion *sdram = g_new(MemoryRegion, 1);
@@ -42,6 +44,12 @@ static void rxvirt_init(MachineState *machine)
void *dtb = NULL;
int dtb_size;
+ if (strcmp(machine->cpu_type, mc->default_cpu_type) != 0) {
+ error_report("This board can only be used with CPU %s",
+ mc->default_cpu_type);
+ exit(1);
+ }
+
/* Allocate memory space */
memory_region_init_ram(sdram, NULL, "sdram", 16 * MiB,
&error_fatal);
--
2.20.1
- [Qemu-devel] [PATCH v19 00/21] Add RX archtecture support, Philippe Mathieu-Daudé, 2019/06/11
- [Qemu-devel] [PATCH v19 20/21] MAINTAINERS: Add RX, Philippe Mathieu-Daudé, 2019/06/11
- [Qemu-devel] [PATCH v19 21/21] BootLinuxConsoleTest: Test the RX-Virt machine, Philippe Mathieu-Daudé, 2019/06/11
- [Qemu-devel] [PATCH v19 14/21] hw/rx: RX Target hardware definition, Philippe Mathieu-Daudé, 2019/06/11
- [Qemu-devel] [PATCH v19 19/21] Add rx-softmmu, Philippe Mathieu-Daudé, 2019/06/11
- [Qemu-devel] [PATCH v19 16/21] hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH v19 18/21] hw/registerfields.h: Add 8bit and 16bit register macros, Philippe Mathieu-Daudé, 2019/06/11
- [Qemu-devel] [PATCH v19 13/21] hw/char: RX62N serial communication interface (SCI), Philippe Mathieu-Daudé, 2019/06/11
- [Qemu-devel] [PATCH v19 08/21] target/rx: Emit all disassembly in one prt(), Philippe Mathieu-Daudé, 2019/06/11
- [Qemu-devel] [PATCH v19 01/21] target/rx: TCG translation, Philippe Mathieu-Daudé, 2019/06/11
- [Qemu-devel] [PATCH v19 04/21] target/rx: RX disassembler, Philippe Mathieu-Daudé, 2019/06/11
- [Qemu-devel] [PATCH v19 06/21] target/rx: Replace operand with prt_ldmi in disassembler, Philippe Mathieu-Daudé, 2019/06/11
- [Qemu-devel] [PATCH v19 17/21] qemu/bitops.h: Add extract8 and extract16, Philippe Mathieu-Daudé, 2019/06/11
- [Qemu-devel] [PATCH v19 15/21] hw/rx: Honor -accel qtest, Philippe Mathieu-Daudé, 2019/06/11
- [Qemu-devel] [PATCH v19 12/21] hw/timer: RX62N internal timer modules, Philippe Mathieu-Daudé, 2019/06/11