mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-24 04:16:05 +08:00
2005-04-28 Joel Sherrill <joel@OARcorp.com>
* acinclude.m4: Remove dmv177 and ppcn_60x. * dmv177/.cvsignore, dmv177/ChangeLog, dmv177/Makefile.am, dmv177/QUIRKS, dmv177/README, dmv177/README.net, dmv177/STATUS, dmv177/bsp_specs, dmv177/cable.doc, dmv177/configure.ac, dmv177/times, dmv177/clock/clock.c, dmv177/console/conscfg.c, dmv177/console/debugio.c, dmv177/include/.cvsignore, dmv177/include/bsp.h, dmv177/include/dmv170.h, dmv177/include/tm27.h, dmv177/scv64/scv64.c, dmv177/sonic/dmvsonic.c, dmv177/start/start.S, dmv177/startup/bspclean.c, dmv177/startup/bspstart.c, dmv177/startup/genpvec.c, dmv177/startup/linkcmds, dmv177/startup/setvec.c, dmv177/startup/vmeintr.c, dmv177/timer/timer.c, dmv177/tod/todcfg.c, ppcn_60x/.cvsignore, ppcn_60x/ChangeLog, ppcn_60x/Makefile.am, ppcn_60x/README, ppcn_60x/STATUS, ppcn_60x/bsp_specs, ppcn_60x/configure.ac, ppcn_60x/clock/clock.c, ppcn_60x/console/config.c, ppcn_60x/console/console.c, ppcn_60x/console/console.h, ppcn_60x/console/debugio.c, ppcn_60x/console/i8042.c, ppcn_60x/console/i8042_p.h, ppcn_60x/console/i8042vga.c, ppcn_60x/console/i8042vga.h, ppcn_60x/console/ns16550cfg.c, ppcn_60x/console/ns16550cfg.h, ppcn_60x/console/vga.c, ppcn_60x/console/vga_p.h, ppcn_60x/console/z85c30cfg.c, ppcn_60x/console/z85c30cfg.h, ppcn_60x/include/.cvsignore, ppcn_60x/include/bsp.h, ppcn_60x/include/extisrdrv.h, ppcn_60x/include/nvram.h, ppcn_60x/include/pci.h, ppcn_60x/include/tm27.h, ppcn_60x/network/amd79c970.c, ppcn_60x/network/amd79c970.h, ppcn_60x/nvram/ds1385.h, ppcn_60x/nvram/mk48t18.h, ppcn_60x/nvram/nvram.c, ppcn_60x/nvram/prepnvr.h, ppcn_60x/nvram/stk11c68.h, ppcn_60x/pci/pci.c, ppcn_60x/start/start.S, ppcn_60x/startup/bspclean.c, ppcn_60x/startup/bspstart.c, ppcn_60x/startup/bsptrap.S, ppcn_60x/startup/genpvec.c, ppcn_60x/startup/linkcmds, ppcn_60x/startup/rtems-ctor.cc, ppcn_60x/startup/setvec.c, ppcn_60x/startup/spurious.c, ppcn_60x/startup/swap.c, ppcn_60x/timer/timer.c, ppcn_60x/tod/cmos.h, ppcn_60x/tod/tod.c, ppcn_60x/universe/universe.c, ppcn_60x/vectors/README, ppcn_60x/vectors/align_h.S, ppcn_60x/vectors/vectors.S: Removed.
This commit is contained in:
@@ -1,3 +1,43 @@
|
||||
2005-04-28 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* acinclude.m4: Remove dmv177 and ppcn_60x.
|
||||
* dmv177/.cvsignore, dmv177/ChangeLog, dmv177/Makefile.am,
|
||||
dmv177/QUIRKS, dmv177/README, dmv177/README.net, dmv177/STATUS,
|
||||
dmv177/bsp_specs, dmv177/cable.doc, dmv177/configure.ac,
|
||||
dmv177/times, dmv177/clock/clock.c, dmv177/console/conscfg.c,
|
||||
dmv177/console/debugio.c, dmv177/include/.cvsignore,
|
||||
dmv177/include/bsp.h, dmv177/include/dmv170.h, dmv177/include/tm27.h,
|
||||
dmv177/scv64/scv64.c, dmv177/sonic/dmvsonic.c, dmv177/start/start.S,
|
||||
dmv177/startup/bspclean.c, dmv177/startup/bspstart.c,
|
||||
dmv177/startup/genpvec.c, dmv177/startup/linkcmds,
|
||||
dmv177/startup/setvec.c, dmv177/startup/vmeintr.c,
|
||||
dmv177/timer/timer.c, dmv177/tod/todcfg.c, ppcn_60x/.cvsignore,
|
||||
ppcn_60x/ChangeLog, ppcn_60x/Makefile.am, ppcn_60x/README,
|
||||
ppcn_60x/STATUS, ppcn_60x/bsp_specs, ppcn_60x/configure.ac,
|
||||
ppcn_60x/clock/clock.c, ppcn_60x/console/config.c,
|
||||
ppcn_60x/console/console.c, ppcn_60x/console/console.h,
|
||||
ppcn_60x/console/debugio.c, ppcn_60x/console/i8042.c,
|
||||
ppcn_60x/console/i8042_p.h, ppcn_60x/console/i8042vga.c,
|
||||
ppcn_60x/console/i8042vga.h, ppcn_60x/console/ns16550cfg.c,
|
||||
ppcn_60x/console/ns16550cfg.h, ppcn_60x/console/vga.c,
|
||||
ppcn_60x/console/vga_p.h, ppcn_60x/console/z85c30cfg.c,
|
||||
ppcn_60x/console/z85c30cfg.h, ppcn_60x/include/.cvsignore,
|
||||
ppcn_60x/include/bsp.h, ppcn_60x/include/extisrdrv.h,
|
||||
ppcn_60x/include/nvram.h, ppcn_60x/include/pci.h,
|
||||
ppcn_60x/include/tm27.h, ppcn_60x/network/amd79c970.c,
|
||||
ppcn_60x/network/amd79c970.h, ppcn_60x/nvram/ds1385.h,
|
||||
ppcn_60x/nvram/mk48t18.h, ppcn_60x/nvram/nvram.c,
|
||||
ppcn_60x/nvram/prepnvr.h, ppcn_60x/nvram/stk11c68.h,
|
||||
ppcn_60x/pci/pci.c, ppcn_60x/start/start.S,
|
||||
ppcn_60x/startup/bspclean.c, ppcn_60x/startup/bspstart.c,
|
||||
ppcn_60x/startup/bsptrap.S, ppcn_60x/startup/genpvec.c,
|
||||
ppcn_60x/startup/linkcmds, ppcn_60x/startup/rtems-ctor.cc,
|
||||
ppcn_60x/startup/setvec.c, ppcn_60x/startup/spurious.c,
|
||||
ppcn_60x/startup/swap.c, ppcn_60x/timer/timer.c, ppcn_60x/tod/cmos.h,
|
||||
ppcn_60x/tod/tod.c, ppcn_60x/universe/universe.c,
|
||||
ppcn_60x/vectors/README, ppcn_60x/vectors/align_h.S,
|
||||
ppcn_60x/vectors/vectors.S: Removed.
|
||||
|
||||
2005-04-28 Jennifer Averett <jennifer.averett@oarcorp.com>
|
||||
|
||||
* score603e/Makefile.am, score603e/configure.ac,
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
AC_DEFUN([RTEMS_CHECK_BSPDIR],
|
||||
[
|
||||
case "$1" in
|
||||
dmv177 )
|
||||
AC_CONFIG_SUBDIRS([dmv177]);;
|
||||
ep1a )
|
||||
AC_CONFIG_SUBDIRS([ep1a]);;
|
||||
gen405 )
|
||||
@@ -18,8 +16,6 @@ AC_DEFUN([RTEMS_CHECK_BSPDIR],
|
||||
AC_CONFIG_SUBDIRS([mpc8260ads]);;
|
||||
mvme5500 )
|
||||
AC_CONFIG_SUBDIRS([mvme5500]);;
|
||||
ppcn_60x )
|
||||
AC_CONFIG_SUBDIRS([ppcn_60x]);;
|
||||
psim )
|
||||
AC_CONFIG_SUBDIRS([psim]);;
|
||||
score603e )
|
||||
|
||||
@@ -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
|
||||
@@ -1,430 +0,0 @@
|
||||
2005-02-16 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* configure.ac: Remove argument from RTEMS_PPC_EXCEPTIONS.
|
||||
|
||||
2005-02-11 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* Makefile.am: Merge-in wrapup/Makefile.am.
|
||||
* wrapup/Makefile.am: Remove.
|
||||
* configure.ac: Reflect changes above.
|
||||
|
||||
2005-01-22 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* tod/todcfg.c: size_t RTC_Count.
|
||||
|
||||
2005-01-07 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* Makefile.am: Eliminate CFLAGS_OPTIMIZE_V.
|
||||
|
||||
2005-01-02 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* Makefile.am, wrapup/Makefile.am: Remove build-variant support.
|
||||
|
||||
2004-09-24 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* configure.ac: Require automake > 1.9.
|
||||
|
||||
2004-04-23 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
PR 610/bsps
|
||||
* Makefile.am: Add include/tm27.h, Cosmetics.
|
||||
* include/tm27.h: Final cosmetics.
|
||||
|
||||
2004-04-22 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* include/bsp.h: Split out tmtest27 support.
|
||||
* include/tm27.h: New.
|
||||
|
||||
2004-04-21 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
PR 613/bsps
|
||||
* include/bsp.h: Remove MAX_LONG_TEST_DURATION.
|
||||
|
||||
2004-04-21 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
PR 614/bsps
|
||||
* include/bsp.h: Remove MAX_SHORT_TEST_DURATION (Unused).
|
||||
|
||||
2004-04-01 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* startup/genpvec.c: Include <rtems/chain.h> instead of <chain.h>.
|
||||
* include/bsp.h: Include <rtems/clockdrv.h> instead of <clockdrv.h>.
|
||||
* include/bsp.h: Include <rtems/console.h> instead of <console.h>.
|
||||
* include/bsp.h: Include <rtems/iosupp.h> instead of <iosupp.h>.
|
||||
* startup/vmeintr.c: Include <rtems/vmeintr.h> instead of <vmeintr.h>.
|
||||
|
||||
2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* clock/clock.c, console/conscfg.c, console/debugio.c,
|
||||
include/bsp.h, include/dmv170.h, scv64/scv64.c, sonic/dmvsonic.c,
|
||||
startup/bspstart.c, startup/genpvec.c, startup/vmeintr.c,
|
||||
timer/timer.c, tod/todcfg.c: Convert to using c99 fixed size types.
|
||||
|
||||
2004-02-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Reflect changes to bsp.am.
|
||||
Preinstall dist_project_lib*.
|
||||
|
||||
2004-02-14 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Reflect changes to bsp.am.
|
||||
|
||||
2004-02-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Use CPPASCOMPILE instead of CCASCOMPILE.
|
||||
|
||||
2004-02-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* wrapup/Makefile.am: Convert to automake-building rules.
|
||||
|
||||
2004-01-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Merge-in clock/Makefile.am, console/Makefile.am,
|
||||
scv64/Makefile.am, sonic/Makefile.am, start/Makefile.am,
|
||||
startup/Makefile.am, timer/Makefile.am, tod/Makefile.am. Use automake
|
||||
compilation rules.
|
||||
* clock/Makefile.am, console/Makefile.am, scv64/Makefile.am,
|
||||
sonic/Makefile.am, start/Makefile.am, startup/Makefile.am,
|
||||
timer/Makefile.am, tod/Makefile.am: Remove.
|
||||
* configure.ac, wrapup/Makefile.am: Reflect changes above.
|
||||
|
||||
2004-01-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Merge-in start/Makefile.am.
|
||||
* start/Makefile.am: Remove.
|
||||
* configure.ac: Reflect changes above.
|
||||
|
||||
2004-01-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* wrapup/Makefile.am: Reflect changes to
|
||||
../support/*exception_processing/*.
|
||||
|
||||
2004-01-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Add nostdinc to AUTOMAKE_OPTIONS.
|
||||
Add RTEMS_PROG_CCAS.
|
||||
|
||||
2004-01-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Add PREINSTALL_DIRS.
|
||||
|
||||
2004-01-14 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Re-add dirstamps to PRE/TMPINSTALL_FILES.
|
||||
Add PRE/TMPINSTALL_FILES to CLEANFILES.
|
||||
* start/Makefile.am: Ditto.
|
||||
* startup/Makefile.am: Ditto.
|
||||
|
||||
2004-01-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* wrapup/Makefile.am: Eliminate $(LIB).
|
||||
Use noinst_DATA to trigger building libbsp.a.
|
||||
|
||||
2003-12-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* tod/Makefile.am: Cosmetics.
|
||||
* console/Makefile.am: Cosmetics.
|
||||
|
||||
2003-12-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* clock/Makefile.am: Eliminate VPATH.
|
||||
* console/Makefile.am: Eliminate VPATH.
|
||||
* scv64/Makefile.am: Eliminate VPATH.
|
||||
* sonic/Makefile.am: Eliminate VPATH.
|
||||
* start/Makefile.am: Eliminate VPATH.
|
||||
* startup/Makefile.am: Eliminate VPATH.
|
||||
* timer/Makefile.am: Eliminate VPATH.
|
||||
* tod/Makefile.am: Eliminate VPATH.
|
||||
|
||||
2003-12-13 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* start/Makefile.am: s,${PROJECT_RELEASE}/lib,$(PROJECT_LIB),g.
|
||||
* startup/Makefile.am: s,${PROJECT_RELEASE}/lib,$(PROJECT_LIB),g.
|
||||
|
||||
2003-12-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* start/Makefile.am: Use mkdir_p. Remove dirs from PRE/TMPINSTALL_FILES.
|
||||
* startup/Makefile.am: Use mkdir_p. Remove dirs from PRE/TMPINSTALL_FILES.
|
||||
|
||||
2003-12-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Require automake >= 1.8, autoconf >= 2.59.
|
||||
|
||||
2003-12-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* start/Makefile.am: Misc cleanups and fixes.
|
||||
* startup/Makefile.am: Misc cleanups and fixes.
|
||||
* wrapup/Makefile.am: Misc cleanups and fixes.
|
||||
|
||||
2003-12-03 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Add preinstallation dirstamp support.
|
||||
* clock/Makefile.am: Cosmetics.
|
||||
* console/Makefile.am: Cosmetics.
|
||||
* scv64/Makefile.am: Cosmetics.
|
||||
* sonic/Makefile.am: Cosmetics.
|
||||
* startup/Makefile.am: Cosmetics.
|
||||
* timer/Makefile.am: Cosmetics.
|
||||
* tod/Makefile.am: Cosmetics.
|
||||
* wrapup/Makefile.am: Cosmetics.
|
||||
|
||||
2003-12-02 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* clock/Makefile.am: Remove all-local: $(ARCH).
|
||||
* console/Makefile.am: Remove all-local: $(ARCH).
|
||||
* scv64/Makefile.am: Remove all-local: $(ARCH).
|
||||
* sonic/Makefile.am: Remove all-local: $(ARCH).
|
||||
* start/Makefile.am: Remove all-local: $(ARCH).
|
||||
* startup/Makefile.am: Remove all-local: $(ARCH).
|
||||
* timer/Makefile.am: Remove all-local: $(ARCH).
|
||||
* tod/Makefile.am: Remove all-local: $(ARCH).
|
||||
* wrapup/Makefile.am: Remove all-local: $(ARCH).
|
||||
|
||||
2003-09-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Merge-in include/Makefile.am.
|
||||
Reflect changes to bsp.am.
|
||||
* include/Makefile.am: Remove.
|
||||
* configure.ac: Reflect changes above.
|
||||
|
||||
2003-09-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* bsp_specs: Remove *lib:.
|
||||
|
||||
2003-09-04 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* clock/clock.c, console/debugio.c, include/dmv170.h,
|
||||
startup/bspclean.c, startup/genpvec.c, startup/setvec.c,
|
||||
startup/vmeintr.c, timer/timer.c: URL for license changed.
|
||||
|
||||
2003-09-04 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* console/conscfg.c, include/bsp.h, scv64/scv64.c, startup/bspstart.c,
|
||||
tod/todcfg.c: Removed incorrect statement about copyright assignment.
|
||||
|
||||
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/.
|
||||
* clock/Makefile.am: Reflect having moved automake/.
|
||||
* console/Makefile.am: Reflect having moved automake/.
|
||||
* include/Makefile.am: Reflect having moved automake/.
|
||||
* scv64/Makefile.am: Reflect having moved automake/.
|
||||
* sonic/Makefile.am: Reflect having moved automake/.
|
||||
* start/Makefile.am: Reflect having moved automake/.
|
||||
* startup/Makefile.am: Reflect having moved automake/.
|
||||
* timer/Makefile.am: Reflect having moved automake/.
|
||||
* tod/Makefile.am: Reflect having moved automake/.
|
||||
* wrapup/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-08-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
PR 445/bsps
|
||||
* bsp_specs: Remove -D__embedded__ -Asystem(embedded) from cpp.
|
||||
Remove cpp, old_cpp (now unused).
|
||||
|
||||
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).
|
||||
|
||||
2003-01-20 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* startup/linkcmds*: Add FreeBSD sysctl() sections.
|
||||
|
||||
2002-12-16 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* clock/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
* console/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
* scv64/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
* sonic/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
* start/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
* startup/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
* timer/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
* tod/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
|
||||
2002-12-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* start/Makefile.am: Use install-data-local to install startfile.
|
||||
|
||||
2002-12-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* wrapup/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
|
||||
2002-11-04 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* clock/clock.c: Removed warnings.
|
||||
|
||||
2002-11-01 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* startup/genpvec.c, tod/todcfg.c: Removed warnings.
|
||||
|
||||
2002-10-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* .cvsignore: Reformat.
|
||||
Add autom4te*cache.
|
||||
Remove autom4te.cache.
|
||||
|
||||
2002-08-21 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* bsp_specs: Added support for -nostdlibs.
|
||||
|
||||
2002-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* clock/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* console/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* scv64/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* sonic/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* start/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* startup/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* timer/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* tod/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* wrapup/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
|
||||
2002-07-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* start/Makefile.am: Eliminate PGMS.
|
||||
Add bsplib_DATA = $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o.
|
||||
|
||||
2002-07-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* startup/Makefile.am: Add bsplib_DATA = linkcmds.
|
||||
|
||||
2002-07-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* wrapup/Makefile.am: Eliminate TMPINSTALL_FILES.
|
||||
Remove $(OBJS) from all-local.
|
||||
|
||||
2002-06-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* wrapup/Makefile.am: Remove preinstallation of libbsp.a,
|
||||
|
||||
2001-05-09 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* startup/linkcmds: In support of gcc 3.1, added one of more
|
||||
of the sections .jcr, .rodata*, .data.*, .gnu.linkonce.s2.*,
|
||||
.gnu.linkonce.sb2.*, and .gnu.linkonce.s.*. Spacing corrections
|
||||
and direction of segments to memory regions may also have been
|
||||
addressed. This was a sweep across all BSPs.
|
||||
|
||||
2001-04-08 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* startup/linkcmds: Per PR170, PR171, and PR172 add .eh_frame
|
||||
|
||||
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]).
|
||||
* clock/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* console/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* include/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* scv64/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* sonic/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* start/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* startup/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* timer/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* tod/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* wrapup/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
|
||||
2001-12-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Remove RTEMS_ENABLE_NETWORKING.
|
||||
|
||||
2001-11-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Introduce RTEMS_BSP_CONFIGURE.
|
||||
|
||||
2001-11-16 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Add @exceptions@ to SUBDIRS.
|
||||
* configure.ac: Apply RTEMS_BSPOPTS_*(*) to merge-in settings from
|
||||
make/custom/dmv177.cfg;
|
||||
Rename PPC_USE_INSTRUCTION_CACHE to DMV177_USE_INSTRUCTION_CACHE,
|
||||
Add RTEMS_PPC_EXCEPTIONS([old]).
|
||||
* include/Makefile.am: include force-preinstall.am.
|
||||
* startup/bspstart.c: Rename PPC_USE_INSTRUCTION_CACHE to
|
||||
DMV177_USE_INSTRUCTION_CACHE.
|
||||
* wrapup/Makefile.am: Apply @exceptions@.
|
||||
|
||||
2001-10-25 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* startup/linkcmds: Added _init and _fini.
|
||||
|
||||
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-09-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* include/Makefile.am: Use 'CLEANFILES ='.
|
||||
* include/Makefile.am: Use 'TMPINSTALL_FILES ='.
|
||||
|
||||
2001-05-25 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.in: Remove CONSOLE_USE_POLLED, HAS_RTC.
|
||||
|
||||
2001-05-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.in: Add bspopts.h, AC_DEFINE CONSOLE_USE_INTERRUPTS,
|
||||
CONSOLE_USE_POLLED, HAS_RTC.
|
||||
* include/.cvsignore: Add bspopts.h*, stamp-h*, coverhd.h, tod.h.
|
||||
* include/Makefile.am: Use *_HEADERS instead of *H_FILES, New
|
||||
treatment of tod.h, coverhd.h.
|
||||
* include/bsp.h: Add include bspopts.h.
|
||||
|
||||
2001-05-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.in: Use RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm]).
|
||||
|
||||
2001-01-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* startup/genpvec.c: #include <chain.h> instead of "chain.h".
|
||||
|
||||
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-11-01 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* startup/bspstart.c: assoc.h, error.h, libio_.h, libio.h,
|
||||
and libcsupport.h moved from libc to lib/include/rtems and
|
||||
now must be referenced as <rtems/XXX.h>. Header file order
|
||||
was cleaned up while doing this.
|
||||
|
||||
2000-10-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: ACLOCAL_AMFLAGS= -I $(RTEMS_TOPdir)/macros.
|
||||
Switch to GNU canonicalization.
|
||||
|
||||
2000-09-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* clock/Makefile.am, console/Makefile.am, scv64/Makefile.am,
|
||||
sonic/Makefile.am, start/Makefile.am, startup/Makefile.am,
|
||||
timer/Makefile.am, tod/Makefile.am, wrapup/Makefile.am: Include
|
||||
compile.am
|
||||
|
||||
2000-08-10 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* ChangeLog: New file.
|
||||
@@ -1,144 +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/dmv170.h
|
||||
nodist_include_HEADERS += ../../shared/tod.h
|
||||
nodist_include_HEADERS += ../../shared/include/coverhd.h
|
||||
|
||||
EXTRA_DIST = start/start.S
|
||||
start.$(OBJEXT): start/start.S
|
||||
$(CPPASCOMPILE) -DASM -o $@ -c $<
|
||||
project_lib_DATA = start.$(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/conscfg.c console/debugio.c \
|
||||
../../shared/console.c
|
||||
console_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
console_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
|
||||
noinst_PROGRAMS += scv64.rel
|
||||
scv64_rel_SOURCES = scv64/scv64.c
|
||||
scv64_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
scv64_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
|
||||
noinst_PROGRAMS += startup.rel
|
||||
startup_rel_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
|
||||
../../shared/bsppost.c startup/bspstart.c ../../shared/bootcard.c \
|
||||
../../shared/main.c ../../shared/sbrk.c startup/setvec.c \
|
||||
startup/genpvec.c startup/vmeintr.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_PROGRAMS += tod.rel
|
||||
tod_rel_SOURCES = tod/todcfg.c ../../shared/tod.c
|
||||
tod_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
tod_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
|
||||
if HAS_NETWORKING
|
||||
sonic_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
|
||||
noinst_PROGRAMS += sonic.rel
|
||||
sonic_rel_SOURCES = sonic/dmvsonic.c
|
||||
sonic_rel_CPPFLAGS = $(AM_CPPFLAGS) $(sonic_CPPFLAGS)
|
||||
sonic_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
endif
|
||||
|
||||
noinst_LIBRARIES = libbsp.a
|
||||
CLEANFILES = libbsp.a
|
||||
libbsp_a_SOURCES =
|
||||
|
||||
libbsp_a_LIBADD = startup.rel clock.rel console.rel scv64.rel timer.rel \
|
||||
tod.rel
|
||||
if HAS_NETWORKING
|
||||
libbsp_a_LIBADD += sonic.rel
|
||||
endif
|
||||
libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/@exceptions@/rtems-cpu.rel \
|
||||
../../../libcpu/@RTEMS_CPU@/shared/cache.rel
|
||||
|
||||
all-local: $(PREINSTALL_FILES) $(TMPINSTALL_FILES)
|
||||
|
||||
EXTRA_DIST += QUIRKS README.net STATUS cable.doc times
|
||||
|
||||
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)/dmv170.h: include/dmv170.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/dmv170.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/dmv170.h
|
||||
|
||||
$(PROJECT_INCLUDE)/tod.h: ../../shared/tod.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tod.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/tod.h
|
||||
|
||||
$(PROJECT_INCLUDE)/coverhd.h: ../../shared/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)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
|
||||
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
|
||||
|
||||
CLEANFILES += $(PREINSTALL_FILES)
|
||||
DISTCLEANFILES += $(PREINSTALL_DIRS)
|
||||
CLEANFILES += $(TMPINSTALL_FILES)
|
||||
|
||||
include $(top_srcdir)/../../../../automake/subdirs.am
|
||||
include $(top_srcdir)/../../../../automake/local.am
|
||||
@@ -1,74 +0,0 @@
|
||||
#
|
||||
# Quirks in the DY-4 DMV177
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
JTAG and Caching
|
||||
================
|
||||
If data or code caching is enabled on certain revisions of the PPC603e,
|
||||
then the JTAG emulator interface become disfunctional. You can not
|
||||
debug using the emulator on these chip revisions. On certain revisions,
|
||||
it is so bad that when code caching is enabled, you can not even
|
||||
download code reliably to the board.
|
||||
|
||||
Caching and Peripherals
|
||||
=======================
|
||||
When caching is enabled, care must be exercised to insure that all
|
||||
peripheral addresses are still uncached.
|
||||
|
||||
Exar 88681 Clock
|
||||
================
|
||||
This board uses a different clock for the Exar 88681 DUART than is
|
||||
documented in the Exar manual or the original MC68681 manual. This
|
||||
resulted in the need for the the mc68681 libchip driver to support
|
||||
BSP specific baud rate tables and the development of a DMV177
|
||||
specific baud rate table.
|
||||
|
||||
In the end, this all works but you have a very limited range of
|
||||
useful baud rates on the 88681 ports compared to what would have
|
||||
been supported had DY-4 just followed the Exar or Motorola manual.
|
||||
|
||||
|
||||
SCC Addresses
|
||||
=============
|
||||
The full set of SCC addresses is not documented in the DY-4 manual
|
||||
and they are not ordered as one would expect. Normally the four
|
||||
SCC registers are ordered Control A, Data A, Control B, and Data B.
|
||||
DY-4 orders them with B first.
|
||||
|
||||
This required extra time to debug.
|
||||
|
||||
|
||||
SCV64 and the Foundation Firmware
|
||||
=================================
|
||||
DY-4 technical support did not offer code to determine which interrupt
|
||||
sources were pending at the SCV64. They recommended calling into the
|
||||
Foundation Firmware ROM monitor to figure this out. The Foundation
|
||||
Firmware did not recognize enough interrupts on this board to be useful.
|
||||
|
||||
In the end, we gave up on their technical support's recommendation
|
||||
and directly manipulated the SVC64. This is what we wanted to do in
|
||||
the first place but we got no information from them to aid in this.
|
||||
Luckily, the manual does document enough of DY-4's mapping of the specific
|
||||
interrupt sources to make this work.
|
||||
|
||||
|
||||
Z85C30 SCC Clock Speed
|
||||
======================
|
||||
|
||||
The Z85C30 SCC can be factory configured for 10 Mhz or 2.4616 Mhz. Code
|
||||
had to be added to dynamically determine which clock was installed.
|
||||
|
||||
The board we had used a 10 Mhz clock. No testing was done with a 2.4616 Mhz
|
||||
clock.
|
||||
|
||||
|
||||
P2 Octopus Cable
|
||||
================
|
||||
|
||||
DY-4's P2 breakout is large and a bit unwieldy. It was difficult to
|
||||
fight into the VME cage we used. The SCSI connector comes off the
|
||||
side and is very stiff thus making it difficult to route around
|
||||
anything in the back of the cage. We gave up on trying to use
|
||||
it in the first few slots of OAR's cage.
|
||||
@@ -1,49 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
BSP NAME: dmv177
|
||||
BOARD: DY-4 DMV177
|
||||
BUS: VMEBus
|
||||
CPU FAMILY: powerpc
|
||||
CPU: PowerPC 603e
|
||||
COPROCESSORS: N/A
|
||||
MODE: 32 bit mode
|
||||
|
||||
DEBUG MONITOR: DY-4 General Purpose Monitor (GPM)
|
||||
|
||||
PERIPHERALS
|
||||
===========
|
||||
TIMERS: PPC internal Timebase register
|
||||
RESOLUTION: ???
|
||||
SERIAL PORTS: 2 RS-232 provided by a Exar 88681
|
||||
2 RS-422 provided by a Zilog Z8530
|
||||
REAL-TIME CLOCK: PPC internal Decrementer register
|
||||
DMA: none
|
||||
RTC: Harris ICM7170
|
||||
VIDEO: none
|
||||
SCSI: QLogic FAS216 SCSI-2 (unsupported)
|
||||
NETWORKING: National Semiconductor SONIC DP83932B (Ethernet)
|
||||
|
||||
DRIVER INFORMATION
|
||||
==================
|
||||
CLOCK DRIVER: PPC internal
|
||||
SHMSUPP: N/A
|
||||
TIMER DRIVER: PPC internal
|
||||
CONSOLE DRIVER: Uses libchip drivers for Exar 88681 and Zilog Z8530.
|
||||
|
||||
STDIO
|
||||
=====
|
||||
|
||||
These are the default settings.
|
||||
|
||||
PORT: Console port 0
|
||||
ELECTRICAL: RS-232
|
||||
BAUD: 9600
|
||||
BITS PER CHARACTER: 8
|
||||
PARITY: N
|
||||
STOP BITS: 1
|
||||
|
||||
Notes
|
||||
=====
|
||||
The console and real-time clock drivers use the libchip library.
|
||||
@@ -1,44 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
Setting the Ethernet Hardware Address
|
||||
=====================================
|
||||
|
||||
The hardware Ethernet address is not set at the factory. It is the
|
||||
responsibility of the end-user to insure that it is set properly.
|
||||
This file describes the standard procedure recommended by DY-4
|
||||
technical support for setting this address. This procedure is
|
||||
similar to that followed by VxWorks as documented in DY-4
|
||||
Document Number #807885.
|
||||
|
||||
The hardware Ethernet address and OS configuration information
|
||||
must be stored in the SEEPROM non-volatile memory of the
|
||||
SVME/DMV-176/177. The Foundation Firmware (FFW) reserves the
|
||||
first 256 bytes of the SEEPROM for its own use and the remaining
|
||||
remaining 256 bytes are available for OS specific information.
|
||||
|
||||
Three bytes in the Serial EEPROM are used for the lowest three bytes
|
||||
of the hardware Ethernet address These should be set to the serial
|
||||
number of your SVME/DMV-176/177 card to ensure a unique Ethernet
|
||||
address on your network. The three high bytes are hard coded in the
|
||||
BSP and represent the vendor-specific Ethernet codes (0x00, 0x80, 0x7F).
|
||||
Together these six bytes form the target's Ethernet address.
|
||||
|
||||
Address is of the form ...
|
||||
|
||||
NOTE: The serial number is found on the packaging (box) that the
|
||||
board came in OR it is also located on the solder side of the board and
|
||||
looks something like SERNO:XXXXXX. It can not be determined dynamically
|
||||
by software.
|
||||
|
||||
Prior to using the Ethernet controller on the SVME/DMV-176/177 for the
|
||||
first time, the Ethernet address bytes must be programmed into the
|
||||
Serial EEPROM on the target card. The 'emm' (EEPROM Memory Modification)
|
||||
command in the General Purpose Monitor (GPM) can be used to do this.
|
||||
|
||||
In this example we will assume that the serial number of the target card
|
||||
is 123456.
|
||||
|
||||
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
#
|
||||
# This is a status file for the update effort.
|
||||
#
|
||||
|
||||
make/custom
|
||||
===========
|
||||
dmv17x.cfg
|
||||
|
||||
TOP
|
||||
===
|
||||
README
|
||||
Makefile.in
|
||||
bsp_specs
|
||||
|
||||
clock
|
||||
=====
|
||||
clock.c
|
||||
Makefile.in
|
||||
|
||||
console
|
||||
=======
|
||||
Changed console from
|
||||
duart.c
|
||||
console.c
|
||||
To
|
||||
consolebsp.h
|
||||
console.c
|
||||
85c30.c
|
||||
tbl85c30.c
|
||||
|
||||
Note: Check the number of serial ports and modify
|
||||
tbl85c30.c values to indicate the correct values.
|
||||
|
||||
Makefile.in - Modified with new file names.
|
||||
|
||||
timer
|
||||
=======
|
||||
timer.c
|
||||
Makefile.in
|
||||
|
||||
include
|
||||
=======
|
||||
chain.h
|
||||
dmv170.h
|
||||
bsp.h
|
||||
Makefile
|
||||
Makefile.in
|
||||
coverhd.h
|
||||
|
||||
network
|
||||
=======
|
||||
Eric's problem
|
||||
|
||||
startup
|
||||
=======
|
||||
device-tree - remove
|
||||
linkcmds
|
||||
setvec.c - Modified to acount for general purpose vector.
|
||||
sbrk.c - Ok
|
||||
rtems-ctor.cc - Ok
|
||||
bspclean.s - Ok
|
||||
vmeintr.c
|
||||
Makefile.in - Added genpvec.c
|
||||
bspstart.c - Modified with changes from vista bsp.
|
||||
|
||||
Added:
|
||||
genpvec.c
|
||||
|
||||
Note: Need to add routine which connects the general purpose interupt with the
|
||||
various interupt handlers. genpvec.c uses this routine and may need
|
||||
to be modified.
|
||||
wrapup
|
||||
=======
|
||||
wrapup/Makefile.in
|
||||
|
||||
vectors
|
||||
=======
|
||||
|
||||
start
|
||||
=======
|
||||
start/Makefile.in
|
||||
start/start.s - Made modifications based upon Score603e mods.
|
||||
@@ -1,15 +0,0 @@
|
||||
%rename endfile old_endfile
|
||||
%rename startfile old_startfile
|
||||
%rename link old_link
|
||||
|
||||
*startfile:
|
||||
%{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems: ecrti%O%s \
|
||||
%{!qrtems_debug: start.o%s} \
|
||||
%{qrtems_debug: start_g.o%s}}}
|
||||
|
||||
*endfile:
|
||||
%{!qrtems: %(old_endfile)} %{qrtems: ecrtn%O%s}
|
||||
|
||||
*link:
|
||||
%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -e _start -u __vectors}
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
#
|
||||
# Cable information for the DY-4 DMV177
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
Background
|
||||
==========
|
||||
|
||||
All serial cables described in this file were built using RJ-45 ribbon
|
||||
cables which were plugged into DB-25 or DB-9 adapters wired as described.
|
||||
Matching the colors of the wires in the shell is the easiest way to
|
||||
make sure the cable is built properly.
|
||||
|
||||
The board is configured as follows:
|
||||
|
||||
- An MC68681 is the first two serial ports. These are RS-232 and may
|
||||
be accessed via the front panel or the P2. The front panel connector
|
||||
has both A and B serial ports on a single connector. DY-4 part number
|
||||
"OBYC3ASSY901132-000 Rev-" brings these ports out to two DB-25
|
||||
female connectors.
|
||||
|
||||
- The MC68681 serial ports are also accessible on the P2 connector.
|
||||
DY-4 part number "OBYC3ASSY901080-004 Rev A" brings these out
|
||||
to DB-9 female connectors. These were not used in this effort.
|
||||
|
||||
- A Z85C30 is used for the third and fourth serial ports. These are
|
||||
RS-422 and may only be accessed via the P2 connector. These are
|
||||
brought out to DB-25 male connectors. An RS-422 to RS-232 converter
|
||||
was used to interface with these serial ports.
|
||||
|
||||
References
|
||||
==========
|
||||
|
||||
- Linux Serial FAQ
|
||||
- http://ahmed.egypt.com/electronics/serial
|
||||
- DY-4 Documentation
|
||||
|
||||
RS-422 Converter
|
||||
================
|
||||
|
||||
An RS-422 to RS-232 converter from B&B Electronics was used to
|
||||
adapt the RS-422 signals so they could be used with a normal
|
||||
RS-232 serial port. Here is the information required to purchase
|
||||
one of these:
|
||||
|
||||
RS-232/RS-422 Converter: Model 422LCON
|
||||
Power Supply: Model 422PS
|
||||
|
||||
B&B Electronics Manufacturing Company
|
||||
707 Dayton Road
|
||||
PO Box 1040
|
||||
Ottawa, IL 61350
|
||||
Voice: (815) 433-5100
|
||||
FAX: (815)434-7094
|
||||
|
||||
|
||||
Front Panel RS-232 Connection to a PC
|
||||
=====================================
|
||||
|
||||
Board's DB-25 PC's DB-9 Color in
|
||||
Channel A COM1 Shell
|
||||
============= ============ =========
|
||||
RX on pin 2 TX on pin 2 Red
|
||||
TX on pin 3 RX on pin 3 Blue
|
||||
GND on pin 7 GND on pin 5 Black
|
||||
DTR on pin 20 DTR on pin 4 Brown
|
||||
|
||||
No other signals are used.
|
||||
|
||||
RS-422 Connection to a PC
|
||||
=========================
|
||||
|
||||
This requires two cables with the converter connecting them.
|
||||
|
||||
P2 RS-422 to the RS-422/RS-232 Converter
|
||||
========================================
|
||||
|
||||
Board's Converter's Color in
|
||||
DB-25 RS-422 DB-25 Shell
|
||||
=============== ============== ========
|
||||
TXD_A on pin 2 RDA on pin 5 Red
|
||||
TXD_B on pin 14 RDB on pin 17 Blue
|
||||
RX_A on pin 3 TDA on pin 2 Brown
|
||||
RX_B on pin 16 TDB on pin 14 Green
|
||||
GND on pin 7 GND on pin 7 Black
|
||||
|
||||
|
||||
Converter's PC's DB-9 Color in
|
||||
RS-232 DB-25 COM1 Shell
|
||||
=============== ============== ========
|
||||
TX on pin 2 TX on pin 2 Blue
|
||||
RX on pin 3 RX on pin 3 Red
|
||||
GND on pin 5 GND on pin 5 Black
|
||||
DTR on pin 4 DTR on pin 4 Brown
|
||||
|
||||
No other signals
|
||||
@@ -1,234 +0,0 @@
|
||||
/*
|
||||
* Clock Tick Device Driver
|
||||
*
|
||||
* This routine utilizes the Decrementer Register common to the PPC family.
|
||||
*
|
||||
* The tick frequency is directly programmed to the configured number of
|
||||
* microseconds per tick.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1997.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may in
|
||||
* the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <bsp.h>
|
||||
#include <rtems/libio.h>
|
||||
|
||||
extern rtems_cpu_table Cpu_table;
|
||||
|
||||
/*
|
||||
* The Real Time Clock Counter Timer uses this trap type.
|
||||
*/
|
||||
|
||||
#define CLOCK_VECTOR PPC_IRQ_DECREMENTER
|
||||
|
||||
/*
|
||||
* Clock ticks since initialization
|
||||
*/
|
||||
|
||||
volatile uint32_t Clock_driver_ticks;
|
||||
|
||||
/*
|
||||
* This is the value programmed into the count down timer.
|
||||
*/
|
||||
|
||||
uint32_t Clock_Decrementer_value;
|
||||
|
||||
/*
|
||||
* This is the value of the old isr routine.
|
||||
*/
|
||||
rtems_isr_entry Old_ticker;
|
||||
|
||||
void Clock_exit( void );
|
||||
|
||||
/*
|
||||
* These are set by clock driver during its init
|
||||
*/
|
||||
|
||||
rtems_device_major_number rtems_clock_major = ~0;
|
||||
rtems_device_minor_number rtems_clock_minor;
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* Clock_isr
|
||||
*
|
||||
* This is the clock tick interrupt handler.
|
||||
*
|
||||
* Input parameters:
|
||||
* vector - vector number
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values: NONE
|
||||
*
|
||||
*/
|
||||
|
||||
rtems_isr Clock_isr(
|
||||
rtems_vector_number vector,
|
||||
CPU_Interrupt_frame *frame
|
||||
)
|
||||
{
|
||||
/*
|
||||
* Set the decrementer.
|
||||
*/
|
||||
|
||||
PPC_Set_decrementer( Clock_Decrementer_value );
|
||||
|
||||
/*
|
||||
* The driver has seen another tick.
|
||||
*/
|
||||
|
||||
Clock_driver_ticks += 1;
|
||||
|
||||
/*
|
||||
* Real Time Clock counter/timer is set to automatically reload.
|
||||
*/
|
||||
|
||||
rtems_clock_tick();
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* Install_clock
|
||||
*
|
||||
* This routine actually performs the hardware initialization for the clock.
|
||||
*
|
||||
* Input parameters:
|
||||
* clock_isr - clock interrupt service routine entry point
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values: NONE
|
||||
*
|
||||
*/
|
||||
|
||||
extern int CLOCK_SPEED;
|
||||
|
||||
void Install_clock(
|
||||
rtems_isr_entry clock_isr
|
||||
)
|
||||
{
|
||||
Clock_driver_ticks = 0;
|
||||
|
||||
Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );
|
||||
|
||||
PPC_Set_decrementer( Clock_Decrementer_value );
|
||||
|
||||
atexit( Clock_exit );
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* Clock_exit
|
||||
*
|
||||
* This routine allows the clock driver to exit by masking the interrupt and
|
||||
* disabling the clock's counter.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values: NONE
|
||||
*
|
||||
*/
|
||||
|
||||
void Clock_exit( void )
|
||||
{
|
||||
/* nothing to do */;
|
||||
|
||||
/* do not restore old vector */
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* Clock_initialize
|
||||
*
|
||||
* This routine initializes the clock driver.
|
||||
*
|
||||
* Input parameters:
|
||||
* major - clock device major number
|
||||
* minor - clock device minor number
|
||||
* parg - pointer to optional device driver arguments
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values:
|
||||
* rtems_device_driver status code
|
||||
*/
|
||||
|
||||
rtems_device_driver Clock_initialize(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void *pargp
|
||||
)
|
||||
{
|
||||
Clock_Decrementer_value = Cpu_table.clicks_per_usec *
|
||||
BSP_Configuration.microseconds_per_tick;
|
||||
|
||||
Install_clock( (rtems_isr_entry) Clock_isr );
|
||||
|
||||
/*
|
||||
* make major/minor avail to others such as shared memory driver
|
||||
*/
|
||||
|
||||
rtems_clock_major = major;
|
||||
rtems_clock_minor = minor;
|
||||
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
/* PAGE
|
||||
*
|
||||
* Clock_control
|
||||
*
|
||||
* This routine is the clock device driver control entry point.
|
||||
*
|
||||
* Input parameters:
|
||||
* major - clock device major number
|
||||
* minor - clock device minor number
|
||||
* parg - pointer to optional device driver arguments
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values:
|
||||
* rtems_device_driver status code
|
||||
*/
|
||||
|
||||
rtems_device_driver Clock_control(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void *pargp
|
||||
)
|
||||
{
|
||||
uint32_t isrlevel;
|
||||
rtems_libio_ioctl_args_t *args = pargp;
|
||||
|
||||
if (args == 0)
|
||||
goto done;
|
||||
|
||||
/*
|
||||
* This is hokey, but until we get a defined interface
|
||||
* to do this, it will just be this simple...
|
||||
*/
|
||||
|
||||
if (args->command == rtems_build_name('I', 'S', 'R', ' '))
|
||||
{
|
||||
Clock_isr( CLOCK_VECTOR, pargp );
|
||||
}
|
||||
else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
|
||||
{
|
||||
rtems_interrupt_disable( isrlevel );
|
||||
(void) set_vector( args->buffer, CLOCK_VECTOR, 1 );
|
||||
rtems_interrupt_enable( isrlevel );
|
||||
}
|
||||
|
||||
done:
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
## Process this file with autoconf to produce a configure script.
|
||||
##
|
||||
## $Id$
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT([rtems-c-src-lib-libbsp-powerpc-dmv177],[_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
|
||||
|
||||
RTEMS_CHECK_NETWORKING
|
||||
AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
|
||||
|
||||
## bsp-specific options
|
||||
RTEMS_BSPOPTS_SET([CONSOLE_USE_INTERRUPTS],[*],[0])
|
||||
RTEMS_BSPOPTS_HELP([CONSOLE_USE_INTERRUPTS],
|
||||
[whether using console interrupts])
|
||||
|
||||
RTEMS_BSPOPTS_SET([PPC_USE_SPRG],[*],[0])
|
||||
RTEMS_BSPOPTS_HELP([PPC_USE_SPRG],
|
||||
[If defined, then the PowerPC specific code in RTEMS will use some
|
||||
of the special purpose registers to slightly optimize interrupt
|
||||
response time. The use of these registers can conflict with
|
||||
other tools like debuggers.])
|
||||
|
||||
RTEMS_BSPOPTS_SET([PPC_USE_DATA_CACHE],[*],[0])
|
||||
RTEMS_BSPOPTS_HELP([PPC_USE_DATA_CACHE],
|
||||
[If set != 0, then the PowerPC specific code in RTEMS will use
|
||||
data cache instructions to optimize the context switch code.
|
||||
This code can conflict with debuggers or emulators. It is known
|
||||
to break the Corelis PowerPC emulator with at least some combinations
|
||||
of PowerPC 603e revisions and emulator versions.
|
||||
The BSP actually contains the call that enables this.])
|
||||
|
||||
RTEMS_BSPOPTS_SET([DMV177_USE_INSTRUCTION_CACHE],[*],[1])
|
||||
RTEMS_BSPOPTS_HELP([DMV177_USE_INSTRUCTION_CACHE],
|
||||
[If set != 0, then the PowerPC specific code in RTEMS will use
|
||||
data cache instructions to optimize the context switch code.
|
||||
This code can conflict with debuggers or emulators.
|
||||
The BSP actually contains the call that enables this.])
|
||||
|
||||
# Explicitly list all Makefiles here
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
|
||||
RTEMS_PPC_EXCEPTIONS
|
||||
|
||||
AC_OUTPUT
|
||||
@@ -1,282 +0,0 @@
|
||||
/*
|
||||
* This file contains the TTY driver table for the DY-4 DMV177.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1997.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
|
||||
#include <libchip/serial.h>
|
||||
#include <libchip/mc68681.h>
|
||||
#include <libchip/z85c30.h>
|
||||
|
||||
/*
|
||||
* Configuration specific probe routines
|
||||
*
|
||||
*
|
||||
* NOTE: There are no DMV177 specific configuration routines. These
|
||||
* routines could be written to dynamically determine which serial
|
||||
* ports are on a board. Debugging this would require access to
|
||||
* multiple board models.
|
||||
*/
|
||||
|
||||
/* NONE CURRENTLY PROVIDED */
|
||||
|
||||
/*
|
||||
* The following table configures the console drivers used in this BSP.
|
||||
*
|
||||
* The first entry which, when probed, is available, will be named /dev/console,
|
||||
* all others being given the name indicated.
|
||||
*/
|
||||
|
||||
mc68681_baud_t
|
||||
dmv177_mc68681_baud_table[4][RTEMS_TERMIOS_NUMBER_BAUD_RATES] = {
|
||||
{ /* ACR[7] = 0, X = 0 */
|
||||
MC68681_BAUD_NOT_VALID, /* B0 */
|
||||
MC68681_BAUD_NOT_VALID, /* B50 */
|
||||
0x01, /* B75 */
|
||||
MC68681_BAUD_NOT_VALID, /* B110 */
|
||||
0x03, /* B134 */
|
||||
MC68681_BAUD_NOT_VALID, /* B150 */
|
||||
0x04, /* B200 */
|
||||
MC68681_BAUD_NOT_VALID, /* B300 */
|
||||
MC68681_BAUD_NOT_VALID, /* B600 */
|
||||
MC68681_BAUD_NOT_VALID, /* B1200 */
|
||||
MC68681_BAUD_NOT_VALID, /* B1800 */
|
||||
MC68681_BAUD_NOT_VALID, /* B2400 */
|
||||
0x0A, /* B4800 */
|
||||
MC68681_BAUD_NOT_VALID, /* B9600 */
|
||||
MC68681_BAUD_NOT_VALID, /* B19200 */
|
||||
MC68681_BAUD_NOT_VALID, /* B38400 */
|
||||
MC68681_BAUD_NOT_VALID, /* B57600 */
|
||||
MC68681_BAUD_NOT_VALID, /* B115200 */
|
||||
MC68681_BAUD_NOT_VALID, /* B230400 */
|
||||
MC68681_BAUD_NOT_VALID /* B460800 */
|
||||
},
|
||||
{ /* ACR[7] = 1, X = 0 */
|
||||
MC68681_BAUD_NOT_VALID, /* B0 */
|
||||
0x00, /* B50 */
|
||||
0x01, /* B75 */
|
||||
MC68681_BAUD_NOT_VALID, /* B110 */
|
||||
MC68681_BAUD_NOT_VALID, /* B134 */
|
||||
MC68681_BAUD_NOT_VALID, /* B150 */
|
||||
0x04, /* B200 */
|
||||
MC68681_BAUD_NOT_VALID, /* B300 */
|
||||
MC68681_BAUD_NOT_VALID, /* B600 */
|
||||
0x0A, /* B1200 */
|
||||
MC68681_BAUD_NOT_VALID, /* B1800 */
|
||||
MC68681_BAUD_NOT_VALID, /* B2400 */
|
||||
MC68681_BAUD_NOT_VALID, /* B4800 */
|
||||
MC68681_BAUD_NOT_VALID, /* B9600 */
|
||||
MC68681_BAUD_NOT_VALID, /* B19200 */
|
||||
MC68681_BAUD_NOT_VALID, /* B38400 */
|
||||
MC68681_BAUD_NOT_VALID, /* B57600 */
|
||||
MC68681_BAUD_NOT_VALID, /* B115200 */
|
||||
MC68681_BAUD_NOT_VALID, /* B230400 */
|
||||
MC68681_BAUD_NOT_VALID /* B460800 */
|
||||
},
|
||||
{ /* ACR[7] = 0, X = 1 */
|
||||
MC68681_BAUD_NOT_VALID, /* B0 */
|
||||
0x00, /* B50 */
|
||||
0x01, /* B75 */
|
||||
MC68681_BAUD_NOT_VALID, /* B110 */
|
||||
MC68681_BAUD_NOT_VALID, /* B134 */
|
||||
MC68681_BAUD_NOT_VALID, /* B150 */
|
||||
MC68681_BAUD_NOT_VALID, /* B200 */
|
||||
MC68681_BAUD_NOT_VALID, /* B300 */
|
||||
MC68681_BAUD_NOT_VALID, /* B600 */
|
||||
MC68681_BAUD_NOT_VALID, /* B1200 */
|
||||
MC68681_BAUD_NOT_VALID, /* B1800 */
|
||||
0x04, /* B2400 */
|
||||
MC68681_BAUD_NOT_VALID, /* B4800 */
|
||||
0x05, /* B9600 */
|
||||
0x06, /* B19200 */
|
||||
0x07, /* B38400 */
|
||||
MC68681_BAUD_NOT_VALID, /* B57600 */
|
||||
MC68681_BAUD_NOT_VALID, /* B115200 */
|
||||
MC68681_BAUD_NOT_VALID, /* B230400 */
|
||||
MC68681_BAUD_NOT_VALID /* B460800 */
|
||||
},
|
||||
{ /* ACR[7] = 1, X = 1 */
|
||||
MC68681_BAUD_NOT_VALID, /* B0 */
|
||||
MC68681_BAUD_NOT_VALID, /* B50 */
|
||||
0x01, /* B75 */
|
||||
MC68681_BAUD_NOT_VALID, /* B110 */
|
||||
0x03, /* B134 */
|
||||
MC68681_BAUD_NOT_VALID, /* B150 */
|
||||
MC68681_BAUD_NOT_VALID, /* B200 */
|
||||
MC68681_BAUD_NOT_VALID, /* B300 */
|
||||
MC68681_BAUD_NOT_VALID, /* B600 */
|
||||
MC68681_BAUD_NOT_VALID, /* B1200 */
|
||||
MC68681_BAUD_NOT_VALID, /* B1800 */
|
||||
0x04, /* B2400 */
|
||||
0x0A, /* B4800 */
|
||||
0x05, /* B9600 */
|
||||
0x06, /* B19200 */
|
||||
0x07, /* B38400 */
|
||||
MC68681_BAUD_NOT_VALID, /* B57600 */
|
||||
MC68681_BAUD_NOT_VALID, /* B115200 */
|
||||
MC68681_BAUD_NOT_VALID, /* B230400 */
|
||||
MC68681_BAUD_NOT_VALID /* B460800 */
|
||||
},
|
||||
};
|
||||
|
||||
#define MC68681_PORT_CONFIG \
|
||||
(MC68681_DATA_BAUD_RATE_SET_1|MC68681_XBRG_ENABLED)
|
||||
|
||||
/*
|
||||
* Based on BSP configuration information decide whether to do polling IO
|
||||
* or interrupt driven IO.
|
||||
*/
|
||||
|
||||
#if (CONSOLE_USE_INTERRUPTS)
|
||||
#define MC68681_FUNCTIONS &mc68681_fns
|
||||
#define Z85C30_FUNCTIONS &z85c30_fns
|
||||
#else
|
||||
#define MC68681_FUNCTIONS &mc68681_fns_polled
|
||||
#define Z85C30_FUNCTIONS &z85c30_fns_polled
|
||||
#endif
|
||||
|
||||
boolean dmv177_z85c30_probe(int minor);
|
||||
boolean dmv177_mc68681_probe(int minor);
|
||||
|
||||
console_tbl Console_Port_Tbl[] = {
|
||||
{
|
||||
"/dev/com0", /* sDeviceName */
|
||||
SERIAL_MC68681, /* deviceType */
|
||||
MC68681_FUNCTIONS, /* pDeviceFns */
|
||||
dmv177_mc68681_probe, /* deviceProbe */
|
||||
NULL, /* pDeviceFlow */
|
||||
16, /* ulMargin */
|
||||
8, /* ulHysteresis */
|
||||
(void *)9600, /* baud rate */ /* pDeviceParams */
|
||||
MC68681_ADDR, /* ulCtrlPort1 */
|
||||
MC68681_PORT1_ADDR, /* ulCtrlPort2 */
|
||||
MC68681_PORT_CONFIG, /* ulDataPort */
|
||||
mc68681_get_register_8, /* getRegister */
|
||||
mc68681_set_register_8, /* setRegister */
|
||||
NULL, /* unused */ /* getData */
|
||||
NULL, /* unused */ /* setData */
|
||||
(uint32_t)dmv177_mc68681_baud_table, /* ulClock */
|
||||
DMV170_DUART_IRQ /* ulIntVector */
|
||||
},
|
||||
{
|
||||
"/dev/com1", /* sDeviceName */
|
||||
SERIAL_MC68681, /* deviceType */
|
||||
MC68681_FUNCTIONS, /* pDeviceFns */
|
||||
dmv177_mc68681_probe, /* deviceProbe */
|
||||
NULL, /* pDeviceFlow */
|
||||
16, /* ulMargin */
|
||||
8, /* ulHysteresis */
|
||||
(void *)9600, /* baud rate */ /* pDeviceParams */
|
||||
MC68681_ADDR, /* ulCtrlPort1 */
|
||||
MC68681_PORT2_ADDR, /* ulCtrlPort2 */
|
||||
MC68681_PORT_CONFIG, /* ulDataPort */
|
||||
mc68681_get_register_8, /* getRegister */
|
||||
mc68681_set_register_8, /* setRegister */
|
||||
NULL, /* unused */ /* getData */
|
||||
NULL, /* unused */ /* setData */
|
||||
(uint32_t)dmv177_mc68681_baud_table, /* ulClock */
|
||||
DMV170_DUART_IRQ /* ulIntVector */
|
||||
},
|
||||
{
|
||||
"/dev/com3", /* sDeviceName */
|
||||
SERIAL_Z85C30, /* deviceType */
|
||||
Z85C30_FUNCTIONS, /* pDeviceFns */
|
||||
dmv177_z85c30_probe, /* deviceProbe */
|
||||
NULL, /* pDeviceFlow */
|
||||
16, /* ulMargin */
|
||||
8, /* ulHysteresis */
|
||||
(void *)9600, /* baud rate */ /* pDeviceParams */
|
||||
Z85C30_CTRL_A, /* ulCtrlPort1 */
|
||||
Z85C30_CTRL_A, /* ulCtrlPort2 */
|
||||
0, /* ulDataPort */
|
||||
z85c30_get_register, /* getRegister */
|
||||
z85c30_set_register, /* setRegister */
|
||||
NULL, /* getData */
|
||||
NULL, /* setData */
|
||||
0, /* filled in by probe */ /* ulClock */
|
||||
DMV170_SCC_IRQ /* ulIntVector */
|
||||
},
|
||||
{
|
||||
"/dev/com4", /* sDeviceName */
|
||||
SERIAL_Z85C30, /* deviceType */
|
||||
Z85C30_FUNCTIONS, /* pDeviceFns */
|
||||
dmv177_z85c30_probe, /* deviceProbe */
|
||||
NULL, /* pDeviceFlow */
|
||||
16, /* ulMargin */
|
||||
8, /* ulHysteresis */
|
||||
(void *)9600, /* baud rate */ /* pDeviceParams */
|
||||
Z85C30_CTRL_B, /* ulCtrlPort1 */
|
||||
Z85C30_CTRL_A, /* ulCtrlPort2 */
|
||||
0, /* ulDataPort */
|
||||
z85c30_get_register, /* getRegister */
|
||||
z85c30_set_register, /* setRegister */
|
||||
NULL, /* getData */
|
||||
NULL, /* setData */
|
||||
0, /* filled in by probe */ /* ulClock */
|
||||
DMV170_SCC_IRQ /* ulIntVector */
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* Declare some information used by the console driver
|
||||
*/
|
||||
|
||||
#define NUM_CONSOLE_PORTS (sizeof(Console_Port_Tbl)/sizeof(console_tbl))
|
||||
|
||||
unsigned long Console_Port_Count = NUM_CONSOLE_PORTS;
|
||||
|
||||
console_data Console_Port_Data[NUM_CONSOLE_PORTS];
|
||||
|
||||
rtems_device_minor_number Console_Port_Minor;
|
||||
|
||||
/*
|
||||
* Hopefully, by checking the card resource register, this BSP
|
||||
* will be able to operate on the DMV171, DMV176, or DMV177.
|
||||
*/
|
||||
|
||||
boolean dmv177_z85c30_probe(int minor)
|
||||
{
|
||||
volatile uint32_t *dma_control_status_reg;
|
||||
volatile uint16_t *card_resource_reg;
|
||||
uint16_t v;
|
||||
|
||||
card_resource_reg = (volatile uint16_t*) DMV170_CARD_RESORCE_REG;
|
||||
|
||||
v = *card_resource_reg & DMV170_SCC_INST_MASK;
|
||||
|
||||
if ( v != DMV170_SCC_INSTALLED )
|
||||
return FALSE;
|
||||
|
||||
/*
|
||||
* Figure out the clock speed of the Z85C30 SCC
|
||||
*/
|
||||
|
||||
dma_control_status_reg = (volatile uint32_t*)DMV170_DMA_CONTROL_STATUS_REG;
|
||||
|
||||
if ( *dma_control_status_reg & DMV170_SCC_10MHZ )
|
||||
Console_Port_Tbl[minor].ulClock = Z85C30_CLOCK_10;
|
||||
else
|
||||
Console_Port_Tbl[minor].ulClock = Z85C30_CLOCK_2;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
boolean dmv177_mc68681_probe(int minor)
|
||||
{
|
||||
volatile uint16_t *card_resource_reg;
|
||||
uint16_t v;
|
||||
|
||||
card_resource_reg = (volatile uint16_t*) DMV170_CARD_RESORCE_REG;
|
||||
|
||||
v = *card_resource_reg & DMV170_DUART_INST_MASK;
|
||||
|
||||
if ( v == DMV170_DUART_INSTALLED )
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
/*
|
||||
* This file contains the debug IO support.
|
||||
*
|
||||
* COPYRIGHT (c) 1998 by Radstone Technology
|
||||
*
|
||||
*
|
||||
* THIS FILE IS PROVIDED TO YOU, THE USER, "AS IS", WITHOUT WARRANTY OF ANY
|
||||
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK
|
||||
* AS TO THE QUALITY AND PERFORMANCE OF ALL CODE IN THIS FILE IS WITH YOU.
|
||||
*
|
||||
* You are hereby granted permission to use, copy, modify, and distribute
|
||||
* this file, provided that this notice, plus the above copyright notice
|
||||
* and disclaimer, appears in all copies. Radstone Technology will provide
|
||||
* no support for this code.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1997.
|
||||
* 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 <bsp.h>
|
||||
#include <rtems/libio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <termios.h>
|
||||
|
||||
#include <libchip/serial.h>
|
||||
|
||||
/*
|
||||
* Load configuration table
|
||||
*/
|
||||
|
||||
extern console_data Console_Port_Data[];
|
||||
extern rtems_device_minor_number Console_Port_Minor;
|
||||
|
||||
/* PAGE
|
||||
*
|
||||
* DEBUG_puts
|
||||
*
|
||||
* This should be safe in the event of an error. It attempts to ensure
|
||||
* that no TX empty interrupts occur while it is doing polled IO. Then
|
||||
* it restores the state of that external interrupt.
|
||||
*
|
||||
* Input parameters:
|
||||
* string - pointer to debug output string
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values: NONE
|
||||
*/
|
||||
|
||||
void DEBUG_puts(
|
||||
char *string
|
||||
)
|
||||
{
|
||||
char *s;
|
||||
uint32_t Irql;
|
||||
|
||||
rtems_interrupt_disable(Irql);
|
||||
|
||||
for ( s = string ; *s ; s++ ) {
|
||||
Console_Port_Tbl[Console_Port_Minor].pDeviceFns->
|
||||
deviceWritePolled(Console_Port_Minor, *s);
|
||||
}
|
||||
|
||||
rtems_interrupt_enable(Irql);
|
||||
}
|
||||
|
||||
/* PAGE
|
||||
*
|
||||
* DEBUG_puth
|
||||
*
|
||||
* This should be safe in the event of an error. It attempts to ensure
|
||||
* that no TX empty interrupts occur while it is doing polled IO. Then
|
||||
* it restores the state of that external interrupt.
|
||||
*
|
||||
* Input parameters:
|
||||
* ulHexNum - value to display
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values: NONE
|
||||
*/
|
||||
|
||||
void DEBUG_puth(
|
||||
uint32_t ulHexNum
|
||||
)
|
||||
{
|
||||
unsigned long i,d;
|
||||
uint32_t Irql;
|
||||
void (*poll)(int minor, char cChar);
|
||||
|
||||
poll = Console_Port_Tbl[Console_Port_Minor].pDeviceFns->deviceWritePolled;
|
||||
|
||||
rtems_interrupt_disable(Irql);
|
||||
|
||||
(*poll)(Console_Port_Minor, '0');
|
||||
(*poll)(Console_Port_Minor, 'x');
|
||||
|
||||
for ( i=32 ; i ; ) {
|
||||
i -= 4;
|
||||
d = (ulHexNum>>i)&0xf;
|
||||
(*poll)(Console_Port_Minor, (d<=9) ? d+'0' : d+'a'-0xa);
|
||||
}
|
||||
rtems_interrupt_enable(Irql);
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
coverhd.h
|
||||
tod.h
|
||||
bspopts.h
|
||||
bspopts.h.in
|
||||
stamp-h
|
||||
stamp-h.in
|
||||
@@ -1,150 +0,0 @@
|
||||
/* bsp.h
|
||||
*
|
||||
* This include file contains all DY-4 DMV170 board IO definitions.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1997.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __DMV170_BSP_h
|
||||
#define __DMV170_BSP_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <bspopts.h>
|
||||
|
||||
/*
|
||||
* confdefs.h overrides for this BSP:
|
||||
* - termios serial ports (defaults to 1)
|
||||
* - Interrupt stack space is not minimum if defined.
|
||||
*/
|
||||
|
||||
#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 4
|
||||
#define CONFIGURE_INTERRUPT_STACK_MEMORY (12 * 1024)
|
||||
|
||||
#ifdef ASM
|
||||
/* Definition of where to store registers in alignment handler */
|
||||
#define ALIGN_REGS 0x0140
|
||||
|
||||
#else
|
||||
#include <rtems.h>
|
||||
#include <rtems/console.h>
|
||||
#include <rtems/clockdrv.h>
|
||||
#include <rtems/console.h>
|
||||
#include <rtems/iosupp.h>
|
||||
|
||||
#include <dmv170.h>
|
||||
|
||||
#if 0
|
||||
#define Enable_Debug() \
|
||||
DMV170_WRITE( 0xffffbd0c, 0 )
|
||||
|
||||
#define Debug_Entry( num ) \
|
||||
DMV170_WRITE( 0xffffbd06, num )
|
||||
#else
|
||||
#define Enable_Debug()
|
||||
#define Debug_Entry( num )
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Network driver configuration
|
||||
*/
|
||||
struct rtems_bsdnet_ifconfig;
|
||||
int rtems_dmv177_sonic_driver_attach(struct rtems_bsdnet_ifconfig *config);
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME "sonic1"
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_dmv177_sonic_driver_attach
|
||||
|
||||
/*
|
||||
* The following macro calculates the Baud constant. For the Z8530 chip.
|
||||
*/
|
||||
#define Z8530_Baud( _frequency, _clock_by, _baud_rate ) \
|
||||
( (_frequency /( _clock_by * 2 * _baud_rate)) - 2)
|
||||
|
||||
/* Constants */
|
||||
|
||||
/*
|
||||
* Device Driver Table Entries
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTE: Use the standard Console driver entry
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTE: Use the standard Clock driver entry
|
||||
*/
|
||||
|
||||
/*
|
||||
* Information placed in the linkcmds file.
|
||||
*/
|
||||
|
||||
extern int RAM_START;
|
||||
extern int RAM_END;
|
||||
extern int RAM_SIZE;
|
||||
|
||||
extern int PROM_START;
|
||||
extern int PROM_END;
|
||||
extern int PROM_SIZE;
|
||||
|
||||
extern int CLOCK_SPEED;
|
||||
|
||||
extern int end; /* last address in the program */
|
||||
|
||||
/*
|
||||
* How many libio files we want
|
||||
*/
|
||||
|
||||
#define BSP_LIBIO_MAX_FDS 20
|
||||
|
||||
/* functions */
|
||||
|
||||
/*
|
||||
* genvec.c
|
||||
*/
|
||||
rtems_isr_entry set_EE_vector(
|
||||
rtems_isr_entry handler, /* isr routine */
|
||||
rtems_vector_number vector /* vector number */
|
||||
);
|
||||
void initialize_external_exception_vector ();
|
||||
|
||||
/*
|
||||
* console.c
|
||||
*/
|
||||
void DEBUG_puts( char *string );
|
||||
|
||||
void BSP_fatal_return( void );
|
||||
|
||||
void bsp_start( void );
|
||||
|
||||
void bsp_cleanup( void );
|
||||
|
||||
rtems_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 */
|
||||
);
|
||||
|
||||
void BSP_fatal_return( void );
|
||||
|
||||
void bsp_spurious_initialize( void );
|
||||
|
||||
extern rtems_configuration_table BSP_Configuration; /* owned by BSP */
|
||||
|
||||
extern rtems_cpu_table Cpu_table; /* owned by BSP */
|
||||
|
||||
extern uint32_t bsp_isr_level;
|
||||
|
||||
extern int CPU_PPC_CLICKS_PER_MS;
|
||||
|
||||
#endif /* ASM */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
@@ -1,284 +0,0 @@
|
||||
/* dmv170.h
|
||||
*
|
||||
* This include file contains information pertaining to the DMV170.
|
||||
*
|
||||
* NOTE: Other than where absolutely required, this version currently
|
||||
* supports only the peripherals and bits used by the basic board
|
||||
* support package. This includes at least significant pieces of
|
||||
* the following items:
|
||||
*
|
||||
* + UART Channels A and B
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1997.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may in
|
||||
* the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE_DMV170_h
|
||||
#define _INCLUDE_DMV170_h
|
||||
|
||||
/*
|
||||
* DY-4 uses a non-standard clock for the Exar 88681.
|
||||
*/
|
||||
|
||||
#undef MC68681_BAUD_RATE_MASK_9600
|
||||
#define MC68681_BAUD_RATE_MASK_9600
|
||||
|
||||
#define DMV17x_MC68681_BAUD_RATE_MASK_9600
|
||||
|
||||
#if 0
|
||||
#define MC68681_OFFSET_MULTIPLIER 8
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Note: Move address defs to the linker files. XXX */
|
||||
|
||||
/* Real Time Clock Base Address */
|
||||
#define DMV170_RTC_ADDRESS 0xf2c00000
|
||||
|
||||
/* base address of the DUART (68681) */
|
||||
#define MC68681_ADDR 0xf2800000
|
||||
#define MC68681_PORT1_ADDR 0xf2800000
|
||||
#define MC68681_PORT2_ADDR 0xf2800040
|
||||
|
||||
/*
|
||||
* SONIC Information
|
||||
*/
|
||||
|
||||
#define DMV170_SONIC_ADDR 0xf3000000
|
||||
|
||||
#define SONIC_BASE_ADDRESS DMV170_SONIC_ADDR
|
||||
#define SONIC_VECTOR DMV170_ETHERNET_IRQ
|
||||
|
||||
/* base address for the SCC (85C30) */
|
||||
#define Z85C30_ADDR 0xfb000010
|
||||
#define Z85C30_CTRL_A 0xfb000010
|
||||
#define Z85C30_DATA_A 0xfb000018
|
||||
#define Z85C30_CTRL_B 0xfb000000
|
||||
#define Z85C30_DATA_B 0xfb000008
|
||||
#define Z85C30_CLOCK_10 (10485760) /* 10 Mhz */
|
||||
#define Z85C30_CLOCK_2 (2581175) /* 2.4616 Mhz */
|
||||
|
||||
/* base address for the SCV64 */
|
||||
#define DMV170_SCV64_BASE_ADDRESS 0xf2000000
|
||||
|
||||
#define DMV170_LOCAL_CONTROL_STATUS_REG 0xf2400000
|
||||
#define DMV170_TIMER0_COUNT_INTERVAL_REG 0xf2400008
|
||||
#define DMV170_TIMER1_COUNT_INTERVAL_REG 0xf2400010
|
||||
#define DMV170_TIMER2_COUNT_INTERVAL_REG 0xf2400018
|
||||
#define DMV170_TIMER_CONTROL_REG 0xf2400020
|
||||
#define DMV170_CARD_RESORCE_REG 0xf2400040
|
||||
|
||||
#define DMV170_WRITE( _reg, _data ) \
|
||||
*((volatile uint16_t*)(_reg)) = (_data)
|
||||
|
||||
#define DMV170_READ( _reg, _data ) \
|
||||
(_data) = *((volatile uint16_t*)(_reg))
|
||||
|
||||
/*
|
||||
* The following defines the bits in the DMA Control and Status Register
|
||||
*/
|
||||
|
||||
/* XXX fill in the other bits */
|
||||
|
||||
#define DMV170_DMA_CONTROL_STATUS_REG 0xfc000090
|
||||
|
||||
#define DMV170_SCC_10MHZ 0x00010000
|
||||
|
||||
/*
|
||||
* The following defines the bits in the Local Control and Status Register.
|
||||
*/
|
||||
#define DMV170_IPLx_MASK 0x0007
|
||||
#define DMV170_MAXPACK_SENSE_MASK 0x0008
|
||||
#define DMV170_MAXPACK_NOT_INSTALLED 0x0008
|
||||
#define DMV170_MAXPACK_INSTALLED 0x0000
|
||||
|
||||
#define DMV170_MAXPACK_RESET_MASK 0x0010
|
||||
#define DMV170_MAXPACK_RESET_NEGATE 0x0010
|
||||
#define DMV170_MAXPACK_RESET_ASSERT 0x0000
|
||||
#define DMV170_EEPROM_READ_WRITE_MASK 0x0020
|
||||
#define DMV170_EEPROM_READ 0x0020
|
||||
#define DMV170_EEPROM_WRITE 0x0000
|
||||
#define DMV170_EEPROM_CLOCK_CTRL_MASK 0x0040
|
||||
#define DMV170_EEPROM_CLOCK_ASSERT 0x0040
|
||||
#define DMV170_EEPROM_CLOCK_NEGATE 0x0000
|
||||
#define DMV170_EEPROM_DATA_MASK 0x0080
|
||||
#define DMV170_EEPROM_DATA_HIGH 0x0080
|
||||
#define DMV170_EEPROM_DATA_LOW 0x0000
|
||||
|
||||
/* Bits 8-10: 68040 Transfer Modifer Codes represent the Transfer
|
||||
* Modifier to be used on MAXPack Accesses.
|
||||
*
|
||||
* Bit 11 : 68040 Transfer Type (TT) 0:TT are both low 1:TT are both high
|
||||
*/
|
||||
|
||||
#define DMV170_USER_LINK0_STATUS_MASK 0x1000
|
||||
#define DMV170_USER_LINK0_OPEN 0x1000
|
||||
#define DMV170_USER_LINK0_INSTALLED 0x0000
|
||||
#define DMV170_LOWER_STATUS_LED_CONTROL_MASK 0x2000
|
||||
#define DMV170_LOWER_STATUS_LED_IS_OFF 0x2000
|
||||
#define DMV170_LOWER_STATUS_LED_IS_ON 0x0000
|
||||
#ifdef DMV176
|
||||
/* The following are not available for the DMV171 */
|
||||
#define DMV170_RAM_TYPE_MASK 0x4000
|
||||
#define DMV170_RAM_TYPE_IS_DRAM 0x4000
|
||||
#define DMV170_RAM_TYPE_IS_SRAM 0x0000
|
||||
#define DMV170_IACK_VECTOR_AUTOVECTOR_MASK 0x8000
|
||||
#define DMV170_IACK_VECTOR_AUTOVECTOR_IS_VECTOR 0x8000
|
||||
#define DMV170_IACK_VECTOR_AUTOVECTOR_IS_NOT_VECTOR 0x0000
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The following defines the bits in the Timer Control Register.
|
||||
*/
|
||||
|
||||
#define DMV170_TIMER0_ENABLE_MASK 0x0001
|
||||
#define DMV170_TIMER0_IS_ENABLED 0x0001
|
||||
#define DMV170_TIMER0_IS_DISABLED 0x0000
|
||||
#define DMV170_TIMER1_ENABLE_MASK 0x0002
|
||||
#define DMV170_TIMER1_IS_ENABLED 0x0002
|
||||
#define DMV170_TIMER1_IS_DISABLED 0x0000
|
||||
#define DMV170_TIMER2_ENABLE_MASK 0x0004
|
||||
#define DMV170_TIMER2_IS_ENABLED 0x0004
|
||||
#define DMV170_TIMER2_IS_DISABLED 0x0000
|
||||
#define DMV170_TIMER1_CLOCK_MASK 0x0008
|
||||
#define DMV170_TIMER1_CLOCK_AT_TIMER0 0x0008
|
||||
#define DMV170_TIMER1_CLOCK_AT_1MHZ 0x0000
|
||||
|
||||
#define DMV170_TIMER2_CLOCK_MASK 0x0010
|
||||
#define DMV170_TIMER2_CLOCK_AT_TIMER0 0x0010
|
||||
#define DMV170_TIMER2_CLOCK_AT_1MHZ 0x0000
|
||||
#define DMV170_TIMER0_INTERRUPT_MASK 0x0020
|
||||
#define DMV170_TIMER0_INTERRUPT_ENABLE 0x0020
|
||||
#define DMV170_TIMER0_INTERRUPT_CLEAR 0x0000
|
||||
#define DMV170_TIMER1_INTERRUPT_MASK 0x0040
|
||||
#define DMV170_TIMER1_INTERRUPT_ENABLE 0x0040
|
||||
#define DMV170_TIMER1_INTERRUPT_CLEAR 0x0000
|
||||
#define DMV170_TIMER2_INTERRUPT_MASK 0x0080
|
||||
#define DMV170_TIMER2_INTERRUPT_ENABLE 0x0080
|
||||
#define DMV170_TIMER2_INTERRUPT_CLEAR 0x0000
|
||||
|
||||
/*
|
||||
* The Following define the bits for the Card Resource Register.
|
||||
*/
|
||||
|
||||
#define DMV170_DUART_INTERRUPT_MASK 0x0001 /* DUART Interrupt Sense Bit */
|
||||
#define DMV170_DUART_INTERRUPT_NEGATE 0x0001
|
||||
#define DMV170_DUART_INTERRUPT_ASSERT 0x0000
|
||||
#define DMV170_SONIC_INTERRUPT_MASK 0x0002 /* SONIC Interrupt Sense Bit */
|
||||
#define DMV170_SONIC_INTERRUPT_NEGATE 0x0002
|
||||
#define DMV170_SONIC_INTERRUPT_ASSERT 0x0000
|
||||
#define DMV170_SCSI_INTERRUPT_MASK 0x0004 /* SCSI Interrupt Sense Bit */
|
||||
#define DMV170_SCSI_INTERRUPT_NEGATE 0x0004
|
||||
#define DMV170_SCSI_INTERRUPT_ASSERT 0x0000
|
||||
#define DMV170_SCC_INTERRUPT_MASK 0x0008 /* SCC Interrupt Sense Bit */
|
||||
#define DMV170_SCC_INTERRUPT_NEGATE 0x0008
|
||||
#define DMV170_SCC_INTERRUPT_ASSERT 0x0000
|
||||
#define DMV170_SNOOP_ENABLE_MASK 0x0010 /* CPU Snoop Enable Bit */
|
||||
#define DMV170_SNOOP_DISABLE 0x0010
|
||||
#define DMV170_SNOOP_ENABLE 0x0000
|
||||
#define DMV170_SONIC_RESET_MASK 0x0020 /* SONIC RESET Control */
|
||||
#define DMV170_SONIC_RESET_CLEAR 0x0020
|
||||
#define DMV170_SONIC_RESET_HOLD 0x0000
|
||||
#define DMV170_NV64_WE_MASK 0x0040 /* 64-bit Non-Volital Memory */
|
||||
#define DMV170_NV64_WRITE_ENABLE 0x0040 /* Write Enable */
|
||||
#define DMV170_NV64_WRITE_DISABLE 0x0000
|
||||
#define DMV170_BOOT_NV16_MASK 0x0080 /* BOOT Device Type */
|
||||
#define DMV170_BOOT_64_BIT 0x0080
|
||||
#define DMV170_BOOT_16_BIT 0x0000
|
||||
#define DMV170_DUART_INST_MASK 0x0100 /* DUART Sense Bit */
|
||||
#define DMV170_DUART_INSTALLED 0x0100
|
||||
#define DMV170_DUART_NOT_INSTALLED 0x0000
|
||||
#define DMV170_SONIC_INST_MASK 0x0200 /* SONIC Sense Bit */
|
||||
#define DMV170_SONIC_INSTALLED 0x0200
|
||||
#define DMV170_SONIC_NOT_INSTALLED 0x0000
|
||||
#define DMV170_16M_NV64_MASK 0x0400 /* 16 Mb of 64bit Flash Sense */
|
||||
#define DMV170_16Mb_FLASH_INSTALLED 0x0400
|
||||
#define DMV170_8Mb_FLASH_INSTALLED 0x0000
|
||||
#define DMV170_SCC_INST_MASK 0x0800 /* SCC Sense Bit */
|
||||
#define DMV170_SCC_INSTALLED 0x0800
|
||||
#define DMV170_SCC_NOT_INSTALLED 0x0000
|
||||
#define DMV170_RTC_INST_MASK 0x1000 /* RTC Sense Bit */
|
||||
#define DMV170_RTC_INSTALLED 0x1000
|
||||
#define DMV170_RTC_NOT_INSTALLED 0x0000
|
||||
#define DMV170_NV64_INST_MASK 0x2000 /* 64bit Non-Volital Mem Sense*/
|
||||
|
||||
#define DMV170_64_BIT_NON_VOLITAL_MEM_INSTALLED 0x2000
|
||||
#define DMV170_64_BIT_NON_VOLITAL_MEM_NOT_INSTALLED 0x0000
|
||||
|
||||
/*
|
||||
* DUART Baud Rate Definitions.
|
||||
*/
|
||||
|
||||
#define DMV170_DUART_9621 MC68681_BAUD_RATE_MASK_600 /* close to 9600 */
|
||||
|
||||
#define DMV170_RTC_FREQUENCY 0x0000
|
||||
|
||||
/*
|
||||
* CPU General Purpose Interrupt definations (PPC_IRQ_EXTERNAL).
|
||||
* Note: For the interrupt level read the lower 3 bits of the
|
||||
* Local Control and Status Register.
|
||||
*/
|
||||
|
||||
#define DMV170_IRQ_FIRST ( PPC_IRQ_LAST + 1 )
|
||||
|
||||
#define DMV170_LIRQ0 ( DMV170_IRQ_FIRST + 0 )
|
||||
#define DMV170_LIRQ1 ( DMV170_IRQ_FIRST + 1 )
|
||||
#define DMV170_LIRQ2 ( DMV170_IRQ_FIRST + 2 )
|
||||
#define DMV170_LIRQ3 ( DMV170_IRQ_FIRST + 3 )
|
||||
#define DMV170_LIRQ4 ( DMV170_IRQ_FIRST + 4 )
|
||||
#define DMV170_LIRQ5 ( DMV170_IRQ_FIRST + 5 )
|
||||
#define DMV170_L7IACF ( DMV170_IRQ_FIRST + 6 )
|
||||
#define DMV170_L7ISYS ( DMV170_IRQ_FIRST + 7 )
|
||||
#define DMV170_L7IMNI ( DMV170_IRQ_FIRST + 8 )
|
||||
#define DMV170_BIMODE ( DMV170_IRQ_FIRST + 9 )
|
||||
|
||||
#define DMV170_DUART_IRQ DMV170_LIRQ5
|
||||
#define DMV170_ETHERNET_IRQ DMV170_LIRQ5
|
||||
#define DMV170_SCSI_IRQ DMV170_LIRQ5
|
||||
#define DMV170_SCC_IRQ DMV170_LIRQ5
|
||||
#define DMV170_MEZZANINE_IRQ_0 DMV170_LIRQ4
|
||||
#define DMV170_TICK_IRQ DMV170_LIRQ3
|
||||
#define DMV170_LOCATION_MON_IRQ DMV170_LIRQ2
|
||||
#define DMV170_SCV64_IRQ DMV170_LIRQ1
|
||||
#define DMV170_RTC_IRQ DMV170_LIRQ0
|
||||
|
||||
#define DMV170_ACFAIL_IRQ DMV170_L7IACF
|
||||
#define DMV170_SYSFAIL_IRQ DMV170_L7ISYS
|
||||
#define DMV170_WATCHDOG_IRQ DMV170_L7IMNI
|
||||
#define DMV170_BI_IRQ DMV170_BIMODE
|
||||
#define DMV170_RAM_PARITY_IRQ ( DMV170_IRQ_FIRST + 10)
|
||||
#define DMV170_DARF_BUS_ERROR_IRQ ( DMV170_IRQ_FIRST + 11)
|
||||
#define DMV170_PERIPHERAL_IRQ ( DMV170_IRQ_FIRST + 12)
|
||||
|
||||
#define MAX_BOARD_IRQS DMV170_PERIPHERAL_IRQ
|
||||
|
||||
#define SCV64_Is_IRQ0( _status ) (_status&0x01)
|
||||
#define SCV64_Is_IRQ1( _status ) (_status&0x02)
|
||||
#define SCV64_Is_IRQ2( _status ) (_status&0x04)
|
||||
#define SCV64_Is_IRQ3( _status ) (_status&0x08)
|
||||
#define SCV64_Is_IRQ4( _status ) (_status&0x10)
|
||||
#define SCV64_Is_IRQ5( _status ) (_status&0x20)
|
||||
|
||||
/*
|
||||
* scv64.c
|
||||
*/
|
||||
|
||||
void SCV64_Generate_DUART_Interrupts();
|
||||
uint32_t SCV64_Get_Interrupt();
|
||||
uint32_t SCV64_Get_Interrupt_Enable();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_INCLUDE_DMV170_h */
|
||||
/* end of include file */
|
||||
@@ -1,53 +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 1
|
||||
|
||||
#define Install_tm27_vector( _handler ) \
|
||||
set_vector( (_handler), PPC_IRQ_DECREMENTER, 1 )
|
||||
|
||||
#define Cause_tm27_intr() \
|
||||
do { \
|
||||
uint32_t _clicks = 1; \
|
||||
asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
|
||||
} while (0)
|
||||
|
||||
#define Clear_tm27_intr() \
|
||||
do { \
|
||||
uint32_t _clicks = 0xffffffff; \
|
||||
uint32_t _msr = 0; \
|
||||
_ISR_Set_level( 0 ); \
|
||||
asm volatile( "mfmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
|
||||
_msr &= ~0x8000; \
|
||||
asm volatile( "mtmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
|
||||
asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
|
||||
} while (0)
|
||||
|
||||
#define Lower_tm27_intr() \
|
||||
do { \
|
||||
uint32_t _msr = 0; \
|
||||
_ISR_Set_level( 0 ); \
|
||||
asm volatile( "mfmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
|
||||
_msr |= 0x8002; \
|
||||
asm volatile( "mtmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
@@ -1,169 +0,0 @@
|
||||
/* scv64.c
|
||||
*
|
||||
* This set of routines control the scv64 chip on the DMV177 board.
|
||||
*
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1997.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
#include <bsp.h>
|
||||
|
||||
typedef struct {
|
||||
/* DARF Registers */
|
||||
volatile uint32_t DMALAR; /* 0x00 */
|
||||
volatile uint32_t DMAVAR; /* 0x04 */
|
||||
volatile uint32_t DMATC; /* 0x08 */
|
||||
volatile uint32_t DCSR; /* 0x0c */
|
||||
volatile uint32_t VMEBAR; /* 0x10 */
|
||||
volatile uint32_t RXDATA; /* 0x14 */
|
||||
volatile uint32_t RXADDR; /* 0x18 */
|
||||
volatile uint32_t RXCTL; /* 0x1c */
|
||||
volatile uint32_t BUSSEL; /* 0x20 */
|
||||
volatile uint32_t IVECT; /* 0x24 */
|
||||
volatile uint32_t APBR; /* 0x28 */
|
||||
volatile uint32_t TXDATA; /* 0x2c */
|
||||
volatile uint32_t TXADDR; /* 0x30 */
|
||||
volatile uint32_t TXCTL; /* 0x34 */
|
||||
volatile uint32_t LMFIFO; /* 0x38 */
|
||||
volatile uint32_t MODE; /* 0x3c */
|
||||
volatile uint32_t SA64BAR; /* 0x40 */
|
||||
volatile uint32_t MA64BAR; /* 0x44 */
|
||||
volatile uint32_t LAG; /* 0x48 */
|
||||
volatile uint32_t DMAVTC; /* 0x4c */
|
||||
|
||||
/* Reserved */
|
||||
volatile uint32_t reserved_50_7F[12];
|
||||
|
||||
/* ACC Registers */
|
||||
volatile uint8_t STAT0_pad[3]; /* 0x80 */
|
||||
volatile uint8_t STAT0;
|
||||
volatile uint8_t STAT1_pad[3]; /* 0x84 */
|
||||
volatile uint8_t STAT1;
|
||||
volatile uint8_t GENCTL_pad[3]; /* 0x88 */
|
||||
volatile uint8_t GENCTL;
|
||||
volatile uint8_t VINT_pad[3]; /* 0x8c */
|
||||
volatile uint8_t VINT;
|
||||
volatile uint8_t VREQ_pad[3]; /* 0x90 */
|
||||
volatile uint8_t VREQ;
|
||||
volatile uint8_t VARB_pad[3]; /* 0x94 */
|
||||
volatile uint8_t VARB;
|
||||
volatile uint8_t ID_pad[3]; /* 0x98 */
|
||||
volatile uint8_t ID;
|
||||
volatile uint8_t NA_pad[3]; /* 0x9c */
|
||||
volatile uint8_t NA;
|
||||
volatile uint8_t _7IS_pad[3]; /* 0xa0 */
|
||||
volatile uint8_t _7IS;
|
||||
volatile uint8_t LIS_pad[3]; /* 0xa4 */
|
||||
volatile uint8_t LIS;
|
||||
volatile uint8_t UIE_pad[3]; /* 0xa8 */
|
||||
volatile uint8_t UIE;
|
||||
volatile uint8_t LIE_pad[3]; /* 0xac */
|
||||
volatile uint8_t LIE;
|
||||
volatile uint8_t VIE_pad[3]; /* 0xb0 */
|
||||
volatile uint8_t VIE;
|
||||
volatile uint8_t IC10_pad[3]; /* 0xb4 */
|
||||
volatile uint8_t IC10;
|
||||
volatile uint8_t IC32_pad[3]; /* 0xb8 */
|
||||
volatile uint8_t IC32;
|
||||
volatile uint8_t IC54_pad[3]; /* 0xbc */
|
||||
volatile uint8_t IC54;
|
||||
/* Utility Registers */
|
||||
volatile uint32_t MISC;
|
||||
volatile uint32_t delay_line[3];
|
||||
volatile uint32_t MBOX0;
|
||||
volatile uint32_t MBOX1;
|
||||
volatile uint32_t MBOX2;
|
||||
volatile uint32_t MBOX3;
|
||||
} SCV64_Registers;
|
||||
|
||||
/*
|
||||
* LIE Register
|
||||
*/
|
||||
#define LOCAL_INTERRUPT_ENABLE_0 0x01
|
||||
#define LOCAL_INTERRUPT_ENABLE_1 0x02
|
||||
#define LOCAL_INTERRUPT_ENABLE_2 0x04
|
||||
#define LOCAL_INTERRUPT_ENABLE_3 0x08
|
||||
#define LOCAL_INTERRUPT_ENABLE_4 0x10
|
||||
#define LOCAL_INTERRUPT_ENABLE_5 0x20
|
||||
|
||||
/*
|
||||
* IC54 Register
|
||||
*/
|
||||
#define AUTOVECTOR_5 0x80
|
||||
|
||||
/*
|
||||
* Set the registers pointer to the base address of the SCV64
|
||||
*/
|
||||
SCV64_Registers *SCV64 = (void *)DMV170_SCV64_BASE_ADDRESS;
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* SCV64_Initialize
|
||||
*
|
||||
* This routine initializes the SCV64.
|
||||
*/
|
||||
void SCV64_Initialize() {
|
||||
SCV64->LIE = 0;
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* SCV64_Generate_DUART_Interrupts
|
||||
*
|
||||
* This sets the SCV64 to generate duart interrupts for
|
||||
* the DMV177 board.
|
||||
*/
|
||||
void SCV64_Generate_DUART_Interrupts() {
|
||||
|
||||
uint8_t data;
|
||||
|
||||
/*
|
||||
* Set Local Interrupt 5 enable
|
||||
*/
|
||||
data = SCV64->LIE;
|
||||
data |= LOCAL_INTERRUPT_ENABLE_5;
|
||||
SCV64->LIE = data;
|
||||
|
||||
/*
|
||||
* Set Autovector.
|
||||
*/
|
||||
data = SCV64->IC54;
|
||||
data |= AUTOVECTOR_5;
|
||||
SCV64->IC54 = data;
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* SCV64_Get_Interrupt
|
||||
*
|
||||
* This routine returns the SCV64 status register.
|
||||
*/
|
||||
uint32_t SCV64_Get_Interrupt()
|
||||
{
|
||||
uint8_t data;
|
||||
|
||||
/*
|
||||
* Put the LIS data into the lower byte of the result
|
||||
*/
|
||||
data = SCV64->LIS;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* SCV64_Get_Interrupt_Enable
|
||||
*
|
||||
* This routine returns the interrupt enable mask.
|
||||
*/
|
||||
uint32_t SCV64_Get_Interrupt_Enable()
|
||||
{
|
||||
/*
|
||||
* Return the set of interrupts enabled.
|
||||
*/
|
||||
return SCV64->LIE;
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
/*
|
||||
* DMV177 SONIC Configuration Information
|
||||
*
|
||||
* References:
|
||||
*
|
||||
* 1) SVME/DMV-171 Single Board Computer Documentation Package, #805905,
|
||||
* DY 4 Systems Inc., Kanata, Ontario, September, 1996.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <rtems/rtems_bsdnet.h>
|
||||
#include <libchip/sonic.h>
|
||||
|
||||
void dmv177_sonic_write_register(
|
||||
void *base,
|
||||
uint32_t regno,
|
||||
uint32_t value
|
||||
)
|
||||
{
|
||||
volatile uint32_t *p = base;
|
||||
|
||||
#if (SONIC_DEBUG & SONIC_DEBUG_PRINT_REGISTERS)
|
||||
printf( "%p Write 0x%04x to %s (0x%02x)\n",
|
||||
&p[regno], value, SONIC_Reg_name[regno], regno );
|
||||
fflush( stdout );
|
||||
#endif
|
||||
p[regno] = value;
|
||||
}
|
||||
|
||||
uint32_t dmv177_sonic_read_register(
|
||||
void *base,
|
||||
uint32_t regno
|
||||
)
|
||||
{
|
||||
volatile uint32_t *p = base;
|
||||
uint32_t value;
|
||||
|
||||
value = p[regno];
|
||||
#if (SONIC_DEBUG & SONIC_DEBUG_PRINT_REGISTERS)
|
||||
printf( "%p Read 0x%04x from %s (0x%02x)\n",
|
||||
&p[regno], value, SONIC_Reg_name[regno], regno );
|
||||
fflush( stdout );
|
||||
#endif
|
||||
return value;
|
||||
}
|
||||
|
||||
/*
|
||||
* Default sizes of transmit and receive descriptor areas
|
||||
*/
|
||||
#define RDA_COUNT 20 /* 20 */
|
||||
#define TDA_COUNT 20 /* 10 */
|
||||
|
||||
/*
|
||||
* Default device configuration register values
|
||||
* Conservative, generic values.
|
||||
* DCR:
|
||||
* No extended bus mode
|
||||
* Unlatched bus retry
|
||||
* Programmable outputs unused
|
||||
* Asynchronous bus mode
|
||||
* User definable pins unused
|
||||
* No wait states (access time controlled by DTACK*)
|
||||
* 32-bit DMA
|
||||
* Empty/Fill DMA mode
|
||||
* Maximum Transmit/Receive FIFO
|
||||
* DC2:
|
||||
* Extended programmable outputs unused
|
||||
* Normal HOLD request
|
||||
* Packet compress output unused
|
||||
* No reject on CAM match
|
||||
*/
|
||||
#define SONIC_DCR \
|
||||
(DCR_DW32 | DCR_WAIT0 | DCR_PO0 | DCR_PO1 | DCR_RFT24 | DCR_TFT28)
|
||||
#ifndef SONIC_DCR
|
||||
# define SONIC_DCR (DCR_DW32 | DCR_TFT28)
|
||||
#endif
|
||||
#ifndef SONIC_DC2
|
||||
# define SONIC_DC2 (0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Default location of device registers
|
||||
*/
|
||||
#ifndef SONIC_BASE_ADDRESS
|
||||
# define SONIC_BASE_ADDRESS 0xF3000000
|
||||
# warning "Using default SONIC_BASE_ADDRESS."
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Default interrupt vector
|
||||
*/
|
||||
#ifndef SONIC_VECTOR
|
||||
# define SONIC_VECTOR 1
|
||||
# warning "Using default SONIC_VECTOR."
|
||||
#endif
|
||||
|
||||
sonic_configuration_t dmv177_sonic_configuration = {
|
||||
SONIC_BASE_ADDRESS, /* base address */
|
||||
SONIC_VECTOR, /* vector number */
|
||||
SONIC_DCR, /* DCR register value */
|
||||
SONIC_DC2, /* DC2 register value */
|
||||
TDA_COUNT, /* number of transmit descriptors */
|
||||
RDA_COUNT, /* number of receive descriptors */
|
||||
dmv177_sonic_write_register,
|
||||
dmv177_sonic_read_register
|
||||
};
|
||||
|
||||
int rtems_dmv177_sonic_driver_attach(struct rtems_bsdnet_ifconfig *config)
|
||||
{
|
||||
return rtems_sonic_driver_attach( config, &dmv177_sonic_configuration );
|
||||
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
/*
|
||||
* This is based on the mvme-crt0.S file from libgloss/rs6000.
|
||||
* crt0.S -- startup file for PowerPC systems.
|
||||
*
|
||||
* Copyright (c) 1995 Cygnus Support
|
||||
*
|
||||
* The authors hereby grant permission to use, copy, modify, distribute,
|
||||
* and license this software and its documentation for any purpose, provided
|
||||
* that existing copyright notices are retained in all copies and that this
|
||||
* notice is included verbatim in any distributions. No written agreement,
|
||||
* license, or royalty fee is required for any of the authorized uses.
|
||||
* Modifications to this software may be copyrighted by their authors
|
||||
* and need not follow the licensing terms described here, provided that
|
||||
* the new terms are clearly indicated on the first page of each file where
|
||||
* they apply.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "ppc-asm.h"
|
||||
|
||||
.file "start.s"
|
||||
.section ".got2","aw"
|
||||
.align 2
|
||||
|
||||
.LCTOC1 = .+32768
|
||||
|
||||
.extern FUNC_NAME(atexit)
|
||||
.globl FUNC_NAME(__atexit)
|
||||
.section ".sdata","aw"
|
||||
.align 2
|
||||
FUNC_NAME(__atexit): /* tell C's eabi-ctor's we have an atexit function */
|
||||
.long FUNC_NAME(atexit)@fixup /* and that it is to register __do_global_dtors */
|
||||
|
||||
.section ".fixup","aw"
|
||||
.align 2
|
||||
.long FUNC_NAME(__atexit)
|
||||
|
||||
.section ".got2","aw"
|
||||
.Ltable = .-.LCTOC1
|
||||
.long .LCTOC1 /* address we think .LCTOC1 is loaded at */
|
||||
|
||||
.Lbss_start = .-.LCTOC1
|
||||
.long __bss_start
|
||||
|
||||
.Lend = .-.LCTOC1
|
||||
.long _end
|
||||
|
||||
.Lstack = .-.LCTOC1 /* stack address if set by user */
|
||||
.long __stack
|
||||
|
||||
.text
|
||||
.Lptr:
|
||||
.long .LCTOC1-.Laddr
|
||||
|
||||
.globl _start
|
||||
.type _start,@function
|
||||
_start:
|
||||
lis r5,0
|
||||
mr r4,r5
|
||||
ori r4,r4,0x0000 /* 0x2030 */
|
||||
mtmsr r4
|
||||
|
||||
/* Add special purpose register initialization based upon the console driver
|
||||
* initialization of these registers XXXXX
|
||||
*/
|
||||
|
||||
bl .Laddr /* get current address */
|
||||
|
||||
.Laddr:
|
||||
mflr r4 /* real address of .Laddr */
|
||||
lwz r5,(.Lptr-.Laddr)(r4) /* linker generated address of .LCTOC1 */
|
||||
add r5,r5,r4 /* correct to real pointer */
|
||||
lwz r4,.Ltable(r5) /* get linker's idea of where .Laddr is */
|
||||
subf r4,r4,r5 /* calculate difference between where linked and current */
|
||||
|
||||
/* clear bss */
|
||||
lwz r6,.Lbss_start(r5) /* calculate beginning of the BSS */
|
||||
lwz r7,.Lend(r5) /* calculate end of the BSS */
|
||||
add r6,r6,r4 /* adjust pointers */
|
||||
add r7,r7,r4
|
||||
|
||||
cmplw 1,r6,r7
|
||||
bc 4,4,.Ldone
|
||||
|
||||
subf r8,r6,r7 /* number of bytes to zero */
|
||||
srwi r9,r8,2 /* number of words to zero */
|
||||
mtctr r9
|
||||
li r0,0 /* zero to clear memory */
|
||||
addi r6,r6,-4 /* adjust so we can use stwu */
|
||||
.Lloop:
|
||||
stwu r0,4(r6) /* zero bss */
|
||||
bdnz .Lloop
|
||||
|
||||
.Ldone:
|
||||
|
||||
lwz r0,.Lstack(r5) /* stack address or 0 */
|
||||
cmplwi 1,r0,0 /* equal to 0? */
|
||||
bc 12,6,.Lnostack /* use default stack if == 0 */
|
||||
mr sp,r0 /* use user defined stack */
|
||||
|
||||
.Lnostack:
|
||||
/* set up initial stack frame */
|
||||
addi sp,sp,-4 /* make sure we don't overwrite debug mem */
|
||||
lis r0,0
|
||||
stw r0,0(sp) /* clear back chain */
|
||||
stwu sp,-56(sp) /* push another stack frame */
|
||||
|
||||
lis r5,environ@ha
|
||||
la r5,environ@l(r5) /* environp */
|
||||
li r4, 0 /* argv */
|
||||
li r3, 0 /* argc */
|
||||
/* Let her rip */
|
||||
bl FUNC_NAME(boot_card)
|
||||
|
||||
/* return value from boot_card is argument to exit */
|
||||
/* bl FUNC_NAME(exit) */
|
||||
trap
|
||||
.Lstart:
|
||||
.size _start,.Lstart-_start
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* 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$
|
||||
*/
|
||||
|
||||
void bsp_cleanup( void )
|
||||
{
|
||||
#if 0
|
||||
asm volatile( "li 10,99" ); /* 0x63 */
|
||||
asm volatile( "sc" );
|
||||
#endif
|
||||
}
|
||||
@@ -1,138 +0,0 @@
|
||||
/* bspstart.c
|
||||
*
|
||||
* This set of routines starts the application. It includes application,
|
||||
* board, and monitor specific initialization and configuration.
|
||||
* The generic CPU dependent initialization has been performed
|
||||
* before any of these are invoked.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1997.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* $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;
|
||||
uint32_t bsp_isr_level;
|
||||
|
||||
/*
|
||||
* Use the shared implementations of the following routines
|
||||
*/
|
||||
|
||||
void bsp_postdriver_hook(void);
|
||||
void bsp_libc_init( void *, uint32_t, int );
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* bsp_pretasking_hook
|
||||
*
|
||||
* BSP pretasking hook. Called just before drivers are initialized.
|
||||
* Used to setup libc and install any BSP extensions.
|
||||
*/
|
||||
|
||||
void bsp_pretasking_hook(void)
|
||||
{
|
||||
extern int end;
|
||||
uint32_t heap_start;
|
||||
uint32_t heap_size;
|
||||
|
||||
heap_start = (uint32_t) &end;
|
||||
if (heap_start & (CPU_ALIGNMENT-1))
|
||||
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
|
||||
|
||||
heap_size = BSP_Configuration.work_space_start - (void *)&end;
|
||||
heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */
|
||||
|
||||
bsp_libc_init((void *) heap_start, heap_size, 0);
|
||||
|
||||
#ifdef RTEMS_DEBUG
|
||||
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
|
||||
#endif
|
||||
}
|
||||
|
||||
/* PAGE
|
||||
*
|
||||
* bsp_predriver_hook
|
||||
*
|
||||
* Initialization before drivers are setup.
|
||||
*/
|
||||
|
||||
void bsp_predriver_hook(void)
|
||||
{
|
||||
initialize_external_exception_vector();
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* bsp_start
|
||||
*
|
||||
* This routine does the bulk of the system initialization.
|
||||
*/
|
||||
|
||||
void bsp_start( void )
|
||||
{
|
||||
unsigned char *work_space_start;
|
||||
unsigned int msr_value = 0x2030;
|
||||
|
||||
/*
|
||||
* Set BSP to initial value. Note: This value is a guess
|
||||
* check how the real board comes up. This is critical to
|
||||
* getting the source to work with the debugger.
|
||||
*/
|
||||
|
||||
_CPU_MSR_SET( msr_value );
|
||||
|
||||
/*
|
||||
* 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".
|
||||
*/
|
||||
|
||||
work_space_start =
|
||||
(unsigned char *)&RAM_END - BSP_Configuration.work_space_size;
|
||||
|
||||
if ( work_space_start <= (unsigned char *)&end ) {
|
||||
DEBUG_puts( "bspstart: Not enough RAM!!!\n" );
|
||||
bsp_cleanup();
|
||||
}
|
||||
|
||||
BSP_Configuration.work_space_start = work_space_start;
|
||||
|
||||
/*
|
||||
* initialize the CPU table for this BSP
|
||||
*/
|
||||
|
||||
Cpu_table.exceptions_in_RAM = TRUE;
|
||||
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
|
||||
Cpu_table.predriver_hook = bsp_predriver_hook;
|
||||
Cpu_table.postdriver_hook = bsp_postdriver_hook;
|
||||
/* Cpu_table.clicks_per_usec = 66666667 / 4000000; */
|
||||
Cpu_table.clicks_per_usec = 66666667 / 4000000 / 2;
|
||||
|
||||
Cpu_table.do_zero_of_workspace = TRUE;
|
||||
Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
|
||||
|
||||
/*
|
||||
* Enable whatever caching is desired
|
||||
*/
|
||||
|
||||
#if ( DMV177_USE_INSTRUCTION_CACHE )
|
||||
rtems_cache_enable_instruction();
|
||||
#endif
|
||||
|
||||
#if ( PPC_USE_DATA_CACHE )
|
||||
rtems_cache_enable_data();
|
||||
#endif
|
||||
}
|
||||
@@ -1,226 +0,0 @@
|
||||
/* genpvec.c
|
||||
*
|
||||
* These routines handle the external exception. Multiple ISRs occur off
|
||||
* of this one interrupt. This method will allow multiple ISRs to be
|
||||
* called using the same IRQ index. However, removing the ISR routines is
|
||||
* presently not supported.
|
||||
*
|
||||
* The external exception vector numbers begin with DMV170_IRQ_FIRST.
|
||||
* DMV170_IRQ_FIRST is defined to be one greater than the last processor
|
||||
* interrupt.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may in
|
||||
* the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <rtems/chain.h>
|
||||
#include <assert.h>
|
||||
|
||||
#define NUM_LIRQ_HANDLERS 20
|
||||
#define NUM_LIRQ ( MAX_BOARD_IRQS - PPC_IRQ_LAST )
|
||||
|
||||
/*
|
||||
* Structure to for one of possible multiple interrupt handlers for
|
||||
* a given interrupt.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
Chain_Node Node;
|
||||
rtems_isr_entry handler; /* isr routine */
|
||||
rtems_vector_number vector; /* vector number */
|
||||
} EE_ISR_Type;
|
||||
|
||||
/*
|
||||
* Note: The following will not work if we add a method to remove
|
||||
* handlers at a later time.
|
||||
*/
|
||||
EE_ISR_Type ISR_Nodes [NUM_LIRQ_HANDLERS];
|
||||
uint16_t Nodes_Used;
|
||||
Chain_Control ISR_Array [NUM_LIRQ];
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* external_exception_ISR
|
||||
*
|
||||
* This interrupt service routine is called for an External Exception.
|
||||
*
|
||||
* Input parameters:
|
||||
* vector - vector number representing the external exception vector.
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values:
|
||||
*/
|
||||
|
||||
rtems_isr external_exception_ISR (
|
||||
rtems_vector_number vector /* IN */
|
||||
)
|
||||
{
|
||||
uint16_t index;
|
||||
rtems_boolean is_active=FALSE;
|
||||
uint32_t scv64_status;
|
||||
Chain_Node *node;
|
||||
EE_ISR_Type *ee_isr;
|
||||
|
||||
/*
|
||||
* Get all active interrupts.
|
||||
*/
|
||||
scv64_status = SCV64_Get_Interrupt();
|
||||
scv64_status &= SCV64_Get_Interrupt_Enable();
|
||||
|
||||
/*
|
||||
* Process any set interrupts.
|
||||
*/
|
||||
for (index = 0; index <= 5; index++) {
|
||||
switch(index) {
|
||||
case 0:
|
||||
is_active = SCV64_Is_IRQ0( scv64_status );
|
||||
break;
|
||||
case 1:
|
||||
is_active = SCV64_Is_IRQ1( scv64_status );
|
||||
break;
|
||||
case 2:
|
||||
is_active = SCV64_Is_IRQ2( scv64_status );
|
||||
break;
|
||||
case 3:
|
||||
is_active = SCV64_Is_IRQ3( scv64_status );
|
||||
break;
|
||||
case 4:
|
||||
is_active = SCV64_Is_IRQ4( scv64_status );
|
||||
break;
|
||||
case 5:
|
||||
is_active = SCV64_Is_IRQ5( scv64_status );
|
||||
break;
|
||||
}
|
||||
|
||||
if (is_active) {
|
||||
/*
|
||||
* Read vector.
|
||||
*/
|
||||
node = ISR_Array[ index ].first;
|
||||
while ( !_Chain_Is_tail( &ISR_Array[ index ], node ) ) {
|
||||
ee_isr = (EE_ISR_Type *) node;
|
||||
(*ee_isr->handler)( ee_isr->vector );
|
||||
node = node->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* initialize_external_exception_vector
|
||||
*
|
||||
* This routine initializes the external exception vector
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values: NONE
|
||||
*/
|
||||
|
||||
void initialize_external_exception_vector ()
|
||||
{
|
||||
int i;
|
||||
rtems_isr_entry previous_isr;
|
||||
rtems_status_code status;
|
||||
extern void SCV64_Initialize( void );
|
||||
|
||||
Nodes_Used = 0;
|
||||
|
||||
/*
|
||||
* Initialize the SCV64 chip
|
||||
*/
|
||||
SCV64_Initialize();
|
||||
|
||||
for (i=0; i <NUM_LIRQ; i++)
|
||||
Chain_Initialize_empty( &ISR_Array[i] );
|
||||
|
||||
/*
|
||||
* Install external_exception_ISR () as the handler for
|
||||
* the General Purpose Interrupt.
|
||||
*/
|
||||
|
||||
status = rtems_interrupt_catch( external_exception_ISR,
|
||||
PPC_IRQ_EXTERNAL , (rtems_isr_entry *) &previous_isr );
|
||||
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* set_EE_vector
|
||||
*
|
||||
* This routine installs one of multiple ISRs for the general purpose
|
||||
* inerrupt.
|
||||
*
|
||||
* Input parameters:
|
||||
* handler - handler to call at exception
|
||||
* vector - vector number associated with this handler.
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values:
|
||||
*/
|
||||
|
||||
rtems_isr_entry set_EE_vector(
|
||||
rtems_isr_entry handler, /* isr routine */
|
||||
rtems_vector_number vector /* vector number */
|
||||
)
|
||||
{
|
||||
uint16_t vec_idx = vector - DMV170_IRQ_FIRST;
|
||||
uint32_t index;
|
||||
|
||||
/*
|
||||
* Verify that all of the nodes have not been used.
|
||||
*/
|
||||
assert (Nodes_Used < NUM_LIRQ_HANDLERS);
|
||||
|
||||
/*
|
||||
* If we have already installed this handler for this vector, then
|
||||
* just reset it.
|
||||
*/
|
||||
|
||||
for ( index=0 ; index <= Nodes_Used ; index++ ) {
|
||||
if ( ISR_Nodes[index].vector == vector &&
|
||||
ISR_Nodes[index].handler == handler )
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Increment the number of nedes used and set the index for the node
|
||||
* array.
|
||||
*/
|
||||
|
||||
Nodes_Used++;
|
||||
index = Nodes_Used - 1;
|
||||
|
||||
/*
|
||||
* Write the values of the handler and the vector to this node.
|
||||
*/
|
||||
ISR_Nodes[index].handler = handler;
|
||||
ISR_Nodes[index].vector = vector;
|
||||
|
||||
/*
|
||||
* Connect this node to the chain at the location of the
|
||||
* vector index.
|
||||
*/
|
||||
Chain_Append( &ISR_Array[vec_idx], &ISR_Nodes[index].Node );
|
||||
|
||||
/*
|
||||
* Enable the LIRQ interrupt.
|
||||
*/
|
||||
SCV64_Generate_DUART_Interrupts();
|
||||
|
||||
/*
|
||||
* No interrupt service routine was removed so return 0
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
@@ -1,198 +0,0 @@
|
||||
OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
|
||||
"elf32-powerpc")
|
||||
OUTPUT_ARCH(powerpc)
|
||||
ENTRY(_start)
|
||||
|
||||
/*
|
||||
* Number of Decrementer countdowns per millisecond
|
||||
*
|
||||
* Calculated by: (66.67 Mhz * 1000) / 4 cycles per click
|
||||
*
|
||||
|
||||
PROVIDE(CPU_PPC_CLICKS_PER_MS = 16667);
|
||||
*/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
RAM : ORIGIN = 0x41000, LENGTH = 32M
|
||||
EPROM : ORIGIN = 0xFFF00000, LENGTH = 0x20000
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
/* Read-only sections, merged into text segment: */
|
||||
/* . = 0x40000 + SIZEOF_HEADERS; */
|
||||
/* . = 0x1000000;*/
|
||||
. = 0x41000;
|
||||
.interp : { *(.interp) }
|
||||
.hash : { *(.hash) }
|
||||
.dynsym : { *(.dynsym) }
|
||||
.dynstr : { *(.dynstr) }
|
||||
.rela.text : { *(.rela.text) }
|
||||
.rela.data : { *(.rela.data) }
|
||||
.rela.rodata : { *(.rela.rodata) }
|
||||
.rela.got : { *(.rela.got) }
|
||||
.rela.got1 : { *(.rela.got1) }
|
||||
.rela.got2 : { *(.rela.got2) }
|
||||
.rela.ctors : { *(.rela.ctors) }
|
||||
.rela.dtors : { *(.rela.dtors) }
|
||||
.rela.init : { *(.rela.init) }
|
||||
.rela.fini : { *(.rela.fini) }
|
||||
.rela.bss : { *(.rela.bss) }
|
||||
.rela.plt : { *(.rela.plt) }
|
||||
.rela.sdata : { *(.rela.sdata2) }
|
||||
.rela.sbss : { *(.rela.sbss2) }
|
||||
.rela.sdata2 : { *(.rela.sdata2) }
|
||||
.rela.sbss2 : { *(.rela.sbss2) }
|
||||
.plt : { *(.plt) }
|
||||
.text :
|
||||
{
|
||||
*(.text)
|
||||
*(.gnu.linkonce.t.*)
|
||||
*(.descriptors)
|
||||
|
||||
/*
|
||||
* 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)
|
||||
} >RAM
|
||||
.init : { _init = .; *(.init) } >RAM
|
||||
.fini : { _fini = .; *(.fini) } >RAM
|
||||
.eh_frame : { *.(eh_frame) } >RAM
|
||||
|
||||
.rodata : { *(.rodata*) *(.gnu.linkonce.r*) } >RAM
|
||||
.rodata1 : { *(.rodata1) } >RAM
|
||||
_etext = .;
|
||||
PROVIDE (etext = .);
|
||||
PROVIDE (__SDATA2_START__ = .);
|
||||
.sdata2 : { *(.sdata2) *(.gnu.linkonce.s2.*) } >RAM
|
||||
.sbss2 : { *(.sbss2) *(.gnu.linkonce.sb2.*) } >RAM
|
||||
PROVIDE (__SBSS2_END__ = .);
|
||||
/* Adjust the address for the data segment. We want to adjust up to
|
||||
the same address within the page on the next page up. It would
|
||||
be more correct to do this:
|
||||
. = ALIGN(0x40000) + (ALIGN(8) & (0x40000 - 1));
|
||||
The current expression does not correctly handle the case of a
|
||||
text segment ending precisely at the end of a page; it causes the
|
||||
data segment to skip a page. The above expression does not have
|
||||
this problem, but it will currently (2/95) cause BFD to allocate
|
||||
a single segment, combining both text and data, for this case.
|
||||
This will prevent the text segment from being shared among
|
||||
multiple executions of the program; I think that is more
|
||||
important than losing a page of the virtual address space (note
|
||||
that no actual memory is lost; the page which is skipped can not
|
||||
be referenced). */
|
||||
. = ALIGN(8) + 0x40000;
|
||||
PROVIDE (sdata = .);
|
||||
.data :
|
||||
{
|
||||
*(.data)
|
||||
*(.gnu.linkonce.d.*)
|
||||
CONSTRUCTORS
|
||||
} >RAM
|
||||
PROVIDE (__EXCEPT_START__ = .);
|
||||
.gcc_except_table : { *(.gcc_except_table) } >RAM
|
||||
PROVIDE (__EXCEPT_END__ = .);
|
||||
|
||||
.data1 : { *(.data1) } >RAM
|
||||
.got1 : { *(.got1) } >RAM
|
||||
.dynamic : { *(.dynamic) } >RAM
|
||||
/* Put .ctors and .dtors next to the .got2 section, so that the pointers
|
||||
get relocated with -mrelocatable. Also put in the .fixup pointers.
|
||||
The current compiler no longer needs this, but keep it around for 2.7.2 */
|
||||
PROVIDE (_GOT2_START_ = .);
|
||||
PROVIDE (__GOT2_START__ = .);
|
||||
.got2 : { *(.got2) } >RAM
|
||||
PROVIDE (_GOT2_END_ = .);
|
||||
PROVIDE (__GOT2_END__ = .);
|
||||
|
||||
PROVIDE (__CTOR_LIST__ = .);
|
||||
.ctors : { *(.ctors) } >RAM
|
||||
PROVIDE (__CTOR_END__ = .);
|
||||
|
||||
PROVIDE (__DTOR_LIST__ = .);
|
||||
.dtors : { *(.dtors) } >RAM
|
||||
PROVIDE (__DTOR_END__ = .);
|
||||
|
||||
PROVIDE (_FIXUP_START_ = .);
|
||||
PROVIDE (__FIXUP_START__ = .);
|
||||
.fixup : { *(.fixup) } >RAM
|
||||
PROVIDE (_FIXUP_END_ = .);
|
||||
PROVIDE (__FIXUP_END__ = .);
|
||||
|
||||
PROVIDE (_GOT2_END_ = .);
|
||||
PROVIDE (_GOT_START_ = .);
|
||||
s.got = .;
|
||||
.got : { *(.got) } >RAM
|
||||
.got.plt : { *(.got.plt) } >RAM
|
||||
PROVIDE (_GOT_END_ = .);
|
||||
PROVIDE (__GOT_END__ = .);
|
||||
|
||||
/* We want the small data sections together, so single-instruction offsets
|
||||
can access them all, and initialized data all before uninitialized, so
|
||||
we can shorten the on-disk segment size. */
|
||||
PROVIDE (__SDATA_START__ = .);
|
||||
.sdata : { *(.sdata) *(.gnu.linkonce.s.*) } >RAM
|
||||
_edata = .;
|
||||
PROVIDE (edata = .);
|
||||
|
||||
PROVIDE (RAM_END = 4M);
|
||||
.sbss :
|
||||
{
|
||||
PROVIDE (__sbss_start = .);
|
||||
*(.sbss)
|
||||
*(.scommon)
|
||||
PROVIDE (__sbss_end = .);
|
||||
} >RAM
|
||||
PROVIDE (__SBSS_END__ = .);
|
||||
.bss :
|
||||
{
|
||||
PROVIDE (__bss_start = .);
|
||||
*(.dynbss)
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
} >RAM
|
||||
. = ALIGN(8) + 0x8000;
|
||||
PROVIDE (__stack = .);
|
||||
_end = . ;
|
||||
PROVIDE (end = .);
|
||||
|
||||
/* These are needed for ELF backends which have not yet been
|
||||
converted to the new style linker. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
/* 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) }
|
||||
.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) }
|
||||
/* These must appear regardless of . */
|
||||
}
|
||||
@@ -1,56 +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) 1989-1997.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may in
|
||||
* the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
#include <bsp.h>
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* set_vector
|
||||
*
|
||||
* This routine installs an interrupt handler for vector.
|
||||
*/
|
||||
|
||||
rtems_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 */
|
||||
)
|
||||
{
|
||||
rtems_isr_entry previous_isr;
|
||||
rtems_status_code status;
|
||||
|
||||
/*
|
||||
* vectors greater than PPC603e_IRQ_LAST are handled by the General purpose
|
||||
* interupt handler.
|
||||
*/
|
||||
if ( vector > PPC_IRQ_LAST ) {
|
||||
set_EE_vector ( handler, vector );
|
||||
}
|
||||
else {
|
||||
status = rtems_interrupt_catch(
|
||||
handler, vector, (rtems_isr_entry *) &previous_isr );
|
||||
}
|
||||
return previous_isr;
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
/* vmeintr.c
|
||||
*
|
||||
* VMEbus support routines for the DMV170.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1997.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may in
|
||||
* the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
#include <bsp.h>
|
||||
#include <rtems/vmeintr.h>
|
||||
|
||||
/* PAGE
|
||||
*
|
||||
* VME_interrupt_Disable
|
||||
*
|
||||
* This routine disables vme interupts
|
||||
*
|
||||
* Input parameters:
|
||||
* mask - interupt mask
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values: NONE
|
||||
*/
|
||||
|
||||
void VME_interrupt_Disable (
|
||||
VME_interrupt_Mask mask /* IN */
|
||||
)
|
||||
{
|
||||
volatile uint8_t *VME_interrupt_enable;
|
||||
uint8_t value;
|
||||
|
||||
#if 0
|
||||
VME_interrupt_enable = ACC_VIE;
|
||||
#else
|
||||
VME_interrupt_enable = 0;
|
||||
#endif
|
||||
value = *VME_interrupt_enable;
|
||||
|
||||
value &= ~mask; /* turn off interrupts for all levels in mask */
|
||||
|
||||
*VME_interrupt_enable = value;
|
||||
}
|
||||
|
||||
/* PAGE
|
||||
*
|
||||
* VME_interrupt_Enable
|
||||
*
|
||||
* This routine enables vme interupts
|
||||
*
|
||||
* Input parameters:
|
||||
* mask - interupt mask
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values:
|
||||
*/
|
||||
|
||||
void VME_interrupt_Enable (
|
||||
VME_interrupt_Mask mask /* IN */
|
||||
)
|
||||
{
|
||||
volatile uint8_t *VME_interrupt_enable;
|
||||
uint8_t value;
|
||||
|
||||
#if 0
|
||||
VME_interrupt_enable = ACC_VIE;
|
||||
#else
|
||||
VME_interrupt_enable = 0;
|
||||
#endif
|
||||
value = *VME_interrupt_enable;
|
||||
|
||||
value |= mask; /* turn on interrupts for all levels in mask */
|
||||
|
||||
*VME_interrupt_enable = value;
|
||||
}
|
||||
@@ -1,130 +0,0 @@
|
||||
/* timer.c
|
||||
*
|
||||
* This file implements a benchmark timer using the General Purpose Timer on
|
||||
* the MEC.
|
||||
*
|
||||
* The license and distribution terms for this file are in
|
||||
* the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <bsp.h>
|
||||
|
||||
uint64_t Timer_driver_Start_time;
|
||||
|
||||
rtems_boolean Timer_driver_Find_average_overhead;
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* Timer_initialize
|
||||
*
|
||||
* This routine initializes the timer.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values: NONE
|
||||
*
|
||||
*/
|
||||
|
||||
void Timer_initialize()
|
||||
{
|
||||
/*
|
||||
* Timer runs long and accurate enough not to require an interrupt.
|
||||
*/
|
||||
|
||||
Timer_driver_Start_time = PPC_Get_timebase_register();
|
||||
|
||||
}
|
||||
|
||||
#define AVG_OVERHEAD 24 /* It typically takes 24 instructions */
|
||||
/* to start/stop the timer. */
|
||||
#define LEAST_VALID 1 /* Don't trust a value lower than this */
|
||||
|
||||
/* PAGE
|
||||
*
|
||||
* Read_timer
|
||||
*
|
||||
* This routine reads the timer.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values: timer in ms units
|
||||
*
|
||||
*/
|
||||
|
||||
int Read_timer()
|
||||
{
|
||||
uint64_t clicks;
|
||||
uint64_t total64;
|
||||
uint32_t total;
|
||||
|
||||
/* approximately CLOCK_SPEED clicks per microsecond */
|
||||
|
||||
clicks = PPC_Get_timebase_register();
|
||||
|
||||
assert( clicks > Timer_driver_Start_time );
|
||||
|
||||
total64 = clicks - Timer_driver_Start_time;
|
||||
|
||||
assert( total64 <= 0xffffffff ); /* fits into a uint32_t */
|
||||
|
||||
total = (uint32_t) total64;
|
||||
|
||||
if ( Timer_driver_Find_average_overhead == 1 )
|
||||
return total; /* in one microsecond units */
|
||||
|
||||
if ( total < LEAST_VALID )
|
||||
return 0; /* below timer resolution */
|
||||
|
||||
return total - AVG_OVERHEAD;
|
||||
}
|
||||
|
||||
/* PAGE
|
||||
*
|
||||
* Empty_function
|
||||
*
|
||||
* This routine is called during the idle loop.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters:
|
||||
* status code of successful
|
||||
*
|
||||
* Return values: NONE
|
||||
*
|
||||
*/
|
||||
|
||||
rtems_status_code Empty_function( void )
|
||||
{
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
/* PAGE
|
||||
*
|
||||
* Set_find_average_overhead
|
||||
*
|
||||
* This routine sets a global boolean to the value passed in.
|
||||
*
|
||||
* Input parameters:
|
||||
* find_flag - flag to indicate to find the average overhead.
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values: NONE
|
||||
*
|
||||
*/
|
||||
|
||||
void Set_find_average_overhead(
|
||||
rtems_boolean find_flag
|
||||
)
|
||||
{
|
||||
Timer_driver_Find_average_overhead = find_flag;
|
||||
}
|
||||
@@ -1,191 +0,0 @@
|
||||
#
|
||||
# Timing Test Suite Results for the DY-4 DMV177
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
Board: DY-4 DMV177
|
||||
CPU: PPC 603e
|
||||
Clock Speed: 100 Mhz
|
||||
Memory Configuration: 32 Mbyte DRAM
|
||||
Wait States: XXX
|
||||
|
||||
Times Reported in: cycles
|
||||
Timer Source: on-CPU General Purpose Count Down Timer
|
||||
|
||||
Column A: 4.0.0-lmco
|
||||
Column B: unused
|
||||
|
||||
# DESCRIPTION A B
|
||||
== ================================================================= ==== ====
|
||||
1 rtems_semaphore_create 571
|
||||
rtems_semaphore_delete 575
|
||||
rtems_semaphore_obtain: available 414
|
||||
rtems_semaphore_obtain: not available -- NO_WAIT 414
|
||||
rtems_semaphore_release: no waiting tasks 501
|
||||
|
||||
2 rtems_semaphore_obtain: not available -- caller blocks 1254
|
||||
|
||||
3 rtems_semaphore_release: task readied -- preempts caller 982
|
||||
|
||||
4 rtems_task_restart: blocked task -- preempts caller 1640
|
||||
rtems_task_restart: ready task -- preempts caller 1601
|
||||
rtems_semaphore_release: task readied -- returns to caller 636
|
||||
rtems_task_create 2301
|
||||
rtems_task_start 794
|
||||
rtems_task_restart: suspended task -- returns to caller 906
|
||||
rtems_task_delete: suspended task 1555
|
||||
rtems_task_restart: ready task -- returns to caller 928
|
||||
rtems_task_restart: blocked task -- returns to caller 1102
|
||||
rtems_task_delete: blocked task 1609
|
||||
|
||||
5 rtems_task_suspend: calling task 960
|
||||
rtems_task_resume: task readied -- preempts caller 803
|
||||
|
||||
6 rtems_task_restart: calling task 1137
|
||||
rtems_task_suspend: returns to caller 433
|
||||
rtems_task_resume: task readied -- returns to caller 451
|
||||
rtems_task_delete: ready task 1620
|
||||
|
||||
7 rtems_task_restart: suspended task -- preempts caller 1483
|
||||
|
||||
8 rtems_task_set_priority: obtain current priority 368
|
||||
rtems_task_set_priority: returns to caller 633
|
||||
rtems_task_mode: obtain current mode 184
|
||||
rtems_task_mode: no reschedule 213
|
||||
rtems_task_mode: reschedule -- returns to caller 247
|
||||
rtems_task_mode: reschedule -- preempts caller 919
|
||||
rtems_task_set_note 383
|
||||
rtems_task_get_note 382
|
||||
rtems_clock_set 792
|
||||
rtems_clock_get 78
|
||||
|
||||
9 rtems_message_queue_create 2270
|
||||
rtems_message_queue_send: no waiting tasks 923
|
||||
rtems_message_queue_urgent: no waiting tasks 919
|
||||
rtems_message_queue_receive: available 755
|
||||
rtems_message_queue_flush: no messages flushed 369
|
||||
rtems_message_queue_flush: messages flushed 431
|
||||
rtems_message_queue_delete 708
|
||||
|
||||
10 rtems_message_queue_receive: not available -- NO_WAIT 467
|
||||
rtems_message_queue_receive: not available -- caller blocks 1283
|
||||
|
||||
11 rtems_message_queue_send: task readied -- preempts caller 1322
|
||||
|
||||
12 rtems_message_queue_send: task readied -- returns to caller 955
|
||||
|
||||
13 rtems_message_queue_urgent: task readied -- preempts caller 1322
|
||||
|
||||
14 rtems_message_queue_urgent: task readied -- returns to caller 955
|
||||
|
||||
15 rtems_event_receive: obtain current events 43
|
||||
rtems_event_receive: not available -- NO_WAIT 331
|
||||
rtems_event_receive: not available -- caller blocks 1043
|
||||
rtems_event_send: no task readied 354
|
||||
rtems_event_receive: available 357
|
||||
rtems_event_send: task readied -- returns to caller 571
|
||||
|
||||
16 rtems_event_send: task readied -- preempts caller 946
|
||||
|
||||
17 rtems_task_set_priority: preempts caller 1211
|
||||
|
||||
18 rtems_task_delete: calling task 2117
|
||||
|
||||
19 rtems_signal_catch 267
|
||||
rtems_signal_send: returns to caller 408
|
||||
rtems_signal_send: signal to self 607
|
||||
exit ASR overhead: returns to calling task 464
|
||||
exit ASR overhead: returns to preempting task 752
|
||||
|
||||
20 rtems_partition_create 762
|
||||
rtems_region_create 614
|
||||
rtems_partition_get_buffer: available 394
|
||||
rtems_partition_get_buffer: not available 376
|
||||
rtems_partition_return_buffer 420
|
||||
rtems_partition_delete 426
|
||||
rtems_region_get_segment: available 515
|
||||
rtems_region_get_segment: not available -- NO_WAIT 472
|
||||
rtems_region_return_segment: no waiting tasks 544
|
||||
rtems_region_get_segment: not available -- caller blocks 1345
|
||||
rtems_region_return_segment: task readied -- preempts caller 1296
|
||||
rtems_region_return_segment: task readied -- returns to caller 935
|
||||
rtems_region_delete 425
|
||||
rtems_io_initialize 52
|
||||
rtems_io_open 42
|
||||
rtems_io_close 44
|
||||
rtems_io_read 42
|
||||
rtems_io_write 44
|
||||
rtems_io_control 42
|
||||
|
||||
21 rtems_task_ident 2900
|
||||
rtems_message_queue_ident 2828
|
||||
rtems_semaphore_ident 3243
|
||||
rtems_partition_ident 2828
|
||||
rtems_region_ident 2878
|
||||
rtems_port_ident 2828
|
||||
rtems_timer_ident 2828
|
||||
rtems_rate_monotonic_ident 2826
|
||||
|
||||
22 rtems_message_queue_broadcast: task readied -- returns to caller 1079
|
||||
rtems_message_queue_broadcast: no waiting tasks 589
|
||||
rtems_message_queue_broadcast: task readied -- preempts caller 1435
|
||||
|
||||
23 rtems_timer_create 357
|
||||
rtems_timer_fire_after: inactive 607
|
||||
rtems_timer_fire_after: active 646
|
||||
rtems_timer_cancel: active 378
|
||||
rtems_timer_cancel: inactive 339
|
||||
rtems_timer_reset: inactive 552
|
||||
rtems_timer_reset: active 591
|
||||
rtems_timer_fire_when: inactive 766
|
||||
rtems_timer_fire_when: active 764
|
||||
rtems_timer_delete: active 471
|
||||
rtems_timer_delete: inactive 432
|
||||
rtems_task_wake_when 1275
|
||||
|
||||
24 rtems_task_wake_after: yield -- returns to caller 245
|
||||
rtems_task_wake_after: yields -- preempts caller 851
|
||||
|
||||
25 rtems_clock_tick 214
|
||||
|
||||
26 _ISR_Disable 24
|
||||
_ISR_Flash 21
|
||||
_ISR_Enable 19
|
||||
_Thread_Disable_dispatch 27
|
||||
_Thread_Enable_dispatch 211
|
||||
_Thread_Set_state 177
|
||||
_Thread_Disptach (NO FP) 761
|
||||
context switch: no floating point contexts 585
|
||||
context switch: self 230
|
||||
context switch: to another task 236
|
||||
context switch: restore 1st FP task 730
|
||||
fp context switch: save idle, restore idle 478
|
||||
fp context switch: save idle, restore initialized 828
|
||||
fp context switch: save initialized, restore initialized 478
|
||||
_Thread_Resume 143
|
||||
_Thread_Unblock 143
|
||||
_Thread_Ready 147
|
||||
_Thread_Get 93
|
||||
_Semaphore_Get 77
|
||||
_Thread_Get: invalid id 20
|
||||
|
||||
27 interrupt entry overhead: returns to interrupted task 206
|
||||
interrupt exit overhead: returns to interrupted task 213
|
||||
interrupt entry overhead: returns to nested interrupt 201
|
||||
interrupt exit overhead: returns to nested interrupt 186
|
||||
interrupt entry overhead: returns to preempting task 202
|
||||
interrupt exit overhead: returns to preempting task 857
|
||||
|
||||
28 rtems_port_create 428
|
||||
rtems_port_external_to_internal 339
|
||||
rtems_port_internal_to_external 339
|
||||
rtems_port_delete 421
|
||||
|
||||
29 rtems_rate_monotonic_create 388
|
||||
rtems_rate_monotonic_period: initiate period -- returns to caller 556
|
||||
rtems_rate_monotonic_period: obtain status 377
|
||||
rtems_rate_monotonic_cancel 427
|
||||
rtems_rate_monotonic_delete: inactive 465
|
||||
rtems_rate_monotonic_delete: active 519
|
||||
rtems_rate_monotonic_period: conclude periods -- caller blocks 843
|
||||
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
* This file contains the RTC driver table for the DY-4 DMV177.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1997.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
|
||||
#include <libchip/rtc.h>
|
||||
#include <libchip/icm7170.h>
|
||||
|
||||
/*
|
||||
* Configuration specific probe routines
|
||||
*
|
||||
* NOTE: There are no DMV177 specific configuration routines. These
|
||||
* routines could be written to dynamically determine what type
|
||||
* of real-time clock is on this board. This would be useful for
|
||||
* a BSP supporting multiple board models.
|
||||
*/
|
||||
|
||||
/* NONE CURRENTLY PROVIDED */
|
||||
|
||||
/*
|
||||
* The following table configures the RTC drivers used in this BSP.
|
||||
*
|
||||
* The first entry which, when probed, is available, will be named /dev/rtc,
|
||||
* all others being given the name indicated.
|
||||
*/
|
||||
|
||||
boolean dmv177_icm7170_probe(int minor);
|
||||
|
||||
rtc_tbl RTC_Table[] = {
|
||||
{
|
||||
"/dev/rtc0", /* sDeviceName */
|
||||
RTC_ICM7170, /* deviceType */
|
||||
&icm7170_fns, /* pDeviceFns */
|
||||
dmv177_icm7170_probe, /* deviceProbe */
|
||||
(void *) ICM7170_AT_1_MHZ, /* pDeviceParams */
|
||||
DMV170_RTC_ADDRESS, /* ulCtrlPort1 */
|
||||
0, /* ulDataPort */
|
||||
icm7170_get_register_8, /* getRegister */
|
||||
icm7170_set_register_8, /* setRegister */
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* Declare some information used by the RTC driver
|
||||
*/
|
||||
|
||||
#define NUM_RTCS (sizeof(RTC_Table)/sizeof(rtc_tbl))
|
||||
|
||||
size_t RTC_Count = NUM_RTCS;
|
||||
|
||||
rtems_device_minor_number RTC_Minor;
|
||||
|
||||
/*
|
||||
* Hopefully, by checking the card resource register, this BSP
|
||||
* will be able to operate on the DMV171, DMV176, or DMV177.
|
||||
*/
|
||||
|
||||
boolean dmv177_icm7170_probe(int minor)
|
||||
{
|
||||
volatile uint16_t *card_resource_reg;
|
||||
uint16_t v;
|
||||
|
||||
card_resource_reg = (volatile uint16_t*) DMV170_CARD_RESORCE_REG;
|
||||
|
||||
v = *card_resource_reg & DMV170_RTC_INST_MASK;
|
||||
|
||||
if ( v == DMV170_RTC_INSTALLED )
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -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
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,166 +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 =
|
||||
|
||||
nodist_include_HEADERS += $(top_srcdir)/../../shared/include/coverhd.h
|
||||
include_HEADERS += ../../shared/tod.h
|
||||
include_HEADERS += include/nvram.h include/pci.h
|
||||
|
||||
EXTRA_DIST = start/start.S
|
||||
start.$(OBJEXT): start/start.S
|
||||
$(CPPASCOMPILE) -DASM -o $@ -c $<
|
||||
project_lib_DATA = start.$(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/i8042vga.c \
|
||||
console/i8042vga.h console/i8042.c console/i8042_p.h \
|
||||
console/ns16550cfg.c console/ns16550cfg.h console/z85c30cfg.c \
|
||||
console/z85c30cfg.h console/vga.c console/vga_p.h
|
||||
console_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
console_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
|
||||
noinst_PROGRAMS += pci.rel
|
||||
pci_rel_SOURCES = pci/pci.c
|
||||
pci_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
pci_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
|
||||
noinst_PROGRAMS += nvram.rel
|
||||
nvram_rel_SOURCES = nvram/nvram.c nvram/ds1385.h nvram/mk48t18.h \
|
||||
nvram/prepnvr.h nvram/stk11c68.h
|
||||
nvram_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
nvram_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
|
||||
noinst_PROGRAMS += startup.rel
|
||||
startup_rel_SOURCES = startup/bspstart.c startup/bspclean.c \
|
||||
../../shared/sbrk.c startup/setvec.c startup/spurious.c \
|
||||
startup/genpvec.c startup/swap.c ../../shared/main.c \
|
||||
../../shared/bootcard.c ../../shared/bsplibc.c ../../shared/bsppost.c \
|
||||
../../shared/gnatinstallhandler.c startup/bsptrap.S
|
||||
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_PROGRAMS += tod.rel
|
||||
tod_rel_SOURCES = tod/tod.c tod/cmos.h
|
||||
tod_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
tod_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
|
||||
noinst_PROGRAMS += universe.rel
|
||||
universe_rel_SOURCES = universe/universe.c
|
||||
universe_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
universe_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
|
||||
EXTRA_DIST += vectors/README vectors/align_h.S
|
||||
|
||||
noinst_PROGRAMS += vectors.rel
|
||||
vectors_rel_SOURCES = vectors/vectors.S
|
||||
vectors_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
vectors_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
|
||||
if HAS_NETWORKING
|
||||
network_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
|
||||
noinst_PROGRAMS += network.rel
|
||||
network_rel_SOURCES = network/amd79c970.c network/amd79c970.h
|
||||
network_rel_CPPFLAGS = $(AM_CPPFLAGS) $(network_CPPFLAGS)
|
||||
network_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
endif
|
||||
|
||||
noinst_LIBRARIES = libbsp.a
|
||||
libbsp_a_SOURCES =
|
||||
libbsp_a_LIBADD = startup.rel clock.rel console.rel timer.rel tod.rel \
|
||||
nvram.rel universe.rel pci.rel vectors.rel
|
||||
if HAS_NETWORKING
|
||||
libbsp_a_LIBADD += network.rel
|
||||
endif
|
||||
libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/@exceptions@/rtems-cpu.rel
|
||||
|
||||
all-local: $(PREINSTALL_FILES) $(TMPINSTALL_FILES)
|
||||
|
||||
EXTRA_DIST += STATUS
|
||||
|
||||
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: $(top_srcdir)/../../shared/include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
|
||||
|
||||
$(PROJECT_INCLUDE)/tod.h: ../../shared/tod.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tod.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/tod.h
|
||||
|
||||
$(PROJECT_INCLUDE)/nvram.h: include/nvram.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/nvram.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/nvram.h
|
||||
|
||||
$(PROJECT_INCLUDE)/pci.h: include/pci.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/pci.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/pci.h
|
||||
|
||||
$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT)
|
||||
TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(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)
|
||||
CLEANFILES += $(TMPINSTALL_FILES)
|
||||
|
||||
include $(top_srcdir)/../../../../automake/subdirs.am
|
||||
include $(top_srcdir)/../../../../automake/local.am
|
||||
@@ -1,48 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
BSP NAME: psim
|
||||
BOARD: PowerPC Simulator
|
||||
BUS: N/A
|
||||
CPU FAMILY: ppc
|
||||
CPU: PowerPC 603, 603e, 604
|
||||
COPROCESSORS: N/A
|
||||
MODE: 32 bit mode
|
||||
|
||||
DEBUG MONITOR: BUG mode (emulates Motorola debug monitor)
|
||||
|
||||
PERIPHERALS
|
||||
===========
|
||||
TIMERS: PPC internal Timebase register
|
||||
RESOLUTION: ???
|
||||
SERIAL PORTS: simulated via bug
|
||||
REAL-TIME CLOCK: PPC internal Decrementer register
|
||||
DMA: none
|
||||
VIDEO: none
|
||||
SCSI: none
|
||||
NETWORKING: none
|
||||
|
||||
DRIVER INFORMATION
|
||||
==================
|
||||
CLOCK DRIVER: PPC internal
|
||||
IOSUPP DRIVER: N/A
|
||||
SHMSUPP: N/A
|
||||
TIMER DRIVER: PPC internal
|
||||
TTY DRIVER: PPC internal
|
||||
|
||||
STDIO
|
||||
=====
|
||||
PORT: Console port 0
|
||||
ELECTRICAL: na
|
||||
BAUD: na
|
||||
BITS PER CHARACTER: na
|
||||
PARITY: na
|
||||
STOP BITS: na
|
||||
|
||||
Notes
|
||||
=====
|
||||
|
||||
Based on papyrus bsp which only really supports
|
||||
the PowerOpen ABI with an ELF assembler.
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
These are the notes made while updating this BSP to a more current
|
||||
RTEMS version.
|
||||
|
||||
+ device-tree is psim specific and was removed
|
||||
@@ -1,15 +0,0 @@
|
||||
%rename endfile old_endfile
|
||||
%rename startfile old_startfile
|
||||
%rename link old_link
|
||||
|
||||
*startfile:
|
||||
%{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems: ecrti%O%s \
|
||||
%{!qrtems_debug: start.o%s} \
|
||||
%{qrtems_debug: start_g.o%s}}}
|
||||
|
||||
*endfile:
|
||||
%{!qrtems: %(old_endfile)} %{qrtems: ecrtn%O%s}
|
||||
|
||||
*link:
|
||||
%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -e _start -u __vectors}
|
||||
|
||||
@@ -1,224 +0,0 @@
|
||||
/*
|
||||
* Clock Tick Device Driver
|
||||
*
|
||||
* This routine utilizes the Decrementer Register common to the PPC family.
|
||||
*
|
||||
* The tick frequency is directly programmed to the configured number of
|
||||
* microseconds per tick.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1997.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may in
|
||||
* the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <bsp.h>
|
||||
#include <rtems/libio.h>
|
||||
#include <assert.h>
|
||||
|
||||
/*
|
||||
* The Real Time Clock Counter Timer uses this trap type.
|
||||
*/
|
||||
|
||||
#define CLOCK_VECTOR PPC_IRQ_DECREMENTER
|
||||
|
||||
/*
|
||||
* Clock ticks since initialization
|
||||
*/
|
||||
|
||||
volatile uint32_t Clock_driver_ticks;
|
||||
|
||||
/*
|
||||
* This is the value programmed into the count down timer.
|
||||
*/
|
||||
|
||||
uint32_t Clock_Decrementer_value;
|
||||
|
||||
rtems_isr_entry Old_ticker;
|
||||
|
||||
void Clock_exit( void );
|
||||
|
||||
/*
|
||||
* These are set by clock driver during its init
|
||||
*/
|
||||
|
||||
rtems_device_major_number rtems_clock_major = ~0;
|
||||
rtems_device_minor_number rtems_clock_minor;
|
||||
|
||||
/*
|
||||
* Clock_isr
|
||||
*
|
||||
* This is the clock tick interrupt handler.
|
||||
*
|
||||
* Input parameters:
|
||||
* vector - vector number
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values: NONE
|
||||
*
|
||||
*/
|
||||
rtems_isr Clock_isr(
|
||||
rtems_vector_number vector,
|
||||
CPU_Interrupt_frame *frame
|
||||
)
|
||||
{
|
||||
/*
|
||||
* Set the decrementer.
|
||||
*/
|
||||
|
||||
PPC_Set_decrementer( Clock_Decrementer_value );
|
||||
|
||||
/*
|
||||
* The driver has seen another tick.
|
||||
*/
|
||||
|
||||
Clock_driver_ticks += 1;
|
||||
|
||||
/*
|
||||
* Real Time Clock counter/timer is set to automatically reload.
|
||||
*/
|
||||
|
||||
rtems_clock_tick();
|
||||
}
|
||||
|
||||
/*
|
||||
* Install_clock
|
||||
*
|
||||
* This routine actually performs the hardware initialization for the clock.
|
||||
*
|
||||
* Input parameters:
|
||||
* clock_isr - clock interrupt service routine entry point
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values: NONE
|
||||
*
|
||||
*/
|
||||
|
||||
extern int CLOCK_SPEED;
|
||||
|
||||
void Install_clock(
|
||||
rtems_isr_entry clock_isr
|
||||
)
|
||||
{
|
||||
Clock_driver_ticks = 0;
|
||||
|
||||
Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );
|
||||
|
||||
PPC_Set_decrementer( Clock_Decrementer_value );
|
||||
|
||||
atexit( Clock_exit );
|
||||
}
|
||||
|
||||
/*
|
||||
* Clock_exit
|
||||
*
|
||||
* This routine allows the clock driver to exit by masking the interrupt and
|
||||
* disabling the clock's counter.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values: NONE
|
||||
*
|
||||
*/
|
||||
|
||||
void Clock_exit( void )
|
||||
{
|
||||
/* nothing to do */;
|
||||
|
||||
/* do not restore old vector */
|
||||
}
|
||||
|
||||
/*
|
||||
* Clock_initialize
|
||||
*
|
||||
* This routine initializes the clock driver.
|
||||
*
|
||||
* Input parameters:
|
||||
* major - clock device major number
|
||||
* minor - clock device minor number
|
||||
* parg - pointer to optional device driver arguments
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values:
|
||||
* rtems_device_driver status code
|
||||
*/
|
||||
|
||||
rtems_device_driver Clock_initialize(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void *pargp
|
||||
)
|
||||
{
|
||||
Clock_Decrementer_value = (ulCpuBusClock/4000)*
|
||||
(BSP_Configuration.microseconds_per_tick/1000);
|
||||
|
||||
Install_clock((rtems_isr_entry)Clock_isr);
|
||||
|
||||
/*
|
||||
* make major/minor avail to others such as shared memory driver
|
||||
*/
|
||||
|
||||
rtems_clock_major = major;
|
||||
rtems_clock_minor = minor;
|
||||
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Clock_control
|
||||
*
|
||||
* This routine is the clock device driver control entry point.
|
||||
*
|
||||
* Input parameters:
|
||||
* major - clock device major number
|
||||
* minor - clock device minor number
|
||||
* parg - pointer to optional device driver arguments
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values:
|
||||
* rtems_device_driver status code
|
||||
*/
|
||||
|
||||
rtems_device_driver Clock_control(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void *pargp
|
||||
)
|
||||
{
|
||||
uint32_t isrlevel;
|
||||
rtems_libio_ioctl_args_t *args = pargp;
|
||||
|
||||
if (args == 0)
|
||||
goto done;
|
||||
|
||||
/*
|
||||
* This is hokey, but until we get a defined interface
|
||||
* to do this, it will just be this simple...
|
||||
*/
|
||||
|
||||
if (args->command == rtems_build_name('I', 'S', 'R', ' '))
|
||||
{
|
||||
Clock_isr( CLOCK_VECTOR, pargp );
|
||||
}
|
||||
else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
|
||||
{
|
||||
rtems_interrupt_disable( isrlevel );
|
||||
(void) set_vector( args->buffer, CLOCK_VECTOR, 1 );
|
||||
rtems_interrupt_enable( isrlevel );
|
||||
}
|
||||
|
||||
done:
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
## Process this file with autoconf to produce a configure script.
|
||||
##
|
||||
## $Id$
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT([rtems-c-src-lib-libbsp-powerpc-ppcn_60x],[_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
|
||||
|
||||
RTEMS_CHECK_NETWORKING
|
||||
|
||||
# Don't build the network directory
|
||||
# The problem is that the code there has not yet been converted to
|
||||
# bsd networking
|
||||
AM_CONDITIONAL(HAS_NETWORKING,false)
|
||||
# AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
|
||||
|
||||
RTEMS_BSPOPTS_SET([PPC_USE_SPRG],[*],[0])
|
||||
RTEMS_BSPOPTS_HELP([PPC_USE_SPRG],
|
||||
[If defined, then the PowerPC specific code in RTEMS will use some
|
||||
of the special purpose registers to slightly optimize interrupt
|
||||
response time. The use of these registers can conflict with
|
||||
other tools like debuggers.])
|
||||
|
||||
RTEMS_BSPOPTS_SET([PPC_USE_DATA_CACHE],[*],[1])
|
||||
RTEMS_BSPOPTS_HELP([PPC_USE_DATA_CACHE],
|
||||
[If defined, then the PowerPC specific code in RTEMS will use
|
||||
data cache instructions to optimize the context switch code.
|
||||
This code can conflict with debuggers or emulators. It is known
|
||||
to break the Corelis PowerPC emulator with at least some combinations
|
||||
of PowerPC 603e revisions and emulator versions.
|
||||
The BSP actually contains the call that enables this.])
|
||||
|
||||
# FIXME: This should be a 1 out of 2 (3??) selection.
|
||||
RTEMS_BSPOPTS_SET([PPCN_60X_USE_DINK],[*],[1])
|
||||
RTEMS_BSPOPTS_HELP([PPCN_60X_USE_DINK],
|
||||
[The Score603e board can be configured with 3 ROM monitors. Only two
|
||||
are appropriate for use with RTEMS. Set exactly one of these to "1"
|
||||
to indicate which ROM monitor is on the board you are using. Corresponds to
|
||||
PPCN_60X_USE_NONE])
|
||||
|
||||
RTEMS_BSPOPTS_SET([PPCN_60X_USE_NONE],[*],[0])
|
||||
RTEMS_BSPOPTS_HELP([PPCN_60X_USE_NONE],
|
||||
[The Score603e board can be configured with 3 ROM monitors. Only two
|
||||
are appropriate for use with RTEMS. Set exactly one of these to "1"
|
||||
to indicate which ROM monitor is on the board you are using. Corresponds to
|
||||
PPCN_60X_USE_DINK])
|
||||
|
||||
RTEMS_BSPOPTS_SET([PPC_VECTOR_FILE_BASE],[*],[0x0100])
|
||||
RTEMS_BSPOPTS_HELP([PPC_VECTOR_FILE_BASE],
|
||||
[This defines the base address of the exception table.
|
||||
NOTE: Vectors are actually at 0xFFF00000 but file starts at offset.])
|
||||
|
||||
# Explicitly list all Makefiles here
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
|
||||
RTEMS_PPC_EXCEPTIONS
|
||||
|
||||
AC_OUTPUT
|
||||
@@ -1,487 +0,0 @@
|
||||
/*
|
||||
* This file contains the TTY driver table for the PPCn_60x
|
||||
*
|
||||
* COPYRIGHT (c) 1998 by Radstone Technology
|
||||
*
|
||||
*
|
||||
* THIS FILE IS PROVIDED TO YOU, THE USER, "AS IS", WITHOUT WARRANTY OF ANY
|
||||
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK
|
||||
* AS TO THE QUALITY AND PERFORMANCE OF ALL CODE IN THIS FILE IS WITH YOU.
|
||||
*
|
||||
* You are hereby granted permission to use, copy, modify, and distribute
|
||||
* this file, provided that this notice, plus the above copyright notice
|
||||
* and disclaimer, appears in all copies. Radstone Technology will provide
|
||||
* no support for this code.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <libchip/serial.h>
|
||||
#include <libchip/mc68681.h>
|
||||
#include <libchip/z85c30.h>
|
||||
#include "i8042vga.h"
|
||||
|
||||
#include "ns16550cfg.h"
|
||||
#include "z85c30cfg.h"
|
||||
|
||||
#include <pci.h>
|
||||
|
||||
#define PMX1553_BUS 2
|
||||
#define PMX1553_SLOT 1
|
||||
|
||||
/*
|
||||
* Based on BSP configuration information decide whether to do polling IO
|
||||
* or interrupt driven IO.
|
||||
*/
|
||||
|
||||
#if (CONSOLE_USE_INTERRUPTS)
|
||||
#define NS16550_FUNCTIONS &ns16550_fns
|
||||
#define Z85C30_FUNCTIONS &z85c30_fns
|
||||
#else
|
||||
#define NS16550_FUNCTIONS &ns16550_fns_polled
|
||||
#define Z85C30_FUNCTIONS &z85c30_fns_polled
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Configuration specific probe routines
|
||||
*/
|
||||
static boolean config_PMX1553_probe(int minor);
|
||||
static boolean config_z85c30_probe(int minor);
|
||||
|
||||
/*
|
||||
* The following table configures the console drivers used in this BSP.
|
||||
*
|
||||
* The first entry which, when probed, is available, will be named /dev/console,
|
||||
* all others being given the name indicated.
|
||||
*
|
||||
* Each field is interpreted thus:
|
||||
*
|
||||
* sDeviceName This is the name of the device.
|
||||
* pDeviceFns This is a pointer to the set of driver routines to use.
|
||||
* pDeviceFlow This is a pointer to the set of flow control routines to
|
||||
* use. Serial device drivers will typically supply RTSCTS
|
||||
* and DTRCTS handshake routines for DCE to DCE communication,
|
||||
* however for DCE to DTE communication, no such routines
|
||||
* should be necessary as RTS will be driven automatically
|
||||
* when the transmitter is active.
|
||||
* ulMargin The high water mark in the input buffer is set to the buffer
|
||||
* size less ulMargin. Once this level is reached, the driver's
|
||||
* flow control routine used to stop the remote transmitter will
|
||||
* be called. This figure should be greater than or equal to
|
||||
* the number of stages of FIFO between the transmitter and
|
||||
* receiver.
|
||||
* ulHysteresis After the high water mark specified by ulMargin has been
|
||||
* reached, the driver's routine to re-start the remote
|
||||
* transmitter will be called once the level in the input
|
||||
* buffer has fallen by ulHysteresis bytes.
|
||||
* pDeviceParams This contains either device specific data or a pointer to a
|
||||
* device specific structure containing additional information
|
||||
* not provided in this table.
|
||||
* ulCtrlPort1 This is the primary control port number for the device. This
|
||||
* may be used to specify different instances of the same device
|
||||
* type.
|
||||
* ulCtrlPort2 This is the secondary control port number, of use when a given
|
||||
* device has more than one available channel.
|
||||
* ulDataPort This is the port number for the data port of the device
|
||||
* ulIntVector This encodes the interrupt vector of the device.
|
||||
*
|
||||
*/
|
||||
console_tbl Console_Port_Tbl[] = {
|
||||
{
|
||||
"/dev/vga", /* sDeviceName */
|
||||
SERIAL_CUSTOM, /* deviceType */
|
||||
&i8042vga_fns, /* pDeviceFns */
|
||||
NULL, /* deviceProbe */
|
||||
NULL, /* pDeviceFlow */
|
||||
0, /* ulMargin */
|
||||
0, /* ulHysteresis */
|
||||
(void *)0, /* pDeviceParams */
|
||||
I8042_CS, /* ulCtrlPort1 */
|
||||
0, /* ulCtrlPort2 */
|
||||
I8042_DATA, /* ulDataPort */
|
||||
Read_ns16550_register, /* getRegister */
|
||||
Write_ns16550_register, /* setRegister */
|
||||
NULL, /* getData */
|
||||
NULL, /* setData */
|
||||
0, /* ulClock */
|
||||
PPCN_60X_IRQ_KBD /* ulIntVector */
|
||||
},
|
||||
{
|
||||
"/dev/com1", /* sDeviceName */
|
||||
SERIAL_NS16550, /* deviceType */
|
||||
NS16550_FUNCTIONS, /* pDeviceFns */
|
||||
NULL, /* deviceProbe */
|
||||
&ns16550_flow_RTSCTS, /* pDeviceFlow */
|
||||
16, /* ulMargin */
|
||||
8, /* ulHysteresis */
|
||||
(void *)9600, /* baud rate */ /* pDeviceParams */
|
||||
NS16550_PORT_A, /* ulCtrlPort1 */
|
||||
0, /* ulCtrlPort2 */
|
||||
NS16550_PORT_A, /* ulDataPort */
|
||||
Read_ns16550_register, /* getRegister */
|
||||
Write_ns16550_register, /* setRegister */
|
||||
NULL, /* getData */
|
||||
NULL, /* setData */
|
||||
0, /* ulClock */
|
||||
PPCN_60X_IRQ_COM1 /* ulIntVector */
|
||||
},
|
||||
{
|
||||
"/dev/ser1", /* sDeviceName */
|
||||
SERIAL_NS16550, /* deviceType */
|
||||
NS16550_FUNCTIONS, /* pDeviceFns */
|
||||
config_PMX1553_probe, /* deviceProbe */
|
||||
&ns16550_flow_RTSCTS, /* pDeviceFlow */
|
||||
80, /* ulMargin */
|
||||
8, /* ulHysteresis */
|
||||
(void *)9600, /* baud rate */ /* pDeviceParams */
|
||||
PMX1553_BUS, /* PCI bus */ /* ulCtrlPort1 */
|
||||
PMX1553_SLOT, /* PCI slot */ /* ulCtrlPort2 */
|
||||
1, /* Channel 1-4 */ /* ulDataPort */
|
||||
NULL, /* getRegister */
|
||||
NULL, /* setRegister */
|
||||
NULL, /* getData */
|
||||
NULL, /* setData */
|
||||
0, /* ulClock */
|
||||
0 /* RS232 */ /* ulIntVector */
|
||||
},
|
||||
{
|
||||
"/dev/ser2", /* sDeviceName */
|
||||
SERIAL_NS16550, /* deviceType */
|
||||
NS16550_FUNCTIONS, /* pDeviceFns */
|
||||
config_PMX1553_probe, /* deviceProbe */
|
||||
&ns16550_flow_RTSCTS, /* pDeviceFlow */
|
||||
80, /* ulMargin */
|
||||
8, /* ulHysteresis */
|
||||
(void *)9600, /* baud rate */ /* pDeviceParams */
|
||||
PMX1553_BUS, /* PCI bus */ /* ulCtrlPort1 */
|
||||
PMX1553_SLOT, /* PCI slot */ /* ulCtrlPort2 */
|
||||
2, /* Channel 1-4 */ /* ulDataPort */
|
||||
Read_ns16550_register, /* getRegister */
|
||||
Write_ns16550_register, /* setRegister */
|
||||
NULL, /* getData */
|
||||
NULL, /* setData */
|
||||
0, /* ulClock */
|
||||
0 /* RS232 */ /* ulIntVector */
|
||||
},
|
||||
{
|
||||
"/dev/ser3", /* sDeviceName */
|
||||
SERIAL_NS16550, /* deviceType */
|
||||
NS16550_FUNCTIONS, /* pDeviceFns */
|
||||
config_PMX1553_probe, /* deviceProbe */
|
||||
&ns16550_flow_RTSCTS, /* pDeviceFlow */
|
||||
96, /* ulMargin */
|
||||
8, /* ulHysteresis */
|
||||
(void *)57600, /* baud rate */ /* pDeviceParams */
|
||||
PMX1553_BUS, /* PCI bus */ /* ulCtrlPort1 */
|
||||
PMX1553_SLOT, /* PCI slot */ /* ulCtrlPort2 */
|
||||
3, /* Channel 1-4 */ /* ulDataPort */
|
||||
Read_ns16550_register, /* getRegister */
|
||||
Write_ns16550_register, /* setRegister */
|
||||
NULL, /* getData */
|
||||
NULL, /* setData */
|
||||
0, /* ulClock */
|
||||
0 /* RS232 */ /* ulIntVector */
|
||||
},
|
||||
{
|
||||
"/dev/ser4", /* sDeviceName */
|
||||
SERIAL_NS16550, /* deviceType */
|
||||
NS16550_FUNCTIONS, /* pDeviceFns */
|
||||
config_PMX1553_probe, /* deviceProbe */
|
||||
&ns16550_flow_RTSCTS, /* pDeviceFlow */
|
||||
96, /* ulMargin */
|
||||
8, /* ulHysteresis */
|
||||
(void *)57600, /* baud rate */ /* pDeviceParams */
|
||||
PMX1553_BUS, /* PCI bus */ /* ulCtrlPort1 */
|
||||
PMX1553_SLOT, /* PCI slot */ /* ulCtrlPort2 */
|
||||
4, /* Channel 1-4 */ /* ulDataPort */
|
||||
Read_ns16550_register, /* getRegister */
|
||||
Write_ns16550_register, /* setRegister */
|
||||
NULL, /* getData */
|
||||
NULL, /* setData */
|
||||
0, /* ulClock */
|
||||
0 /* RS232 */ /* ulIntVector */
|
||||
},
|
||||
#if !PPCN_60X_USE_DINK
|
||||
{
|
||||
"/dev/com2", /* sDeviceName */
|
||||
SERIAL_NS16550, /* deviceType */
|
||||
NS16550_FUNCTIONS, /* pDeviceFns */
|
||||
NULL, /* deviceProbe */
|
||||
&ns16550_flow_RTSCTS, /* pDeviceFlow */
|
||||
16, /* ulMargin */
|
||||
8, /* ulHysteresis */
|
||||
(void *)9600, /* baud rate */ /* pDeviceParams */
|
||||
NS16550_PORT_B, /* ulCtrlPort1 */
|
||||
0, /* ulCtrlPort2 */
|
||||
NS16550_PORT_B, /* ulDataPort */
|
||||
Read_ns16550_register, /* getRegister */
|
||||
Write_ns16550_register, /* setRegister */
|
||||
NULL, /* getData */
|
||||
NULL, /* setData */
|
||||
0, /* ulClock */
|
||||
PPCN_60X_IRQ_COM2 /* ulIntVector */
|
||||
},
|
||||
#endif
|
||||
{
|
||||
"/dev/com3", /* sDeviceName */
|
||||
SERIAL_Z85C30, /* deviceType */
|
||||
Z85C30_FUNCTIONS, /* pDeviceFns */
|
||||
config_z85c30_probe, /* deviceProbe */
|
||||
&z85c30_flow_RTSCTS, /* pDeviceFlow */
|
||||
16, /* ulMargin */
|
||||
8, /* ulHysteresis */
|
||||
(void *)9600, /* baud rate */ /* pDeviceParams */
|
||||
Z85C30_CTRL_A, /* ulCtrlPort1 */
|
||||
Z85C30_CTRL_A, /* ulCtrlPort2 */
|
||||
Z85C30_DATA_A, /* ulDataPort */
|
||||
Read_85c30_register, /* getRegister */
|
||||
Write_85c30_register, /* setRegister */
|
||||
Read_85c30_data, /* getData */
|
||||
Write_85c30_data, /* setData */
|
||||
0, /* ulClock */
|
||||
PPCN_60X_IRQ_COM3_4 /* ulIntVector */
|
||||
},
|
||||
{
|
||||
"/dev/com4", /* sDeviceName */
|
||||
SERIAL_Z85C30, /* deviceType */
|
||||
Z85C30_FUNCTIONS, /* pDeviceFns */
|
||||
config_z85c30_probe, /* deviceProbe */
|
||||
&z85c30_flow_RTSCTS, /* pDeviceFlow */
|
||||
16, /* ulMargin */
|
||||
8, /* ulHysteresis */
|
||||
(void *)9600, /* baud rate */ /* pDeviceParams */
|
||||
Z85C30_CTRL_B, /* ulCtrlPort1 */
|
||||
Z85C30_CTRL_A, /* ulCtrlPort2 */
|
||||
Z85C30_DATA_B, /* ulDataPort */
|
||||
Read_85c30_register, /* getRegister */
|
||||
Write_85c30_register, /* setRegister */
|
||||
Read_85c30_data, /* getData */
|
||||
Write_85c30_data, /* setData */
|
||||
0, /* ulClock */
|
||||
PPCN_60X_IRQ_COM3_4 /* ulIntVector */
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* Define serial port write registers structure.
|
||||
*/
|
||||
typedef volatile struct _SP_WRITE_REGISTERS {
|
||||
unsigned char TransmitBuffer;
|
||||
unsigned char InterruptEnable;
|
||||
unsigned char FifoControl;
|
||||
unsigned char LineControl;
|
||||
unsigned char ModemControl;
|
||||
unsigned char Reserved1;
|
||||
unsigned char ModemStatus;
|
||||
unsigned char ScratchPad;
|
||||
} SP_WRITE_REGISTERS, *PSP_WRITE_REGISTERS;
|
||||
|
||||
static boolean config_PMX1553_probe(int minor)
|
||||
{
|
||||
uint8_t ucBusNumber, ucSlotNumber, ucChannel;
|
||||
uint8_t ucIntLine;
|
||||
uint32_t ulPortBase, ulMemBase, ulDeviceID, ulTemp;
|
||||
uint8_t *pucSIO_cir, *pucUart_int_sr, *pucUartDevIntReg;
|
||||
PSP_WRITE_REGISTERS pNS16550Write;
|
||||
|
||||
/*
|
||||
* Extract PCI bus/slot and channel number
|
||||
*/
|
||||
ucBusNumber=Console_Port_Tbl[minor].ulCtrlPort1;
|
||||
ucSlotNumber=Console_Port_Tbl[minor].ulCtrlPort2;
|
||||
ucChannel=Console_Port_Tbl[minor].ulDataPort;
|
||||
|
||||
PCIConfigRead32(ucBusNumber,
|
||||
ucSlotNumber,
|
||||
0,
|
||||
PCI_CONFIG_VENDOR_LOW,
|
||||
&ulDeviceID);
|
||||
|
||||
if(ulDeviceID!=0x000111b5)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* At this point we know we have a PMC1553 or PMX1553 card
|
||||
*
|
||||
* Check for PMX1553 uart legacy IO ports
|
||||
*/
|
||||
PCIConfigRead32(ucBusNumber,
|
||||
ucSlotNumber,
|
||||
0,
|
||||
PCI_CONFIG_BAR_3,
|
||||
&ulPortBase);
|
||||
|
||||
if(ulPortBase==0)
|
||||
{
|
||||
/*
|
||||
* This is either a PMC1553 or we can't see the uart
|
||||
* registers
|
||||
*/
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
PCIConfigRead32(ucBusNumber,
|
||||
ucSlotNumber,
|
||||
0,
|
||||
PCI_CONFIG_BAR_2,
|
||||
&ulMemBase);
|
||||
|
||||
pucUartDevIntReg=(uint8_t*)(PCI_MEM_BASE+ulMemBase);
|
||||
pucUart_int_sr=(uint8_t*)(PCI_MEM_BASE+ulMemBase+0x10);
|
||||
pucSIO_cir=(uint8_t*)(PCI_MEM_BASE+ulMemBase+0x18);
|
||||
|
||||
/*
|
||||
* Use ulIntVector field to select RS232/RS422
|
||||
*/
|
||||
if(Console_Port_Tbl[minor].ulIntVector==0)
|
||||
{
|
||||
/*
|
||||
* Select RS232 mode
|
||||
*/
|
||||
*pucSIO_cir&=~(1<<(ucChannel-1));
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Select RS422 mode
|
||||
*/
|
||||
*pucSIO_cir|=1<<(ucChannel-1);
|
||||
}
|
||||
EIEIO;
|
||||
/*
|
||||
* Bring device out of reset
|
||||
*/
|
||||
*pucSIO_cir&=0xbf;
|
||||
EIEIO;
|
||||
/*
|
||||
* Enable all channels as active
|
||||
*/
|
||||
*pucSIO_cir|=0x10;
|
||||
EIEIO;
|
||||
*pucSIO_cir&=0xdf;
|
||||
|
||||
PCIConfigRead8(ucBusNumber,
|
||||
ucSlotNumber,
|
||||
0,
|
||||
PCI_CONFIG_INTERRUPTLINE,
|
||||
&ucIntLine);
|
||||
|
||||
ulPortBase&=~PCI_ADDRESS_IO_SPACE;
|
||||
|
||||
ulPortBase+=8*(ucChannel-1);
|
||||
|
||||
Console_Port_Tbl[minor].ulCtrlPort1=
|
||||
Console_Port_Tbl[minor].ulDataPort=ulPortBase;
|
||||
if(Console_Port_Tbl[minor].pDeviceFns!=&ns16550_fns_polled)
|
||||
{
|
||||
Console_Port_Tbl[minor].ulIntVector=PPCN_60X_IRQ_PCI(ucIntLine);
|
||||
|
||||
/*
|
||||
* Enable interrupt
|
||||
*/
|
||||
*pucUart_int_sr=(~*pucUart_int_sr)&(0x08<<ucChannel);
|
||||
|
||||
/*
|
||||
* Enable interrupt to PCI
|
||||
*/
|
||||
*pucUartDevIntReg=(~*pucUartDevIntReg)&0x80;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Disable interrupt
|
||||
*/
|
||||
*pucUart_int_sr&=(0x08<<ucChannel);
|
||||
}
|
||||
|
||||
/*
|
||||
* Enable Auto CTS to facilitate flow control
|
||||
*/
|
||||
pNS16550Write=(PSP_WRITE_REGISTERS)Console_Port_Tbl[minor].ulCtrlPort1;
|
||||
/*
|
||||
* Enable special register set and unlock Enhanced Feature Register
|
||||
*/
|
||||
outport_byte(&pNS16550Write->LineControl, 0xbf);
|
||||
/*
|
||||
* Unlock enhanced function bits
|
||||
*/
|
||||
outport_byte(&pNS16550Write->FifoControl, 0x10);
|
||||
/*
|
||||
* Disable special register set and lock Enhanced Feature Register
|
||||
*/
|
||||
outport_byte(&pNS16550Write->LineControl, 0);
|
||||
/*
|
||||
* Select div 1
|
||||
*/
|
||||
outport_byte(&pNS16550Write->ModemControl, 0x00);
|
||||
/*
|
||||
* Enable special register set and unlock Enhanced Feature Register
|
||||
*/
|
||||
outport_byte(&pNS16550Write->LineControl, 0xbf);
|
||||
/*
|
||||
* Lock enhanced function bits and enable auto CTS
|
||||
*/
|
||||
outport_byte(&pNS16550Write->FifoControl, 0x80);
|
||||
/*
|
||||
* Disable special register set and lock Enhanced Feature Register
|
||||
*/
|
||||
outport_byte(&pNS16550Write->LineControl, 0);
|
||||
|
||||
/*
|
||||
* The PMX1553 currently uses a 16 MHz clock rather than the
|
||||
* 7.3728 MHz clock described in the ST16C654 data sheet. When
|
||||
* available, 22.1184 MHz will be used allowing rates up to
|
||||
* 1382400 baud (RS422 only).
|
||||
*/
|
||||
|
||||
ulTemp = (uint32_t)Console_Port_Tbl[minor].pDeviceParams;
|
||||
#if 1
|
||||
/*
|
||||
* Scale requested baud rate for 16 MHz clock
|
||||
*/
|
||||
ulTemp *= 7373;
|
||||
ulTemp /= 16000;
|
||||
#else
|
||||
/*
|
||||
* Scale requested baud rate for 22.1184 MHz clock
|
||||
*/
|
||||
ulTemp /= 3;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* In order to maintain maximum data rate accuracy, we will
|
||||
* apply a div 4 here rather than in hardware (using MCR bit 7).
|
||||
*/
|
||||
ulTemp /= 4;
|
||||
|
||||
Console_Port_Tbl[minor].pDeviceParams = (void *)ulTemp;
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
static boolean config_z85c30_probe(int minor)
|
||||
{
|
||||
/*
|
||||
* PPC1 and PPC1a do not have this device
|
||||
*/
|
||||
if((ucSystemType==SYS_TYPE_PPC1) ||
|
||||
(ucSystemType==SYS_TYPE_PPC1a))
|
||||
{
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* All other boards supported by this BSP have the z85c30 device
|
||||
*/
|
||||
|
||||
/*
|
||||
* Ensure that CIO port B is configured for
|
||||
* default driver enable
|
||||
*/
|
||||
outport_byte(0x861, 0x33);
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
@@ -1,348 +0,0 @@
|
||||
/*
|
||||
* This file contains the TTY driver for the PPCn_60x
|
||||
*
|
||||
* This driver uses the termios pseudo driver.
|
||||
*
|
||||
* COPYRIGHT (c) 1998 by Radstone Technology
|
||||
*
|
||||
*
|
||||
* THIS FILE IS PROVIDED TO YOU, THE USER, "AS IS", WITHOUT WARRANTY OF ANY
|
||||
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK
|
||||
* AS TO THE QUALITY AND PERFORMANCE OF ALL CODE IN THIS FILE IS WITH YOU.
|
||||
*
|
||||
* You are hereby granted permission to use, copy, modify, and distribute
|
||||
* this file, provided that this notice, plus the above copyright notice
|
||||
* and disclaimer, appears in all copies. Radstone Technology will provide
|
||||
* no support for this code.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1997.
|
||||
* 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 <bsp.h>
|
||||
#include <rtems/libio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <termios.h>
|
||||
|
||||
#include "console.h"
|
||||
|
||||
/*
|
||||
* Load configuration table
|
||||
*/
|
||||
#include "config.c"
|
||||
|
||||
#define NUM_CONSOLE_PORTS (sizeof(Console_Port_Tbl)/sizeof(console_tbl))
|
||||
|
||||
console_data Console_Port_Data[NUM_CONSOLE_PORTS];
|
||||
unsigned long Console_Port_Count;
|
||||
rtems_device_minor_number Console_Port_Minor;
|
||||
|
||||
/* PAGE
|
||||
*
|
||||
* console_open
|
||||
*
|
||||
* open a port as a termios console.
|
||||
*
|
||||
*/
|
||||
rtems_device_driver console_open(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void * arg
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
rtems_libio_open_close_args_t *args = arg;
|
||||
rtems_libio_ioctl_args_t IoctlArgs;
|
||||
struct termios Termios;
|
||||
rtems_termios_callbacks Callbacks;
|
||||
console_fns *c;
|
||||
|
||||
/*
|
||||
* Verify the port number is valid.
|
||||
*/
|
||||
if(minor>Console_Port_Count)
|
||||
{
|
||||
return RTEMS_INVALID_NUMBER;
|
||||
}
|
||||
|
||||
/*
|
||||
* open the port as a termios console driver.
|
||||
*/
|
||||
c = Console_Port_Tbl[minor].pDeviceFns;
|
||||
Callbacks.firstOpen = c->deviceFirstOpen;
|
||||
Callbacks.lastClose = c->deviceLastClose;
|
||||
Callbacks.pollRead = c->deviceRead;
|
||||
Callbacks.write = c->deviceWrite;
|
||||
Callbacks.setAttributes = c->deviceSetAttributes;
|
||||
Callbacks.stopRemoteTx =
|
||||
Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx;
|
||||
Callbacks.startRemoteTx =
|
||||
Console_Port_Tbl[minor].pDeviceFlow->deviceStartRemoteTx;
|
||||
Callbacks.outputUsesInterrupts = c->deviceOutputUsesInterrupts;
|
||||
status = rtems_termios_open ( major, minor, arg, &Callbacks);
|
||||
Console_Port_Data[minor].termios_data = args->iop->data1;
|
||||
|
||||
/*
|
||||
* Patch in flow control routines
|
||||
*/
|
||||
/* XXX */
|
||||
#if 0
|
||||
if((status==RTEMS_SUCCESSFUL) &&
|
||||
(Console_Port_Tbl[minor].pDeviceFlow))
|
||||
{
|
||||
status=rtems_termios_flow_control(
|
||||
major, minor, arg,
|
||||
Console_Port_Tbl[minor].pDeviceFlow->
|
||||
deviceStartRemoteTx,
|
||||
Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx,
|
||||
Console_Port_Tbl[minor].ulMargin,
|
||||
Console_Port_Tbl[minor].ulHysteresis);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(minor!=Console_Port_Minor)
|
||||
{
|
||||
/*
|
||||
* If this is not the console we do not want ECHO and
|
||||
* so forth
|
||||
*/
|
||||
IoctlArgs.iop=args->iop;
|
||||
IoctlArgs.command=RTEMS_IO_GET_ATTRIBUTES;
|
||||
IoctlArgs.buffer=&Termios;
|
||||
rtems_termios_ioctl(&IoctlArgs);
|
||||
Termios.c_lflag=ICANON;
|
||||
IoctlArgs.command=RTEMS_IO_SET_ATTRIBUTES;
|
||||
rtems_termios_ioctl(&IoctlArgs);
|
||||
}
|
||||
|
||||
if((args->iop->flags&LIBIO_FLAGS_READ) &&
|
||||
Console_Port_Tbl[minor].pDeviceFlow &&
|
||||
Console_Port_Tbl[minor].pDeviceFlow->deviceStartRemoteTx)
|
||||
{
|
||||
Console_Port_Tbl[minor].pDeviceFlow->deviceStartRemoteTx(minor);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
rtems_device_driver console_close(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void * arg
|
||||
)
|
||||
{
|
||||
rtems_libio_open_close_args_t *args = arg;
|
||||
|
||||
if((args->iop->flags&LIBIO_FLAGS_READ) &&
|
||||
Console_Port_Tbl[minor].pDeviceFlow &&
|
||||
Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx)
|
||||
{
|
||||
Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx(minor);
|
||||
}
|
||||
|
||||
return rtems_termios_close (arg);
|
||||
}
|
||||
|
||||
rtems_device_driver console_read(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void * arg
|
||||
)
|
||||
{
|
||||
return rtems_termios_read (arg);
|
||||
}
|
||||
|
||||
rtems_device_driver console_write(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void * arg
|
||||
)
|
||||
{
|
||||
return rtems_termios_write (arg);
|
||||
}
|
||||
|
||||
rtems_device_driver console_control(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void * arg
|
||||
)
|
||||
{
|
||||
return rtems_termios_ioctl (arg);
|
||||
}
|
||||
|
||||
/* PAGE
|
||||
*
|
||||
* console_initialize
|
||||
*
|
||||
* Routine called to initialize the console device driver.
|
||||
*/
|
||||
rtems_device_driver console_initialize(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void *arg
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
/*
|
||||
* initialize the termio interface.
|
||||
*/
|
||||
rtems_termios_initialize();
|
||||
|
||||
Console_Port_Count=NUM_CONSOLE_PORTS;
|
||||
|
||||
for(minor=0;
|
||||
minor<Console_Port_Count;
|
||||
minor++)
|
||||
{
|
||||
/*
|
||||
* First perform the configuration dependant probe, then the
|
||||
* device dependant probe
|
||||
*/
|
||||
if((!Console_Port_Tbl[minor].deviceProbe ||
|
||||
Console_Port_Tbl[minor].deviceProbe(minor)) &&
|
||||
Console_Port_Tbl[minor].pDeviceFns->deviceProbe(minor))
|
||||
{
|
||||
/*
|
||||
* Use this device for the console
|
||||
*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(minor==Console_Port_Count)
|
||||
{
|
||||
/*
|
||||
* Failed to find a working device
|
||||
*/
|
||||
rtems_fatal_error_occurred(RTEMS_IO_ERROR);
|
||||
}
|
||||
|
||||
Console_Port_Minor=minor;
|
||||
|
||||
/*
|
||||
* Register Device Names
|
||||
*/
|
||||
status = rtems_io_register_name("/dev/console",
|
||||
major,
|
||||
Console_Port_Minor );
|
||||
if (status != RTEMS_SUCCESSFUL)
|
||||
{
|
||||
rtems_fatal_error_occurred(status);
|
||||
}
|
||||
Console_Port_Tbl[minor].pDeviceFns->deviceInitialize(
|
||||
Console_Port_Minor);
|
||||
|
||||
for(minor++;minor<Console_Port_Count;minor++)
|
||||
{
|
||||
/*
|
||||
* First perform the configuration dependant probe, then the
|
||||
* device dependant probe
|
||||
*/
|
||||
if((!Console_Port_Tbl[minor].deviceProbe ||
|
||||
Console_Port_Tbl[minor].deviceProbe(minor)) &&
|
||||
Console_Port_Tbl[minor].pDeviceFns->deviceProbe(minor))
|
||||
{
|
||||
status = rtems_io_register_name(
|
||||
Console_Port_Tbl[minor].sDeviceName,
|
||||
major,
|
||||
minor );
|
||||
if (status != RTEMS_SUCCESSFUL)
|
||||
{
|
||||
rtems_fatal_error_occurred(status);
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize the hardware device.
|
||||
*/
|
||||
Console_Port_Tbl[minor].pDeviceFns->deviceInitialize(
|
||||
minor);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
/* PAGE
|
||||
*
|
||||
* DEBUG_puts
|
||||
*
|
||||
* This should be safe in the event of an error. It attempts to ensure
|
||||
* that no TX empty interrupts occur while it is doing polled IO. Then
|
||||
* it restores the state of that external interrupt.
|
||||
*
|
||||
* Input parameters:
|
||||
* string - pointer to debug output string
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values: NONE
|
||||
*/
|
||||
|
||||
void DEBUG_puts(
|
||||
char *string
|
||||
)
|
||||
{
|
||||
char *s;
|
||||
uint32_t Irql;
|
||||
|
||||
rtems_interrupt_disable(Irql);
|
||||
|
||||
for ( s = string ; *s ; s++ )
|
||||
{
|
||||
Console_Port_Tbl[Console_Port_Minor].pDeviceFns->
|
||||
deviceWritePolled(Console_Port_Minor, *s);
|
||||
}
|
||||
|
||||
rtems_interrupt_enable(Irql);
|
||||
}
|
||||
|
||||
/* PAGE
|
||||
*
|
||||
* DEBUG_puth
|
||||
*
|
||||
* This should be safe in the event of an error. It attempts to ensure
|
||||
* that no TX empty interrupts occur while it is doing polled IO. Then
|
||||
* it restores the state of that external interrupt.
|
||||
*
|
||||
* Input parameters:
|
||||
* ulHexNum - value to display
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values: NONE
|
||||
*/
|
||||
void
|
||||
DEBUG_puth(
|
||||
uint32_t ulHexNum
|
||||
)
|
||||
{
|
||||
unsigned long i,d;
|
||||
uint32_t Irql;
|
||||
|
||||
rtems_interrupt_disable(Irql);
|
||||
|
||||
Console_Port_Tbl[Console_Port_Minor].pDeviceFns->
|
||||
deviceWritePolled(Console_Port_Minor, '0');
|
||||
Console_Port_Tbl[Console_Port_Minor].pDeviceFns->
|
||||
deviceWritePolled(Console_Port_Minor, 'x');
|
||||
|
||||
for(i=32;i;)
|
||||
{
|
||||
i-=4;
|
||||
d=(ulHexNum>>i)&0xf;
|
||||
Console_Port_Tbl[Console_Port_Minor].pDeviceFns->
|
||||
deviceWritePolled(Console_Port_Minor,
|
||||
(d<=9) ? d+'0' : d+'a'-0xa);
|
||||
}
|
||||
|
||||
rtems_interrupt_enable(Irql);
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This file contains the TTY driver table definition for the PPCn_60x
|
||||
*
|
||||
* This driver uses the termios pseudo driver.
|
||||
*
|
||||
* COPYRIGHT (c) 1998 by Radstone Technology
|
||||
*
|
||||
*
|
||||
* THIS FILE IS PROVIDED TO YOU, THE USER, "AS IS", WITHOUT WARRANTY OF ANY
|
||||
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK
|
||||
* AS TO THE QUALITY AND PERFORMANCE OF ALL CODE IN THIS FILE IS WITH YOU.
|
||||
*
|
||||
* You are hereby granted permission to use, copy, modify, and distribute
|
||||
* this file, provided that this notice, plus the above copyright notice
|
||||
* and disclaimer, appears in all copies. Radstone Technology will provide
|
||||
* no support for this code.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <rtems/ringbuf.h>
|
||||
#include <libchip/serial.h>
|
||||
#include <libchip/ns16550.h>
|
||||
#include <libchip/z85c30.h>
|
||||
|
||||
extern console_tbl Console_Port_Tbl[];
|
||||
extern console_data Console_Port_Data[];
|
||||
extern unsigned long Console_Port_Count;
|
||||
@@ -1,112 +0,0 @@
|
||||
/*
|
||||
* This file contains the debug IO support.
|
||||
*
|
||||
* COPYRIGHT (c) 1998 by Radstone Technology
|
||||
*
|
||||
*
|
||||
* THIS FILE IS PROVIDED TO YOU, THE USER, "AS IS", WITHOUT WARRANTY OF ANY
|
||||
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK
|
||||
* AS TO THE QUALITY AND PERFORMANCE OF ALL CODE IN THIS FILE IS WITH YOU.
|
||||
*
|
||||
* You are hereby granted permission to use, copy, modify, and distribute
|
||||
* this file, provided that this notice, plus the above copyright notice
|
||||
* and disclaimer, appears in all copies. Radstone Technology will provide
|
||||
* no support for this code.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1997.
|
||||
* 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 <bsp.h>
|
||||
#include <rtems/libio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <termios.h>
|
||||
|
||||
#include <libchip/serial.h>
|
||||
|
||||
/*
|
||||
* Load configuration table
|
||||
*/
|
||||
|
||||
extern console_data Console_Port_Data[];
|
||||
extern rtems_device_minor_number Console_Port_Minor;
|
||||
|
||||
/* PAGE
|
||||
*
|
||||
* DEBUG_puts
|
||||
*
|
||||
* This should be safe in the event of an error. It attempts to ensure
|
||||
* that no TX empty interrupts occur while it is doing polled IO. Then
|
||||
* it restores the state of that external interrupt.
|
||||
*
|
||||
* Input parameters:
|
||||
* string - pointer to debug output string
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values: NONE
|
||||
*/
|
||||
|
||||
void DEBUG_puts(
|
||||
char *string
|
||||
)
|
||||
{
|
||||
char *s;
|
||||
uint32_t Irql;
|
||||
|
||||
rtems_interrupt_disable(Irql);
|
||||
|
||||
for ( s = string ; *s ; s++ ) {
|
||||
Console_Port_Tbl[Console_Port_Minor].pDeviceFns->
|
||||
deviceWritePolled(Console_Port_Minor, *s);
|
||||
}
|
||||
|
||||
rtems_interrupt_enable(Irql);
|
||||
}
|
||||
|
||||
/* PAGE
|
||||
*
|
||||
* DEBUG_puth
|
||||
*
|
||||
* This should be safe in the event of an error. It attempts to ensure
|
||||
* that no TX empty interrupts occur while it is doing polled IO. Then
|
||||
* it restores the state of that external interrupt.
|
||||
*
|
||||
* Input parameters:
|
||||
* ulHexNum - value to display
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values: NONE
|
||||
*/
|
||||
|
||||
void DEBUG_puth(
|
||||
uint32_t ulHexNum
|
||||
)
|
||||
{
|
||||
unsigned long i,d;
|
||||
uint32_t Irql;
|
||||
void (*poll)(int minor, char cChar);
|
||||
|
||||
poll = Console_Port_Tbl[Console_Port_Minor].pDeviceFns->deviceWritePolled;
|
||||
|
||||
rtems_interrupt_disable(Irql);
|
||||
|
||||
(*poll)(Console_Port_Minor, '0');
|
||||
(*poll)(Console_Port_Minor, 'x');
|
||||
|
||||
for ( i=32 ; i ; ) {
|
||||
i -= 4;
|
||||
d = (ulHexNum>>i)&0xf;
|
||||
(*poll)(Console_Port_Minor, (d<=9) ? d+'0' : d+'a'-0xa);
|
||||
}
|
||||
rtems_interrupt_enable(Irql);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,196 +0,0 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1998 by Radstone Technology
|
||||
*
|
||||
*
|
||||
* THIS FILE IS PROVIDED TO YOU, THE USER, "AS IS", WITHOUT WARRANTY OF ANY
|
||||
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK
|
||||
* AS TO THE QUALITY AND PERFORMANCE OF ALL CODE IN THIS FILE IS WITH YOU.
|
||||
*
|
||||
* You are hereby granted permission to use, copy, modify, and distribute
|
||||
* this file, provided that this notice, plus the above copyright notice
|
||||
* and disclaimer, appears in all copies. Radstone Technology will provide
|
||||
* no support for this code.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _I8042_P_H_
|
||||
#define _I8042_P_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define KBD_CTR_WRITE_COMMAND 0x60
|
||||
#define KBD_CTR_READ_COMMAND 0x20
|
||||
#define KBD_CTR_TEST_PASSWORD 0xA4
|
||||
#define KBD_CTR_LOAD_PASSWORD 0xA5
|
||||
#define KBD_CTR_ENABLE_PASSWORD 0xA6
|
||||
#define KBD_CTR_DISABLE_AUX 0xA7
|
||||
#define KBD_CTR_ENABLE_AUX 0xA8
|
||||
#define KBD_CTR_AUXLINES_TEST 0xA9
|
||||
#define KBD_CTR_SELFTEST 0xAA
|
||||
#define KBD_CTR_KBDLINES_TEST 0xAB
|
||||
#define KBD_CTR_DISABLE_KBD 0xAD
|
||||
#define KBD_CTR_ENABLE_KBD 0xAE
|
||||
#define KBD_CTR_WRITE_AUX 0xD4
|
||||
#define KBD_CTR_READ_REV 0xD5
|
||||
#define KBD_CTR_READ_VER 0xD6
|
||||
#define KBD_CTR_READ_MODEL 0xD7
|
||||
|
||||
/* Keyboard Controller Data */
|
||||
#define KBD_CTR_SELFTEST_PASSED 0x55
|
||||
#define KBD_CTR_PASSWORD_INSTALLED 0xFA
|
||||
#define KBD_CTR_PASSWORD_NOT_INSTALLED 0xF1
|
||||
|
||||
/* Controller Command Byte bit definitions. */
|
||||
#define KBD_CMD_BYTE_DISABLE_AUX 0x20
|
||||
#define KBD_CMD_BYTE_DISABLE_KBD 0x10
|
||||
#define KBD_CMD_ENABLE_AUX_INT 0x02
|
||||
#define KBD_CMD_ENABLE_KBD_INT 0x01
|
||||
|
||||
/* Keyboard Controller Status byte masks */
|
||||
#define KBD_OBF_MASK 0x1 /* Output buffer full */
|
||||
#define KBD_IBF_MASK 0x2 /* Input buffer full */
|
||||
#define KBD_FROM_AUX_MASK 0x20 /* Byte from Aux Port. */
|
||||
|
||||
/* Interface Test Results */
|
||||
#define INTERFACE_NO_ERROR 0x00
|
||||
#define CLOCK_STUCK_LOW 0x01
|
||||
#define CLOCK_STUCK_HIGH 0x02
|
||||
#define DATA_STUCK_LOW 0x03
|
||||
#define DATA_STUCK_HIGH 0x04
|
||||
|
||||
/* Timeout */
|
||||
#define KBD_TIMEOUT 500000 /* Effectively ISA read access times */
|
||||
|
||||
/* Keyboard Commands */
|
||||
#define KBD_CMD_SET_LEDS 0xed /* Set/Reset LEDs */
|
||||
#define KBD_CMD_ECHO 0xee /* request keyboard echo resp. "EE" */
|
||||
#define KBD_CMD_SEL_SCAN_CODE 0xf0 /* Scan codes 1,2,3 or 0 = rquest current. */
|
||||
#define KBD_CMD_READ_ID 0xf2 /* Request for two byte response */
|
||||
#define KBD_CMD_SET_RATE 0xf3 /* Set tellematic Rate */
|
||||
#define KBD_CMD_ENABLE 0xf4 /* Clears Buffer and Starts Scanning. */
|
||||
#define KBD_CMD_DISABLE 0xf5 /* reset to power up */
|
||||
|
||||
#define KBD_CMD_SET_DEFAULT 0xf6
|
||||
#define KBD_CMD_SET_ALL_TLMTIC 0xf7 /* Set all keys telematic */
|
||||
#define KBD_CMD_SET_ALL_MKBR 0xf8 /* Set all keys Make /Break */
|
||||
#define KBD_CMD_SET_ALL_MAKE 0xf9 /* Set all keys Make only */
|
||||
#define KBD_CMD_SET_KEY_TLMTIC 0xfb /* Set individual key telemativ */
|
||||
#define KBD_CMD_SET_KEY_MKBR 0xfc /* set individual key make/break */
|
||||
#define KBD_CMD_SET_KEY_MK 0xfd /* set individual key make only */
|
||||
#define KBD_CMD_RESEND 0xfe /* request to resend last transfer */
|
||||
#define KBD_CMD_RESET 0xff /* request to start a program reset */
|
||||
#define KBD_CMD_ACK 0xfa /* keyboard ack after reset */
|
||||
#define KBD_CMD_BAT 0xaa /* Keyboard Bat completion Response */
|
||||
|
||||
/*
|
||||
* Define LED encodings for use with the KbdSetLEDs command
|
||||
*/
|
||||
#define KBD_LED_CAPS 0x04
|
||||
#define KBD_LED_NUM 0x02
|
||||
#define KBD_LED_SCROLL 0x01
|
||||
|
||||
/*
|
||||
* Define two code scan codes in keycode order
|
||||
*/
|
||||
#define KEY_TWO_KEY 0xe0
|
||||
#define KEY_ALT 0x38
|
||||
#define KEY_CONTROL 0x1d
|
||||
#define KEY_INSERT 0x52
|
||||
#define KEY_DELETE 0x53
|
||||
#define KEY_LEFT_ARROW 0x4b
|
||||
#define KEY_HOME 0x47
|
||||
#define KEY_END 0x4F
|
||||
#define KEY_UP_ARROW 0x48
|
||||
#define KEY_DOWN_ARROW 0x50
|
||||
#define KEY_PAGE_UP 0x49
|
||||
#define KEY_PAGE_DOWN 0x51
|
||||
#define KEY_RIGHT_ARROW 0x4d
|
||||
#define KEY_KEYPAD_SLASH 0x35
|
||||
#define KEY_KEYPAD_ENTER 0x1c
|
||||
#define KEY_SYS_REQUEST 0x2a
|
||||
#define KEY_PRINT_SCREEN 0x37
|
||||
|
||||
#define KEY_LEFT_SHIFT 0x2a
|
||||
#define KEY_RIGHT_SHIFT 0x36
|
||||
#define KEY_TAB 0x0f
|
||||
#define KEY_CAPS_LOCK 0x3a
|
||||
#define KEY_NUM_LOCK 0x45
|
||||
#define KEY_SCROLL_LOCK 0x46
|
||||
#define KEY_ESC 0x01
|
||||
#define KEY_F1 0x3b
|
||||
#define KEY_F2 0x3c
|
||||
#define KEY_F3 0x3d
|
||||
#define KEY_F4 0x3e
|
||||
#define KEY_F5 0x3f
|
||||
#define KEY_F6 0x40
|
||||
#define KEY_F7 0x41
|
||||
#define KEY_F8 0x42
|
||||
#define KEY_F9 0x43
|
||||
#define KEY_F10 0x44
|
||||
#define KEY_F11 0x57
|
||||
#define KEY_F12 0x58
|
||||
|
||||
/*
|
||||
* ASCII control codes
|
||||
*/
|
||||
#define ASCII_NUL 0x00
|
||||
#define ASCII_SOH 0x01
|
||||
#define ASCII_STX 0x02
|
||||
#define ASCII_ETX 0x03
|
||||
#define ASCII_EOT 0x04
|
||||
#define ASCII_ENQ 0x05
|
||||
#define ASCII_ACK 0x06
|
||||
#define ASCII_BEL 0x07
|
||||
#define ASCII_BS 0x08
|
||||
#define ASCII_HT 0x09
|
||||
#define ASCII_LF 0x0a
|
||||
#define ASCII_VT 0x0b
|
||||
#define ASCII_FF 0x0c
|
||||
#define ASCII_CR 0x0d
|
||||
#define ASCII_SO 0x0e
|
||||
#define ASCII_SI 0x0f
|
||||
#define ASCII_DLE 0x10
|
||||
#define ASCII_XON 0x11
|
||||
#define ASCII_DC1 0x11
|
||||
#define ASCII_DC2 0x12
|
||||
#define ASCII_XOFF 0x13
|
||||
#define ASCII_DC3 0x13
|
||||
#define ASCII_DC4 0x14
|
||||
#define ASCII_NAK 0x15
|
||||
#define ASCII_SYN 0x16
|
||||
#define ASCII_ETB 0x17
|
||||
#define ASCII_CAN 0x18
|
||||
#define ASCII_EM 0x19
|
||||
#define ASCII_SUB 0x1a
|
||||
#define ASCII_ESC 0x1b
|
||||
#define ASCII_FS 0x1c
|
||||
#define ASCII_GS 0x1d
|
||||
#define ASCII_RS 0x1e
|
||||
#define ASCII_US 0x1f
|
||||
#define ASCII_DEL 0x7f
|
||||
#define ASCII_SYSRQ 0x80
|
||||
#define ASCII_CSI 0x9b
|
||||
|
||||
/*
|
||||
* Exported functions
|
||||
*/
|
||||
extern boolean i8042_probe(int minor);
|
||||
|
||||
extern void i8042_init(int minor);
|
||||
#if CONSOLE_USE_INTERRUPTS
|
||||
extern void i8042_initialize_interrupts(int minor);
|
||||
|
||||
#else
|
||||
extern int i8042_inbyte_nonblocking_polled(
|
||||
int minor
|
||||
);
|
||||
#endif /* CONSOLE_USE_INTERRUPTS */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _I8042_P_H_ */
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* This file contains the TTY driver for the VGA/i8042 console
|
||||
*
|
||||
* COPYRIGHT (c) 1998 by Radstone Technology
|
||||
*
|
||||
*
|
||||
* THIS FILE IS PROVIDED TO YOU, THE USER, "AS IS", WITHOUT WARRANTY OF ANY
|
||||
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK
|
||||
* AS TO THE QUALITY AND PERFORMANCE OF ALL CODE IN THIS FILE IS WITH YOU.
|
||||
*
|
||||
* You are hereby granted permission to use, copy, modify, and distribute
|
||||
* this file, provided that this notice, plus the above copyright notice
|
||||
* and disclaimer, appears in all copies. Radstone Technology will provide
|
||||
* no support for this code.
|
||||
*
|
||||
* This driver uses the termios pseudo driver.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
#include <bsp.h>
|
||||
#include <rtems/libio.h>
|
||||
|
||||
#include "console.h"
|
||||
#include "vga_p.h"
|
||||
#include "i8042_p.h"
|
||||
|
||||
console_fns i8042vga_fns =
|
||||
{
|
||||
i8042_probe, /* deviceProbe */
|
||||
NULL, /* deviceFirstOpen */
|
||||
NULL, /* deviceLastClose */
|
||||
#if CONSOLE_USE_INTERRUPTS
|
||||
NULL, /* deviceRead */
|
||||
vga_write_support, /* deviceWrite */
|
||||
i8042_initialize_interrupts, /* deviceInitialize */
|
||||
#else
|
||||
i8042_inbyte_nonblocking_polled, /* deviceRead */
|
||||
vga_write_support, /* deviceWrite */
|
||||
i8042_init, /* deviceInitialize */
|
||||
#endif
|
||||
vga_write, /* deviceWritePolled */
|
||||
FALSE, /* deviceOutputUsesInterrupts */
|
||||
};
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1998 by Radstone Technology
|
||||
*
|
||||
*
|
||||
* THIS FILE IS PROVIDED TO YOU, THE USER, "AS IS", WITHOUT WARRANTY OF ANY
|
||||
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK
|
||||
* AS TO THE QUALITY AND PERFORMANCE OF ALL CODE IN THIS FILE IS WITH YOU.
|
||||
*
|
||||
* You are hereby granted permission to use, copy, modify, and distribute
|
||||
* this file, provided that this notice, plus the above copyright notice
|
||||
* and disclaimer, appears in all copies. Radstone Technology will provide
|
||||
* no support for this code.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _I8042VGA_H_
|
||||
#define _I8042VGA_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Driver function table
|
||||
*/
|
||||
extern console_fns i8042vga_fns;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _I8042VGA_H_ */
|
||||
@@ -1,52 +0,0 @@
|
||||
/* nc16550cfg.c
|
||||
*
|
||||
* This include file contains all console driver definations for the nc16550
|
||||
*
|
||||
* COPYRIGHT (c) 1998 by Radstone Technology
|
||||
*
|
||||
*
|
||||
* THIS FILE IS PROVIDED TO YOU, THE USER, "AS IS", WITHOUT WARRANTY OF ANY
|
||||
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK
|
||||
* AS TO THE QUALITY AND PERFORMANCE OF ALL CODE IN THIS FILE IS WITH YOU.
|
||||
*
|
||||
* You are hereby granted permission to use, copy, modify, and distribute
|
||||
* this file, provided that this notice, plus the above copyright notice
|
||||
* and disclaimer, appears in all copies. Radstone Technology will provide
|
||||
* no support for this code.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1997.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may in
|
||||
* the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
#include <bsp.h>
|
||||
|
||||
uint8_t Read_ns16550_register(
|
||||
uint32_t ulCtrlPort,
|
||||
uint8_t ucRegNum
|
||||
)
|
||||
{
|
||||
unsigned char *p = (unsigned char *)ulCtrlPort;
|
||||
unsigned char ucData;
|
||||
|
||||
inport_byte( &p[ucRegNum], ucData );
|
||||
return ucData;
|
||||
}
|
||||
|
||||
void Write_ns16550_register(
|
||||
uint32_t ulCtrlPort,
|
||||
uint8_t ucRegNum,
|
||||
uint8_t ucData
|
||||
)
|
||||
{
|
||||
unsigned char *p = (unsigned char *)ulCtrlPort;
|
||||
|
||||
outport_byte( &p[ucRegNum], ucData );
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
/* nc16550cfg.h
|
||||
*
|
||||
* This include file contains all console driver definations for the nc16550
|
||||
*
|
||||
* COPYRIGHT (c) 1998 by Radstone Technology
|
||||
*
|
||||
*
|
||||
* THIS FILE IS PROVIDED TO YOU, THE USER, "AS IS", WITHOUT WARRANTY OF ANY
|
||||
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK
|
||||
* AS TO THE QUALITY AND PERFORMANCE OF ALL CODE IN THIS FILE IS WITH YOU.
|
||||
*
|
||||
* You are hereby granted permission to use, copy, modify, and distribute
|
||||
* this file, provided that this notice, plus the above copyright notice
|
||||
* and disclaimer, appears in all copies. Radstone Technology will provide
|
||||
* no support for this code.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1997.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may in
|
||||
* the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __NS16550_CONFIG_H
|
||||
#define __NS16550_CONFIG_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Board specific register access routines
|
||||
*/
|
||||
|
||||
uint8_t Read_ns16550_register(
|
||||
uint32_t ulCtrlPort,
|
||||
uint8_t ucRegNum
|
||||
);
|
||||
|
||||
void Write_ns16550_register(
|
||||
uint32_t ulCtrlPort,
|
||||
uint8_t ucRegNum,
|
||||
uint8_t ucData
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,355 +0,0 @@
|
||||
/*
|
||||
* This file contains the TTY driver for VGA
|
||||
*
|
||||
* COPYRIGHT (c) 1998 by Radstone Technology
|
||||
*
|
||||
*
|
||||
* THIS FILE IS PROVIDED TO YOU, THE USER, "AS IS", WITHOUT WARRANTY OF ANY
|
||||
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK
|
||||
* AS TO THE QUALITY AND PERFORMANCE OF ALL CODE IN THIS FILE IS WITH YOU.
|
||||
*
|
||||
* You are hereby granted permission to use, copy, modify, and distribute
|
||||
* this file, provided that this notice, plus the above copyright notice
|
||||
* and disclaimer, appears in all copies. Radstone Technology will provide
|
||||
* no support for this code.
|
||||
*
|
||||
* This driver uses the termios pseudo driver.
|
||||
*/
|
||||
/*-------------------------------------------------------------------------+
|
||||
| (C) Copyright 1997 -
|
||||
| - NavIST Group - Real-Time Distributed Systems and Industrial Automation
|
||||
|
|
||||
| http://pandora.ist.utl.pt
|
||||
|
|
||||
| Instituto Superior Tecnico * Lisboa * PORTUGAL
|
||||
+--------------------------------------------------------------------------+
|
||||
| Disclaimer:
|
||||
|
|
||||
| This file is provided "AS IS" without warranty of any kind, either
|
||||
| expressed or implied.
|
||||
+--------------------------------------------------------------------------+
|
||||
| This code is based on:
|
||||
| outch.c,v 1.4 1995/12/19 20:07:27 joel Exp - go32 BSP
|
||||
| With the following copyright notice:
|
||||
| **************************************************************************
|
||||
| * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. *
|
||||
| * On-Line Applications Research Corporation (OAR). *
|
||||
| **************************************************************************
|
||||
+--------------------------------------------------------------------------*/
|
||||
|
||||
#include <bsp.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "vga_p.h"
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Constants
|
||||
+--------------------------------------------------------------------------*/
|
||||
#define DISPLAY_CELL_COUNT (VGA_NUM_ROWS * VGA_NUM_COLS)
|
||||
/* Number of display cells. */
|
||||
#define TABSIZE 4 /* Number of spaces for TAB (\t) char. */
|
||||
#define WHITE 0x0007 /* White on Black background colour. */
|
||||
#define BLANK (WHITE | (' '<<8)) /* Blank character. */
|
||||
|
||||
/*
|
||||
* This is imported from i8042.c to provide flow control
|
||||
*/
|
||||
extern volatile boolean bScrollLock;
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Global Variables
|
||||
+--------------------------------------------------------------------------*/
|
||||
/* Physical address of start of video text memory. */
|
||||
static uint16_t *videoRam = (uint16_t*)VGA_FB;
|
||||
/* Pointer for current output position in display. */
|
||||
static uint16_t *videoRamPtr = (uint16_t*)VGA_FB;
|
||||
static uint8_t videoRows = VGA_NUM_ROWS; /* Number of rows in display. */
|
||||
static uint8_t videoCols = VGA_NUM_COLS; /* Number of columns in display. */
|
||||
static uint8_t cursRow = 0; /* Current cursor row. */
|
||||
static uint8_t cursCol = 0; /* Current cursor column. */
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Function: setHardwareCursorPos
|
||||
| Description: Set hardware video cursor at given offset into video RAM.
|
||||
| Global Variables: None.
|
||||
| Arguments: videoCursor - Offset into video memory.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
static inline void
|
||||
setHardwareCursorPos(uint16_t videoCursor)
|
||||
{
|
||||
VGA_WRITE_CRTC(0x0e, (videoCursor >> 8) & 0xff);
|
||||
VGA_WRITE_CRTC(0x0f, videoCursor & 0xff);
|
||||
} /* setHardwareCursorPos */
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Function: updateVideoRamPtr
|
||||
| Description: Updates value of global variable "videoRamPtr" based on
|
||||
| current window's cursor position.
|
||||
| Global Variables: videoRamPtr, cursRow, cursCol.
|
||||
| Arguments: None.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
static inline void
|
||||
updateVideoRamPtr(void)
|
||||
{
|
||||
videoRamPtr = videoRam + cursRow * videoCols + cursCol;
|
||||
} /* updateVideoRamPtr */
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Function: scrollUp
|
||||
| Description: Scrolls display up n lines.
|
||||
| Global Variables: None.
|
||||
| Arguments: lines - number of lines to scroll.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
static void
|
||||
scrollUp(uint8_t lines)
|
||||
{
|
||||
/* Number of blank display cells on bottom of window. */
|
||||
uint16_t blankCount;
|
||||
|
||||
/* Source and destination pointers for memory copy operations. */
|
||||
uint16_t *ptrDst, *ptrSrc;
|
||||
|
||||
if(lines<videoRows) /* Move window's contents up. */
|
||||
{
|
||||
/*
|
||||
* Number of non-blank cells on upper part
|
||||
* of display (total - blank).
|
||||
*/
|
||||
uint16_t nonBlankCount;
|
||||
|
||||
blankCount = lines * videoCols;
|
||||
nonBlankCount = DISPLAY_CELL_COUNT - blankCount;
|
||||
ptrSrc = videoRam + blankCount;
|
||||
ptrDst = videoRam;
|
||||
|
||||
while(nonBlankCount--)
|
||||
{
|
||||
*ptrDst++ = *ptrSrc++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Clear the whole display.
|
||||
*/
|
||||
blankCount = DISPLAY_CELL_COUNT;
|
||||
ptrDst = videoRam;
|
||||
}
|
||||
|
||||
/* Fill bottom with blanks. */
|
||||
while (blankCount-->0)
|
||||
{
|
||||
*ptrDst++ = BLANK;
|
||||
}
|
||||
} /* scrollUp */
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Function: printCHAR
|
||||
| Description: Print printable character to display.
|
||||
| Global Variables: videoRamPtr, cursRow, cursCol.
|
||||
| Arguments: c - character to write to display.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
static void
|
||||
printCHAR(char c)
|
||||
{
|
||||
*videoRamPtr++ = (c<<8) | WHITE;
|
||||
cursCol++;
|
||||
if(cursCol==videoCols)
|
||||
{
|
||||
cursCol = 0;
|
||||
cursRow++;
|
||||
if(cursRow==videoRows)
|
||||
{
|
||||
cursRow--;
|
||||
scrollUp(1);
|
||||
videoRamPtr -= videoCols;
|
||||
}
|
||||
}
|
||||
} /* printCHAR */
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Function: printBS
|
||||
| Description: Print BS (BackSpace - '\b') character to display.
|
||||
| Global Variables: videoRamPtr, cursRow, cursCol.
|
||||
| Arguments: None.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
static inline void
|
||||
printBS(void)
|
||||
{
|
||||
/* Move cursor back one cell. */
|
||||
if(cursCol>0)
|
||||
{
|
||||
cursCol--;
|
||||
}
|
||||
else if(cursRow>0)
|
||||
{
|
||||
cursRow--;
|
||||
cursCol = videoCols - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Write a whitespace. */
|
||||
*(--videoRamPtr) = BLANK;
|
||||
} /* printBS */
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Function: printHT
|
||||
| Description: Print HT (Horizontal Tab - '\t') character to display.
|
||||
| Global Variables: cursCol.
|
||||
| Arguments: None.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
static inline void
|
||||
printHT(void)
|
||||
{
|
||||
do
|
||||
{
|
||||
printCHAR(' ');
|
||||
}
|
||||
while (cursCol % TABSIZE);
|
||||
} /* printHT */
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Function: printLF
|
||||
| Description: Print LF (Line Feed - '\n') character to display.
|
||||
| Global Variables: cursRow.
|
||||
| Arguments: None.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
static inline void
|
||||
printLF(void)
|
||||
{
|
||||
cursRow++;
|
||||
if(cursRow==videoRows)
|
||||
{
|
||||
cursRow--;
|
||||
scrollUp(1);
|
||||
}
|
||||
updateVideoRamPtr();
|
||||
} /* printLF */
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Function: printCR
|
||||
| Description: Print CR (Carriage Return - '\r') to display.
|
||||
| Global Variables: cursCol.
|
||||
| Arguments: None.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
static inline void
|
||||
printCR(void)
|
||||
{
|
||||
cursCol = 0;
|
||||
updateVideoRamPtr();
|
||||
} /* printCR */
|
||||
|
||||
/*
|
||||
* Console Device Driver Entry Points
|
||||
*/
|
||||
void
|
||||
vga_write(
|
||||
int minor,
|
||||
char cChar)
|
||||
{
|
||||
switch (cChar)
|
||||
{
|
||||
case '\b':
|
||||
printBS();
|
||||
break;
|
||||
case '\t':
|
||||
printHT();
|
||||
break;
|
||||
case '\n':
|
||||
printLF();
|
||||
break;
|
||||
case '\r':
|
||||
printCR();
|
||||
break;
|
||||
default:
|
||||
printCHAR(cChar);
|
||||
break;
|
||||
}
|
||||
|
||||
setHardwareCursorPos(videoRamPtr - videoRam);
|
||||
} /* vga_write */
|
||||
|
||||
/*
|
||||
* vga_write_support
|
||||
*
|
||||
* Console Termios output entry point.
|
||||
*
|
||||
*/
|
||||
int vga_write_support(
|
||||
int minor,
|
||||
const char *buf,
|
||||
int len
|
||||
)
|
||||
{
|
||||
int nwrite = 0;
|
||||
|
||||
while(bScrollLock)
|
||||
{
|
||||
/*
|
||||
* The Scroll lock on the keyboard is active
|
||||
*/
|
||||
/*
|
||||
* Yield while we wait
|
||||
*/
|
||||
rtems_task_wake_after(RTEMS_YIELD_PROCESSOR);
|
||||
}
|
||||
|
||||
/*
|
||||
* Write each byte in the string to the display
|
||||
*/
|
||||
while (nwrite<len)
|
||||
{
|
||||
/*
|
||||
* transmit character
|
||||
*/
|
||||
vga_write(minor, *buf++);
|
||||
nwrite++;
|
||||
}
|
||||
|
||||
/*
|
||||
* return the number of bytes written.
|
||||
*/
|
||||
return nwrite;
|
||||
}
|
||||
|
||||
boolean vga_probe(int minor)
|
||||
{
|
||||
uint8_t ucMiscIn;
|
||||
|
||||
/*
|
||||
* Check for presence of VGA adaptor
|
||||
*/
|
||||
inport_byte(0x3cc, ucMiscIn);
|
||||
if(ucMiscIn!=0xff)
|
||||
{
|
||||
/*
|
||||
* VGA device is present
|
||||
*/
|
||||
return(TRUE);
|
||||
}
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
void vga_init(int minor)
|
||||
{
|
||||
scrollUp(videoRows); /* Clear entire screen */
|
||||
setHardwareCursorPos(0); /* Cursor at upper left corner */
|
||||
/*
|
||||
* Enable the cursor
|
||||
*/
|
||||
VGA_WRITE_CRTC(0x0a, 0x0e); /* Crt cursor start */
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user