aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2017-01-18 23:01:46 +0100
committerRichard Henderson <rth@twiddle.net>2017-01-24 13:10:36 -0800
commite671711c9a8c1de540f035095e18458bc03968de (patch)
treeb747bd4b33d0e51cfb1cac14299b718aae2abae5
parentb78625648802a5a7eef5a5f848250a52503a81aa (diff)
downloadqemu-e671711c9a8c1de540f035095e18458bc03968de.zip
qemu-e671711c9a8c1de540f035095e18458bc03968de.tar.gz
qemu-e671711c9a8c1de540f035095e18458bc03968de.tar.bz2
nios2: Add support for Nios-II R1
Add remaining bits of the Altera NiosII R1 support into qemu, which is documentation, MAINTAINERS file entry, configure bits, arch_init and configuration files for both linux-user (userland binaries) and softmmu (hardware emulation). Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chris Wulff <crwulff@gmail.com> Cc: Jeff Da Silva <jdasilva@altera.com> Cc: Ley Foon Tan <lftan@altera.com> Cc: Sandra Loosemore <sandra@codesourcery.com> Cc: Yves Vandervennet <yvanderv@altera.com> Reviewed-by: Alexander Graf <agraf@suse.de> Message-Id: <20170118220146.489-8-marex@denx.de> Signed-off-by: Richard Henderson <rth@twiddle.net>
-rw-r--r--MAINTAINERS8
-rw-r--r--arch_init.c2
-rwxr-xr-xconfigure5
-rw-r--r--default-configs/nios2-linux-user.mak1
-rw-r--r--default-configs/nios2-softmmu.mak6
-rw-r--r--include/sysemu/arch_init.h1
-rw-r--r--qemu-doc.texi3
7 files changed, 26 insertions, 0 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 6a3df66..efc85e5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -187,6 +187,14 @@ F: disas/moxie.c
F: hw/moxie/
F: default-configs/moxie-softmmu.mak
+NiosII
+M: Chris Wulff <crwulff@gmail.com>
+M: Marek Vasut <marex@denx.de>
+S: Maintained
+F: target/nios2/
+F: hw/nios2/
+F: disas/nios2.c
+
OpenRISC
M: Jia Liu <proljc@gmail.com>
S: Maintained
diff --git a/arch_init.c b/arch_init.c
index c316ae1..0810116 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -63,6 +63,8 @@ int graphic_depth = 32;
#define QEMU_ARCH QEMU_ARCH_MIPS
#elif defined(TARGET_MOXIE)
#define QEMU_ARCH QEMU_ARCH_MOXIE
+#elif defined(TARGET_NIOS2)
+#define QEMU_ARCH QEMU_ARCH_NIOS2
#elif defined(TARGET_OPENRISC)
#define QEMU_ARCH QEMU_ARCH_OPENRISC
#elif defined(TARGET_PPC)
diff --git a/configure b/configure
index 1004ef5..86fd833 100755
--- a/configure
+++ b/configure
@@ -5935,6 +5935,8 @@ case "$target_name" in
;;
moxie)
;;
+ nios2)
+ ;;
or32)
TARGET_ARCH=openrisc
TARGET_BASE_ARCH=openrisc
@@ -6140,6 +6142,9 @@ for i in $ARCH $TARGET_BASE_ARCH ; do
moxie*)
disas_config "MOXIE"
;;
+ nios2)
+ disas_config "NIOS2"
+ ;;
or32)
disas_config "OPENRISC"
;;
diff --git a/default-configs/nios2-linux-user.mak b/default-configs/nios2-linux-user.mak
new file mode 100644
index 0000000..5be3eb7
--- /dev/null
+++ b/default-configs/nios2-linux-user.mak
@@ -0,0 +1 @@
+# Default configuration for nios2-linux-user
diff --git a/default-configs/nios2-softmmu.mak b/default-configs/nios2-softmmu.mak
new file mode 100644
index 0000000..74dc70c
--- /dev/null
+++ b/default-configs/nios2-softmmu.mak
@@ -0,0 +1,6 @@
+# Default configuration for nios2-softmmu
+
+CONFIG_NIOS2=y
+CONFIG_SERIAL=y
+CONFIG_PTIMER=y
+CONFIG_ALTERA_TIMER=y
diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h
index 20b01e3..2bf16b2 100644
--- a/include/sysemu/arch_init.h
+++ b/include/sysemu/arch_init.h
@@ -23,6 +23,7 @@ enum {
QEMU_ARCH_UNICORE32 = (1 << 14),
QEMU_ARCH_MOXIE = (1 << 15),
QEMU_ARCH_TRICORE = (1 << 16),
+ QEMU_ARCH_NIOS2 = (1 << 17),
};
extern const uint32_t arch_type;
diff --git a/qemu-doc.texi b/qemu-doc.texi
index 0b2746f..fe7b69b 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -2901,6 +2901,9 @@ The binary format is detected automatically.
@command{qemu-mips} TODO.
@command{qemu-mipsel} TODO.
+@cindex user mode (NiosII)
+@command{qemu-nios2} TODO.
+
@cindex user mode (PowerPC)
@command{qemu-ppc64abi32} TODO.
@command{qemu-ppc64} TODO.