105 lines
3.5 KiB
Diff
105 lines
3.5 KiB
Diff
|
|
From a88f2d12afb6a6b5b3d97983cea95d6088f0bf04 Mon Sep 17 00:00:00 2001
|
||
|
|
From: lixianglai <lixianglai@loongson.cn>
|
||
|
|
Date: Tue, 7 Feb 2023 07:21:17 -0500
|
||
|
|
Subject: [PATCH] Add command line.
|
||
|
|
|
||
|
|
Add loongarch command support.
|
||
|
|
|
||
|
|
Signed-off-by: lixianglai <lixianglai@loongson.cn>
|
||
|
|
---
|
||
|
|
include/sysemu/arch_init.h | 1 +
|
||
|
|
qapi/machine-target.json | 6 ++++--
|
||
|
|
qapi/machine.json | 2 +-
|
||
|
|
qapi/misc-target.json | 1 +
|
||
|
|
qemu-options.hx | 2 +-
|
||
|
|
softmmu/qdev-monitor.c | 2 +-
|
||
|
|
6 files changed, 9 insertions(+), 5 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h
|
||
|
|
index 1cf27baa7c..0907b92cd1 100644
|
||
|
|
--- a/include/sysemu/arch_init.h
|
||
|
|
+++ b/include/sysemu/arch_init.h
|
||
|
|
@@ -25,6 +25,7 @@ enum {
|
||
|
|
QEMU_ARCH_AVR = (1 << 21),
|
||
|
|
QEMU_ARCH_HEXAGON = (1 << 22),
|
||
|
|
QEMU_ARCH_SW64 = (1 << 23),
|
||
|
|
+ QEMU_ARCH_LOONGARCH64 = (1 << 24),
|
||
|
|
};
|
||
|
|
|
||
|
|
extern const uint32_t arch_type;
|
||
|
|
diff --git a/qapi/machine-target.json b/qapi/machine-target.json
|
||
|
|
index f5ec4bc172..682dc86b42 100644
|
||
|
|
--- a/qapi/machine-target.json
|
||
|
|
+++ b/qapi/machine-target.json
|
||
|
|
@@ -324,7 +324,8 @@
|
||
|
|
'TARGET_ARM',
|
||
|
|
'TARGET_I386',
|
||
|
|
'TARGET_S390X',
|
||
|
|
- 'TARGET_MIPS' ] } }
|
||
|
|
+ 'TARGET_MIPS',
|
||
|
|
+ 'TARGET_LOONGARCH64' ] } }
|
||
|
|
|
||
|
|
##
|
||
|
|
# @query-cpu-definitions:
|
||
|
|
@@ -340,4 +341,5 @@
|
||
|
|
'TARGET_ARM',
|
||
|
|
'TARGET_I386',
|
||
|
|
'TARGET_S390X',
|
||
|
|
- 'TARGET_MIPS' ] } }
|
||
|
|
+ 'TARGET_MIPS',
|
||
|
|
+ 'TARGET_LOONGARCH64' ] } }
|
||
|
|
diff --git a/qapi/machine.json b/qapi/machine.json
|
||
|
|
index 03cfb268a4..31b0350b99 100644
|
||
|
|
--- a/qapi/machine.json
|
||
|
|
+++ b/qapi/machine.json
|
||
|
|
@@ -34,7 +34,7 @@
|
||
|
|
'mips64el', 'mipsel', 'nios2', 'or1k', 'ppc',
|
||
|
|
'ppc64', 'riscv32', 'riscv64', 'rx', 's390x', 'sh4',
|
||
|
|
'sh4eb', 'sparc', 'sparc64', 'tricore',
|
||
|
|
- 'x86_64', 'xtensa', 'xtensaeb' ] }
|
||
|
|
+ 'x86_64', 'xtensa', 'xtensaeb', 'loongarch64' ] }
|
||
|
|
|
||
|
|
##
|
||
|
|
# @CpuS390State:
|
||
|
|
diff --git a/qapi/misc-target.json b/qapi/misc-target.json
|
||
|
|
index 4bc45d2474..63cebef573 100644
|
||
|
|
--- a/qapi/misc-target.json
|
||
|
|
+++ b/qapi/misc-target.json
|
||
|
|
@@ -33,6 +33,7 @@
|
||
|
|
'TARGET_PPC64',
|
||
|
|
'TARGET_S390X',
|
||
|
|
'TARGET_SH4',
|
||
|
|
+ 'TARGET_LOONGARCH64',
|
||
|
|
'TARGET_SPARC' ] } }
|
||
|
|
|
||
|
|
##
|
||
|
|
diff --git a/qemu-options.hx b/qemu-options.hx
|
||
|
|
index 047d28a357..e62bb6bebd 100644
|
||
|
|
--- a/qemu-options.hx
|
||
|
|
+++ b/qemu-options.hx
|
||
|
|
@@ -2533,7 +2533,7 @@ DEF("smbios", HAS_ARG, QEMU_OPTION_smbios,
|
||
|
|
" specify SMBIOS type 17 fields\n"
|
||
|
|
"-smbios type=41[,designation=str][,kind=str][,instance=%d][,pcidev=str]\n"
|
||
|
|
" specify SMBIOS type 41 fields\n",
|
||
|
|
- QEMU_ARCH_I386 | QEMU_ARCH_ARM)
|
||
|
|
+ QEMU_ARCH_I386 | QEMU_ARCH_ARM | QEMU_ARCH_LOONGARCH64)
|
||
|
|
SRST
|
||
|
|
``-smbios file=binary``
|
||
|
|
Load SMBIOS entry from binary file.
|
||
|
|
diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c
|
||
|
|
index 142352b24e..4ca4e92ce2 100644
|
||
|
|
--- a/softmmu/qdev-monitor.c
|
||
|
|
+++ b/softmmu/qdev-monitor.c
|
||
|
|
@@ -62,7 +62,7 @@ typedef struct QDevAlias
|
||
|
|
QEMU_ARCH_MIPS | QEMU_ARCH_PPC | \
|
||
|
|
QEMU_ARCH_RISCV | QEMU_ARCH_SH4 | \
|
||
|
|
QEMU_ARCH_SPARC | QEMU_ARCH_XTENSA | \
|
||
|
|
- QEMU_ARCH_SW64)
|
||
|
|
+ QEMU_ARCH_SW64 | QEMU_ARCH_LOONGARCH64)
|
||
|
|
#define QEMU_ARCH_VIRTIO_CCW (QEMU_ARCH_S390X)
|
||
|
|
#define QEMU_ARCH_VIRTIO_MMIO (QEMU_ARCH_M68K)
|
||
|
|
|
||
|
|
--
|
||
|
|
2.27.0
|
||
|
|
|