• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisión0df5af77c934be4e0e76fadee7049537f0191f05 (tree)
Tiempo2019-08-17 01:18:56
AutorPhilippe Mathieu-Daudé <philmd@redh...>
CommiterYoshinori Sato

Log Message

hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core

While the VIRT machine can use different microcontrollers,
the RX62N microcontroller is tied to the RX62N CPU core.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Cambiar Resumen

Diferencia incremental

--- a/hw/rx/rx-virt.c
+++ b/hw/rx/rx-virt.c
@@ -17,6 +17,7 @@
1717 */
1818
1919 #include "qemu/osdep.h"
20+#include "qemu/error-report.h"
2021 #include "qapi/error.h"
2122 #include "qemu-common.h"
2223 #include "cpu.h"
@@ -56,6 +57,7 @@ static void rx_load_image(RXCPU *cpu, const char *filename,
5657
5758 static void rxvirt_init(MachineState *machine)
5859 {
60+ MachineClass *mc = MACHINE_GET_CLASS(machine);
5961 RX62NState *s = g_new(RX62NState, 1);
6062 MemoryRegion *sysmem = get_system_memory();
6163 MemoryRegion *sdram = g_new(MemoryRegion, 1);
@@ -64,6 +66,12 @@ static void rxvirt_init(MachineState *machine)
6466 void *dtb = NULL;
6567 int dtb_size;
6668
69+ if (strcmp(machine->cpu_type, mc->default_cpu_type) != 0) {
70+ error_report("This board can only be used with CPU %s",
71+ mc->default_cpu_type);
72+ exit(1);
73+ }
74+
6775 /* Allocate memory space */
6876 memory_region_init_ram(sdram, NULL, "sdram", 16 * MiB,
6977 &error_fatal);