[PATCH 26/27] arcv3: board changes

cupertinomiranda at gmail.com cupertinomiranda at gmail.com
Mon Apr 5 15:31:37 BST 2021


From: Cupertino Miranda <cmiranda at synopsys.com>

---
 hw/arc/boot.c | 1 +
 hw/arc/virt.c | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/hw/arc/boot.c b/hw/arc/boot.c
index 962fc03b03..0af559e44b 100644
--- a/hw/arc/boot.c
+++ b/hw/arc/boot.c
@@ -69,6 +69,7 @@ void arc_load_kernel(ARCCPU *cpu, struct arc_boot_info *info)
     }
 
     elf_machine = cpu->family > 2 ? EM_ARC_COMPACT2 : EM_ARC_COMPACT;
+    elf_machine = (cpu->family & ARC_OPCODE_V3_ALL) != 0 ? EM_ARC_COMPACT3_64 : elf_machine;
     kernel_size = load_elf(info->kernel_filename, NULL, NULL, NULL,
                            &entry, NULL, NULL, NULL, ARC_ENDIANNESS_LE,
                            elf_machine, 1, 0);
diff --git a/hw/arc/virt.c b/hw/arc/virt.c
index 8f7d7cbd5d..e07fa5c123 100644
--- a/hw/arc/virt.c
+++ b/hw/arc/virt.c
@@ -120,7 +120,11 @@ static void virt_init(MachineState *machine)
     boot_info.kernel_cmdline = machine->kernel_cmdline;
 
     for (n = 0; n < smp_cpus; n++) {
+#ifdef TARGET_ARCV2
         cpu = ARC_CPU(cpu_create("archs-" TYPE_ARC_CPU));
+#else
+        cpu = ARC_CPU(cpu_create("arc64-" TYPE_ARC_CPU));
+#endif
         if (cpu == NULL) {
             fprintf(stderr, "Unable to find CPU definition!\n");
             exit(1);
-- 
2.20.1




More information about the linux-snps-arc mailing list