Skip to contentSkip to conversation

NiosII: Add support for the Altera NiosII soft-core CPU.

PATCH New [email protected] 1 participant 1 message Sep 10, 2012 2 messages not in the archive

lore
Share & tools
lore
#2 lore raw

PATCH 1/9 NiosII: Add support for the Altera NiosII soft-core CPU.

In reply to a message not in the archive

From: Chris Wulff <[email protected]>

---
 target-nios2/Makefile.objs |    5 +
 target-nios2/altera_iic.c  |  100 +++
 target-nios2/cpu-qom.h     |   69 +++
 target-nios2/cpu.c         |   83 +++
 target-nios2/cpu.h         |  259 ++++++++
 target-nios2/exec.h        |   60 ++
 target-nios2/helper.c      |  291 +++++++++
 target-nios2/helper.h      |   45 ++
 target-nios2/instruction.c | 1463 ++++++++++++++++++++++++++++++++++++++++++++
 target-nios2/instruction.h |  290 +++++++++
 target-nios2/machine.c     |   33 +
 target-nios2/mmu.c         |  273 +++++++++
 target-nios2/mmu.h         |   49 ++
 target-nios2/op_helper.c   |  125 ++++
 target-nios2/translate.c   |  252 ++++++++
 15 files changed, 3397 insertions(+)
 create mode 100644 target-nios2/Makefile.objs
 create mode 100644 target-nios2/altera_iic.c
 create mode 100644 target-nios2/cpu-qom.h
 create mode 100644 target-nios2/cpu.c
 create mode 100644 target-nios2/cpu.h
 create mode 100644 target-nios2/exec.h
 create mode 100644 target-nios2/helper.c
 create mode 100644 target-nios2/helper.h
 create mode 100644 target-nios2/instruction.c
 create mode 100644 target-nios2/instruction.h
 create mode 100644 target-nios2/machine.c
 create mode 100644 target-nios2/mmu.c
 create mode 100644 target-nios2/mmu.h
 create mode 100644 target-nios2/op_helper.c
 create mode 100644 target-nios2/translate.c
target-nios2/Makefile.objs new file +5 -0
new file mode 100644
index 0000000..d072795
@@ -0,0 +1,5 @@
+obj-y += translate.o op_helper.o helper.o cpu.o instruction.o
+obj-$(CONFIG_SOFTMMU) += mmu.o machine.o
+obj-y += altera_iic.o
+
+$(obj)/op_helper.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
target-nios2/altera_iic.c new file +100 -0

100 lines not on this page · raw message

target-nios2/cpu-qom.h new file +69 -0

69 lines not on this page · raw message

target-nios2/cpu.c new file +83 -0

83 lines not on this page · raw message

target-nios2/cpu.h new file +259 -0

259 lines not on this page · raw message

target-nios2/exec.h new file +60 -0

60 lines not on this page · raw message

target-nios2/helper.c new file +291 -0

291 lines not on this page · raw message

target-nios2/helper.h new file +45 -0

45 lines not on this page · raw message

target-nios2/instruction.c new file +1463 -0

1,463 lines not on this page · raw message

target-nios2/instruction.h new file +290 -0

290 lines not on this page · raw message

target-nios2/machine.c new file +33 -0
new file mode 100644
index 0000000..09198db
@@ -0,0 +1,33 @@
+/*
+ * Altera Nios II MMU emulation for qemu.
+ *
+ * Copyright (C) 2012 Chris Wulff <[email protected]>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see
+ * <http://www.gnu.org/licenses/lgpl-2.1.html>
+ */
+
+#include "hw/hw.h"
+#include "hw/boards.h"
+
+void cpu_save(QEMUFile *f, void *opaque)
+{
+    /* TODO */
+}
+
+int cpu_load(QEMUFile *f, void *opaque, int version_id)
+{
+    /* TODO */
+    return 0;
+}
target-nios2/mmu.c new file +273 -0

273 lines not on this page · raw message

target-nios2/mmu.h new file +49 -0

29 lines not on this page · raw message

target-nios2/op_helper.c new file +125 -0

125 lines not on this page · raw message

target-nios2/translate.c new file +252 -0

252 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.9.5

Part of the diff is not shown here. View the raw message.