summaryrefslogtreecommitdiff
path: root/psosim
diff options
context:
space:
mode:
authorcdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-17 02:46:34 +0000
committercdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-17 02:46:34 +0000
commit2c0251494dd5ae4b819099e22ba6b37fcb9684e1 (patch)
treed7fb8e079f66272374512a9b951936206f8f69b9 /psosim
parent4eb8e9dabfe8d820e7835a8ee460327d4e921df8 (diff)
downloadATCD-2c0251494dd5ae4b819099e22ba6b37fcb9684e1.tar.gz
pSOSim port
Diffstat (limited to 'psosim')
-rw-r--r--psosim/Makefile76
-rw-r--r--psosim/drv_conf.c79
2 files changed, 155 insertions, 0 deletions
diff --git a/psosim/Makefile b/psosim/Makefile
new file mode 100644
index 00000000000..0902651a0da
--- /dev/null
+++ b/psosim/Makefile
@@ -0,0 +1,76 @@
+#----------------------------------------------------------------------------
+#
+# $Id$
+#
+# Makefile for the pSOSim system object files
+#----------------------------------------------------------------------------
+
+#----------------------------------------------------------------------------
+# Local macros
+#----------------------------------------------------------------------------
+
+CPU_FAMILY = psosim
+CPU = psosim
+CPU_TOOLS = psosim
+BOARD = psosim
+
+PSS_CFG_DIR = $(ACE_ROOT)/psosim
+
+PSS_CFG_OBJS = $(PSS_CFG_DIR)/drv_conf.o $(PSS_CFG_DIR)/prepccfg.o $(PSS_CFG_DIR)/psoscfg.o $(PSS_CFG_DIR)/sysinit.o
+
+PSS_CONFIG = $(PSS_ROOT)/configs/std
+PSS_SYS_DIR = $(PSS_ROOT)/sys/os
+PSS_SYS_LIBS = $(PSS_SYS_DIR)/prepc.a $(PSS_SYS_DIR)/psos.a $(PSS_SYS_DIR)/pna.a
+PSS_BSP = $(PSS_ROOT)/bsps/psosim
+PSS_BSP_LIB = $(PSS_BSP)/bsp.a
+
+#----------------------------------------------------------------------------
+# Include macros and targets
+#----------------------------------------------------------------------------
+
+include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
+include $(ACE_ROOT)/include/makeinclude/macros.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
+
+# To build multiple executables in the same directory on AIX, it works
+# best to wipe out any previously-created tempinc directory.
+# The compiler/linker isn't too smart about instantiating templates...
+ifdef TEMPINCDIR
+COMPILE.cc := $(RM) -rf tempinc; $(COMPILE.cc)
+endif
+
+#----------------------------------------------------------------------------
+# Local targets
+#----------------------------------------------------------------------------
+
+all : $(PSS_CFG_DIR)/acepsos.a
+
+$(PSS_CFG_DIR)/acepsos.a : $(PSS_CFG_OBJS)
+ $(AR) $(ARFLAGS) $@ $?
+
+$(PSS_CFG_DIR)/sysinit.o : $(PSS_CONFIG)/sysinit.c $(ACE_ROOT)/ace/sys_conf.h $(PSS_BSP)/bsp.h \
+ $(PSS_ROOT)/include/bspfuncs.h $(PSS_ROOT)/include/configs.h
+ $(COMPILE.c) -o $@ $(PSS_CONFIG)/sysinit.c
+
+$(PSS_CFG_DIR)/prepccfg.o : $(PSS_CONFIG)/prepccfg.c $(ACE_ROOT)/ace/sys_conf.h $(PSS_BSP)/bsp.h \
+ $(PSS_ROOT)/include/bspfuncs.h $(PSS_ROOT)/include/configs.h
+ $(COMPILE.c) -o $@ $(PSS_CONFIG)/prepccfg.c
+
+$(PSS_CFG_DIR)/psoscfg.o : $(PSS_CONFIG)/psoscfg.c $(ACE_ROOT)/ace/sys_conf.h $(PSS_BSP)/bsp.h \
+ $(PSS_ROOT)/include/bspfuncs.h $(PSS_ROOT)/include/configs.h
+ $(COMPILE.c) -o $@ $(PSS_CONFIG)/psoscfg.c
+
+$(PSS_CFG_DIR)/drv_conf.o : $(PSS_CFG_DIR)/drv_conf.c $(ACE_ROOT)/ace/sys_conf.h $(PSS_BSP)/bsp.h \
+ $(PSS_ROOT)/include/bspfuncs.h $(PSS_ROOT)/include/configs.h
+ $(COMPILE.c) -o $@ $(PSS_CFG_DIR)/drv_conf.c
+
+#----------------------------------------------------------------------------
+# Dependencies
+#----------------------------------------------------------------------------
+# DO NOT DELETE THIS LINE -- g++dep uses it.
+# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
+
+# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/psosim/drv_conf.c b/psosim/drv_conf.c
new file mode 100644
index 00000000000..3228920df6a
--- /dev/null
+++ b/psosim/drv_conf.c
@@ -0,0 +1,79 @@
+/***********************************************************************/
+/* */
+/* MODULE: drv_conf.c */
+/* DATE: 94/01/06 */
+/* PURPOSE: pSOSystem driver configuration and initialization */
+/* */
+/* There is one function in this file: */
+/* */
+/* SetUpDrivers to setup drivers except for Network drivers */
+/* */
+/* */
+/*---------------------------------------------------------------------*/
+/* */
+/* Copyright 1991 - 1993, Integrated Systems, Inc. */
+/* ALL RIGHTS RESERVED */
+/* */
+/* Permission is hereby granted to licensees of Integrated Systems, */
+/* Inc. products to use or abstract this computer program for the */
+/* sole purpose of implementing a product based on Integrated */
+/* Systems, Inc. products. No other rights to reproduce, use, */
+/* or disseminate this computer program, whether in part or in */
+/* whole, are granted. */
+/* */
+/* Integrated Systems, Inc. makes no representation or warranties */
+/* with respect to the performance of this computer program, and */
+/* specifically disclaims any responsibility for any damages, */
+/* special or consequential, connected with the use of this program. */
+/* */
+/***********************************************************************/
+#include "sys_conf.h"
+#include "bsp.h"
+#include <bspfuncs.h>
+#include <configs.h>
+
+struct ioparms;
+#define NULLF ((void (*)(struct ioparms *)) 0)
+UCHAR *SetUpDrivers(UCHAR *FreeMemPtr)
+{
+
+/*---------------------------------------------------------------------*/
+/* Install pSOSystem serial device driver */
+/*---------------------------------------------------------------------*/
+#if (SC_DEV_SERIAL && BSP_SERIAL)
+ InstallDriver(SC_DEV_SERIAL, CnslInit, NULLF, NULLF,CnslRead,
+ CnslWrite, CnslCntrl, 0, 0);
+ FreeMemPtr = CnslSetup(FreeMemPtr, SD_DEF_BAUD, SC_APP_CONSOLE);
+#endif
+
+/*---------------------------------------------------------------------*/
+/* Install pSOSystem tick timer */
+/*---------------------------------------------------------------------*/
+#if SC_DEV_TIMER
+ InstallDriver(SC_DEV_TIMER, RtcInit, NULLF, NULLF, NULLF, NULLF,
+ NULLF, 0, 0);
+#endif
+
+/*---------------------------------------------------------------------*/
+/* Install pSOSystem ramdisk driver */
+/*---------------------------------------------------------------------*/
+#if SC_DEV_RAMDISK
+ InstallDriver(SC_DEV_RAMDISK, RdskInit, NULLF, NULLF, RdskRead,
+ RdskWrite, NULLF, 0, 0);
+#endif
+
+/*---------------------------------------------------------------------*/
+/* Install pSOSystem TFTP driver */
+/*---------------------------------------------------------------------*/
+#if (SC_DEV_TFTP)
+ InstallDriver(SC_DEV_TFTP, TftpInit, TftpOpen, TftpClose, TftpRead,
+ NULLF, TftpCntl, 0, 0);
+#endif
+
+/*---------------------------------------------------------------------*/
+/* Add additional drivers to install here. */
+/*---------------------------------------------------------------------*/
+
+return(FreeMemPtr);
+}
+