summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2006-10-19 12:27:15 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2006-10-19 12:27:15 +0000
commit8a5810d034fd1a574c225256a1d8e60d876283b9 (patch)
tree6292da0cc29c5730581aff7850adcc742b240194
parentRemove (Unused) (diff)
downloadrtems-8a5810d034fd1a574c225256a1d8e60d876283b9.tar.bz2
Remove.
-rw-r--r--c/src/lib/libbsp/nios2/.cvsignore14
-rw-r--r--c/src/lib/libbsp/nios2/ChangeLog117
-rw-r--r--c/src/lib/libbsp/nios2/Makefile.am11
-rw-r--r--c/src/lib/libbsp/nios2/README79
-rw-r--r--c/src/lib/libbsp/nios2/acinclude.m410
-rw-r--r--c/src/lib/libbsp/nios2/configure.ac21
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/.cvsignore14
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/ChangeLog12
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/Makefile.am121
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/bsp_specs27
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c54
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/configure.ac20
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/console/console.c264
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/include/bsp.h173
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/include/bspopts.h.in16
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/include/coverhd.h106
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/include/tm27.h32
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/nios2_iss.ptf1800
-rwxr-xr-xc/src/lib/libbsp/nios2/nios2_iss/nios2_iss.sh6
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/shmsupp/addrconv.c30
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/shmsupp/getcfg.c75
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/shmsupp/lock.c84
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/shmsupp/mpisr.c46
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/start/crtnn.s45
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/start/start.S124
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/startup/bspclean.c31
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/startup/bspstart.c143
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/startup/linkcmds331
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/startup/main.c39
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/startup/setvec.c44
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c151
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/times194
-rw-r--r--c/src/lib/libcpu/nios2/.cvsignore14
-rw-r--r--c/src/lib/libcpu/nios2/ChangeLog4
-rw-r--r--c/src/lib/libcpu/nios2/Makefile.am34
-rw-r--r--c/src/lib/libcpu/nios2/configure.ac33
-rw-r--r--c/src/lib/libcpu/nios2/preinstall.am26
-rw-r--r--c/src/lib/libcpu/nios2/shared/cache/cache.c67
-rw-r--r--c/src/lib/libcpu/nios2/shared/cache/cache_.h34
-rw-r--r--c/src/lib/libcpu/nios2/shared/misc/memcpy.c21
-rw-r--r--cpukit/score/cpu/nios2/.cvsignore2
-rw-r--r--cpukit/score/cpu/nios2/ChangeLog18
-rw-r--r--cpukit/score/cpu/nios2/Makefile.am25
-rw-r--r--cpukit/score/cpu/nios2/cpu.c197
-rw-r--r--cpukit/score/cpu/nios2/cpu_asm.S388
-rw-r--r--cpukit/score/cpu/nios2/irq.c94
-rw-r--r--cpukit/score/cpu/nios2/preinstall.am43
-rw-r--r--cpukit/score/cpu/nios2/rtems/asm.h97
-rw-r--r--cpukit/score/cpu/nios2/rtems/score/cpu.h1404
-rw-r--r--cpukit/score/cpu/nios2/rtems/score/cpu_asm.h74
-rw-r--r--cpukit/score/cpu/nios2/rtems/score/nios2.h62
-rw-r--r--cpukit/score/cpu/nios2/rtems/score/types.h54
-rw-r--r--tools/cpu/nios2/.cvsignore14
-rw-r--r--tools/cpu/nios2/ChangeLog22
-rw-r--r--tools/cpu/nios2/Makefile.am25
-rw-r--r--tools/cpu/nios2/README148
-rw-r--r--tools/cpu/nios2/bridges.c114
-rw-r--r--tools/cpu/nios2/bridges.h31
-rw-r--r--tools/cpu/nios2/clocks.c77
-rw-r--r--tools/cpu/nios2/clocks.h28
-rw-r--r--tools/cpu/nios2/configure.ac23
-rw-r--r--tools/cpu/nios2/devices.c132
-rw-r--r--tools/cpu/nios2/devices.h32
-rw-r--r--tools/cpu/nios2/linkcmds.c122
-rw-r--r--tools/cpu/nios2/linkcmds.h25
-rw-r--r--tools/cpu/nios2/memory.c104
-rw-r--r--tools/cpu/nios2/memory.h29
-rw-r--r--tools/cpu/nios2/nios2gen.c496
-rw-r--r--tools/cpu/nios2/output.c195
-rw-r--r--tools/cpu/nios2/output.h27
-rw-r--r--tools/cpu/nios2/ptf.c853
-rw-r--r--tools/cpu/nios2/ptf.h71
-rw-r--r--tools/cpu/nios2/sample.ptf462
73 files changed, 0 insertions, 9955 deletions
diff --git a/c/src/lib/libbsp/nios2/.cvsignore b/c/src/lib/libbsp/nios2/.cvsignore
deleted file mode 100644
index bfdfd995be..0000000000
--- a/c/src/lib/libbsp/nios2/.cvsignore
+++ /dev/null
@@ -1,14 +0,0 @@
-aclocal.m4
-autom4te*.cache
-config.cache
-config.guess
-config.log
-config.status
-config.sub
-configure
-depcomp
-install-sh
-Makefile
-Makefile.in
-missing
-mkinstalldirs
diff --git a/c/src/lib/libbsp/nios2/ChangeLog b/c/src/lib/libbsp/nios2/ChangeLog
deleted file mode 100644
index a266b9e955..0000000000
--- a/c/src/lib/libbsp/nios2/ChangeLog
+++ /dev/null
@@ -1,117 +0,0 @@
-2006-09-11 Chris Johns <chrisj@rtems.org>
-
- * nios2_iss/start/crtnn.s: Remove extra CRLF.
-
-2006-08-10 Joel Sherrill <joel@OARcorp.com>
-
- * .cvsignore: New file.
-
-2006-08-09 Kolja Waschk <waschk@telos.de>
-
- * ChangeLog, Makefile.am, README, acinclude.m4, configure.ac,
- nios2_iss/ChangeLog, nios2_iss/Makefile.am, nios2_iss/bsp_specs,
- nios2_iss/configure.ac, nios2_iss/nios2_iss.ptf,
- nios2_iss/nios2_iss.sh, nios2_iss/times, nios2_iss/console/console.c,
- nios2_iss/include/bsp.h, nios2_iss/include/bspopts.h.in,
- nios2_iss/include/coverhd.h, nios2_iss/include/tm27.h,
- nios2_iss/shmsupp/addrconv.c, nios2_iss/shmsupp/getcfg.c,
- nios2_iss/shmsupp/lock.c, nios2_iss/shmsupp/mpisr.c,
- nios2_iss/start/crtnn.s, nios2_iss/start/start.S,
- nios2_iss/startup/bspclean.c, nios2_iss/startup/bspstart.c,
- nios2_iss/startup/linkcmds, nios2_iss/startup/main.c,
- nios2_iss/startup/setvec.c, nios2_iss/timer/timer.c: New files.
-
-2004-09-24 Ralf Corsepius <ralf_corsepius@rtems.org>
-
- * configure.ac: Require automake > 1.9.
-
-2004-02-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * acinclude.m4: Regenerate.
-
-2004-02-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * configure.ac: RTEMS_CHECK_BSPDIR([$RTEMS_BSP_FAMILY]).
-
-2004-01-13 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * Makefile.am: Use @RTEMS_BSP_FAMILY@ instead of
- $(RTEMS_BSP_FAMILY).
-
-2003-12-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * configure.ac: Require automake >= 1.8, autoconf >= 2.59.
-
-2003-10-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * acinclude.m4: Reflect changes to bootstrap.
- * configure.ac: Remove RTEMS_CHECK_CUSTON_BSP.
-
-2003-08-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * Makefile.am: Reflect having moved aclocal/.
-
-2003-08-16 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * Makefile.am: Reflect having moved automake/.
-
-2003-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * configure.ac: Use rtems-bugs@rtems.com as bug report email address.
-
-2003-03-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * configure.ac: Remove AC_CONFIG_AUX_DIR.
-
-2003-02-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * configure.ac: AM_INIT_AUTOMAKE([1.7.2]).
-
-2003-02-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * configure.ac: AC_PREREQ(2.57).
-
-2002-12-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * configure.ac: Remove RTEMS_CHECK_BSP_CACHE.
-
-2002-10-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * .cvsignore: Reformat.
- Add autom4te*cache.
- Remove autom4te.cache.
-
-2002-03-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * configure.ac:
- AC_INIT(package,_RTEMS_VERSION,_RTEMS_BUGS).
- AM_INIT_AUTOMAKE([no-define foreign 1.6]).
- * Makefile.am: Remove AUTOMAKE_OPTIONS.
-
-2001-10-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * .cvsignore: Add autom4te.cache for autoconf > 2.52.
- * configure.in: Remove.
- * configure.ac: New file, generated from configure.in by autoupdate.
-
-2001-10-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * acinclude.m4: New file.
- * configure.in: Use RTEMS_BSP_SUBDIR.
-
-2000-11-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * Makefile.am: Use ... instead of RTEMS_TOPdir in ACLOCAL_AMFLAGS.
-
-2000-11-02 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * Makefile.am: Switch to ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal.
-
-2000-10-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * Makefile.am: ACLOCAL_AMFLAGS= -I $(RTEMS_TOPdir)/macros.
- Switch to GNU canonicalization.
-
-2000-08-10 Joel Sherrill <joel@OARcorp.com>
-
- * ChangeLog: New file.
diff --git a/c/src/lib/libbsp/nios2/Makefile.am b/c/src/lib/libbsp/nios2/Makefile.am
deleted file mode 100644
index e60a8966ac..0000000000
--- a/c/src/lib/libbsp/nios2/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-##
-## $Id$
-##
-
-ACLOCAL_AMFLAGS = -I ../../../aclocal
-
-# Descend into the @RTEMS_BSP_FAMILY@ directory
-SUBDIRS = @RTEMS_BSP_FAMILY@
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/lib/libbsp/nios2/README b/c/src/lib/libbsp/nios2/README
deleted file mode 100644
index d427bb2266..0000000000
--- a/c/src/lib/libbsp/nios2/README
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-# $Id$
-#
-# Goal is to have BSPs build almost completely automatically from a template
-# and information that comes from SOPC Builder as a .PTF file. Most of the
-# code will go to a shared/ BSP directory.
-#
-# Ideally, updates to the PTF shouldn't cause any pain for the maintainer
-# of a specific BSP (possibly with enhancements not covered by the
-# automatic BSP creation).
-#
-# Some first steps toward utilizing SOPC Builder PTF output can be found
-# in top level /tools/cpu/nios2. Also see the README there.
-#
-# Implemented (in shared/ subdirectory)
-# Clock driver
-# Timer driver
-# Console via JTAG UART
-#
-# Todo;
-# Support more peripherals. My priorities:
-# - (improve) Altera Avalon JTAG UART
-# - Altera Avalon UART
-# - OpenCores.org I2C Master
-# - Altera SPI Core / EPCS Configuration Device
-# - OpenCores.org 10/100 Ethernet MAC (use existing driver)
-# - (more) Altera Avalon Timer
-#
-# Put all drivers aside in a shared/ subdirectory.
-# Update the "times" file for NIOS2 with and without icache.
-#
-# Missing (although it looks like it's there)
-# Data cache handling (for now, don't use the "fast" NIOS2)
-# SHM support (just taken over the code from no_cpu/no_bsp)
-#
-# Kolja Waschk, 6/2006
-#
-
-BSP NAME: nios2_eb2_1
-BOARD: Altera Instruction Set Simulator Default plus second timer
-BUS: Avalon
-CPU FAMILY: nios2
-CPU: small
-COPROCESSORS: none
-MODE: 32 bit mode
-
-DEBUG MONITOR: none
-
-PERIPHERALS
-===========
-TIMERS: Altera Avalon Timer
- RESOLUTION: .0001 microseconds
-SERIAL PORTS: Altera Avalon JTAG UART
-REAL-TIME CLOCK: none
-DMA: none
-VIDEO: none
-SCSI: none
-NETWORKING: none
-
-DRIVER INFORMATION
-==================
-CLOCK DRIVER: Altera Avalon Timer
-IOSUPP DRIVER: none
-SHMSUPP: polled
-TIMER DRIVER: Altera Avalon Timer
-TTY DRIVER: none
-
-STDIO
-=====
-PORT: Console port 0
-ELECTRICAL: JTAG
-BAUD: 115200
-BITS PER CHARACTER: 8
-PARITY: None
-STOP BITS: 1
-
-NOTES
-=====
-
diff --git a/c/src/lib/libbsp/nios2/acinclude.m4 b/c/src/lib/libbsp/nios2/acinclude.m4
deleted file mode 100644
index 153d18b51c..0000000000
--- a/c/src/lib/libbsp/nios2/acinclude.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-# RTEMS_CHECK_BSPDIR(RTEMS_BSP_FAMILY)
-AC_DEFUN([RTEMS_CHECK_BSPDIR],
-[
- case "$1" in
- nios2_iss )
- AC_CONFIG_SUBDIRS([nios2_iss]);;
- *)
- AC_MSG_ERROR([Invalid BSP]);;
- esac
-])
diff --git a/c/src/lib/libbsp/nios2/configure.ac b/c/src/lib/libbsp/nios2/configure.ac
deleted file mode 100644
index a008231d64..0000000000
--- a/c/src/lib/libbsp/nios2/configure.ac
+++ /dev/null
@@ -1,21 +0,0 @@
-## Process this file with autoconf to produce a configure script.
-##
-## $Id$
-
-AC_PREREQ(2.59)
-AC_INIT([rtems-c-src-lib-libbsp-nios2],[_RTEMS_VERSION],[rtems-bugs@rtems.com])
-AC_CONFIG_SRCDIR([nios2_iss])
-RTEMS_TOP(../../../../..)
-
-RTEMS_CANONICAL_TARGET_CPU
-AM_INIT_AUTOMAKE([no-define foreign 1.9])
-AM_MAINTAINER_MODE
-
-RTEMS_ENV_RTEMSBSP
-RTEMS_PROJECT_ROOT
-
-RTEMS_CHECK_BSPDIR([$RTEMS_BSP_FAMILY])
-
-# Explicitly list all Makefiles here
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/.cvsignore b/c/src/lib/libbsp/nios2/nios2_iss/.cvsignore
deleted file mode 100644
index bfdfd995be..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/.cvsignore
+++ /dev/null
@@ -1,14 +0,0 @@
-aclocal.m4
-autom4te*.cache
-config.cache
-config.guess
-config.log
-config.status
-config.sub
-configure
-depcomp
-install-sh
-Makefile
-Makefile.in
-missing
-mkinstalldirs
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog b/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog
deleted file mode 100644
index 6073f2ba03..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog
+++ /dev/null
@@ -1,12 +0,0 @@
-2006-08-10 Joel Sherrill <joel@OARcorp.com>
-
- * .cvsignore: New file.
-
-2006-08-09 Kolja Waschk <waschk@telos.de>
-
- * clock/clock.c: New file.
-
-2005-12-12 Kolja Waschk
-
- * derived from no_cpu BSP
-
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/Makefile.am b/c/src/lib/libbsp/nios2/nios2_iss/Makefile.am
deleted file mode 100644
index b51a4aeef1..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/Makefile.am
+++ /dev/null
@@ -1,121 +0,0 @@
-##
-## $Id$
-##
-
-ACLOCAL_AMFLAGS = -I ../../../../aclocal
-
-include $(top_srcdir)/../../../../automake/compile.am
-include $(top_srcdir)/../../bsp.am
-
-
-dist_project_lib_DATA = bsp_specs
-
-include_HEADERS = include/bsp.h
-include_HEADERS += include/tm27.h
-
-nodist_include_HEADERS = include/bspopts.h
-DISTCLEANFILES = include/bspopts.h
-
-noinst_PROGRAMS =
-
-include_HEADERS += include/coverhd.h
-
-EXTRA_DIST = start/start.S start/crtnn.s times
-crtnn.$(OBJEXT): start/crtnn.s
- $(CPPASCOMPILE) -DASM -o $@ -c $<
-start.$(OBJEXT): start/start.S
- $(CPPASCOMPILE) -DASM -o $@ -c $<
-project_lib_DATA = start.$(OBJEXT) crtnn.$(OBJEXT)
-
-dist_project_lib_DATA += startup/linkcmds
-
-noinst_PROGRAMS += clock.rel
-clock_rel_SOURCES = clock/clock.c
-clock_rel_CPPFLAGS = $(AM_CPPFLAGS)
-clock_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
-
-noinst_PROGRAMS += console.rel
-console_rel_SOURCES = console/console.c
-console_rel_CPPFLAGS = $(AM_CPPFLAGS)
-console_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
-
-if HAS_MP
-noinst_PROGRAMS += shmsupp.rel
-shmsupp_rel_SOURCES = shmsupp/addrconv.c shmsupp/getcfg.c shmsupp/lock.c \
- shmsupp/mpisr.c
-shmsupp_rel_CPPFLAGS = $(AM_CPPFLAGS)
-shmsupp_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
-endif
-
-noinst_PROGRAMS += startup.rel
-startup_rel_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
- ../../shared/bsppost.c startup/bspstart.c ../../shared/main.c \
- ../../shared/bootcard.c ../../shared/sbrk.c startup/setvec.c \
- ../../shared/gnatinstallhandler.c
-startup_rel_CPPFLAGS = $(AM_CPPFLAGS)
-startup_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
-
-noinst_PROGRAMS += timer.rel
-timer_rel_SOURCES = timer/timer.c
-timer_rel_CPPFLAGS = $(AM_CPPFLAGS)
-timer_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
-
-noinst_LIBRARIES = libbsp.a
-libbsp_a_SOURCES =
-libbsp_a_LIBADD = startup.rel clock.rel console.rel timer.rel
-if HAS_MP
-libbsp_a_LIBADD += shmsupp.rel
-endif
-
-all-local: $(PREINSTALL_FILES) $(TMPINSTALL_FILES)
-
-PREINSTALL_DIRS =
-PREINSTALL_FILES =
-TMPINSTALL_FILES =
-
-$(PROJECT_INCLUDE)/$(dirstamp):
- @$(mkdir_p) $(PROJECT_INCLUDE)
- @: > $(PROJECT_INCLUDE)/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
-
-$(PROJECT_LIB)/$(dirstamp):
- @$(mkdir_p) $(PROJECT_LIB)
- @: > $(PROJECT_LIB)/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
-
-$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
-PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
-
-$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
-
-$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
-
-$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
-
-$(PROJECT_INCLUDE)/coverhd.h: include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
-
-$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT)
-TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT)
-
-$(PROJECT_LIB)/crtnn.$(OBJEXT): crtnn.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_LIB)/crtnn.$(OBJEXT)
-TMPINSTALL_FILES += $(PROJECT_LIB)/crtnn.$(OBJEXT)
-
-$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
-PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
-
-CLEANFILES = $(PREINSTALL_FILES)
-DISTCLEANFILES += $(PREINSTALL_DIRS)
-
-include $(top_srcdir)/../../../../automake/local.am
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/bsp_specs b/c/src/lib/libbsp/nios2/nios2_iss/bsp_specs
deleted file mode 100644
index c460ce5502..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/bsp_specs
+++ /dev/null
@@ -1,27 +0,0 @@
-%rename cpp old_cpp
-%rename lib old_lib
-%rename endfile old_endfile
-%rename startfile old_startfile
-%rename link old_link
-
-*cpp:
-%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
-
-*lib:
-%{!qrtems: %(old_lib)} %{!nostdlib: %{qrtems: --start-group \
-%{!qrtems_debug: -lrtemsbsp -lrtemscpu} %{qrtems_debug: -lrtemsbsp_g -lrtemscpu_g} \
--lc -lgcc --end-group \
-%{!qnolinkcmds: -T linkcmds%s}}}
-
-*startfile:
-%{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems: \
-%{!qrtems_debug: start.o%s} \
-%{qrtems_debug: start_g.o%s} \
-crti.o%s crtbegin.o%s }}
-
-*link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
-
-*endfile:
-%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtnn.o%s}
-
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c b/c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c
deleted file mode 100644
index e676b7fa91..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/clock/clock.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Use SYS_CLK as system clock
- *
- * Copyright (c) 2005-2006 Kolja Waschk, rtemsdev/ixo.de
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <bsp.h>
-
-#define CLOCK_REGS ((altera_avalon_timer_regs*)NIOS2_IO_BASE(CLOCK_BASE))
-
-/*
- * Periodic interval timer interrupt handler
- */
-#define Clock_driver_support_at_tick() \
- do { CLOCK_REGS->status = 0; } while(0)
-
-/*
- * Attach clock interrupt handler
- */
-#define Clock_driver_support_install_isr(_new, _old) \
- do { _old = (rtems_isr_entry)set_vector(_new, CLOCK_VECTOR, 1); } while(0)
-
-
-/*
- * Turn off the clock
- */
-#define Clock_driver_support_shutdown_hardware() \
- do { CLOCK_REGS->control = ALTERA_AVALON_TIMER_CONTROL_STOP_MSK; } while(0)
-
-/*
- * Set up the clock hardware
- */
-void Clock_driver_support_initialize_hardware(void)
-{
- uint32_t period;
-
- CLOCK_REGS->control = ALTERA_AVALON_TIMER_CONTROL_STOP_MSK;
-
- period = (CLOCK_FREQ/1000000L)*BSP_Configuration.microseconds_per_tick - 1;
- CLOCK_REGS->period_hi = period >> 16;
- CLOCK_REGS->period_lo = period & 0xFFFF;
-
- CLOCK_REGS->control = ALTERA_AVALON_TIMER_CONTROL_ITO_MSK |
- ALTERA_AVALON_TIMER_CONTROL_CONT_MSK |
- ALTERA_AVALON_TIMER_CONTROL_START_MSK;
-
- NIOS2_IENABLE(1 << CLOCK_VECTOR);
-}
-
-#include "../../../shared/clockdrv_shell.c"
-
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/configure.ac b/c/src/lib/libbsp/nios2/nios2_iss/configure.ac
deleted file mode 100644
index 4562dc81d5..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/configure.ac
+++ /dev/null
@@ -1,20 +0,0 @@
-## Process this file with autoconf to produce a configure script.
-##
-## $Id$
-
-AC_PREREQ(2.59)
-AC_INIT([rtems-c-src-lib-libbsp-nios2-nios2_iss],[_RTEMS_VERSION],[rtems-bugs@rtems.com])
-AC_CONFIG_SRCDIR([bsp_specs])
-RTEMS_TOP(../../../../../..)
-
-RTEMS_CANONICAL_TARGET_CPU
-AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.9])
-RTEMS_BSP_CONFIGURE
-
-RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
-RTEMS_CANONICALIZE_TOOLS
-RTEMS_PROG_CCAS
-
-# Explicitly list all Makefiles here
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/console/console.c b/c/src/lib/libbsp/nios2/nios2_iss/console/console.c
deleted file mode 100644
index c0e572e550..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/console/console.c
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * This file implements simple console IO via JTAG UART.
- *
- * Based on no_cpu/console.c
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * Altera-specific code is
- * COPYRIGHT (c) 2005-2006 Kolja Waschk, rtemsdev/ixo.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#define NO_BSP_INIT
-
-#include <bsp.h>
-#include <rtems/libio.h>
-
-/* #define JTAG_UART_REGS ((altera_avalon_jtag_uart_regs*)NIOS2_IO_BASE(JTAG_UART_BASE)) */
-
-#if 0
-extern rtems_cpu_table Cpu_table; /* owned by BSP */
-
-#define XOFFchar 0x13
-#define XONchar 0x11
-#endif
-
-/* console_initialize
- *
- * This routine initializes the console IO driver.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * Return values:
- */
-
-rtems_device_driver console_initialize(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void *arg
-)
-{
- rtems_status_code status;
-
- status = rtems_io_register_name(
- "/dev/console",
- major,
- (rtems_device_minor_number) 0
- );
-
- if (status != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred(status);
-
- return RTEMS_SUCCESSFUL;
-}
-
-/* is_character_ready
- *
- * If a character is available, this routine reads it and stores
- * it in
- * reads the character and stores
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * Return values:
- */
-
-rtems_boolean is_character_ready(
- char *ch
-)
-{
- altera_avalon_jtag_uart_regs *ajur = NIOS2_IO_BASE(JTAG_UART_BASE);
- unsigned int data = ajur->data;
-
- if (data & ALTERA_AVALON_JTAG_UART_DATA_RVALID_MSK)
- {
- *ch = (data & ALTERA_AVALON_JTAG_UART_DATA_DATA_MSK)
- >> ALTERA_AVALON_JTAG_UART_DATA_DATA_OFST;
- return TRUE;
- };
-
- return FALSE;
-}
-
-/* inbyte
- *
- * This routine reads a character from the SOURCE.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * Return values:
- * character read from SOURCE
- */
-
-char inbyte( void )
-{
- /*
- * Wait until a character is available.
- */
- char ch;
- while(!is_character_ready(&ch));
- return ch;
-}
-
-/* outbyte
- *
- * This routine transmits a character out the SOURCE. It may support
- * XON/XOFF flow control.
- *
- * Input parameters:
- * ch - character to be transmitted
- *
- * Output parameters: NONE
- */
-
-void outbyte(
- char ch
-)
-{
- altera_avalon_jtag_uart_regs *ajur = NIOS2_IO_BASE(JTAG_UART_BASE);
- /*
- * Carriage Return/New line translation.
- */
-
- if ( ch == '\n' )
- outbyte( '\r' );
-
- /*
- * Wait for the transmitter to be ready.
- * Check for flow control requests and process.
- * Then output the character.
- */
-
- while ((ajur->control & ALTERA_AVALON_JTAG_UART_CONTROL_WSPACE_MSK) == 0);
-
-#if 0
- if (Cpu_table.serial_xon_xoff)
- {
- while (is_character_ready(&status))
- {
- if (status == XOFFchar)
- do
- {
- while (!is_character_ready(&status));
- }
- while (status != XONchar);
- }
- }
-#endif
-
- ajur->data = ch;
-}
-
-/*
- * Open entry point
- */
-
-rtems_device_driver console_open(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void * arg
-)
-{
- return RTEMS_SUCCESSFUL;
-}
-
-/*
- * Close entry point
- */
-
-rtems_device_driver console_close(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void * arg
-)
-{
- return RTEMS_SUCCESSFUL;
-}
-
-/*
- * read bytes from the serial port. We only have stdin.
- */
-
-rtems_device_driver console_read(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void * arg
-)
-{
- rtems_libio_rw_args_t *rw_args;
- char *buffer;
- int maximum;
- int count = 0;
-
- rw_args = (rtems_libio_rw_args_t *) arg;
-
- buffer = rw_args->buffer;
- maximum = rw_args->count;
-
- for (count = 0; count < maximum; count++) {
- buffer[ count ] = inbyte();
- if (buffer[ count ] == '\n' || buffer[ count ] == '\r') {
- buffer[ count++ ] = '\n';
- break;
- }
- }
-
- rw_args->bytes_moved = count;
- return (count >= 0) ? RTEMS_SUCCESSFUL : RTEMS_UNSATISFIED;
-}
-
-/*
- * write bytes to the serial port. Stdout and stderr are the same.
- */
-
-rtems_device_driver console_write(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void * arg
-)
-{
- int count;
- int maximum;
- rtems_libio_rw_args_t *rw_args;
- char *buffer;
-
- rw_args = (rtems_libio_rw_args_t *) arg;
-
- buffer = rw_args->buffer;
- maximum = rw_args->count;
-
- for (count = 0; count < maximum; count++) {
- if ( buffer[ count ] == '\n') {
- outbyte('\r');
- }
- outbyte( buffer[ count ] );
- }
-
- rw_args->bytes_moved = maximum;
- return 0;
-}
-
-/*
- * IO Control entry point
- */
-
-rtems_device_driver console_control(
- rtems_device_major_number major,
- rtems_device_minor_number minor,
- void * arg
-)
-{
- return RTEMS_SUCCESSFUL;
-}
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/include/bsp.h b/c/src/lib/libbsp/nios2/nios2_iss/include/bsp.h
deleted file mode 100644
index 8a1ea7e0f4..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/include/bsp.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/* bsp.h
- *
- * This include file contains all board IO definitions.
- *
- * XXX : put yours in here
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#ifndef _BSP_H
-#define _BSP_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <bspopts.h>
-
-#include <rtems.h>
-#include <rtems/console.h>
-#include <rtems/clockdrv.h>
-
-
-/*
- * confdefs.h overrides for this BSP:
- * - number of termios serial ports (defaults to 1)
- * - Interrupt stack space is not minimum if defined.
- */
-
-/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
-#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
-
-/*
- * Simple spin delay in microsecond units for device drivers.
- * This is very dependent on the clock speed of the target.
- */
-
-#define rtems_bsp_delay( microseconds ) \
- { \
- }
-
-/* ============================================ */
-
-/* SOPC-specific Constants */
-
-#define SYSTEM_BUS_WIDTH 32
-
-#define RAM_BASE 0
-#define RAM_BYTES 0x00800000
-
-#define JTAG_UART_BASE 0x08000000
-#define JTAG_UART_IRQ 2
-
-#define CLOCK_BASE 0x08001000
-#define CLOCK_FREQ 50000000
-#define CLOCK_VECTOR 1
-
-#define TIMER_BASE 0x08002000
-#define TIMER_FREQ 50000000
-#define TIMER_VECTOR 3
-
-/* ============================================ */
-
-#define NIOS2_BYPASS_CACHE ((uint32_t)0x80000000ul)
-#define NIOS2_IO_BASE(x) ( (void*) ((uint32_t)x | NIOS2_BYPASS_CACHE ) )
-#define NIOS2_IENABLE(x) do{ __builtin_wrctl(3,__builtin_rdctl(3)|x);}while(0)
-#define NIOS2_IRQ_ENABLE(x) do {__builtin_wrctl(3,__builtin_rdctl(3)|x);} while(0)
-
-/* ============================================ */
-/* TODO: Put this in an external header file */
-
-#ifndef SYSTEM_BUS_WIDTH
-#error SYSTEM_BUS_WIDTH is undefined
-#endif
-
-#if SYSTEM_BUS_WIDTH != 32
-#error Only SYSTEM_BUS_WIDTH 32 is supported
-#endif
-
-typedef struct
-{
- volatile uint32_t status;
- volatile uint32_t control;
- volatile uint32_t period_lo;
- volatile uint32_t period_hi;
- volatile uint32_t snap_lo;
- volatile uint32_t snap_hi;
-}
-altera_avalon_timer_regs;
-
-#define ALTERA_AVALON_TIMER_STATUS_TO_MSK (0x1)
-#define ALTERA_AVALON_TIMER_STATUS_TO_OFST (0)
-#define ALTERA_AVALON_TIMER_STATUS_RUN_MSK (0x2)
-#define ALTERA_AVALON_TIMER_STATUS_RUN_OFST (1)
-
-#define ALTERA_AVALON_TIMER_CONTROL_ITO_MSK (0x1)
-#define ALTERA_AVALON_TIMER_CONTROL_ITO_OFST (0)
-#define ALTERA_AVALON_TIMER_CONTROL_CONT_MSK (0x2)
-#define ALTERA_AVALON_TIMER_CONTROL_CONT_OFST (1)
-#define ALTERA_AVALON_TIMER_CONTROL_START_MSK (0x4)
-#define ALTERA_AVALON_TIMER_CONTROL_START_OFST (2)
-#define ALTERA_AVALON_TIMER_CONTROL_STOP_MSK (0x8)
-#define ALTERA_AVALON_TIMER_CONTROL_STOP_OFST (3)
-
-typedef struct
-{
- volatile uint32_t data;
- volatile uint32_t control;
-}
-altera_avalon_jtag_uart_regs;
-
-#define ALTERA_AVALON_JTAG_UART_DATA_DATA_MSK (0x000000FFu)
-#define ALTERA_AVALON_JTAG_UART_DATA_DATA_OFST (0)
-#define ALTERA_AVALON_JTAG_UART_DATA_RVALID_MSK (0x00008000u)
-#define ALTERA_AVALON_JTAG_UART_DATA_RVALID_OFST (15)
-#define ALTERA_AVALON_JTAG_UART_DATA_RAVAIL_MSK (0xFFFF0000u)
-#define ALTERA_AVALON_JTAG_UART_DATA_RAVAIL_OFST (16)
-
-#define ALTERA_AVALON_JTAG_UART_CONTROL_RE_MSK (0x00000001u)
-#define ALTERA_AVALON_JTAG_UART_CONTROL_RE_OFST (0)
-#define ALTERA_AVALON_JTAG_UART_CONTROL_WE_MSK (0x00000002u)
-#define ALTERA_AVALON_JTAG_UART_CONTROL_WE_OFST (1)
-#define ALTERA_AVALON_JTAG_UART_CONTROL_RI_MSK (0x00000100u)
-#define ALTERA_AVALON_JTAG_UART_CONTROL_RI_OFST (8)
-#define ALTERA_AVALON_JTAG_UART_CONTROL_WI_MSK (0x00000200u)
-#define ALTERA_AVALON_JTAG_UART_CONTROL_WI_OFST (9)
-#define ALTERA_AVALON_JTAG_UART_CONTROL_AC_MSK (0x00000400u)
-#define ALTERA_AVALON_JTAG_UART_CONTROL_AC_OFST (10)
-#define ALTERA_AVALON_JTAG_UART_CONTROL_WSPACE_MSK (0xFFFF0000u)
-#define ALTERA_AVALON_JTAG_UART_CONTROL_WSPACE_OFST (16)
-
-/* ============================================ */
-
-/* miscellaneous stuff assumed to exist */
-
-extern rtems_configuration_table BSP_Configuration;
-
-/*
- * Device Driver Table Entries
- */
-
-/*
- * NOTE: Use the standard Console driver entry
- */
-
-/*
- * NOTE: Use the standard Clock driver entry
- */
-
-/* functions */
-
-void bsp_cleanup( void );
-
-nios2_isr_entry set_vector( /* returns old vector */
- rtems_isr_entry handler, /* isr routine */
- rtems_vector_number vector, /* vector number */
- int type /* RTEMS or RAW intr */
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/include/bspopts.h.in b/c/src/lib/libbsp/nios2/nios2_iss/include/bspopts.h.in
deleted file mode 100644
index f11cf7efbb..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/include/bspopts.h.in
+++ /dev/null
@@ -1,16 +0,0 @@
-/* include/bspopts.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/include/coverhd.h b/c/src/lib/libbsp/nios2/nios2_iss/include/coverhd.h
deleted file mode 100644
index 5a87063f9a..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/include/coverhd.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* coverhd.h
- *
- * This include file has defines to represent the overhead associated
- * with calling a particular directive from C. These are used in the
- * Timing Test Suite to ignore the overhead required to pass arguments
- * to directives. On some CPUs and/or target boards, this overhead
- * is significant and makes it difficult to distinguish internal
- * RTEMS execution time from that used to call the directive.
- * This file should be updated after running the C overhead timing
- * test. Once this update has been performed, the RTEMS Time Test
- * Suite should be rebuilt to account for these overhead times in the
- * timing results.
- *
- * NOTE: If these are all zero, then the times reported include
- * all calling overhead including passing of arguments.
- *
- * COPYRIGHT (c) 1989-1998.
- * On-Line Applications Research Corporation (OAR).
- * Copyright assigned to U.S. Government, 1994.
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __COVERHD_h
-#define __COVERHD_h
-
-#define CALLING_OVERHEAD_INITIALIZE_EXECUTIVE 0
-#define CALLING_OVERHEAD_SHUTDOWN_EXECUTIVE 0
-#define CALLING_OVERHEAD_TASK_CREATE 0
-#define CALLING_OVERHEAD_TASK_IDENT 0
-#define CALLING_OVERHEAD_TASK_START 0
-#define CALLING_OVERHEAD_TASK_RESTART 0
-#define CALLING_OVERHEAD_TASK_DELETE 0
-#define CALLING_OVERHEAD_TASK_SUSPEND 0
-#define CALLING_OVERHEAD_TASK_RESUME 0
-#define CALLING_OVERHEAD_TASK_SET_PRIORITY 0
-#define CALLING_OVERHEAD_TASK_MODE 0
-#define CALLING_OVERHEAD_TASK_GET_NOTE 0
-#define CALLING_OVERHEAD_TASK_SET_NOTE 0
-#define CALLING_OVERHEAD_TASK_WAKE_WHEN 0
-#define CALLING_OVERHEAD_TASK_WAKE_AFTER 0
-#define CALLING_OVERHEAD_INTERRUPT_CATCH 0
-#define CALLING_OVERHEAD_CLOCK_GET 0
-#define CALLING_OVERHEAD_CLOCK_SET 0
-#define CALLING_OVERHEAD_CLOCK_TICK 0
-
-#define CALLING_OVERHEAD_TIMER_CREATE 0
-#define CALLING_OVERHEAD_TIMER_IDENT 0
-#define CALLING_OVERHEAD_TIMER_DELETE 0
-#define CALLING_OVERHEAD_TIMER_FIRE_AFTER 1
-#define CALLING_OVERHEAD_TIMER_FIRE_WHEN 1
-#define CALLING_OVERHEAD_TIMER_RESET 0
-#define CALLING_OVERHEAD_TIMER_CANCEL 0
-#define CALLING_OVERHEAD_SEMAPHORE_CREATE 0
-#define CALLING_OVERHEAD_SEMAPHORE_IDENT 0
-#define CALLING_OVERHEAD_SEMAPHORE_DELETE 0
-#define CALLING_OVERHEAD_SEMAPHORE_OBTAIN 0
-#define CALLING_OVERHEAD_SEMAPHORE_RELEASE 0
-#define CALLING_OVERHEAD_MESSAGE_QUEUE_CREATE 0
-#define CALLING_OVERHEAD_MESSAGE_QUEUE_IDENT 0
-#define CALLING_OVERHEAD_MESSAGE_QUEUE_DELETE 0
-#define CALLING_OVERHEAD_MESSAGE_QUEUE_SEND 0
-#define CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT 0
-#define CALLING_OVERHEAD_MESSAGE_QUEUE_BROADCAST 0
-#define CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE 0
-#define CALLING_OVERHEAD_MESSAGE_QUEUE_FLUSH 0
-
-#define CALLING_OVERHEAD_EVENT_SEND 0
-#define CALLING_OVERHEAD_EVENT_RECEIVE 0
-#define CALLING_OVERHEAD_SIGNAL_CATCH 0
-#define CALLING_OVERHEAD_SIGNAL_SEND 0
-#define CALLING_OVERHEAD_PARTITION_CREATE 0
-#define CALLING_OVERHEAD_PARTITION_IDENT 0
-#define CALLING_OVERHEAD_PARTITION_DELETE 0
-#define CALLING_OVERHEAD_PARTITION_GET_BUFFER 0
-#define CALLING_OVERHEAD_PARTITION_RETURN_BUFFER 0
-#define CALLING_OVERHEAD_REGION_CREATE 0
-#define CALLING_OVERHEAD_REGION_IDENT 0
-#define CALLING_OVERHEAD_REGION_DELETE 0
-#define CALLING_OVERHEAD_REGION_GET_SEGMENT 0
-#define CALLING_OVERHEAD_REGION_RETURN_SEGMENT 0
-#define CALLING_OVERHEAD_PORT_CREATE 0
-#define CALLING_OVERHEAD_PORT_IDENT 0
-#define CALLING_OVERHEAD_PORT_DELETE 0
-#define CALLING_OVERHEAD_PORT_EXTERNAL_TO_INTERNAL 0
-#define CALLING_OVERHEAD_PORT_INTERNAL_TO_EXTERNAL 0
-
-#define CALLING_OVERHEAD_IO_INITIALIZE 0
-#define CALLING_OVERHEAD_IO_OPEN 0
-#define CALLING_OVERHEAD_IO_CLOSE 0
-#define CALLING_OVERHEAD_IO_READ 0
-#define CALLING_OVERHEAD_IO_WRITE 0
-#define CALLING_OVERHEAD_IO_CONTROL 0
-#define CALLING_OVERHEAD_FATAL_ERROR_OCCURRED 0
-#define CALLING_OVERHEAD_RATE_MONOTONIC_CREATE 0
-#define CALLING_OVERHEAD_RATE_MONOTONIC_IDENT 0
-#define CALLING_OVERHEAD_RATE_MONOTONIC_DELETE 0
-#define CALLING_OVERHEAD_RATE_MONOTONIC_CANCEL 0
-#define CALLING_OVERHEAD_RATE_MONOTONIC_PERIOD 0
-#define CALLING_OVERHEAD_MULTIPROCESSING_ANNOUNCE 0
-
-#endif
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/include/tm27.h b/c/src/lib/libbsp/nios2/nios2_iss/include/tm27.h
deleted file mode 100644
index a10e11cab1..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/include/tm27.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * tm27.h
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#ifndef _RTEMS_TMTEST27
-#error "This is an RTEMS internal file you must not include directly."
-#endif
-
-#ifndef __tm27_h
-#define __tm27_h
-
-/*
- * Stuff for Time Test 27
- */
-
-#define MUST_WAIT_FOR_INTERRUPT 0
-
-#define Install_tm27_vector( handler ) set_vector( (handler), 0, 1 )
-
-#define Cause_tm27_intr() /* empty */
-
-#define Clear_tm27_intr() /* empty */
-
-#define Lower_tm27_intr() /* empty */
-
-#endif
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/nios2_iss.ptf b/c/src/lib/libbsp/nios2/nios2_iss/nios2_iss.ptf
deleted file mode 100644
index 7f3dd0fcf6..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/nios2_iss.ptf
+++ /dev/null
@@ -1,1800 +0,0 @@
-SYSTEM Nios2_system
-{
- System_Wizard_Version = "4.10";
- System_Wizard_Build = "181";
- WIZARD_SCRIPT_ARGUMENTS
- {
- device_family = "STRATIX";
- clock_freq = "50000000";
- generate_hdl = "0";
- generate_sdk = "0";
- do_build_sim = "0";
- hdl_language = "vhdl";
- view_master_columns = "1";
- view_master_priorities = "0";
- board_class = "";
- name_column_width = "75";
- desc_column_width = "75";
- bustype_column_width = "0";
- base_column_width = "75";
- end_column_width = "75";
- view_frame_window = "170:208:1280:900";
- do_log_history = "0";
- device_family_id = "STRATIX";
- BOARD_INFO
- {
- device_is_engineering_sample = "";
- }
- }
- MODULE cpu_0
- {
- class = "altera_nios2";
- class_version = "1.0";
- iss_model_name = "altera_nios2";
- HDL_INFO
- {
- PLI_Files = "";
- Simulation_HDL_Files = "";
- Synthesis_HDL_Files = "__PROJECT_DIRECTORY__/cpu_0_test_bench.vhd, __PROJECT_DIRECTORY__/cpu_0_mult_cell.vhd, __PROJECT_DIRECTORY__/cpu_0_jtag_debug_module.vhd, __PROJECT_DIRECTORY__/cpu_0_jtag_debug_module_wrapper.vhd, __PROJECT_DIRECTORY__/cpu_0.vhd";
- Precompiled_Simulation_Library_Files = "";
- Synthesis_Only_Files = "";
- }
- MASTER instruction_master
- {
- PORT_WIRING
- {
- PORT i_address
- {
- direction = "output";
- type = "address";
- width = "28";
- }
- PORT i_read
- {
- direction = "output";
- type = "read";
- width = "1";
- }
- PORT i_readdata
- {
- direction = "input";
- type = "readdata";
- width = "32";
- }
- PORT i_readdatavalid
- {
- direction = "input";
- type = "readdatavalid";
- width = "1";
- }
- PORT i_waitrequest
- {
- direction = "input";
- type = "waitrequest";
- width = "1";
- }
- }
- SYSTEM_BUILDER_INFO
- {
- Bus_Type = "avalon";
- Data_Width = "32";
- Max_Address_Width = "32";
- Address_Width = "8";
- Is_Instruction_Master = "1";
- Has_IRQ = "0";
- Irq_Scheme = "individual_requests";
- Interrupt_Range = "0-0";
- Is_Enabled = "1";
- }
- }
- MASTER data_master
- {
- PORT_WIRING
- {
- PORT clk
- {
- direction = "input";
- type = "clk";
- width = "1";
- }
- PORT d_address
- {
- direction = "output";
- type = "address";
- width = "28";
- }
- PORT d_byteenable
- {
- direction = "output";
- type = "byteenable";
- width = "4";
- }
- PORT d_irq
- {
- direction = "input";
- type = "irq";
- width = "32";
- }
- PORT d_read
- {
- direction = "output";
- type = "read";
- width = "1";
- }
- PORT d_readdata
- {
- direction = "input";
- type = "readdata";
- width = "32";
- }
- PORT d_waitrequest
- {
- direction = "input";
- type = "waitrequest";
- width = "1";
- }
- PORT d_write
- {
- direction = "output";
- type = "write";
- width = "1";
- }
- PORT d_writedata
- {
- direction = "output";
- type = "writedata";
- width = "32";
- }
- PORT jtag_debug_module_debugaccess_to_roms
- {
- direction = "output";
- type = "debugaccess";
- width = "1";
- }
- }
- SYSTEM_BUILDER_INFO
- {
- Register_Incoming_Signals = "1";
- Bus_Type = "avalon";
- Data_Width = "32";
- Max_Address_Width = "32";
- Address_Width = "8";
- Is_Data_Master = "1";
- Has_IRQ = "1";
- Irq_Scheme = "individual_requests";
- Interrupt_Range = "0-31";
- Is_Enabled = "1";
- }
- }
- SLAVE oci_core
- {
- PORT_WIRING
- {
- PORT byteenable
- {
- direction = "input";
- type = "byteenable";
- width = "4";
- }
- PORT oci_core_address
- {
- direction = "input";
- type = "address";
- width = "9";
- }
- PORT oci_core_begintransfer
- {
- direction = "input";
- type = "begintransfer";
- width = "1";
- }
- PORT oci_core_clk
- {
- direction = "input";
- type = "clk";
- width = "1";
- }
- PORT oci_core_readdata
- {
- direction = "output";
- type = "readdata";
- width = "32";
- }
- PORT oci_core_reset
- {
- direction = "input";
- type = "reset";
- width = "1";
- }
- PORT oci_core_resetrequest
- {
- direction = "output";
- type = "resetrequest";
- width = "1";
- }
- PORT oci_core_select
- {
- direction = "input";
- type = "chipselect";
- width = "1";
- }
- PORT oci_core_write
- {
- direction = "input";
- type = "write";
- width = "1";
- }
- PORT oci_core_writedata
- {
- direction = "input";
- type = "writedata";
- width = "32";
- }
- PORT reset_n
- {
- direction = "input";
- type = "reset_n";
- width = "1";
- }
- }
- SYSTEM_BUILDER_INFO
- {
- Read_Wait_States = "1";
- Write_Wait_States = "1";
- Register_Incoming_Signals = "1";
- Bus_Type = "avalon";
- Data_Width = "32";
- Address_Width = "9";
- Accepts_Internal_Connections = "1";
- Requires_Internal_Connections = "instruction_master,data_master";
- Accepts_External_Connections = "0";
- Is_Enabled = "1";
- Address_Alignment = "dynamic";
- Base_Address = "0x08100000";
- Is_Memory_Device = "1";
- Is_Printable_Device = "1";
- Uses_Tri_State_Data_Bus = "0";
- Has_IRQ = "0";
- JTAG_Hub_Base_Id = "69702";
- JTAG_Hub_Instance_Id = "0";
- MASTERED_BY cpu_0/instruction_master
- {
- priority = "1";
- }
- MASTERED_BY cpu_0/data_master
- {
- priority = "1";
- }
- IRQ_MASTER cpu_0/data_master
- {
- IRQ_Number = "NC";
- }
- }
- }
- WIZARD_SCRIPT_ARGUMENTS
- {
- CPU_Architecture = "nios2";
- do_generate = "1";
- cpu_selection = "f";
- CPU_Implementation = "fast";
- cache_has_dcache = "1";
- cache_has_icache = "1";
- cache_dcache_size = "2048";
- cache_icache_size = "4096";
- include_debug = "0";
- include_trace = "0";
- include_oci = "1";
- debug_level = "2";
- oci_offchip_trace = "0";
- oci_onchip_trace = "0";
- oci_trace_addr_width = "7";
- oci_num_xbrk = "0";
- oci_num_dbrk = "0";
- oci_dbrk_trace = "0";
- oci_dbrk_pairs = "0";
- oci_debugreq_signals = "0";
- oci_instance_number = "1";
- hardware_multiply_present = "1";
- hardware_divide_present = "0";
- bht_ptr_sz = "8";
- reset_slave = "onchip_memory_0/s1";
- reset_offset = "0x00000000";
- exc_slave = "onchip_memory_0/s1";
- exc_offset = "0x00000600";
- break_slave = "cpu_0/jtag_debug_module";
- break_offset = "0x00000020";
- altera_internal_test = "0";
- full_waveform_signals = "0";
- activate_model_checker = "0";
- bit_31_bypass_dcache = "1";
- always_bypass_dcache = "0";
- always_unsigned_mul = "0";
- consistent_synthesis = "0";
- ibuf_ptr_sz = "4";
- jtb_ptr_sz = "5";
- performance_counters_present = "0";
- performance_counters_width = "32";
- ras_ptr_sz = "4";
- inst_decode_in_submodule = "0";
- register_dependency_in_submodule = "0";
- source_operands_in_submodule = "0";
- alu_in_submodule = "0";
- stdata_in_submodule = "0";
- shift_rot_2N_in_submodule = "0";
- control_regs_in_submodule = "0";
- mult_cell_in_submodule = "0";
- M_inst_result_mux_in_submodule = "0";
- dcache_load_aligner_in_submodule = "0";
- hardware_divide_in_submodule = "0";
- mult_result_mux_in_submodule = "0";
- shift_rotate_in_submodule = "0";
- register_file_write_data_mux_in_submodule = "0";
- avalon_imaster_in_submodule = "0";
- avalon_dmaster_in_submodule = "0";
- avalon_load_aligner_in_submodule = "0";
- hbreak_test = "0";
- iss_trace_on = "0";
- iss_trace_warning = "1";
- iss_trace_info = "1";
- iss_trace_disassembly = "0";
- iss_trace_registers = "0";
- iss_trace_instr_count = "0";
- iss_software_debug = "0";
- iss_software_debug_port = "9996";
- iss_memory_dump_start = "";
- iss_memory_dump_end = "";
- CONSTANTS
- {
- CONSTANT __nios_catch_irqs__
- {
- value = "1";
- comment = "Include panic handler for all irqs (needs uart)";
- }
- CONSTANT __nios_use_constructors__
- {
- value = "1";
- comment = "Call c++ static constructors";
- }
- CONSTANT __nios_use_small_printf__
- {
- value = "1";
- comment = "Smaller non-ANSI printf, with no floating point";
- }
- CONSTANT nasys_has_icache
- {
- value = "0";
- comment = "True if instruction cache present";
- }
- CONSTANT nasys_icache_size
- {
- value = "4096";
- comment = "Size in bytes of instruction cache";
- }
- CONSTANT nasys_icache_line_size
- {
- value = "32";
- comment = "Size in bytes of each icache line";
- }
- CONSTANT nasys_icache_line_size_log2
- {
- value = "5";
- comment = "Log2 size in bytes of each icache line";
- }
- CONSTANT nasys_has_dcache
- {
- value = "0";
- comment = "True if instruction cache present";
- }
- CONSTANT nasys_dcache_size
- {
- value = "2048";
- comment = "Size in bytes of data cache";
- }
- CONSTANT nasys_dcache_line_size
- {
- value = "4";
- comment = "Size in bytes of each dcache line";
- }
- CONSTANT nasys_dcache_line_size_log2
- {
- value = "2";
- comment = "Log2 size in bytes of each dcache line";
- }
- }
- mainmem_slave = "";
- datamem_slave = "";
- maincomm_slave = "";
- debugcomm_slave = "";
- germs_monitor_id = "";
- asp_debug = "0";
- asp_core_debug = "0";
- include_third_party_debug_port = "0";
- oci_data_trace = "0";
- oci_num_pm = "0";
- oci_pm_width = "40";
- oci_trigger_arming = "1";
- break_slave_override = "";
- break_offset_override = "0x20";
- legacy_sdk_support = "0";
- altera_show_unreleased_features = "0";
- illegal_instructions_trap = "0";
- remove_hardware_multiplier = "0";
- large_dcache_allow_mram = "0";
- cache_omit_dcache = "0";
- cache_omit_icache = "0";
- omit_instruction_master = "0";
- omit_data_master = "0";
- num_local_data_masters = "0";
- num_local_instruction_masters = "0";
- gui_branch_prediction_type = "Automatic";
- branch_prediction_type = "Dynamic";
- bht_index_pc_only = "0";
- mmu_present = "0";
- process_id_num_bits = "10";
- dtlb_ptr_sz = "7";
- dtlb_num_ways = "4";
- udtlb_num_entries = "6";
- itlb_ptr_sz = "7";
- itlb_num_ways = "4";
- uitlb_num_entries = "4";
- fast_tlb_miss_exc_slave = "onchip_memory_0/s1";
- fast_tlb_miss_exc_offset = "0x00000000";
- always_encrypt = "1";
- activate_monitors = "1";
- activate_test_end_checker = "0";
- activate_trace = "1";
- clear_x_bits_ld_non_bypass = "1";
- hdl_sim_caches_cleared = "1";
- allow_full_address_range = "0";
- Boot_Copier = "boot_loader_cfi.srec";
- Boot_Copier_EPCS = "boot_loader_epcs.srec";
- license_status = "ocp";
- }
- SYSTEM_BUILDER_INFO
- {
- Parameters_Signature = "";
- Is_CPU = "1";
- Is_Enabled = "1";
- Instantiate_In_System_Module = "1";
- Default_Module_Name = "cpu";
- View
- {
- MESSAGES
- {
- }
- Is_Collapsed = "0";
- Settings_Summary = "Nios II/f
- <br>&nbsp;&nbsp;4-Kbyte Instruction Cache
- <br>&nbsp;&nbsp;2-Kbyte Data Cache
- <br>&nbsp;&nbsp;JTAG Debug Module
- ";
- }
- Required_Device_Family = "STRATIX,STRATIXII,CYCLONE";
- }
- SOFTWARE_COMPONENT altera_hal
- {
- class = "altera_hal";
- class_version = "1.0";
- WIZARD_SCRIPT_ARGUMENTS
- {
- }
- SYSTEM_BUILDER_INFO
- {
- Is_Enabled = "1";
- }
- }
- SOFTWARE_COMPONENT altera_nios2_test
- {
- class = "altera_nios2_test";
- class_version = "2.0";
- WIZARD_SCRIPT_ARGUMENTS
- {
- CONSTANTS
- {
- CONSTANT debug_on
- {
- value = "0";
- comment = "Enable debug features";
- }
- }
- }
- SYSTEM_BUILDER_INFO
- {
- Is_Enabled = "0";
- }
- }
- SOFTWARE_COMPONENT altera_plugs_library
- {
- class = "altera_plugs_library";
- class_version = "2.1";
- WIZARD_SCRIPT_ARGUMENTS
- {
- CONSTANTS
- {
- CONSTANT PLUGS_PLUG_COUNT
- {
- value = "5";
- comment = "Maximum number of plugs";
- }
- CONSTANT PLUGS_ADAPTER_COUNT
- {
- value = "2";
- comment = "Maximum number of adapters";
- }
- CONSTANT PLUGS_DNS
- {
- value = "1";
- comment = "Have routines for DNS lookups";
- }
- CONSTANT PLUGS_PING
- {
- value = "1";
- comment = "Respond to icmp echo (ping) messages";
- }
- CONSTANT PLUGS_TCP
- {
- value = "1";
- comment = "Support tcp in/out connections";
- }
- CONSTANT PLUGS_IRQ
- {
- value = "1";
- comment = "Run at interrupte level";
- }
- CONSTANT PLUGS_DEBUG
- {
- value = "1";
- comment = "Support debug routines";
- }
- }
- }
- SYSTEM_BUILDER_INFO
- {
- Is_Enabled = "1";
- }
- }
- PORT_WIRING
- {
- }
- SIMULATION
- {
- DISPLAY
- {
- SIGNAL aaa
- {
- format = "Logic";
- name = "i_readdata";
- radix = "hexadecimal";
- }
- SIGNAL aab
- {
- format = "Logic";
- name = "i_readdatavalid";
- radix = "hexadecimal";
- }
- SIGNAL aac
- {
- format = "Logic";
- name = "i_waitrequest";
- radix = "hexadecimal";
- }
- SIGNAL aad
- {
- format = "Logic";
- name = "i_address";
- radix = "hexadecimal";
- }
- SIGNAL aae
- {
- format = "Logic";
- name = "i_read";
- radix = "hexadecimal";
- }
- SIGNAL aaf
- {
- format = "Logic";
- name = "clk";
- radix = "hexadecimal";
- }
- SIGNAL aag
- {
- format = "Logic";
- name = "reset_n";
- radix = "hexadecimal";
- }
- SIGNAL aah
- {
- format = "Logic";
- name = "d_readdata";
- radix = "hexadecimal";
- }
- SIGNAL aai
- {
- format = "Logic";
- name = "d_waitrequest";
- radix = "hexadecimal";
- }
- SIGNAL aaj
- {
- format = "Logic";
- name = "d_irq";
- radix = "hexadecimal";
- }
- SIGNAL aak
- {
- format = "Logic";
- name = "d_address";
- radix = "hexadecimal";
- }
- SIGNAL aal
- {
- format = "Logic";
- name = "d_byteenable";
- radix = "hexadecimal";
- }
- SIGNAL aam
- {
- format = "Logic";
- name = "d_read";
- radix = "hexadecimal";
- }
- SIGNAL aan
- {
- format = "Logic";
- name = "d_write";
- radix = "hexadecimal";
- }
- SIGNAL aao
- {
- format = "Logic";
- name = "d_writedata";
- radix = "hexadecimal";
- }
- SIGNAL aap
- {
- format = "Divider";
- name = "base pipeline";
- radix = "";
- }
- SIGNAL aaq
- {
- format = "Logic";
- name = "clk";
- radix = "hexadecimal";
- }
- SIGNAL aar
- {
- format = "Logic";
- name = "reset_n";
- radix = "hexadecimal";
- }
- SIGNAL aas
- {
- format = "Logic";
- name = "D_stall";
- radix = "hexadecimal";
- }
- SIGNAL aat
- {
- format = "Logic";
- name = "A_stall";
- radix = "hexadecimal";
- }
- SIGNAL aau
- {
- format = "Logic";
- name = "F_pcb_nxt";
- radix = "hexadecimal";
- }
- SIGNAL aav
- {
- format = "Logic";
- name = "F_pcb";
- radix = "hexadecimal";
- }
- SIGNAL aaw
- {
- format = "Logic";
- name = "D_pcb";
- radix = "hexadecimal";
- }
- SIGNAL aax
- {
- format = "Logic";
- name = "E_pcb";
- radix = "hexadecimal";
- }
- SIGNAL aay
- {
- format = "Logic";
- name = "M_pcb";
- radix = "hexadecimal";
- }
- SIGNAL aaz
- {
- format = "Logic";
- name = "A_pcb";
- radix = "hexadecimal";
- }
- SIGNAL aba
- {
- format = "Logic";
- name = "W_pcb";
- radix = "hexadecimal";
- }
- SIGNAL abb
- {
- format = "Logic";
- name = "F_vinst";
- radix = "ascii";
- }
- SIGNAL abc
- {
- format = "Logic";
- name = "D_vinst";
- radix = "ascii";
- }
- SIGNAL abd
- {
- format = "Logic";
- name = "E_vinst";
- radix = "ascii";
- }
- SIGNAL abe
- {
- format = "Logic";
- name = "M_vinst";
- radix = "ascii";
- }
- SIGNAL abf
- {
- format = "Logic";
- name = "A_vinst";
- radix = "ascii";
- }
- SIGNAL abg
- {
- format = "Logic";
- name = "W_vinst";
- radix = "ascii";
- }
- SIGNAL abh
- {
- format = "Logic";
- name = "F_inst_ram_hit";
- radix = "hexadecimal";
- }
- SIGNAL abi
- {
- format = "Logic";
- name = "F_issue";
- radix = "hexadecimal";
- }
- SIGNAL abj
- {
- format = "Logic";
- name = "F_kill";
- radix = "hexadecimal";
- }
- SIGNAL abk
- {
- format = "Logic";
- name = "D_kill";
- radix = "hexadecimal";
- }
- SIGNAL abl
- {
- format = "Logic";
- name = "D_refetch";
- radix = "hexadecimal";
- }
- SIGNAL abm
- {
- format = "Logic";
- name = "D_issue";
- radix = "hexadecimal";
- }
- SIGNAL abn
- {
- format = "Logic";
- name = "D_valid";
- radix = "hexadecimal";
- }
- SIGNAL abo
- {
- format = "Logic";
- name = "E_valid";
- radix = "hexadecimal";
- }
- SIGNAL abp
- {
- format = "Logic";
- name = "M_valid";
- radix = "hexadecimal";
- }
- SIGNAL abq
- {
- format = "Logic";
- name = "A_valid";
- radix = "hexadecimal";
- }
- SIGNAL abr
- {
- format = "Logic";
- name = "W_valid";
- radix = "hexadecimal";
- }
- SIGNAL abs
- {
- format = "Logic";
- name = "W_wr_dst_reg";
- radix = "hexadecimal";
- }
- SIGNAL abt
- {
- format = "Logic";
- name = "W_dst_regnum";
- radix = "hexadecimal";
- }
- SIGNAL abu
- {
- format = "Logic";
- name = "W_wr_data";
- radix = "hexadecimal";
- }
- SIGNAL abv
- {
- format = "Logic";
- name = "D_en";
- radix = "hexadecimal";
- }
- SIGNAL abw
- {
- format = "Logic";
- name = "E_en";
- radix = "hexadecimal";
- }
- SIGNAL abx
- {
- format = "Logic";
- name = "M_en";
- radix = "hexadecimal";
- }
- SIGNAL aby
- {
- format = "Logic";
- name = "A_en";
- radix = "hexadecimal";
- }
- SIGNAL abz
- {
- format = "Logic";
- name = "F_iw";
- radix = "hexadecimal";
- }
- SIGNAL aca
- {
- format = "Logic";
- name = "D_iw";
- radix = "hexadecimal";
- }
- SIGNAL acb
- {
- format = "Logic";
- name = "E_iw";
- radix = "hexadecimal";
- }
- SIGNAL acc
- {
- format = "Logic";
- name = "E_cancel";
- radix = "hexadecimal";
- }
- SIGNAL acd
- {
- format = "Logic";
- name = "E_pipe_flush";
- radix = "hexadecimal";
- }
- SIGNAL ace
- {
- format = "Logic";
- name = "E_pipe_flush_baddr";
- radix = "hexadecimal";
- }
- SIGNAL acf
- {
- format = "Logic";
- name = "A_status_reg_pie";
- radix = "hexadecimal";
- }
- SIGNAL acg
- {
- format = "Logic";
- name = "A_ienable_reg";
- radix = "hexadecimal";
- }
- SIGNAL ach
- {
- format = "Logic";
- name = "intr_req";
- radix = "hexadecimal";
- }
- }
- }
- MASTER data_master2
- {
- PORT_WIRING
- {
- }
- SYSTEM_BUILDER_INFO
- {
- Register_Incoming_Signals = "1";
- Bus_Type = "avalon";
- Data_Width = "32";
- Max_Address_Width = "31";
- Address_Width = "8";
- Is_Data_Master = "1";
- Has_IRQ = "0";
- Is_Enabled = "0";
- }
- }
- MASTER local_data_master_0
- {
- PORT_WIRING
- {
- }
- SYSTEM_BUILDER_INFO
- {
- Register_Incoming_Signals = "0";
- Bus_Type = "avalon";
- Data_Width = "32";
- Max_Address_Width = "31";
- Address_Width = "8";
- Is_Data_Master = "1";
- Has_IRQ = "0";
- Is_Enabled = "0";
- }
- }
- MASTER local_data_master_1
- {
- PORT_WIRING
- {
- }
- SYSTEM_BUILDER_INFO
- {
- Register_Incoming_Signals = "0";
- Bus_Type = "avalon";
- Data_Width = "32";
- Max_Address_Width = "31";
- Address_Width = "8";
- Is_Data_Master = "1";
- Has_IRQ = "0";
- Is_Enabled = "0";
- }
- }
- MASTER local_data_master_2
- {
- PORT_WIRING
- {
- }
- SYSTEM_BUILDER_INFO
- {
- Register_Incoming_Signals = "0";
- Bus_Type = "avalon";
- Data_Width = "32";
- Max_Address_Width = "31";
- Address_Width = "8";
- Is_Data_Master = "1";
- Has_IRQ = "0";
- Is_Enabled = "0";
- }
- }
- MASTER local_data_master_3
- {
- PORT_WIRING
- {
- }
- SYSTEM_BUILDER_INFO
- {
- Register_Incoming_Signals = "0";
- Bus_Type = "avalon";
- Data_Width = "32";
- Max_Address_Width = "31";
- Address_Width = "8";
- Is_Data_Master = "1";
- Has_IRQ = "0";
- Is_Enabled = "0";
- }
- }
- MASTER local_instruction_master_0
- {
- PORT_WIRING
- {
- }
- SYSTEM_BUILDER_INFO
- {
- Register_Incoming_Signals = "0";
- Bus_Type = "avalon";
- Data_Width = "32";
- Max_Address_Width = "31";
- Address_Width = "8";
- Is_Instruction_Master = "1";
- Has_IRQ = "0";
- Is_Enabled = "0";
- }
- }
- MASTER custom_instruction_master
- {
- PORT_WIRING
- {
- }
- SYSTEM_BUILDER_INFO
- {
- Bus_Type = "nios_custom_instruction";
- Data_Width = "32";
- Address_Width = "8";
- Max_Address_Width = "8";
- Base_Address = "N/A";
- Is_Visible = "0";
- Is_Custom_Instruction = "0";
- Is_Enabled = "0";
- }
- }
- SLAVE jtag_debug_module
- {
- PORT_WIRING
- {
- PORT jtag_debug_module_address
- {
- direction = "input";
- type = "address";
- width = "9";
- }
- PORT jtag_debug_module_begintransfer
- {
- direction = "input";
- type = "begintransfer";
- width = "1";
- }
- PORT jtag_debug_module_byteenable
- {
- direction = "input";
- type = "byteenable";
- width = "4";
- }
- PORT jtag_debug_module_clk
- {
- direction = "input";
- type = "clk";
- width = "1";
- }
- PORT jtag_debug_module_debugaccess
- {
- direction = "input";
- type = "debugaccess";
- width = "1";
- }
- PORT jtag_debug_module_readdata
- {
- direction = "output";
- type = "readdata";
- width = "32";
- }
- PORT jtag_debug_module_reset
- {
- direction = "input";
- type = "reset";
- width = "1";
- }
- PORT jtag_debug_module_resetrequest
- {
- direction = "output";
- type = "resetrequest";
- width = "1";
- }
- PORT jtag_debug_module_select
- {
- direction = "input";
- type = "chipselect";
- width = "1";
- }
- PORT jtag_debug_module_write
- {
- direction = "input";
- type = "write";
- width = "1";
- }
- PORT jtag_debug_module_writedata
- {
- direction = "input";
- type = "writedata";
- width = "32";
- }
- PORT reset_n
- {
- direction = "input";
- type = "reset_n";
- width = "1";
- }
- }
- SYSTEM_BUILDER_INFO
- {
- Read_Wait_States = "1";
- Write_Wait_States = "1";
- Register_Incoming_Signals = "1";
- Bus_Type = "avalon";
- Data_Width = "32";
- Address_Width = "9";
- Accepts_Internal_Connections = "1";
- Requires_Internal_Connections = "instruction_master,data_master";
- Accepts_External_Connections = "0";
- Is_Enabled = "1";
- Address_Alignment = "dynamic";
- Base_Address = "0x08200800";
- Is_Memory_Device = "1";
- Is_Printable_Device = "0";
- Uses_Tri_State_Data_Bus = "0";
- Has_IRQ = "0";
- JTAG_Hub_Base_Id = "593990";
- JTAG_Hub_Instance_Id = "0";
- MASTERED_BY cpu_0/instruction_master
- {
- priority = "1";
- }
- MASTERED_BY cpu_0/data_master
- {
- priority = "1";
- }
- IRQ_MASTER cpu_0/data_master
- {
- IRQ_Number = "NC";
- }
- }
- }
- }
- MODULE onchip_memory_0
- {
- class = "altera_avalon_onchip_memory2";
- class_version = "4.0";
- iss_model_name = "altera_memory";
- HDL_INFO
- {
- Precompiled_Simulation_Library_Files = "";
- Simulation_HDL_Files = "";
- Synthesis_HDL_Files = "__PROJECT_DIRECTORY__/onchip_memory_1.vhd";
- Synthesis_Only_Files = "";
- }
- WIZARD_SCRIPT_ARGUMENTS
- {
- allow_mram_sim_contents_only_file = "0";
- ram_block_type = "M-RAM";
- gui_ram_block_type = "Automatic";
- Writeable = "1";
- dual_port = "0";
- Size_Value = "8192";
- Size_Multiple = "1024";
- MAKE
- {
- TARGET delete_placeholder_warning
- {
- onchip_memory_1
- {
- Command1 = "rm -f $(SIMDIR)/contents_file_warning.txt";
- Is_Phony = "1";
- Target_File = "do_delete_placeholder_warning";
- }
- }
- TARGET hex
- {
- onchip_memory_1
- {
- Command1 = "@echo Post-processing to create $(notdir $@)";
- Command2 = "elf2hex $(ELF) 0x00000000 0x7FF --width=32 $(QUARTUS_PROJECT_DIR)/onchip_memory_1.hex --create-lanes=0";
- Dependency = "$(ELF)";
- Target_File = "$(QUARTUS_PROJECT_DIR)/onchip_memory_1.hex";
- }
- }
- TARGET sim
- {
- onchip_memory_1
- {
- Command1 = "if [ ! -d $(SIMDIR) ]; then mkdir $(SIMDIR) ; fi";
- Command2 = "@echo Hardware simulation is not enabled for the target SOPC Builder system. Skipping creation of hardware simulation model contents and simulation symbol files. \(Note: This does not affect the instruction set simulator.\)";
- Command3 = "touch $(SIMDIR)/dummy_file";
- Dependency = "$(ELF)";
- Target_File = "$(SIMDIR)/dummy_file";
- }
- }
- }
- contents_info = "QUARTUS_PROJECT_DIR/onchip_memory_1.hex 1092402177 ";
- }
- SYSTEM_BUILDER_INFO
- {
- Prohibited_Device_Family = "MERCURY, APEX20K, APEX20KE, APEX20KC, APEXII, ACEX1K, FLEX10KE, EXCALIBUR_ARM";
- Instantiate_In_System_Module = "1";
- Is_Enabled = "1";
- Default_Module_Name = "onchip_memory";
- View
- {
- MESSAGES
- {
- }
- Is_Collapsed = "1";
- }
- }
- SLAVE s1
- {
- PORT_WIRING
- {
- PORT address
- {
- direction = "input";
- type = "address";
- width = "9";
- }
- PORT byteenable
- {
- direction = "input";
- type = "byteenable";
- width = "4";
- }
- PORT chipselect
- {
- direction = "input";
- type = "chipselect";
- width = "1";
- }
- PORT clk
- {
- direction = "input";
- type = "clk";
- width = "1";
- }
- PORT readdata
- {
- direction = "output";
- type = "readdata";
- width = "32";
- }
- PORT write
- {
- direction = "input";
- type = "write";
- width = "1";
- }
- PORT writedata
- {
- direction = "input";
- type = "writedata";
- width = "32";
- }
- }
- SYSTEM_BUILDER_INFO
- {
- Bus_Type = "avalon";
- Is_Memory_Device = "1";
- Address_Alignment = "dynamic";
- Address_Width = "21";
- Data_Width = "32";
- Has_IRQ = "0";
- Read_Wait_States = "0";
- Write_Wait_States = "0";
- Address_Span = "134217728";
- Read_Latency = "1";
- MASTERED_BY cpu_0/instruction_master
- {
- priority = "1";
- }
- MASTERED_BY cpu_0/data_master
- {
- priority = "1";
- }
- Base_Address = "0x00000000";
- IRQ_MASTER cpu_0/data_master
- {
- IRQ_Number = "NC";
- }
- }
- }
- SLAVE s2
- {
- PORT_WIRING
- {
- }
- SYSTEM_BUILDER_INFO
- {
- Bus_Type = "avalon";
- Is_Memory_Device = "1";
- Address_Alignment = "dynamic";
- Address_Width = "21";
- Data_Width = "32";
- Has_IRQ = "0";
- Read_Wait_States = "0";
- Write_Wait_States = "0";
- Address_Span = "8388608";
- Read_Latency = "1";
- Is_Enabled = "0";
- }
- }
- SIMULATION
- {
- DISPLAY
- {
- SIGNAL a
- {
- name = "chipselect";
- conditional = "1";
- }
- SIGNAL b
- {
- name = "write";
- conditional = "1";
- }
- SIGNAL c
- {
- name = "address";
- radix = "hexadecimal";
- }
- SIGNAL d
- {
- name = "byteenable";
- radix = "binary";
- conditional = "1";
- }
- SIGNAL e
- {
- name = "readdata";
- radix = "hexadecimal";
- }
- SIGNAL f
- {
- name = "writedata";
- radix = "hexadecimal";
- conditional = "1";
- }
- }
- }
- PORT_WIRING
- {
- }
- }
- MODULE jtag_uart_0
- {
- class = "altera_avalon_jtag_uart";
- class_version = "1.0";
- iss_model_name = "altera_avalon_jtag_uart";
- SLAVE avalon_jtag_slave
- {
- SYSTEM_BUILDER_INFO
- {
- Bus_Type = "avalon";
- Is_Printable_Device = "1";
- Address_Alignment = "native";
- Address_Width = "1";
- Data_Width = "32";
- Has_IRQ = "1";
- Read_Wait_States = "peripheral_controlled";
- Write_Wait_States = "peripheral_controlled";
- JTAG_Hub_Base_Id = "0x04006E";
- JTAG_Hub_Instance_Id = "0";
- MASTERED_BY cpu_0/data_master
- {
- priority = "1";
- }
- IRQ_MASTER cpu_0/data_master
- {
- IRQ_Number = "2";
- }
- Base_Address = "0x08000000";
- }
- PORT_WIRING
- {
- PORT clk
- {
- type = "clk";
- direction = "input";
- width = "1";
- }
- PORT rst_n
- {
- type = "reset_n";
- direction = "input";
- width = "1";
- }
- PORT av_chipselect
- {
- type = "chipselect";
- direction = "input";
- width = "1";
- }
- PORT av_address
- {
- type = "address";
- direction = "input";
- width = "1";
- }
- PORT av_read_n
- {
- type = "read_n";
- direction = "input";
- width = "1";
- }
- PORT av_readdata
- {
- type = "readdata";
- direction = "output";
- width = "32";
- }
- PORT av_write_n
- {
- type = "write_n";
- direction = "input";
- width = "1";
- }
- PORT av_writedata
- {
- type = "writedata";
- direction = "input";
- width = "32";
- }
- PORT av_waitrequest
- {
- type = "waitrequest";
- direction = "output";
- width = "1";
- }
- PORT av_irq
- {
- type = "irq";
- direction = "output";
- width = "1";
- }
- PORT dataavailable
- {
- direction = "output";
- type = "dataavailable";
- width = "1";
- }
- PORT readyfordata
- {
- direction = "output";
- type = "readyfordata";
- width = "1";
- }
- }
- }
- SYSTEM_BUILDER_INFO
- {
- Instantiate_In_System_Module = "1";
- Is_Enabled = "1";
- Iss_Launch_Telnet = "0";
- View
- {
- Settings_Summary = "<br>Write Depth: 64; Write IRQ Threshold: 8
- <br>Read Depth: 64; Read IRQ Threshold: 8";
- MESSAGES
- {
- }
- Is_Collapsed = "1";
- }
- }
- WIZARD_SCRIPT_ARGUMENTS
- {
- write_depth = "64";
- read_depth = "64";
- write_threshold = "8";
- read_threshold = "8";
- read_char_stream = "";
- showascii = "1";
- read_le = "0";
- write_le = "0";
- }
- SIMULATION
- {
- Fix_Me_Up = "";
- DISPLAY
- {
- SIGNAL av_chipselect
- {
- name = "av_chipselect";
- }
- SIGNAL av_address
- {
- name = "av_address";
- radix = "hexadecimal";
- }
- SIGNAL av_read_n
- {
- name = "av_read_n";
- }
- SIGNAL av_readdata
- {
- name = "av_readdata";
- radix = "hexadecimal";
- }
- SIGNAL av_write_n
- {
- name = "av_write_n";
- }
- SIGNAL av_writedata
- {
- name = "av_writedata";
- radix = "hexadecimal";
- }
- SIGNAL av_waitrequest
- {
- name = "av_waitrequest";
- }
- SIGNAL av_irq
- {
- name = "av_irq";
- }
- SIGNAL dataavailable
- {
- name = "dataavailable";
- }
- SIGNAL readyfordata
- {
- name = "readyfordata";
- }
- }
- INTERACTIVE_IN drive
- {
- enable = "0";
- file = "_input_data_stream.dat";
- mutex = "_input_data_mutex.dat";
- log = "_in.log";
- rate = "100";
- signals = "temp,list";
- exe = "nios2-terminal";
- }
- INTERACTIVE_OUT log
- {
- enable = "1";
- exe = "perl -- atail-f.pl";
- file = "_output_stream.dat";
- radix = "ascii";
- signals = "temp,list";
- }
- }
- HDL_INFO
- {
- Precompiled_Simulation_Library_Files = "";
- Simulation_HDL_Files = "";
- Synthesis_HDL_Files = "__PROJECT_DIRECTORY__/jtag_uart_0.vhd";
- Synthesis_Only_Files = "";
- }
- PORT_WIRING
- {
- }
- }
- MODULE timer_0
- {
- class = "altera_avalon_timer";
- class_version = "2.1";
- iss_model_name = "altera_avalon_timer";
- SLAVE s1
- {
- SYSTEM_BUILDER_INFO
- {
- Bus_Type = "avalon";
- Is_Printable_Device = "0";
- Address_Alignment = "native";
- Address_Width = "3";
- Data_Width = "16";
- Has_IRQ = "1";
- Read_Wait_States = "1";
- Write_Wait_States = "0";
- MASTERED_BY cpu_0/data_master
- {
- priority = "1";
- }
- IRQ_MASTER cpu_0/data_master
- {
- IRQ_Number = "1";
- }
- Base_Address = "0x08001000";
- }
- PORT_WIRING
- {
- PORT address
- {
- direction = "input";
- type = "address";
- width = "3";
- }
- PORT chipselect
- {
- direction = "input";
- type = "chipselect";
- width = "1";
- }
- PORT clk
- {
- direction = "input";
- type = "clk";
- width = "1";
- }
- PORT irq
- {
- direction = "output";
- type = "irq";
- width = "1";
- }
- PORT readdata
- {
- direction = "output";
- type = "readdata";
- width = "16";
- }
- PORT reset_n
- {
- direction = "input";
- type = "reset_n";
- width = "1";
- }
- PORT write_n
- {
- direction = "input";
- type = "write_n";
- width = "1";
- }
- PORT writedata
- {
- direction = "input";
- type = "writedata";
- width = "16";
- }
- }
- }
- SYSTEM_BUILDER_INFO
- {
- Instantiate_In_System_Module = "1";
- Is_Enabled = "1";
- View
- {
- Settings_Summary = "Timer with 1 ms timeout period.";
- MESSAGES
- {
- }
- Is_Collapsed = "1";
- }
- }
- WIZARD_SCRIPT_ARGUMENTS
- {
- always_run = "0";
- fixed_period = "0";
- snapshot = "1";
- period = "1";
- period_units = "ms";
- reset_output = "0";
- timeout_pulse_output = "0";
- mult = "0.001";
- }
- HDL_INFO
- {
- Simulation_HDL_Files = "";
- Synthesis_HDL_Files = "__PROJECT_DIRECTORY__/timer_0.vhd";
- Precompiled_Simulation_Library_Files = "";
- Synthesis_Only_Files = "";
- }
- PORT_WIRING
- {
- }
- }
- MODULE timer_1
- {
- class = "altera_avalon_timer";
- class_version = "2.1";
- iss_model_name = "altera_avalon_timer";
- SLAVE s1
- {
- SYSTEM_BUILDER_INFO
- {
- Bus_Type = "avalon";
- Is_Printable_Device = "0";
- Address_Alignment = "native";
- Address_Width = "3";
- Data_Width = "16";
- Has_IRQ = "1";
- Read_Wait_States = "1";
- Write_Wait_States = "0";
- MASTERED_BY cpu_0/data_master
- {
- priority = "1";
- }
- IRQ_MASTER cpu_0/data_master
- {
- IRQ_Number = "3";
- }
- Base_Address = "0x08002000";
- }
- PORT_WIRING
- {
- PORT address
- {
- direction = "input";
- type = "address";
- width = "3";
- }
- PORT chipselect
- {
- direction = "input";
- type = "chipselect";
- width = "1";
- }
- PORT clk
- {
- direction = "input";
- type = "clk";
- width = "1";
- }
- PORT irq
- {
- direction = "output";
- type = "irq";
- width = "1";
- }
- PORT readdata
- {
- direction = "output";
- type = "readdata";
- width = "16";
- }
- PORT reset_n
- {
- direction = "input";
- type = "reset_n";
- width = "1";
- }
- PORT write_n
- {
- direction = "input";
- type = "write_n";
- width = "1";
- }
- PORT writedata
- {
- direction = "input";
- type = "writedata";
- width = "16";
- }
- }
- }
- SYSTEM_BUILDER_INFO
- {
- Instantiate_In_System_Module = "1";
- Is_Enabled = "1";
- View
- {
- Settings_Summary = "Timer with 1 ms timeout period.";
- MESSAGES
- {
- }
- Is_Collapsed = "1";
- }
- }
- WIZARD_SCRIPT_ARGUMENTS
- {
- always_run = "0";
- fixed_period = "0";
- snapshot = "1";
- period = "1";
- period_units = "ms";
- reset_output = "0";
- timeout_pulse_output = "0";
- mult = "0.001";
- }
- HDL_INFO
- {
- Simulation_HDL_Files = "";
- Synthesis_HDL_Files = "__PROJECT_DIRECTORY__/timer_1.vhd";
- Precompiled_Simulation_Library_Files = "";
- Synthesis_Only_Files = "";
- }
- PORT_WIRING
- {
- }
- }
-}
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/nios2_iss.sh b/c/src/lib/libbsp/nios2/nios2_iss/nios2_iss.sh
deleted file mode 100755
index c6cf2d36e3..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/nios2_iss.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-IOD=jtag_uart_0
-PTF=nios2_iss.ptf
-EXE="$1"
-# e.g. hello.nxe
-nios2-iss -c --stdin=${IOD} --stdout=${IOD} --stderr=${IOD} -f "${EXE}" -p "${PTF}"
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/shmsupp/addrconv.c b/c/src/lib/libbsp/nios2/nios2_iss/shmsupp/addrconv.c
deleted file mode 100644
index 444c1e4d87..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/shmsupp/addrconv.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Shm_Convert_address
- *
- * No address range conversion is required.
- *
- * Input parameters:
- * address - address to convert
- *
- * Output parameters:
- * returns - converted address
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <bsp.h>
-#include <shm_driver.h>
-
-void *Shm_Convert_address(
- void *address
-)
-{
- return ( address );
-}
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/shmsupp/getcfg.c b/c/src/lib/libbsp/nios2/nios2_iss/shmsupp/getcfg.c
deleted file mode 100644
index fc3b3ba062..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/shmsupp/getcfg.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* void Shm_Get_configuration( localnode, &shmcfg )
- *
- * This routine initializes, if necessary, and returns a pointer
- * to the Shared Memory Configuration Table for the XXX target.
- *
- * INPUT PARAMETERS:
- * localnode - local node number
- * shmcfg - address of pointer to SHM Config Table
- *
- * OUTPUT PARAMETERS:
- * *shmcfg - pointer to SHM Config Table
- *
-XXX: FIX THE COMMENTS BELOW WHEN THE CPU IS KNOWN
- * NOTES: The XYZ does not have an interprocessor interrupt.
- *
- * The following table illustrates the configuration limitations:
- *
- * BUS MAX
- * MODE ENDIAN NODES
- * ========= ====== =======
- * POLLED BIG 2+
- * INTERRUPT **** NOT SUPPORTED ****
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <bsp.h>
-#include <shm_driver.h>
-
-/*
- * configured if currently polling of interrupt driven
- */
-
-#define INTERRUPT 0 /* XXX: */
-#define POLLING 1 /* XXX: fix me -- is polling ONLY!!! */
-
-shm_config_table BSP_shm_cfgtbl;
-
-void Shm_Get_configuration(
- uint32_t localnode,
- shm_config_table **shmcfg
-)
-{
- BSP_shm_cfgtbl.base = 0x0;
- BSP_shm_cfgtbl.length = 1 * MEGABYTE;
- BSP_shm_cfgtbl.format = SHM_BIG;
-
- /*
- * Override cause_intr or shm_isr if your target has
- * special requirements.
- */
-
- BSP_shm_cfgtbl.cause_intr = Shm_Cause_interrupt;
-
-#ifdef NEUTRAL_BIG
- BSP_shm_cfgtbl.convert = NULL_CONVERT;
-#else
- BSP_shm_cfgtbl.convert = CPU_swap_u32;
-#endif
-
- BSP_shm_cfgtbl.poll_intr = POLLED_MODE;
- BSP_shm_cfgtbl.Intr.address = NO_INTERRUPT;
- BSP_shm_cfgtbl.Intr.value = NO_INTERRUPT;
- BSP_shm_cfgtbl.Intr.length = NO_INTERRUPT;
-
- *shmcfg = &BSP_shm_cfgtbl;
-}
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/shmsupp/lock.c b/c/src/lib/libbsp/nios2/nios2_iss/shmsupp/lock.c
deleted file mode 100644
index c0d29adf00..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/shmsupp/lock.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Shared Memory Lock Routines
- *
- * This shared memory locked queue support routine need to be
- * able to lock the specified locked queue. Interrupts are
- * disabled while the queue is locked to prevent preemption
- * and deadlock when two tasks poll for the same lock.
- * previous level.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <bsp.h>
-#include <shm_driver.h>
-
-/*
- * Shm_Initialize_lock
- *
- * Initialize the lock for the specified locked queue.
- */
-
-void Shm_Initialize_lock(
- Shm_Locked_queue_Control *lq_cb
-)
-{
- lq_cb->lock = LQ_UNLOCKED;
-}
-
-/* void _Shm_Lock( &lq_cb )
- *
- * This shared memory locked queue support routine locks the
- * specified locked queue. It disables interrupts to prevent
- * a deadlock condition.
- */
-
-void Shm_Lock(
- Shm_Locked_queue_Control *lq_cb
-)
-{
- uint32_t isr_level;
- uint32_t *lockptr = (uint32_t*) &lq_cb->lock;
- uint32_t lock_value;
-
- lock_value = 0x80000000;
- rtems_interrupt_disable( isr_level );
-
- Shm_isrstat = isr_level;
- while ( lock_value ) {
- asm volatile( ""
- : "=r" (lockptr), "=r" (lock_value)
- : "0" (lockptr), "1" (lock_value)
- );
- /*
- * If not available, then may want to delay to reduce load on lock.
- */
-
- if ( lock_value )
- rtems_bsp_delay( 10 ); /* approximately 10 microseconds */
- }
-}
-
-/*
- * Shm_Unlock
- *
- * Unlock the lock for the specified locked queue.
- */
-
-void Shm_Unlock(
- Shm_Locked_queue_Control *lq_cb
-)
-{
- uint32_t isr_level;
-
- lq_cb->lock = SHM_UNLOCK_VALUE;
- isr_level = Shm_isrstat;
- rtems_interrupt_enable( isr_level );
-}
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/shmsupp/mpisr.c b/c/src/lib/libbsp/nios2/nios2_iss/shmsupp/mpisr.c
deleted file mode 100644
index c5f47933a4..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/shmsupp/mpisr.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Shm_isr_nobsp()
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <bsp.h>
-#include <shm_driver.h>
-
-rtems_isr Shm_isr_nobsp( void )
-{
- /*
- * If this routine has to do anything other than the mpisr.c
- * found in the generic driver, then copy the contents of the generic
- * mpisr.c and augment it to satisfy this particular board. Typically,
- * you need to have a board specific mpisr.c when the interrupt
- * must be cleared.
- *
- * If the generic mpisr.c satisifies your requirements, then
- * remove this routine from your target's shmsupp/mpisb.c file.
- * Then simply install the generic Shm_isr in the Shm_setvec
- * routine below.
- */
-}
-
-/* Shm_setvec
- *
- * This driver routine sets the SHM interrupt vector to point to the
- * driver's SHM interrupt service routine.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- */
-
-void Shm_setvec( void )
-{
- /* XXX: FIX ME!!! */
-}
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/start/crtnn.s b/c/src/lib/libbsp/nios2/nios2_iss/start/crtnn.s
deleted file mode 100644
index f54148f402..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/start/crtnn.s
+++ /dev/null
@@ -1,45 +0,0 @@
-/* NIOS2 crtn.asm fix
- *
- * COPYRIGHT (c) 2005-2006 Kolja Waschk rtemsdev/ixo.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-/* Can't use the original crtn.asm from Altera because it doesn't
- restore the stack pointer correctly (in 5.1b73, the stack pointer
- is further decreased by 48 instead of increased). This is named
- differently (crtnn instead crtn) to make sure it can be picked up
- using custom gcc specs instead of gcc's crtn. - kawk */
-
- .section .init
- ldw ra, 44(sp)
- ldw r23, 40(sp)
- ldw r22, 36(sp)
- ldw r21, 32(sp)
- ldw r20, 28(sp)
- ldw r19, 24(sp)
- ldw r18, 20(sp)
- ldw r17, 16(sp)
- ldw r16, 12(sp)
- ldw fp, 8(sp)
- addi sp, sp, 48
- ret
-
- .section .fini
- ldw ra, 44(sp)
- ldw r23, 40(sp)
- ldw r22, 36(sp)
- ldw r21, 32(sp)
- ldw r20, 28(sp)
- ldw r19, 24(sp)
- ldw r18, 20(sp)
- ldw r17, 16(sp)
- ldw r16, 12(sp)
- ldw fp, 8(sp)
- addi sp, sp, 48
- ret
-
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/start/start.S b/c/src/lib/libbsp/nios2/nios2_iss/start/start.S
deleted file mode 100644
index 532c12616e..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/start/start.S
+++ /dev/null
@@ -1,124 +0,0 @@
-/* NIOS2 startup code
- *
- * This is the entry point on reset and when loading the
- * executive from a bootloader.
- *
- * COPYRIGHT (c) 2005-2006 Kolja Waschk rtemsdev/ixo.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
- .section .entry
- .align 3
- movhi et, %hiadj(start)
- addi et, et, %lo(start)
- jmp et
-
- .section .irq
- .align 3
- movhi et, %hiadj(_exception_vector)
- addi et, et, %lo(_exception_vector)
- jmp et
-
- .section .text
- .align 3
- .globl start
- .type start,@function
-
- .extern _exception_vector
-
-start:
- #------------------------------------------------------
- # disable interrupts
- wrctl status, zero
- wrctl ienable, zero
-
- #------------------------------------------------------
- # invalidate instruction cache
- mov r2, r0
- movhi r3, %hi(__nios2_icache_size)
- ori r3, r3, %lo(__nios2_icache_size)
-icache_init_loop:
- initi r2
- addi r2, r2, __nios2_icache_line_size
- bltu r2, r3, icache_init_loop
-
- #------------------------------------------------------
- # invalidate data cache
- mov r2, r0
- movhi r3, %hi(__nios2_dcache_size)
- ori r3, r3, %lo(__nios2_dcache_size)
-dcache_init_loop:
- initd 0(r2)
- addi r2, r2, __nios2_dcache_line_size
- bltu r2, r3, dcache_init_loop
-
- #------------------------------------------------------
- # initialize stack pointer
- movhi sp, %hiadj(__alt_stack_pointer - 4)
- addi sp, sp, %lo(__alt_stack_pointer - 4)
-
- # initialize global pointer
- movhi gp, %hiadj(_gp)
- addi gp, gp, %lo(_gp)
-
- # initialize exception tmp register
- movhi et, %hiadj(_end)
- addi et, et, %lo(_end)
-
- #------------------------------------------------------
- # TODO: copy data from flash to RAM, if not there already
- # For now its save to assume it is there already when we're
- # loading code though JTAG into RAM-only system
-
- # at least copy exception code to right place
- movhi r2, %hiadj(__ram_exceptions_start)
- addi r2, r2, %lo(__ram_exceptions_start)
-
- movhi r3, %hiadj(brto_ev)
- addi r3, r3, %lo(brto_ev)
- ldw r4, 0(r3)
- stw r4, 0(r2)
- ldw r4, 4(r3)
- stw r4, 4(r2)
- ldw r4, 8(r3)
- stw r4, 8(r2)
- ldw r4, 12(r3)
- stw r4, 12(r2)
-
- #------------------------------------------------------
- # clear bss
- movhi r2, %hiadj(__bss_start)
- addi r2, r2, %lo(__bss_start)
-
- movhi r3, %hiadj(__bss_end)
- addi r3, r3, %lo(__bss_end)
-
- beq r2, r3, 1f
-0:
- stw zero, (r2)
- addi r2, r2, 4
- bltu r2, r3, 0b
-1:
- #------------------------------------------------------
- # jump to (shared) boot_card (never comes back)
- mov r4, zero
- mov r5, zero
- mov r6, zero
- call boot_card
- # but just in case it does come back, stick here.
-_stuck_in_start:
- br _stuck_in_start
-
- #------------------------------------------------------
- # code to be placed at exception address
-brto_ev:
- movhi et, %hiadj(_exception_vector)
- addi et, et, %lo(_exception_vector)
- jmp et
-
-
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/startup/bspclean.c b/c/src/lib/libbsp/nios2/nios2_iss/startup/bspclean.c
deleted file mode 100644
index b38f0e1d57..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/startup/bspclean.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* bsp_cleanup()
- *
- * This routine normally is part of start.s and usually returns
- * control to a monitor.
- *
- * INPUT: NONE
- *
- * OUTPUT: NONE
- *
- * COPYRIGHT (c) 2005-2006 Kolja Waschk rtemsdev/ixo.de
- * Derived from no_cpu/no_bsp/startup/bspclean.c 1.7.
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <bsp.h>
-#include <rtems/score/cpu.h>
-
-void bsp_cleanup( void )
-{
- int level;
- _CPU_ISR_Disable(level);
- for(;;);
-}
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/startup/bspstart.c b/c/src/lib/libbsp/nios2/nios2_iss/startup/bspstart.c
deleted file mode 100644
index 8317b59516..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/startup/bspstart.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * This routine starts the application. It includes application,
- * board, and monitor specific initialization and configuration.
- * The generic CPU dependent initialization has been performed
- * before this routine is invoked.
- *
- * COPYRIGHT (c) 2005-2006 Kolja Waschk rtemsdev/ixo.de
- * Derived from no_cpu/no_bsp/startup/bspstart.c 1.23.
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include <string.h>
-
-#include <bsp.h>
-#include <rtems/libio.h>
-#include <rtems/libcsupport.h>
-
-/*
- * The original table from the application and our copy of it with
- * some changes.
- */
-
-extern rtems_configuration_table Configuration;
-
-rtems_configuration_table BSP_Configuration;
-
-rtems_cpu_table Cpu_table;
-
-/*
- * Use the shared implementations of the following routines
- */
-
-extern void bsp_postdriver_hook(void);
-extern void bsp_libc_init( void *, uint32_t, int );
-extern rtems_configuration_table BSP_Configuration;
-
-#if 0
-extern char _RAMBase[];
-extern char _RAMSize[];
-extern char _WorkspaceBase[];
-extern char _HeapSize[];
-#else
-extern char __alt_heap_start[];
-#endif
-
-/*
- * Function: bsp_pretasking_hook
- * Created: 95/03/10
- *
- * Description:
- * BSP pretasking hook. Called just before drivers are initialized.
- * Used to setup libc and install any BSP extensions.
- *
- * NOTES:
- * Must not use libc (to do io) from here, since drivers are
- * not yet initialized.
- *
- */
-
-void bsp_pretasking_hook(void)
-{
- unsigned long heapStart;
-#if 0
- unsigned long heapSize = (unsigned long)_HeapSize;
-#endif
- unsigned long ramSpace;
-
- heapStart = (unsigned long)BSP_Configuration.work_space_start
- + BSP_Configuration.work_space_size;
-
- if (heapStart & (CPU_ALIGNMENT-1))
- heapStart = (heapStart + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
-
-#if 0
- ramSpace = (unsigned long)_RAMBase + (unsigned long)_RAMSize - heapStart;
-#else
-#if 0
- ramSpace = SRAM_0_BASE
- + (SRAM_0_SRAM_MEMORY_SIZE * SRAM_0_SRAM_MEMORY_UNITS)
- - heapStart;
-#else
- ramSpace = RAM_BASE + RAM_BYTES - heapStart;
-#endif
-#endif
-
- /* TODO */
- ramSpace -= 16384; /* Space for initial stack, not to be zeroed */
-
-#if 0
- if (heapSize < 10)
- heapSize = ramSpace;
- else if (heapSize > ramSpace)
- rtems_fatal_error_occurred (('H'<<24) | ('E'<<16) | ('A'<<8) | 'P');
-
- bsp_libc_init((void *)heapStart, heapSize, 0);
-#else
- bsp_libc_init((void *)heapStart, ramSpace, 0);
-#endif
-
-#ifdef RTEMS_DEBUG
- rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
-#endif
-}
-
-/*
- * bsp_start
- *
- * This routine does the bulk of the system initialization.
- */
-
-void bsp_start( void )
-{
- /* Fixed */
-
- BSP_Configuration.microseconds_per_tick = 1000;
-
- /*
- * Need to "allocate" the memory for the RTEMS Workspace and
- * tell the RTEMS configuration where it is. This memory is
- * not malloc'ed. It is just "pulled from the air".
- */
-
-#if 0
- BSP_Configuration.work_space_start = (void *)_WorkspaceBase;
-#else
- BSP_Configuration.work_space_start = (void *)__alt_heap_start;
-#endif
-
- /*
- * initialize the CPU table for this BSP
- */
-
- Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
- Cpu_table.postdriver_hook = bsp_postdriver_hook;
- Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
-}
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/startup/linkcmds b/c/src/lib/libbsp/nios2/nios2_iss/startup/linkcmds
deleted file mode 100644
index 7128baf9c2..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/startup/linkcmds
+++ /dev/null
@@ -1,331 +0,0 @@
-/* generated.x
- *
- * Machine generated for a CPU named "cpu_0" as defined in:
- * D:\eb2_nios2\kawkos.ptf
- *
- * Generated: 2005-07-10 11:52:46.899
- *
- */
-
-/*
-
-DO NOT MODIFY THIS FILE
-
- Changing this file will have subtle consequences
- which will almost certainly lead to a nonfunctioning
- system. If you do modify this file, be aware that your
- changes will be overwritten and lost when this file
- is generated again.
-
-DO NOT MODIFY THIS FILE
-
-*/
-
-MEMORY
-{
- reset : ORIGIN = 0x00000000, LENGTH = 0x00000600
- exceptions : ORIGIN = 0x00000600, LENGTH = 0x00000A00
- onchip_memory_0 : ORIGIN = 0x00001000, LENGTH = 0x007FF000
-}
-
- /* Define symbols for each memory base-address */
- __alt_mem_onchip_memory_0 = 0x00000000 ;
-
- __nios2_icache_size = 4096 ;
- __nios2_icache_line_size = 32 ;
- __nios2_dcache_size = 0 ;
- __nios2_dcache_line_size = 4 ;
-
-OUTPUT_FORMAT( "elf32-littlenios2",
- "elf32-littlenios2",
- "elf32-littlenios2" )
-OUTPUT_ARCH( nios2 )
-ENTRY( _start )
-
-/* Do we need any of these for elf?
- __DYNAMIC = 0;
- */
-
-SECTIONS
-{
- .entry :
- {
- KEEP (*(.entry))
- } > reset
-
- .exceptions :
- {
- PROVIDE (__ram_exceptions_start = ABSOLUTE(.));
- . = ALIGN(0x20);
- *(.irq)
- KEEP (*(.exceptions.entry.label));
- KEEP (*(.exceptions.entry.user));
- KEEP (*(.exceptions.entry));
- KEEP (*(.exceptions.irqtest.user));
- KEEP (*(.exceptions.irqtest));
- KEEP (*(.exceptions.irqhandler.user));
- KEEP (*(.exceptions.irqhandler));
- KEEP (*(.exceptions.irqreturn.user));
- KEEP (*(.exceptions.irqreturn));
- KEEP (*(.exceptions.notirq.label));
- KEEP (*(.exceptions.notirq.user));
- KEEP (*(.exceptions.notirq));
- KEEP (*(.exceptions.soft.user));
- KEEP (*(.exceptions.soft));
- KEEP (*(.exceptions.unknown.user));
- KEEP (*(.exceptions.unknown));
- KEEP (*(.exceptions.exit.label));
- KEEP (*(.exceptions.exit.user));
- KEEP (*(.exceptions.exit));
- KEEP (*(.exceptions));
- PROVIDE (__ram_exceptions_end = ABSOLUTE(.));
- } > exceptions
-
- PROVIDE (__flash_exceptions_start = LOADADDR(.exceptions));
-
- .text :
- {
- /*
- * All code sections are merged into the text output section, along with
- * the read only data sections.
- *
- */
-
- PROVIDE (stext = ABSOLUTE(.));
-
- *(.interp)
- *(.hash)
- *(.dynsym)
- *(.dynstr)
- *(.gnu.version)
- *(.gnu.version_d)
- *(.gnu.version_r)
- *(.rel.init)
- *(.rela.init)
- *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
- *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
- *(.rel.fini)
- *(.rela.fini)
- *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
- *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
- *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
- *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
- *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
- *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
- *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
- *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
- *(.rel.ctors)
- *(.rela.ctors)
- *(.rel.dtors)
- *(.rela.dtors)
- *(.rel.got)
- *(.rela.got)
- *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
- *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
- *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
- *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
- *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
- *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
- *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
- *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
- *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
- *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
- *(.rel.plt)
- *(.rela.plt)
-
- KEEP (*(.init))
- *(.plt)
- *(.text .stub .text.* .gnu.linkonce.t.*)
-
- /* Special FreeBSD sysctl sections. */
- . = ALIGN (16);
- __start_set_sysctl_set = .;
- *(set_sysctl_*);
- __stop_set_sysctl_set = ABSOLUTE(.);
- *(set_domain_*);
- *(set_pseudo_*);
-
-/* .gnu.warning sections are handled specially by elf32.em. */
-
- *(.gnu.warning.*)
- KEEP (*(.fini))
- PROVIDE (__etext = ABSOLUTE(.));
- PROVIDE (_etext = ABSOLUTE(.));
- PROVIDE (etext = ABSOLUTE(.));
-
- *(.eh_frame_hdr)
- /* Ensure the __preinit_array_start label is properly aligned. We
- could instead move the label definition inside the section, but
- the linker would then create the section even if it turns out to
- be empty, which isn't pretty. */
- . = ALIGN(32 / 8);
- PROVIDE (__preinit_array_start = ABSOLUTE(.));
- *(.preinit_array)
- PROVIDE (__preinit_array_end = ABSOLUTE(.));
- PROVIDE (__init_array_start = ABSOLUTE(.));
- *(.init_array)
- PROVIDE (__init_array_end = ABSOLUTE(.));
- PROVIDE (__fini_array_start = ABSOLUTE(.));
- *(.fini_array)
- PROVIDE (__fini_array_end = ABSOLUTE(.));
- SORT(CONSTRUCTORS)
- KEEP (*(.eh_frame))
- *(.gcc_except_table)
- *(.dynamic)
- PROVIDE (__CTOR_LIST__ = ABSOLUTE(.));
- KEEP (*(.ctors))
- KEEP (*(SORT(.ctors.*)))
- PROVIDE (__CTOR_END__ = ABSOLUTE(.));
- PROVIDE (__DTOR_LIST__ = ABSOLUTE(.));
- KEEP (*(.dtors))
- KEEP (*(SORT(.dtors.*)))
- PROVIDE (__DTOR_END__ = ABSOLUTE(.));
- KEEP (*(.jcr))
- . = ALIGN(32 / 8);
- } > onchip_memory_0 = 0x3a880100 /* NOP on Nios2 (big endian) */
-
- .rodata :
- {
- PROVIDE (__ram_rodata_start = ABSOLUTE(.));
- . = ALIGN(32 / 8);
- *(.rodata .rodata.* .gnu.linkonce.r.*)
- *(.rodata1)
- . = ALIGN(32 / 8);
- PROVIDE (__ram_rodata_end = ABSOLUTE(.));
- } > onchip_memory_0
-
- PROVIDE (__flash_rodata_start = LOADADDR(.rodata));
-
- .rwdata :
- {
- PROVIDE (__ram_rwdata_start = ABSOLUTE(.));
- . = ALIGN(32 / 8);
- *(.got.plt) *(.got)
- *(.data1)
- *(.data .data.* .gnu.linkonce.d.*)
-
- _gp = ABSOLUTE(. + 0x8000);
- PROVIDE(gp = _gp);
-
- *(.sdata .sdata.* .gnu.linkonce.s.*)
- *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
-
- . = ALIGN(32 / 8);
- _edata = ABSOLUTE(.);
- PROVIDE (edata = ABSOLUTE(.));
- PROVIDE (__ram_rwdata_end = ABSOLUTE(.));
- } > onchip_memory_0
-
- PROVIDE (__flash_rwdata_start = LOADADDR(.rwdata));
-
- .bss :
- {
- __bss_start = ABSOLUTE(.);
- PROVIDE (__sbss_start = ABSOLUTE(.));
- PROVIDE (___sbss_start = ABSOLUTE(.));
-
- *(.dynsbss)
- *(.sbss .sbss.* .gnu.linkonce.sb.*)
- *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
- *(.scommon)
-
- PROVIDE (__sbss_end = ABSOLUTE(.));
- PROVIDE (___sbss_end = ABSOLUTE(.));
-
- *(.dynbss)
- *(.bss .bss.* .gnu.linkonce.b.*)
- *(COMMON)
-
- . = ALIGN(32 / 8);
- __bss_end = ABSOLUTE(.);
- } > onchip_memory_0
-
- /*
- * One output section for each of the available partitions. These are not
- * used by default, but can be used by users applications using the .section
- * directive.
- *
- * The memory partition used for the heap is treated in special way, i.e. a
- * symbol is added to point to the heap start.
- *
- * Note that when running from flash, these sections are not loaded by the
- * HAL.
- *
- */
-
- .onchip_memory_0 :
- {
- PROVIDE (_alt_partition_onchip_memory_0_start = ABSOLUTE(.));
- *(.onchip_memory_0 .onchip_memory_0.*)
- . = ALIGN(32 / 8);
- PROVIDE (_alt_partition_onchip_memory_0_end = ABSOLUTE(.));
- _end = ABSOLUTE(.);
- end = ABSOLUTE(.);
-
- } > onchip_memory_0
-
- PROVIDE (_alt_partition_onchip_memory_0_load_addr = LOADADDR(.onchip_memory_0));
-
- /*
- * Stabs debugging sections.
- *
- */
-
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
-
- /* Altera debug extensions */
- .debug_alt_sim_info 0 : { *(.debug_alt_sim_info) }
-}
-/* provide a pointer for the stack */
-
-/*
- * Don't override this, override the __alt_stack_* symbols instead.
- */
-__alt_data_end = 0x00800000;
-
-/*
- * The next two symbols define the location of the default stack. You can
- * override them to move the stack to a different memory.
- */
-PROVIDE( __alt_stack_pointer = __alt_data_end );
-PROVIDE( __alt_stack_limit = _end );
-
-/*
- * This symbol controls where the start of the heap is. If the stack is
- * contiguous with the heap then the stack will contract as memory is
- * allocated to the heap.
- * Override this symbol to put the heap in a different memory.
- */
-PROVIDE( __alt_heap_start = end );
-
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/startup/main.c b/c/src/lib/libbsp/nios2/nios2_iss/startup/main.c
deleted file mode 100644
index 4e28f28fe2..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/startup/main.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* main()
- *
- * This is the entry point for the application. It calls
- * the bsp_start routine to the actual dirty work.
- *
- * COPYRIGHT (c) 2005-2006 Kolja Waschk rtemsdev/ixo.de
- * Derived from no_cpu/no_bsp/startup/main.c 1.9,
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <bsp.h>
-
-int main(
- int argc,
- char **argv,
- char **environp
-)
-{
- extern void bsp_start( int, char**, char ** );
-
- bsp_start( argc, argv, environp );
-
- /*
- * May be able to return to the "crt/start.s" code but also
- * may not be able to. Do something here which is board dependent.
- */
-
- rtems_fatal_error_occurred( 0 );
-
- return 0; /* just to satisfy the native compiler */
-}
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/startup/setvec.c b/c/src/lib/libbsp/nios2/nios2_iss/startup/setvec.c
deleted file mode 100644
index a35618a8c5..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/startup/setvec.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* set_vector
- *
- * This routine installs an interrupt vector on the target Board/CPU.
- * This routine is allowed to be as board dependent as necessary.
- *
- * INPUT:
- * handler - interrupt handler entry point
- * vector - vector number
- * type - 0 indicates raw hardware connect
- * 1 indicates RTEMS interrupt connect
- *
- * RETURNS:
- * address of previous interrupt handler
- *
- * COPYRIGHT (c) 2005-2006 Kolja Waschk rtemsdev/ixo.de
- * Derived from no_cpu/no_bsp/startup/setvec.c 1.8,
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <bsp.h>
-
-nios2_isr_entry set_vector( /* returns old vector */
- rtems_isr_entry handler, /* isr routine */
- rtems_vector_number vector, /* vector number */
- int type /* RTEMS or RAW intr */
-)
-{
- nios2_isr_entry previous_isr;
-
- if ( type )
- rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr );
- else {
- /* XXX: install non-RTEMS ISR as "raw" interupt */
- }
- return previous_isr;
-}
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c b/c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c
deleted file mode 100644
index 18ddb2bf4f..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/* timer.c
- *
- * This file manages the benchmark timer used by the RTEMS Timing Test
- * Suite. Each measured time period is demarcated by calls to
- * Timer_initialize() and Read_timer(). Read_timer() usually returns
- * the number of microseconds since Timer_initialize() exitted.
- *
- * NOTE: It is important that the timer start/stop overhead be
- * determined when porting or modifying this code.
- *
- * COPYRIGHT (c) 2005-2006 Kolja Waschk rtemsdev/ixo.de
- * Derived from no_cpu/no_bsp/timer/timer.c 1.9,
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#define TIMER_WRAPS_AFTER_1MS 0
-
-#include <rtems.h>
-#include <rtems/score/cpu.h>
-#include <bsp.h>
-
-volatile uint32_t Timer_interrupts;
-rtems_boolean Timer_driver_Find_average_overhead;
-
-#define TIMER_REGS ((altera_avalon_timer_regs*)NIOS2_IO_BASE(TIMER_BASE))
-
-void timerisr( void )
-{
- TIMER_REGS->status = 0;
- Timer_interrupts++;
-}
-
-void Timer_initialize( void )
-{
- uint32_t old_ie;
-
- /* Disable timer interrupt, stop timer */
-
- TIMER_REGS->control = ALTERA_AVALON_TIMER_CONTROL_STOP_MSK;
-
- set_vector((nios2_isr_entry *)timerisr, TIMER_VECTOR, 1);
-
- /* Enable interrupt processing */
-
- NIOS2_IENABLE(1 << TIMER_VECTOR);
-
-#if TIMER_WRAPS_AFTER_1MS
- /* Writing to periodl/h resets the counter and eventually
- stops it. If the timer hasn't been configured with fixed
- period, set it to 1 ms now */
-
- TIMER_REGS->period_hi = (TIMER_FREQ/1000)>>16;
- TIMER_REGS->period_lo = (TIMER_FREQ/1000)&0xFFFF;
-#else
- /* Writing to periodl/h resets the counter and eventually
- stops it. Set max period */
-
- TIMER_REGS->period_hi = 0xFFFF;
- TIMER_REGS->period_lo = 0xFFFF;
-#endif
-
- /* For timers that can be stopped, writing to periodl/h
- also stopped the timer and we have to manually start it. */
-
- TIMER_REGS->control = ALTERA_AVALON_TIMER_CONTROL_ITO_MSK |
- ALTERA_AVALON_TIMER_CONTROL_CONT_MSK |
- ALTERA_AVALON_TIMER_CONTROL_START_MSK;
-
- /* This is the most safe place for resetting the overflow
- counter - just _after_ we reset the timer. Depending
- on the SOPC configuration, the counter may not be
- stoppable and it doesn't make sense to assume that
- there is any "safe" period before resetting. */
-
- Timer_interrupts = 0;
-}
-
-/*
- * The following controls the behavior of Read_timer().
- *
- * AVG_OVEREHAD is the overhead for starting and stopping the timer. It
- * is usually deducted from the number returned.
- *
- * LEAST_VALID is the lowest number this routine should trust. Numbers
- * below this are "noise" and zero is returned.
- */
-
-#define AVG_OVERHEAD 2 /* It typically takes 2 microseconds */
- /* to start/stop the timer. */
-
-#define LEAST_VALID AVG_OVERHEAD /* Don't trust a value lower than this */
-
-int Read_timer( void )
-{
- uint32_t timer_wraps;
- uint32_t timer_snap;
- uint32_t timer_ticks;
- uint32_t total;
- uint32_t old_ie;
-
- /* Hold timer */
- TIMER_REGS->control = ALTERA_AVALON_TIMER_CONTROL_STOP_MSK;
-
- /* Write to request snapshot of timer value */
- TIMER_REGS->snap_lo = 0;
- /* Get snapshot */
- timer_snap = ((TIMER_REGS->snap_hi)<<16) | TIMER_REGS->snap_lo;
- timer_wraps = Timer_interrupts;
-
- /* Restart timer */
- TIMER_REGS->control = ALTERA_AVALON_TIMER_CONTROL_START_MSK;
-
-#if TIMER_WRAPS_AFTER_1MS
- timer_ticks = (TIMER_FREQ / 1000) - 1 - timer_snap;
- total = timer_wraps * 1000;
-#else
- timer_ticks = 0xFFFFFFFF - timer_snap;
- total = timer_wraps * 0x80000000 / (TIMER_FREQ / 2000000L);
-#endif
- total += timer_ticks / (TIMER_FREQ / 1000000L);
-
- if(total < LEAST_VALID) return 0;
-
- if(Timer_driver_Find_average_overhead != TRUE) total-= AVG_OVERHEAD;
-
- return total;
-}
-
-/*
- * Empty function call used in loops to measure basic cost of looping
- * in Timing Test Suite.
- */
-
-rtems_status_code Empty_function( void )
-{
- return RTEMS_SUCCESSFUL;
-}
-
-void Set_find_average_overhead(
- rtems_boolean find_flag
-)
-{
- Timer_driver_Find_average_overhead = find_flag;
-}
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/times b/c/src/lib/libbsp/nios2/nios2_iss/times
deleted file mode 100644
index 2ac0b9ee22..0000000000
--- a/c/src/lib/libbsp/nios2/nios2_iss/times
+++ /dev/null
@@ -1,194 +0,0 @@
-#
-# Timing Test Suite Results for the NO_BSP
-#
-# NOTE: This is just a template. The times are irrelevant since this BSP
-# can only be compiled -- not executed.
-#
-# $Id$
-#
-
-Board:
-CPU: include coprocessor if applicable
-Clock Speed:
-Memory Configuration: SRAM, DRAM, cache, etc
-Wait States:
-
-Times Reported in: cycles, microseconds, etc
-Timer Source: Count Down Timer, on-CPU cycle counter, etc
-
-Column X:
-Column Y:
-
-# DESCRIPTION A B
-== ================================================================= ==== ====
- 1 rtems_semaphore_create 20
- rtems_semaphore_delete 21
- rtems_semaphore_obtain: available 15
- rtems_semaphore_obtain: not available -- NO_WAIT 15
- rtems_semaphore_release: no waiting tasks 16
-
- 2 rtems_semaphore_obtain: not available -- caller blocks 62
-
- 3 rtems_semaphore_release: task readied -- preempts caller 55
-
- 4 rtems_task_restart: blocked task -- preempts caller 77
- rtems_task_restart: ready task -- preempts caller 70
- rtems_semaphore_release: task readied -- returns to caller 25
- rtems_task_create 57
- rtems_task_start 31
- rtems_task_restart: suspended task -- returns to caller 36
- rtems_task_delete: suspended task 47
- rtems_task_restart: ready task -- returns to caller 37
- rtems_task_restart: blocked task -- returns to caller 46
- rtems_task_delete: blocked task 50
-
- 5 rtems_task_suspend: calling task 51
- rtems_task_resume: task readied -- preempts caller 49
-
- 6 rtems_task_restart: calling task 59
- rtems_task_suspend: returns to caller 18
- rtems_task_resume: task readied -- returns to caller 19
- rtems_task_delete: ready task 50
-
- 7 rtems_task_restart: suspended task -- preempts caller 70
-
- 8 rtems_task_set_priority: obtain current priority 12
- rtems_task_set_priority: returns to caller 27
- rtems_task_mode: obtain current mode 5
- rtems_task_mode: no reschedule 5
- rtems_task_mode: reschedule -- returns to caller 8
- rtems_task_mode: reschedule -- preempts caller 39
- rtems_task_set_note 13
- rtems_task_get_note 13
- rtems_clock_set 33
- rtems_clock_get 3
-
- 9 rtems_message_queue_create 110
- rtems_message_queue_send: no waiting tasks 37
- rtems_message_queue_urgent: no waiting tasks 37
- rtems_message_queue_receive: available 31
- rtems_message_queue_flush: no messages flushed 12
- rtems_message_queue_flush: messages flushed 16
- rtems_message_queue_delete 26
-
-10 rtems_message_queue_receive: not available -- NO_WAIT 15
- rtems_message_queue_receive: not available -- caller blocks 62
-
-11 rtems_message_queue_send: task readied -- preempts caller 72
-
-12 rtems_message_queue_send: task readied -- returns to caller 39
-
-13 rtems_message_queue_urgent: task readied -- preempts caller 72
-
-14 rtems_message_queue_urgent: task readied -- returns to caller 39
-
-15 rtems_event_receive: obtain current events 1
- rtems_event_receive: not available -- NO_WAIT 12
- rtems_event_receive: not available -- caller blocks 56
- rtems_event_send: no task readied 12
- rtems_event_receive: available 12
- rtems_event_send: task readied -- returns to caller 24
-
-16 rtems_event_send: task readied -- preempts caller 55
-
-17 rtems_task_set_priority: preempts caller 62
-
-18 rtems_task_delete: calling task 83
-
-19 rtems_signal_catch 9
- rtems_signal_send: returns to caller 15
- rtems_signal_send: signal to self 18
- exit ASR overhead: returns to calling task 22
- exit ASR overhead: returns to preempting task 49
-
-20 rtems_partition_create 35
- rtems_region_create 23
- rtems_partition_get_buffer: available 15
- rtems_partition_get_buffer: not available 13
- rtems_partition_return_buffer 18
- rtems_partition_delete 16
- rtems_region_get_segment: available 22
- rtems_region_get_segment: not available -- NO_WAIT 21
- rtems_region_return_segment: no waiting tasks 19
- rtems_region_get_segment: not available -- caller blocks 64
- rtems_region_return_segment: task readied -- preempts caller 74
- rtems_region_return_segment: task readied -- returns to caller 44
- rtems_region_delete 16
- rtems_io_initialize 2
- rtems_io_open 1
- rtems_io_close 1
- rtems_io_read 1
- rtems_io_write 1
- rtems_io_control 1
-
-21 rtems_task_ident 149
- rtems_message_queue_ident 145
- rtems_semaphore_ident 156
- rtems_partition_ident 145
- rtems_region_ident 148
- rtems_port_ident 145
- rtems_timer_ident 145
- rtems_rate_monotonic_ident 145
-
-22 rtems_message_queue_broadcast: task readied -- returns to caller 42
- rtems_message_queue_broadcast: no waiting tasks 17
- rtems_message_queue_broadcast: task readied -- preempts caller 78
-
-23 rtems_timer_create 14
- rtems_timer_fire_after: inactive 22
- rtems_timer_fire_after: active 24
- rtems_timer_cancel: active 15
- rtems_timer_cancel: inactive 13
- rtems_timer_reset: inactive 21
- rtems_timer_reset: active 23
- rtems_timer_fire_when: inactive 34
- rtems_timer_fire_when: active 34
- rtems_timer_delete: active 19
- rtems_timer_delete: inactive 17
- rtems_task_wake_when 69
-
-24 rtems_task_wake_after: yield -- returns to caller 9
- rtems_task_wake_after: yields -- preempts caller 45
-
-25 rtems_clock_tick 4
-
-26 _ISR_Disable 0
- _ISR_Flash 1
- _ISR_Enable 1
- _Thread_Disable_dispatch 0
- _Thread_Enable_dispatch 7
- _Thread_Set_state 11
- _Thread_Disptach (NO FP) 31
- context switch: no floating point contexts 21
- context switch: self 10
- context switch: to another task 10
- context switch: restore 1st FP task 25
- fp context switch: save idle, restore idle 31
- fp context switch: save idle, restore initialized 19
- fp context switch: save initialized, restore initialized 20
- _Thread_Resume 7
- _Thread_Unblock 7
- _Thread_Ready 9
- _Thread_Get 4
- _Semaphore_Get 2
- _Thread_Get: invalid id 0
-
-27 interrupt entry overhead: returns to interrupted task 6
- interrupt exit overhead: returns to interrupted task 6
- interrupt entry overhead: returns to nested interrupt 6
- interrupt exit overhead: returns to nested interrupt 5
- interrupt entry overhead: returns to preempting task 7
- interrupt exit overhead: returns to preempting task 36
-
-28 rtems_port_create 16
- rtems_port_external_to_internal 11
- rtems_port_internal_to_external 11
- rtems_port_delete 16
-
-29 rtems_rate_monotonic_create 15
- rtems_rate_monotonic_period: initiate period -- returns to caller 21
- rtems_rate_monotonic_period: obtain status 13
- rtems_rate_monotonic_cancel 16
- rtems_rate_monotonic_delete: inactive 18
- rtems_rate_monotonic_delete: active 20
- rtems_rate_monotonic_period: conclude periods -- caller blocks 53
diff --git a/c/src/lib/libcpu/nios2/.cvsignore b/c/src/lib/libcpu/nios2/.cvsignore
deleted file mode 100644
index bfdfd995be..0000000000
--- a/c/src/lib/libcpu/nios2/.cvsignore
+++ /dev/null
@@ -1,14 +0,0 @@
-aclocal.m4
-autom4te*.cache
-config.cache
-config.guess
-config.log
-config.status
-config.sub
-configure
-depcomp
-install-sh
-Makefile
-Makefile.in
-missing
-mkinstalldirs
diff --git a/c/src/lib/libcpu/nios2/ChangeLog b/c/src/lib/libcpu/nios2/ChangeLog
deleted file mode 100644
index 4e2ce9f68e..0000000000
--- a/c/src/lib/libcpu/nios2/ChangeLog
+++ /dev/null
@@ -1,4 +0,0 @@
-2006-08-10 Joel Sherrill <joel@OARcorp.com>
-
- * ChangeLog: New file.
-
diff --git a/c/src/lib/libcpu/nios2/Makefile.am b/c/src/lib/libcpu/nios2/Makefile.am
deleted file mode 100644
index 25283a4d4f..0000000000
--- a/c/src/lib/libcpu/nios2/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-##
-## $Id$
-##
-
-ACLOCAL_AMFLAGS = -I ../../../aclocal
-
-include $(top_srcdir)/../../../automake/compile.am
-
-CLEANFILES =
-DISTCLEANFILES =
-noinst_PROGRAMS =
-
-if shared
-include_libcpudir = $(includedir)/libcpu
-
-## shared/cache
-include_libcpu_HEADERS = ../shared/include/cache.h
-noinst_PROGRAMS += shared/cache.rel
-shared_cache_rel_SOURCES = shared/cache/cache.c shared/cache/cache_.h \
- ../shared/src/cache_aligned_malloc.c \
- ../shared/src/cache_manager.c
-shared_cache_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
-shared_cache_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
-
-## shared/misc
-noinst_PROGRAMS += shared/misc.rel
-shared_misc_rel_SOURCES = shared/misc/memcpy.c
-shared_misc_rel_CPPFLAGS = $(AM_CPPFLAGS) $(NIOS2_CPPFLAGS)
-shared_misc_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
-endif
-
-include $(srcdir)/preinstall.am
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/lib/libcpu/nios2/configure.ac b/c/src/lib/libcpu/nios2/configure.ac
deleted file mode 100644
index b50f2e1431..0000000000
--- a/c/src/lib/libcpu/nios2/configure.ac
+++ /dev/null
@@ -1,33 +0,0 @@
-## Process this file with autoconf to produce a configure script.
-##
-## $Id$
-
-AC_PREREQ(2.59)
-AC_INIT([rtems-c-src-lib-libcpu-nios2],[_RTEMS_VERSION],[rtems-bugs@rtems.com])
-RTEMS_TOP([../../../../..],[../../..])
-
-RTEMS_CANONICAL_TARGET_CPU
-
-AM_INIT_AUTOMAKE([no-define foreign subdir-objects 1.9])
-AM_MAINTAINER_MODE
-
-RTEMS_ENV_RTEMSBSP
-
-RTEMS_PROJECT_ROOT
-
-RTEMS_PROG_CC_FOR_TARGET
-AM_PROG_CC_C_O
-RTEMS_CANONICALIZE_TOOLS
-RTEMS_PROG_CCAS
-
-# At this time all models should use the shared directory so do this
-AM_CONDITIONAL(shared, true)
-
-AC_PATH_PROG([AMPOLISH3],[ampolish3],[])
-AM_CONDITIONAL([AMPOLISH3],[test x"$USE_MAINTAINER_MODE" = x"yes" \
- && test -n "$AMPOLISH3"])
-
-# Explicitly list all Makefiles here
-AC_CONFIG_FILES([Makefile
-])
-AC_OUTPUT
diff --git a/c/src/lib/libcpu/nios2/preinstall.am b/c/src/lib/libcpu/nios2/preinstall.am
deleted file mode 100644
index 13120b897a..0000000000
--- a/c/src/lib/libcpu/nios2/preinstall.am
+++ /dev/null
@@ -1,26 +0,0 @@
-## Automatically generated by ampolish3 - Do not edit
-
-if AMPOLISH3
-$(srcdir)/preinstall.am: Makefile.am
- $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
-endif
-
-PREINSTALL_DIRS =
-DISTCLEANFILES += $(PREINSTALL_DIRS)
-
-PREINSTALL_FILES =
-CLEANFILES += $(PREINSTALL_FILES)
-
-if shared
-$(PROJECT_INCLUDE)/libcpu/$(dirstamp):
- @$(mkdir_p) $(PROJECT_INCLUDE)/libcpu
- @: > $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
-
-$(PROJECT_INCLUDE)/libcpu/cache.h: ../shared/include/cache.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/cache.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/cache.h
-
-endif
-
-
diff --git a/c/src/lib/libcpu/nios2/shared/cache/cache.c b/c/src/lib/libcpu/nios2/shared/cache/cache.c
deleted file mode 100644
index 25802a3999..0000000000
--- a/c/src/lib/libcpu/nios2/shared/cache/cache.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Cache Management Support Routines for the MC68040
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include "cache_.h"
-
-/*
- * CACHE MANAGER: The following functions are CPU-specific.
- * They provide the basic implementation for the rtems_* cache
- * management routines. If a given function has no meaning for the CPU,
- * it does nothing by default.
- */
-
-void _CPU_cache_freeze_data ( void ) {}
-void _CPU_cache_unfreeze_data ( void ) {}
-void _CPU_cache_freeze_instruction ( void ) {}
-void _CPU_cache_unfreeze_instruction ( void ) {}
-
-void _CPU_cache_flush_1_data_line (
- const void * d_addr )
-{
- void * p_address = (void *) _CPU_virtual_to_physical( d_addr );
-}
-
-void _CPU_cache_invalidate_1_data_line (
- const void * d_addr )
-{
- void * p_address = (void *) _CPU_virtual_to_physical( d_addr );
-}
-
-void _CPU_cache_flush_entire_data ( void )
-{
-}
-
-void _CPU_cache_invalidate_entire_data ( void )
-{
-}
-
-void _CPU_cache_enable_data ( void )
-{
-}
-
-void _CPU_cache_disable_data ( void )
-{
-}
-
-void _CPU_cache_invalidate_1_instruction_line (
- const void * i_addr )
-{
- void * p_address = (void *) _CPU_virtual_to_physical( i_addr );
-}
-
-void _CPU_cache_invalidate_entire_instruction ( void )
-{
-}
-
-void _CPU_cache_enable_instruction ( void )
-{
-}
-
-void _CPU_cache_disable_instruction ( void )
-{
-}
-/* end of file */
diff --git a/c/src/lib/libcpu/nios2/shared/cache/cache_.h b/c/src/lib/libcpu/nios2/shared/cache/cache_.h
deleted file mode 100644
index 62a9fd8541..0000000000
--- a/c/src/lib/libcpu/nios2/shared/cache/cache_.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * M68K Cache Manager Support
- */
-
-#ifndef __M68K_CACHE_h
-#define __M68K_CACHE_h
-
-#if (defined(__mc68020__) && !defined(__mcpu32__))
-# define M68K_INSTRUCTION_CACHE_ALIGNMENT 16
-#elif defined(__mc68030__)
-# define M68K_INSTRUCTION_CACHE_ALIGNMENT 16
-# define M68K_DATA_CACHE_ALIGNMENT 16
-#elif ( defined(__mc68040__) || defined (__mc68060__) )
-# define M68K_INSTRUCTION_CACHE_ALIGNMENT 16
-# define M68K_DATA_CACHE_ALIGNMENT 16
-#elif ( defined(__mcf5200__) )
-# define M68K_INSTRUCTION_CACHE_ALIGNMENT 16
-# if ( defined(__mcf528x__) )
-# define M68K_DATA_CACHE_ALIGNMENT 16
-# endif
-#endif
-
-#if defined(M68K_DATA_CACHE_ALIGNMENT)
-#define CPU_DATA_CACHE_ALIGNMENT M68K_DATA_CACHE_ALIGNMENT
-#endif
-
-#if defined(M68K_INSTRUCTION_CACHE_ALIGNMENT)
-#define CPU_INSTRUCTION_CACHE_ALIGNMENT M68K_INSTRUCTION_CACHE_ALIGNMENT
-#endif
-
-#include <libcpu/cache.h>
-
-#endif
-/* end of include file */
diff --git a/c/src/lib/libcpu/nios2/shared/misc/memcpy.c b/c/src/lib/libcpu/nios2/shared/misc/memcpy.c
deleted file mode 100644
index ceae3c6548..0000000000
--- a/c/src/lib/libcpu/nios2/shared/misc/memcpy.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * C library memcpy routine
- *
- * This routine shall get code to optimize performance on NIOS II
- *
- * The routine is placed in this source directory to ensure that it
- * is picked up by all applications.
- */
-
-#include <string.h>
-
-void *
-memcpy(void *s1, const void *s2, size_t n)
-{
- char *p1 = s1;
- const char *p2 = s2;
- size_t left = n;
-
- while(left > 0) *(p1++) = *(p2++);
- return s1;
-}
diff --git a/cpukit/score/cpu/nios2/.cvsignore b/cpukit/score/cpu/nios2/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/cpukit/score/cpu/nios2/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/cpukit/score/cpu/nios2/ChangeLog b/cpukit/score/cpu/nios2/ChangeLog
deleted file mode 100644
index 05836ba0eb..0000000000
--- a/cpukit/score/cpu/nios2/ChangeLog
+++ /dev/null
@@ -1,18 +0,0 @@
-2006-08-10 Joel Sherrill <joel@OARcorp.com>
-
- * .cvsignore: New file.
-
-2006-08-09 Kolja Waschk <waschk@telos.de>
-
- * rtems/score/cpu.h, rtems/score/cpu_asm.h, rtems/score/nios2.h,
- rtems/score/types.h: New files.
-
-2006-08-09 Kolja Waschk <waschk@telos.de>
-
- * ChangeLog, Makefile.am, cpu.c, cpu_asm.S, irq.c, preinstall.am,
- rtems/asm.h: New files.
-
-2005-12-09 Kolja Waschk <rtemsdev@ixo.de>
-
- Derived from no_cpu
-
diff --git a/cpukit/score/cpu/nios2/Makefile.am b/cpukit/score/cpu/nios2/Makefile.am
deleted file mode 100644
index c1680f82fc..0000000000
--- a/cpukit/score/cpu/nios2/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-##
-## $Id$
-##
-
-include $(top_srcdir)/automake/compile.am
-
-CLEANFILES =
-DISTCLEANFILES =
-
-include_rtemsdir = $(includedir)/rtems
-include_rtems_HEADERS = rtems/asm.h
-
-include_rtems_scoredir = $(includedir)/rtems/score
-include_rtems_score_HEADERS = rtems/score/cpu.h rtems/score/nios2.h \
- rtems/score/cpu_asm.h rtems/score/types.h
-
-noinst_LIBRARIES = libscorecpu.a
-libscorecpu_a_SOURCES = cpu.c irq.c cpu_asm.S
-libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
-
-all-local: $(PREINSTALL_FILES)
-
-include $(srcdir)/preinstall.am
-
-include $(top_srcdir)/automake/local.am
diff --git a/cpukit/score/cpu/nios2/cpu.c b/cpukit/score/cpu/nios2/cpu.c
deleted file mode 100644
index f2f9863cf0..0000000000
--- a/cpukit/score/cpu/nios2/cpu.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * NIOS2 CPU Dependent Source
- *
- * COPYRIGHT (c) 1989-2006
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/wkspace.h>
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- *
- * NO_CPU Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
- /*
- * The thread_dispatch argument is the address of the entry point
- * for the routine called at the end of an ISR once it has been
- * decided a context switch is necessary. On some compilation
- * systems it is difficult to call a high-level language routine
- * from assembly. This allows us to trick these systems.
- *
- * If you encounter this problem save the entry point in a CPU
- * dependent variable.
- */
-
- _CPU_Thread_dispatch_pointer = thread_dispatch;
-
- /*
- * If there is not an easy way to initialize the FP context
- * during Context_Initialize, then it is usually easier to
- * save an "uninitialized" FP context here and copy it to
- * the task's during Context_Initialize.
- */
-
- /* FP context initialization support goes here */
-
- _CPU_Table = *cpu_table;
-}
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- *
- * NO_CPU Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-
-uint32_t _CPU_ISR_Get_level( void )
-{
- /*
- * This routine returns the current interrupt level.
- */
-
- return 0;
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_raw_handler
- *
- * NO_CPU Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-
-void _CPU_ISR_install_raw_handler(
- uint32_t vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- /*
- * This is where we install the interrupt handler into the "raw" interrupt
- * table used by the CPU to dispatch interrupt handlers.
- */
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_vector
- *
- * This kernel routine installs the RTEMS handler for the
- * specified vector.
- *
- * Input parameters:
- * vector - interrupt vector number
- * old_handler - former ISR for this vector number
- * new_handler - replacement ISR for this vector number
- *
- * Output parameters: NONE
- *
- *
- * NO_CPU Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-
-void _CPU_ISR_install_vector(
- uint32_t vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- *old_handler = _ISR_Vector_table[ vector ];
-
- /*
- * If the interrupt vector table is a table of pointer to isr entry
- * points, then we need to install the appropriate RTEMS interrupt
- * handler for this vector number.
- */
-
- _CPU_ISR_install_raw_handler( vector, new_handler, old_handler );
-
- /*
- * We put the actual user ISR address in '_ISR_vector_table'. This will
- * be used by the _ISR_Handler so the user gets control.
- */
-
- _ISR_Vector_table[ vector ] = new_handler;
-}
-
-/*PAGE
- *
- * _CPU_Install_interrupt_stack
- *
- * NO_CPU Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-
-void _CPU_Install_interrupt_stack( void )
-{
-}
-
-/*PAGE
- *
- * _CPU_Thread_Idle_body
- *
- * NOTES:
- *
- * 1. This is the same as the regular CPU independent algorithm.
- *
- * 2. If you implement this using a "halt", "idle", or "shutdown"
- * instruction, then don't forget to put it in an infinite loop.
- *
- * 3. Be warned. Some processors with onboard DMA have been known
- * to stop the DMA if the CPU were put in IDLE mode. This might
- * also be a problem with other on-chip peripherals. So use this
- * hook with caution.
- *
- * NO_CPU Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-
-void _CPU_Thread_Idle_body( void )
-{
-#if 1
- for(;;);
-#else
- for(;;)
- {
- uint32_t st = __builtin_rdctl(0); /* read status register */
-
- /* Differentiate between IRQ off and on (for debugging) */
- if(st & 1)
- for(;;);
- else
- for(;;);
-
- /* insert your "halt" instruction here */ ;
- }
-#endif
-}
diff --git a/cpukit/score/cpu/nios2/cpu_asm.S b/cpukit/score/cpu/nios2/cpu_asm.S
deleted file mode 100644
index 2244430703..0000000000
--- a/cpukit/score/cpu/nios2/cpu_asm.S
+++ /dev/null
@@ -1,388 +0,0 @@
-/*
- * $Id$
- *
- * This file contains all assembly code for the
- * NIOS2 implementation of RTEMS.
- *
- * Copyright (c) 2006 Kolja Waschk (rtemsdev/ixo.de)
- *
- * Derived from no_cpu/cpu_asm.S, copyright (c) 1989-1999,
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- */
-
-#include <rtems/asm.h>
-#include <rtems/score/cpu_asm.h>
-
- .set noat
-
- .extern _ISR_Nest_level
- .extern _ISR_Signals_to_thread_executing
- .extern _Context_Switch_necessary
- .extern _Thread_Dispatch
- .extern _Thread_Dispatch_disable_level
-
-/* ===================================================================== */
-
-/*
- * void _CPU_Context_switch( run_context, heir_context )
- * void _CPU_Context_restore( run_context, heir_context )
- *
- * This routine performs a normal non-FP context switch.
- */
-
- .globl _CPU_Context_switch
-
-_CPU_Context_switch:
-
- rdctl r6, status
- stw r16, 0(r4)
- stw r17, 4(r4)
- stw r18, 8(r4)
- stw r19, 12(r4)
- stw r20, 16(r4)
- stw r21, 20(r4)
- stw r22, 24(r4)
- stw r23, 28(r4)
- stw gp, 32(r4)
- stw fp, 36(r4)
- stw sp, 40(r4)
- stw ra, 44(r4)
- /* r6 saved status */
- stw r6, 48(r4)
-
-_CPU_Context_switch_restore:
-
- ldw r16, 0(r5)
- ldw r17, 4(r5)
- ldw r18, 8(r5)
- ldw r19, 12(r5)
- ldw r20, 16(r5)
- ldw r21, 20(r5)
- ldw r22, 24(r5)
- ldw r23, 28(r5)
- ldw gp, 32(r5)
- ldw fp, 36(r5)
- ldw sp, 40(r5)
-
- /* Disable interrupts */
- wrctl status, r0
-
- ldw ea, 44(r5)
- ldw at, 48(r5)
- /* FIXME: Always have interrupts enabled when we return from Context_switch */
- ori at, at, 1
- wrctl estatus, at
-
- eret
-
- .globl _CPU_Context_restore
-
-_CPU_Context_restore:
-
- /* Copy first to second arg, then re-use 2nd half of Context_switch */
- mov r5, r4
- br _CPU_Context_switch_restore
-
-
-/* ===================================================================== */
-
- .globl _exception_vector
-
-_exception_vector:
-
- /*
- * First, re-wind so we're pointed to the instruction where the exception
- * occurred.
- */
-
- addi ea, ea, -4
-
- /*
- * Now test to determine the cause of the exception.
- */
-
- /* TODO: Look at [ea] if there was an unknown/trap instruction */
-
- /* If interrupts are globally disabled, it certainly was no interrupt */
- rdctl et, estatus
- andi et, et, 1
- beq et, zero, _Exception_Handler
-
- /* If no interrupts are pending, it was a software exception */
- rdctl et, ipending
- beq et, zero, _Exception_Handler
-
- /*
- * Falling through to here means that this was a hardware interrupt.
- */
-
- br _ISR_Handler
-
-/* =====================================================================
- * Exception handler:
- * Responsible for unimplemented instructions and other software
- * exceptions. Not responsible for hardware interrupts. Currently,
- * software exceptions are regarded as error conditions, and the
- * handling isn't perfect. */
-
-_Exception_Handler:
-
- /* stw et, 108(sp') => stw et, -20(sp) */
- stw et, -20(sp)
- mov et, sp
- addi sp, sp, -128
-
- stw r1, 0(sp)
- stw r2, 4(sp)
- stw r3, 8(sp)
-
- rdctl r1, estatus
- rdctl r2, ienable
- rdctl r3, ipending
-
- stw r4, 12(sp)
- stw r5, 16(sp)
- stw r6, 20(sp)
- stw r7, 24(sp)
- stw r8, 28(sp)
- stw r9, 32(sp)
- stw r10, 36(sp)
- stw r11, 40(sp)
- stw r12, 44(sp)
- stw r13, 48(sp)
- stw r14, 52(sp)
- stw r15, 56(sp)
- stw r16, 60(sp)
- stw r17, 64(sp)
- stw r18, 68(sp)
- stw r19, 72(sp)
- stw r20, 76(sp)
- stw r21, 80(sp)
- stw r22, 84(sp)
- stw r23, 88(sp)
- stw gp, 92(sp)
- stw fp, 96(sp)
- /* sp */
- stw et, 100(sp)
- stw ra, 104(sp)
- /* stw et, 108(sp) */
- stw ea, 112(sp)
-
- /* status */
- stw r1, 116(sp)
- /* ienable */
- stw r2, 120(sp)
- /* ipending */
- stw r3, 124(sp)
-
- /*
- * Restore the global pointer.
- */
-
- movhi gp, %hiadj(_gp)
- addi gp, gp, %lo(_gp)
-
- /*
- * Pass a pointer to the stack frame as the input argument of the
- * exception handler (CPU_Exception_frame *).
- */
-
- mov r4, sp
-
- /*
- * Call the exception handler.
- */
-
- .extern __Exception_Handler
- call __Exception_Handler
-
-stuck_in_exception:
- br stuck_in_exception
-
- /*
- * Restore the saved registers, so that all general purpose registers
- * have been restored to their state at the time the interrupt occured.
- */
-
- ldw r1, 0(sp)
- ldw r2, 4(sp)
- ldw r3, 8(sp)
- ldw r4, 12(sp)
- ldw r5, 16(sp)
- ldw r6, 20(sp)
- ldw r7, 24(sp)
- ldw r8, 28(sp)
- ldw r9, 32(sp)
- ldw r10, 36(sp)
- ldw r11, 40(sp)
- ldw r12, 44(sp)
- ldw r13, 48(sp)
- ldw r14, 52(sp)
- ldw r15, 56(sp)
- ldw r16, 60(sp)
- ldw r17, 64(sp)
- ldw r18, 68(sp)
- ldw r19, 72(sp)
- ldw r20, 76(sp)
- ldw r21, 80(sp)
- ldw r22, 84(sp)
- ldw r23, 88(sp)
- ldw gp, 92(sp)
- ldw fp, 96(sp)
- ldw ra, 104(sp)
-
- /* Disable interrupts */
- wrctl status, r0
-
- ldw ea, 112(sp)
- ldw et, 116(sp)
-
- /* FIXME: Enable interrupts after exception processing */
- ori et, et, 1
- wrctl estatus, et
- ldw et, 108(sp)
-
- /* Restore stack pointer */
- ldw sp, 100(sp)
-
- eret
-
-/* ===================================================================== */
-
- .section .text
-
-_ISR_Handler:
-
- /*
- * Process an external hardware interrupt.
- *
- * First, preserve all callee saved registers on
- * the stack. (See the Nios2 ABI documentation for details).
- *
- * Do we really need to save all?
- *
- * If this is interrupting a task (and not another interrupt),
- * everything is saved into the task's stack, thus putting us
- * in a situation similar to when the task calls a subroutine
- * (and only the CPU_Context_Control subset needs to be changed)
- */
-
- rdctl et, estatus
-
- /* Keep this in the same order as CPU_Interrupt_frame: */
-
- addi sp, sp, -76
- stw r1, 0(sp)
- stw r2, 4(sp)
- stw r3, 8(sp)
- stw r4, 12(sp)
- stw r5, 16(sp)
- stw r6, 20(sp)
- stw r7, 24(sp)
- stw r8, 28(sp)
- stw r9, 32(sp)
- stw r10, 36(sp)
- stw r11, 40(sp)
- stw r12, 44(sp)
- stw r13, 48(sp)
- stw r14, 52(sp)
- stw r15, 56(sp)
- stw ra, 60(sp)
- stw gp, 64(sp)
- /* et contains status */
- stw et, 68(sp)
- stw ea, 72(sp)
-
- /*
- * Obtain a bitlist of the pending interrupts.
- */
-
- rdctl et, ipending
-
- /*
- * Restore the global pointer to the expected value.
- */
-
- movhi gp, %hiadj(_gp)
- addi gp, gp, %lo(_gp)
-
- /*
- * Search through the bit list stored in r24(et) to find the first enabled
- * bit. The offset of this bit is the index of the interrupt that is
- * to be handled.
- */
-
- mov r4, zero
-6:
- andi r3, r24, 1
- bne r3, zero, 7f
- addi r4, r4, 1
- srli r24, r24, 1
- br 6b
-7:
-
- /*
- * Having located the interrupt source, r4 contains the index of the
- * interrupt to be handled. r5, the 2nd argument to the function,
- * will point to the CPU_Interrupt_frame.
- */
-
- mov r5, sp
-
- .extern __ISR_Handler
- call __ISR_Handler
-
- /*
- * Now that the interrupt processing is complete, prepare to return to
- * the interrupted code.
- */
-
- /*
- * Restore the saved registers, so that all general purpose registers
- * have been restored to their state at the time the interrupt occured.
- */
-
- ldw r1, 0(sp)
- ldw r2, 4(sp)
- ldw r3, 8(sp)
- ldw r4, 12(sp)
- ldw r5, 16(sp)
- ldw r6, 20(sp)
- ldw r7, 24(sp)
- ldw r8, 28(sp)
- ldw r9, 32(sp)
- ldw r10, 36(sp)
- ldw r11, 40(sp)
- ldw r12, 44(sp)
- ldw r13, 48(sp)
- ldw r14, 52(sp)
- ldw r15, 56(sp)
- ldw ra, 60(sp)
- ldw gp, 64(sp)
-
- /* Disable interrupts */
- wrctl status, r0
-
- /* Restore the exception registers */
-
- /* load saved ea into ea */
- ldw ea, 72(sp)
- /* load saved estatus into et */
- ldw et, 68(sp)
- /* Always have interrupts enabled when we return from interrupt */
- ori et, et, 1
- wrctl estatus, et
- /* Restore the stack pointer */
- addi sp, sp, 76
-
- /*
- * Return to the interrupted instruction.
- */
- eret
-
-
diff --git a/cpukit/score/cpu/nios2/irq.c b/cpukit/score/cpu/nios2/irq.c
deleted file mode 100644
index ac9385010d..0000000000
--- a/cpukit/score/cpu/nios2/irq.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * NIOS2 exception and interrupt handler
- *
- * Derived from c4x/irq.c
- *
- * Copyright (c) 2006
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/cpu.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
-
-/*
- * This routine provides the RTEMS interrupt management.
- *
- * Upon entry, interrupts are disabled
- */
-
-#if( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE)
- unsigned long *_old_stack_ptr;
-#endif
-
-register unsigned long *stack_ptr asm("sp");
-
-void __ISR_Handler(uint32_t vector, CPU_Interrupt_frame *ifr)
-{
- register uint32_t level;
-
- /* Interrupts are disabled upon entry to this Handler */
-
-#if( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE)
- if ( _ISR_Nest_level == 0 ) {
- /* Install irq stack */
- _old_stack_ptr = stack_ptr;
- stack_ptr = _CPU_Interrupt_stack_high - 4;
- }
-#endif
-
- _ISR_Nest_level++;
-
- _Thread_Dispatch_disable_level++;
-
- if ( _ISR_Vector_table[ vector] )
- {
- (*_ISR_Vector_table[ vector ])(vector, ifr);
- };
-
- /* Make sure that interrupts are disabled again */
- _CPU_ISR_Disable( level );
-
- _Thread_Dispatch_disable_level--;
-
- _ISR_Nest_level--;
-
- if( _ISR_Nest_level == 0)
- {
-#if( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE)
- stack_ptr = _old_stack_ptr;
-#endif
-
- if( _Thread_Dispatch_disable_level == 0 )
- {
- if ( _Context_Switch_necessary || _ISR_Signals_to_thread_executing )
- {
- _ISR_Signals_to_thread_executing = FALSE;
- _CPU_ISR_Enable( level );
- _Thread_Dispatch();
- /* may have switched to another task and not return here immed. */
- _CPU_ISR_Disable( level ); /* Keep _pairs_ of Enable/Disable */
- }
- }
- else
- {
- _ISR_Signals_to_thread_executing = FALSE;
- };
- };
-
- _CPU_ISR_Enable( level );
-}
-
-void __Exception_Handler(CPU_Exception_frame *efr)
-{
- _CPU_Fatal_halt(0xECC0);
-}
-
-
diff --git a/cpukit/score/cpu/nios2/preinstall.am b/cpukit/score/cpu/nios2/preinstall.am
deleted file mode 100644
index 59d5889b39..0000000000
--- a/cpukit/score/cpu/nios2/preinstall.am
+++ /dev/null
@@ -1,43 +0,0 @@
-## Automatically generated by ampolish3 - Do not edit
-
-if AMPOLISH3
-$(srcdir)/preinstall.am: Makefile.am
- $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
-endif
-
-PREINSTALL_DIRS =
-DISTCLEANFILES += $(PREINSTALL_DIRS)
-
-PREINSTALL_FILES =
-CLEANFILES += $(PREINSTALL_FILES)
-
-$(PROJECT_INCLUDE)/rtems/$(dirstamp):
- @$(mkdir_p) $(PROJECT_INCLUDE)/rtems
- @: > $(PROJECT_INCLUDE)/rtems/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_INCLUDE)/rtems/$(dirstamp)
-
-$(PROJECT_INCLUDE)/rtems/asm.h: rtems/asm.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/asm.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/asm.h
-
-$(PROJECT_INCLUDE)/rtems/score/$(dirstamp):
- @$(mkdir_p) $(PROJECT_INCLUDE)/rtems/score
- @: > $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
-PREINSTALL_DIRS += $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
-
-$(PROJECT_INCLUDE)/rtems/score/cpu.h: rtems/score/cpu.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpu.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpu.h
-
-$(PROJECT_INCLUDE)/rtems/score/nios2.h: rtems/score/nios2.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/nios2.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/nios2.h
-
-$(PROJECT_INCLUDE)/rtems/score/cpu_asm.h: rtems/score/cpu_asm.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/cpu_asm.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/cpu_asm.h
-
-$(PROJECT_INCLUDE)/rtems/score/types.h: rtems/score/types.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/types.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/types.h
-
diff --git a/cpukit/score/cpu/nios2/rtems/asm.h b/cpukit/score/cpu/nios2/rtems/asm.h
deleted file mode 100644
index 390048d353..0000000000
--- a/cpukit/score/cpu/nios2/rtems/asm.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * @file rtems/asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- */
-
-/*
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- * COPYRIGHT (c) 1994-1997.
- * On-Line Applications Research Corporation (OAR).
- *
- * $Id$
- */
-
-#ifndef _RTEMS_ASM_H
-#define _RTEMS_ASM_H
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-#include <rtems/score/cpuopts.h>
-#include <rtems/score/nios2.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__ _
-#endif
-
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-
-#include <rtems/concat.h>
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-/*
- * define macros for all of the registers on this CPU
- *
- * EXAMPLE: #define d0 REG (d0)
- */
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA
-#define END_DATA
-#define BEGIN_BSS
-#define END_BSS
-#define END
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC(sym) .globl SYM (sym)
-#define EXTERN(sym) .globl SYM (sym)
-
-#endif
diff --git a/cpukit/score/cpu/nios2/rtems/score/cpu.h b/cpukit/score/cpu/nios2/rtems/score/cpu.h
deleted file mode 100644
index f05641def9..0000000000
--- a/cpukit/score/cpu/nios2/rtems/score/cpu.h
+++ /dev/null
@@ -1,1404 +0,0 @@
-/**
- * @file rtems/score/cpu.h
- */
-
-/*
- * This include file contains information pertaining to the XXX
- * processor.
- *
- * @note This file is part of a porting template that is intended
- * to be used as the starting point when porting RTEMS to a new
- * CPU family. The following needs to be done when using this as
- * the starting point for a new port:
- *
- * + Anywhere there is an XXX, it should be replaced
- * with information about the CPU family being ported to.
- *
- * + At the end of each comment section, there is a heading which
- * says "Port Specific Information:". When porting to RTEMS,
- * add CPU family specific information in this section
- */
-
-/* COPYRIGHT (c) 1989-2004.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#ifndef _RTEMS_SCORE_CPU_H
-#define _RTEMS_SCORE_CPU_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/nios2.h> /* pick up machine definitions */
-#ifndef ASM
-#include <rtems/score/types.h>
-#endif
-
-/* conditional compilation parameters */
-
-/**
- * Should the calls to @ref _Thread_Enable_dispatch be inlined?
- *
- * If TRUE, then they are inlined.
- * If FALSE, then a subroutine call is made.
- *
- * This conditional is an example of the classic trade-off of size
- * versus speed. Inlining the call (TRUE) typically increases the
- * size of RTEMS while speeding up the enabling of dispatching.
- *
- * @note In general, the @ref _Thread_Dispatch_disable_level will
- * only be 0 or 1 unless you are in an interrupt handler and that
- * interrupt handler invokes the executive.] When not inlined
- * something calls @ref _Thread_Enable_dispatch which in turns calls
- * @ref _Thread_Dispatch. If the enable dispatch is inlined, then
- * one subroutine call is avoided entirely.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_INLINE_ENABLE_DISPATCH FALSE
-
-/**
- * Should the body of the search loops in _Thread_queue_Enqueue_priority
- * be unrolled one time? In unrolled each iteration of the loop examines
- * two "nodes" on the chain being searched. Otherwise, only one node
- * is examined per iteration.
- *
- * If TRUE, then the loops are unrolled.
- * If FALSE, then the loops are not unrolled.
- *
- * The primary factor in making this decision is the cost of disabling
- * and enabling interrupts (_ISR_Flash) versus the cost of rest of the
- * body of the loop. On some CPUs, the flash is more expensive than
- * one iteration of the loop body. In this case, it might be desirable
- * to unroll the loop. It is important to note that on some CPUs, this
- * code is the longest interrupt disable period in RTEMS. So it is
- * necessary to strike a balance when setting this parameter.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_UNROLL_ENQUEUE_PRIORITY TRUE
-
-/**
- * Does RTEMS manage a dedicated interrupt stack in software?
- *
- * If TRUE, then a stack is allocated in @ref _ISR_Handler_initialization.
- * If FALSE, nothing is done.
- *
- * If the CPU supports a dedicated interrupt stack in hardware,
- * then it is generally the responsibility of the BSP to allocate it
- * and set it up.
- *
- * If the CPU does not support a dedicated interrupt stack, then
- * the porter has two options: (1) execute interrupts on the
- * stack of the interrupted task, and (2) have RTEMS manage a dedicated
- * interrupt stack.
- *
- * If this is TRUE, @ref CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of @ref CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * @ref CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK TRUE
-
-/**
- * Does this CPU have hardware support for a dedicated interrupt stack?
- *
- * If TRUE, then it must be installed during initialization.
- * If FALSE, then no installation is performed.
- *
- * If this is TRUE, @ref CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE.
- *
- * Only one of @ref CPU_HAS_SOFTWARE_INTERRUPT_STACK and
- * @ref CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is
- * possible that both are FALSE for a particular CPU. Although it
- * is unclear what that would imply about the interrupt processing
- * procedure on that CPU.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK FALSE
-
-/**
- * Does RTEMS allocate a dedicated interrupt stack in the Interrupt Manager?
- *
- * If TRUE, then the memory is allocated during initialization.
- * If FALSE, then the memory is allocated during initialization.
- *
- * This should be TRUE is @ref CPU_HAS_SOFTWARE_INTERRUPT_STACK is TRUE
- * or @ref CPU_INSTALL_HARDWARE_INTERRUPT_STACK is TRUE.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_ALLOCATE_INTERRUPT_STACK TRUE
-
-/**
- * Does the RTEMS invoke the user's ISR with the vector number and
- * a pointer to the saved interrupt frame (1) or just the vector
- * number (0)?
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_ISR_PASSES_FRAME_POINTER 1
-
-/**
- * @def CPU_HARDWARE_FP
- *
- * Does the CPU have hardware floating point?
- *
- * If TRUE, then the @ref RTEMS_FLOATING_POINT task attribute is supported.
- * If FALSE, then the @ref RTEMS_FLOATING_POINT task attribute is ignored.
- *
- * If there is a FP coprocessor such as the i387 or mc68881, then
- * the answer is TRUE.
- *
- * It indicates whether or not this CPU model has FP support. For
- * example, it would be possible to have an i386_nofp CPU model
- * which set this to false to indicate that you have an i386 without
- * an i387 and wish to leave floating point support out of RTEMS.
- */
-
-/**
- * @def CPU_SOFTWARE_FP
- *
- * Does the CPU have no hardware floating point and GCC provides a
- * software floating point implementation which must be context
- * switched?
- *
- * This feature conditional is used to indicate whether or not there
- * is software implemented floating point that must be context
- * switched. The determination of whether or not this applies
- * is very tool specific and the state saved/restored is also
- * compiler specific.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_HARDWARE_FP FALSE
-#define CPU_SOFTWARE_FP FALSE
-
-/**
- * Are all tasks RTEMS_FLOATING_POINT tasks implicitly?
- *
- * If TRUE, then the @ref RTEMS_FLOATING_POINT task attribute is assumed.
- * If FALSE, then the @ref RTEMS_FLOATING_POINT task attribute is followed.
- *
- * So far, the only CPUs in which this option has been used are the
- * HP PA-RISC and PowerPC. On the PA-RISC, The HP C compiler and
- * gcc both implicitly used the floating point registers to perform
- * integer multiplies. Similarly, the PowerPC port of gcc has been
- * seen to allocate floating point local variables and touch the FPU
- * even when the flow through a subroutine (like vfprintf()) might
- * not use floating point formats.
- *
- * If a function which you would not think utilize the FP unit DOES,
- * then one can not easily predict which tasks will use the FP hardware.
- * In this case, this option should be TRUE.
- *
- * If @ref CPU_HARDWARE_FP is FALSE, then this should be FALSE as well.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_ALL_TASKS_ARE_FP FALSE
-
-/**
- * Should the IDLE task have a floating point context?
- *
- * If TRUE, then the IDLE task is created as a @ref RTEMS_FLOATING_POINT task
- * and it has a floating point context which is switched in and out.
- * If FALSE, then the IDLE task does not have a floating point context.
- *
- * Setting this to TRUE negatively impacts the time required to preempt
- * the IDLE task from an interrupt because the floating point context
- * must be saved as part of the preemption.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_IDLE_TASK_IS_FP FALSE
-
-/**
- * Should the saving of the floating point registers be deferred
- * until a context switch is made to another different floating point
- * task?
- *
- * If TRUE, then the floating point context will not be stored until
- * necessary. It will remain in the floating point registers and not
- * disturned until another floating point task is switched to.
- *
- * If FALSE, then the floating point context is saved when a floating
- * point task is switched out and restored when the next floating point
- * task is restored. The state of the floating point registers between
- * those two operations is not specified.
- *
- * If the floating point context does NOT have to be saved as part of
- * interrupt dispatching, then it should be safe to set this to TRUE.
- *
- * Setting this flag to TRUE results in using a different algorithm
- * for deciding when to save and restore the floating point context.
- * The deferred FP switch algorithm minimizes the number of times
- * the FP context is saved and restored. The FP context is not saved
- * until a context switch is made to another, different FP task.
- * Thus in a system with only one FP task, the FP context will never
- * be saved or restored.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-
-/**
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine @ref _CPU_Thread_Idle_body
- * must be provided and is the default IDLE thread body instead of
- * @ref _CPU_Thread_Idle_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * This is intended to allow for supporting processors which have
- * a low power or idle mode. When the IDLE thread is executed, then
- * the CPU can be powered down.
- *
- * The order of precedence for selecting the IDLE thread body is:
- *
- * -# BSP provided
- * -# CPU dependent (if provided)
- * -# generic (if no BSP and no CPU dependent)
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
-
-/**
- * Does the stack grow up (toward higher addresses) or down
- * (toward lower addresses)?
- *
- * If TRUE, then the grows upward.
- * If FALSE, then the grows toward smaller addresses.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_STACK_GROWS_UP FALSE
-
-/**
- * The following is the variable attribute used to force alignment
- * of critical RTEMS structures. On some processors it may make
- * sense to have these aligned on tighter boundaries than
- * the minimum requirements of the compiler in order to have as
- * much of the critical data area as possible in a cache line.
- *
- * The placement of this macro in the declaration of the variables
- * is based on the syntactically requirements of the GNU C
- * "__attribute__" extension. For example with GNU C, use
- * the following to force a structures to a 32 byte boundary.
- *
- * __attribute__ ((aligned (32)))
- *
- * @note Currently only the Priority Bit Map table uses this feature.
- * To benefit from using this, the data must be heavily
- * used so it will stay in the cache and used frequently enough
- * in the executive to justify turning this on.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_STRUCTURE_ALIGNMENT
-
-/**
- * @defgroup CPUEndian Processor Dependent Endianness Support
- *
- * This group assists in issues related to processor endianness.
- */
-
-/**
- * @ingroup CPUEndian
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- *
- * @note @a CPU_BIG_ENDIAN and @a CPU_LITTLE_ENDIAN should NOT have the
- * same values.
- *
- * @see CPU_LITTLE_ENDIAN
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_BIG_ENDIAN FALSE
-
-/**
- * @ingroup CPUEndian
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- *
- * @note @ref CPU_BIG_ENDIAN and @ref CPU_LITTLE_ENDIAN should NOT have the
- * same values.
- *
- * @see CPU_BIG_ENDIAN
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_LITTLE_ENDIAN TRUE
-
-/**
- * @ingroup CPUInterrupt
- * The following defines the number of bits actually used in the
- * interrupt field of the task mode. How those bits map to the
- * CPU interrupt levels is defined by the routine @ref _CPU_ISR_Set_level.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_MODES_INTERRUPT_MASK 0x00000001
-
-/*
- * Processor defined structures required for cpukit/score.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-
-/* may need to put some structures here. */
-
-/**
- * @defgroup CPUContext Processor Dependent Context Management
- *
- * From the highest level viewpoint, there are 2 types of context to save.
- *
- * -# Interrupt registers to save
- * -# Task level registers to save
- *
- * Since RTEMS handles integer and floating point contexts separately, this
- * means we have the following 3 context items:
- *
- * -# task level context stuff:: Context_Control
- * -# floating point task stuff:: Context_Control_fp
- * -# special interrupt level context :: CPU_Interrupt_frame
- *
- * On some processors, it is cost-effective to save only the callee
- * preserved registers during a task context switch. This means
- * that the ISR code needs to save those registers which do not
- * persist across function calls. It is not mandatory to make this
- * distinctions between the caller/callee saves registers for the
- * purpose of minimizing context saved during task switch and on interrupts.
- * If the cost of saving extra registers is minimal, simplicity is the
- * choice. Save the same context on interrupt entry as for tasks in
- * this case.
- *
- * Additionally, if gdb is to be made aware of RTEMS tasks for this CPU, then
- * care should be used in designing the context area.
- *
- * On some CPUs with hardware floating point support, the Context_Control_fp
- * structure will not be used or it simply consist of an array of a
- * fixed number of bytes. This is done when the floating point context
- * is dumped by a "FP save context" type instruction and the format
- * is not really defined by the CPU. In this case, there is no need
- * to figure out the exact format -- only the size. Of course, although
- * this is enough information for RTEMS, it is probably not enough for
- * a debugger such as gdb. But that is another problem.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-
-/**
- * @ingroup CPUContext Management
- * This defines the minimal set of integer and processor state registers
- * that must be saved during a voluntary context switch from one thread
- * to another.
- */
-typedef struct {
- uint32_t r16;
- uint32_t r17;
- uint32_t r18;
- uint32_t r19;
- uint32_t r20;
- uint32_t r21;
- uint32_t r22;
- uint32_t r23;
- uint32_t gp;
- uint32_t fp;
- uint32_t sp;
- uint32_t ra;
- uint32_t status;
- /* ienable? */
- /* ipending? */
-} Context_Control;
-
-/**
- * @ingroup CPUContext Management
- * This defines the complete set of floating point registers that must
- * be saved during any context switch from one thread to another.
- */
-typedef struct {
-} Context_Control_fp;
-
-/**
- * @ingroup CPUContext Management
- * This defines the set of integer and processor state registers that must
- * be saved during an interrupt. This set does not include any which are
- * in @ref Context_Control.
- */
-typedef struct {
- uint32_t r1;
- uint32_t r2;
- uint32_t r3;
- uint32_t r4;
- uint32_t r5;
- uint32_t r6;
- uint32_t r7;
- uint32_t r8;
- uint32_t r9;
- uint32_t r10;
- uint32_t r11;
- uint32_t r12;
- uint32_t r13;
- uint32_t r14;
- uint32_t r15;
- uint32_t ra;
- uint32_t gp;
- uint32_t et;
- uint32_t ea;
-} CPU_Interrupt_frame;
-
-/**
- * @ingroup CPUContext Management
- * This defines the set of integer and processor state registers that are
- * saved during a software exception.
- */
-typedef struct {
- uint32_t r1;
- uint32_t r2;
- uint32_t r3;
- uint32_t r4;
- uint32_t r5;
- uint32_t r6;
- uint32_t r7;
- uint32_t r8;
- uint32_t r9;
- uint32_t r10;
- uint32_t r11;
- uint32_t r12;
- uint32_t r13;
- uint32_t r14;
- uint32_t r15;
- uint32_t r16;
- uint32_t r17;
- uint32_t r18;
- uint32_t r19;
- uint32_t r20;
- uint32_t r21;
- uint32_t r22;
- uint32_t r23;
- uint32_t gp;
- uint32_t fp;
- uint32_t sp;
- uint32_t ra;
- uint32_t et;
- uint32_t ea;
- uint32_t status;
- uint32_t ienable;
- uint32_t ipending;
-} CPU_Exception_frame;
-
-
-/**
- * The following table contains the information required to configure
- * the XXX processor specific parameters.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-
-typedef struct {
- /** This element points to the BSP's pretasking hook. */
- void (*pretasking_hook)( void );
- /** This element points to the BSP's predriver hook. */
- void (*predriver_hook)( void );
- /** This element points to the BSP's postdriver hook. */
- void (*postdriver_hook)( void );
- /** This element points to the BSP's optional idle task which may override
- * the default one provided with RTEMS.
- */
- void (*idle_task)( void );
- /** If this element is TRUE, then RTEMS will zero the Executive Workspace.
- * When this element is FALSE, it is assumed that the BSP or invoking
- * environment has ensured that memory was cleared before RTEMS was
- * invoked.
- */
- boolean do_zero_of_workspace;
- /** This field specifies the size of the IDLE task's stack. If less than or
- * equal to the minimum stack size, then the IDLE task will have the minimum
- * stack size.
- */
- uint32_t idle_task_stack_size;
- /** This field specifies the size of the interrupt stack. If less than or
- * equal to the minimum stack size, then the interrupt stack will be of
- * minimum stack size.
- */
- uint32_t interrupt_stack_size;
- /** The MPCI Receive server is assumed to have a stack of at least
- * minimum stack size. This field specifies the amount of extra
- * stack this task will be given in bytes.
- */
- uint32_t extra_mpci_receive_server_stack;
- /** The BSP may want to provide it's own stack allocation routines.
- * In this case, the BSP will provide this stack allocation hook.
- */
- void * (*stack_allocate_hook)( uint32_t );
- /** The BSP may want to provide it's own stack free routines.
- * In this case, the BSP will provide this stack free hook.
- */
- void (*stack_free_hook)( void *);
- /* end of fields required on all CPUs */
-} rtems_cpu_table;
-
-/*
- * Macros to access required entires in the CPU Table are in
- * the file rtems/system.h.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-
-/*
- * Macros to access NIOS2 specific additions to the CPU Table
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-
-/* There are no CPU specific additions to the CPU Table for this port. */
-
-/**
- * This variable is optional. It is used on CPUs on which it is difficult
- * to generate an "uninitialized" FP context. It is filled in by
- * @ref _CPU_Initialize and copied into the task's FP context area during
- * @ref _CPU_Context_Initialize.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#if 0
-SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context;
-#endif
-
-/**
- * @defgroup CPUInterrupt Processor Dependent Interrupt Management
- *
- * On some CPUs, RTEMS supports a software managed interrupt stack.
- * This stack is allocated by the Interrupt Manager and the switch
- * is performed in @ref _ISR_Handler. These variables contain pointers
- * to the lowest and highest addresses in the chunk of memory allocated
- * for the interrupt stack. Since it is unknown whether the stack
- * grows up or down (in general), this give the CPU dependent
- * code the option of picking the version it wants to use.
- *
- * @note These two variables are required if the macro
- * @ref CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-
-/**
- * @ingroup CPUInterrupt
- * This variable points to the lowest physical address of the interrupt
- * stack.
- */
-SCORE_EXTERN void *_CPU_Interrupt_stack_low;
-
-/**
- * @ingroup CPUInterrupt
- * This variable points to the lowest physical address of the interrupt
- * stack.
- */
-SCORE_EXTERN void *_CPU_Interrupt_stack_high;
-
-/**
- * @ingroup CPUInterrupt
- * With some compilation systems, it is difficult if not impossible to
- * call a high-level language routine from assembly language. This
- * is especially true of commercial Ada compilers and name mangling
- * C++ ones. This variable can be optionally defined by the CPU porter
- * and contains the address of the routine @ref _Thread_Dispatch. This
- * can make it easier to invoke that routine at the end of the interrupt
- * sequence (if a dispatch is necessary).
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)();
-
-/*
- * Nothing prevents the porter from declaring more CPU specific variables.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-
-/* XXX: if needed, put more variables here */
-
-/**
- * @ingroup CPUContext
- * The size of the floating point context area. On some CPUs this
- * will not be a "sizeof" because the format of the floating point
- * area is not defined -- only the size is. This is usually on
- * CPUs with a "floating point save context" instruction.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-
-/**
- * Amount of extra stack (above minimum stack size) required by
- * MPCI receive server thread. Remember that in a multiprocessor
- * system this thread must exist and be able to process all directives.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
-
-/**
- * @ingroup CPUInterrupt
- * This defines the number of entries in the @ref _ISR_Vector_table managed
- * by RTEMS.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS 32
-
-/**
- * @ingroup CPUInterrupt
- * This defines the highest interrupt vector number for this port.
- */
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
-
-/**
- * @ingroup CPUInterrupt
- * This is defined if the port has a special way to report the ISR nesting
- * level. Most ports maintain the variable @a _ISR_Nest_level.
- */
-#define CPU_PROVIDES_ISR_IS_IN_PROGRESS FALSE
-
-/**
- * @ingroup CPUContext
- * Should be large enough to run all RTEMS tests. This ensures
- * that a "reasonable" small application should not have any problems.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_STACK_MINIMUM_SIZE (1024*4)
-/* kawk: was *4 */
-
-/**
- * CPU's worst alignment requirement for data types on a byte boundary. This
- * alignment does not take into account the requirements for the stack.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_ALIGNMENT 4
-
-/**
- * This number corresponds to the byte alignment requirement for the
- * heap handler. This alignment requirement may be stricter than that
- * for the data types alignment specified by @ref CPU_ALIGNMENT. It is
- * common for the heap to follow the same alignment requirement as
- * @ref CPU_ALIGNMENT. If the @ref CPU_ALIGNMENT is strict enough for
- * the heap, then this should be set to @ref CPU_ALIGNMENT.
- *
- * @note This does not have to be a power of 2 although it should be
- * a multiple of 2 greater than or equal to 2. The requirement
- * to be a multiple of 2 is because the heap uses the least
- * significant field of the front and back flags to indicate
- * that a block is in use or free. So you do not want any odd
- * length blocks really putting length data in that bit.
- *
- * On byte oriented architectures, @ref CPU_HEAP_ALIGNMENT normally will
- * have to be greater or equal to than @ref CPU_ALIGNMENT to ensure that
- * elements allocated from the heap meet all restrictions.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
-
-/**
- * This number corresponds to the byte alignment requirement for memory
- * buffers allocated by the partition manager. This alignment requirement
- * may be stricter than that for the data types alignment specified by
- * @ref CPU_ALIGNMENT. It is common for the partition to follow the same
- * alignment requirement as @ref CPU_ALIGNMENT. If the @ref CPU_ALIGNMENT is
- * strict enough for the partition, then this should be set to
- * @ref CPU_ALIGNMENT.
- *
- * @note This does not have to be a power of 2. It does have to
- * be greater or equal to than @ref CPU_ALIGNMENT.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT
-
-/**
- * This number corresponds to the byte alignment requirement for the
- * stack. This alignment requirement may be stricter than that for the
- * data types alignment specified by @ref CPU_ALIGNMENT. If the
- * @ref CPU_ALIGNMENT is strict enough for the stack, then this should be
- * set to 0.
- *
- * @note This must be a power of 2 either 0 or greater than @ref CPU_ALIGNMENT.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_STACK_ALIGNMENT 0
-
-/*
- * ISR handler macros
- */
-
-/**
- * @ingroup CPUInterrupt
- * Support routine to initialize the RTEMS vector table after it is allocated.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define _CPU_Initialize_vectors()
-
-/**
- * @ingroup CPUInterrupt
- * Disable all interrupts for an RTEMS critical section. The previous
- * level is returned in @a _isr_cookie.
- *
- * @param _isr_cookie (out) will contain the previous level cookie
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define _CPU_ISR_Disable( _isr_cookie ) \
- { \
- _isr_cookie = __builtin_rdctl(0); /* read status register */ \
- __builtin_wrctl(0, 0); /* write 0 to status register */ \
- }
-
-/**
- * @ingroup CPUInterrupt
- * Enable interrupts to the previous level (returned by _CPU_ISR_Disable).
- * This indicates the end of an RTEMS critical section. The parameter
- * @a _isr_cookie is not modified.
- *
- * @param _isr_cookie (in) contain the previous level cookie
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define _CPU_ISR_Enable( _isr_cookie ) \
- { \
- __builtin_wrctl( 0, _isr_cookie ); \
- }
-
-/**
- * @ingroup CPUInterrupt
- * This temporarily restores the interrupt to @a _isr_cookie before immediately
- * disabling them again. This is used to divide long RTEMS critical
- * sections into two or more parts. The parameter @a _isr_cookie is not
- * modified.
- *
- * @param _isr_cookie (in) contain the previous level cookie
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define _CPU_ISR_Flash( _isr_cookie ) \
- { \
- __builtin_wrctl( 0, _isr_cookie ); \
- /* TODO: Does NIOS2 get a chance to \
- process IRQ between these statements? */ \
- __builtin_wrctl( 0, 0 ); \
- }
-
-/**
- * @ingroup CPUInterrupt
- *
- * This routine and @ref _CPU_ISR_Get_level
- * Map the interrupt level in task mode onto the hardware that the CPU
- * actually provides. Currently, interrupt levels which do not
- * map onto the CPU in a generic fashion are undefined. Someday,
- * it would be nice if these were "mapped" by the application
- * via a callout. For example, m68k has 8 levels 0 - 7, levels
- * 8 - 255 would be available for bsp/application specific meaning.
- * This could be used to manage a programmable interrupt controller
- * via the rtems_task_mode directive.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define _CPU_ISR_Set_level( new_level ) \
- _CPU_ISR_Enable( ( new_level==0 ) ? 1 : 0 );
-
-/**
- * @ingroup CPUInterrupt
- * Return the current interrupt disable level for this task in
- * the format used by the interrupt level portion of the task mode.
- *
- * @note This routine usually must be implemented as a subroutine.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-uint32_t _CPU_ISR_Get_level( void );
-
-/* end of ISR handler macros */
-
-/* Context handler macros */
-
-/**
- * @ingroup CPUContext
- * Initialize the context to a state suitable for starting a
- * task after a context restore operation. Generally, this
- * involves:
- *
- * - setting a starting address
- * - preparing the stack
- * - preparing the stack and frame pointers
- * - setting the proper interrupt level in the context
- * - initializing the floating point context
- *
- * This routine generally does not set any unnecessary register
- * in the context. The state of the "general data" registers is
- * undefined at task start time.
- *
- * @param _the_context (in) is the context structure to be initialized
- * @param _stack_base (in) is the lowest physical address of this task's stack
- * @param _size (in) is the size of this task's stack
- * @param _isr (in) is the interrupt disable level
- * @param _entry_point (in) is the thread's entry point. This is
- * always @a _Thread_Handler
- * @param _is_fp (in) is TRUE if the thread is to be a floating
- * point thread. This is typically only used on CPUs where the
- * FPU may be easily disabled by software such as on the SPARC
- * where the PSR contains an enable FPU bit.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \
- _isr, _entry_point, _is_fp ) \
- do { \
- extern char _gp[]; \
- uint32_t _stack = (uint32_t )(_stack_base) + (_size) - 4; \
- (_the_context)->gp = (void *)_gp; \
- (_the_context)->fp = (void *)_stack; \
- (_the_context)->sp = (void *)_stack; \
- (_the_context)->ra = (void *)(_entry_point); \
- (_the_context)->status = 0x1; /* IRQs enabled */ \
- } while ( 0 )
-
-/*
- * This routine is responsible for somehow restarting the currently
- * executing task. If you are lucky, then all that is necessary
- * is restoring the context. Otherwise, there will need to be
- * a special assembly routine which does something special in this
- * case. @ref _CPU_Context_Restore should work most of the time. It will
- * not work if restarting self conflicts with the stack frame
- * assumptions of restoring a context.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define _CPU_Context_Restart_self( _the_context ) \
- _CPU_Context_restore( (_the_context) );
-
-/**
- * @ingroup CPUContext
- * The purpose of this macro is to allow the initial pointer into
- * a floating point context area (used to save the floating point
- * context) to be at an arbitrary place in the floating point
- * context area.
- *
- * This is necessary because some FP units are designed to have
- * their context saved as a stack which grows into lower addresses.
- * Other FP units can be saved by simply moving registers into offsets
- * from the base of the context area. Finally some FP units provide
- * a "dump context" instruction which could fill in from high to low
- * or low to high based on the whim of the CPU designers.
- *
- * @param _base (in) is the lowest physical address of the floating point
- * context area
- * @param _offset (in) is the offset into the floating point area
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#if 1
-#define _CPU_Context_Fp_start( _base, _offset )
-#else
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )
-#endif
-
-/**
- * This routine initializes the FP context area passed to it to.
- * There are a few standard ways in which to initialize the
- * floating point context. The code included for this macro assumes
- * that this is a CPU in which a "initial" FP context was saved into
- * @a _CPU_Null_fp_context and it simply copies it to the destination
- * context passed to it.
- *
- * Other floating point context save/restore models include:
- * -# not doing anything, and
- * -# putting a "null FP status word" in the correct place in the FP context.
- *
- * @param _destination (in) is the floating point context area
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#if 1
-#define _CPU_Context_Initialize_fp( _destination )
-#else
-#define _CPU_Context_Initialize_fp( _destination ) \
- { \
- *((Context_Control_fp *) *((void **) _destination)) = _CPU_Null_fp_context; \
- }
-#endif
-
-/* end of Context handler macros */
-
-/* Fatal Error manager macros */
-
-/**
- * This routine copies _error into a known place -- typically a stack
- * location or a register, optionally disables interrupts, and
- * halts/stops the CPU.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define _CPU_Fatal_halt( _error ) \
- { \
- __builtin_wrctl(0, 0); /* write 0 to status register (disable interrupts) */ \
- __asm volatile ("mov et, %z0" : : "rM" (_error)); /* write error code to ET register */ \
- for(;;); \
- }
-
-/* end of Fatal Error manager macros */
-
-/* Bitfield handler macros */
-
-/**
- * @defgroup CPUBitfield Processor Dependent Bitfield Manipulation
- *
- * This set of routines are used to implement fast searches for
- * the most important ready task.
- */
-
-/**
- * @ingroup CPUBitfield
- * This definition is set to TRUE if the port uses the generic bitfield
- * manipulation implementation.
- */
-#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-
-/**
- * @ingroup CPUBitfield
- * This definition is set to TRUE if the port uses the data tables provided
- * by the generic bitfield manipulation implementation.
- * This can occur when actually using the generic bitfield manipulation
- * implementation or when implementing the same algorithm in assembly
- * language for improved performance. It is unlikely that a port will use
- * the data if it has a bitfield scan instruction.
- */
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-
-/**
- * @ingroup CPUBitfield
- * This routine sets @a _output to the bit number of the first bit
- * set in @a _value. @a _value is of CPU dependent type
- * @a Priority_Bit_map_control. This type may be either 16 or 32 bits
- * wide although only the 16 least significant bits will be used.
- *
- * There are a number of variables in using a "find first bit" type
- * instruction.
- *
- * -# What happens when run on a value of zero?
- * -# Bits may be numbered from MSB to LSB or vice-versa.
- * -# The numbering may be zero or one based.
- * -# The "find first bit" instruction may search from MSB or LSB.
- *
- * RTEMS guarantees that (1) will never happen so it is not a concern.
- * (2),(3), (4) are handled by the macros @ref _CPU_Priority_Mask and
- * @ref _CPU_Priority_bits_index. These three form a set of routines
- * which must logically operate together. Bits in the _value are
- * set and cleared based on masks built by @ref _CPU_Priority_Mask.
- * The basic major and minor values calculated by @ref _Priority_Major
- * and @ref _Priority_Minor are "massaged" by @ref _CPU_Priority_bits_index
- * to properly range between the values returned by the "find first bit"
- * instruction. This makes it possible for @ref _Priority_Get_highest to
- * calculate the major and directly index into the minor table.
- * This mapping is necessary to ensure that 0 (a high priority major/minor)
- * is the first bit found.
- *
- * This entire "find first bit" and mapping process depends heavily
- * on the manner in which a priority is broken into a major and minor
- * components with the major being the 4 MSB of a priority and minor
- * the 4 LSB. Thus (0 << 4) + 0 corresponds to priority 0 -- the highest
- * priority. And (15 << 4) + 14 corresponds to priority 254 -- the next
- * to the lowest priority.
- *
- * If your CPU does not have a "find first bit" instruction, then
- * there are ways to make do without it. Here are a handful of ways
- * to implement this in software:
- *
-@verbatim
- - a series of 16 bit test instructions
- - a "binary search using if's"
- - _number = 0
- if _value > 0x00ff
- _value >>=8
- _number = 8;
-
- if _value > 0x0000f
- _value >=8
- _number += 4
-
- _number += bit_set_table[ _value ]
-@endverbatim
-
- * where bit_set_table[ 16 ] has values which indicate the first
- * bit set
- *
- * @param _value (in) is the value to be scanned
- * @param _output (in) is the first bit set
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- { \
- (_output) = 0; /* do something to prevent warnings */ \
- }
-#endif
-
-/* end of Bitfield handler macros */
-
-/**
- * This routine builds the mask which corresponds to the bit fields
- * as searched by @ref _CPU_Bitfield_Find_first_bit. See the discussion
- * for that routine.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Priority_Mask( _bit_number ) \
- ( 1 << (_bit_number) )
-
-#endif
-
-/**
- * @ingroup CPUBitfield
- * This routine translates the bit numbers returned by
- * @ref _CPU_Bitfield_Find_first_bit into something suitable for use as
- * a major or minor component of a priority. See the discussion
- * for that routine.
- *
- * @param _priority (in) is the major or minor number to translate
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-
-#define _CPU_Priority_bits_index( _priority ) \
- (_priority)
-
-#endif
-
-/* end of Priority handler macros */
-
-/* functions */
-
-/**
- * This routine performs CPU dependent initialization.
- *
- * @param cpu_table (in) is the CPU Dependent Configuration Table
- * @param thread_dispatch (in) is the address of @ref _Thread_Dispatch
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)
-);
-
-/**
- * @ingroup CPUInterrupt
- * This routine installs a "raw" interrupt handler directly into the
- * processor's vector table.
- *
- * @param vector (in) is the vector number
- * @param new_handler (in) is the raw ISR handler to install
- * @param old_handler (in) is the previously installed ISR Handler
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-void _CPU_ISR_install_raw_handler(
- uint32_t vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/**
- * @ingroup CPUInterrupt
- * This routine installs an interrupt vector.
- *
- * @param vector (in) is the vector number
- * @param new_handler (in) is the RTEMS ISR handler to install
- * @param old_handler (in) is the previously installed ISR Handler
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-void _CPU_ISR_install_vector(
- uint32_t vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/**
- * @ingroup CPUInterrupt
- * This routine installs the hardware interrupt stack pointer.
- *
- * @note It need only be provided if @ref CPU_HAS_HARDWARE_INTERRUPT_STACK
- * is TRUE.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-void _CPU_Install_interrupt_stack( void );
-
-/**
- * This routine is the CPU dependent IDLE thread body.
- *
- * @note It need only be provided if @ref CPU_PROVIDES_IDLE_THREAD_BODY
- * is TRUE.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-void _CPU_Thread_Idle_body( void );
-
-/**
- * @ingroup CPUContext
- * This routine switches from the run context to the heir context.
- *
- * @param run (in) points to the context of the currently executing task
- * @param heir (in) points to the context of the heir task
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-
-/**
- * @ingroup CPUContext
- * This routine is generally used only to restart self in an
- * efficient manner. It may simply be a label in @ref _CPU_Context_switch.
- *
- * @param new_context (in) points to the context to be restored.
- *
- * @note May be unnecessary to reload some registers.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-void _CPU_Context_restore(
- Context_Control *new_context
-);
-
-/**
- * @ingroup CPUContext
- * This routine saves the floating point context passed to it.
- *
- * @param fp_context_ptr (in) is a pointer to a pointer to a floating
- * point context area
- *
- * @return on output @a *fp_context_ptr will contain the address that
- * should be used with @ref _CPU_Context_restore_fp to restore this context.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-);
-
-/**
- * @ingroup CPUContext
- * This routine restores the floating point context passed to it.
- *
- * @param fp_context_ptr (in) is a pointer to a pointer to a floating
- * point context area to restore
- *
- * @return on output @a *fp_context_ptr will contain the address that
- * should be used with @ref _CPU_Context_save_fp to save this context.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-);
-
-/**
- * @ingroup CPUEndian
- * The following routine swaps the endian format of an unsigned int.
- * It must be static because it is referenced indirectly.
- *
- * This version will work on any processor, but if there is a better
- * way for your CPU PLEASE use it. The most common way to do this is to:
- *
- * swap least significant two bytes with 16-bit rotate
- * swap upper and lower 16-bits
- * swap most significant two bytes with 16-bit rotate
- *
- * Some CPUs have special instructions which swap a 32-bit quantity in
- * a single instruction (e.g. i486). It is probably best to avoid
- * an "endian swapping control bit" in the CPU. One good reason is
- * that interrupts would probably have to be disabled to insure that
- * an interrupt does not try to access the same "chunk" with the wrong
- * endian. Another good reason is that on some CPUs, the endian bit
- * endianness for ALL fetches -- both code and data -- so the code
- * will be fetched incorrectly.
- *
- * @param value (in) is the value to be swapped
- * @return the value after being endian swapped
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-static inline uint32_t CPU_swap_u32(
- uint32_t value
-)
-{
- uint32_t byte1, byte2, byte3, byte4, swapped;
-
- byte4 = (value >> 24) & 0xff;
- byte3 = (value >> 16) & 0xff;
- byte2 = (value >> 8) & 0xff;
- byte1 = value & 0xff;
-
- swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
- return( swapped );
-}
-
-/**
- * @ingroup CPUEndian
- * This routine swaps a 16 bir quantity.
- *
- * @param value (in) is the value to be swapped
- * @return the value after being endian swapped
- */
-#define CPU_swap_u16( value ) \
- (((value&0xff) << 8) | ((value >> 8)&0xff))
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/cpukit/score/cpu/nios2/rtems/score/cpu_asm.h b/cpukit/score/cpu/nios2/rtems/score/cpu_asm.h
deleted file mode 100644
index 7d6a8fe809..0000000000
--- a/cpukit/score/cpu/nios2/rtems/score/cpu_asm.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * @file rtems/score/cpu_asm.h
- */
-
-/*
- * Very loose template for an include file for the cpu_asm.? file
- * if it is implemented as a ".S" file (preprocessed by cpp) instead
- * of a ".s" file (preprocessed by gm4 or gasp).
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- *
- */
-
-#ifndef _RTEMS_SCORE_CPU_ASM_H
-#define _RTEMS_SCORE_CPU_ASM_H
-
-/* pull in the generated offsets */
-
-/*
-#include <rtems/score/offsets.h>
-*/
-
-/*
- * Hardware General Registers
- */
-
-/* put something here */
-
-/*
- * Hardware Floating Point Registers
- */
-
-/* put something here */
-
-/*
- * Hardware Control Registers
- */
-
-/* put something here */
-
-/*
- * Calling Convention
- */
-
-/* put something here */
-
-/*
- * Temporary registers
- */
-
-/* put something here */
-
-/*
- * Floating Point Registers - SW Conventions
- */
-
-/* put something here */
-
-/*
- * Temporary floating point registers
- */
-
-/* put something here */
-
-#endif
-
-/* end of file */
diff --git a/cpukit/score/cpu/nios2/rtems/score/nios2.h b/cpukit/score/cpu/nios2/rtems/score/nios2.h
deleted file mode 100644
index abd52cad5c..0000000000
--- a/cpukit/score/cpu/nios2/rtems/score/nios2.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* nios2.h
- *
- * This file sets up basic CPU dependency settings based on
- * compiler settings. For example, it can determine if
- * floating point is available. This particular implementation
- * is specific to the NIOS2 port.
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- *
- */
-
-#ifndef _RTEMS_SCORE_NIOS2_H
-#define _RTEMS_SCORE_NIOS2_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This file contains the information required to build
- * RTEMS for a particular member of the NIOS2 family.
- * It does this by setting variables to indicate which
- * implementation dependent features are present in a particular
- * member of the family.
- *
- * This is a good place to list all the known CPU models
- * that this port supports and which RTEMS CPU model they correspond
- * to.
- */
-
-/*
- * Define the name of the CPU family and specific model.
- */
-
-#define CPU_NAME "NIOS2"
-#define CPU_MODEL_NAME "nios2"
-
-/*
- * See also nios2-rtems-gcc -print-multi-lib for all valid combinations of
- *
- * -mno-hw-mul
- * -mhw-mulx
- * -mstack-check
- * -pg
- * -EB
- * -mcustom-fpu-cfg=60-1
- * -mcustom-fpu-cfg=60-2
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _RTEMS_SCORE_NIOS2_H */
diff --git a/cpukit/score/cpu/nios2/rtems/score/types.h b/cpukit/score/cpu/nios2/rtems/score/types.h
deleted file mode 100644
index 17ffaf5f5f..0000000000
--- a/cpukit/score/cpu/nios2/rtems/score/types.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * @file rtems/score/types.h
- */
-
-/*
- * This include file contains type definitions pertaining to the
- * Altera Nios II processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#ifndef _RTEMS_SCORE_TYPES_H
-#define _RTEMS_SCORE_TYPES_H
-
-#ifndef ASM
-
-#include <rtems/stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef uint16_t Priority_Bit_map_control;
-
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef uint32_t boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void nios2_isr;
-typedef void ( *nios2_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
diff --git a/tools/cpu/nios2/.cvsignore b/tools/cpu/nios2/.cvsignore
deleted file mode 100644
index bfdfd995be..0000000000
--- a/tools/cpu/nios2/.cvsignore
+++ /dev/null
@@ -1,14 +0,0 @@
-aclocal.m4
-autom4te*.cache
-config.cache
-config.guess
-config.log
-config.status
-config.sub
-configure
-depcomp
-install-sh
-Makefile
-Makefile.in
-missing
-mkinstalldirs
diff --git a/tools/cpu/nios2/ChangeLog b/tools/cpu/nios2/ChangeLog
deleted file mode 100644
index 56f12a7198..0000000000
--- a/tools/cpu/nios2/ChangeLog
+++ /dev/null
@@ -1,22 +0,0 @@
-2006-08-15 Kolja Waschk <kawk@telos.de>
-
- * linkcmds.c, linkcmds.h, memory.c, memory.h, sample.ptf: New files.
- * bridges.c: corrected detection of bridged connections
- * clocks.c: removed a printf
- * linkcmds.[ch] new files, added output of linker script
- * Makefile.am: added new files
- * memory.[ch]: new files, detection of memory in SOPC configuration
- * nios2gen.c: updated command line parsing and output control
- * output.[ch]: improved output of BSP header file
- * ptf.[ch]: added ptf_dump_ptf_item and small fixes
- * sample.ptf: new file, sample configuration for nios2gen
- * README: updated
-
-2006-08-10 Joel Sherrill <joel@oarcorp.com>
-
- * nios2gen.c: Added some very basic support for --help and --version
- options along with output that is roughly in GNU format. This is
- required by help2man. help2man expects this all to be written to
- stdout instead of stderr so this was changed as well.
- * ChangeLog: New file.
-
diff --git a/tools/cpu/nios2/Makefile.am b/tools/cpu/nios2/Makefile.am
deleted file mode 100644
index 8ca3c89df0..0000000000
--- a/tools/cpu/nios2/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-##
-## $Id$
-##
-
-ACLOCAL_AMFLAGS = -I ../../../aclocal
-
-noinst_PROGRAMS = nios2gen
-
-nios2gen_SOURCES = nios2gen.c \
- bridges.c bridges.h \
- devices.c devices.h \
- clocks.c clocks.h \
- output.c output.h \
- linkcmds.c linkcmds.h \
- memory.c memory.h \
- ptf.h ptf.c
-
-if HELP2MAN
-man_MANS = nios2gen.1
-
-nios2gen.1: nios2gen$(EXEEXT)
- $(HELP2MAN) -N ./nios2gen >$@
-endif
-
-include $(top_srcdir)/../../../automake/host.am
diff --git a/tools/cpu/nios2/README b/tools/cpu/nios2/README
deleted file mode 100644
index f961dff6b1..0000000000
--- a/tools/cpu/nios2/README
+++ /dev/null
@@ -1,148 +0,0 @@
-$Id$
-
-nios2gen:
- Tool to generate BSP data for boards utilizing NIOS2 soft core processor.
-
-=================================
-What it does
-
-It creates a sopc.h and linkcmds file for RTEMS nios2 BSPs from one or more inputs:
-
-1. SOPC System Description PTF
-
-As an output from SOPC Builder you get a file with extension ".ptf" that fully
-describes the SOPC, including all CPUs, memory and integrated peripherals.
-(PTF simply means "plain-text file").
-
-2. BSP Configuration PTF
-
-This file, using the same format as the SOPC System Description PTF, describes
-which components of the SOPC shall be used by the BSP. For example, there may
-be several timers, but a BSP wants at least one named "CLOCK" and optionally
-another named "TIMER". This mapping can be specified in the BSP.
-
-=================================
-Contents of the configuration PTF
-
-There can be definitions of ...
-
-HEADER: This is written to sopc.h before anything else. Example:
-
- HEADER = "
- #ifndef __SOPC_H
- #define __SOPC_H 1
- ";
-
-EPILOG: This is written to sopc.h after anything else. Example:
-
- EPILOG = "
- #endif
- ";
-
-CLOCKS section: Used to specify names for clocks to be used in definitions in
-the sopc.h. The default name (if none is specified here) is the uppercased name
-as in the system description PTF. Specify the name you want on the left, the
-name in the sopc PTF on the right! Example:
-
- CLOCKS
- {
- GLOBAL_CLOCK = "sys_clk";
- }
-
-MODULES section: Same as clocks but for modules / peripherals. As a special definition,
-if the PTF contains more than one nios2 CPU, it /must/ define a CPU to use. Example to
-select cpu_0 and rename timer_0 to CLOCK and timer_1 to TIMER:
-
- MODULES
- {
- CPU = "cpu_0";
- CLOCK = "timer_0";
- TIMER = "timer_1";
- }
-
-CLASS xyz sections: These specify what you want in the sopc.h, and how the definitions
-shall be named. Actually, the CLASS xyz should look exactly like the corresponding MODULE
-specification in the system description PTF of modules belonging to that class; e.g. a
-a JTAG UART is originally described like this:
-
- MODULE jtag_uart_0
- {
- class = "altera_avalon_jtag_uart";
- class_version = "1.0";
- iss_model_name = "altera_avalon_jtag_uart";
- SLAVE avalon_jtag_slave
- {
- SYSTEM_BUILDER_INFO
- {
- Bus_Type = "avalon";
- Is_Printable_Device = "1";
- Address_Alignment = "native";
- Address_Width = "1";
- Data_Width = "32";
- Has_IRQ = "1";
- Read_Wait_States = "peripheral_controlled";
- Write_Wait_States = "peripheral_controlled";
- JTAG_Hub_Base_Id = "0x04006E";
- JTAG_Hub_Instance_Id = "0";
- MASTERED_BY cpu_0/data_master
- {
- priority = "1";
- }
- IRQ_MASTER cpu_0/data_master
- {
- IRQ_Number = "2";
- }
- Base_Address = "0x08000000";
- }
- }
- ...
- }
-
-If you want to have definitions about its base address and irq number in your sopc.h,
-define a CLASS for altera_avalon_jtag_uart that matches the MODULE description above,
-but instead of values for the items you specify names to be used in your sopc.h (You
-can omit items from the MODULE as you like, but the section nesting must match; and
-section names (such as avalon_jtag_slave for the SLAVE section) also have to match)
-
- CLASS altera_avalon_jtag_uart
- {
- SLAVE avalon_jtag_slave
- {
- SYSTEM_BUILDER_INFO
- {
- Base_Address = "BASE_ADDR";
- IRQ_MASTER { IRQ_Number = "IRQ"; }
- }
- }
- }
-
-The output for jtag_uart_0 will be:
-
- #define JTAG_UART_BASE_ADDR 0x021208D0
- #define JTAG_UART_IRQ 1
-
-There are some values with special meaning to nios2gen,
-
-N2G_CLOCKREF_CLOCK: This should be used whereever the value in the SOPC PTF
-specifies the name of a clock. nios2gen will use whatever you configured for
-the selected clock in your CLOCKS section.
-
-N2G_CLOCKREF_DEVICE: This should be used whereever the value in the SOPC PTF
-specifies the name of a module. nios2gen will use whatever you configured for
-the selected module in your MODULES section.
-
-Additionally, you can specify items in your CLASSes so that nios2gen will include
-constant definitions in the sopc.h whenever such CLASS is present. The format is
-
- N2G_DEFINE_xyz = "123"
-
-and will result in
-
-#define MODULENAME_xyz 123
-
-
-
-
-
-
-
diff --git a/tools/cpu/nios2/bridges.c b/tools/cpu/nios2/bridges.c
deleted file mode 100644
index e5f36e07c4..0000000000
--- a/tools/cpu/nios2/bridges.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-/********************************************************/
-/* Find bus bridges */
-
-/* This part of the program builds a list with pairs of bus
- master port names (each is "device name/master port name").
- It is then possible to find if a given master is actually
- available under a different master port name through bridges.
- */
-
-/* Typical example with external SRAM that is slave of
- tristate_bridge_0/tristate_master, and
- tristate_bridge_0 itself is slave of cpu0/data_master, the
- bridge information would be stored as this bus_bridge_pair:
- mastered_by = "cpu0/data_master" and
- bridges_to = "tristate_bridge_0/tristate_master".
- That allows to deduce that SRAM is actually mastered by
- cpu0/data_master. If there were any address or bus width
- translations, it should be noted in the bridges list... For
- now we simply assume that bridges never translate anything.
- */
-
-#include <string.h>
-#include <stdlib.h>
-
-#include "ptf.h"
-#include "bridges.h"
-
-int is_bridged(
- char *cpu_master,
- char *dev_master,
- bus_bridge_pair *bridges)
-{
- char *curr_master;
- bus_bridge_pair *bbp;
-
- if(strcmp(cpu_master, dev_master) == 0) return 1; /* cpu directly masters dev */
-
- for(bbp = bridges; bbp != NULL; bbp=bbp->next)
- {
- if(strcmp(cpu_master, bbp->mastered_by) == 0 &&
- is_bridged(bbp->bridges_to, dev_master, bridges))
- {
- return 1; /* cpu masters dev via bridge */
- }
- };
-
- return 0;
-}
-
-void add_bridge_master(struct ptf_item *pi, void *arg)
-{
- struct { char *bt; bus_bridge_pair **bridges; } *binfo = arg;
- bus_bridge_pair *new_pair;
-
- if(binfo->bridges == 0) return;
-
- new_pair = (bus_bridge_pair *)malloc(sizeof(bus_bridge_pair));
- if(new_pair == NULL) return;
-
- new_pair->bridges_to = binfo->bt;
- new_pair->mastered_by = pi->item[pi->level]->value;
- new_pair->next = *(binfo->bridges);
- *(binfo->bridges) = new_pair;
-}
-
-void add_bridge_dest(struct ptf_item *pi, void *arg)
-{
- struct ptf maby_section = { section, "MASTERED_BY", 0, 0, 0 };
- struct ptf_item maby = { 1, &maby_section };
-
- char *bridge_name = pi->item[1]->value;
- char *bridge_dest = pi->item[pi->level]->value;
- struct { char *bt; bus_bridge_pair **bridges; } binfo;
-
- binfo.bridges = arg;
- binfo.bt = (char*)malloc(strlen(bridge_name)+strlen(bridge_dest) + 2);
- strcpy(binfo.bt, bridge_name);
- strcat(binfo.bt, "/");
- strcat(binfo.bt, bridge_dest);
-
- ptf_match(pi->item[pi->level-1]->sub, &maby, add_bridge_master, &binfo);
-
- /* binfo.bt is NOT freed here */
-}
-
-bus_bridge_pair *find_bridges(struct ptf *p)
-{
- bus_bridge_pair *bridges = 0;
-
- struct ptf system = { section, "SYSTEM", 0, 0, 0 };
- struct ptf module = { section, "MODULE", 0, 0, 0 };
- struct ptf slave = { section, "SLAVE", 0, 0, 0 };
- struct ptf syb = { section, "SYSTEM_BUILDER_INFO", 0, 0, 0 };
- struct ptf to = { item, "Bridges_To", 0, 0, 0 };
- struct ptf_item brdg = { 5, &system, &module, &slave, &syb, &to };
-
- ptf_match(p, &brdg, add_bridge_dest, &bridges);
-
- return bridges;
-}
-
-
-
-
diff --git a/tools/cpu/nios2/bridges.h b/tools/cpu/nios2/bridges.h
deleted file mode 100644
index 1d348dc2f2..0000000000
--- a/tools/cpu/nios2/bridges.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#ifndef __NIOS2GEN_BRIDGES_H
-#define __NIOS2GEN_BRIDGES_H 1
-
-typedef struct bus_bridge_pair
-{
- char *mastered_by;
- char *bridges_to;
- struct bus_bridge_pair *next;
-}
-bus_bridge_pair;
-
-bus_bridge_pair *find_bridges(struct ptf *p);
-
-int is_bridged(
- char *cpu_master,
- char *dev_master,
- bus_bridge_pair *bridges);
-
-#endif
-
-
diff --git a/tools/cpu/nios2/clocks.c b/tools/cpu/nios2/clocks.c
deleted file mode 100644
index 2c72770798..0000000000
--- a/tools/cpu/nios2/clocks.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include "ptf.h"
-#include "clocks.h"
-
-#include <stdlib.h>
-
-void add_clock_spec(struct ptf_item *pi, void *arg)
-{
- clock_desc **clocks = arg;
- clock_desc *new_clock;
- unsigned long freq;
-
- new_clock = (clock_desc*)malloc(sizeof(clock_desc));
- if(new_clock == NULL) return;
-
- new_clock->freq = strtoul(pi->item[pi->level]->value, 0, 0);
-
- new_clock->cfgname = NULL;
- new_clock->name = pi->item[pi->level-1]->value;
- new_clock->next = *clocks;
-
-
- *clocks = new_clock;
-}
-
-void set_clock_cfgname(struct ptf_item *pi, void *arg)
-{
- clock_desc *clock = arg;
- clock->cfgname = pi->item[pi->level]->name;
-}
-
-clock_desc *find_clocks( struct ptf *sopc, struct ptf *cfg )
-{
- clock_desc *clocks, *reverse;
-
- struct ptf system = { section, "SYSTEM", 0, 0, 0 };
- struct ptf wizargs = { section, "WIZARD_SCRIPT_ARGUMENTS", 0, 0, 0 };
- struct ptf all = { section, "CLOCKS", 0, 0, 0 };
- struct ptf clock = { section, "CLOCK", 0, 0, 0 };
- struct ptf freq = { item, "frequency", 0, 0, 0 };
- struct ptf_item clk_spec = { 5, &system, &wizargs, &all, &clock, &freq };
-
- struct ptf named = { item, 0, 0, 0, 0 };
- struct ptf_item clk_cfg = { 2, &all, &named };
-
- clocks = NULL;
- ptf_match(sopc, &clk_spec, add_clock_spec, &clocks);
-
- /* Reverse the linked list and look for configured names */
-
- reverse = NULL;
- while(clocks)
- {
- clock_desc *tmp = clocks;
- clocks = clocks->next;
- tmp->next = reverse;
- reverse = tmp;
-
- named.value = tmp->name;
- ptf_match(cfg, &clk_cfg, set_clock_cfgname, tmp);
- if(tmp->cfgname == NULL) tmp->cfgname = ptf_defused_name(tmp->name);
- };
-
- return reverse;
-}
-
-
-
diff --git a/tools/cpu/nios2/clocks.h b/tools/cpu/nios2/clocks.h
deleted file mode 100644
index ef8395d39c..0000000000
--- a/tools/cpu/nios2/clocks.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#ifndef __NIOS2GEN_CLOCKS_H
-#define __NIOS2GEN_CLOCKS_H 1
-
-#include "ptf.h"
-
-typedef struct clockdsc
-{
- char *name;
- char *cfgname;
- unsigned long freq;
- struct clockdsc *next;
-}
-clock_desc;
-
-clock_desc *find_clocks( struct ptf *ptf, struct ptf *cfg );
-
-#endif
-
diff --git a/tools/cpu/nios2/configure.ac b/tools/cpu/nios2/configure.ac
deleted file mode 100644
index 3388357c3c..0000000000
--- a/tools/cpu/nios2/configure.ac
+++ /dev/null
@@ -1,23 +0,0 @@
-## Process this file with autoconf to produce a configure script.
-##
-## $Id$
-
-AC_PREREQ(2.59)
-AC_INIT([rtems-tools-cpu-nios2],[_RTEMS_VERSION],[rtems-bugs@rtems.com])
-AC_CONFIG_SRCDIR([nios2gen.c])
-RTEMS_TOP(../../..)
-
-RTEMS_CANONICAL_TARGET_CPU
-
-AM_INIT_AUTOMAKE([foreign 1.9])
-AM_MAINTAINER_MODE
-
-AC_PROG_CC
-AC_CHECK_PROGS(HELP2MAN,help2man)
-AM_CONDITIONAL(HELP2MAN,test -n "$HELP2MAN" )
-
-RTEMS_TOOLPATHS
-
-# Explicitly list all Makefiles here
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/tools/cpu/nios2/devices.c b/tools/cpu/nios2/devices.c
deleted file mode 100644
index 112191f487..0000000000
--- a/tools/cpu/nios2/devices.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "ptf.h"
-#include "bridges.h"
-#include "devices.h"
-
-void add_device(device_desc **dl, struct ptf *dev)
-{
- device_desc *eds;
-
- for(eds = *dl; eds; eds = eds->next)
- {
- if(eds->ptf == dev)
- {
- eds->slaves++;
- return;
- };
- };
-
- eds = (device_desc *)malloc(sizeof(device_desc));
- eds->slaves = 1;
- eds->ptf = dev;
- eds->next = *dl;
- *dl = eds;
-}
-
-void check_and_add_device(struct ptf_item *pi, void *arg)
-{
- struct ptf *module = pi->item[pi->level-3];
- struct ptf *sysinfo = pi->item[pi->level-2];
- char *master_name = pi->item[pi->level]->value;
-
- struct { char *dm; char *im; device_desc **dl; bus_bridge_pair *bridges; } *dinfo = arg;
-
- if(is_bridged(dinfo->dm, master_name, dinfo->bridges) ||
- is_bridged(dinfo->im, master_name, dinfo->bridges))
- {
- struct ptf *ni = ptf_alloc_item(item, "N2G_Selected", "1");
- if(ni != NULL)
- {
- ni->next = sysinfo->sub;
- sysinfo->sub = ni;
- };
- add_device(dinfo->dl, module);
- };
-}
-
-void set_dev_cfgname(struct ptf_item *pi, void *arg)
-{
- device_desc *dev = arg;
- dev->cfgname = pi->item[pi->level]->name;
-}
-
-
-device_desc *find_devices(
- struct ptf *ptf,
- struct ptf *cfg,
- struct ptf *cpu,
- bus_bridge_pair *bridges)
-{
- struct ptf system = { section, "SYSTEM", 0, 0, 0 };
- struct ptf module = { section, "MODULE", 0, 0, 0 };
- struct ptf slave = { section, "SLAVE", 0, 0, 0 };
- struct ptf syb = { section, "SYSTEM_BUILDER_INFO", 0, 0, 0 };
- struct ptf maby = { section, "MASTERED_BY", 0, 0, 0 };
- struct ptf_item brdg = { 5, &system, &module, &slave, &syb, &maby };
-
- struct ptf modules = { section, "MODULES", 0, 0, 0 };
- struct ptf named = { item, 0, 0, 0, 0};
- struct ptf_item devcf = { 2, &modules, &named };
-
- struct { char *dm; char *im; device_desc **dl; bus_bridge_pair *bridges; } dinfo;
-
- device_desc *found, *reverse;
-
- found = NULL;
-
- add_device(&found, cpu); /* The CPU is "self-connected", add it */
-
- dinfo.dl = &found;
- dinfo.bridges = bridges;
- dinfo.dm = (char *)malloc(strlen(cpu->value)+13);
- dinfo.im = (char *)malloc(strlen(cpu->value)+20);
-
- strcpy(dinfo.im, cpu->value);
- strcat(dinfo.im, "/");
- strcpy(dinfo.dm, dinfo.im);
- strcat(dinfo.dm, "data_master");
- strcat(dinfo.im, "instruction_master");
-
- /* "Available" is any MODULE with a SLAVE section that is MASTERED_BY
- either instr_master or data_master of selected CPU, either directly
- or through a bridge. See code above for more info about bridges.
- */
-
- ptf_match(ptf, &brdg, check_and_add_device, &dinfo);
-
- free(dinfo.dm);
- free(dinfo.im);
-
- /* Reverse the linked list */
-
- reverse = NULL;
- while(found)
- {
- device_desc *tmp = found;
- found = found->next;
-
- tmp->next = reverse;
- reverse = tmp;
-
- named.value = tmp->ptf->value;
- tmp->cfgname = NULL;
- ptf_match(cfg, &devcf, set_dev_cfgname, tmp);
- if(tmp->cfgname == NULL) tmp->cfgname = ptf_defused_name(tmp->ptf->value);
- };
-
- return reverse;
-}
-
diff --git a/tools/cpu/nios2/devices.h b/tools/cpu/nios2/devices.h
deleted file mode 100644
index 11164c5245..0000000000
--- a/tools/cpu/nios2/devices.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#ifndef __NIOS2GEN_DEVICES_H
-#define __NIOS2GEN_DEVICES_H 1
-
-#include "ptf.h"
-#include "bridges.h"
-
-typedef struct dev_descr
-{
- int slaves;
- char *cfgname;
- struct ptf *ptf;
- struct dev_descr *next;
-}
-device_desc;
-
-device_desc *find_devices(
- struct ptf *ptf,
- struct ptf *cfg,
- struct ptf *cpu,
- bus_bridge_pair *bridges);
-
-#endif
diff --git a/tools/cpu/nios2/linkcmds.c b/tools/cpu/nios2/linkcmds.c
deleted file mode 100644
index 46e0c05755..0000000000
--- a/tools/cpu/nios2/linkcmds.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "ptf.h"
-#include "devices.h"
-#include "output.h" /* is_not_connected, fwrite_value, etc */
-#include "memory.h"
-#include "linkcmds.h"
-
-typedef struct
-{
- FILE *file;
- struct ptf *cfg, *cpu;
- device_desc *devices;
- memory_desc *memory;
-}
-lcmd_desc;
-
-void fwrite_lcmds_section(struct ptf_item *pi, void *arg)
-{
- lcmd_desc *li = (lcmd_desc *)arg;
- struct ptf *p;
- struct ptf_item lpi;
- char *location = NULL;
- char *section_name = pi->item[1]->value;
-
- if(section_name == 0)
- {
- fprintf(stderr, "Found a LINKER/SECTION without name, ignoring it.\n");
- return;
- };
-
- p = ptf_find(pi->item[1]->sub, &lpi, item, "LOCATION", 0);
- if(p)
- {
- location = p->value;
- }
- else
- {
- if(strcmp(section_name, "entry") == 0)
- {
- p = ptf_find(li->cpu, &lpi, item, "reset_slave", 0);
- }
- else if(strcmp(section_name, "exceptions") == 0)
- {
- p = ptf_find(li->cpu, &lpi, item, "exc_slave", 0);
- };
- if(p) location = p->value;
- /* TODO: This doesn't work yet, parse full slave address, translate into our naming */
- }
-
- if(location == 0)
- {
- fprintf(stderr, "No LOCATION configured for section '%s'!\n", pi->item[1]->value);
- return;
- };
-
- fprintf(li->file, " .%s :\n {\n", pi->item[1]->value);
- fprintf(li->file, pi->item[2]->value);
- fprintf(li->file, " } > %s\n\n", location);
-}
-
-void fwrite_linkcmds_file(FILE *file, struct ptf *cfg, struct ptf *cpu, device_desc *devices, memory_desc *memory)
-{
- struct ptf *p;
- struct ptf_item pi;
- memory_desc *tmd;
- lcmd_desc linfo;
-
- struct ptf ptlink = { section, "LINKCMDS", 0, 0, 0 };
- struct ptf ptleadtext = { item, "LEADTEXT", 0, 0, 0 };
- struct ptf ptepilog = { item, "EPILOG", 0, 0, 0 };
- struct ptf_item malihead = { 2, &ptlink, &ptleadtext };
- struct ptf_item maliepil = { 2, &ptlink, &ptepilog };
-
- struct ptf ptsect = { section, "SECTION", 0, 0, 0 };
- struct ptf ptcmds = { item, "COMMANDS", 0, 0, 0 };
- struct ptf ptstabs = { item, "STABS", 0, 0, 0 };
- struct ptf_item malisect = { 3, &ptlink, &ptsect, &ptcmds };
- struct ptf_item malistabs = { 2, &ptlink, &ptstabs };
-
- linfo.cfg = cfg;
- linfo.cpu = cpu;
- linfo.file = file;
- linfo.devices = devices;
- linfo.memory = memory;
-
- ptf_match(cfg, &malihead, fwrite_value, file);
-
- fprintf(file, "MEMORY\n{\n");
- for(tmd = linfo.memory; tmd; tmd = tmd->next)
- {
- fprintf(file, " %s : ORIGIN = 0x%08X, LENGTH = 0x%08X\n", tmd->dev->cfgname, tmd->base, tmd->size);
- }
- fprintf(file, "}\n\nSECTIONS\n{\n");
-
- ptf_match(cfg, &malisect, fwrite_lcmds_section, &linfo);
- ptf_match(cfg, &malistabs, fwrite_value, file);
-
- for(tmd = linfo.memory; tmd; tmd = tmd->next)
- {
- fprintf(file, " %s : ORIGIN = 0x%08X, LENGTH = 0x%08X\n", tmd->dev->cfgname, tmd->base, tmd->size);
- }
-
-
- fprintf(file, "}\n\n");
-
- ptf_match(cfg, &maliepil, fwrite_value, file);
-}
-
-
diff --git a/tools/cpu/nios2/linkcmds.h b/tools/cpu/nios2/linkcmds.h
deleted file mode 100644
index d2686d5e8e..0000000000
--- a/tools/cpu/nios2/linkcmds.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#ifndef __LINKCMDS_H
-#define __LINKCMDS_H 1
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "ptf.h"
-#include "devices.h"
-
-void fwrite_linkcmds_file(FILE *file, struct ptf *cfg, struct ptf *cpu, device_desc *devices, memory_desc *memory);
-
-#endif
-
-
diff --git a/tools/cpu/nios2/memory.c b/tools/cpu/nios2/memory.c
deleted file mode 100644
index 0c35953354..0000000000
--- a/tools/cpu/nios2/memory.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "ptf.h"
-#include "devices.h"
-#include "memory.h"
-
-memory_desc *find_memory(device_desc *devices)
-{
- struct ptf *p;
- struct ptf_item pi;
- memory_desc *tmd, *memory;
-
- /********************************************************/
- /* Check which of the devices are memory, sort by size */
-
- if(devices)
- {
- struct ptf *p, *s;
- struct ptf_item pi;
- device_desc *dd;
-
- memory = NULL;
-
- for(dd = devices; dd; dd=dd->next)
- {
- p = ptf_find(dd->ptf->sub, &pi, item, "Is_Memory_Device", "1");
- if(p != NULL && pi.level>0)
- {
- s = pi.item[pi.level-1];
- p = ptf_find(s, &pi, item, "Base_Address", 0);
- };
-
- if(p != NULL)
- {
- tmd = (memory_desc*)malloc(sizeof(memory_desc));
-
- if(tmd != NULL)
- {
- tmd->base = strtoul(p->value, 0, 0);
-
- p = ptf_find(s, &pi, item, "Address_Span", 0);
- if(p != 0)
- {
- tmd->size = strtoul(p->value, 0, 0);
- }
- else
- {
- tmd->size = 0;
- p = ptf_find(s, &pi, item, "Address_Width", 0);
- if(p) tmd->size = 1 << strtoul(p->value, 0, 0);
- p = ptf_find(s, &pi, item, "Data_Width", 0);
- if(p) tmd->size *= (strtoul(p->value, 0, 0) >> 3);
- };
-
- if(tmd->size == 0)
- {
- free(tmd);
- }
- else
- {
- tmd->dev = dd;
-
- if(memory == NULL)
- {
- tmd->next = NULL;
- memory = tmd;
- }
- else
- {
- if(tmd->size > memory->size)
- {
- tmd->next = memory;
- memory = tmd;
- }
- else
- {
- memory_desc *uplink = memory;
- while(uplink->next != NULL && uplink->next->size > tmd->size) uplink=uplink->next;
- tmd->next = uplink->next;
- uplink->next = tmd;
- };
- };
- };
- };
- };
- };
- };
-
- return memory;
-}
-
-
diff --git a/tools/cpu/nios2/memory.h b/tools/cpu/nios2/memory.h
deleted file mode 100644
index 0fe364c4b9..0000000000
--- a/tools/cpu/nios2/memory.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#ifndef __MEMORY_H
-#define __MEMORY_H 1
-
-#include "devices.h"
-
-typedef struct memdsc
-{
- unsigned long base;
- unsigned long size;
- device_desc *dev;
- struct memdsc *next;
-}
-memory_desc;
-
-memory_desc *find_memory(device_desc *devices);
-
-#endif
-
-
diff --git a/tools/cpu/nios2/nios2gen.c b/tools/cpu/nios2/nios2gen.c
deleted file mode 100644
index a62f0e3120..0000000000
--- a/tools/cpu/nios2/nios2gen.c
+++ /dev/null
@@ -1,496 +0,0 @@
-/*
- * Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "ptf.h"
-#include "bridges.h"
-#include "clocks.h"
-#include "devices.h"
-#include "memory.h"
-#include "output.h"
-#include "linkcmds.h"
-
-#define NIOS2GEN_PACKAGE PACKAGE
-#define NIOS2GEN_VERSION VERSION
-
-#include "getopt.h"
-
-/********************************************************/
-
-void store_ptf_parent(struct ptf_item *pi, void *arg)
-{
- struct ptf *p = pi->item[pi->level-1];
- *(struct ptf **)arg = p;
-}
-
-/********************************************************/
-
-void store_ptf_ptr(struct ptf_item *pi, void *arg)
-{
- struct ptf *p = pi->item[pi->level];
- *(struct ptf **)arg = p;
-}
-
-/********************************************************/
-
-void printf_ptf_value(struct ptf_item *pi, void *arg)
-{
- struct ptf *p = pi->item[pi->level];
- printf(*(char **)arg, p->value);
-}
-
-/********************************************************/
-
-void read_include_file(struct ptf_item *pi, void *arg)
-{
- struct ptf *inc, *next;
- struct ptf *p = pi->item[pi->level];
-
- inc = ptf_parse_file(p->value);
-
- if(inc == NULL)
- {
- fprintf(stderr, "Warning: couldn't parse included '%s'.\n", p->value);
- return;
- };
-
- printf("Successfully read included PTF file %s.\n", p->value);
-
- next = p->next;
- for(p->next = inc; p->next != NULL; p = p->next);
- p->next = next;
-}
-
-/********************************************************/
-
-void version(FILE *f)
-{
-fprintf(f,
- "nios2gen (" __DATE__ ")\n"
- " Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de\n"
- "\n"
- " The license and distribution terms for this file may be\n"
- " found in the file LICENSE in this distribution or at\n"
- " http://www.rtems.com/license/LICENSE.\n"
- , VERSION
-);
-}
-
-void usage (FILE *f, char *errmsg)
-{
- char *info = "Purpose:\n Create RTEMS nios2 BSP configuration from Altera SOPC description\n";
- if(errmsg) info=errmsg;
- version(f);
- fprintf(f,"\n%s\nUsage: nios2gen [OPTIONS] <SOPC PTF> [CONFIG PTF] [CONFIG PTF]...\n", info);
- fprintf(f," -h --help Print help and exit\n");
- fprintf(f," -V --version Print version and exit\n");
- fprintf(f," -bFILENAME --bspheader=FILENAME Output BSP configuration header file (default='sopc.h')\n");
- fprintf(f," -B --no-bspheader Do not output BSP configuration header file\n");
- fprintf(f," -lFILENAME --linkcmds=FILENAME Output linker script (default='linkcmds')\n");
- fprintf(f," -L --no-linkcmds Do not output linker script\n");
- fprintf(f," -pFILENAME --parsed=FILENAME Output PTF contents as long list (default: don't)\n");
- fprintf(f," -P --no-parsed Do not output PTF contents as long list\n");
- fprintf(f," -q --quiet Do not print progress info to stdout\n\n");
- fprintf(f,"Using \"-\" as the FILENAME means standard output (stdout).\n");
-}
-
-/********************************************************/
-
-int main(int argc, char *argv[])
-{
- struct ptf *sopc, *cfg, *p, *cpu;
- struct ptf_item pi;
- device_desc *devices;
- bus_bridge_pair *bridges;
- clock_desc *clocks;
- memory_desc *memory;
-
- int verbose = 1;
- int output_order = 127;
- char *parsed_filename = NULL;
- int output_parsed = 0;
- char *bspheader_filename = "sopc.h";
- int output_bspheader = 1;
- char *linkcmds_filename = "linkcmds";
- int output_linkcmds = 2;
-
- optarg = 0;
- optind = 1;
- opterr = 1;
- optopt = '?';
-
- if(argc > 126)
- {
- usage(stderr,"Too many commandline arguments!\n");
- return -1;
- };
-
- while(1)
- {
- int c, long_index = 0;
- static char *optstring = "hVBb:Ll:Pp:q";
-
- static struct option long_options[] =
- {
- { "help", 0, NULL, 'h' },
- { "version", 0, NULL, 'V' },
- { "no-bspheader", 0, NULL, 'B' },
- { "bspheader", 1, NULL, 'b' },
- { "no-linkcmds", 0, NULL, 'L' },
- { "linkcmds", 1, NULL, 'l' },
- { "no-parsed", 0, NULL, 'P' },
- { "parsed", 1, NULL, 'p' },
- { "quiet", 0, NULL, 'q' },
- { NULL, 0, NULL, 0 }
- };
-
- c = getopt_long (argc, argv, optstring, long_options, &long_index);
-
- if(c == -1) break; /* Exit from while(1) loop */
-
- switch(c)
- {
- case 'q': /* Be quiet */
- verbose = 0;
- break;
-
- case 'h': /* Print help and exit */
- usage(stdout,NULL);
- return 0;
-
- case 'V': /* Print version and exit */
- version(stdout);
- return 0;
-
- case 'B': /* Do not output BSP configuration header file */
- output_bspheader = 0;
- break;
-
- case 'b': /* Output BSP configuration header file */
- bspheader_filename = optarg;
- output_bspheader = output_order;
- output_order--;
- break;
-
- case 'L': /* Do not output linker script */
- output_linkcmds = 0;
- break;
-
- case 'l': /* Output linker script */
- linkcmds_filename = optarg;
- output_linkcmds = output_order;
- output_order--;
- break;
-
- case 'P': /* Do not output PTF contents */
- output_parsed = 0;
- break;
-
- case 'p': /* Output PTF contents as long list */
- parsed_filename = optarg;
- output_parsed = output_order;
- output_order--;
- break;
-
- case 0:
- case '?':
- return -1;
-
- default:
- fprintf(stderr, "%s: unknown option: %c\n", NIOS2GEN_PACKAGE, c);
- };
- };
-
- if(optind >= argc)
- {
- usage(stderr,"No PTF specified!\n");
- return -1;
- };
-
- /********************************************************/
-
- sopc = ptf_parse_file(argv[optind]);
- if(sopc == NULL)
- {
- fprintf(stderr, "Could not parse system description PTF '%s'.\n", argv[optind]);
- return -1;
- };
-
- if(verbose) printf("Successfully read SOPC PTF file %s.\n", argv[optind]);
-
- /********************************************************/
-
- cfg = NULL;
-
- for(optind++;optind<argc;optind++)
- {
- struct ptf *morecfg = ptf_parse_file(argv[optind]);
-
- if(morecfg == NULL)
- {
- fprintf(stderr, "Couldn't parse '%s'.\n", argv[optind]);
- return -1;
- };
-
- if(verbose) printf("Successfully read config PTF file %s.\n", argv[optind]);
-
- cfg = ptf_concat(cfg, morecfg);
- };
-
- /********************************************************/
- /* Pull in include files specified in the configs; */
- /* Only one level is read; included files are not */
- /* checked for further INCLUDEs */
-
- {
- struct ptf include_item = { item, "INCLUDE", 0, 0, 0 };
- struct ptf_item inc_file_spec = { 1, &include_item };
- ptf_match(cfg, &inc_file_spec, read_include_file, NULL);
- }
-
- /********************************************************/
- /* Find CPU */
-
- if(verbose) printf("Looking for usable CPUs...\n");
-
- /* Check if a CPU has been specified in the config PTF */
- {
- struct ptf modules = { section, "MODULES", 0, 0, 0 };
- struct ptf cpu_def = { item, "CPU", 0, 0, 0 };
- struct ptf_item cpu_spec = { 2, &modules, &cpu_def };
-
- ptf_match(cfg, &cpu_spec, store_ptf_ptr, &cpu);
- };
-
- /* Look for CPUs in system description PTF */
- {
- int cpu_count;
- struct ptf system = { section, "SYSTEM", 0, 0, 0 };
- struct ptf module = { section, "MODULE", 0, 0, 0 };
- struct ptf nios2_cpu_class = { item, "class", "altera_nios2", 0, 0 };
- struct ptf_item class_spec = { 3, &system, &module, &nios2_cpu_class };
-
- if(cpu) if(cpu->value) class_spec.item[1]->value = cpu->value;
-
- cpu_count = ptf_match(sopc, &class_spec, store_ptf_parent, &cpu);
-
- if(cpu_count > 1)
- {
- fprintf(stderr, "There is more than one CPU. Please specify the one\n");
- fprintf(stderr, "you want to use with this BSP in your config file.\n");
- fprintf(stderr, "The available CPUs are named as follows:\n");
- ptf_match(sopc, &class_spec, printf_ptf_value, " %s\n");
- return -1;
- };
-
- if(cpu_count == 0)
- {
- fprintf(stderr, "There is no NIOS2 cpu in the system.\n");
- return -1;
- }
- };
-
- if(verbose)
- {
- printf("Using NIOS II CPU '%s'.\n", cpu->value);
- printf("Only modules mastered by this CPU are considered now.\n");
- };
-
- /********************************************************/
- /* Find Bridges */
-
- if(verbose) printf("Looking for bus bridges...\n");
-
- bridges = find_bridges(sopc);
-
- if(verbose)
- {
- if(bridges)
- {
- bus_bridge_pair *bbp;
- for(bbp = bridges; bbp; bbp=bbp->next)
- {
- printf("Found bridge: %s\n", bbp->mastered_by);
- printf(" \\_%s\n", bbp->bridges_to);
- };
- }
- else
- {
- printf("No bridges present.\n");
- };
- };
-
- /********************************************************/
- /* Find clocks */
-
- if(verbose) printf("Looking for clock definitions...\n");
-
- clocks = find_clocks(sopc, cfg);
-
- if(verbose)
- {
- if(clocks)
- {
- clock_desc *cs;
- for(cs = clocks; cs; cs = cs->next)
- {
- printf("Found clock \"%s\" (%lu Hz), naming it %s\n", cs->name, cs->freq, cs->cfgname);
- };
- }
- else
- {
- printf("No clocks present.\n");
- };
- };
-
- /********************************************************/
- /* Find other devices available to the selected CPU */
-
- if(verbose) printf("Looking for devices...\n");
-
- devices = find_devices(sopc, cfg, cpu, bridges);
-
- if(verbose)
- {
- if(devices)
- {
- device_desc *dd;
- for(dd = devices; dd; dd=dd->next)
- {
- printf("Found device \"%s\", naming it %s\n", dd->ptf->value, dd->cfgname);
- };
- }
- else
- {
- printf("No devices present.\n");
- };
- };
-
- /********************************************************/
- /* Find out which devices are actually memory */
-
- if(verbose) printf("Looking for memory...\n");
-
- memory = find_memory(devices);
-
- if(verbose)
- {
- if(memory)
- {
- memory_desc *md;
- for(md = memory; md; md=md->next)
- {
- printf("Found memory in \"%s\", base=0x%08X, size=%lu bytes\n",
- md->dev->cfgname,
- md->base, md->size);
- };
- }
- else
- {
- printf("None of the devices seems to provide memory?!\n");
- };
- };
-
-
- /********************************************************/
- /* Output files in the order they were specified
- on the command line */
-
- {
- int i;
- for(i=0;i<3;i++)
- {
- if(output_bspheader>0
- && output_bspheader>=output_linkcmds
- && output_bspheader>=output_parsed)
- {
- output_bspheader = 0;
- if(bspheader_filename == NULL || (bspheader_filename[0]=='-' && bspheader_filename[1]==0))
- {
- fwrite_header_file(stdout, cfg, devices, clocks);
- }
- else
- {
- FILE *f = fopen(bspheader_filename, "w");
- if(!f)
- {
- perror(bspheader_filename);
- return -1;
- }
- else
- {
- fwrite_header_file(f, cfg, devices, clocks);
- fclose(f);
- }
- }
- };
- if(output_linkcmds>0
- && output_linkcmds>=output_bspheader
- && output_linkcmds>=output_parsed)
- {
- output_linkcmds = 0;
- if(linkcmds_filename == NULL || (linkcmds_filename[0]=='-' && linkcmds_filename[1]==0))
- {
- fwrite_linkcmds_file(stdout, cfg, cpu, devices, memory);
- }
- else
- {
- FILE *f = fopen(linkcmds_filename, "w");
- if(!f)
- {
- perror(linkcmds_filename);
- return -1;
- }
- else
- {
- fwrite_linkcmds_file(f, cfg, cpu, devices, memory);
- fclose(f);
- }
- }
- };
- if(output_parsed>0
- && output_parsed>=output_linkcmds
- && output_parsed>=output_bspheader)
- {
- output_parsed = 0;
- if(parsed_filename == NULL || (parsed_filename[0]=='-' && parsed_filename[1]==0))
- {
- ptf_printf(stdout, sopc, "");
- }
- else
- {
- FILE *f = fopen(parsed_filename, "w");
- if(!f)
- {
- perror(parsed_filename);
- return -1;
- }
- else
- {
- ptf_printf(f, sopc, "");
- fclose(f);
- }
- }
- };
- }
- };
-
- if(verbose) printf("Done.\n");
-
- return 0;
-}
-
-/* vi:ts=4:
- */
-
-
diff --git a/tools/cpu/nios2/output.c b/tools/cpu/nios2/output.c
deleted file mode 100644
index d9f368d05c..0000000000
--- a/tools/cpu/nios2/output.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "ptf.h"
-#include "devices.h"
-#include "output.h"
-
-typedef struct
-{
- FILE *file;
- device_desc *dev;
- char *def_name;
- char *orig_value;
- clock_desc *clocks;
- device_desc *devices;
-}
-out_desc;
-
-int is_not_connected(struct ptf_item *pi)
-{
- if(pi->item[0] == NULL) return 0;
- if(pi->item[0]->name == NULL) return 0;
-
- if(strcmp(pi->item[0]->name, "SLAVE") == 0)
- {
- struct ptf *t;
- struct ptf_item ti;
- t = ptf_find(pi->item[0]->sub, &ti, item, "N2G_Selected", "1");
-
- if(t == NULL) return 1;
- };
-
- return 0;
-}
-
-void fwrite_devhead_def(struct ptf_item *pi, void *arg)
-{
- out_desc *dinfo = arg;
-
- if(pi != NULL) if(is_not_connected(pi)) return;
-
- fprintf(dinfo->file, "#define %s_%s %s\n",
- dinfo->dev->cfgname, dinfo->def_name, dinfo->orig_value);
-}
-
-void fwrite_devhead_line(struct ptf_item *pi, void *arg)
-{
- out_desc *dinfo = arg;
-
- if(is_not_connected(pi)) return;
-
- if(strncmp(dinfo->orig_value, "N2G_", 4)==0)
- {
- if(strncmp(dinfo->orig_value, "N2G_CLOCKREF_", 13)==0)
- {
- clock_desc *c;
- for(c = dinfo->clocks; c; c=c->next)
- {
- if(strcmp(c->name, pi->item[pi->level]->value) == 0)
- {
- fprintf(dinfo->file, "#define %s_%s %s\n",
- dinfo->dev->cfgname, dinfo->orig_value + 13, c->cfgname);
- break;
- };
- };
- }
- else if(strncmp(dinfo->orig_value, "N2G_DEVICEREF_", 14)==0)
- {
- device_desc *d;
- for(d = dinfo->devices; d; d=d->next)
- {
- if(strcmp(d->ptf->value, pi->item[pi->level]->value) == 0)
- {
- fprintf(dinfo->file, "#define %s_%s %s\n",
- dinfo->dev->cfgname, dinfo->orig_value + 14, d->cfgname);
- break;
- };
- };
- }
- }
- else
- {
- fprintf(dinfo->file, "#define %s_%s %s\n",
- dinfo->dev->cfgname, dinfo->orig_value,
- pi->item[pi->level]->value);
- };
-}
-
-void fwrite_device_header(struct ptf_item *pi, void *arg)
-{
- struct ptf *f;
- struct ptf_item fi;
- out_desc *dinfo = arg;
-
- /* This is called for every matching CLASS section in the
- configuration. The following loop iterates through all
- items in the CLASS section regardless of their nesting level */
-
- f = ptf_find(pi->item[pi->level]->sub, &fi, item, 0, 0);
-
- while(f != NULL)
- {
- dinfo->orig_value = f->value;
- if(f->name && strncmp(f->name, "N2G_DEFINE_", 11)==0)
- {
- dinfo->def_name = f->name + 11;
- if(fi.level >= 2)
- {
- fi.level--; /* match only the enclosing section */
- ptf_match(dinfo->dev->ptf->sub, &fi, fwrite_devhead_def, dinfo);
- fi.level++;
- }
- else
- {
- fwrite_devhead_def( 0, dinfo );
- };
- }
- else
- {
- f->value = 0; /* Match ANY value */
- ptf_match(dinfo->dev->ptf->sub, &fi, fwrite_devhead_line, dinfo);
- f->value = dinfo->orig_value;
- };
- f = ptf_next(&fi, item, 0, 0);
- };
-}
-
-void fwrite_value(struct ptf_item *pi, void *arg)
-{
- FILE *file = arg;
- fputs(pi->item[pi->level]->value, file);
-}
-
-void fwrite_header_file( FILE *file, struct ptf *cfg, device_desc *devices, clock_desc *clocks)
-{
- struct ptf *p;
- struct ptf_item pi;
-
- struct ptf aclass = { section, "CLASS", 0, 0, 0 };
- struct ptf_item matchaclass = { 1, &aclass };
-
- struct ptf bspsect = { section, "BSPHEADER", 0, 0, 0 };
- struct ptf leadtext = { item, "LEADTEXT", 0, 0, 0 };
- struct ptf_item matchleadtext = { 2, &bspsect, &leadtext };
-
- struct ptf epilog = { item, "EPILOG", 0, 0, 0 };
- struct ptf_item matchepilog = { 2, &bspsect, &epilog };
-
- out_desc dinfo;
-
- dinfo.file = file;
- dinfo.clocks = clocks;
- dinfo.devices = devices;
-
- ptf_match(cfg, &matchleadtext, fwrite_value, file);
-
- if(clocks)
- {
- clock_desc *cs;
- for(cs = clocks; cs; cs = cs->next)
- {
- fprintf(file, "#define %s_FREQ %luu\n", cs->cfgname, cs->freq);
- };
- };
-
- if(devices)
- {
- for(dinfo.dev = devices; dinfo.dev; dinfo.dev=dinfo.dev->next)
- {
- /* fprintf(file, "\n#define SOPC_HAS_%s 1\n", dinfo.dev->cfgname); */
-
- p = ptf_find(dinfo.dev->ptf, &pi, item, "class", 0);
- if(p)
- {
- aclass.value = p->value;
- ptf_match(cfg, &matchaclass, fwrite_device_header, &dinfo);
- };
- };
- };
-
- ptf_match(cfg, &matchepilog, fwrite_value, file);
-}
-
-
diff --git a/tools/cpu/nios2/output.h b/tools/cpu/nios2/output.h
deleted file mode 100644
index ad36629bf8..0000000000
--- a/tools/cpu/nios2/output.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#ifndef __OUTPUT_H
-#define __OUTPUT_H 1
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "ptf.h"
-#include "clocks.h"
-#include "devices.h"
-
-void fwrite_value(struct ptf_item *pi, void *arg);
-void fwrite_header_file(FILE *file, struct ptf *cfg, device_desc *devices, clock_desc *clocks);
-
-#endif
-
-
diff --git a/tools/cpu/nios2/ptf.c b/tools/cpu/nios2/ptf.c
deleted file mode 100644
index 6f8943d0b3..0000000000
--- a/tools/cpu/nios2/ptf.c
+++ /dev/null
@@ -1,853 +0,0 @@
-/*
- * Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include "ptf.h"
-
-#define PTFPARSER_MAXDEPTH 20
-#define PTFPARSER_NAMEBUFSIZE 1024
-#define PTFPARSER_VALUEBUFSIZE 4096
-
-#define DEBUG_EXPECTATIONS 1
-#define DEBUG_READVALUES 2
-#define DEBUG_FINDER 4
-#define DEBUG 0
-
-struct ptf_parser_state
-{
- struct ptf *tree;
- struct ptf *current_in[PTFPARSER_MAXDEPTH];
- struct ptf *current_item;
-
- long line; /* starts with 1, increments whenever a LF (ASCII 10) passes */
- int section_level; /* starts at 0, incremented at {, decremented at } */
- char *filename;
- char name_buffer[PTFPARSER_NAMEBUFSIZE];
- int name_length;
- char value_buffer[PTFPARSER_VALUEBUFSIZE];
- int value_length;
- struct
- {
- unsigned error:1;
- unsigned escaped:1;
- unsigned single_quoted:1;
- unsigned double_quoted:1;
- } flag;
-
- enum
- {
- section_or_item_specification,
- more_section_type_or_item_name_chars,
- whitespace_after_section_specification,
- whitespace_after_section_or_item_name,
- whitespace_before_item_value,
- more_section_name_chars,
- more_item_value_chars,
- } expectation;
-};
-
-/***************************************************************************/
-struct ptf *ptf_alloc_item(ptf_item_type t, char *name, char *value)
-{
- struct ptf *new_item;
- new_item = (struct ptf *)malloc(sizeof(struct ptf));
- if(!new_item) return NULL;
-
- new_item->type = t;
- new_item->sub = NULL;
- new_item->next = NULL;
- new_item->name = NULL;
- new_item->value = NULL;
-
- if(name != NULL)
- {
- int n = strlen(name);
- if(n > 0)
- {
- new_item->name = (char *)malloc(n + 1);
- if(new_item->name == NULL)
- {
- free(new_item);
- return NULL;
- };
- strcpy(new_item->name, name);
- }
- };
-
- if(value != NULL)
- {
- int n = strlen(value);
- if(n > 0)
- {
- new_item->value = (char *)malloc(n + 1);
- if(new_item->value == NULL)
- {
- if(name != NULL) free(new_item->name);
- free(new_item);
- return NULL;
- };
- strcpy(new_item->value, value);
- };
- };
-
- return new_item;
-}
-
-/***************************************************************************/
-void add_ptf_item(struct ptf_parser_state *state, struct ptf *item)
-{
- if(state->current_item == NULL)
- {
- if(state->section_level > 0)
- state->current_in[state->section_level-1]->sub = item;
- else
- state->tree = item;
- }
- else
- state->current_item->next = item;
-}
-
-
-/***************************************************************************/
-void parse_error(struct ptf_parser_state *state, char *errmsg)
-{
- fprintf(stderr, "Error while parsing %s (line %lu): %s\n",
- state->filename, state->line, errmsg);
-
- state->flag.error = 1;
-}
-
-/***************************************************************************/
-void init_parser(struct ptf_parser_state *state, char *filename)
-{
- int i;
-
- state->line = 1;
- state->flag.error = 0;
- state->flag.escaped = 0;
- state->flag.double_quoted = 0;
- state->flag.single_quoted = 0;
- state->section_level = 0;
-
- state->filename = (char *)malloc(strlen(filename)+1);
- if(state->filename != NULL) strcpy(state->filename, filename);
-
- state->expectation = section_or_item_specification;
-
- state->tree = NULL;
- state->current_item = NULL;
- for(i=1; i<PTFPARSER_MAXDEPTH; i++) state->current_in[i] = NULL;
-}
-
-/***************************************************************************/
-void ptf_free(struct ptf *ptf)
-{
- struct ptf *this, *next;
- for(this = ptf; this != NULL; this = next)
- {
- next = this->next;
- if(this->value != NULL) free(this->value);
- if(this->name != NULL) free(this->name);
- if(this->type == section) ptf_free(this->sub);
- free(this);
- };
-}
-
-/***************************************************************************/
-void abort_parsing(struct ptf_parser_state *state)
-{
- if(state->filename != NULL) free(state->filename);
- ptf_free(state->tree);
-}
-
-/***************************************************************************/
-int add_char_to_buffer(int *len, char *buf, int maxlen, char c)
-{
- if(*len >= maxlen) return 0;
-
- buf[(*len)++] = c;
-
- return 1;
-}
-
-/***************************************************************************/
-void parse_char(struct ptf_parser_state *state, int c)
-{
- int is_not_quoted;
- int is_no_space;
- enum { item_parsed, section_opened, section_closed, none } parser_event;
-
- switch(c)
- {
- case '\\':
- {
- if(state->flag.escaped == 0)
- {
- state->flag.escaped = 1;
- return;
- };
- break;
- };
- case '"':
- {
- if(!state->flag.escaped && !state->flag.single_quoted)
- {
- state->flag.double_quoted = 1 - state->flag.double_quoted;
- return;
- }
- break;
- };
- case '\'':
- {
- if(!state->flag.escaped && !state->flag.double_quoted)
- {
- state->flag.single_quoted = 1 - state->flag.single_quoted;
- return;
- }
- break;
- };
- case '\n':
- {
- state->line++;
- break;
- };
- default:
- break;
- };
-
- parser_event = none;
-
- is_not_quoted = !(state->flag.escaped ||
- state->flag.single_quoted || state->flag.double_quoted);
- is_no_space = (!is_not_quoted || !isspace(c));
- state->flag.escaped = 0;
-
- switch(state->expectation)
- {
- case section_or_item_specification:
- {
-#if DEBUG&DEBUG_EXPECTATIONS
- printf("Expectation: section_or_item_specification\n");
-#endif
-
- if(is_not_quoted && c == '}')
- {
- parser_event = section_closed;
- }
- else if(is_no_space)
- {
- state->name_length = 1;
- state->name_buffer[0] = c;
- state->expectation = more_section_type_or_item_name_chars;
- };
- break;
- };
-
- case more_section_type_or_item_name_chars:
- {
-#if DEBUG&DEBUG_EXPECTATIONS
- printf("Expectation: more_section_type_or_item_name_chars\n");
-#endif
-
- /* Item name is stored in name_buffer */
- /* Section type is stored in name_buffer */
- if(is_no_space)
- {
- if(!add_char_to_buffer(&state->name_length, state->name_buffer, PTFPARSER_NAMEBUFSIZE, c))
- parse_error(state, "First word is too long; I expected a shorter section type or item name");
- }
- else
- {
- state->expectation = whitespace_after_section_or_item_name;
- }
- break;
- };
-
- case whitespace_after_section_specification:
- {
-#if DEBUG&DEBUG_EXPECTATIONS
- printf("Expectation: whitespace_after_section_specification\n");
-#endif
-
- if(c == '{')
- parser_event = section_opened;
- else if(is_no_space)
- parse_error(state, "Expected section content within brackets {...}");
- break;
- };
-
- case whitespace_after_section_or_item_name:
- {
-#if DEBUG&DEBUG_EXPECTATIONS
- printf("Expectation: whitespace_after_section_or_item_name\n");
-#endif
-
- if(c == '{')
- {
- state->value_length = 0;
- parser_event = section_opened;
- }
- else if(c == '=')
- state->expectation = whitespace_before_item_value;
- else if(is_no_space)
- {
- state->value_length = 1;
- state->value_buffer[0] = c;
- state->expectation = more_section_name_chars;
- };
- break;
- };
-
- case more_section_name_chars:
- {
-#if DEBUG&DEBUG_EXPECTATIONS
- printf("Expectation: more_section_name_chars\n");
-#endif
-
- /* Section name is stored in value_buffer */
- if(is_no_space)
- {
- if(!add_char_to_buffer(&state->value_length, state->value_buffer, PTFPARSER_VALUEBUFSIZE, c))
- parse_error(state, "Section name is too long");
- }
- else
- state->expectation = whitespace_after_section_specification;
- break;
- }
-
- case whitespace_before_item_value:
- {
-#if DEBUG&DEBUG_EXPECTATIONS
- printf("Expectation: whitespace_before_item_value\n");
-#endif
-
- if(is_not_quoted && c == ';')
- {
- state->value_length = 0;
- parser_event = item_parsed;
- }
- else if(is_no_space)
- {
- state->value_length = 1;
- state->value_buffer[0] = c;
- state->expectation = more_item_value_chars;
- };
- break;
- };
-
- case more_item_value_chars:
- {
-#if DEBUG&DEBUG_EXPECTATIONS
- printf("Expectation: more_item_value_chars\n");
-#endif
-
- /* Item value is stored in value_buffer */
- if(is_not_quoted && c == ';')
- parser_event = item_parsed;
- else if(is_no_space)
- {
- if(!add_char_to_buffer(&state->value_length, state->value_buffer, PTFPARSER_VALUEBUFSIZE, c))
- parse_error(state, "Item value is too long");
- }
- else
- parser_event = item_parsed;
- break;
- }
-
- default:
-#if DEBUG&DEBUG_EXPECTATIONS
- printf("Expectation: %d (?)\n", state->expectation);
-#endif
-
- parse_error(state, "Internal error: Unhandled state of expectation");
- };
-
- switch(parser_event)
- {
- /* TODO: pointer tuff */
-
- case item_parsed:
- {
- struct ptf *new_item;
- state->name_buffer[state->name_length] = 0;
- state->value_buffer[state->value_length] = 0;
-#if DEBUG&DEBUG_READVALUES
- printf("== Item %s is '%s' ==\n", state->name_buffer, state->value_buffer);
-#endif
-
- new_item = ptf_alloc_item(item, state->name_buffer, state->value_buffer);
- if(new_item == NULL)
- {
- parse_error(state, "Internal error: "
- "Could not allocate memory for new item");
- return;
- };
-
- add_ptf_item(state, new_item);
- state->current_item = new_item;
- state->expectation = section_or_item_specification;
-
- break;
- };
- case section_opened:
- {
- struct ptf *new_section;
- state->name_buffer[state->name_length] = 0;
- state->value_buffer[state->value_length] = 0;
-#if DEBUG&DEBUG_READVALUES
- printf("== New %s section '%s' opened ==\n", state->name_buffer, state->value_buffer);
-#endif
-
- if(state->section_level >= PTFPARSER_MAXDEPTH-1)
- {
- parse_error(state, "Internal error: "
- "cannot handle sections nested as deep as here.");
- return;
- };
-
- new_section = ptf_alloc_item(section, state->name_buffer, state->value_buffer);
- if(new_section == NULL)
- {
- parse_error(state, "Internal error: "
- "Could not allocate memory for new section");
- return;
- };
-
- add_ptf_item(state, new_section);
- state->current_item = NULL;
- state->current_in[state->section_level] = new_section;
- state->section_level++;
-
- state->expectation = section_or_item_specification;
- break;
- };
- case section_closed:
- {
- if(state->section_level < 1)
- {
- parse_error(state, "Found closing '}' without opening '{' before");
- return;
- };
-
- state->section_level--;
- state->current_item = state->current_in[state->section_level];
- state->expectation = section_or_item_specification;
-#if DEBUG&DEBUG_READVALUES
- printf("-- Closed section --\n");
-#endif
- break;
- };
- default:
- break;
- };
-}
-
-/***************************************************************************/
-struct ptf *ptf_parse_file(char *filename)
-{
- FILE *f;
- char buffer[1024];
-
- struct ptf *root;
- struct ptf_parser_state state;
-
- if(filename == NULL)
- {
- fprintf(stderr, "Internal error: "
- "No filename was given to ptf_read()\n");
- return NULL;
- };
-
- f = fopen(filename, "r");
- if(f == NULL)
- {
- perror(filename);
- return NULL;
- };
-
- init_parser(&state, filename);
-
- while(!feof(f))
- {
- size_t r, n;
-
- if(ferror(f))
- {
- perror(filename);
- abort_parsing(&state);
- fclose(f);
- return NULL;
- };
-
- n = fread(buffer, 1, 1024, f);
- for(r=0; r<n && (state.flag.error==0); r++) parse_char(&state, buffer[r]);
- };
-
- fclose(f);
-
- if(state.section_level != 0)
- {
- parse_error(&state, "Input file seems to be incomplete, "
- "one or more sections are not closed with '}'\n");
- };
-
- if(state.flag.error)
- {
- abort_parsing(&state);
- return NULL;
- };
-
- return state.tree;
-}
-
-/***************************************************************************/
-
-struct ptf *ptf_concat(struct ptf *a, struct ptf *b)
-{
- struct ptf *leaf = a;
-
- if(!a) return b;
- if(!b) return a;
-
- for(leaf = a; leaf->next != NULL; leaf = leaf->next);
- leaf->next = b;
- return a;
-}
-
-/***************************************************************************/
-
-void ptf_dump_ptf_item(FILE *f, struct ptf_item *pi)
-{
- int i;
- fprintf(f, "level=%d in %p\n", pi->level, pi);
- for(i=pi->level;i>=0;i--)
- {
- if(pi->item[i] != NULL)
- {
- fprintf(f, " %d: %s name=%s value=%s\n",
- i,
- pi->item[i]->type == item ? "item":"section",
- pi->item[i]->name,
- pi->item[i]->value);
- }
- else
- {
- fprintf(f, " %d: NULL\n");
- }
- fflush(f);
- }
-}
-
-/***************************************************************************/
-
-void ptf_printf(FILE *s, struct ptf *tree, char *prefix)
-{
- struct ptf *leaf;
-
- for(leaf = tree; leaf != NULL; leaf = leaf->next)
- {
- switch(leaf->type)
- {
- case section:
- {
- char *new_prefix;
- int new_prefix_len;
- new_prefix_len = strlen(prefix) + strlen(leaf->name) + 2;
- if(leaf->value != NULL && leaf->value[0] != 0)
- {
- new_prefix_len += strlen(leaf->value) + 1;
- };
- new_prefix = (char *)malloc(new_prefix_len);
- strcpy(new_prefix, prefix);
- strcat(new_prefix, leaf->name);
- if(leaf->value != NULL && leaf->value[0] != 0)
- {
- strcat(new_prefix, ":");
- strcat(new_prefix, leaf->value);
- };
- strcat(new_prefix, "/");
- fputs(new_prefix, s);
- fputs("\n", s);
- ptf_printf(s, leaf->sub, new_prefix);
- break;
- };
-
- case item:
- {
- char *c;
- fputs(prefix, s);
- fputs(leaf->name, s);
- fputs(" = \"", s);
- if(leaf->value == NULL)
- {
- fputs("(NULL)", s);
- }
- else
- {
- for(c=leaf->value; *c; c++)
- {
- if(*c=='\\' || *c=='"') putc('\\', s);
- putc(*c, s);
- };
- }
- fprintf(s, "\"\n");
- break;
- };
-
- default:
- break;
- };
- };
-}
-
-/***************************************************************************/
-
-int ptf_advance_one(struct ptf_item *item)
-{
- int d;
- struct ptf *leaf;
-
- d = item->level;
- leaf = item->item[d];
-
- if(leaf != NULL)
- {
- if(leaf->type == section && leaf->sub != NULL)
- {
- if(item->level >= MAX_SECTION_NESTING-1)
- {
- /* raise an error? hm, for now we silently ignore the subtree */
- }
- else
- {
- d++;
- item->item[d] = leaf->sub;
- item->level = d;
- return 0;
- }
- }
- item->item[item->level] = leaf->next;
- };
-
- while(item->item[d] == NULL)
- {
- if(d == 0)
- {
- item->level = 0;
- item->item[0] = NULL;
- errno = ENOENT;
- return -1;
- }
- d --;
- leaf = item->item[d];
- if(leaf != NULL) item->item[d] = leaf->next;
- };
-
- item->level = d;
- return 0;
-}
-
-/***************************************************************************/
-
-int ptf_advance_until(
- struct ptf_item *item,
- ptf_item_type ttype,
- char *name,
- char *value)
-{
- int r;
- struct ptf *leaf;
-
- do
- {
- leaf = item->item[item->level];
-#if DEBUG&DEBUG_FINDER
- printf(" Does %s/%s match %s/%s?\n", leaf->name, leaf->value, name, value);
-#endif
-
- if(leaf->type == ttype)
- {
- if(name == NULL)
- {
- if(value == NULL)
- {
- return 0; /* got it (any value) */
- }
- else if (leaf->value != NULL)
- {
- if(strcmp(leaf->value, value) == 0) return 0; /* got it */
- }
- }
- else if(leaf->name != NULL)
- {
- if(strcmp(leaf->name, name) == 0)
- {
- if(value == NULL)
- {
- return 0; /* got it (any value) */
- }
- else if(leaf->value != NULL)
- {
- if(strcmp(leaf->value, value) == 0) return 0; /* got it */
- }
- }
- }
- };
- r = ptf_advance_one(item);
-
- } while(r == 0);
-
- return r;
-}
-
-/***************************************************************************/
-
-struct ptf *ptf_find(
- struct ptf *tree,
- struct ptf_item *item,
- ptf_item_type ttype,
- char *name,
- char *value)
-{
- int r;
-
- if(item == NULL) { errno = EINVAL; return NULL; };
- if(tree == NULL) { errno = ENOENT; return NULL; };
-
- item->level = 0;
- item->item[0] = tree;
-
- if(ptf_advance_until(item, ttype, name, value) != 0) return NULL;
-
- r = item->level;
- item->level++; /* To match ptf_match */
- return item->item[r];
-}
-
-/***************************************************************************/
-
-struct ptf *ptf_next(
- struct ptf_item *item,
- ptf_item_type ttype,
- char *name,
- char *value)
-{
- int r;
- struct ptf *leaf;
-
- if(item == NULL) { errno = EINVAL; return NULL; };
-
- if(item->level < 1) return NULL;
- item->level--; /* To match ptf_match */
-
- r = ptf_advance_one(item);
-
- if(r == 0) r = ptf_advance_until(item, ttype, name, value);
-
- if(r != 0) return NULL;
-
- r = item->level;
- item->level++; /* To match ptf_match */
- return item->item[r];
-}
-
-/***************************************************************************/
-
-int ptf_match(
- struct ptf *const ptf,
- struct ptf_item *const match,
- const ptf_match_action action,
- void *arg)
-{
- int count;
- struct ptf *p;
- struct ptf_item pi;
-
- p = ptf;
- count = 0;
- pi.level = 0;
-
- while(p != NULL)
- {
- ptf_item_type mtype = match->item[pi.level]->type;
- char *mname = match->item[pi.level]->name;
- char *mvalue = match->item[pi.level]->value;
-
-#if DEBUG&DEBUG_FINDER
- printf("Looking for %s/%s, checking %s/%s\n",
- mname, mvalue, p->name, p->value);
-#endif
-
- if(mtype == p->type &&
- (mname==NULL || p->name==NULL || strcmp(mname, p->name)==0) &&
- (mvalue==NULL || p->value==NULL || strcmp(mvalue, p->value)==0))
- {
- pi.item[pi.level] = p;
-
- if(pi.level == match->level - 1)
- {
- if(action != NULL) action(&pi, arg);
- p = p->next;
- count++;
- }
- else
- {
- if(p->sub != NULL && pi.level < MAX_SECTION_NESTING-1)
- {
- pi.item[pi.level] = p;
- pi.level++;
- p = p->sub;
- }
- else
- {
- p = p->next;
- };
- };
- }
- else
- {
- p = p->next;
- };
-
- while(p == NULL && pi.level > 0)
- {
- pi.level--;
- p = pi.item[pi.level]->next;
- };
- };
- return count;
-}
-
-/***************************************************************************/
-
-char *ptf_defused_name(char *orig_name)
-{
- int i,j;
- char *s = (char *)malloc(1+strlen(orig_name));
-
- if(!s) return NULL;
-
- for(i=j=0;orig_name[i];i++)
- {
- if(!isalnum(orig_name[i]))
- {
- if(j>0) if(s[j-1]!='_') s[j++]='_';
- }
- else
- {
- s[j++] = toupper(orig_name[i]);
- };
- };
- s[j] = 0;
- return s;
-}
-
diff --git a/tools/cpu/nios2/ptf.h b/tools/cpu/nios2/ptf.h
deleted file mode 100644
index 3683b98163..0000000000
--- a/tools/cpu/nios2/ptf.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#if !defined(__PTF_H)
-#define __PTF_H 1
-
-#include <stdio.h>
-
-#define MAX_SECTION_NESTING 20
-
-typedef enum
-{
- item, section
-}
-ptf_item_type;
-
-struct ptf
-{
- ptf_item_type type;
- char *name;
- char *value;
- struct ptf *sub;
- struct ptf *next;
-};
-
-struct ptf_item
-{
- int level;
- struct ptf *item[MAX_SECTION_NESTING];
-};
-
-
-typedef void (*ptf_match_action)(struct ptf_item *x, void *arg);
-
-struct ptf *ptf_parse_file(char *filename);
-struct ptf *ptf_concat(struct ptf *a, struct ptf *b);
-struct ptf *ptf_alloc_item(ptf_item_type t, char *name, char *value);
-void ptf_printf(FILE *s, struct ptf *tree, char *prefix);
-void ptf_dump_ptf_item(FILE *s, struct ptf_item *pi);
-
-struct ptf *ptf_find(
- struct ptf *tree,
- struct ptf_item *item,
- ptf_item_type ttype,
- char *name,
- char *value);
-
-struct ptf *ptf_next(
- struct ptf_item *item,
- ptf_item_type ttype,
- char *name,
- char *value);
-
-int ptf_match(
- struct ptf *const ptf,
- struct ptf_item *const match,
- const ptf_match_action action,
- void *arg);
-
-char *ptf_defused_name(char *);
-
-
-#endif /* !defined(__PTF_H) */
-
diff --git a/tools/cpu/nios2/sample.ptf b/tools/cpu/nios2/sample.ptf
deleted file mode 100644
index eb4cf7fea4..0000000000
--- a/tools/cpu/nios2/sample.ptf
+++ /dev/null
@@ -1,462 +0,0 @@
-N2GCOMM = "=============== Header output settings ===========================";
-
-BSPHEADER
-{
- LEADTEXT =
-"/* Autogenerated by nios2gen, (C) 2006 K. Waschk rtemsdev/ixo.de */
-
-#ifndef __SOPC_H
-#define __SOPC_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define CLOCK_FREQ_REF(clock) clock ## _FREQ
-#define CLOCK_FREQ(x) CLOCK_FREQ_REF(x)
-
-";
-
- EPILOG =
-"
-#ifdef __cplusplus
-}
-#endif
-#endif
-";
-}
-
-N2GCOMM = "=============== Class templates ==================================";
-
-CLASS altera_nios2
-{
- N2G_DEFINE_IS_AVAILABLE = "1";
-
- SYSTEM_BUILDER_INFO
- {
- Clock_Source = "N2G_CLOCKREF_CLOCK";
- }
- SLAVE jtag_debug_module
- {
- SYSTEM_BUILDER_INFO { Base_Address = "BASE_ADDR"; }
- }
- WIZARD_SCRIPT_ARGUMENTS
- {
- cache_has_dcache = "HAS_DCACHE";
- cache_has_icache = "HAS_ICACHE";
- cache_dcache_size = "DCACHE_SIZE";
- cache_icache_size = "ICACHE_SIZE";
- cache_dcache_line_size = "DCACHE_LINE_SIZE";
- cache_icache_line_size = "ICACHE_LINE_SIZE";
- cache_dcache_bursts = "DCACHE_BURSTS";
- cache_icache_burst_type = "ICACHE_BURST_TYPE";
- hardware_multiply_present = "HAS_HWMULT";
- }
-}
-
-CLASS altera_avalon_onchip_memory2
-{
- N2G_DEFINE_IS_AVAILABLE = "1";
-
- WIZARD_SCRIPT_ARGUMENTS
- {
- Writeable = "WRITEABLE";
- dual_port = "DUAL_PORT";
- Size_Value = "SIZE_VALUE";
- Size_Multiple = "SIZE_MULTIPLE";
- }
- SYSTEM_BUILDER_INFO
- {
- Clock_Source = "N2G_CLOCKREF_CLOCK";
- }
- SLAVE s1
- {
- N2G_DEFINE_CONNECTED_PORT = "S1";
-
- SYSTEM_BUILDER_INFO
- {
- Base_Address = "S1_BASE_ADDR";
- Data_Width = "S1_DATA_WIDTH";
- Address_Width = "S1_ADDR_WIDTH";
- Address_Span = "S1_ADDR_SPAN";
- }
- }
- SLAVE s2
- {
- N2G_DEFINE_CONNECTED_PORT = "S2";
-
- SYSTEM_BUILDER_INFO
- {
- Base_Address = "S2_BASE_ADDR";
- Data_Width = "S2_DATA_WIDTH";
- Address_Width = "S2_ADDR_WIDTH";
- Address_Span = "S2_ADDR_SPAN";
- }
- }
-}
-
-CLASS sram_256k_x_16_bit
-{
- N2G_DEFINE_IS_AVAILABLE = "1";
-
- SLAVE sram
- {
- SYSTEM_BUILDER_INFO
- {
- Base_Address = "BASE_ADDR";
- Data_Width = "DATA_WIDTH";
- Address_Width = "ADDR_WIDTH";
- Address_Span = "ADDR_SPAN";
- }
- }
-}
-
-CLASS altera_avalon_sysid
-{
- N2G_DEFINE_IS_AVAILABLE = "1";
-
- SLAVE control_slave
- {
- SYSTEM_BUILDER_INFO
- {
- Base_Address = "BASE_ADDR";
- }
- }
- WIZARD_SCRIPT_ARGUMENTS
- {
- id = "ID";
- timestamp = "TIMESTAMP";
- }
-}
-
-CLASS altera_avalon_timer
-{
- N2G_DEFINE_IS_AVAILABLE = "1";
-
- SLAVE s1
- {
- SYSTEM_BUILDER_INFO
- {
- Base_Address = "BASE_ADDR";
- IRQ_MASTER { IRQ_Number = "IRQ"; }
- }
- }
- WIZARD_SCRIPT_ARGUMENTS
- {
- snapshot = "SNAPSHOT";
- always_run = "ALWAYS_RUN";
- mult = "MULT";
- period = "PERIOD";
- period_units = "PERIOD_UNITS";
- fixed_period = "FIXED_PERIOD";
- }
- SYSTEM_BUILDER_INFO
- {
- Clock_Source = "N2G_CLOCKREF_CLOCK";
- }
-}
-
-
-CLASS altera_avalon_uart
-{
- N2G_DEFINE_IS_AVAILABLE = "1";
-
- SYSTEM_BUILDER_INFO
- {
- Clock_Source = "N2G_CLOCKREF_CLOCK";
- }
- WIZARD_SCRIPT_ARGUMENTS
- {
- use_cts_rts = "USE_CTS_RTS";
- use_eop_register = "USE_EOP_REG";
- }
- SLAVE s1
- {
- SYSTEM_BUILDER_INFO
- {
- Base_Address = "BASE_ADDR";
- IRQ_MASTER { IRQ_Number = "IRQ"; }
- }
- }
-}
-
-CLASS altera_avalon_jtag_uart
-{
- N2G_DEFINE_IS_AVAILABLE = "1";
-
- SLAVE avalon_jtag_slave
- {
- SYSTEM_BUILDER_INFO
- {
- Base_Address = "BASE_ADDR";
- IRQ_MASTER { IRQ_Number = "IRQ"; }
- }
- }
-}
-
-CLASS altera_avalon_pio
-{
- N2G_DEFINE_IS_AVAILABLE = "1";
-
- SYSTEM_BUILDER_INFO
- {
- Clock_Source = "N2G_CLOCKREF_CLOCK";
- }
- SLAVE
- {
- SYSTEM_BUILDER_INFO
- {
- Base_Address = "BASE_ADDR";
- IRQ_MASTER { IRQ_Number = "IRQ"; }
- }
- }
-}
-
-N2GCOMM = "=============== Linkcmds output settings =========================";
-
-LINKCMDS
-{
- LEADTEXT = "
-OUTPUT_FORMAT( "elf32-littlenios2",
- "elf32-littlenios2",
- "elf32-littlenios2" )
-OUTPUT_ARCH( nios2 )
-ENTRY( _start )
-"
-
- SECTION entry
- {
- COMMANDS =
-" KEEP (*(.entry))
-";
- }
-
- SECTION exceptions
- {
- COMMANDS =
-" PROVIDE (__ram_exceptions_start = ABSOLUTE(.));
- . = ALIGN(0x20);
- *(.irq)
- KEEP (*(.exceptions.entry.label));
- KEEP (*(.exceptions.entry.user));
- KEEP (*(.exceptions.entry));
- KEEP (*(.exceptions.irqtest.user));
- KEEP (*(.exceptions.irqtest));
- KEEP (*(.exceptions.irqhandler.user));
- KEEP (*(.exceptions.irqhandler));
- KEEP (*(.exceptions.irqreturn.user));
- KEEP (*(.exceptions.irqreturn));
- KEEP (*(.exceptions.notirq.label));
- KEEP (*(.exceptions.notirq.user));
- KEEP (*(.exceptions.notirq));
- KEEP (*(.exceptions.soft.user));
- KEEP (*(.exceptions.soft));
- KEEP (*(.exceptions.unknown.user));
- KEEP (*(.exceptions.unknown));
- KEEP (*(.exceptions.exit.label));
- KEEP (*(.exceptions.exit.user));
- KEEP (*(.exceptions.exit));
- KEEP (*(.exceptions));
- PROVIDE (__ram_exceptions_end = ABSOLUTE(.));
-";
- }
-
- SECTION text
- {
- LOCATION = "SDRAM";
- COMMANDS =
-" PROVIDE (stext = ABSOLUTE(.));
-
- *(.interp)
- *(.hash)
- *(.dynsym)
- *(.dynstr)
- *(.gnu.version)
- *(.gnu.version_d)
- *(.gnu.version_r)
- *(.rel.init)
- *(.rela.init)
- *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
- *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
- *(.rel.fini)
- *(.rela.fini)
- *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
- *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
- *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
- *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
- *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
- *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
- *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
- *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
- *(.rel.ctors)
- *(.rela.ctors)
- *(.rel.dtors)
- *(.rela.dtors)
- *(.rel.got)
- *(.rela.got)
- *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
- *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
- *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
- *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
- *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
- *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
- *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
- *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
- *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
- *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
- *(.rel.plt)
- *(.rela.plt)
-
- KEEP (*(.init))
- *(.plt)
- *(.text .stub .text.* .gnu.linkonce.t.*)
-
- /* Special FreeBSD sysctl sections. */
- . = ALIGN (16);
- __start_set_sysctl_set = .;
- *(set_sysctl_*);
- __stop_set_sysctl_set = ABSOLUTE(.);
- *(set_domain_*);
- *(set_pseudo_*);
-
- *(.gnu.warning.*)
- KEEP (*(.fini))
- PROVIDE (__etext = ABSOLUTE(.));
- PROVIDE (_etext = ABSOLUTE(.));
- PROVIDE (etext = ABSOLUTE(.));
-
- *(.eh_frame_hdr)
- /* Ensure the __preinit_array_start label is properly aligned. We
- could instead move the label definition inside the section, but
- the linker would then create the section even if it turns out to
- be empty, which isn't pretty. */
- . = ALIGN(32 / 8);
- PROVIDE (__preinit_array_start = ABSOLUTE(.));
- *(.preinit_array)
- PROVIDE (__preinit_array_end = ABSOLUTE(.));
- PROVIDE (__init_array_start = ABSOLUTE(.));
- *(.init_array)
- PROVIDE (__init_array_end = ABSOLUTE(.));
- PROVIDE (__fini_array_start = ABSOLUTE(.));
- *(.fini_array)
- PROVIDE (__fini_array_end = ABSOLUTE(.));
- SORT(CONSTRUCTORS)
- KEEP (*(.eh_frame))
- *(.gcc_except_table)
- *(.dynamic)
- PROVIDE (__CTOR_LIST__ = ABSOLUTE(.));
- KEEP (*(.ctors))
- KEEP (*(SORT(.ctors.*)))
- PROVIDE (__CTOR_END__ = ABSOLUTE(.));
- PROVIDE (__DTOR_LIST__ = ABSOLUTE(.));
- KEEP (*(.dtors))
- KEEP (*(SORT(.dtors.*)))
- PROVIDE (__DTOR_END__ = ABSOLUTE(.));
- KEEP (*(.jcr))
- . = ALIGN(32 / 8);
-";
- }
-
- SECTION rodata
- {
- LOCATION = "SDRAM";
- COMMANDS =
-" PROVIDE (__ram_rodata_start = ABSOLUTE(.));
- . = ALIGN(32 / 8);
- *(.rodata .rodata.* .gnu.linkonce.r.*)
- *(.rodata1)
- . = ALIGN(32 / 8);
- PROVIDE (__ram_rodata_end = ABSOLUTE(.));
-";
- }
-
- SECTION rwdata
- {
- LOCATION = "SDRAM";
- COMMANDS =
-" PROVIDE (__ram_rwdata_start = ABSOLUTE(.));
- . = ALIGN(32 / 8);
- *(.got.plt) *(.got)
- *(.data1)
- *(.data .data.* .gnu.linkonce.d.*)
-
- _gp = ABSOLUTE(. + 0x8000);
- PROVIDE(gp = _gp);
-
- *(.sdata .sdata.* .gnu.linkonce.s.*)
- *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
-
- . = ALIGN(32 / 8);
- _edata = ABSOLUTE(.);
- PROVIDE (edata = ABSOLUTE(.));
- PROVIDE (__ram_rwdata_end = ABSOLUTE(.));
-";
- }
-
- SECTION bss
- {
- LOCATION = "SDRAM";
- COMMANDS =
-" __bss_start = ABSOLUTE(.);
- PROVIDE (__sbss_start = ABSOLUTE(.));
- PROVIDE (___sbss_start = ABSOLUTE(.));
-
- *(.dynsbss)
- *(.sbss .sbss.* .gnu.linkonce.sb.*)
- *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
- *(.scommon)
-
- PROVIDE (__sbss_end = ABSOLUTE(.));
- PROVIDE (___sbss_end = ABSOLUTE(.));
-
- *(.dynbss)
- *(.bss .bss.* .gnu.linkonce.b.*)
- *(COMMON)
-
- . = ALIGN(32 / 8);
- __bss_end = ABSOLUTE(.);
-";
- }
-
- STABS =
-" .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
-
- /* Altera debug extensions */
- .debug_alt_sim_info 0 : { *(.debug_alt_sim_info) }
-";
-
- HEAP = "SDRAM";
- STACK = "SDRAM";
-}
-