From 43e1177def5a04b962b591496b2990e1c57ce63e Mon Sep 17 00:00:00 2001 From: cvs2git Date: Mon, 30 Sep 1996 20:15:02 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'rtems-3-6-0'. Sprout from master 1996-09-30 20:15:01 UTC Joel Sherrill 'fixed incorrect placement of CPU_STRUCTURE_ALIGNMENT macro.' Delete: c/build-tools/README c/build-tools/cklength.c c/build-tools/eolstrip.c c/build-tools/packhex.c c/build-tools/unhex.c c/src/exec/libcsupport/include/clockdrv.h c/src/exec/libcsupport/include/console.h c/src/exec/libcsupport/include/iosupp.h c/src/exec/libcsupport/include/ringbuf.h c/src/exec/libcsupport/include/rtems/assoc.h c/src/exec/libcsupport/include/rtems/error.h c/src/exec/libcsupport/include/rtems/libcsupport.h c/src/exec/libcsupport/include/rtems/libio.h c/src/exec/libcsupport/include/spurious.h c/src/exec/libcsupport/include/sys/utsname.h c/src/exec/libcsupport/include/timerdrv.h c/src/exec/libcsupport/include/vmeintr.h c/src/exec/libcsupport/src/README c/src/exec/libcsupport/src/__brk.c c/src/exec/libcsupport/src/__gettod.c c/src/exec/libcsupport/src/__times.c c/src/exec/libcsupport/src/assoc.c c/src/exec/libcsupport/src/error.c c/src/exec/libcsupport/src/hosterr.c c/src/exec/libcsupport/src/libio.c c/src/exec/libcsupport/src/malloc.c c/src/exec/libcsupport/src/newlibc.c c/src/exec/libcsupport/src/no_libc.c c/src/exec/libcsupport/src/unixlibc.c c/src/exec/libcsupport/src/utsname.c c/src/exec/posix/include/limits.h c/src/exec/posix/include/rtems/posix/cancel.h c/src/exec/posix/include/rtems/posix/cond.h c/src/exec/posix/include/rtems/posix/condmp.h c/src/exec/posix/include/rtems/posix/config.h c/src/exec/posix/include/rtems/posix/intr.h c/src/exec/posix/include/rtems/posix/key.h c/src/exec/posix/include/rtems/posix/mqueue.h c/src/exec/posix/include/rtems/posix/mqueuemp.h c/src/exec/posix/include/rtems/posix/mutex.h c/src/exec/posix/include/rtems/posix/mutexmp.h c/src/exec/posix/include/rtems/posix/posixapi.h c/src/exec/posix/include/rtems/posix/priority.h c/src/exec/posix/include/rtems/posix/psignal.h c/src/exec/posix/include/rtems/posix/pthread.h c/src/exec/posix/include/rtems/posix/pthreadmp.h c/src/exec/posix/include/rtems/posix/semaphore.h c/src/exec/posix/include/rtems/posix/semaphoremp.h c/src/exec/posix/include/rtems/posix/seterr.h c/src/exec/posix/include/rtems/posix/threadsup.h c/src/exec/posix/include/rtems/posix/time.h c/src/exec/posix/include/sys/utsname.h c/src/exec/rtems/include/rtems.h c/src/exec/rtems/include/rtems/rtems/asr.h c/src/exec/rtems/include/rtems/rtems/attr.h c/src/exec/rtems/include/rtems/rtems/clock.h c/src/exec/rtems/include/rtems/rtems/config.h c/src/exec/rtems/include/rtems/rtems/dpmem.h c/src/exec/rtems/include/rtems/rtems/event.h c/src/exec/rtems/include/rtems/rtems/eventmp.h c/src/exec/rtems/include/rtems/rtems/eventset.h c/src/exec/rtems/include/rtems/rtems/intr.h c/src/exec/rtems/include/rtems/rtems/message.h c/src/exec/rtems/include/rtems/rtems/modes.h c/src/exec/rtems/include/rtems/rtems/mp.h c/src/exec/rtems/include/rtems/rtems/msgmp.h c/src/exec/rtems/include/rtems/rtems/options.h c/src/exec/rtems/include/rtems/rtems/part.h c/src/exec/rtems/include/rtems/rtems/partmp.h c/src/exec/rtems/include/rtems/rtems/ratemon.h c/src/exec/rtems/include/rtems/rtems/region.h c/src/exec/rtems/include/rtems/rtems/regionmp.h c/src/exec/rtems/include/rtems/rtems/rtemsapi.h c/src/exec/rtems/include/rtems/rtems/sem.h c/src/exec/rtems/include/rtems/rtems/semmp.h c/src/exec/rtems/include/rtems/rtems/signal.h c/src/exec/rtems/include/rtems/rtems/signalmp.h c/src/exec/rtems/include/rtems/rtems/status.h c/src/exec/rtems/include/rtems/rtems/support.h c/src/exec/rtems/include/rtems/rtems/taskmp.h c/src/exec/rtems/include/rtems/rtems/tasks.h c/src/exec/rtems/include/rtems/rtems/timer.h c/src/exec/rtems/include/rtems/rtems/types.h c/src/exec/rtems/inline/rtems/rtems/asr.inl c/src/exec/rtems/inline/rtems/rtems/attr.inl c/src/exec/rtems/inline/rtems/rtems/dpmem.inl c/src/exec/rtems/inline/rtems/rtems/event.inl c/src/exec/rtems/inline/rtems/rtems/eventset.inl c/src/exec/rtems/inline/rtems/rtems/message.inl c/src/exec/rtems/inline/rtems/rtems/modes.inl c/src/exec/rtems/inline/rtems/rtems/options.inl c/src/exec/rtems/inline/rtems/rtems/part.inl c/src/exec/rtems/inline/rtems/rtems/ratemon.inl c/src/exec/rtems/inline/rtems/rtems/region.inl c/src/exec/rtems/inline/rtems/rtems/sem.inl c/src/exec/rtems/inline/rtems/rtems/status.inl c/src/exec/rtems/inline/rtems/rtems/support.inl c/src/exec/rtems/inline/rtems/rtems/tasks.inl c/src/exec/rtems/inline/rtems/rtems/timer.inl c/src/exec/rtems/macros/rtems/rtems/asr.inl c/src/exec/rtems/macros/rtems/rtems/attr.inl c/src/exec/rtems/macros/rtems/rtems/dpmem.inl c/src/exec/rtems/macros/rtems/rtems/event.inl c/src/exec/rtems/macros/rtems/rtems/eventset.inl c/src/exec/rtems/macros/rtems/rtems/message.inl c/src/exec/rtems/macros/rtems/rtems/modes.inl c/src/exec/rtems/macros/rtems/rtems/options.inl c/src/exec/rtems/macros/rtems/rtems/part.inl c/src/exec/rtems/macros/rtems/rtems/ratemon.inl c/src/exec/rtems/macros/rtems/rtems/region.inl c/src/exec/rtems/macros/rtems/rtems/sem.inl c/src/exec/rtems/macros/rtems/rtems/status.inl c/src/exec/rtems/macros/rtems/rtems/support.inl c/src/exec/rtems/macros/rtems/rtems/tasks.inl c/src/exec/rtems/macros/rtems/rtems/timer.inl c/src/exec/rtems/src/rtclock.c c/src/exec/rtems/src/rtemstimer.c c/src/exec/sapi/headers/confdefs.h c/src/exec/sapi/include/confdefs.h c/src/exec/sapi/include/rtems/config.h c/src/exec/sapi/include/rtems/directives.h c/src/exec/sapi/include/rtems/extension.h c/src/exec/sapi/include/rtems/fatal.h c/src/exec/sapi/include/rtems/init.h c/src/exec/sapi/include/rtems/io.h c/src/exec/sapi/include/rtems/mptables.h c/src/exec/sapi/include/rtems/sptables.h c/src/exec/sapi/inline/rtems/extension.inl c/src/exec/sapi/macros/rtems/extension.inl c/src/exec/sapi/src/exinit.c c/src/exec/score/cpu/hppa1.1/cpu.c c/src/exec/score/cpu/hppa1.1/cpu.h c/src/exec/score/cpu/hppa1.1/cpu_asm.h c/src/exec/score/cpu/hppa1.1/cpu_asm.s c/src/exec/score/cpu/hppa1.1/hppa.h c/src/exec/score/cpu/hppa1.1/hppatypes.h c/src/exec/score/cpu/hppa1.1/rtems.s c/src/exec/score/cpu/mips/asm.h c/src/exec/score/cpu/mips/cpu.c c/src/exec/score/cpu/mips/cpu_asm.S c/src/exec/score/cpu/mips/cpu_asm.h c/src/exec/score/cpu/mips/idtcpu.h c/src/exec/score/cpu/mips/idtmon.h c/src/exec/score/cpu/mips/iregdef.h c/src/exec/score/cpu/mips/rtems.c c/src/exec/score/cpu/powerpc/README c/src/exec/score/cpu/powerpc/TODO c/src/exec/score/cpu/powerpc/cpu.c c/src/exec/score/cpu/powerpc/cpu.h c/src/exec/score/cpu/powerpc/cpu_asm.s c/src/exec/score/cpu/powerpc/irq_stub.s c/src/exec/score/cpu/powerpc/ppc.h c/src/exec/score/cpu/powerpc/ppctypes.h c/src/exec/score/cpu/powerpc/rtems.s c/src/exec/score/include/rtems/debug.h c/src/exec/score/include/rtems/score/address.h c/src/exec/score/include/rtems/score/apiext.h c/src/exec/score/include/rtems/score/bitfield.h c/src/exec/score/include/rtems/score/chain.h c/src/exec/score/include/rtems/score/context.h c/src/exec/score/include/rtems/score/copyrt.h c/src/exec/score/include/rtems/score/coremsg.h c/src/exec/score/include/rtems/score/coremutex.h c/src/exec/score/include/rtems/score/coresem.h c/src/exec/score/include/rtems/score/heap.h c/src/exec/score/include/rtems/score/interr.h c/src/exec/score/include/rtems/score/isr.h c/src/exec/score/include/rtems/score/mpci.h c/src/exec/score/include/rtems/score/mppkt.h c/src/exec/score/include/rtems/score/object.h c/src/exec/score/include/rtems/score/objectmp.h c/src/exec/score/include/rtems/score/priority.h c/src/exec/score/include/rtems/score/stack.h c/src/exec/score/include/rtems/score/states.h c/src/exec/score/include/rtems/score/sysstate.h c/src/exec/score/include/rtems/score/thread.h c/src/exec/score/include/rtems/score/threadmp.h c/src/exec/score/include/rtems/score/threadq.h c/src/exec/score/include/rtems/score/tod.h c/src/exec/score/include/rtems/score/tqdata.h c/src/exec/score/include/rtems/score/userext.h c/src/exec/score/include/rtems/score/watchdog.h c/src/exec/score/include/rtems/score/wkspace.h c/src/exec/score/include/rtems/system.h c/src/exec/score/inline/rtems/score/address.inl c/src/exec/score/inline/rtems/score/chain.inl c/src/exec/score/inline/rtems/score/coremsg.inl c/src/exec/score/inline/rtems/score/coremutex.inl c/src/exec/score/inline/rtems/score/coresem.inl c/src/exec/score/inline/rtems/score/heap.inl c/src/exec/score/inline/rtems/score/isr.inl c/src/exec/score/inline/rtems/score/mppkt.inl c/src/exec/score/inline/rtems/score/object.inl c/src/exec/score/inline/rtems/score/objectmp.inl c/src/exec/score/inline/rtems/score/priority.inl c/src/exec/score/inline/rtems/score/stack.inl c/src/exec/score/inline/rtems/score/states.inl c/src/exec/score/inline/rtems/score/sysstate.inl c/src/exec/score/inline/rtems/score/thread.inl c/src/exec/score/inline/rtems/score/threadmp.inl c/src/exec/score/inline/rtems/score/tod.inl c/src/exec/score/inline/rtems/score/tqdata.inl c/src/exec/score/inline/rtems/score/userext.inl c/src/exec/score/inline/rtems/score/watchdog.inl c/src/exec/score/inline/rtems/score/wkspace.inl c/src/exec/score/macros/rtems/score/README c/src/exec/score/macros/rtems/score/address.inl c/src/exec/score/macros/rtems/score/chain.inl c/src/exec/score/macros/rtems/score/coremsg.inl c/src/exec/score/macros/rtems/score/coremutex.inl c/src/exec/score/macros/rtems/score/coresem.inl c/src/exec/score/macros/rtems/score/heap.inl c/src/exec/score/macros/rtems/score/isr.inl c/src/exec/score/macros/rtems/score/mppkt.inl c/src/exec/score/macros/rtems/score/object.inl c/src/exec/score/macros/rtems/score/objectmp.inl c/src/exec/score/macros/rtems/score/priority.inl c/src/exec/score/macros/rtems/score/stack.inl c/src/exec/score/macros/rtems/score/states.inl c/src/exec/score/macros/rtems/score/sysstate.inl c/src/exec/score/macros/rtems/score/thread.inl c/src/exec/score/macros/rtems/score/threadmp.inl c/src/exec/score/macros/rtems/score/tod.inl c/src/exec/score/macros/rtems/score/tqdata.inl c/src/exec/score/macros/rtems/score/userext.inl c/src/exec/score/macros/rtems/score/watchdog.inl c/src/exec/score/macros/rtems/score/wkspace.inl c/src/exec/score/src/coretod.c c/src/exec/score/tools/hppa1.1/genoffsets.c c/src/lib/include/rtems/assoc.h c/src/lib/include/rtems/error.h c/src/lib/include/rtems/libcsupport.h c/src/lib/include/rtems/libio.h c/src/lib/include/sys/utsname.h c/src/lib/libbsp/hppa1.1/pxfl/README c/src/lib/libbsp/hppa1.1/pxfl/floss-bsp.h c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h c/src/lib/libbsp/hppa1.1/simhppa/include/coverhd.h c/src/lib/libbsp/hppa1.1/simhppa/include/ttydrv.h c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/README c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/addrconv.c c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/intr.c c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/lock.c c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/mpisr.c c/src/lib/libbsp/hppa1.1/simhppa/startup/bspclean.c c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c c/src/lib/libbsp/hppa1.1/simhppa/startup/setvec.c c/src/lib/libbsp/hppa1.1/simhppa/times c/src/lib/libbsp/hppa1.1/simhppa/tools/print_dump.c c/src/lib/libbsp/hppa1.1/simhppa/tty/tty.c c/src/lib/libbsp/mips/p4000/README c/src/lib/libbsp/mips/p4000/console/console.c c/src/lib/libbsp/mips/p4000/console/led.S c/src/lib/libbsp/mips/p4000/include/bsp.h c/src/lib/libbsp/mips/p4000/include/coverhd.h c/src/lib/libbsp/mips/p4000/liblnk/lnklib.S c/src/lib/libbsp/mips/p4000/start/start.S c/src/lib/libbsp/mips/p4000/startup/bspclean.c c/src/lib/libbsp/mips/p4000/startup/ghlinkcmds c/src/lib/libbsp/mips/p4000/startup/idtmem.S c/src/lib/libbsp/mips/p4000/startup/idttlb.S c/src/lib/libbsp/mips/p4000/startup/inittlb.c c/src/lib/libbsp/mips/p4000/startup/linkcmds c/src/lib/libbsp/mips/p4000/startup/setvec.c c/src/lib/libbsp/mips/p4000/times c/src/lib/libbsp/powerpc/papyrus/README c/src/lib/libbsp/powerpc/papyrus/dlentry/dlentry.s c/src/lib/libbsp/powerpc/papyrus/flashentry/flashentry.s c/src/lib/libbsp/powerpc/papyrus/include/bsp.h c/src/lib/libbsp/powerpc/papyrus/include/coverhd.h c/src/lib/libbsp/powerpc/papyrus/startup/bspclean.c c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c c/src/lib/libbsp/powerpc/papyrus/startup/linkcmds c/src/lib/libbsp/powerpc/papyrus/startup/setvec.c c/src/lib/libbsp/powerpc/papyrus/times c/src/lib/libc/utsname.c c/src/lib/libcpu/hppa1.1/clock/clock.c c/src/lib/libcpu/hppa1.1/runway/runway.h c/src/lib/libcpu/hppa1.1/semaphore/semaphore.c c/src/lib/libcpu/hppa1.1/semaphore/semaphore.h c/src/lib/libcpu/hppa1.1/timer/timer.c c/src/lib/libcpu/mips/clock/ckinit.c c/src/lib/libcpu/mips/clock/clock.S c/src/lib/libcpu/mips/clock/clock.h c/src/lib/libcpu/mips/timer/gettime.S c/src/lib/libcpu/mips/timer/timer.c c/src/lib/libcpu/powerpc/README c/src/lib/libcpu/powerpc/ppc403/README c/src/lib/libcpu/powerpc/ppc403/clock/clock.c c/src/lib/libcpu/powerpc/ppc403/console/console.c c/src/lib/libcpu/powerpc/ppc403/timer/timer.c c/src/lib/libcpu/powerpc/ppc403/vectors/README c/src/lib/libcpu/powerpc/ppc403/vectors/align_h.s c/src/lib/libcpu/powerpc/ppc403/vectors/vectors.s c/src/lib/libcpu/sparc/include/erc32.h c/src/libchip/shmdr/README c/src/libchip/shmdr/addlq.c c/src/libchip/shmdr/cnvpkt.c c/src/libchip/shmdr/dump.c c/src/libchip/shmdr/fatal.c c/src/libchip/shmdr/getlq.c c/src/libchip/shmdr/getpkt.c c/src/libchip/shmdr/init.c c/src/libchip/shmdr/initlq.c c/src/libchip/shmdr/intr.c c/src/libchip/shmdr/mpci.h c/src/libchip/shmdr/mpisr.c c/src/libchip/shmdr/poll.c c/src/libchip/shmdr/receive.c c/src/libchip/shmdr/retpkt.c c/src/libchip/shmdr/send.c c/src/libchip/shmdr/setckvec.c c/src/libchip/shmdr/shm_driver.h c/src/optman/rtems/no-dpmem.c c/src/optman/rtems/no-event.c c/src/optman/rtems/no-mp.c c/src/optman/rtems/no-msg.c c/src/optman/rtems/no-part.c c/src/optman/rtems/no-region.c c/src/optman/rtems/no-rtmon.c c/src/optman/rtems/no-sem.c c/src/optman/rtems/no-signal.c c/src/optman/rtems/no-timer.c c/src/optman/sapi/no-ext.c c/src/optman/sapi/no-io.c cpukit/libcsupport/include/clockdrv.h cpukit/libcsupport/include/console.h cpukit/libcsupport/include/iosupp.h cpukit/libcsupport/include/ringbuf.h cpukit/libcsupport/include/rtems/assoc.h cpukit/libcsupport/include/rtems/error.h cpukit/libcsupport/include/rtems/libcsupport.h cpukit/libcsupport/include/rtems/libio.h cpukit/libcsupport/include/spurious.h cpukit/libcsupport/include/sys/utsname.h cpukit/libcsupport/include/timerdrv.h cpukit/libcsupport/include/vmeintr.h cpukit/libcsupport/src/README cpukit/libcsupport/src/__brk.c cpukit/libcsupport/src/__gettod.c cpukit/libcsupport/src/__times.c cpukit/libcsupport/src/assoc.c cpukit/libcsupport/src/error.c cpukit/libcsupport/src/hosterr.c cpukit/libcsupport/src/libio.c cpukit/libcsupport/src/malloc.c cpukit/libcsupport/src/newlibc.c cpukit/libcsupport/src/no_libc.c cpukit/libcsupport/src/unixlibc.c cpukit/libcsupport/src/utsname.c cpukit/libmisc/README cpukit/libmisc/monitor/README cpukit/libmisc/monitor/mon-command.c cpukit/libmisc/monitor/mon-config.c cpukit/libmisc/monitor/mon-dname.c cpukit/libmisc/monitor/mon-driver.c cpukit/libmisc/monitor/mon-extension.c cpukit/libmisc/monitor/mon-itask.c cpukit/libmisc/monitor/mon-manager.c cpukit/libmisc/monitor/mon-monitor.c cpukit/libmisc/monitor/mon-mpci.c cpukit/libmisc/monitor/mon-object.c cpukit/libmisc/monitor/mon-prmisc.c cpukit/libmisc/monitor/mon-queue.c cpukit/libmisc/monitor/mon-server.c cpukit/libmisc/monitor/mon-symbols.c cpukit/libmisc/monitor/mon-task.c cpukit/libmisc/monitor/monitor.h cpukit/libmisc/monitor/symbols.h cpukit/libmisc/stackchk/README cpukit/libmisc/stackchk/check.c cpukit/libmisc/stackchk/internal.h cpukit/libmisc/stackchk/stackchk.h cpukit/posix/include/aio.h cpukit/posix/include/devctl.h cpukit/posix/include/intr.h cpukit/posix/include/mqueue.h cpukit/posix/include/rtems/posix/cancel.h cpukit/posix/include/rtems/posix/cond.h cpukit/posix/include/rtems/posix/condmp.h cpukit/posix/include/rtems/posix/config.h cpukit/posix/include/rtems/posix/intr.h cpukit/posix/include/rtems/posix/key.h cpukit/posix/include/rtems/posix/mqueue.h cpukit/posix/include/rtems/posix/mqueuemp.h cpukit/posix/include/rtems/posix/mutex.h cpukit/posix/include/rtems/posix/mutexmp.h cpukit/posix/include/rtems/posix/posixapi.h cpukit/posix/include/rtems/posix/priority.h cpukit/posix/include/rtems/posix/psignal.h cpukit/posix/include/rtems/posix/pthread.h cpukit/posix/include/rtems/posix/pthreadmp.h cpukit/posix/include/rtems/posix/semaphore.h cpukit/posix/include/rtems/posix/semaphoremp.h cpukit/posix/include/rtems/posix/threadsup.h cpukit/posix/include/rtems/posix/time.h cpukit/posix/include/sched.h cpukit/posix/include/semaphore.h cpukit/posix/inline/rtems/posix/cond.inl cpukit/posix/inline/rtems/posix/intr.inl cpukit/posix/inline/rtems/posix/key.inl cpukit/posix/inline/rtems/posix/mqueue.inl cpukit/posix/inline/rtems/posix/mutex.inl cpukit/posix/inline/rtems/posix/priority.inl cpukit/posix/inline/rtems/posix/pthread.inl cpukit/posix/inline/rtems/posix/semaphore.inl cpukit/posix/src/adasupp.c cpukit/posix/src/aio.c cpukit/posix/src/cancel.c cpukit/posix/src/cond.c cpukit/posix/src/devctl.c cpukit/posix/src/intr.c cpukit/posix/src/key.c cpukit/posix/src/mqueue.c cpukit/posix/src/mutex.c cpukit/posix/src/psignal.c cpukit/posix/src/pthread.c cpukit/posix/src/ptimer.c cpukit/posix/src/sched.c cpukit/posix/src/semaphore.c cpukit/posix/src/time.c cpukit/posix/src/types.c cpukit/rtems/include/rtems.h cpukit/rtems/include/rtems/rtems/asr.h cpukit/rtems/include/rtems/rtems/attr.h cpukit/rtems/include/rtems/rtems/clock.h cpukit/rtems/include/rtems/rtems/config.h cpukit/rtems/include/rtems/rtems/dpmem.h cpukit/rtems/include/rtems/rtems/event.h cpukit/rtems/include/rtems/rtems/eventmp.h cpukit/rtems/include/rtems/rtems/eventset.h cpukit/rtems/include/rtems/rtems/intr.h cpukit/rtems/include/rtems/rtems/message.h cpukit/rtems/include/rtems/rtems/modes.h cpukit/rtems/include/rtems/rtems/mp.h cpukit/rtems/include/rtems/rtems/msgmp.h cpukit/rtems/include/rtems/rtems/options.h cpukit/rtems/include/rtems/rtems/part.h cpukit/rtems/include/rtems/rtems/partmp.h cpukit/rtems/include/rtems/rtems/ratemon.h cpukit/rtems/include/rtems/rtems/region.h cpukit/rtems/include/rtems/rtems/regionmp.h cpukit/rtems/include/rtems/rtems/rtemsapi.h cpukit/rtems/include/rtems/rtems/sem.h cpukit/rtems/include/rtems/rtems/semmp.h cpukit/rtems/include/rtems/rtems/signal.h cpukit/rtems/include/rtems/rtems/signalmp.h cpukit/rtems/include/rtems/rtems/status.h cpukit/rtems/include/rtems/rtems/support.h cpukit/rtems/include/rtems/rtems/taskmp.h cpukit/rtems/include/rtems/rtems/tasks.h cpukit/rtems/include/rtems/rtems/timer.h cpukit/rtems/include/rtems/rtems/types.h cpukit/rtems/inline/rtems/rtems/asr.inl cpukit/rtems/inline/rtems/rtems/attr.inl cpukit/rtems/inline/rtems/rtems/dpmem.inl cpukit/rtems/inline/rtems/rtems/event.inl cpukit/rtems/inline/rtems/rtems/eventset.inl cpukit/rtems/inline/rtems/rtems/message.inl cpukit/rtems/inline/rtems/rtems/modes.inl cpukit/rtems/inline/rtems/rtems/options.inl cpukit/rtems/inline/rtems/rtems/part.inl cpukit/rtems/inline/rtems/rtems/ratemon.inl cpukit/rtems/inline/rtems/rtems/region.inl cpukit/rtems/inline/rtems/rtems/sem.inl cpukit/rtems/inline/rtems/rtems/status.inl cpukit/rtems/inline/rtems/rtems/support.inl cpukit/rtems/inline/rtems/rtems/tasks.inl cpukit/rtems/inline/rtems/rtems/timer.inl cpukit/rtems/macros/rtems/rtems/asr.inl cpukit/rtems/macros/rtems/rtems/attr.inl cpukit/rtems/macros/rtems/rtems/dpmem.inl cpukit/rtems/macros/rtems/rtems/event.inl cpukit/rtems/macros/rtems/rtems/eventset.inl cpukit/rtems/macros/rtems/rtems/message.inl cpukit/rtems/macros/rtems/rtems/modes.inl cpukit/rtems/macros/rtems/rtems/options.inl cpukit/rtems/macros/rtems/rtems/part.inl cpukit/rtems/macros/rtems/rtems/ratemon.inl cpukit/rtems/macros/rtems/rtems/region.inl cpukit/rtems/macros/rtems/rtems/sem.inl cpukit/rtems/macros/rtems/rtems/status.inl cpukit/rtems/macros/rtems/rtems/support.inl cpukit/rtems/macros/rtems/rtems/tasks.inl cpukit/rtems/macros/rtems/rtems/timer.inl cpukit/rtems/src/dpmem.c cpukit/rtems/src/event.c cpukit/rtems/src/eventmp.c cpukit/rtems/src/intr.c cpukit/rtems/src/mp.c cpukit/rtems/src/msg.c cpukit/rtems/src/msgmp.c cpukit/rtems/src/part.c cpukit/rtems/src/partmp.c cpukit/rtems/src/ratemon.c cpukit/rtems/src/region.c cpukit/rtems/src/regionmp.c cpukit/rtems/src/rtclock.c cpukit/rtems/src/rtemstimer.c cpukit/rtems/src/sem.c cpukit/rtems/src/semmp.c cpukit/rtems/src/signal.c cpukit/rtems/src/signalmp.c cpukit/rtems/src/taskmp.c cpukit/rtems/src/tasks.c cpukit/sapi/include/confdefs.h cpukit/sapi/include/rtems/config.h cpukit/sapi/include/rtems/extension.h cpukit/sapi/include/rtems/fatal.h cpukit/sapi/include/rtems/init.h cpukit/sapi/include/rtems/io.h cpukit/sapi/include/rtems/mptables.h cpukit/sapi/inline/rtems/extension.inl cpukit/sapi/macros/rtems/extension.inl cpukit/sapi/src/debug.c cpukit/sapi/src/exinit.c cpukit/sapi/src/extension.c cpukit/sapi/src/fatal.c cpukit/sapi/src/io.c cpukit/sapi/src/posixapi.c cpukit/sapi/src/rtemsapi.c cpukit/score/cpu/a29k/amd.ah cpukit/score/cpu/a29k/asm.h cpukit/score/cpu/a29k/cpu.c cpukit/score/cpu/a29k/pswmacro.ah cpukit/score/cpu/hppa1.1/cpu.c cpukit/score/cpu/i386/asm.h cpukit/score/cpu/i386/cpu.c cpukit/score/cpu/i386/rtems/asm.h cpukit/score/cpu/i960/asm.h cpukit/score/cpu/i960/cpu.c cpukit/score/cpu/m68k/asm.h cpukit/score/cpu/m68k/cpu.c cpukit/score/cpu/m68k/m68302.h cpukit/score/cpu/m68k/m68360.h cpukit/score/cpu/m68k/qsm.h cpukit/score/cpu/m68k/rtems/asm.h cpukit/score/cpu/m68k/rtems/m68k/m68302.h cpukit/score/cpu/m68k/rtems/m68k/m68360.h cpukit/score/cpu/m68k/rtems/m68k/qsm.h cpukit/score/cpu/m68k/rtems/m68k/sim.h cpukit/score/cpu/m68k/sim.h cpukit/score/cpu/mips/asm.h cpukit/score/cpu/mips/cpu.c cpukit/score/cpu/mips/cpu_asm.S cpukit/score/cpu/mips/idtcpu.h cpukit/score/cpu/mips/iregdef.h cpukit/score/cpu/mips/rtems/asm.h cpukit/score/cpu/mips/rtems/mips/idtcpu.h cpukit/score/cpu/mips/rtems/mips/iregdef.h cpukit/score/cpu/mips64orion/asm.h cpukit/score/cpu/mips64orion/cpu.c cpukit/score/cpu/mips64orion/cpu_asm.S cpukit/score/cpu/mips64orion/cpu_asm.h cpukit/score/cpu/mips64orion/idtcpu.h cpukit/score/cpu/mips64orion/idtmon.h cpukit/score/cpu/mips64orion/iregdef.h cpukit/score/cpu/no_cpu/asm.h cpukit/score/cpu/no_cpu/cpu.c cpukit/score/cpu/no_cpu/cpu_asm.c cpukit/score/cpu/no_cpu/rtems/asm.h cpukit/score/cpu/sparc/README cpukit/score/cpu/sparc/asm.h cpukit/score/cpu/sparc/cpu.c cpukit/score/cpu/sparc/rtems/asm.h cpukit/score/cpu/unix/cpu.c cpukit/score/include/rtems/debug.h cpukit/score/include/rtems/score/address.h cpukit/score/include/rtems/score/apiext.h cpukit/score/include/rtems/score/bitfield.h cpukit/score/include/rtems/score/chain.h cpukit/score/include/rtems/score/context.h cpukit/score/include/rtems/score/copyrt.h cpukit/score/include/rtems/score/coremsg.h cpukit/score/include/rtems/score/coremutex.h cpukit/score/include/rtems/score/coresem.h cpukit/score/include/rtems/score/heap.h cpukit/score/include/rtems/score/interr.h cpukit/score/include/rtems/score/isr.h cpukit/score/include/rtems/score/mpci.h cpukit/score/include/rtems/score/mppkt.h cpukit/score/include/rtems/score/object.h cpukit/score/include/rtems/score/objectmp.h cpukit/score/include/rtems/score/priority.h cpukit/score/include/rtems/score/stack.h cpukit/score/include/rtems/score/states.h cpukit/score/include/rtems/score/sysstate.h cpukit/score/include/rtems/score/thread.h cpukit/score/include/rtems/score/threadmp.h cpukit/score/include/rtems/score/threadq.h cpukit/score/include/rtems/score/tod.h cpukit/score/include/rtems/score/tqdata.h cpukit/score/include/rtems/score/userext.h cpukit/score/include/rtems/score/watchdog.h cpukit/score/include/rtems/score/wkspace.h cpukit/score/include/rtems/system.h cpukit/score/inline/rtems/score/address.inl cpukit/score/inline/rtems/score/chain.inl cpukit/score/inline/rtems/score/coremsg.inl cpukit/score/inline/rtems/score/coremutex.inl cpukit/score/inline/rtems/score/coresem.inl cpukit/score/inline/rtems/score/heap.inl cpukit/score/inline/rtems/score/isr.inl cpukit/score/inline/rtems/score/mppkt.inl cpukit/score/inline/rtems/score/object.inl cpukit/score/inline/rtems/score/objectmp.inl cpukit/score/inline/rtems/score/priority.inl cpukit/score/inline/rtems/score/stack.inl cpukit/score/inline/rtems/score/states.inl cpukit/score/inline/rtems/score/sysstate.inl cpukit/score/inline/rtems/score/thread.inl cpukit/score/inline/rtems/score/threadmp.inl cpukit/score/inline/rtems/score/tod.inl cpukit/score/inline/rtems/score/tqdata.inl cpukit/score/inline/rtems/score/userext.inl cpukit/score/inline/rtems/score/watchdog.inl cpukit/score/inline/rtems/score/wkspace.inl cpukit/score/macros/README cpukit/score/macros/rtems/score/README cpukit/score/macros/rtems/score/address.inl cpukit/score/macros/rtems/score/chain.inl cpukit/score/macros/rtems/score/coremsg.inl cpukit/score/macros/rtems/score/coremutex.inl cpukit/score/macros/rtems/score/coresem.inl cpukit/score/macros/rtems/score/heap.inl cpukit/score/macros/rtems/score/isr.inl cpukit/score/macros/rtems/score/mppkt.inl cpukit/score/macros/rtems/score/object.inl cpukit/score/macros/rtems/score/objectmp.inl cpukit/score/macros/rtems/score/priority.inl cpukit/score/macros/rtems/score/stack.inl cpukit/score/macros/rtems/score/states.inl cpukit/score/macros/rtems/score/sysstate.inl cpukit/score/macros/rtems/score/thread.inl cpukit/score/macros/rtems/score/threadmp.inl cpukit/score/macros/rtems/score/tod.inl cpukit/score/macros/rtems/score/tqdata.inl cpukit/score/macros/rtems/score/userext.inl cpukit/score/macros/rtems/score/watchdog.inl cpukit/score/macros/rtems/score/wkspace.inl cpukit/score/src/apiext.c cpukit/score/src/chain.c cpukit/score/src/coremsg.c cpukit/score/src/coremutex.c cpukit/score/src/coresem.c cpukit/score/src/coretod.c cpukit/score/src/heap.c cpukit/score/src/interr.c cpukit/score/src/isr.c cpukit/score/src/mpci.c cpukit/score/src/object.c cpukit/score/src/objectmp.c cpukit/score/src/thread.c cpukit/score/src/threadmp.c cpukit/score/src/threadq.c cpukit/score/src/userext.c cpukit/score/src/watchdog.c cpukit/score/src/wkspace.c cpukit/zlib/doc/rfc1950.txt cpukit/zlib/doc/rfc1951.txt cpukit/zlib/doc/rfc1952.txt testsuites/README testsuites/libtests/README testsuites/libtests/malloctest/init.c testsuites/libtests/malloctest/system.h testsuites/libtests/malloctest/task1.c testsuites/libtests/stackchk/blow.c testsuites/libtests/stackchk/init.c testsuites/libtests/stackchk/stackchk.scn testsuites/libtests/stackchk/system.h testsuites/libtests/stackchk/task1.c testsuites/mptests/README testsuites/mptests/mp01/init.c testsuites/mptests/mp01/node1/mp01.doc testsuites/mptests/mp01/node1/mp01.scn testsuites/mptests/mp01/node2/mp01.doc testsuites/mptests/mp01/node2/mp01.scn testsuites/mptests/mp01/system.h testsuites/mptests/mp01/task1.c testsuites/mptests/mp02/init.c testsuites/mptests/mp02/node1/mp02.doc testsuites/mptests/mp02/node1/mp02.scn testsuites/mptests/mp02/node2/mp02.doc testsuites/mptests/mp02/node2/mp02.scn testsuites/mptests/mp02/system.h testsuites/mptests/mp02/task1.c testsuites/mptests/mp03/delay.c testsuites/mptests/mp03/init.c testsuites/mptests/mp03/node1/mp03.doc testsuites/mptests/mp03/node1/mp03.scn testsuites/mptests/mp03/node2/mp03.doc testsuites/mptests/mp03/node2/mp03.scn testsuites/mptests/mp03/system.h testsuites/mptests/mp03/task1.c testsuites/mptests/mp04/init.c testsuites/mptests/mp04/node1/mp04.doc testsuites/mptests/mp04/node1/mp04.scn testsuites/mptests/mp04/node2/mp04.doc testsuites/mptests/mp04/node2/mp04.scn testsuites/mptests/mp04/system.h testsuites/mptests/mp04/task1.c testsuites/mptests/mp05/asr.c testsuites/mptests/mp05/init.c testsuites/mptests/mp05/node1/mp05.doc testsuites/mptests/mp05/node1/mp05.scn testsuites/mptests/mp05/node2/mp05.doc testsuites/mptests/mp05/node2/mp05.scn testsuites/mptests/mp05/system.h testsuites/mptests/mp05/task1.c testsuites/mptests/mp06/init.c testsuites/mptests/mp06/node1/mp06.doc testsuites/mptests/mp06/node1/mp06.scn testsuites/mptests/mp06/node2/mp06.doc testsuites/mptests/mp06/node2/mp06.scn testsuites/mptests/mp06/system.h testsuites/mptests/mp06/task1.c testsuites/mptests/mp07/init.c testsuites/mptests/mp07/node1/mp07.doc testsuites/mptests/mp07/node1/mp07.scn testsuites/mptests/mp07/node2/mp07.doc testsuites/mptests/mp07/node2/mp07.scn testsuites/mptests/mp07/system.h testsuites/mptests/mp07/task1.c testsuites/mptests/mp08/init.c testsuites/mptests/mp08/node1/mp08.doc testsuites/mptests/mp08/node1/mp08.scn testsuites/mptests/mp08/node2/mp08.doc testsuites/mptests/mp08/node2/mp08.scn testsuites/mptests/mp08/system.h testsuites/mptests/mp08/task1.c testsuites/mptests/mp09/init.c testsuites/mptests/mp09/node1/mp09.doc testsuites/mptests/mp09/node1/mp09.scn testsuites/mptests/mp09/node2/mp09.doc testsuites/mptests/mp09/node2/mp09.scn testsuites/mptests/mp09/recvmsg.c testsuites/mptests/mp09/sendmsg.c testsuites/mptests/mp09/system.h testsuites/mptests/mp09/task1.c testsuites/mptests/mp10/init.c testsuites/mptests/mp10/node1/mp10.doc testsuites/mptests/mp10/node1/mp10.scn testsuites/mptests/mp10/node2/mp10.doc testsuites/mptests/mp10/node2/mp10.scn testsuites/mptests/mp10/system.h testsuites/mptests/mp10/task1.c testsuites/mptests/mp10/task2.c testsuites/mptests/mp10/task3.c testsuites/mptests/mp11/init.c testsuites/mptests/mp11/node1/mp11.doc testsuites/mptests/mp11/node1/mp11.scn testsuites/mptests/mp11/node2/mp11.doc testsuites/mptests/mp11/node2/mp11.scn testsuites/mptests/mp11/system.h testsuites/mptests/mp12/init.c testsuites/mptests/mp12/node1/mp12.doc testsuites/mptests/mp12/node1/mp12.scn testsuites/mptests/mp12/node2/mp12.doc testsuites/mptests/mp12/node2/mp12.scn testsuites/mptests/mp12/system.h testsuites/mptests/mp13/init.c testsuites/mptests/mp13/node1/mp13.doc testsuites/mptests/mp13/node1/mp13.scn testsuites/mptests/mp13/node2/mp13.doc testsuites/mptests/mp13/node2/mp13.scn testsuites/mptests/mp13/system.h testsuites/mptests/mp13/task1.c testsuites/mptests/mp13/task2.c testsuites/mptests/mp14/delay.c testsuites/mptests/mp14/evtask1.c testsuites/mptests/mp14/evtmtask.c testsuites/mptests/mp14/exit.c testsuites/mptests/mp14/init.c testsuites/mptests/mp14/msgtask1.c testsuites/mptests/mp14/node1/mp14.doc testsuites/mptests/mp14/node1/mp14.scn testsuites/mptests/mp14/node2/mp14.doc testsuites/mptests/mp14/node2/mp14.scn testsuites/mptests/mp14/pttask1.c testsuites/mptests/mp14/smtask1.c testsuites/mptests/mp14/system.h testsuites/psxtests/include/pmacros.h testsuites/psxtests/psx01/init.c testsuites/psxtests/psx01/psx01.scn testsuites/psxtests/psx01/system.h testsuites/psxtests/psx01/task.c testsuites/psxtests/psx02/init.c testsuites/psxtests/psx02/psx02.scn testsuites/psxtests/psx02/system.h testsuites/psxtests/psx02/task.c testsuites/psxtests/psx03/init.c testsuites/psxtests/psx03/psx03.scn testsuites/psxtests/psx03/system.h testsuites/psxtests/psx03/task.c testsuites/psxtests/psx04/init.c testsuites/psxtests/psx04/psx04.scn testsuites/psxtests/psx04/system.h testsuites/psxtests/psx04/task1.c testsuites/psxtests/psx04/task2.c testsuites/psxtests/psx04/task3.c testsuites/psxtests/psx05/init.c testsuites/psxtests/psx05/psx05.scn testsuites/psxtests/psx05/system.h testsuites/psxtests/psx05/task.c testsuites/psxtests/psx05/task2.c testsuites/psxtests/psx05/task3.c testsuites/psxtests/psx06/init.c testsuites/psxtests/psx06/psx06.scn testsuites/psxtests/psx06/system.h testsuites/psxtests/psx06/task.c testsuites/psxtests/psx06/task2.c testsuites/psxtests/psx07/init.c testsuites/psxtests/psx07/psx07.scn testsuites/psxtests/psx07/system.h testsuites/psxtests/psx07/task.c testsuites/psxtests/psx08/init.c testsuites/psxtests/psx08/psx08.scn testsuites/psxtests/psx08/system.h testsuites/psxtests/psx08/task2.c testsuites/psxtests/psx09/init.c testsuites/psxtests/psx09/psx09.scn testsuites/psxtests/psx09/system.h testsuites/psxtests/psx10/init.c testsuites/psxtests/psx10/psx10.scn testsuites/psxtests/psx10/system.h testsuites/psxtests/psx10/task.c testsuites/psxtests/psx10/task2.c testsuites/psxtests/psx10/task3.c testsuites/psxtests/psx11/init.c testsuites/psxtests/psx11/psx11.scn testsuites/psxtests/psx11/system.h testsuites/psxtests/psx11/task.c testsuites/psxtests/psx12/init.c testsuites/psxtests/psx12/psx12.scn testsuites/psxtests/psx12/system.h testsuites/psxtests/psx12/task.c testsuites/psxtests/psxhdrs/clock01.c testsuites/psxtests/psxhdrs/clock02.c testsuites/psxtests/psxhdrs/clock03.c testsuites/psxtests/psxhdrs/clock04.c testsuites/psxtests/psxhdrs/clock05.c testsuites/psxtests/psxhdrs/clock06.c testsuites/psxtests/psxhdrs/cond01.c testsuites/psxtests/psxhdrs/cond02.c testsuites/psxtests/psxhdrs/cond03.c testsuites/psxtests/psxhdrs/cond04.c testsuites/psxtests/psxhdrs/cond05.c testsuites/psxtests/psxhdrs/cond06.c testsuites/psxtests/psxhdrs/cond07.c testsuites/psxtests/psxhdrs/cond08.c testsuites/psxtests/psxhdrs/cond09.c testsuites/psxtests/psxhdrs/cond10.c testsuites/psxtests/psxhdrs/key01.c testsuites/psxtests/psxhdrs/key02.c testsuites/psxtests/psxhdrs/key03.c testsuites/psxtests/psxhdrs/key04.c testsuites/psxtests/psxhdrs/mutex01.c testsuites/psxtests/psxhdrs/mutex02.c testsuites/psxtests/psxhdrs/mutex03.c testsuites/psxtests/psxhdrs/mutex04.c testsuites/psxtests/psxhdrs/mutex05.c testsuites/psxtests/psxhdrs/mutex06.c testsuites/psxtests/psxhdrs/mutex07.c testsuites/psxtests/psxhdrs/mutex08.c testsuites/psxtests/psxhdrs/mutex09.c testsuites/psxtests/psxhdrs/mutex10.c testsuites/psxtests/psxhdrs/mutex11.c testsuites/psxtests/psxhdrs/mutex12.c testsuites/psxtests/psxhdrs/mutex13.c testsuites/psxtests/psxhdrs/mutex14.c testsuites/psxtests/psxhdrs/mutex15.c testsuites/psxtests/psxhdrs/mutex16.c testsuites/psxtests/psxhdrs/proc01.c testsuites/psxtests/psxhdrs/proc02.c testsuites/psxtests/psxhdrs/proc03.c testsuites/psxtests/psxhdrs/proc04.c testsuites/psxtests/psxhdrs/proc05.c testsuites/psxtests/psxhdrs/proc06.c testsuites/psxtests/psxhdrs/proc07.c testsuites/psxtests/psxhdrs/proc08.c testsuites/psxtests/psxhdrs/proc09.c testsuites/psxtests/psxhdrs/proc10.c testsuites/psxtests/psxhdrs/proc11.c testsuites/psxtests/psxhdrs/proc12.c testsuites/psxtests/psxhdrs/proc13.c testsuites/psxtests/psxhdrs/proc14.c testsuites/psxtests/psxhdrs/pthread01.c testsuites/psxtests/psxhdrs/pthread02.c testsuites/psxtests/psxhdrs/pthread03.c testsuites/psxtests/psxhdrs/pthread04.c testsuites/psxtests/psxhdrs/pthread05.c testsuites/psxtests/psxhdrs/pthread06.c testsuites/psxtests/psxhdrs/pthread07.c testsuites/psxtests/psxhdrs/pthread08.c testsuites/psxtests/psxhdrs/pthread09.c testsuites/psxtests/psxhdrs/pthread10.c testsuites/psxtests/psxhdrs/pthread11.c testsuites/psxtests/psxhdrs/pthread12.c testsuites/psxtests/psxhdrs/pthread13.c testsuites/psxtests/psxhdrs/pthread14.c testsuites/psxtests/psxhdrs/pthread15.c testsuites/psxtests/psxhdrs/pthread16.c testsuites/psxtests/psxhdrs/pthread17.c testsuites/psxtests/psxhdrs/pthread18.c testsuites/psxtests/psxhdrs/pthread19.c testsuites/psxtests/psxhdrs/pthread20.c testsuites/psxtests/psxhdrs/pthread21.c testsuites/psxtests/psxhdrs/pthread22.c testsuites/psxtests/psxhdrs/pthread23.c testsuites/psxtests/psxhdrs/pthread24.c testsuites/psxtests/psxhdrs/pthread25.c testsuites/psxtests/psxhdrs/pthread26.c testsuites/psxtests/psxhdrs/pthread27.c testsuites/psxtests/psxhdrs/pthread28.c testsuites/psxtests/psxhdrs/pthread29.c testsuites/psxtests/psxhdrs/pthread30.c testsuites/psxtests/psxhdrs/pthread31.c testsuites/psxtests/psxhdrs/pthread32.c testsuites/psxtests/psxhdrs/pthread33.c testsuites/psxtests/psxhdrs/pthread34.c testsuites/psxtests/psxhdrs/pthread35.c testsuites/psxtests/psxhdrs/pthread36.c testsuites/psxtests/psxhdrs/sched01.c testsuites/psxtests/psxhdrs/sched02.c testsuites/psxtests/psxhdrs/sched03.c testsuites/psxtests/psxhdrs/sched04.c testsuites/psxtests/psxhdrs/sched05.c testsuites/psxtests/psxhdrs/sched06.c testsuites/psxtests/psxhdrs/sched07.c testsuites/psxtests/psxhdrs/sched08.c testsuites/psxtests/psxhdrs/signal01.c testsuites/psxtests/psxhdrs/signal02.c testsuites/psxtests/psxhdrs/signal03.c testsuites/psxtests/psxhdrs/signal04.c testsuites/psxtests/psxhdrs/signal05.c testsuites/psxtests/psxhdrs/signal06.c testsuites/psxtests/psxhdrs/signal07.c testsuites/psxtests/psxhdrs/signal08.c testsuites/psxtests/psxhdrs/signal09.c testsuites/psxtests/psxhdrs/signal10.c testsuites/psxtests/psxhdrs/signal11.c testsuites/psxtests/psxhdrs/signal12.c testsuites/psxtests/psxhdrs/signal13.c testsuites/psxtests/psxhdrs/signal14.c testsuites/psxtests/psxhdrs/signal15.c testsuites/psxtests/psxhdrs/signal16.c testsuites/psxtests/psxhdrs/signal17.c testsuites/psxtests/psxhdrs/signal18.c testsuites/psxtests/psxhdrs/signal19.c testsuites/psxtests/psxhdrs/signal20.c testsuites/psxtests/psxhdrs/signal21.c testsuites/psxtests/psxhdrs/signal22.c testsuites/psxtests/psxhdrs/time01.c testsuites/psxtests/psxhdrs/time02.c testsuites/psxtests/psxhdrs/time03.c testsuites/psxtests/psxhdrs/time04.c testsuites/psxtests/psxhdrs/time05.c testsuites/psxtests/psxhdrs/time06.c testsuites/psxtests/psxhdrs/time07.c testsuites/psxtests/psxhdrs/time08.c testsuites/psxtests/psxhdrs/time09.c testsuites/psxtests/psxhdrs/time10.c testsuites/psxtests/psxhdrs/time11.c testsuites/psxtests/psxhdrs/time12.c testsuites/psxtests/psxhdrs/time13.c testsuites/psxtests/psxhdrs/timer01.c testsuites/psxtests/psxhdrs/timer02.c testsuites/psxtests/psxhdrs/timer03.c testsuites/psxtests/psxhdrs/timer04.c testsuites/psxtests/psxhdrs/timer05.c testsuites/psxtests/psxhdrs/timer06.c testsuites/samples/README testsuites/samples/base_mp/apptask.c testsuites/samples/base_mp/init.c testsuites/samples/base_mp/node1/base_mp.doc testsuites/samples/base_mp/node1/base_mp.scn testsuites/samples/base_mp/node2/base_mp.doc testsuites/samples/base_mp/node2/base_mp.scn testsuites/samples/base_mp/system.h testsuites/samples/base_sp/apptask.c testsuites/samples/base_sp/base_sp.doc testsuites/samples/base_sp/base_sp.scn testsuites/samples/base_sp/init.c testsuites/samples/base_sp/system.h testsuites/samples/cdtest/cdtest.scn testsuites/samples/cdtest/init.c testsuites/samples/cdtest/main.cc testsuites/samples/cdtest/system.h testsuites/samples/hello/hello.doc testsuites/samples/hello/hello.scn testsuites/samples/hello/init.c testsuites/samples/hello/system.h testsuites/samples/paranoia/init.c testsuites/samples/paranoia/paranoia.c testsuites/samples/paranoia/paranoia.doc testsuites/samples/paranoia/system.h testsuites/samples/ticker/init.c testsuites/samples/ticker/system.h testsuites/samples/ticker/tasks.c testsuites/samples/ticker/ticker.doc testsuites/samples/ticker/ticker.scn testsuites/sptests/README testsuites/sptests/sp01/init.c testsuites/sptests/sp01/sp01.doc testsuites/sptests/sp01/sp01.scn testsuites/sptests/sp01/system.h testsuites/sptests/sp01/task1.c testsuites/sptests/sp02/init.c testsuites/sptests/sp02/preempt.c testsuites/sptests/sp02/sp02.doc testsuites/sptests/sp02/sp02.scn testsuites/sptests/sp02/system.h testsuites/sptests/sp02/task1.c testsuites/sptests/sp02/task2.c testsuites/sptests/sp02/task3.c testsuites/sptests/sp03/init.c testsuites/sptests/sp03/sp03.doc testsuites/sptests/sp03/sp03.scn testsuites/sptests/sp03/system.h testsuites/sptests/sp03/task1.c testsuites/sptests/sp03/task2.c testsuites/sptests/sp04/init.c testsuites/sptests/sp04/sp04.doc testsuites/sptests/sp04/sp04.scn testsuites/sptests/sp04/system.h testsuites/sptests/sp04/task1.c testsuites/sptests/sp04/task2.c testsuites/sptests/sp04/task3.c testsuites/sptests/sp04/tswitch.c testsuites/sptests/sp05/init.c testsuites/sptests/sp05/sp05.doc testsuites/sptests/sp05/sp05.scn testsuites/sptests/sp05/system.h testsuites/sptests/sp05/task1.c testsuites/sptests/sp05/task2.c testsuites/sptests/sp05/task3.c testsuites/sptests/sp06/init.c testsuites/sptests/sp06/sp06.doc testsuites/sptests/sp06/sp06.scn testsuites/sptests/sp06/system.h testsuites/sptests/sp06/task1.c testsuites/sptests/sp06/task2.c testsuites/sptests/sp06/task3.c testsuites/sptests/sp07/init.c testsuites/sptests/sp07/sp07.doc testsuites/sptests/sp07/sp07.scn testsuites/sptests/sp07/system.h testsuites/sptests/sp07/task1.c testsuites/sptests/sp07/task2.c testsuites/sptests/sp07/task3.c testsuites/sptests/sp07/task4.c testsuites/sptests/sp07/taskexit.c testsuites/sptests/sp07/tcreate.c testsuites/sptests/sp07/tdelete.c testsuites/sptests/sp07/trestart.c testsuites/sptests/sp07/tstart.c testsuites/sptests/sp08/init.c testsuites/sptests/sp08/sp08.doc testsuites/sptests/sp08/sp08.scn testsuites/sptests/sp08/system.h testsuites/sptests/sp08/task1.c testsuites/sptests/sp09/delay.c testsuites/sptests/sp09/init.c testsuites/sptests/sp09/isr.c testsuites/sptests/sp09/screen01.c testsuites/sptests/sp09/screen02.c testsuites/sptests/sp09/screen03.c testsuites/sptests/sp09/screen04.c testsuites/sptests/sp09/screen05.c testsuites/sptests/sp09/screen06.c testsuites/sptests/sp09/screen07.c testsuites/sptests/sp09/screen08.c testsuites/sptests/sp09/screen09.c testsuites/sptests/sp09/screen10.c testsuites/sptests/sp09/screen11.c testsuites/sptests/sp09/screen12.c testsuites/sptests/sp09/screen13.c testsuites/sptests/sp09/screen14.c testsuites/sptests/sp09/sp09.doc testsuites/sptests/sp09/sp09.scn testsuites/sptests/sp09/system.h testsuites/sptests/sp09/task1.c testsuites/sptests/sp09/task2.c testsuites/sptests/sp09/task3.c testsuites/sptests/sp09/task4.c testsuites/sptests/sp11/init.c testsuites/sptests/sp11/sp11.doc testsuites/sptests/sp11/sp11.scn testsuites/sptests/sp11/system.h testsuites/sptests/sp11/task1.c testsuites/sptests/sp11/task2.c testsuites/sptests/sp11/timer.c testsuites/sptests/sp12/init.c testsuites/sptests/sp12/pridrv.c testsuites/sptests/sp12/pritask.c testsuites/sptests/sp12/sp12.doc testsuites/sptests/sp12/sp12.scn testsuites/sptests/sp12/system.h testsuites/sptests/sp12/task1.c testsuites/sptests/sp12/task2.c testsuites/sptests/sp12/task3.c testsuites/sptests/sp12/task4.c testsuites/sptests/sp12/task5.c testsuites/sptests/sp13/fillbuff.c testsuites/sptests/sp13/init.c testsuites/sptests/sp13/putbuff.c testsuites/sptests/sp13/sp13.doc testsuites/sptests/sp13/sp13.scn testsuites/sptests/sp13/system.h testsuites/sptests/sp13/task1.c testsuites/sptests/sp13/task2.c testsuites/sptests/sp13/task3.c testsuites/sptests/sp14/asr.c testsuites/sptests/sp14/init.c testsuites/sptests/sp14/sp14.doc testsuites/sptests/sp14/sp14.scn testsuites/sptests/sp14/system.h testsuites/sptests/sp14/task1.c testsuites/sptests/sp14/task2.c testsuites/sptests/sp15/init.c testsuites/sptests/sp15/sp15.doc testsuites/sptests/sp15/sp15.scn testsuites/sptests/sp15/system.h testsuites/sptests/sp15/task1.c testsuites/sptests/sp16/init.c testsuites/sptests/sp16/sp16.doc testsuites/sptests/sp16/sp16.scn testsuites/sptests/sp16/system.h testsuites/sptests/sp16/task1.c testsuites/sptests/sp16/task2.c testsuites/sptests/sp16/task3.c testsuites/sptests/sp16/task4.c testsuites/sptests/sp16/task5.c testsuites/sptests/sp17/asr.c testsuites/sptests/sp17/init.c testsuites/sptests/sp17/sp17.doc testsuites/sptests/sp17/sp17.scn testsuites/sptests/sp17/system.h testsuites/sptests/sp17/task1.c testsuites/sptests/sp17/task2.c testsuites/sptests/sp19/first.c testsuites/sptests/sp19/fptask.c testsuites/sptests/sp19/fptest.h testsuites/sptests/sp19/init.c testsuites/sptests/sp19/inttest.h testsuites/sptests/sp19/sp19.doc testsuites/sptests/sp19/sp19.scn testsuites/sptests/sp19/system.h testsuites/sptests/sp19/task1.c testsuites/sptests/sp20/getall.c testsuites/sptests/sp20/init.c testsuites/sptests/sp20/sp20.doc testsuites/sptests/sp20/sp20.scn testsuites/sptests/sp20/system.h testsuites/sptests/sp20/task1.c testsuites/sptests/sp21/init.c testsuites/sptests/sp21/sp21.doc testsuites/sptests/sp21/sp21.scn testsuites/sptests/sp21/system.h testsuites/sptests/sp21/task1.c testsuites/sptests/sp22/delay.c testsuites/sptests/sp22/init.c testsuites/sptests/sp22/prtime.c testsuites/sptests/sp22/sp22.doc testsuites/sptests/sp22/sp22.scn testsuites/sptests/sp22/system.h testsuites/sptests/sp22/task1.c testsuites/sptests/sp23/init.c testsuites/sptests/sp23/sp23.doc testsuites/sptests/sp23/sp23.scn testsuites/sptests/sp23/system.h testsuites/sptests/sp23/task1.c testsuites/sptests/sp24/init.c testsuites/sptests/sp24/resume.c testsuites/sptests/sp24/sp24.doc testsuites/sptests/sp24/sp24.scn testsuites/sptests/sp24/system.h testsuites/sptests/sp24/task1.c testsuites/sptests/sp25/init.c testsuites/sptests/sp25/sp25.doc testsuites/sptests/sp25/sp25.scn testsuites/sptests/sp25/system.h testsuites/sptests/sp25/task1.c testsuites/sptests/spfatal/fatal.c testsuites/sptests/spfatal/init.c testsuites/sptests/spfatal/puterr.c testsuites/sptests/spfatal/spfatal.doc testsuites/sptests/spfatal/spfatal.scn testsuites/sptests/spfatal/system.h testsuites/sptests/spfatal/task1.c testsuites/sptests/spsize/getint.c testsuites/sptests/spsize/init.c testsuites/sptests/spsize/size.c testsuites/sptests/spsize/system.h testsuites/support/include/tmacros.h testsuites/tmtests/README testsuites/tmtests/include/timesys.h testsuites/tmtests/tm01/system.h testsuites/tmtests/tm01/task1.c testsuites/tmtests/tm01/tm01.doc testsuites/tmtests/tm02/system.h testsuites/tmtests/tm02/task1.c testsuites/tmtests/tm02/tm02.doc testsuites/tmtests/tm03/system.h testsuites/tmtests/tm03/task1.c testsuites/tmtests/tm03/tm03.doc testsuites/tmtests/tm04/system.h testsuites/tmtests/tm04/task1.c testsuites/tmtests/tm04/tm04.doc testsuites/tmtests/tm05/system.h testsuites/tmtests/tm05/task1.c testsuites/tmtests/tm05/tm05.doc testsuites/tmtests/tm06/system.h testsuites/tmtests/tm06/task1.c testsuites/tmtests/tm06/tm06.doc testsuites/tmtests/tm07/system.h testsuites/tmtests/tm07/task1.c testsuites/tmtests/tm07/tm07.doc testsuites/tmtests/tm08/system.h testsuites/tmtests/tm08/task1.c testsuites/tmtests/tm08/tm08.doc testsuites/tmtests/tm09/system.h testsuites/tmtests/tm09/task1.c testsuites/tmtests/tm09/tm09.doc testsuites/tmtests/tm10/system.h testsuites/tmtests/tm10/task1.c testsuites/tmtests/tm10/tm10.doc testsuites/tmtests/tm11/system.h testsuites/tmtests/tm11/task1.c testsuites/tmtests/tm11/tm11.doc testsuites/tmtests/tm12/system.h testsuites/tmtests/tm12/task1.c testsuites/tmtests/tm12/tm12.doc testsuites/tmtests/tm13/system.h testsuites/tmtests/tm13/task1.c testsuites/tmtests/tm13/tm13.doc testsuites/tmtests/tm14/system.h testsuites/tmtests/tm14/task1.c testsuites/tmtests/tm14/tm14.doc testsuites/tmtests/tm15/system.h testsuites/tmtests/tm15/task1.c testsuites/tmtests/tm15/tm15.doc testsuites/tmtests/tm16/system.h testsuites/tmtests/tm16/task1.c testsuites/tmtests/tm16/tm16.doc testsuites/tmtests/tm17/system.h testsuites/tmtests/tm17/task1.c testsuites/tmtests/tm17/tm17.doc testsuites/tmtests/tm18/system.h testsuites/tmtests/tm18/task1.c testsuites/tmtests/tm18/tm18.doc testsuites/tmtests/tm19/system.h testsuites/tmtests/tm19/task1.c testsuites/tmtests/tm19/tm19.doc testsuites/tmtests/tm20/system.h testsuites/tmtests/tm20/task1.c testsuites/tmtests/tm20/tm20.doc testsuites/tmtests/tm21/system.h testsuites/tmtests/tm21/task1.c testsuites/tmtests/tm21/tm21.doc testsuites/tmtests/tm22/system.h testsuites/tmtests/tm22/task1.c testsuites/tmtests/tm22/tm22.doc testsuites/tmtests/tm23/system.h testsuites/tmtests/tm23/task1.c testsuites/tmtests/tm23/tm23.doc testsuites/tmtests/tm24/system.h testsuites/tmtests/tm24/task1.c testsuites/tmtests/tm24/tm24.doc testsuites/tmtests/tm25/system.h testsuites/tmtests/tm25/task1.c testsuites/tmtests/tm25/tm25.doc testsuites/tmtests/tm26/fptest.h testsuites/tmtests/tm26/system.h testsuites/tmtests/tm26/task1.c testsuites/tmtests/tm26/tm26.doc testsuites/tmtests/tm27/system.h testsuites/tmtests/tm27/task1.c testsuites/tmtests/tm27/tm27.doc testsuites/tmtests/tm28/system.h testsuites/tmtests/tm28/task1.c testsuites/tmtests/tm28/tm28.doc testsuites/tmtests/tm29/system.h testsuites/tmtests/tm29/task1.c testsuites/tmtests/tm29/tm29.doc testsuites/tmtests/tmck/system.h testsuites/tmtests/tmck/task1.c testsuites/tmtests/tmck/tmck.doc testsuites/tmtests/tmoverhd/dumrtems.h testsuites/tmtests/tmoverhd/empty.c testsuites/tmtests/tmoverhd/system.h testsuites/tmtests/tmoverhd/testtask.c testsuites/tmtests/tmoverhd/tmoverhd.doc tools/build/README tools/build/cklength.c tools/build/eolstrip.c tools/build/os/msdos/README tools/build/os/msdos/cklength.uue tools/build/os/msdos/fixtimer.c tools/build/os/msdos/fixtimer.uue tools/build/os/msdos/ifc.c tools/build/os/msdos/ifc_exe.uue tools/build/packhex.c tools/build/scripts/README tools/build/src/cklength.c tools/build/src/eolstrip.c tools/build/src/packhex.c tools/build/src/unhex.c tools/build/unhex.c tools/cpu/hppa1.1/genoffsets.c tools/cpu/unix/gensize.c tools/update/310_to_320_list tools/update/README --- c/src/exec/libcsupport/include/clockdrv.h | 51 - c/src/exec/libcsupport/include/console.h | 69 -- c/src/exec/libcsupport/include/iosupp.h | 44 - c/src/exec/libcsupport/include/ringbuf.h | 53 - c/src/exec/libcsupport/include/rtems/assoc.h | 42 - c/src/exec/libcsupport/include/rtems/error.h | 33 - c/src/exec/libcsupport/include/rtems/libcsupport.h | 43 - c/src/exec/libcsupport/include/rtems/libio.h | 98 -- c/src/exec/libcsupport/include/spurious.h | 38 - c/src/exec/libcsupport/include/sys/utsname.h | 49 - c/src/exec/libcsupport/include/timerdrv.h | 40 - c/src/exec/libcsupport/include/vmeintr.h | 58 -- c/src/exec/libcsupport/src/README | 37 - c/src/exec/libcsupport/src/__brk.c | 44 - c/src/exec/libcsupport/src/__gettod.c | 103 -- c/src/exec/libcsupport/src/__times.c | 65 -- c/src/exec/libcsupport/src/assoc.c | 260 ----- c/src/exec/libcsupport/src/error.c | 209 ---- c/src/exec/libcsupport/src/hosterr.c | 43 - c/src/exec/libcsupport/src/libio.c | 444 --------- c/src/exec/libcsupport/src/malloc.c | 400 -------- c/src/exec/libcsupport/src/newlibc.c | 423 -------- c/src/exec/libcsupport/src/no_libc.c | 55 -- c/src/exec/libcsupport/src/unixlibc.c | 21 - c/src/exec/libcsupport/src/utsname.c | 57 -- c/src/exec/posix/include/limits.h | 164 ---- c/src/exec/posix/include/rtems/posix/cancel.h | 16 - c/src/exec/posix/include/rtems/posix/cond.h | 130 --- c/src/exec/posix/include/rtems/posix/condmp.h | 162 ---- c/src/exec/posix/include/rtems/posix/config.h | 59 -- c/src/exec/posix/include/rtems/posix/intr.h | 154 --- c/src/exec/posix/include/rtems/posix/key.h | 136 --- c/src/exec/posix/include/rtems/posix/mqueue.h | 186 ---- c/src/exec/posix/include/rtems/posix/mqueuemp.h | 161 ---- c/src/exec/posix/include/rtems/posix/mutex.h | 120 --- c/src/exec/posix/include/rtems/posix/mutexmp.h | 161 ---- c/src/exec/posix/include/rtems/posix/posixapi.h | 34 - c/src/exec/posix/include/rtems/posix/priority.h | 38 - c/src/exec/posix/include/rtems/posix/psignal.h | 17 - c/src/exec/posix/include/rtems/posix/pthread.h | 123 --- c/src/exec/posix/include/rtems/posix/pthreadmp.h | 161 ---- c/src/exec/posix/include/rtems/posix/semaphore.h | 135 --- c/src/exec/posix/include/rtems/posix/semaphoremp.h | 161 ---- c/src/exec/posix/include/rtems/posix/seterr.h | 20 - c/src/exec/posix/include/rtems/posix/threadsup.h | 46 - c/src/exec/posix/include/rtems/posix/time.h | 50 - c/src/exec/posix/include/sys/utsname.h | 49 - c/src/exec/rtems/include/rtems.h | 121 --- c/src/exec/rtems/include/rtems/rtems/asr.h | 112 --- c/src/exec/rtems/include/rtems/rtems/attr.h | 84 -- c/src/exec/rtems/include/rtems/rtems/clock.h | 103 -- c/src/exec/rtems/include/rtems/rtems/config.h | 54 -- c/src/exec/rtems/include/rtems/rtems/dpmem.h | 157 --- c/src/exec/rtems/include/rtems/rtems/event.h | 174 ---- c/src/exec/rtems/include/rtems/rtems/eventmp.h | 147 --- c/src/exec/rtems/include/rtems/rtems/eventset.h | 89 -- c/src/exec/rtems/include/rtems/rtems/intr.h | 160 --- c/src/exec/rtems/include/rtems/rtems/message.h | 317 ------ c/src/exec/rtems/include/rtems/rtems/modes.h | 89 -- c/src/exec/rtems/include/rtems/rtems/mp.h | 53 - c/src/exec/rtems/include/rtems/rtems/msgmp.h | 175 ---- c/src/exec/rtems/include/rtems/rtems/options.h | 53 - c/src/exec/rtems/include/rtems/rtems/part.h | 168 ---- c/src/exec/rtems/include/rtems/rtems/partmp.h | 161 ---- c/src/exec/rtems/include/rtems/rtems/ratemon.h | 185 ---- c/src/exec/rtems/include/rtems/rtems/region.h | 234 ----- c/src/exec/rtems/include/rtems/rtems/regionmp.h | 166 ---- c/src/exec/rtems/include/rtems/rtems/rtemsapi.h | 34 - c/src/exec/rtems/include/rtems/rtems/sem.h | 248 ----- c/src/exec/rtems/include/rtems/rtems/semmp.h | 163 ---- c/src/exec/rtems/include/rtems/rtems/signal.h | 83 -- c/src/exec/rtems/include/rtems/rtems/signalmp.h | 147 --- c/src/exec/rtems/include/rtems/rtems/status.h | 82 -- c/src/exec/rtems/include/rtems/rtems/support.h | 97 -- c/src/exec/rtems/include/rtems/rtems/taskmp.h | 167 ---- c/src/exec/rtems/include/rtems/rtems/tasks.h | 421 -------- c/src/exec/rtems/include/rtems/rtems/timer.h | 207 ---- c/src/exec/rtems/include/rtems/rtems/types.h | 96 -- c/src/exec/rtems/inline/rtems/rtems/asr.inl | 128 --- c/src/exec/rtems/inline/rtems/rtems/attr.inl | 159 --- c/src/exec/rtems/inline/rtems/rtems/dpmem.inl | 95 -- c/src/exec/rtems/inline/rtems/rtems/event.inl | 21 - c/src/exec/rtems/inline/rtems/rtems/eventset.inl | 91 -- c/src/exec/rtems/inline/rtems/rtems/message.inl | 83 -- c/src/exec/rtems/inline/rtems/rtems/modes.inl | 152 --- c/src/exec/rtems/inline/rtems/rtems/options.inl | 55 -- c/src/exec/rtems/inline/rtems/rtems/part.inl | 199 ---- c/src/exec/rtems/inline/rtems/rtems/ratemon.inl | 143 --- c/src/exec/rtems/inline/rtems/rtems/region.inl | 127 --- c/src/exec/rtems/inline/rtems/rtems/sem.inl | 93 -- c/src/exec/rtems/inline/rtems/rtems/status.inl | 56 -- c/src/exec/rtems/inline/rtems/rtems/support.inl | 61 -- c/src/exec/rtems/inline/rtems/rtems/tasks.inl | 90 -- c/src/exec/rtems/inline/rtems/rtems/timer.inl | 142 --- c/src/exec/rtems/macros/rtems/rtems/asr.inl | 90 -- c/src/exec/rtems/macros/rtems/rtems/attr.inl | 91 -- c/src/exec/rtems/macros/rtems/rtems/dpmem.inl | 59 -- c/src/exec/rtems/macros/rtems/rtems/event.inl | 21 - c/src/exec/rtems/macros/rtems/rtems/eventset.inl | 53 - c/src/exec/rtems/macros/rtems/rtems/message.inl | 49 - c/src/exec/rtems/macros/rtems/rtems/modes.inl | 92 -- c/src/exec/rtems/macros/rtems/rtems/options.inl | 39 - c/src/exec/rtems/macros/rtems/rtems/part.inl | 117 --- c/src/exec/rtems/macros/rtems/rtems/ratemon.inl | 85 -- c/src/exec/rtems/macros/rtems/rtems/region.inl | 75 -- c/src/exec/rtems/macros/rtems/rtems/sem.inl | 58 -- c/src/exec/rtems/macros/rtems/rtems/status.inl | 39 - c/src/exec/rtems/macros/rtems/rtems/support.inl | 44 - c/src/exec/rtems/macros/rtems/rtems/tasks.inl | 58 -- c/src/exec/rtems/macros/rtems/rtems/timer.inl | 85 -- c/src/exec/rtems/src/rtclock.c | 151 --- c/src/exec/rtems/src/rtemstimer.c | 349 ------- c/src/exec/sapi/headers/confdefs.h | 485 ---------- c/src/exec/sapi/include/confdefs.h | 485 ---------- c/src/exec/sapi/include/rtems/config.h | 103 -- c/src/exec/sapi/include/rtems/directives.h | 120 --- c/src/exec/sapi/include/rtems/extension.h | 136 --- c/src/exec/sapi/include/rtems/fatal.h | 49 - c/src/exec/sapi/include/rtems/init.h | 110 --- c/src/exec/sapi/include/rtems/io.h | 244 ----- c/src/exec/sapi/include/rtems/mptables.h | 29 - c/src/exec/sapi/include/rtems/sptables.h | 162 ---- c/src/exec/sapi/inline/rtems/extension.inl | 91 -- c/src/exec/sapi/macros/rtems/extension.inl | 58 -- c/src/exec/sapi/src/exinit.c | 294 ------ c/src/exec/score/cpu/hppa1.1/cpu.c | 191 ---- c/src/exec/score/cpu/hppa1.1/cpu.h | 607 ------------ c/src/exec/score/cpu/hppa1.1/cpu_asm.h | 73 -- c/src/exec/score/cpu/hppa1.1/cpu_asm.s | 705 -------------- c/src/exec/score/cpu/hppa1.1/hppa.h | 745 -------------- c/src/exec/score/cpu/hppa1.1/hppatypes.h | 46 - c/src/exec/score/cpu/hppa1.1/rtems.s | 53 - c/src/exec/score/cpu/mips/asm.h | 99 -- c/src/exec/score/cpu/mips/cpu.c | 216 ----- c/src/exec/score/cpu/mips/cpu_asm.S | 972 ------------------- c/src/exec/score/cpu/mips/cpu_asm.h | 115 --- c/src/exec/score/cpu/mips/idtcpu.h | 440 --------- c/src/exec/score/cpu/mips/idtmon.h | 171 ---- c/src/exec/score/cpu/mips/iregdef.h | 325 ------- c/src/exec/score/cpu/mips/rtems.c | 49 - c/src/exec/score/cpu/powerpc/README | 71 -- c/src/exec/score/cpu/powerpc/TODO | 7 - c/src/exec/score/cpu/powerpc/cpu.c | 264 ----- c/src/exec/score/cpu/powerpc/cpu.h | 1017 -------------------- c/src/exec/score/cpu/powerpc/cpu_asm.s | 749 -------------- c/src/exec/score/cpu/powerpc/irq_stub.s | 228 ----- c/src/exec/score/cpu/powerpc/ppc.h | 318 ------ c/src/exec/score/cpu/powerpc/ppctypes.h | 74 -- c/src/exec/score/cpu/powerpc/rtems.s | 132 --- c/src/exec/score/include/rtems/debug.h | 98 -- c/src/exec/score/include/rtems/score/address.h | 31 - c/src/exec/score/include/rtems/score/apiext.h | 102 -- c/src/exec/score/include/rtems/score/bitfield.h | 98 -- c/src/exec/score/include/rtems/score/chain.h | 168 ---- c/src/exec/score/include/rtems/score/context.h | 134 --- c/src/exec/score/include/rtems/score/copyrt.h | 42 - c/src/exec/score/include/rtems/score/coremsg.h | 267 ----- c/src/exec/score/include/rtems/score/coremutex.h | 172 ---- c/src/exec/score/include/rtems/score/coresem.h | 156 --- c/src/exec/score/include/rtems/score/heap.h | 226 ----- c/src/exec/score/include/rtems/score/interr.h | 95 -- c/src/exec/score/include/rtems/score/isr.h | 224 ----- c/src/exec/score/include/rtems/score/mpci.h | 412 -------- c/src/exec/score/include/rtems/score/mppkt.h | 101 -- c/src/exec/score/include/rtems/score/object.h | 397 -------- c/src/exec/score/include/rtems/score/objectmp.h | 152 --- c/src/exec/score/include/rtems/score/priority.h | 97 -- c/src/exec/score/include/rtems/score/stack.h | 50 - c/src/exec/score/include/rtems/score/states.h | 84 -- c/src/exec/score/include/rtems/score/sysstate.h | 66 -- c/src/exec/score/include/rtems/score/thread.h | 623 ------------ c/src/exec/score/include/rtems/score/threadmp.h | 89 -- c/src/exec/score/include/rtems/score/threadq.h | 301 ------ c/src/exec/score/include/rtems/score/tod.h | 262 ----- c/src/exec/score/include/rtems/score/tqdata.h | 90 -- c/src/exec/score/include/rtems/score/userext.h | 213 ---- c/src/exec/score/include/rtems/score/watchdog.h | 194 ---- c/src/exec/score/include/rtems/score/wkspace.h | 71 -- c/src/exec/score/include/rtems/system.h | 157 --- c/src/exec/score/inline/rtems/score/address.inl | 120 --- c/src/exec/score/inline/rtems/score/chain.inl | 390 -------- c/src/exec/score/inline/rtems/score/coremsg.inl | 260 ----- c/src/exec/score/inline/rtems/score/coremutex.inl | 124 --- c/src/exec/score/inline/rtems/score/coresem.inl | 54 -- c/src/exec/score/inline/rtems/score/heap.inl | 274 ------ c/src/exec/score/inline/rtems/score/isr.inl | 73 -- c/src/exec/score/inline/rtems/score/mppkt.inl | 58 -- c/src/exec/score/inline/rtems/score/object.inl | 244 ----- c/src/exec/score/inline/rtems/score/objectmp.inl | 73 -- c/src/exec/score/inline/rtems/score/priority.inl | 247 ----- c/src/exec/score/inline/rtems/score/stack.inl | 81 -- c/src/exec/score/inline/rtems/score/states.inl | 384 -------- c/src/exec/score/inline/rtems/score/sysstate.inl | 154 --- c/src/exec/score/inline/rtems/score/thread.inl | 404 -------- c/src/exec/score/inline/rtems/score/threadmp.inl | 61 -- c/src/exec/score/inline/rtems/score/tod.inl | 67 -- c/src/exec/score/inline/rtems/score/tqdata.inl | 73 -- c/src/exec/score/inline/rtems/score/userext.inl | 121 --- c/src/exec/score/inline/rtems/score/watchdog.inl | 324 ------- c/src/exec/score/inline/rtems/score/wkspace.inl | 57 -- c/src/exec/score/macros/rtems/score/README | 18 - c/src/exec/score/macros/rtems/score/address.inl | 68 -- c/src/exec/score/macros/rtems/score/chain.inl | 200 ---- c/src/exec/score/macros/rtems/score/coremsg.inl | 143 --- c/src/exec/score/macros/rtems/score/coremutex.inl | 77 -- c/src/exec/score/macros/rtems/score/coresem.inl | 40 - c/src/exec/score/macros/rtems/score/heap.inl | 150 --- c/src/exec/score/macros/rtems/score/isr.inl | 48 - c/src/exec/score/macros/rtems/score/mppkt.inl | 41 - c/src/exec/score/macros/rtems/score/object.inl | 148 --- c/src/exec/score/macros/rtems/score/objectmp.inl | 50 - c/src/exec/score/macros/rtems/score/priority.inl | 170 ---- c/src/exec/score/macros/rtems/score/stack.inl | 50 - c/src/exec/score/macros/rtems/score/states.inl | 210 ---- c/src/exec/score/macros/rtems/score/sysstate.inl | 90 -- c/src/exec/score/macros/rtems/score/thread.inl | 217 ----- c/src/exec/score/macros/rtems/score/threadmp.inl | 50 - c/src/exec/score/macros/rtems/score/tod.inl | 49 - c/src/exec/score/macros/rtems/score/tqdata.inl | 50 - c/src/exec/score/macros/rtems/score/userext.inl | 126 --- c/src/exec/score/macros/rtems/score/watchdog.inl | 172 ---- c/src/exec/score/macros/rtems/score/wkspace.inl | 39 - c/src/exec/score/src/coretod.c | 238 ----- c/src/exec/score/tools/hppa1.1/genoffsets.c | 346 ------- c/src/lib/include/rtems/assoc.h | 42 - c/src/lib/include/rtems/error.h | 33 - c/src/lib/include/rtems/libcsupport.h | 43 - c/src/lib/include/rtems/libio.h | 98 -- c/src/lib/include/sys/utsname.h | 49 - c/src/lib/libbsp/hppa1.1/pxfl/README | 8 - c/src/lib/libbsp/hppa1.1/pxfl/floss-bsp.h | 11 - c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h | 121 --- c/src/lib/libbsp/hppa1.1/simhppa/include/coverhd.h | 104 -- c/src/lib/libbsp/hppa1.1/simhppa/include/ttydrv.h | 54 -- c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/README | 9 - .../lib/libbsp/hppa1.1/simhppa/shmsupp/addrconv.c | 30 - c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c | 89 -- c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/intr.c | 51 - c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/lock.c | 75 -- c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/mpisr.c | 27 - .../lib/libbsp/hppa1.1/simhppa/startup/bspclean.c | 36 - .../lib/libbsp/hppa1.1/simhppa/startup/bspstart.c | 439 --------- c/src/lib/libbsp/hppa1.1/simhppa/startup/setvec.c | 66 -- c/src/lib/libbsp/hppa1.1/simhppa/times | 7 - .../lib/libbsp/hppa1.1/simhppa/tools/print_dump.c | 332 ------- c/src/lib/libbsp/hppa1.1/simhppa/tty/tty.c | 254 ----- c/src/lib/libbsp/mips/p4000/README | 47 - c/src/lib/libbsp/mips/p4000/console/console.c | 270 ------ c/src/lib/libbsp/mips/p4000/console/led.S | 23 - c/src/lib/libbsp/mips/p4000/include/bsp.h | 126 --- c/src/lib/libbsp/mips/p4000/include/coverhd.h | 116 --- c/src/lib/libbsp/mips/p4000/liblnk/lnklib.S | 62 -- c/src/lib/libbsp/mips/p4000/start/start.S | 299 ------ c/src/lib/libbsp/mips/p4000/startup/bspclean.c | 31 - c/src/lib/libbsp/mips/p4000/startup/ghlinkcmds | 15 - c/src/lib/libbsp/mips/p4000/startup/idtmem.S | 938 ------------------ c/src/lib/libbsp/mips/p4000/startup/idttlb.S | 390 -------- c/src/lib/libbsp/mips/p4000/startup/inittlb.c | 16 - c/src/lib/libbsp/mips/p4000/startup/linkcmds | 72 -- c/src/lib/libbsp/mips/p4000/startup/setvec.c | 49 - c/src/lib/libbsp/mips/p4000/times | 200 ---- c/src/lib/libbsp/powerpc/papyrus/README | 50 - c/src/lib/libbsp/powerpc/papyrus/dlentry/dlentry.s | 251 ----- .../libbsp/powerpc/papyrus/flashentry/flashentry.s | 289 ------ c/src/lib/libbsp/powerpc/papyrus/include/bsp.h | 154 --- c/src/lib/libbsp/powerpc/papyrus/include/coverhd.h | 135 --- .../lib/libbsp/powerpc/papyrus/startup/bspclean.c | 44 - .../lib/libbsp/powerpc/papyrus/startup/bspstart.c | 276 ------ c/src/lib/libbsp/powerpc/papyrus/startup/linkcmds | 77 -- c/src/lib/libbsp/powerpc/papyrus/startup/setvec.c | 58 -- c/src/lib/libbsp/powerpc/papyrus/times | 197 ---- c/src/lib/libc/utsname.c | 57 -- c/src/lib/libcpu/hppa1.1/clock/clock.c | 267 ----- c/src/lib/libcpu/hppa1.1/runway/runway.h | 37 - c/src/lib/libcpu/hppa1.1/semaphore/semaphore.c | 308 ------ c/src/lib/libcpu/hppa1.1/semaphore/semaphore.h | 84 -- c/src/lib/libcpu/hppa1.1/timer/timer.c | 63 -- c/src/lib/libcpu/mips/clock/ckinit.c | 245 ----- c/src/lib/libcpu/mips/clock/clock.S | 45 - c/src/lib/libcpu/mips/clock/clock.h | 25 - c/src/lib/libcpu/mips/timer/gettime.S | 35 - c/src/lib/libcpu/mips/timer/timer.c | 136 --- c/src/lib/libcpu/powerpc/README | 13 - c/src/lib/libcpu/powerpc/ppc403/README | 22 - c/src/lib/libcpu/powerpc/ppc403/clock/clock.c | 265 ----- c/src/lib/libcpu/powerpc/ppc403/console/console.c | 387 -------- c/src/lib/libcpu/powerpc/ppc403/timer/timer.c | 98 -- c/src/lib/libcpu/powerpc/ppc403/vectors/README | 25 - c/src/lib/libcpu/powerpc/ppc403/vectors/align_h.s | 433 --------- c/src/lib/libcpu/powerpc/ppc403/vectors/vectors.s | 282 ------ c/src/lib/libcpu/sparc/include/erc32.h | 523 ---------- c/src/libchip/shmdr/README | 9 - c/src/libchip/shmdr/addlq.c | 43 - c/src/libchip/shmdr/cnvpkt.c | 42 - c/src/libchip/shmdr/dump.c | 51 - c/src/libchip/shmdr/fatal.c | 39 - c/src/libchip/shmdr/getlq.c | 48 - c/src/libchip/shmdr/getpkt.c | 36 - c/src/libchip/shmdr/init.c | 254 ----- c/src/libchip/shmdr/initlq.c | 35 - c/src/libchip/shmdr/intr.c | 58 -- c/src/libchip/shmdr/mpci.h | 59 -- c/src/libchip/shmdr/mpisr.c | 23 - c/src/libchip/shmdr/poll.c | 53 - c/src/libchip/shmdr/receive.c | 44 - c/src/libchip/shmdr/retpkt.c | 32 - c/src/libchip/shmdr/send.c | 61 -- c/src/libchip/shmdr/setckvec.c | 34 - c/src/libchip/shmdr/shm_driver.h | 539 ----------- c/src/optman/rtems/no-dpmem.c | 98 -- c/src/optman/rtems/no-event.c | 56 -- c/src/optman/rtems/no-mp.c | 201 ---- c/src/optman/rtems/no-msg.c | 192 ---- c/src/optman/rtems/no-part.c | 97 -- c/src/optman/rtems/no-region.c | 114 --- c/src/optman/rtems/no-rtmon.c | 117 --- c/src/optman/rtems/no-sem.c | 114 --- c/src/optman/rtems/no-signal.c | 56 -- c/src/optman/rtems/no-timer.c | 123 --- c/src/optman/sapi/no-ext.c | 67 -- c/src/optman/sapi/no-io.c | 145 --- 321 files changed, 46850 deletions(-) delete mode 100644 c/src/exec/libcsupport/include/clockdrv.h delete mode 100644 c/src/exec/libcsupport/include/console.h delete mode 100644 c/src/exec/libcsupport/include/iosupp.h delete mode 100644 c/src/exec/libcsupport/include/ringbuf.h delete mode 100644 c/src/exec/libcsupport/include/rtems/assoc.h delete mode 100644 c/src/exec/libcsupport/include/rtems/error.h delete mode 100644 c/src/exec/libcsupport/include/rtems/libcsupport.h delete mode 100644 c/src/exec/libcsupport/include/rtems/libio.h delete mode 100644 c/src/exec/libcsupport/include/spurious.h delete mode 100644 c/src/exec/libcsupport/include/sys/utsname.h delete mode 100644 c/src/exec/libcsupport/include/timerdrv.h delete mode 100644 c/src/exec/libcsupport/include/vmeintr.h delete mode 100644 c/src/exec/libcsupport/src/README delete mode 100644 c/src/exec/libcsupport/src/__brk.c delete mode 100644 c/src/exec/libcsupport/src/__gettod.c delete mode 100644 c/src/exec/libcsupport/src/__times.c delete mode 100644 c/src/exec/libcsupport/src/assoc.c delete mode 100644 c/src/exec/libcsupport/src/error.c delete mode 100644 c/src/exec/libcsupport/src/hosterr.c delete mode 100644 c/src/exec/libcsupport/src/libio.c delete mode 100644 c/src/exec/libcsupport/src/malloc.c delete mode 100644 c/src/exec/libcsupport/src/newlibc.c delete mode 100644 c/src/exec/libcsupport/src/no_libc.c delete mode 100644 c/src/exec/libcsupport/src/unixlibc.c delete mode 100644 c/src/exec/libcsupport/src/utsname.c delete mode 100644 c/src/exec/posix/include/limits.h delete mode 100644 c/src/exec/posix/include/rtems/posix/cancel.h delete mode 100644 c/src/exec/posix/include/rtems/posix/cond.h delete mode 100644 c/src/exec/posix/include/rtems/posix/condmp.h delete mode 100644 c/src/exec/posix/include/rtems/posix/config.h delete mode 100644 c/src/exec/posix/include/rtems/posix/intr.h delete mode 100644 c/src/exec/posix/include/rtems/posix/key.h delete mode 100644 c/src/exec/posix/include/rtems/posix/mqueue.h delete mode 100644 c/src/exec/posix/include/rtems/posix/mqueuemp.h delete mode 100644 c/src/exec/posix/include/rtems/posix/mutex.h delete mode 100644 c/src/exec/posix/include/rtems/posix/mutexmp.h delete mode 100644 c/src/exec/posix/include/rtems/posix/posixapi.h delete mode 100644 c/src/exec/posix/include/rtems/posix/priority.h delete mode 100644 c/src/exec/posix/include/rtems/posix/psignal.h delete mode 100644 c/src/exec/posix/include/rtems/posix/pthread.h delete mode 100644 c/src/exec/posix/include/rtems/posix/pthreadmp.h delete mode 100644 c/src/exec/posix/include/rtems/posix/semaphore.h delete mode 100644 c/src/exec/posix/include/rtems/posix/semaphoremp.h delete mode 100644 c/src/exec/posix/include/rtems/posix/seterr.h delete mode 100644 c/src/exec/posix/include/rtems/posix/threadsup.h delete mode 100644 c/src/exec/posix/include/rtems/posix/time.h delete mode 100644 c/src/exec/posix/include/sys/utsname.h delete mode 100644 c/src/exec/rtems/include/rtems.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/asr.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/attr.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/clock.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/config.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/dpmem.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/event.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/eventmp.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/eventset.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/intr.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/message.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/modes.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/mp.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/msgmp.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/options.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/part.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/partmp.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/ratemon.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/region.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/regionmp.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/rtemsapi.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/sem.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/semmp.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/signal.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/signalmp.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/status.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/support.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/taskmp.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/tasks.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/timer.h delete mode 100644 c/src/exec/rtems/include/rtems/rtems/types.h delete mode 100644 c/src/exec/rtems/inline/rtems/rtems/asr.inl delete mode 100644 c/src/exec/rtems/inline/rtems/rtems/attr.inl delete mode 100644 c/src/exec/rtems/inline/rtems/rtems/dpmem.inl delete mode 100644 c/src/exec/rtems/inline/rtems/rtems/event.inl delete mode 100644 c/src/exec/rtems/inline/rtems/rtems/eventset.inl delete mode 100644 c/src/exec/rtems/inline/rtems/rtems/message.inl delete mode 100644 c/src/exec/rtems/inline/rtems/rtems/modes.inl delete mode 100644 c/src/exec/rtems/inline/rtems/rtems/options.inl delete mode 100644 c/src/exec/rtems/inline/rtems/rtems/part.inl delete mode 100644 c/src/exec/rtems/inline/rtems/rtems/ratemon.inl delete mode 100644 c/src/exec/rtems/inline/rtems/rtems/region.inl delete mode 100644 c/src/exec/rtems/inline/rtems/rtems/sem.inl delete mode 100644 c/src/exec/rtems/inline/rtems/rtems/status.inl delete mode 100644 c/src/exec/rtems/inline/rtems/rtems/support.inl delete mode 100644 c/src/exec/rtems/inline/rtems/rtems/tasks.inl delete mode 100644 c/src/exec/rtems/inline/rtems/rtems/timer.inl delete mode 100644 c/src/exec/rtems/macros/rtems/rtems/asr.inl delete mode 100644 c/src/exec/rtems/macros/rtems/rtems/attr.inl delete mode 100644 c/src/exec/rtems/macros/rtems/rtems/dpmem.inl delete mode 100644 c/src/exec/rtems/macros/rtems/rtems/event.inl delete mode 100644 c/src/exec/rtems/macros/rtems/rtems/eventset.inl delete mode 100644 c/src/exec/rtems/macros/rtems/rtems/message.inl delete mode 100644 c/src/exec/rtems/macros/rtems/rtems/modes.inl delete mode 100644 c/src/exec/rtems/macros/rtems/rtems/options.inl delete mode 100644 c/src/exec/rtems/macros/rtems/rtems/part.inl delete mode 100644 c/src/exec/rtems/macros/rtems/rtems/ratemon.inl delete mode 100644 c/src/exec/rtems/macros/rtems/rtems/region.inl delete mode 100644 c/src/exec/rtems/macros/rtems/rtems/sem.inl delete mode 100644 c/src/exec/rtems/macros/rtems/rtems/status.inl delete mode 100644 c/src/exec/rtems/macros/rtems/rtems/support.inl delete mode 100644 c/src/exec/rtems/macros/rtems/rtems/tasks.inl delete mode 100644 c/src/exec/rtems/macros/rtems/rtems/timer.inl delete mode 100644 c/src/exec/rtems/src/rtclock.c delete mode 100644 c/src/exec/rtems/src/rtemstimer.c delete mode 100644 c/src/exec/sapi/headers/confdefs.h delete mode 100644 c/src/exec/sapi/include/confdefs.h delete mode 100644 c/src/exec/sapi/include/rtems/config.h delete mode 100644 c/src/exec/sapi/include/rtems/directives.h delete mode 100644 c/src/exec/sapi/include/rtems/extension.h delete mode 100644 c/src/exec/sapi/include/rtems/fatal.h delete mode 100644 c/src/exec/sapi/include/rtems/init.h delete mode 100644 c/src/exec/sapi/include/rtems/io.h delete mode 100644 c/src/exec/sapi/include/rtems/mptables.h delete mode 100644 c/src/exec/sapi/include/rtems/sptables.h delete mode 100644 c/src/exec/sapi/inline/rtems/extension.inl delete mode 100644 c/src/exec/sapi/macros/rtems/extension.inl delete mode 100644 c/src/exec/sapi/src/exinit.c delete mode 100644 c/src/exec/score/cpu/hppa1.1/cpu.c delete mode 100644 c/src/exec/score/cpu/hppa1.1/cpu.h delete mode 100644 c/src/exec/score/cpu/hppa1.1/cpu_asm.h delete mode 100644 c/src/exec/score/cpu/hppa1.1/cpu_asm.s delete mode 100644 c/src/exec/score/cpu/hppa1.1/hppa.h delete mode 100644 c/src/exec/score/cpu/hppa1.1/hppatypes.h delete mode 100644 c/src/exec/score/cpu/hppa1.1/rtems.s delete mode 100644 c/src/exec/score/cpu/mips/asm.h delete mode 100644 c/src/exec/score/cpu/mips/cpu.c delete mode 100644 c/src/exec/score/cpu/mips/cpu_asm.S delete mode 100644 c/src/exec/score/cpu/mips/cpu_asm.h delete mode 100644 c/src/exec/score/cpu/mips/idtcpu.h delete mode 100644 c/src/exec/score/cpu/mips/idtmon.h delete mode 100644 c/src/exec/score/cpu/mips/iregdef.h delete mode 100644 c/src/exec/score/cpu/mips/rtems.c delete mode 100644 c/src/exec/score/cpu/powerpc/README delete mode 100644 c/src/exec/score/cpu/powerpc/TODO delete mode 100644 c/src/exec/score/cpu/powerpc/cpu.c delete mode 100644 c/src/exec/score/cpu/powerpc/cpu.h delete mode 100644 c/src/exec/score/cpu/powerpc/cpu_asm.s delete mode 100644 c/src/exec/score/cpu/powerpc/irq_stub.s delete mode 100644 c/src/exec/score/cpu/powerpc/ppc.h delete mode 100644 c/src/exec/score/cpu/powerpc/ppctypes.h delete mode 100644 c/src/exec/score/cpu/powerpc/rtems.s delete mode 100644 c/src/exec/score/include/rtems/debug.h delete mode 100644 c/src/exec/score/include/rtems/score/address.h delete mode 100644 c/src/exec/score/include/rtems/score/apiext.h delete mode 100644 c/src/exec/score/include/rtems/score/bitfield.h delete mode 100644 c/src/exec/score/include/rtems/score/chain.h delete mode 100644 c/src/exec/score/include/rtems/score/context.h delete mode 100644 c/src/exec/score/include/rtems/score/copyrt.h delete mode 100644 c/src/exec/score/include/rtems/score/coremsg.h delete mode 100644 c/src/exec/score/include/rtems/score/coremutex.h delete mode 100644 c/src/exec/score/include/rtems/score/coresem.h delete mode 100644 c/src/exec/score/include/rtems/score/heap.h delete mode 100644 c/src/exec/score/include/rtems/score/interr.h delete mode 100644 c/src/exec/score/include/rtems/score/isr.h delete mode 100644 c/src/exec/score/include/rtems/score/mpci.h delete mode 100644 c/src/exec/score/include/rtems/score/mppkt.h delete mode 100644 c/src/exec/score/include/rtems/score/object.h delete mode 100644 c/src/exec/score/include/rtems/score/objectmp.h delete mode 100644 c/src/exec/score/include/rtems/score/priority.h delete mode 100644 c/src/exec/score/include/rtems/score/stack.h delete mode 100644 c/src/exec/score/include/rtems/score/states.h delete mode 100644 c/src/exec/score/include/rtems/score/sysstate.h delete mode 100644 c/src/exec/score/include/rtems/score/thread.h delete mode 100644 c/src/exec/score/include/rtems/score/threadmp.h delete mode 100644 c/src/exec/score/include/rtems/score/threadq.h delete mode 100644 c/src/exec/score/include/rtems/score/tod.h delete mode 100644 c/src/exec/score/include/rtems/score/tqdata.h delete mode 100644 c/src/exec/score/include/rtems/score/userext.h delete mode 100644 c/src/exec/score/include/rtems/score/watchdog.h delete mode 100644 c/src/exec/score/include/rtems/score/wkspace.h delete mode 100644 c/src/exec/score/include/rtems/system.h delete mode 100644 c/src/exec/score/inline/rtems/score/address.inl delete mode 100644 c/src/exec/score/inline/rtems/score/chain.inl delete mode 100644 c/src/exec/score/inline/rtems/score/coremsg.inl delete mode 100644 c/src/exec/score/inline/rtems/score/coremutex.inl delete mode 100644 c/src/exec/score/inline/rtems/score/coresem.inl delete mode 100644 c/src/exec/score/inline/rtems/score/heap.inl delete mode 100644 c/src/exec/score/inline/rtems/score/isr.inl delete mode 100644 c/src/exec/score/inline/rtems/score/mppkt.inl delete mode 100644 c/src/exec/score/inline/rtems/score/object.inl delete mode 100644 c/src/exec/score/inline/rtems/score/objectmp.inl delete mode 100644 c/src/exec/score/inline/rtems/score/priority.inl delete mode 100644 c/src/exec/score/inline/rtems/score/stack.inl delete mode 100644 c/src/exec/score/inline/rtems/score/states.inl delete mode 100644 c/src/exec/score/inline/rtems/score/sysstate.inl delete mode 100644 c/src/exec/score/inline/rtems/score/thread.inl delete mode 100644 c/src/exec/score/inline/rtems/score/threadmp.inl delete mode 100644 c/src/exec/score/inline/rtems/score/tod.inl delete mode 100644 c/src/exec/score/inline/rtems/score/tqdata.inl delete mode 100644 c/src/exec/score/inline/rtems/score/userext.inl delete mode 100644 c/src/exec/score/inline/rtems/score/watchdog.inl delete mode 100644 c/src/exec/score/inline/rtems/score/wkspace.inl delete mode 100644 c/src/exec/score/macros/rtems/score/README delete mode 100644 c/src/exec/score/macros/rtems/score/address.inl delete mode 100644 c/src/exec/score/macros/rtems/score/chain.inl delete mode 100644 c/src/exec/score/macros/rtems/score/coremsg.inl delete mode 100644 c/src/exec/score/macros/rtems/score/coremutex.inl delete mode 100644 c/src/exec/score/macros/rtems/score/coresem.inl delete mode 100644 c/src/exec/score/macros/rtems/score/heap.inl delete mode 100644 c/src/exec/score/macros/rtems/score/isr.inl delete mode 100644 c/src/exec/score/macros/rtems/score/mppkt.inl delete mode 100644 c/src/exec/score/macros/rtems/score/object.inl delete mode 100644 c/src/exec/score/macros/rtems/score/objectmp.inl delete mode 100644 c/src/exec/score/macros/rtems/score/priority.inl delete mode 100644 c/src/exec/score/macros/rtems/score/stack.inl delete mode 100644 c/src/exec/score/macros/rtems/score/states.inl delete mode 100644 c/src/exec/score/macros/rtems/score/sysstate.inl delete mode 100644 c/src/exec/score/macros/rtems/score/thread.inl delete mode 100644 c/src/exec/score/macros/rtems/score/threadmp.inl delete mode 100644 c/src/exec/score/macros/rtems/score/tod.inl delete mode 100644 c/src/exec/score/macros/rtems/score/tqdata.inl delete mode 100644 c/src/exec/score/macros/rtems/score/userext.inl delete mode 100644 c/src/exec/score/macros/rtems/score/watchdog.inl delete mode 100644 c/src/exec/score/macros/rtems/score/wkspace.inl delete mode 100644 c/src/exec/score/src/coretod.c delete mode 100644 c/src/exec/score/tools/hppa1.1/genoffsets.c delete mode 100644 c/src/lib/include/rtems/assoc.h delete mode 100644 c/src/lib/include/rtems/error.h delete mode 100644 c/src/lib/include/rtems/libcsupport.h delete mode 100644 c/src/lib/include/rtems/libio.h delete mode 100644 c/src/lib/include/sys/utsname.h delete mode 100644 c/src/lib/libbsp/hppa1.1/pxfl/README delete mode 100644 c/src/lib/libbsp/hppa1.1/pxfl/floss-bsp.h delete mode 100644 c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h delete mode 100644 c/src/lib/libbsp/hppa1.1/simhppa/include/coverhd.h delete mode 100644 c/src/lib/libbsp/hppa1.1/simhppa/include/ttydrv.h delete mode 100644 c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/README delete mode 100644 c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/addrconv.c delete mode 100644 c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c delete mode 100644 c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/intr.c delete mode 100644 c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/lock.c delete mode 100644 c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/mpisr.c delete mode 100644 c/src/lib/libbsp/hppa1.1/simhppa/startup/bspclean.c delete mode 100644 c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c delete mode 100644 c/src/lib/libbsp/hppa1.1/simhppa/startup/setvec.c delete mode 100644 c/src/lib/libbsp/hppa1.1/simhppa/times delete mode 100644 c/src/lib/libbsp/hppa1.1/simhppa/tools/print_dump.c delete mode 100644 c/src/lib/libbsp/hppa1.1/simhppa/tty/tty.c delete mode 100644 c/src/lib/libbsp/mips/p4000/README delete mode 100644 c/src/lib/libbsp/mips/p4000/console/console.c delete mode 100644 c/src/lib/libbsp/mips/p4000/console/led.S delete mode 100644 c/src/lib/libbsp/mips/p4000/include/bsp.h delete mode 100644 c/src/lib/libbsp/mips/p4000/include/coverhd.h delete mode 100644 c/src/lib/libbsp/mips/p4000/liblnk/lnklib.S delete mode 100644 c/src/lib/libbsp/mips/p4000/start/start.S delete mode 100644 c/src/lib/libbsp/mips/p4000/startup/bspclean.c delete mode 100644 c/src/lib/libbsp/mips/p4000/startup/ghlinkcmds delete mode 100644 c/src/lib/libbsp/mips/p4000/startup/idtmem.S delete mode 100644 c/src/lib/libbsp/mips/p4000/startup/idttlb.S delete mode 100644 c/src/lib/libbsp/mips/p4000/startup/inittlb.c delete mode 100644 c/src/lib/libbsp/mips/p4000/startup/linkcmds delete mode 100644 c/src/lib/libbsp/mips/p4000/startup/setvec.c delete mode 100644 c/src/lib/libbsp/mips/p4000/times delete mode 100644 c/src/lib/libbsp/powerpc/papyrus/README delete mode 100644 c/src/lib/libbsp/powerpc/papyrus/dlentry/dlentry.s delete mode 100644 c/src/lib/libbsp/powerpc/papyrus/flashentry/flashentry.s delete mode 100644 c/src/lib/libbsp/powerpc/papyrus/include/bsp.h delete mode 100644 c/src/lib/libbsp/powerpc/papyrus/include/coverhd.h delete mode 100644 c/src/lib/libbsp/powerpc/papyrus/startup/bspclean.c delete mode 100644 c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c delete mode 100644 c/src/lib/libbsp/powerpc/papyrus/startup/linkcmds delete mode 100644 c/src/lib/libbsp/powerpc/papyrus/startup/setvec.c delete mode 100644 c/src/lib/libbsp/powerpc/papyrus/times delete mode 100644 c/src/lib/libc/utsname.c delete mode 100644 c/src/lib/libcpu/hppa1.1/clock/clock.c delete mode 100644 c/src/lib/libcpu/hppa1.1/runway/runway.h delete mode 100644 c/src/lib/libcpu/hppa1.1/semaphore/semaphore.c delete mode 100644 c/src/lib/libcpu/hppa1.1/semaphore/semaphore.h delete mode 100644 c/src/lib/libcpu/hppa1.1/timer/timer.c delete mode 100644 c/src/lib/libcpu/mips/clock/ckinit.c delete mode 100644 c/src/lib/libcpu/mips/clock/clock.S delete mode 100644 c/src/lib/libcpu/mips/clock/clock.h delete mode 100644 c/src/lib/libcpu/mips/timer/gettime.S delete mode 100644 c/src/lib/libcpu/mips/timer/timer.c delete mode 100644 c/src/lib/libcpu/powerpc/README delete mode 100644 c/src/lib/libcpu/powerpc/ppc403/README delete mode 100644 c/src/lib/libcpu/powerpc/ppc403/clock/clock.c delete mode 100644 c/src/lib/libcpu/powerpc/ppc403/console/console.c delete mode 100644 c/src/lib/libcpu/powerpc/ppc403/timer/timer.c delete mode 100644 c/src/lib/libcpu/powerpc/ppc403/vectors/README delete mode 100644 c/src/lib/libcpu/powerpc/ppc403/vectors/align_h.s delete mode 100644 c/src/lib/libcpu/powerpc/ppc403/vectors/vectors.s delete mode 100644 c/src/lib/libcpu/sparc/include/erc32.h delete mode 100644 c/src/libchip/shmdr/README delete mode 100644 c/src/libchip/shmdr/addlq.c delete mode 100644 c/src/libchip/shmdr/cnvpkt.c delete mode 100644 c/src/libchip/shmdr/dump.c delete mode 100644 c/src/libchip/shmdr/fatal.c delete mode 100644 c/src/libchip/shmdr/getlq.c delete mode 100644 c/src/libchip/shmdr/getpkt.c delete mode 100644 c/src/libchip/shmdr/init.c delete mode 100644 c/src/libchip/shmdr/initlq.c delete mode 100644 c/src/libchip/shmdr/intr.c delete mode 100644 c/src/libchip/shmdr/mpci.h delete mode 100644 c/src/libchip/shmdr/mpisr.c delete mode 100644 c/src/libchip/shmdr/poll.c delete mode 100644 c/src/libchip/shmdr/receive.c delete mode 100644 c/src/libchip/shmdr/retpkt.c delete mode 100644 c/src/libchip/shmdr/send.c delete mode 100644 c/src/libchip/shmdr/setckvec.c delete mode 100644 c/src/libchip/shmdr/shm_driver.h delete mode 100644 c/src/optman/rtems/no-dpmem.c delete mode 100644 c/src/optman/rtems/no-event.c delete mode 100644 c/src/optman/rtems/no-mp.c delete mode 100644 c/src/optman/rtems/no-msg.c delete mode 100644 c/src/optman/rtems/no-part.c delete mode 100644 c/src/optman/rtems/no-region.c delete mode 100644 c/src/optman/rtems/no-rtmon.c delete mode 100644 c/src/optman/rtems/no-sem.c delete mode 100644 c/src/optman/rtems/no-signal.c delete mode 100644 c/src/optman/rtems/no-timer.c delete mode 100644 c/src/optman/sapi/no-ext.c delete mode 100644 c/src/optman/sapi/no-io.c (limited to 'c/src') diff --git a/c/src/exec/libcsupport/include/clockdrv.h b/c/src/exec/libcsupport/include/clockdrv.h deleted file mode 100644 index 258c590e0d..0000000000 --- a/c/src/exec/libcsupport/include/clockdrv.h +++ /dev/null @@ -1,51 +0,0 @@ -/* clock.h - * - * This file describes the Clock Driver for all boards. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __CLOCK_DRIVER_h -#define __CLOCK_DRIVER_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* variables */ - -extern volatile rtems_unsigned32 Clock_driver_ticks; -extern rtems_device_major_number rtems_clock_major; -extern rtems_device_minor_number rtems_clock_minor; - -/* default clock driver entry */ - -#define CLOCK_DRIVER_TABLE_ENTRY \ - { Clock_initialize, NULL, NULL, NULL, NULL, Clock_control } - -rtems_device_driver Clock_initialize( - rtems_device_major_number, - rtems_device_minor_number, - void * -); - -rtems_device_driver Clock_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/libcsupport/include/console.h b/c/src/exec/libcsupport/include/console.h deleted file mode 100644 index 02196de7a9..0000000000 --- a/c/src/exec/libcsupport/include/console.h +++ /dev/null @@ -1,69 +0,0 @@ -/* console.h - * - * This file describes the Console Device Driver for all boards. - * This driver provides support for the standard C Library. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef _CONSOLE_DRIVER_h -#define _CONSOLE_DRIVER_h - -#ifdef __cplusplus -extern "C" { -#endif - -#define CONSOLE_DRIVER_TABLE_ENTRY \ - { console_initialize, console_open, console_close, \ - console_read, console_write, console_control } - -rtems_device_driver console_initialize( - rtems_device_major_number, - rtems_device_minor_number, - void * -); - -rtems_device_driver console_open( - rtems_device_major_number, - rtems_device_minor_number, - void * -); - -rtems_device_driver console_close( - rtems_device_major_number, - rtems_device_minor_number, - void * -); - -rtems_device_driver console_read( - rtems_device_major_number, - rtems_device_minor_number, - void * -); - -rtems_device_driver console_write( - rtems_device_major_number, - rtems_device_minor_number, - void * -); - -rtems_device_driver console_control( - rtems_device_major_number, - rtems_device_minor_number, - void * -); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/libcsupport/include/iosupp.h b/c/src/exec/libcsupport/include/iosupp.h deleted file mode 100644 index 5f4a83b8ca..0000000000 --- a/c/src/exec/libcsupport/include/iosupp.h +++ /dev/null @@ -1,44 +0,0 @@ -/* iosupp.h - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __IOSUPP_h -#define __IOSUPP_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* character constants */ - -#define BS 0x08 /* backspace */ -#define LF 0x0a /* line feed */ -#define CR 0x0d /* carriage return */ -#define XON 0x11 /* control-Q */ -#define XOFF 0x13 /* control-S */ - -/* structures */ - -#ifdef IOSUPP_INIT -#define IOSUPP_EXTERN -#else -#undef IOSUPP_EXTERN -#define IOSUPP_EXTERN extern -#endif - -/* functions */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/c/src/exec/libcsupport/include/ringbuf.h b/c/src/exec/libcsupport/include/ringbuf.h deleted file mode 100644 index 8c80aaf9c8..0000000000 --- a/c/src/exec/libcsupport/include/ringbuf.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * ringbuf.h - * - * This file provides simple ring buffer functionality. - * - * $Id$ - */ - -#ifndef __RINGBUF_H__ -#define __RINGBUF_H__ - -#ifndef RINGBUF_QUEUE_LENGTH -#define RINGBUF_QUEUE_LENGTH 128 -#endif - -typedef struct { - char buffer[RINGBUF_QUEUE_LENGTH]; - volatile int head; - volatile int tail; -} Ring_buffer_t; - -#define Ring_buffer_Initialize( _buffer ) \ - do { \ - (_buffer)->head = (_buffer)->tail = 0; \ - } while ( 0 ) - -#define Ring_buffer_Is_empty( _buffer ) \ - ( (_buffer)->head == (_buffer)->tail ) - -#define Ring_buffer_Is_full( _buffer ) \ - ( (_buffer)->head == ((_buffer)->tail + 1) % RINGBUF_QUEUE_LENGTH ) - -#define Ring_buffer_Add_character( _buffer, _ch ) \ - do { \ - rtems_unsigned32 isrlevel; \ - \ - rtems_interrupt_disable( isrlevel ); \ - (_buffer)->tail = ((_buffer)->tail+1) % RINGBUF_QUEUE_LENGTH; \ - (_buffer)->buffer[ (_buffer)->tail ] = (_ch); \ - rtems_interrupt_enable( isrlevel ); \ - } while ( 0 ) - -#define Ring_buffer_Remove_character( _buffer, _ch ) \ - do { \ - rtems_unsigned32 isrlevel; \ - \ - rtems_interrupt_disable( isrlevel ); \ - (_buffer)->head = ((_buffer)->head+1) % RINGBUF_QUEUE_LENGTH; \ - (_ch) = (_buffer)->buffer[ (_buffer)->head ]; \ - rtems_interrupt_enable( isrlevel ); \ - } while ( 0 ) - -#endif diff --git a/c/src/exec/libcsupport/include/rtems/assoc.h b/c/src/exec/libcsupport/include/rtems/assoc.h deleted file mode 100644 index 1982d654ac..0000000000 --- a/c/src/exec/libcsupport/include/rtems/assoc.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Rtems associativity routines. Mainly used to convert a value from - * one space to another (eg: our errno's to host errno's and v.v) - * - * - * $Id$ - */ - -#ifndef _INCLUDE_ASSOC_H -#define _INCLUDE_ASSOC_H - -typedef struct { - const char *name; - unsigned32 local_value; - unsigned32 remote_value; -} rtems_assoc_t; - -/* - * Flag/marker for optional default value in each table - */ - -#define RTEMS_ASSOC_DEFAULT_NAME "(default)" - -const rtems_assoc_t *rtems_assoc_ptr_by_name(const rtems_assoc_t *, const char *); -const rtems_assoc_t *rtems_assoc_ptr_by_value(const rtems_assoc_t *, unsigned32); -const rtems_assoc_t *rtems_assoc_ptr_by_remote(const rtems_assoc_t *, unsigned32); - -unsigned32 rtems_assoc_remote_by_local(const rtems_assoc_t *, unsigned32); -unsigned32 rtems_assoc_local_by_remote(const rtems_assoc_t *, unsigned32); -unsigned32 rtems_assoc_remote_by_name(const rtems_assoc_t *, const char *); -unsigned32 rtems_assoc_local_by_name(const rtems_assoc_t *, const char *); -const char *rtems_assoc_name_by_local(const rtems_assoc_t *, unsigned32); -const char *rtems_assoc_name_by_remote(const rtems_assoc_t *, unsigned32); - -unsigned32 rtems_assoc_remote_by_local_bitfield(const rtems_assoc_t *, unsigned32); -char *rtems_assoc_name_by_local_bitfield(const rtems_assoc_t *, unsigned32, char *); -char *rtems_assoc_name_by_remote_bitfield(const rtems_assoc_t *, unsigned32, char *); -unsigned32 rtems_assoc_local_by_remote_bitfield(const rtems_assoc_t *, unsigned32); - - -#endif /* ! _INCLUDE_ASSOC_H */ diff --git a/c/src/exec/libcsupport/include/rtems/error.h b/c/src/exec/libcsupport/include/rtems/error.h deleted file mode 100644 index e4d8c77200..0000000000 --- a/c/src/exec/libcsupport/include/rtems/error.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Defines and externs for rtems error reporting - * - * $Id$ - */ - -#ifndef __RTEMS_ERROR_h -#define __RTEMS_ERROR_h - -/* - * rtems_error() and rtems_panic() support - */ - -#define RTEMS_ERROR_ERRNO (1<<((sizeof(int) * 8) - 2)) /* hi bit; use 'errno' */ -#define RTEMS_ERROR_PANIC (RTEMS_ERROR_ERRNO / 2) /* err fatal; no return */ -#define RTEMS_ERROR_ABORT (RTEMS_ERROR_ERRNO / 4) /* err is fatal; panic */ - -#define RTEMS_ERROR_MASK (RTEMS_ERROR_ERRNO | RTEMS_ERROR_ABORT | \ - RTEMS_ERROR_PANIC) /* all */ - -const char *rtems_status_text(rtems_status_code); -int rtems_error(int error_code, const char *printf_format, ...); -#ifdef __GNUC__ -void rtems_panic(const char *printf_format, ...) - __attribute__ ((__noreturn__)); -#else -void rtems_panic(const char *printf_format, ...); -#endif - -extern int rtems_panic_in_progress; - -#endif -/* end of include file */ diff --git a/c/src/exec/libcsupport/include/rtems/libcsupport.h b/c/src/exec/libcsupport/include/rtems/libcsupport.h deleted file mode 100644 index e426ec5ef5..0000000000 --- a/c/src/exec/libcsupport/include/rtems/libcsupport.h +++ /dev/null @@ -1,43 +0,0 @@ -/* libcsupport.h - * - * This include file contains the information regarding the - * RTEMS specific support for the standard C library. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __LIBC_SUPPORT_h -#define __LIBC_SUPPORT_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -void RTEMS_Malloc_Initialize( - void *start, - size_t length, - size_t sbrk_amount -); - -extern void malloc_dump(void); -extern void malloc_walk(size_t source, size_t printf_enabled); -extern void libc_init(int reentrant); -extern int host_errno(void); -extern void fix_syscall_errno(void); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/libcsupport/include/rtems/libio.h b/c/src/exec/libcsupport/include/rtems/libio.h deleted file mode 100644 index 07d72620b1..0000000000 --- a/c/src/exec/libcsupport/include/rtems/libio.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * General purpose communication channel for RTEMS to allow UNIX/POSIX - * system call behavior on top of RTEMS IO devices. - * - * TODO - * stat(2) - * unlink(2) - * rename(2) - * - * $Id$ - */ - -#ifndef _RTEMS_LIBIO_H -#define _RTEMS_LIBIO_H - -typedef unsigned32 rtems_libio_offset_t; - -/* - * An open file data structure, indexed by 'fd' - * TODO: - * should really have a separate per/file data structure that this - * points to (eg: size, offset, driver, pathname should be in that) - */ - -typedef struct { - rtems_driver_name_t *driver; - rtems_libio_offset_t size; /* size of file */ - rtems_libio_offset_t offset; /* current offset into the file */ - unsigned32 flags; - char *pathname; /* opened pathname */ - Objects_Id sem; - unsigned32 data0; /* private to "driver" */ - unsigned32 data1; /* ... */ -} rtems_libio_t; - - -/* - * param block for read/write - * Note: it must include 'offset' instead of using iop's offset since - * we can have multiple outstanding i/o's on a device. - */ - -typedef struct { - rtems_libio_t *iop; - rtems_libio_offset_t offset; - unsigned8 *buffer; - unsigned32 count; - unsigned32 flags; - unsigned32 bytes_moved; -} rtems_libio_rw_args_t; - -/* - * param block for open/close - */ - -typedef struct { - rtems_libio_t *iop; - unsigned32 flags; - unsigned32 mode; -} rtems_libio_open_close_args_t; - -/* - * param block for ioctl - */ - -typedef struct { - rtems_libio_t *iop; - unsigned32 command; - void *buffer; - unsigned32 ioctl_return; -} rtems_libio_ioctl_args_t; - - -/* - * Values for 'flag' - */ - -#define LIBIO_FLAGS_NO_DELAY 0x0001 /* return immediately if no data */ -#define LIBIO_FLAGS_READ 0x0002 /* reading */ -#define LIBIO_FLAGS_WRITE 0x0004 /* writing */ -#define LIBIO_FLAGS_LINE_BUFFERED 0x0008 /* line buffered io (^h, ^u, etc) */ -#define LIBIO_FLAGS_OPEN 0x0100 /* device is open */ -#define LIBIO_FLAGS_APPEND 0x0200 /* all writes append */ -#define LIBIO_FLAGS_CREATE 0x0400 /* create file */ - -#define LIBIO_FLAGS_READ_WRITE (LIBIO_FLAGS_READ | LIBIO_FLAGS_WRITE) - -void rtems_libio_config(rtems_configuration_table *config, unsigned32 max_fds); -void rtems_libio_init(void); - -int __open(const char *pathname, unsigned32 flag, unsigned32 mode); -int __close(int fd); -int __read(int fd, void *buffer, unsigned32 count); -int __write(int fd, const void *buffer, unsigned32 count); -int __ioctl(int fd, unsigned32 command, void *buffer); -int __lseek(int fd, rtems_libio_offset_t offset, int whence); - -#endif /* _RTEMS_LIBIO_H */ diff --git a/c/src/exec/libcsupport/include/spurious.h b/c/src/exec/libcsupport/include/spurious.h deleted file mode 100644 index 428e826164..0000000000 --- a/c/src/exec/libcsupport/include/spurious.h +++ /dev/null @@ -1,38 +0,0 @@ -/* spurious.h - * - * This file describes the Spurious Interrupt Driver for all boards. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993. - * On-Line Applications Research Corporation (OAR). - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __SPURIOUS_h -#define __SPURIOUS_h - -#ifdef __cplusplus -extern "C" { -#endif - -#define SPURIOUS_DRIVER_TABLE_ENTRY \ - { Spurious_Initialize, NULL, NULL, NULL, NULL, NULL } - -rtems_device_driver Spurious_Initialize( - rtems_device_major_number, - rtems_device_minor_number, - void *, - rtems_id, - rtems_unsigned32 * -); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/libcsupport/include/sys/utsname.h b/c/src/exec/libcsupport/include/sys/utsname.h deleted file mode 100644 index ca15230d40..0000000000 --- a/c/src/exec/libcsupport/include/sys/utsname.h +++ /dev/null @@ -1,49 +0,0 @@ -/* sys/utsname.h - * - * $Id$ - */ - -#ifndef __POSIX_SYS_UTSNAME_h -#define __POSIX_SYS_UTSNAME_h - -#include -#include - -/* - * 4.4.1 Get System Name (Table 4-1), P1003.1b-1993, p. 90 - * - * NOTE: The lengths of the strings in this structure are - * just long enough to reliably contain the RTEMS information. - * For example, the fields are not long enough to support - * Internet hostnames. - */ - -struct utsname { - char sysname[ 32 ]; /* Name of this implementation of the operating system */ - char nodename[ 32 ]; /* Name of this node within an implementation */ - /* specified communication network */ - char release[ 32 ]; /* Current release level of this implementation */ - char version[ 32 ]; /* Current version level of this release */ - char machine[ 32 ]; /* Name of the hardware type on which the system */ - /* is running */ -}; - -/* - * 4.4.1 Get System Name, P1003.1b-1993, p. 90 - */ - -int uname( - struct utsname *name -); - -/* - * 4.5.2 Get Process Times, P1003.1b-1993, p. 92 - */ - -clock_t times( - struct tms *buffer -); - -#endif -/* end of include file */ - diff --git a/c/src/exec/libcsupport/include/timerdrv.h b/c/src/exec/libcsupport/include/timerdrv.h deleted file mode 100644 index d091b62410..0000000000 --- a/c/src/exec/libcsupport/include/timerdrv.h +++ /dev/null @@ -1,40 +0,0 @@ -/* timerdrv.h - * - * This file describes the Timer Driver for all boards. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __TIMER_DRIVER_h -#define __TIMER_DRIVER_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* functions */ - -void Timer_initialize( void ); - -rtems_unsigned32 Read_timer( void ); - -rtems_status_code Empty_function( void ); - -void Set_find_average_overhead( - rtems_boolean find_flag -); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/libcsupport/include/vmeintr.h b/c/src/exec/libcsupport/include/vmeintr.h deleted file mode 100644 index 6148114ce8..0000000000 --- a/c/src/exec/libcsupport/include/vmeintr.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * vmeintr.h - * - * This file is the specification for the VMEbus interface library - * which should be provided by all BSPs for VMEbus Single Board - * Computers but currently only a few do so. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __VME_INTERRUPT_h -#define __VME_INTERRUPT_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This defines the mask which is used to determine which - * interrupt levels are affected by a call to this package. - * The LSB corresponds to VME interrupt 0 and the MSB - * to VME interrupt 7. - * - */ - -typedef rtems_unsigned8 VME_interrupt_Mask; - -/* - * VME_interrupt_Disable - * - */ - -void VME_interrupt_Disable ( - VME_interrupt_Mask mask /* IN */ -); - -/* - * VME_interrupt_Disable - * - */ - -void VME_interrupt_Enable ( - VME_interrupt_Mask mask /* IN */ -); - -#ifdef __cplusplus -} -#endif - -#endif /* end of include file */ diff --git a/c/src/exec/libcsupport/src/README b/c/src/exec/libcsupport/src/README deleted file mode 100644 index ee7a90501e..0000000000 --- a/c/src/exec/libcsupport/src/README +++ /dev/null @@ -1,37 +0,0 @@ --- --- $Id$ --- - -Overview of newlib support (newlib is from CYGNUS) - Each task can have its own libc state including: - open stdio files - strtok - multi precision arithmetic state - etc. - - This is implemented by a reentrancy data structure for each task. - - When a task is "started" (in RTEMS sense) the reentrancy structure - is allocated. Its address is stored in notepad[NOTEPAD_LAST]. - - When task is switched to, the value of global variable _impure_ptr - is changed to the value of the new tasks reentrancy structure. - - When a task is deleted - atexit() processing (for that task) happens - task's stdio buffers are flushed - - When exit(3) is called - calling task's atexit processing done - global libc state atexit processing done - (this will include any atexit routines installed by drivers) - executive is shutdown - causes a context switch back to bsp land - - -NOTE: - libc extension are installed by bsp_libc_init() - iff we are using clock interrupts. - This hack is necessary to allow the tmtests to avoid - timing the extensions. - diff --git a/c/src/exec/libcsupport/src/__brk.c b/c/src/exec/libcsupport/src/__brk.c deleted file mode 100644 index 5f256cb072..0000000000 --- a/c/src/exec/libcsupport/src/__brk.c +++ /dev/null @@ -1,44 +0,0 @@ -#if !defined(RTEMS_UNIX) - -/* - * RTEMS "Broken" __brk/__sbrk Implementation - * - * NOTE: sbrk is BSP provided. - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include - -#include -#include -#include -#ifdef RTEMS_NEWLIB -#include -#endif -#include - -/* we use RTEMS for memory management. We don't need sbrk */ - -void * __sbrk(int incr) -{ - errno = EINVAL; - return (void *)0; -} - -int __brk( const void *endds ) -{ - errno = EINVAL; - return -1; -} - -#endif diff --git a/c/src/exec/libcsupport/src/__gettod.c b/c/src/exec/libcsupport/src/__gettod.c deleted file mode 100644 index 6c9350d41c..0000000000 --- a/c/src/exec/libcsupport/src/__gettod.c +++ /dev/null @@ -1,103 +0,0 @@ -#if !defined(RTEMS_UNIX) -/* - * RTEMS gettimeofday Implementation - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include - -#ifdef RTEMS_NEWLIB -#include -#endif - -#include -#include - -#include -#include - -/* - * NOTE: The solaris gettimeofday does not have a second parameter. - */ - -int gettimeofday( - struct timeval *tp, - struct timezone *tzp -) -{ - rtems_status_code status; - rtems_clock_time_value time; - - if ( !tp ) { - errno = EFAULT; - return -1; - } - - /* "POSIX" does not seem to allow for not having a TOD */ - status = rtems_clock_get( RTEMS_CLOCK_GET_TIME_VALUE, &time ); - if ( status != RTEMS_SUCCESSFUL ) { - assert( 0 ); - return -1; - } - - tp->tv_sec = time.seconds; - tp->tv_usec = time.microseconds; - - /* - * newlib does not have timezone and daylight savings time - * yet. When it does this needs to be fixed. - */ - -#if 0 - if ( tzp ) { - tzp->tz_minuteswest = 0; /* at UTC */ - tzp->tz_dsttime = 0; /* no daylight savings */ - tzp->minuteswest = timezone / 60; /* from seconds to minutes */ - tzp->dsttime = daylight; - } -#endif - return 0; -} - -#if defined(RTEMS_NEWLIB) - -#if 0 -/* - * "Reentrant" version - */ - -int _gettimeofday_r( - struct _reent *ignored_reentrancy_stuff, - struct timeval *tp, - struct timezone *tzp -) -{ - return gettimeofday( tp, tzp ); -} -#endif - -/* - * "System call" version - */ - -int _gettimeofday( - struct timeval *tp, - struct timezone *tzp -) -{ - return gettimeofday( tp, tzp ); -} - -#endif /* defined(RTEMS_NEWLIB) */ - -#endif diff --git a/c/src/exec/libcsupport/src/__times.c b/c/src/exec/libcsupport/src/__times.c deleted file mode 100644 index 12fd9241fe..0000000000 --- a/c/src/exec/libcsupport/src/__times.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * RTEMS _times Implementation - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include - -#include -#include -#include -#include -#include - -clock_t _times( - struct tms *ptms -) -{ - rtems_status_code status; - rtems_interval ticks_since_boot; - - if ( !ptms ) { - errno = EFAULT; - return -1; - } - - /* "POSIX" does not seem to allow for not having a TOD */ - status = rtems_clock_get( - RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, - &ticks_since_boot - ); - if ( status != RTEMS_SUCCESSFUL ) { - assert( 0 ); - return -1; - } - - /* - * RTEMS has no notion of system versus user time and does - * not (as of 3.2.0) keep track of CPU usage on a per task basis. - */ - - ptms->tms_utime = ticks_since_boot; - ptms->tms_stime = 0; - ptms->tms_cutime = 0; - ptms->tms_cstime = 0; - - return 0; -} - -clock_t times( - struct tms *ptms -) -{ - return _times( ptms ); -} - diff --git a/c/src/exec/libcsupport/src/assoc.c b/c/src/exec/libcsupport/src/assoc.c deleted file mode 100644 index 74387a8c5b..0000000000 --- a/c/src/exec/libcsupport/src/assoc.c +++ /dev/null @@ -1,260 +0,0 @@ -/* - * assoc.c - * rtems assoc routines - * - * $Id$ - */ - -#include -#include "assoc.h" - -#include /* sprintf */ -#include /* strcat, strcmp */ - -#define STREQ(a,b) (strcmp((a), (b)) == 0) -#define rtems_assoc_is_default(ap) ((ap)->name && STREQ(ap->name, RTEMS_ASSOC_DEFAULT_NAME)) - -const rtems_assoc_t * -rtems_assoc_ptr_by_name( - const rtems_assoc_t *ap, - const char *name - ) -{ - const rtems_assoc_t *default_ap = 0; - - if (rtems_assoc_is_default(ap)) - default_ap = ap++; - - for ( ; ap->name; ap++) - if (strcmp(ap->name, name) == 0) - return ap; - - return default_ap; -} - -const rtems_assoc_t * -rtems_assoc_ptr_by_local( - const rtems_assoc_t *ap, - unsigned32 local_value - ) -{ - const rtems_assoc_t *default_ap = 0; - - if (rtems_assoc_is_default(ap)) - default_ap = ap++; - - for ( ; ap->name; ap++) - if (ap->local_value == local_value) - return ap; - - return default_ap; -} - - -const rtems_assoc_t * -rtems_assoc_ptr_by_remote( - const rtems_assoc_t *ap, - unsigned32 remote_value - ) -{ - const rtems_assoc_t *default_ap = 0; - - if (rtems_assoc_is_default(ap)) - default_ap = ap++; - - for ( ; ap->name; ap++) - if (ap->remote_value == remote_value) - return ap; - - return default_ap; -} - - -/* - * Get values - */ - -unsigned32 -rtems_assoc_remote_by_local( - const rtems_assoc_t *ap, - unsigned32 local_value - ) -{ - const rtems_assoc_t *nap; - nap = rtems_assoc_ptr_by_local(ap, local_value); - if (nap) - return nap->remote_value; - - return 0; -} - -unsigned32 -rtems_assoc_local_by_remote( - const rtems_assoc_t *ap, - unsigned32 remote_value - ) -{ - const rtems_assoc_t *nap; - nap = rtems_assoc_ptr_by_remote(ap, remote_value); - if (nap) - return nap->local_value; - - return 0; -} - -unsigned32 -rtems_assoc_remote_by_name( - const rtems_assoc_t *ap, - const char *name - ) -{ - const rtems_assoc_t *nap; - nap = rtems_assoc_ptr_by_name(ap, name); - if (nap) - return nap->remote_value; - - return 0; -} - -unsigned32 -rtems_assoc_local_by_name( - const rtems_assoc_t *ap, - const char *name - ) -{ - const rtems_assoc_t *nap; - nap = rtems_assoc_ptr_by_name(ap, name); - if (nap) - return nap->local_value; - - return 0; -} - -/* - * what to return if a value is not found - * this is not reentrant, but it really shouldn't be invoked anyway - */ - -const char * -rtems_assoc_name_bad( - unsigned32 bad_value -) -{ -#ifdef RTEMS_DEBUG - static char bad_buffer[32]; - - sprintf(bad_buffer, "< %d [0x%x] >", bad_value, bad_value); -#else - static char bad_buffer[32] = ""; -#endif - return bad_buffer; -} - - -const char * -rtems_assoc_name_by_local( - const rtems_assoc_t *ap, - unsigned32 local_value - ) -{ - const rtems_assoc_t *nap; - nap = rtems_assoc_ptr_by_local(ap, local_value); - if (nap) - return nap->name; - - return rtems_assoc_name_bad(local_value); -} - -const char * -rtems_assoc_name_by_remote( - const rtems_assoc_t *ap, - unsigned32 remote_value - ) -{ - const rtems_assoc_t *nap; - nap = rtems_assoc_ptr_by_remote(ap, remote_value); - if (nap) - return nap->name; - - return rtems_assoc_name_bad(remote_value); -} - -/* - * Bitfield functions assume just 1 bit set in each of remote and local - * entries; they do not check for this. - */ - -unsigned32 rtems_assoc_remote_by_local_bitfield( - const rtems_assoc_t *ap, - unsigned32 local_value - ) -{ - unsigned32 b; - unsigned32 remote_value = 0; - - for (b = 1; b; b <<= 1) - if (b & local_value) - remote_value |= rtems_assoc_remote_by_local(ap, b); - - return remote_value; -} - - -unsigned32 rtems_assoc_local_by_remote_bitfield( - const rtems_assoc_t *ap, - unsigned32 remote_value - ) -{ - unsigned32 b; - unsigned32 local_value = 0; - - for (b = 1; b; b <<= 1) - if (b & remote_value) - local_value |= rtems_assoc_local_by_remote(ap, b); - - return local_value; -} - -char * -rtems_assoc_name_by_remote_bitfield( - const rtems_assoc_t *ap, - unsigned32 value, - char *buffer - ) -{ - unsigned32 b; - - *buffer = 0; - - for (b = 1; b; b <<= 1) - if (b & value) - { - if (*buffer) - strcat(buffer, " "); - strcat(buffer, rtems_assoc_name_by_remote(ap, b)); - } - - return buffer; -} - -char * -rtems_assoc_name_by_local_bitfield( - const rtems_assoc_t *ap, - unsigned32 value, - char *buffer - ) -{ - unsigned32 b; - - *buffer = 0; - - for (b = 1; b; b <<= 1) - if (b & value) - { - if (*buffer) - strcat(buffer, " "); - strcat(buffer, rtems_assoc_name_by_local(ap, b)); - } - - return buffer; -} diff --git a/c/src/exec/libcsupport/src/error.c b/c/src/exec/libcsupport/src/error.c deleted file mode 100644 index 5bd481c3e6..0000000000 --- a/c/src/exec/libcsupport/src/error.c +++ /dev/null @@ -1,209 +0,0 @@ -/* - * report errors and panics to RTEMS' stderr. - * Currently just used by RTEMS monitor. - * - * $Id$ - */ - - -/* - * These routines provide general purpose error reporting. - * rtems_error reports an error to stderr and allows use of - * printf style formatting. A newline is appended to all messages. - * - * error_flag can be specified as any of the following: - * - * RTEMS_ERROR_ERRNO -- include errno text in output - * RTEMS_ERROR_PANIC -- halts local system after output - * RTEMS_ERROR_ABORT -- abort after output - * - * It can also include a rtems_status value which can be OR'd - * with the above flags. * - * - * EXAMPLE - * #include - * #include - * rtems_error(0, "stray interrupt %d", intr); - * - * EXAMPLE - * if ((status = rtems_task_create(...)) != RTEMS_SUCCCESSFUL) - * { - * rtems_error(status | RTEMS_ERROR_ABORT, - * "could not create task"); - * } - * - * EXAMPLE - * if ((fd = open(pathname, O_RDNLY)) < 0) - * { - * rtems_error(RTEMS_ERROR_ERRNO, "open of '%s' failed", pathname); - * goto failed; - * } - */ - -#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ -#include - -#include "error.h" -#include - -#include -#include -#include -#include -#include -#include /* _exit() */ - -/* bug in hpux : no prototypes unless you are C++ */ -#ifdef hpux9 -char *strerror(int); -#endif - -extern char *rtems_progname; -int rtems_panic_in_progress; - -rtems_assoc_t rtems_status_assoc[] = { - { "successful completion", RTEMS_SUCCESSFUL, }, - { "returned from a thread", RTEMS_TASK_EXITTED, }, - { "multiprocessing not configured", RTEMS_MP_NOT_CONFIGURED, }, - { "invalid object name", RTEMS_INVALID_NAME, }, - { "invalid object id", RTEMS_INVALID_ID, }, - { "too many", RTEMS_TOO_MANY, }, - { "timed out waiting", RTEMS_TIMEOUT, }, - { "object deleted while waiting", RTEMS_OBJECT_WAS_DELETED, }, - { "specified size was invalid", RTEMS_INVALID_SIZE, }, - { "address specified is invalid", RTEMS_INVALID_ADDRESS, }, - { "number was invalid", RTEMS_INVALID_NUMBER, }, - { "item has not been initialized", RTEMS_NOT_DEFINED, }, - { "resources still outstanding", RTEMS_RESOURCE_IN_USE, }, - { "request not satisfied", RTEMS_UNSATISFIED, }, - { "thread is in wrong state", RTEMS_INCORRECT_STATE, }, - { "thread already in state", RTEMS_ALREADY_SUSPENDED, }, - { "illegal on calling thread", RTEMS_ILLEGAL_ON_SELF, }, - { "illegal for remote object", RTEMS_ILLEGAL_ON_REMOTE_OBJECT, }, - { "called from wrong environment", RTEMS_CALLED_FROM_ISR, }, - { "invalid thread priority", RTEMS_INVALID_PRIORITY, }, - { "invalid date/time", RTEMS_INVALID_CLOCK, }, - { "invalid node id", RTEMS_INVALID_NODE, }, - { "directive not configured", RTEMS_NOT_CONFIGURED, }, - { "not owner of resource", RTEMS_NOT_OWNER_OF_RESOURCE , }, - { "directive not implemented", RTEMS_NOT_IMPLEMENTED, }, - { "RTEMS inconsistency detected", RTEMS_INTERNAL_ERROR, }, - { "could not get enough memory", RTEMS_NO_MEMORY, }, - { "internal multiprocessing only", THREAD_STATUS_PROXY_BLOCKING, }, - { 0, 0, 0 }, -}; - - -const char * -rtems_status_text( - rtems_status_code status -) -{ - return rtems_assoc_name_by_local(rtems_status_assoc, status); -} - - -static int rtems_verror( - unsigned32 error_flag, - const char *printf_format, - va_list arglist -) -{ - int local_errno = 0; - int chars_written = 0; - rtems_status_code status; - - if (error_flag & RTEMS_ERROR_PANIC) - { - rtems_panic_in_progress++; - - /* disable task switches */ - _Thread_Disable_dispatch(); - - /* don't aggravate things */ - if (rtems_panic_in_progress > 2) - return 0; - } - - (void) fflush(stdout); /* in case stdout/stderr same */ - - status = error_flag & ~RTEMS_ERROR_MASK; - if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ - local_errno = errno; - - if (_System_state_Is_multiprocessing) - fprintf(stderr, "[%d] ", _Configuration_MP_table->node); - - if (rtems_progname && *rtems_progname) - chars_written += fprintf(stderr, "%s: ", rtems_progname); - chars_written += vfprintf(stderr, printf_format, arglist); - - if (status) - chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); - - if (local_errno) - if ((local_errno > 0) && *strerror(local_errno)) - chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); - else - chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); - - chars_written += fprintf(stderr, "\n"); - - (void) fflush(stderr); - - if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) - { - if (error_flag & RTEMS_ERROR_PANIC) - { - rtems_error(0, "fatal error, exiting"); - _exit(local_errno); - } - else - { - rtems_error(0, "fatal error, aborting"); - abort(); - } - } - return chars_written; -} - - -/* - * Report an error. - * error_flag is as above; printf_format is a normal - * printf(3) format string, with its concommitant arguments. - * - * Returns the number of characters written. - */ - -int rtems_error( - int error_flag, - const char *printf_format, - ... - ) -{ - va_list arglist; - int chars_written; - - va_start(arglist, printf_format); - chars_written = rtems_verror(error_flag, printf_format, arglist); - va_end(arglist); - - return chars_written; -} - -/* - * rtems_panic is shorthand for rtems_error(RTEMS_ERROR_PANIC, ...) - */ - -void rtems_panic( - const char *printf_format, - ... - ) -{ - va_list arglist; - - va_start(arglist, printf_format); - (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); - va_end(arglist); -} diff --git a/c/src/exec/libcsupport/src/hosterr.c b/c/src/exec/libcsupport/src/hosterr.c deleted file mode 100644 index 7fc2ca966e..0000000000 --- a/c/src/exec/libcsupport/src/hosterr.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Routines to access a host errno - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include - -int host_errno(void); - -/* - * copy host errno, if any to thread aware errno, if any - */ - -void fix_syscall_errno(void) -{ - errno = host_errno(); -} - -/* - * Get the host system errno, if any - * When using newlib (or possibly other libc's) on top of UNIX - * the errno returned by system calls may be unavailable due - * to trickery of making errno thread aware. - * This provides a kludge of getting at it. - */ - -#undef errno -extern int errno; -int host_errno(void) -{ - return errno; -} - diff --git a/c/src/exec/libcsupport/src/libio.c b/c/src/exec/libcsupport/src/libio.c deleted file mode 100644 index 7ef4b62db3..0000000000 --- a/c/src/exec/libcsupport/src/libio.c +++ /dev/null @@ -1,444 +0,0 @@ -/* - * Provide UNIX/POSIX-like io system calls for RTEMS using the - * RTEMS IO manager - * - * $Id$ - */ - -#include -#include /* assoc.h not included by rtems.h */ - -#include /* O_RDONLY, et.al. */ -#include /* O_RDONLY, et.al. */ - -#if ! defined(O_NDELAY) -# if defined(solaris2) -# define O_NDELAY O_NONBLOCK -# elif defined(RTEMS_NEWLIB) -# define O_NDELAY _FNBIO -# endif -#endif - - -#include -#include /* strcmp */ -#include -#include /* calloc() */ - -#include "libio.h" /* libio.h not pulled in by rtems */ - -/* - * Semaphore to protect the io table - */ - -Objects_Id rtems_libio_semaphore; - -#define RTEMS_LIBIO_SEM rtems_build_name('L', 'B', 'I', 'O') -#define RTEMS_LIBIO_IOP_SEM(n) rtems_build_name('L', 'B', 'I', n) - -unsigned32 rtems_libio_number_iops; -rtems_libio_t *rtems_libio_iops; -rtems_libio_t *rtems_libio_last_iop; - -#define rtems_libio_iop(fd) ((((unsigned32)(fd)) < rtems_libio_number_iops) ? \ - &rtems_libio_iops[fd] : 0) - -#define rtems_libio_check_fd(fd) \ - do { \ - if ((fd) >= rtems_libio_number_iops) \ - { \ - errno = EBADF; \ - return -1; \ - } \ - } while (0) - -#define rtems_libio_check_buffer(buffer) \ - do { \ - if ((buffer) == 0) \ - { \ - errno = EINVAL; \ - return -1; \ - } \ - } while (0) - -#define rtems_libio_check_count(count) \ - do { \ - if ((count) == 0) \ - { \ - return 0; \ - } \ - } while (0) - -#define rtems_libio_check_permissions(iop, flag) \ - do { \ - if (((iop)->flags & (flag)) == 0) \ - { \ - errno = EINVAL; \ - return -1; \ - } \ - } while (0) - - -void -rtems_libio_config( - rtems_configuration_table *config, - unsigned32 max_fds - ) -{ - rtems_libio_number_iops = max_fds; - - /* - * tweak config to reflect # of semaphores we will need - */ - - /* one for iop table */ - config->RTEMS_api_configuration->maximum_semaphores += 1; - config->RTEMS_api_configuration->maximum_semaphores += max_fds; -} - -/* - * Called by bsp startup code to init the libio area. - */ - -void -rtems_libio_init(void) -{ - rtems_status_code rc; - - if (rtems_libio_number_iops > 0) - { - rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, - sizeof(rtems_libio_t)); - if (rtems_libio_iops == NULL) - rtems_fatal_error_occurred(RTEMS_NO_MEMORY); - - rtems_libio_last_iop = rtems_libio_iops + (rtems_libio_number_iops - 1); - } - - rc = rtems_semaphore_create( - RTEMS_LIBIO_SEM, - 1, - RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, - RTEMS_NO_PRIORITY, - &rtems_libio_semaphore - ); - if (rc != RTEMS_SUCCESSFUL) - rtems_fatal_error_occurred(rc); -} - -/* - * Convert RTEMS status to a UNIX errno - */ - -rtems_assoc_t errno_assoc[] = { - { "OK", RTEMS_SUCCESSFUL, 0 }, - { "TIMEOUT", RTEMS_TIMEOUT, ETIME }, - { "NO MEMORY", RTEMS_NO_MEMORY, ENOMEM }, - { 0, 0, 0 }, -}; - -static unsigned32 -rtems_libio_errno(rtems_status_code code) -{ - int rc; - - if ((rc = rtems_assoc_remote_by_local(errno_assoc, (unsigned32) code))) - { - errno = rc; - return -1; - } - return 0; -} - -/* - * Convert UNIX fnctl(2) flags to ones that RTEMS drivers understand - */ - -rtems_assoc_t access_modes_assoc[] = { - { "READ", LIBIO_FLAGS_READ, O_RDONLY }, - { "WRITE", LIBIO_FLAGS_WRITE, O_WRONLY }, - { "READ/WRITE", LIBIO_FLAGS_READ_WRITE, O_RDWR }, - { 0, 0, 0 }, -}; - -rtems_assoc_t status_flags_assoc[] = { - { "NO DELAY", LIBIO_FLAGS_NO_DELAY, O_NDELAY }, - { "APPEND", LIBIO_FLAGS_APPEND, O_APPEND }, - { "CREATE", LIBIO_FLAGS_CREATE, O_CREAT }, - { 0, 0, 0 }, -}; - -static unsigned32 -rtems_libio_fcntl_flags(unsigned32 fcntl_flags) -{ - unsigned32 flags = 0; - unsigned32 access_modes; - - /* - * Access mode is a small integer - */ - - access_modes = fcntl_flags & O_ACCMODE; - fcntl_flags &= ~O_ACCMODE; - flags = rtems_assoc_local_by_remote(access_modes_assoc, access_modes); - - /* - * Everything else is single bits - */ - - flags |= rtems_assoc_local_by_remote_bitfield(status_flags_assoc, fcntl_flags); - return flags; -} - - -static rtems_libio_t * -rtems_libio_allocate(void) -{ - rtems_libio_t *iop; - rtems_status_code rc; - - rtems_semaphore_obtain(rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); - - for (iop = rtems_libio_iops; iop <= rtems_libio_last_iop; iop++) - if ((iop->flags & LIBIO_FLAGS_OPEN) == 0) - { - /* - * Got one; create a semaphore for it - */ - - rc = rtems_semaphore_create( - RTEMS_LIBIO_IOP_SEM(iop - rtems_libio_iops), - 1, - RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, - RTEMS_NO_PRIORITY, - &iop->sem - ); - if (rc != RTEMS_SUCCESSFUL) - goto failed; - - iop->flags = LIBIO_FLAGS_OPEN; - goto done; - } - -failed: - iop = 0; - -done: - rtems_semaphore_release(rtems_libio_semaphore); - return iop; -} - -static void -rtems_libio_free(rtems_libio_t *iop) -{ - rtems_semaphore_obtain(rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); - - if (iop->sem) - rtems_semaphore_delete(iop->sem); - (void) memset(iop, 0, sizeof(*iop)); - - rtems_semaphore_release(rtems_libio_semaphore); -} - -int -__open( - const char *pathname, - unsigned32 flag, - unsigned32 mode) -{ - rtems_status_code rc; - rtems_libio_t *iop = 0; - rtems_driver_name_t *np; - rtems_libio_open_close_args_t args; - - if ((rc = rtems_io_lookup_name(pathname, &np)) != RTEMS_SUCCESSFUL) - goto done; - - iop = rtems_libio_allocate(); - if (iop == 0) - { - rc = RTEMS_TOO_MANY; - goto done; - } - - iop->driver = np; - iop->pathname = (char *) pathname; - iop->flags |= rtems_libio_fcntl_flags(flag); - - args.iop = iop; - args.flags = iop->flags; - args.mode = mode; - - rc = rtems_io_open(np->major, np->minor, (void *) &args); - -done: - if (rc != RTEMS_SUCCESSFUL) - { - if (iop) - rtems_libio_free(iop); - return rtems_libio_errno(rc); - } - - return iop - rtems_libio_iops; -} - -int -__close( - int fd - ) -{ - rtems_status_code rc; - rtems_driver_name_t *np; - rtems_libio_t *iop = rtems_libio_iop(fd); - rtems_libio_open_close_args_t args; - - rtems_libio_check_fd(fd); - - np = iop->driver; - - args.iop = iop; - args.flags = 0; - args.mode = 0; - - rc = rtems_io_close(np->major, np->minor, (void *) &args); - - if (rc != RTEMS_SUCCESSFUL) - return rtems_libio_errno(rc); - return 0; -} - -int -__read( - int fd, - void * buffer, - unsigned32 count - ) -{ - rtems_status_code rc; - rtems_driver_name_t *np; - rtems_libio_t *iop = rtems_libio_iop(fd); - rtems_libio_rw_args_t args; - - rtems_libio_check_fd(fd); - rtems_libio_check_buffer(buffer); - rtems_libio_check_count(count); - rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); - - np = iop->driver; - - args.iop = iop; - args.offset = iop->offset; - args.buffer = buffer; - args.count = count; - args.flags = iop->flags; - args.bytes_moved = 0; - - rc = rtems_io_read(np->major, np->minor, (void *) &args); - - iop->offset += args.bytes_moved; - - if (rc != RTEMS_SUCCESSFUL) - return rtems_libio_errno(rc); - - return args.bytes_moved; -} - -int -__write( - int fd, - const void *buffer, - unsigned32 count - ) -{ - rtems_status_code rc; - rtems_driver_name_t *np; - rtems_libio_t *iop = rtems_libio_iop(fd); - rtems_libio_rw_args_t args; - - rtems_libio_check_fd(fd); - rtems_libio_check_buffer(buffer); - rtems_libio_check_count(count); - rtems_libio_check_permissions(iop, LIBIO_FLAGS_WRITE); - - np = iop->driver; - - args.iop = iop; - args.offset = iop->offset; - args.buffer = (void *) buffer; - args.count = count; - args.flags = iop->flags; - args.bytes_moved = 0; - - rc = rtems_io_write(np->major, np->minor, (void *) &args); - - iop->offset += args.bytes_moved; - - if (rc != RTEMS_SUCCESSFUL) - return rtems_libio_errno(rc); - - return args.bytes_moved; -} - -int -__ioctl( - int fd, - unsigned32 command, - void * buffer) -{ - rtems_status_code rc; - rtems_driver_name_t *np; - rtems_libio_t *iop = rtems_libio_iop(fd); - rtems_libio_ioctl_args_t args; - - rtems_libio_check_fd(fd); - - np = iop->driver; - - args.iop = iop; - args.command = command; - args.buffer = buffer; - - rc = rtems_io_control(np->major, np->minor, (void *) &args); - - if (rc != RTEMS_SUCCESSFUL) - return rtems_libio_errno(rc); - - return args.ioctl_return; -} - -/* - * internal only?? - */ - - -int -__lseek( - int fd, - rtems_libio_offset_t offset, - int whence - ) -{ - rtems_libio_t *iop = rtems_libio_iop(fd); - - rtems_libio_check_fd(fd); - - switch (whence) - { - case SEEK_SET: - iop->offset = offset; - break; - - case SEEK_CUR: - iop->offset += offset; - break; - - case SEEK_END: - iop->offset = iop->size - offset; - break; - - default: - errno = EINVAL; - return -1; - } - return 0; -} diff --git a/c/src/exec/libcsupport/src/malloc.c b/c/src/exec/libcsupport/src/malloc.c deleted file mode 100644 index 61969c1d24..0000000000 --- a/c/src/exec/libcsupport/src/malloc.c +++ /dev/null @@ -1,400 +0,0 @@ -/* - * RTEMS Malloc Family Implementation - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ -#include -#include "libcsupport.h" -#ifdef RTEMS_NEWLIB -#include -#endif - -#include -#include -#include -#include -#include -#include -#include /* sbrk(2) */ - -rtems_id RTEMS_Malloc_Heap; -size_t RTEMS_Malloc_Sbrk_amount; - -#ifdef RTEMS_DEBUG -#define MALLOC_STATS -#define MALLOC_DIRTY -#endif - -#ifdef MALLOC_STATS -#define MSBUMP(f,n) malloc_stats.f += (n) - -struct { - unsigned32 space_available; /* current size of malloc area */ - unsigned32 malloc_calls; /* # calls to malloc */ - unsigned32 free_calls; - unsigned32 realloc_calls; - unsigned32 calloc_calls; - unsigned32 max_depth; /* most ever malloc'd at 1 time */ - unsigned64 lifetime_allocated; - unsigned64 lifetime_freed; -} malloc_stats; - -#else /* No malloc_stats */ -#define MSBUMP(f,n) -#endif - -void RTEMS_Malloc_Initialize( - void *start, - size_t length, - size_t sbrk_amount -) -{ - rtems_status_code status; - void *starting_address; - rtems_unsigned32 old_address; - rtems_unsigned32 u32_address; - - /* - * If the starting address is 0 then we are to attempt to - * get length worth of memory using sbrk. Make sure we - * align the address that we get back. - */ - - starting_address = start; - RTEMS_Malloc_Sbrk_amount = sbrk_amount; - - if (!starting_address) { - u32_address = (unsigned int)sbrk(length); - - if (u32_address == -1) { - rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); - /* DOES NOT RETURN!!! */ - } - - if (u32_address & (CPU_ALIGNMENT-1)) { - old_address = u32_address; - u32_address = (u32_address + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1); - - /* - * adjust the length by whatever we aligned by - */ - - length -= u32_address - old_address; - } - - starting_address = (void *)u32_address; - } - - /* - * Unfortunately we cannot use assert if this fails because if this - * has failed we do not have a heap and if we do not have a heap - * STDIO cannot work because there will be no buffers. - */ - - status = rtems_region_create( - rtems_build_name( 'H', 'E', 'A', 'P' ), - starting_address, - length, - CPU_ALIGNMENT, - RTEMS_DEFAULT_ATTRIBUTES, - &RTEMS_Malloc_Heap - ); - if ( status != RTEMS_SUCCESSFUL ) - rtems_fatal_error_occurred( status ); - -#ifdef MALLOC_STATS - /* zero all the stats */ - (void) memset(&malloc_stats, 0, sizeof(malloc_stats)); -#endif - - MSBUMP(space_available, length); -} - -#ifdef RTEMS_NEWLIB -void *malloc( - size_t size -) -{ - void *return_this; - void *starting_address; - rtems_unsigned32 the_size; - rtems_unsigned32 sbrk_amount; - rtems_status_code status; - - MSBUMP(malloc_calls, 1); - - if ( !size ) - return (void *) 0; - - /* - * Try to give a segment in the current region if there is not - * enough space then try to grow the region using rtems_region_extend(). - * If this fails then return a NULL pointer. - */ - - status = rtems_region_get_segment( - RTEMS_Malloc_Heap, - size, - RTEMS_NO_WAIT, - RTEMS_NO_TIMEOUT, - &return_this - ); - - if ( status != RTEMS_SUCCESSFUL ) { - /* - * Round to the "requested sbrk amount" so hopefully we won't have - * to grow again for a while. This effectively does sbrk() calls - * in "page" amounts. - */ - - sbrk_amount = RTEMS_Malloc_Sbrk_amount; - - if ( sbrk_amount == 0 ) - return (void *) 0; - - the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); - - if (((rtems_unsigned32)starting_address = (void *)sbrk(the_size)) == -1) - return (void *) 0; - - status = rtems_region_extend( - RTEMS_Malloc_Heap, - starting_address, - the_size - ); - if ( status != RTEMS_SUCCESSFUL ) { - sbrk(-the_size); - errno = ENOMEM; - return (void *) 0; - } - - MSBUMP(space_available, the_size); - - status = rtems_region_get_segment( - RTEMS_Malloc_Heap, - size, - RTEMS_NO_WAIT, - RTEMS_NO_TIMEOUT, - &return_this - ); - if ( status != RTEMS_SUCCESSFUL ) { - errno = ENOMEM; - return (void *) 0; - } - } - -#ifdef MALLOC_STATS - if (return_this) - { - unsigned32 actual_size; - unsigned32 current_depth; - status = rtems_region_get_segment_size(RTEMS_Malloc_Heap, return_this, &actual_size); - MSBUMP(lifetime_allocated, actual_size); - current_depth = malloc_stats.lifetime_allocated - malloc_stats.lifetime_freed; - if (current_depth > malloc_stats.max_depth) - malloc_stats.max_depth = current_depth; - } -#endif - -#ifdef MALLOC_DIRTY - (void) memset(return_this, 0xCF, size); -#endif - - return return_this; -} - -void *calloc( - size_t nelem, - size_t elsize -) -{ - register char *cptr; - int length; - - MSBUMP(calloc_calls, 1); - - length = nelem * elsize; - cptr = malloc( length ); - if ( cptr ) - memset( cptr, '\0', length ); - - MSBUMP(malloc_calls, -1); /* subtract off the malloc */ - - return cptr; -} - -void *realloc( - void *ptr, - size_t size -) -{ - rtems_unsigned32 old_size; - rtems_status_code status; - char *new_area; - - MSBUMP(realloc_calls, 1); - - if ( !ptr ) - return malloc( size ); - - if ( !size ) { - free( ptr ); - return (void *) 0; - } - - new_area = malloc( size ); - - MSBUMP(malloc_calls, -1); /* subtract off the malloc */ - - if ( !new_area ) { - free( ptr ); - return (void *) 0; - } - - status = rtems_region_get_segment_size( RTEMS_Malloc_Heap, ptr, &old_size ); - if ( status != RTEMS_SUCCESSFUL ) { - errno = EINVAL; - return (void *) 0; - } - - memcpy( new_area, ptr, (size < old_size) ? size : old_size ); - free( ptr ); - - return new_area; - -} - -void free( - void *ptr -) -{ - rtems_status_code status; - - MSBUMP(free_calls, 1); - - if ( !ptr ) - return; - -#ifdef MALLOC_STATS - { - unsigned32 size; - status = rtems_region_get_segment_size( RTEMS_Malloc_Heap, ptr, &size ); - if ( status == RTEMS_SUCCESSFUL ) { - MSBUMP(lifetime_freed, size); - } - } -#endif - - status = rtems_region_return_segment( RTEMS_Malloc_Heap, ptr ); - if ( status != RTEMS_SUCCESSFUL ) { - errno = EINVAL; - assert( 0 ); - } -} -/* end if RTEMS_NEWLIB */ -#endif - -#ifdef MALLOC_STATS -/* - * Dump the malloc statistics - * May be called via atexit() (installable by our bsp) or - * at any time by user - */ - -void malloc_dump(void) -{ - unsigned32 allocated = malloc_stats.lifetime_allocated - malloc_stats.lifetime_freed; - - printf("Malloc stats\n"); - printf(" avail:%uk allocated:%uk (%d%%) max:%uk (%d%%) lifetime:%Luk freed:%Luk\n", - (unsigned int) malloc_stats.space_available / 1024, - (unsigned int) allocated / 1024, - /* avoid float! */ - (allocated * 100) / malloc_stats.space_available, - (unsigned int) malloc_stats.max_depth / 1024, - (malloc_stats.max_depth * 100) / malloc_stats.space_available, - (unsigned64) malloc_stats.lifetime_allocated / 1024, - (unsigned64) malloc_stats.lifetime_freed / 1024); - printf(" Call counts: malloc:%d free:%d realloc:%d calloc:%d\n", - malloc_stats.malloc_calls, - malloc_stats.free_calls, - malloc_stats.realloc_calls, - malloc_stats.calloc_calls); -} - - -void malloc_walk(size_t source, size_t printf_enabled) -{ - register Region_Control *the_region; - Objects_Locations location; - - the_region = _Region_Get( RTEMS_Malloc_Heap, &location ); - if ( location == OBJECTS_LOCAL ) - { - _Heap_Walk( &the_region->Memory, source, printf_enabled ); - _Thread_Enable_dispatch(); - } -} - -#else - -void malloc_dump(void) -{ - return; -} - -void malloc_walk(size_t source, size_t printf_enabled) -{ - return; -} - -#endif - -/* - * "Reentrant" versions of the above routines implemented above. - */ - -#ifdef RTEMS_NEWLIB -void *malloc_r( - struct _reent *ignored, - size_t size -) -{ - return malloc( size ); -} - -void *calloc_r( - size_t nelem, - size_t elsize -) -{ - return calloc( nelem, elsize ); -} - -void *realloc_r( - void *ptr, - size_t size -) -{ - return realloc_r( ptr, size ); -} - -void free_r( - void *ptr -) -{ - free( ptr ); -} -#endif - diff --git a/c/src/exec/libcsupport/src/newlibc.c b/c/src/exec/libcsupport/src/newlibc.c deleted file mode 100644 index 2909c0e541..0000000000 --- a/c/src/exec/libcsupport/src/newlibc.c +++ /dev/null @@ -1,423 +0,0 @@ -#if defined(RTEMS_NEWLIB) - -/* - * COPYRIGHT (c) 1994 by Division Incorporated - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of Division Incorporated not be - * used in advertising or publicity pertaining to distribution - * of the software without specific, written prior permission. - * Division Incorporated makes no representations about the - * suitability of this software for any purpose. - * - * Description: - * Implementation of hooks for the CYGNUS newlib libc - * These hooks set things up so that: - * '_REENT' is switched at task switch time. - * - * - * TODO: - * - * NOTE: - * - * $Id$ - * - */ - -#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ -#include -#include -#include /* for free() */ -#include /* for memset() */ - -#include /* for extern of _REENT (aka _impure_ptr) */ -#include - -/* - * NOTE: When using RTEMS fake stat, fstat, and isatty, all output - * is line buffered so this setvbuf is not necessary. This - * setvbuf insures that we can redirect the output of a test - * on the UNIX simulator and it is in the same order as for a - * real target. - * NOTE: - * There is some problem with doing this on the hpux version - * of the UNIX simulator (symptom is printf core dumps), so - * we just don't for now. - * Not sure if this is a problem with hpux, newlib, or something else. - */ - -#if defined(RTEMS_UNIX) && !defined(hpux) -#define NEED_SETVBUF -#endif - -#ifdef NEED_SETVBUF -#include -#endif - -#include "internal.h" - -#define LIBC_NOTEPAD RTEMS_NOTEPAD_LAST - - -int libc_reentrant; /* do we think we are reentrant? */ -struct _reent libc_global_reent = _REENT_INIT(libc_global_reent); - -/* - * CYGNUS newlib routine that does atexit() processing and flushes - * stdio streams - * undocumented - */ - -extern void _wrapup_reent(struct _reent *); -extern void _reclaim_reent(struct _reent *); - -void -libc_wrapup(void) -{ - _wrapup_reent(0); - if (_REENT != &libc_global_reent) - { - _wrapup_reent(&libc_global_reent); -#if 0 - /* don't reclaim this one, just in case we do printfs */ - /* on our way out to ROM */ - _reclaim_reent(&libc_global_reent); -#endif - _REENT = &libc_global_reent; - } -} - - -rtems_boolean -libc_create_hook(rtems_tcb *current_task, - rtems_tcb *creating_task) -{ - MY_task_set_note(creating_task, LIBC_NOTEPAD, 0); - return TRUE; -} - -/* - * Called for all user TASKS (system tasks are MPCI Receive Server and IDLE) - */ - -rtems_extension -libc_start_hook(rtems_tcb *current_task, - rtems_tcb *starting_task) -{ - struct _reent *ptr; - - /* NOTE: our malloc is reentrant without a reent ptr since - * it is based on region manager - */ - - ptr = (struct _reent *) calloc(1, sizeof(struct _reent)); - - if (!ptr) - rtems_fatal_error_occurred(RTEMS_NO_MEMORY); - -#ifdef __GNUC__ - /* GCC extension: structure constants */ - *ptr = (struct _reent) _REENT_INIT((*ptr)); -#else - /* - * Warning: THIS IS VERY DEPENDENT ON NEWLIB!!! WRITTEN FOR 1.7.0 - */ - ptr->_errno=0; - ptr->_stdin=&ptr->__sf[0]; - ptr->_stdout=&ptr->__sf[1]; - ptr->_stderr=&ptr->__sf[2]; - ptr->_scanpoint=0; - ptr->_asctime[0]=0; - ptr->_next=1; - ptr->__sdidinit=0; -#endif - - MY_task_set_note(starting_task, LIBC_NOTEPAD, (rtems_unsigned32) ptr); -} - -/* - * Called for all user TASKS (system tasks are MPCI Receive Server and IDLE) - * - * NOTE: When using RTEMS fake stat, fstat, and isatty, all output - * is line buffered so this setvbuf is not necessary. This - * setvbuf insures that we can redirect the output of a test - * on the UNIX simulator and it is in the same order as for a - * real target. - */ - -#ifdef NEED_SETVBUF -rtems_extension -libc_begin_hook(rtems_tcb *current_task) -{ - setvbuf( stdout, NULL, _IOLBF, BUFSIZ ); -} -#endif - -rtems_extension -libc_switch_hook(rtems_tcb *current_task, - rtems_tcb *heir_task) -{ - rtems_unsigned32 impure_value; - - /* XXX We can't use rtems_task_set_note() here since SYSI task has a - * tid of 0, which is treated specially (optimized, actually) - * by rtems_task_set_note - * - * NOTE: The above comment is no longer true and we need to use - * the extension data areas added about the same time. - */ - - /* - * Don't touch the outgoing task if it has been deleted. - */ - - if ( !_States_Is_transient( current_task->current_state ) ) { - impure_value = (rtems_unsigned32) _REENT; - MY_task_set_note(current_task, LIBC_NOTEPAD, impure_value); - } - - _REENT = (struct _reent *) MY_task_get_note(heir_task, LIBC_NOTEPAD); - -} - -/* - * Function: libc_delete_hook - * Created: 94/12/10 - * - * Description: - * Called when a task is deleted. - * Must restore the new lib reentrancy state for the new current - * task. - * - * Parameters: - * - * - * Returns: - * - * - * Side Effects: - * - * Notes: - * - * - * Deficiencies/ToDo: - * - * - */ -rtems_extension -libc_delete_hook(rtems_tcb *current_task, - rtems_tcb *deleted_task) -{ - struct _reent *ptr; - - /* - * The reentrancy structure was allocated by newlib using malloc() - */ - - if (current_task == deleted_task) - { - ptr = _REENT; - } - else - { - ptr = (struct _reent *) MY_task_get_note(deleted_task, LIBC_NOTEPAD); - } - - /* if (ptr) */ - if (ptr && ptr != &libc_global_reent) - { - _wrapup_reent(ptr); - _reclaim_reent(ptr); - free(ptr); - } - - MY_task_set_note(deleted_task, LIBC_NOTEPAD, 0); - - /* - * Require the switch back to another task to install its own - */ - - if (current_task == deleted_task) - { - _REENT = 0; - } -} - -/* - * Function: libc_init - * Created: 94/12/10 - * - * Description: - * Init libc for CYGNUS newlib - * Set up _REENT to use our global libc_global_reent. - * (newlib provides a global of its own, but we prefer our - * own name for it) - * - * If reentrancy is desired (which it should be), then - * we install the task extension hooks to maintain the - * newlib reentrancy global variable _REENT on task - * create, delete, switch, exit, etc. - * - * Parameters: - * reentrant non-zero if reentrant library desired. - * - * Returns: - * - * Side Effects: - * installs libc extensions if reentrant. - * - * Notes: - * - * - * Deficiencies/ToDo: - * - */ - -void -libc_init(int reentrant) -{ - rtems_extensions_table libc_extension; - rtems_id extension_id; - rtems_status_code rc; - - _REENT = &libc_global_reent; - - if (reentrant) - { - memset(&libc_extension, 0, sizeof(libc_extension)); - - libc_extension.thread_create = libc_create_hook; - libc_extension.thread_start = libc_start_hook; -#ifdef NEED_SETVBUF - libc_extension.thread_begin = libc_begin_hook; -#endif - libc_extension.thread_switch = libc_switch_hook; - libc_extension.thread_delete = libc_delete_hook; - - rc = rtems_extension_create(rtems_build_name('L', 'I', 'B', 'C'), - &libc_extension, &extension_id); - if (rc != RTEMS_SUCCESSFUL) - rtems_fatal_error_occurred(rc); - - libc_reentrant = reentrant; - } -} - -#if 0 -/* - * Routines required by the gnat runtime. - */ - -int get_errno() -{ - return errno; -} -#endif - -/* - * Function: _exit - * Created: 94/12/10 - * - * Description: - * Called from exit() after it does atexit() processing and stdio fflush's - * - * called from bottom of exit() to really delete the task. - * If we are using reentrant libc, then let the delete extension - * do all the work, otherwise if a shutdown is in progress, - * then just do it. - * - * Parameters: - * exit status - * - * Returns: - * does not return - * - * Side Effects: - * - * Notes: - * - * - * Deficiencies/ToDo: - * - * - */ - -#if !defined(RTEMS_UNIX) && !defined(__GO32__) && !defined(_AM29K) -void _exit(int status) -{ - rtems_shutdown_executive(status); -} - -#else - -void exit(int status) -{ - libc_wrapup(); - rtems_shutdown_executive(status); -} -#endif - - -/* - * These are directly supported (and completely correct) in the posix api. - */ - -#if !defined(RTEMS_POSIX_API) -pid_t __getpid(void) -{ - return 0; -} -#endif - -#if !defined(RTEMS_POSIX_API) || defined(__GO32__) -pid_t getpid(void) -{ - return __getpid(); -} -#endif - -#if !defined(RTEMS_POSIX_API) || defined(__GO32__) -int kill( pid_t pid, int sig ) -{ - return 0; -} -#endif - -int __kill( pid_t pid, int sig ) -{ - return 0; -} - -#if !defined(RTEMS_POSIX_API) -unsigned int sleep( - unsigned int seconds -) -{ - rtems_status_code status; - rtems_interval ticks_per_second; - rtems_interval ticks; - - status = rtems_clock_get( - RTEMS_CLOCK_GET_TICKS_PER_SECOND, - &ticks_per_second - ); - - ticks = seconds * ticks_per_second; - - status = rtems_task_wake_after( ticks ); - - /* - * Returns the "unslept" amount of time. In RTEMS signals are not - * interruptable, so tasks really sleep all of the requested time. - */ - - return 0; -} -#endif - - -#endif diff --git a/c/src/exec/libcsupport/src/no_libc.c b/c/src/exec/libcsupport/src/no_libc.c deleted file mode 100644 index 668764b44f..0000000000 --- a/c/src/exec/libcsupport/src/no_libc.c +++ /dev/null @@ -1,55 +0,0 @@ -#if !defined(RTEMS_NEWLIB) && !defined(RTEMS_UNIX) - -/* no_libc.h - * - * This file contains stubs for the reentrancy hooks when - * an unknown C library is used. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - - -#include - -#include "libcsupport.h" -#include "internal.h" - -#include /* for free() */ - -void -libc_init(int reentrant) -{ -} - -void libc_suspend_main(void) -{ -} - - -void libc_global_exit(rtems_unsigned32 code) -{ -} - -void _exit(int status) -{ -} - -#else - -/* remove ANSI errors. - * A program must contain at least one external-declaration - * (X3.159-1989 p.82,L3). - */ -void no_libc_dummy_function( void ) -{ -} - -#endif diff --git a/c/src/exec/libcsupport/src/unixlibc.c b/c/src/exec/libcsupport/src/unixlibc.c deleted file mode 100644 index 2f1e725b6a..0000000000 --- a/c/src/exec/libcsupport/src/unixlibc.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * $Id$ - */ - -#if defined(RTEMS_UNIXLIB) - -void libc_init(int reentrant) -{ -} - -#else - -/* remove ANSI errors. - * A program must contain at least one external-declaration - * (X3.159-1989 p.82,L3). - */ -void unixlibc_dummy_function( void ) -{ -} - -#endif diff --git a/c/src/exec/libcsupport/src/utsname.c b/c/src/exec/libcsupport/src/utsname.c deleted file mode 100644 index 7fba3d610f..0000000000 --- a/c/src/exec/libcsupport/src/utsname.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * $Id$ - */ - -#include -#include - -#include - -#include -#include -#include - -/*PAGE - * - * 4.4.1 Get System Name, P1003.1b-1993, p. 90 - */ - -int uname( - struct utsname *name -) -{ - /* XXX: Here is what Solaris returns... - sysname = SunOS - nodename = node_name - release = 5.3 - version = Generic_101318-12 - machine = sun4m - */ - - strcpy( name->sysname, "RTEMS" ); - - sprintf( name->nodename, "Node %d\n", _Objects_Local_node ); - - /* XXX release string is in BAD format for this routine!!! */ - strcpy( name->release, "3.2.0" ); - - /* XXX does this have any meaning for RTEMS */ - - strcpy( name->release, "" ); - - sprintf( name->machine, "%s/%s", CPU_NAME, CPU_MODEL_NAME ); - - return 0; -} - -/*PAGE - * - * 4.5.2 Get Process Times, P1003.1b-1993, p. 92 - */ - -clock_t times( - struct tms *buffer -) -{ - return POSIX_NOT_IMPLEMENTED(); -} diff --git a/c/src/exec/posix/include/limits.h b/c/src/exec/posix/include/limits.h deleted file mode 100644 index e8ac4bf2fd..0000000000 --- a/c/src/exec/posix/include/limits.h +++ /dev/null @@ -1,164 +0,0 @@ -/* limits.h - * - * This file lists the minimums for the limits set by each of - * the POSIX features subsets. - * - * XXX: Careful attention needs to be paid to section 2.8 in 1003.1b-1993 - * to segregrate the variables below based on their "class" according - * to our implementation. We also need to set the Run-Time Invariant - * and other related values. - * - * $Id$ - */ - -#include_next - -#ifndef __POSIX_LIMITS_h -#define __POSIX_LIMITS_h - -/* really only to get min stack size from */ -#include - -/**************************************************************************** - **************************************************************************** - * * - * P1003.1b-1993 defines the constants below this comment. * - * * - **************************************************************************** - ****************************************************************************/ - -#define _POSIX_AIO_LISTIO_MAX 2 -#define _POSIX_AIO_MAX 1 -#define _POSIX_ARG_MAX 4096 -#define _POSIX_CHILD_MAX 6 -#define _POSIX_DELAYTIMER_MAX 32 -#define _POSIX_LINK_MAX 8 -#define _POSIX_MAX_CANON 255 -#define _POSIX_MAX_INPUT 255 -#define _POSIX_MQ_OPEN_MAX 8 -#define _POSIX_MQ_PRIO_MAX 32 -#define _POSIX_NAME_MAX 14 -#define _POSIX_NGROUPS_MAX 0 -#define _POSIX_OPEN_MAX 16 -#define _POSIX_PATH_MAX 255 -#define _POSIX_PIPE_BUF 512 -#define _POSIX_RTSIG_MAX 8 -#define _POSIX_SEM_NSEMS_MAX 256 -#define _POSIX_SEM_VALUE_MAX 32767 -#define _POSIX_SIGQUEUE_MAX 32 -#define _POSIX_SSIZE_MAX 32767 -#define _POSIX_STREAM_MAX 8 -#define _POSIX_TIMER_MAX 32 -#define _POSIX_TZNAME_MAX 3 - -/* - * Definitions of the following may be omitted if the value is >= stated - * minimum but is indeterminate. - */ - -#define AIO_LISTIO_MAX 2 -#define AIO_MAX 1 -#define AIO_PRIO_DELTA_MAX 0 -#define ARG_MAX 4096 -#define CHILD_MAX 6 -#define DELAYTIMER_MAX 32 -#define MQ_OPEN_MAX 8 -#define MQ_PRIO_MAX 32 -#define OPEN_MAX 16 -#define PAGESIZE 1 -#define RTSIG_MAX 8 -#define SEM_NSEMS_MAX 256 -#define SEM_VALUE_MAX 32767 -#define SIGQUEUE_MAX 32 -#define STREAM_MAX 8 -#define TIMER_MAX 32 -#define TZNAME_MAX 3 - -/* - * Pathname Variables - */ - -#define LINK_MAX 8 -#define MAX_CANON 255 -#define MAX_INPUT 255 -#define NAME_MAX 14 -#define PATH_MAX 255 -#define PIPE_BUF 512 - -/* - * Invariant values - */ - -#define SSIZE_MAX 32767 - -/* - * Maximum Values - */ - -#define _POSIX_CLOCKRES_MIN 0 /* in nanoseconds */ - -/**************************************************************************** - **************************************************************************** - * * - * P1003.1c/D10 defines the constants below this comment. * - * - * XXX: doc seems to have printing problems in this table :( - * * - **************************************************************************** - ****************************************************************************/ - -#define _POSIX_LOGIN_NAME_MAX 9 -#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 -#define _POSIX_THREAD_KEYS_MAX 28 -#define _POSIX_THREAD_THREADS_MAX 64 -#define _POSIX_TTY_NAME_MAX 9 - -/* - * Definitions of the following may be omitted if the value is >= stated - * minimum but is indeterminate. - */ - -#define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX -#define TTY_NAME_MAX _POSIX_TTY_NAME_MAX -#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS -#define PTHREAD_STACK_MIN CPU_STACK_MINIMUM_SIZE - -/* - * The maximum number of keys (PTHREAD_KEYS_MAX) and threads - * (PTHREAD_THREADS_MAX) are configurable and may exceed the minimum. - * -#define PTHREAD_KEYS_MAX _POSIX_THREAD_KEYS_MAX -#define PTHREAD_THREADS_MAX _POSIX_THREAD_THREADS_MAX -*/ - - -/**************************************************************************** - **************************************************************************** - * * - * P1003.4b/D8 defines the constants below this comment. * - * * - **************************************************************************** - ****************************************************************************/ - -#define _POSIX_INTERRUPT_OVERRUN_MAX 32 - -/* - * Definitions of the following may be omitted if the value is >= stated - * minimum but is indeterminate. - */ - -#define INTERRUPT_OVERRUN_MAX 32 - -/* - * Pathname Variables - */ - -#define MIN_ALLOC_SIZE -#define REC_MIN_XFER_SIZE -#define REC_MAX_XFER_SIZE -#define REC_INCR_XFER_SIZE -#define REC_XFER_ALIGN -#define MAX_ATOMIC_SIZE - -#endif -/* end of include file */ diff --git a/c/src/exec/posix/include/rtems/posix/cancel.h b/c/src/exec/posix/include/rtems/posix/cancel.h deleted file mode 100644 index e6d80275f4..0000000000 --- a/c/src/exec/posix/include/rtems/posix/cancel.h +++ /dev/null @@ -1,16 +0,0 @@ -/* rtems/posix/cancel.h - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_CANCEL_h -#define __RTEMS_POSIX_CANCEL_h - -typedef struct { - Chain_Node Node; - void (*routine)( void * ); - void *arg; -} POSIX_Cancel_Handler_control; - -#endif -/* end of include file */ diff --git a/c/src/exec/posix/include/rtems/posix/cond.h b/c/src/exec/posix/include/rtems/posix/cond.h deleted file mode 100644 index 785ca33ae7..0000000000 --- a/c/src/exec/posix/include/rtems/posix/cond.h +++ /dev/null @@ -1,130 +0,0 @@ -/* rtems/posix/cond.h - * - * This include file contains all the private support information for - * POSIX condition variables. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_CONDITION_VARIABLES_h -#define __RTEMS_POSIX_CONDITION_VARIABLES_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -/* - * Constant to indicate condition variable does not currently have - * a mutex assigned to it. - */ - -#define POSIX_CONDITION_VARIABLES_NO_MUTEX 0 - -/* - * Data Structure used to manage a POSIX condition variable - */ - -typedef struct { - Objects_Control Object; - int process_shared; - pthread_mutex_t Mutex; - Thread_queue_Control Wait_queue; -} POSIX_Condition_variables_Control; - -/* - * The following defines the information control block used to manage - * this class of objects. - */ - -POSIX_EXTERN Objects_Information _POSIX_Condition_variables_Information; - -/* - * _POSIX_Condition_variables_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _POSIX_Condition_variables_Manager_initialization( - unsigned32 maximum_condition_variables -); - -/* - * _POSIX_Condition_variables_Allocate - * - * DESCRIPTION: - * - * This function allocates a condition variable control block from - * the inactive chain of free condition variable control blocks. - */ - -RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control * - _POSIX_Condition_variables_Allocate( void ); - -/* - * _POSIX_Condition_variables_Free - * - * DESCRIPTION: - * - * This routine frees a condition variable control block to the - * inactive chain of free condition variable control blocks. - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( - POSIX_Condition_variables_Control *the_condition_variable -); - -/* - * _POSIX_Condition_variables_Get - * - * DESCRIPTION: - * - * This function maps condition variable IDs to condition variable control - * blocks. If ID corresponds to a local condition variable, then it returns - * the_condition variable control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. if the condition variable ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_condition variable is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_condition variable is undefined. - */ - -RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( - Objects_Id *id, - Objects_Locations *location -); - -/* - * _POSIX_Condition_variables_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_condition variable is NULL - * and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Condition_variables_Is_null ( - POSIX_Condition_variables_Control *the_condition_variable -); - -#include -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/include/rtems/posix/condmp.h b/c/src/exec/posix/include/rtems/posix/condmp.h deleted file mode 100644 index 12997b68f4..0000000000 --- a/c/src/exec/posix/include/rtems/posix/condmp.h +++ /dev/null @@ -1,162 +0,0 @@ -/* condmp.h - * - * This include file contains all the constants and structures associated - * with the Multiprocessing Support in the POSIX Condition Variable Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_CONDITION_VARIABLES_MP_h -#define __RTEMS_POSIX_CONDITION_VARIABLES_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -/* - * The following enumerated type defines the list of - * remote condition variable operations. - */ - -typedef enum { - POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_CREATE = 0, - POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_DELETE = 1, - POSIX_CONDITION_VARIABLES_MP_EXTRACT_PROXY = 2, - POSIX_CONDITION_VARIABLES_MP_OBTAIN_REQUEST = 3, - POSIX_CONDITION_VARIABLES_MP_OBTAIN_RESPONSE = 4, - POSIX_CONDITION_VARIABLES_MP_RELEASE_REQUEST = 5, - POSIX_CONDITION_VARIABLES_MP_RELEASE_RESPONSE = 6, -} POSIX_Condition_variables_MP_Remote_operations; - -/* - * The following data structure defines the packet used to perform - * remote condition variable operations. - */ - -typedef struct { - MP_packet_Prefix Prefix; - POSIX_Condition_variables_MP_Remote_operations operation; - Objects_Name name; - boolean wait; /* XXX options */ - Objects_Id proxy_id; -} POSIX_Condition_variables_MP_Packet; - -/* - * _POSIX_Condition_variables_MP_Send_process_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * process operation can be performed on another node. - */ - -void _POSIX_Condition_variables_MP_Send_process_packet ( - POSIX_Condition_variables_MP_Remote_operations operation, - Objects_Id condition_variables_id, - Objects_Name name, - Objects_Id proxy_id -); - -/* - * _POSIX_Condition_variables_MP_Send_request_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. - */ - -int _POSIX_Condition_variables_MP_Send_request_packet ( - POSIX_Condition_variables_MP_Remote_operations operation, - Objects_Id condition_variables_id, - boolean wait, /* XXX options */ - Watchdog_Interval timeout -); - -/* - * _POSIX_Condition_variables_MP_Send_response_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive can be performed on another node. - */ - -void _POSIX_Condition_variables_MP_Send_response_packet ( - POSIX_Condition_variables_MP_Remote_operations operation, - Objects_Id condition_variables_id, - Thread_Control *the_thread -); - -/* - * - * _POSIX_Condition_variables_MP_Process_packet - * - * DESCRIPTION: - * - * This routine performs the actions specific to this package for - * the request from another node. - */ - -void _POSIX_Condition_variables_MP_Process_packet ( - MP_packet_Prefix *the_packet_prefix -); - -/* - * _POSIX_Condition_variables_MP_Send_object_was_deleted - * - * DESCRIPTION: - * - * This routine is invoked indirectly by the thread queue - * when a proxy has been removed from the thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Condition_variables_MP_Send_object_was_deleted ( - Thread_Control *the_proxy -); - -/* - * _POSIX_Condition_variables_MP_Send_extract_proxy - * - * DESCRIPTION: - * - * This routine is invoked when a task is deleted and it - * has a proxy which must be removed from a thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Condition_variables_MP_Send_extract_proxy ( - Thread_Control *the_thread -); - -/* - * _POSIX_Condition_variables_MP_Get_packet - * - * DESCRIPTION: - * - * This function is used to obtain a condition variable mp packet. - */ - -POSIX_Condition_variables_MP_Packet - *_POSIX_Condition_variables_MP_Get_packet ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of file */ diff --git a/c/src/exec/posix/include/rtems/posix/config.h b/c/src/exec/posix/include/rtems/posix/config.h deleted file mode 100644 index 8879fed42b..0000000000 --- a/c/src/exec/posix/include/rtems/posix/config.h +++ /dev/null @@ -1,59 +0,0 @@ -/* config.h - * - * This include file contains the table of user defined configuration - * parameters specific for the POSIX API. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_CONFIGURATION_h -#define __RTEMS_POSIX_CONFIGURATION_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * XXX - * - * The following records define the Configuration Table. The - * information contained in this table is required in all - * RTEMS systems, whether single or multiprocessor. This - * table primarily defines the following: - * - * + required number of each object type - */ - -/* - * For now, we are only allowing the user to specify the entry point - * for posix initialization threads. - */ - -typedef struct { - void *(*entry)(void *); -} posix_initialization_threads_table; - -typedef struct { - int maximum_threads; - int maximum_mutexes; - int maximum_condition_variables; - int maximum_keys; - int maximum_queued_signals; - int number_of_initialization_threads; - posix_initialization_threads_table *User_initialization_threads_table; -} posix_api_configuration_table; - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/posix/include/rtems/posix/intr.h b/c/src/exec/posix/include/rtems/posix/intr.h deleted file mode 100644 index f5d0fa2a69..0000000000 --- a/c/src/exec/posix/include/rtems/posix/intr.h +++ /dev/null @@ -1,154 +0,0 @@ -/* rtems/posix/intr.h - * - * This include file contains all the private support information for - * POSIX Interrupt Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_KEY_h -#define __RTEMS_POSIX_KEY_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -/* - * Data Structure used to manage each POSIX Interrupt Vector - */ - -typedef struct { - int number_installed; - int lock_count; - int deferred_count; - Chain_Control Handlers; -} POSIX_Interrupt_Control; - -/* - * Data Structure used to manage a POSIX Interrupt Handler - */ - -typedef struct { - Objects_Control Object; - int is_active; - intr_t vector; - Thread_Control *server; - int (*handler)( void *area ); - volatile void *user_data_area; -} POSIX_Interrupt_Handler_control; - -/* - * The following defines the information control block used to manage - * this class of objects. - */ - -POSIX_EXTERN Objects_Information _POSIX_Interrupt_Handlers_Information; - -/* - * The following is an array which is used to manage the set of - * interrupt handlers installed on each vector. - */ - -POSIX_EXTERN POSIX_Interrupt_Control - _POSIX_Interrupt_Information[ ISR_NUMBER_OF_VECTORS ]; - -/* - * _POSIX_Interrupt_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _POSIX_Interrupt_Manager_initialization( - unsigned32 maximum_interrupt_handlers -); - -/* - * _POSIX_Interrupt_Allocate - * - * DESCRIPTION: - * - * This function allocates a interrupt handler control block from - * the inactive chain of free interrupt handler control blocks. - */ - -RTEMS_INLINE_ROUTINE POSIX_Interrupt_Handler_control * - _POSIX_Interrupt_Allocate( void ); - -/* - * _POSIX_Interrupt_Free - * - * DESCRIPTION: - * - * This routine frees a interrupt handler control block to the - * inactive chain of free interrupt handler control blocks. - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Interrupt_Free ( - POSIX_Interrupt_Handler_control *the_intr -); - -/* - * _POSIX_Interrupt_Get - * - * DESCRIPTION: - * - * This function maps interrupt handler IDs to interrupt handler control - * blocks. If ID corresponds to a local interrupt handler, then it returns - * the_intr control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. if the interrupt handler ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_intr is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_intr is undefined. - */ - -RTEMS_INLINE_ROUTINE POSIX_Interrupt_Control *_POSIX_Interrupt_Get ( - Objects_Id id, - Objects_Locations *location -); - -/* - * _POSIX_Interrupt_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_intr is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Interrupt_Is_null ( - POSIX_Interrupt_Handler_control *the_intr -); - -/* - * _POSIX_Interrupt_Handler - * - * DESCRIPTION: - * - * This function XXX. - */ - -void _POSIX_Interrupt_Handler( - ISR_Vector_number vector -); - -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/include/rtems/posix/key.h b/c/src/exec/posix/include/rtems/posix/key.h deleted file mode 100644 index 23091cd714..0000000000 --- a/c/src/exec/posix/include/rtems/posix/key.h +++ /dev/null @@ -1,136 +0,0 @@ -/* rtems/posix/key.h - * - * This include file contains all the private support information for - * POSIX key. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_KEY_h -#define __RTEMS_POSIX_KEY_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Data Structure used to manage a POSIX key - * - * NOTE: The Values is a table indexed by the index portion of the - * ID of the currently executing thread. - */ - -typedef struct { - Objects_Control Object; - boolean is_active; - void (*destructor)( void * ); - void **Values[ OBJECTS_CLASSES_LAST_THREAD_CLASS + 1 ]; -} POSIX_Keys_Control; - -/* - * The following defines the information control block used to manage - * this class of objects. - */ - -POSIX_EXTERN Objects_Information _POSIX_Keys_Information; - -/* - * _POSIX_Keys_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _POSIX_Key_Manager_initialization( - unsigned32 maximum_keys -); - -/* - * _POSIX_Keys_Run_destructors - * - * DESCRIPTION: - * - * This function executes all the destructors associated with the thread's - * keys. This function will execute until all values have been set to NULL. - * - * NOTE: This is the routine executed when a thread exits to - * run through all the keys and do the destructor action. - */ - -void _POSIX_Keys_Run_destructors( - Thread_Control *thread -); - -/* - * _POSIX_Keys_Allocate - * - * DESCRIPTION: - * - * This function allocates a keys control block from - * the inactive chain of free keys control blocks. - */ - -RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ); - -/* - * _POSIX_Keys_Free - * - * DESCRIPTION: - * - * This routine frees a keys control block to the - * inactive chain of free keys control blocks. - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( - POSIX_Keys_Control *the_key -); - -/* - * _POSIX_Keys_Get - * - * DESCRIPTION: - * - * This function maps key IDs to key control blocks. - * If ID corresponds to a local keys, then it returns - * the_key control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. if the keys ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_key is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_key is undefined. - */ - -RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( - Objects_Id id, - Objects_Locations *location -); - -/* - * _POSIX_Keys_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_key is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Keys_Is_null ( - POSIX_Keys_Control *the_key -); - -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/include/rtems/posix/mqueue.h b/c/src/exec/posix/include/rtems/posix/mqueue.h deleted file mode 100644 index 8ef53acd65..0000000000 --- a/c/src/exec/posix/include/rtems/posix/mqueue.h +++ /dev/null @@ -1,186 +0,0 @@ -/* rtems/posix/mqueue.h - * - * This include file contains all the private support information for - * POSIX Message Queues. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_MESSAGE_QUEUE_h -#define __RTEMS_POSIX_MESSAGE_QUEUE_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -/* - * Data Structure used to manage a POSIX message queue - */ - -typedef struct { - Objects_Control Object; - int process_shared; - int flags; - boolean named; - boolean linked; - boolean blocking; - unsigned32 open_count; - CORE_message_queue_Control Message_queue; - struct sigevent notification; -} POSIX_Message_queue_Control; - -/* - * The following defines the information control block used to manage - * this class of objects. - */ - -POSIX_EXTERN Objects_Information _POSIX_Message_queue_Information; - -/* - * _POSIX_Message_queue_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _POSIX_Message_queue_Manager_initialization( - unsigned32 maximum_message_queues -); - -/* - * - * _POSIX_Message_queue_Create_support - * - * DESCRIPTION: - * - * This routine performs the creation of a message queue utilizing the - * core message queue. - */ - -int _POSIX_Message_queue_Create_support( - const char *name, - int pshared, - unsigned int oflag, - struct mq_attr *attr, - POSIX_Message_queue_Control **message_queue -); - -/* - * - * _POSIX_Message_queue_Send_support - * - * DESCRIPTION: - * - * This routine posts a message to a specified message queue. - */ - -int _POSIX_Message_queue_Send_support( - mqd_t mqdes, - const char *msg_ptr, - unsigned32 msg_len, - Priority_Control msg_prio, - Watchdog_Interval timeout -); - -/* - * _POSIX_Message_queue_Allocate - * - * DESCRIPTION: - * - * This function allocates a message queue control block from - * the inactive chain of free message queue control blocks. - */ - -RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ); - -/* - * _POSIX_Message_queue_Free - * - * DESCRIPTION: - * - * This routine frees a message queue control block to the - * inactive chain of free message queue control blocks. - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( - POSIX_Message_queue_Control *the_mq -); - -/* - * _POSIX_Message_queue_Get - * - * DESCRIPTION: - * - * This function maps message queue IDs to message queue control blocks. - * If ID corresponds to a local message queue, then it returns - * the_mq control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. if the message queue ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_message queue is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_mq is undefined. - */ - -RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( - Objects_Id id, - Objects_Locations *location -); - -/* - * _POSIX_Message_queue_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_message_queue is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Message_queue_Is_null ( - POSIX_Message_queue_Control *the_mq -); - -/* - * _POSIX_Message_queue_Name_to_id - * - * DESCRIPTION: - * - * XXX - */ - -int _POSIX_Message_queue_Name_to_id( - const char *name, - Objects_Id *id -); - -/* - * _POSIX_Message_queue_Priority_to_core - * - * DESCRIPTION: - * - * XXX - */ - -RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Message_queue_Priority_to_core( - unsigned int priority -); - -#include -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/include/rtems/posix/mqueuemp.h b/c/src/exec/posix/include/rtems/posix/mqueuemp.h deleted file mode 100644 index ae23f6af56..0000000000 --- a/c/src/exec/posix/include/rtems/posix/mqueuemp.h +++ /dev/null @@ -1,161 +0,0 @@ -/* mqueuemp.h - * - * This include file contains all the constants and structures associated - * with the Multiprocessing Support in the POSIX Message Queue Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_MESSAGE_QUEUE_MP_h -#define __RTEMS_POSIX_MESSAGE_QUEUE_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -/* - * The following enumerated type defines the list of - * remote message queue operations. - */ - -typedef enum { - POSIX_MESSAGE_QUEUE_MP_ANNOUNCE_CREATE = 0, - POSIX_MESSAGE_QUEUE_MP_ANNOUNCE_DELETE = 1, - POSIX_MESSAGE_QUEUE_MP_EXTRACT_PROXY = 2, - POSIX_MESSAGE_QUEUE_MP_OBTAIN_REQUEST = 3, - POSIX_MESSAGE_QUEUE_MP_OBTAIN_RESPONSE = 4, - POSIX_MESSAGE_QUEUE_MP_RELEASE_REQUEST = 5, - POSIX_MESSAGE_QUEUE_MP_RELEASE_RESPONSE = 6, -} POSIX_Message_queue_MP_Remote_operations; - -/* - * The following data structure defines the packet used to perform - * remote message queue operations. - */ - -typedef struct { - MP_packet_Prefix Prefix; - POSIX_Message_queue_MP_Remote_operations operation; - Objects_Name name; - boolean wait; /* XXX options */ - Objects_Id proxy_id; -} POSIX_Message_queue_MP_Packet; - -/* - * _POSIX_Message_queue_MP_Send_process_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * process operation can be performed on another node. - */ - -void _POSIX_Message_queue_MP_Send_process_packet ( - POSIX_Message_queue_MP_Remote_operations operation, - Objects_Id mq_id, - Objects_Name name, - Objects_Id proxy_id -); - -/* - * _POSIX_Message_queue_MP_Send_request_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. - */ - -int _POSIX_Message_queue_MP_Send_request_packet ( - POSIX_Message_queue_MP_Remote_operations operation, - Objects_Id mq_id, - boolean wait, /* XXX options */ - Watchdog_Interval timeout -); - -/* - * _POSIX_Message_queue_MP_Send_response_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive can be performed on another node. - */ - -void _POSIX_Message_queue_MP_Send_response_packet ( - POSIX_Message_queue_MP_Remote_operations operation, - Objects_Id mq_id, - Thread_Control *the_thread -); - -/* - * - * _POSIX_Message_queue_MP_Process_packet - * - * DESCRIPTION: - * - * This routine performs the actions specific to this package for - * the request from another node. - */ - -void _POSIX_Message_queue_MP_Process_packet ( - MP_packet_Prefix *the_packet_prefix -); - -/* - * _POSIX_Message_queue_MP_Send_object_was_deleted - * - * DESCRIPTION: - * - * This routine is invoked indirectly by the thread queue - * when a proxy has been removed from the thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Message_queue_MP_Send_object_was_deleted ( - Thread_Control *the_proxy -); - -/* - * _POSIX_Message_queue_MP_Send_extract_proxy - * - * DESCRIPTION: - * - * This routine is invoked when a task is deleted and it - * has a proxy which must be removed from a thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Message_queue_MP_Send_extract_proxy ( - Thread_Control *the_thread -); - -/* - * _POSIX_Message_queue_MP_Get_packet - * - * DESCRIPTION: - * - * This function is used to obtain a message queue mp packet. - */ - -POSIX_Message_queue_MP_Packet *_POSIX_Message_queue_MP_Get_packet ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of file */ diff --git a/c/src/exec/posix/include/rtems/posix/mutex.h b/c/src/exec/posix/include/rtems/posix/mutex.h deleted file mode 100644 index 6c065ea26c..0000000000 --- a/c/src/exec/posix/include/rtems/posix/mutex.h +++ /dev/null @@ -1,120 +0,0 @@ -/* rtems/posix/mutex.h - * - * This include file contains all the private support information for - * POSIX mutex's. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_MUTEX_h -#define __RTEMS_POSIX_MUTEX_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -/* - * Data Structure used to manage a POSIX mutex - */ - -typedef struct { - Objects_Control Object; - int process_shared; - CORE_mutex_Control Mutex; -} POSIX_Mutex_Control; - -/* - * The following defines the information control block used to manage - * this class of objects. - */ - -POSIX_EXTERN Objects_Information _POSIX_Mutex_Information; - -/* - * _POSIX_Mutex_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _POSIX_Mutex_Manager_initialization( - unsigned32 maximum_mutexes -); - -/* - * _POSIX_Mutex_Allocate - * - * DESCRIPTION: - * - * This function allocates a mutexes control block from - * the inactive chain of free mutexes control blocks. - */ - -RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ); - -/* - * _POSIX_Mutex_Free - * - * DESCRIPTION: - * - * This routine frees a mutexes control block to the - * inactive chain of free mutexes control blocks. - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( - POSIX_Mutex_Control *the_mutex -); - -/* - * _POSIX_Mutex_Get - * - * DESCRIPTION: - * - * This function maps mutexes IDs to mutexes control blocks. - * If ID corresponds to a local mutexes, then it returns - * the_mutex control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. if the mutexes ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_mutex is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_mutex is undefined. - */ - -RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Get ( - Objects_Id *id, - Objects_Locations *location -); - -/* - * _POSIX_Mutex_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_mutex is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Mutex_Is_null ( - POSIX_Mutex_Control *the_mutex -); - -#include -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/include/rtems/posix/mutexmp.h b/c/src/exec/posix/include/rtems/posix/mutexmp.h deleted file mode 100644 index 15ac5371e8..0000000000 --- a/c/src/exec/posix/include/rtems/posix/mutexmp.h +++ /dev/null @@ -1,161 +0,0 @@ -/* mutexmp.h - * - * This include file contains all the constants and structures associated - * with the Multiprocessing Support in the POSIX Mutex Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_MUTEX_MP_h -#define __RTEMS_POSIX_MUTEX_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -/* - * The following enumerated type defines the list of - * remote mutex operations. - */ - -typedef enum { - POSIX_MUTEX_MP_ANNOUNCE_CREATE = 0, - POSIX_MUTEX_MP_ANNOUNCE_DELETE = 1, - POSIX_MUTEX_MP_EXTRACT_PROXY = 2, - POSIX_MUTEX_MP_OBTAIN_REQUEST = 3, - POSIX_MUTEX_MP_OBTAIN_RESPONSE = 4, - POSIX_MUTEX_MP_RELEASE_REQUEST = 5, - POSIX_MUTEX_MP_RELEASE_RESPONSE = 6, -} POSIX_Mutex_MP_Remote_operations; - -/* - * The following data structure defines the packet used to perform - * remote mutex operations. - */ - -typedef struct { - MP_packet_Prefix Prefix; - POSIX_Mutex_MP_Remote_operations operation; - Objects_Name name; - boolean wait; /* XXX options */ - Objects_Id proxy_id; -} POSIX_Mutex_MP_Packet; - -/* - * _POSIX_Mutex_MP_Send_process_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * process operation can be performed on another node. - */ - -void _POSIX_Mutex_MP_Send_process_packet ( - POSIX_Mutex_MP_Remote_operations operation, - Objects_Id mutex_id, - Objects_Name name, - Objects_Id proxy_id -); - -/* - * _POSIX_Mutex_MP_Send_request_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. - */ - -int _POSIX_Mutex_MP_Send_request_packet ( - POSIX_Mutex_MP_Remote_operations operation, - Objects_Id mutex_id, - boolean wait, /* XXX options */ - Watchdog_Interval timeout -); - -/* - * _POSIX_Mutex_MP_Send_response_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive can be performed on another node. - */ - -void _POSIX_Mutex_MP_Send_response_packet ( - POSIX_Mutex_MP_Remote_operations operation, - Objects_Id mutex_id, - Thread_Control *the_thread -); - -/* - * - * _POSIX_Mutex_MP_Process_packet - * - * DESCRIPTION: - * - * This routine performs the actions specific to this package for - * the request from another node. - */ - -void _POSIX_Mutex_MP_Process_packet ( - MP_packet_Prefix *the_packet_prefix -); - -/* - * _POSIX_Mutex_MP_Send_object_was_deleted - * - * DESCRIPTION: - * - * This routine is invoked indirectly by the thread queue - * when a proxy has been removed from the thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Mutex_MP_Send_object_was_deleted ( - Thread_Control *the_proxy -); - -/* - * _POSIX_Mutex_MP_Send_extract_proxy - * - * DESCRIPTION: - * - * This routine is invoked when a task is deleted and it - * has a proxy which must be removed from a thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Mutex_MP_Send_extract_proxy ( - Thread_Control *the_thread -); - -/* - * _POSIX_Mutex_MP_Get_packet - * - * DESCRIPTION: - * - * This function is used to obtain a mutex mp packet. - */ - -POSIX_Mutex_MP_Packet *_POSIX_Mutex_MP_Get_packet ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of file */ diff --git a/c/src/exec/posix/include/rtems/posix/posixapi.h b/c/src/exec/posix/include/rtems/posix/posixapi.h deleted file mode 100644 index 42c41da8c6..0000000000 --- a/c/src/exec/posix/include/rtems/posix/posixapi.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * POSIX API Support - * - * NOTE: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __POSIX_API_h -#define __POSIX_API_h - -#include - -/*PAGE - * - * _POSIX_API_Initialize - * - * XXX - */ - -void _POSIX_API_Initialize( - rtems_configuration_table *configuration_table -); - -#endif -/* end of include file */ diff --git a/c/src/exec/posix/include/rtems/posix/priority.h b/c/src/exec/posix/include/rtems/posix/priority.h deleted file mode 100644 index ce925b6d58..0000000000 --- a/c/src/exec/posix/include/rtems/posix/priority.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_PRIORITY_h -#define __RTEMS_POSIX_PRIORITY_h - -#include - -/* - * 1003.1b-1993,2.2.2.80 definition of priority, p. 19 - * - * "Numericallly higher values represent higher priorities." - * - * Thus, RTEMS Core has priorities run in the opposite sense of the POSIX API. - */ - -#define POSIX_SCHEDULER_MAXIMUM_PRIORITY (255) - -#define POSIX_SCHEDULER_MINIMUM_PRIORITY (1) - -RTEMS_INLINE_ROUTINE boolean _POSIX_Priority_Is_valid( - int priority -); - -RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( - int priority -); - -RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( - Priority_Control priority -); - -#include - -#endif diff --git a/c/src/exec/posix/include/rtems/posix/psignal.h b/c/src/exec/posix/include/rtems/posix/psignal.h deleted file mode 100644 index 9c66881076..0000000000 --- a/c/src/exec/posix/include/rtems/posix/psignal.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * $Id$ - */ - -#ifndef __POSIX_SIGNALS_h -#define __POSIX_SIGNALS_h - -void _POSIX_signals_Manager_Initialization( - int maximum_queued_signals -); - -void _POSIX_signals_Post_switch_extension( - Thread_Control *the_thread -); - -#endif -/* end of file */ diff --git a/c/src/exec/posix/include/rtems/posix/pthread.h b/c/src/exec/posix/include/rtems/posix/pthread.h deleted file mode 100644 index 7a46edea9f..0000000000 --- a/c/src/exec/posix/include/rtems/posix/pthread.h +++ /dev/null @@ -1,123 +0,0 @@ -/* rtems/posix/pthread.h - * - * This include file contains all the private support information for - * POSIX threads. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_THREADS_h -#define __RTEMS_POSIX_THREADS_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -#define PTHREAD_MINIMUM_STACK_SIZE (STACK_MINIMUM_SIZE * 2) - -/* - * The following defines the information control block used to manage - * this class of objects. - */ - -POSIX_EXTERN Objects_Information _POSIX_Threads_Information; - -/* - * These are used to manage the user initialization threads. - */ - -POSIX_EXTERN posix_initialization_threads_table - *_POSIX_Threads_User_initialization_threads; -POSIX_EXTERN unsigned32 _POSIX_Threads_Number_of_initialization_threads; - - -/* - * _POSIX_Threads_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _POSIX_Threads_Manager_initialization( - unsigned32 maximum_pthreads, - unsigned32 number_of_initialization_threads, - posix_initialization_threads_table *user_threads -); - -/* - * _POSIX_Threads_Allocate - * - * DESCRIPTION: - * - * This function allocates a pthread control block from - * the inactive chain of free pthread control blocks. - */ - -RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ); - -/* - * _POSIX_Threads_Free - * - * DESCRIPTION: - * - * This routine frees a pthread control block to the - * inactive chain of free pthread control blocks. - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free( - Thread_Control *the_pthread -); - -/* - * _POSIX_Threads_Get - * - * DESCRIPTION: - * - * This function maps pthread IDs to pthread control blocks. - * If ID corresponds to a local pthread, then it returns - * the_pthread control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. if the pthread ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_pthread is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_pthread is undefined. - */ - -RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get( - pthread_t id, - Objects_Locations *location -); - -/* - * _POSIX_Threads_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_pthread is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Threads_Is_null( - Thread_Control *the_pthread -); - -#include -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/include/rtems/posix/pthreadmp.h b/c/src/exec/posix/include/rtems/posix/pthreadmp.h deleted file mode 100644 index e15534136b..0000000000 --- a/c/src/exec/posix/include/rtems/posix/pthreadmp.h +++ /dev/null @@ -1,161 +0,0 @@ -/* pthreadmp.h - * - * This include file contains all the constants and structures associated - * with the Multiprocessing Support in the POSIX Threads Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_THREADS_MP_h -#define __RTEMS_POSIX_THREADS_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -/* - * The following enumerated type defines the list of - * remote pthread operations. - */ - -typedef enum { - POSIX_THREADS_MP_ANNOUNCE_CREATE = 0, - POSIX_THREADS_MP_ANNOUNCE_DELETE = 1, - POSIX_THREADS_MP_EXTRACT_PROXY = 2, - POSIX_THREADS_MP_OBTAIN_REQUEST = 3, - POSIX_THREADS_MP_OBTAIN_RESPONSE = 4, - POSIX_THREADS_MP_RELEASE_REQUEST = 5, - POSIX_THREADS_MP_RELEASE_RESPONSE = 6 -} POSIX_Threads_MP_Remote_operations; - -/* - * The following data structure defines the packet used to perform - * remote pthread operations. - */ - -typedef struct { - MP_packet_Prefix Prefix; - POSIX_Threads_MP_Remote_operations operation; - Objects_Name name; - boolean wait; - Objects_Id proxy_id; -} POSIX_Threads_MP_Packet; - -/* - * _POSIX_Threads_MP_Send_process_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * process operation can be performed on another node. - */ - -void _POSIX_Threads_MP_Send_process_packet ( - POSIX_Threads_MP_Remote_operations operation, - Objects_Id pthread_id, - Objects_Name name, - Objects_Id proxy_id -); - -/* - * _POSIX_Threads_MP_Send_request_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. - */ - -int _POSIX_Threads_MP_Send_request_packet ( - POSIX_Threads_MP_Remote_operations operation, - Objects_Id pthread_id, - boolean wait, - Watchdog_Interval timeout -); - -/* - * _POSIX_Threads_MP_Send_response_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive can be performed on another node. - */ - -void _POSIX_Threads_MP_Send_response_packet ( - POSIX_Threads_MP_Remote_operations operation, - Objects_Id pthread_id, - Thread_Control *the_thread -); - -/* - * - * _POSIX_Threads_MP_Process_packet - * - * DESCRIPTION: - * - * This routine performs the actions specific to this package for - * the request from another node. - */ - -void _POSIX_Threads_MP_Process_packet ( - MP_packet_Prefix *the_packet_prefix -); - -/* - * _POSIX_Threads_MP_Send_object_was_deleted - * - * DESCRIPTION: - * - * This routine is invoked indirectly by the thread queue - * when a proxy has been removed from the thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Threads_MP_Send_object_was_deleted ( - Thread_Control *the_proxy -); - -/* - * _POSIX_Threads_MP_Send_extract_proxy - * - * DESCRIPTION: - * - * This routine is invoked when a task is deleted and it - * has a proxy which must be removed from a thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Threads_MP_Send_extract_proxy ( - Thread_Control *the_thread -); - -/* - * _POSIX_Threads_MP_Get_packet - * - * DESCRIPTION: - * - * This function is used to obtain a pthread mp packet. - */ - -POSIX_Threads_MP_Packet *_POSIX_Threads_MP_Get_packet ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of file */ diff --git a/c/src/exec/posix/include/rtems/posix/semaphore.h b/c/src/exec/posix/include/rtems/posix/semaphore.h deleted file mode 100644 index 59679e0d09..0000000000 --- a/c/src/exec/posix/include/rtems/posix/semaphore.h +++ /dev/null @@ -1,135 +0,0 @@ -/* rtems/posix/semaphore.h - * - * This include file contains all the private support information for - * POSIX Semaphores. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_SEMAPHORE_h -#define __RTEMS_POSIX_SEMAPHORE_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* - * Data Structure used to manage a POSIX semaphore - */ - -typedef struct { - Objects_Control Object; - int process_shared; - boolean named; - boolean linked; - unsigned32 open_count; - CORE_semaphore_Control Semaphore; -} POSIX_Semaphore_Control; - -/* - * The following defines the information control block used to manage - * this class of objects. - */ - -POSIX_EXTERN Objects_Information _POSIX_Semaphore_Information; - -/* - * _POSIX_Semaphore_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _POSIX_Semaphore_Manager_initialization( - unsigned32 maximum_semaphorees -); - -/* - * _POSIX_Semaphore_Allocate - * - * DESCRIPTION: - * - * This function allocates a semaphore control block from - * the inactive chain of free semaphore control blocks. - */ - -RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ); - -/* - * _POSIX_Semaphore_Free - * - * DESCRIPTION: - * - * This routine frees a semaphore control block to the - * inactive chain of free semaphore control blocks. - */ - -RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free ( - POSIX_Semaphore_Control *the_semaphore -); - -/* - * _POSIX_Semaphore_Get - * - * DESCRIPTION: - * - * This function maps semaphore IDs to semaphore control blocks. - * If ID corresponds to a local semaphore, then it returns - * the_semaphore control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. if the semaphore ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_semaphore is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_semaphore is undefined. - */ - -RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( - Objects_Id *id, - Objects_Locations *location -); - -/* - * _POSIX_Semaphore_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_semaphore is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _POSIX_Semaphore_Is_null ( - POSIX_Semaphore_Control *the_semaphore -); - -/* - * _POSIX_Semaphore_Name_to_id - * - * DESCRIPTION: - * - * XXX - */ - -int _POSIX_Semaphore_Name_to_id( - const char *name, - Objects_Id *id -); - -#include -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/include/rtems/posix/semaphoremp.h b/c/src/exec/posix/include/rtems/posix/semaphoremp.h deleted file mode 100644 index 102b3d08a6..0000000000 --- a/c/src/exec/posix/include/rtems/posix/semaphoremp.h +++ /dev/null @@ -1,161 +0,0 @@ -/* semaphoremp.h - * - * This include file contains all the constants and structures associated - * with the Multiprocessing Support in the POSIX Semaphore Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_SEMAPHORE_MP_h -#define __RTEMS_POSIX_SEMAPHORE_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -/* - * The following enumerated type defines the list of - * remote semaphore operations. - */ - -typedef enum { - POSIX_SEMAPHORE_MP_ANNOUNCE_CREATE = 0, - POSIX_SEMAPHORE_MP_ANNOUNCE_DELETE = 1, - POSIX_SEMAPHORE_MP_EXTRACT_PROXY = 2, - POSIX_SEMAPHORE_MP_OBTAIN_REQUEST = 3, - POSIX_SEMAPHORE_MP_OBTAIN_RESPONSE = 4, - POSIX_SEMAPHORE_MP_RELEASE_REQUEST = 5, - POSIX_SEMAPHORE_MP_RELEASE_RESPONSE = 6, -} POSIX_Semaphore_MP_Remote_operations; - -/* - * The following data structure defines the packet used to perform - * remote semaphore operations. - */ - -typedef struct { - MP_packet_Prefix Prefix; - POSIX_Semaphore_MP_Remote_operations operation; - Objects_Name name; - boolean wait; /* XXX options */ - Objects_Id proxy_id; -} POSIX_Semaphore_MP_Packet; - -/* - * _POSIX_Semaphore_MP_Send_process_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * process operation can be performed on another node. - */ - -void _POSIX_Semaphore_MP_Send_process_packet ( - POSIX_Semaphore_MP_Remote_operations operation, - Objects_Id semaphore_id, - Objects_Name name, - Objects_Id proxy_id -); - -/* - * _POSIX_Semaphore_MP_Send_request_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. - */ - -int _POSIX_Semaphore_MP_Send_request_packet ( - POSIX_Semaphore_MP_Remote_operations operation, - Objects_Id semaphore_id, - boolean wait, /* XXX options */ - Watchdog_Interval timeout -); - -/* - * _POSIX_Semaphore_MP_Send_response_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive can be performed on another node. - */ - -void _POSIX_Semaphore_MP_Send_response_packet ( - POSIX_Semaphore_MP_Remote_operations operation, - Objects_Id semaphore_id, - Thread_Control *the_thread -); - -/* - * - * _POSIX_Semaphore_MP_Process_packet - * - * DESCRIPTION: - * - * This routine performs the actions specific to this package for - * the request from another node. - */ - -void _POSIX_Semaphore_MP_Process_packet ( - MP_packet_Prefix *the_packet_prefix -); - -/* - * _POSIX_Semaphore_MP_Send_object_was_deleted - * - * DESCRIPTION: - * - * This routine is invoked indirectly by the thread queue - * when a proxy has been removed from the thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Semaphore_MP_Send_object_was_deleted ( - Thread_Control *the_proxy -); - -/* - * _POSIX_Semaphore_MP_Send_extract_proxy - * - * DESCRIPTION: - * - * This routine is invoked when a task is deleted and it - * has a proxy which must be removed from a thread queue and - * the remote node must be informed of this. - */ - -void _POSIX_Semaphore_MP_Send_extract_proxy ( - Thread_Control *the_thread -); - -/* - * _POSIX_Semaphore_MP_Get_packet - * - * DESCRIPTION: - * - * This function is used to obtain a semaphore mp packet. - */ - -POSIX_Semaphore_MP_Packet *_POSIX_Semaphore_MP_Get_packet ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of file */ diff --git a/c/src/exec/posix/include/rtems/posix/seterr.h b/c/src/exec/posix/include/rtems/posix/seterr.h deleted file mode 100644 index 2e603de0f9..0000000000 --- a/c/src/exec/posix/include/rtems/posix/seterr.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __POSIX_SET_ERRNO_h -#define __POSIX_SET_ERRNO_h - -#define set_errno_and_return_minus_one( _error ) \ - { errno = (_error); return -1; } - -#endif -/* end of include file */ diff --git a/c/src/exec/posix/include/rtems/posix/threadsup.h b/c/src/exec/posix/include/rtems/posix/threadsup.h deleted file mode 100644 index bb800a507f..0000000000 --- a/c/src/exec/posix/include/rtems/posix/threadsup.h +++ /dev/null @@ -1,46 +0,0 @@ -/* threadsup.h - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_THREAD_SUPPORT_h -#define __RTEMS_POSIX_THREAD_SUPPORT_h - -#include -#include - -typedef struct { - pthread_attr_t Attributes; - int detachstate; - Thread_queue_Control Join_List; - int schedpolicy; - struct sched_param schedparam; - int ss_high_priority; - Watchdog_Control Sporadic_timer; - - sigset_t signals_blocked; - sigset_t signals_pending; - -#if 0 - /* - * POSIX Interrupts - */ - unsigned32 interrupts_installed; - CORE_semaphore_Control Interrupt_Semaphore; -#endif - -#if 0 - /* - * POSIX Cancelability - */ - int cancelability_state; - int cancelability_type; - int cancelation_requested; - Chain_Control Cancellation_Handlers; -#endif - -} POSIX_API_Control; - -#endif -/* end of include file */ - diff --git a/c/src/exec/posix/include/rtems/posix/time.h b/c/src/exec/posix/include/rtems/posix/time.h deleted file mode 100644 index 0e87db388e..0000000000 --- a/c/src/exec/posix/include/rtems/posix/time.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_TIME_h -#define __RTEMS_POSIX_TIME_h - -#include - -/* - * Seconds from January 1, 1970 to January 1, 1988. Used to account for - * differences between POSIX API and RTEMS core. - */ - -#define POSIX_TIME_SECONDS_1970_THROUGH_1988 \ - (((1987 - 1970 + 1) * TOD_SECONDS_PER_NON_LEAP_YEAR) + \ - (4 * TOD_SECONDS_PER_DAY)) - -/*PAGE - * - * _POSIX_Timespec_subtract - */ - -void _POSIX_Timespec_subtract( - const struct timespec *the_start, - const struct timespec *end, - struct timespec *result -); - -/* - * _POSIX_Timespec_to_interval - */ - -Watchdog_Interval _POSIX_Timespec_to_interval( - const struct timespec *time -); - -/*PAGE - * - * _POSIX_Interval_to_timespec - */ - -void _POSIX_Interval_to_timespec( - Watchdog_Interval ticks, - struct timespec *time -); - -#endif diff --git a/c/src/exec/posix/include/sys/utsname.h b/c/src/exec/posix/include/sys/utsname.h deleted file mode 100644 index ca15230d40..0000000000 --- a/c/src/exec/posix/include/sys/utsname.h +++ /dev/null @@ -1,49 +0,0 @@ -/* sys/utsname.h - * - * $Id$ - */ - -#ifndef __POSIX_SYS_UTSNAME_h -#define __POSIX_SYS_UTSNAME_h - -#include -#include - -/* - * 4.4.1 Get System Name (Table 4-1), P1003.1b-1993, p. 90 - * - * NOTE: The lengths of the strings in this structure are - * just long enough to reliably contain the RTEMS information. - * For example, the fields are not long enough to support - * Internet hostnames. - */ - -struct utsname { - char sysname[ 32 ]; /* Name of this implementation of the operating system */ - char nodename[ 32 ]; /* Name of this node within an implementation */ - /* specified communication network */ - char release[ 32 ]; /* Current release level of this implementation */ - char version[ 32 ]; /* Current version level of this release */ - char machine[ 32 ]; /* Name of the hardware type on which the system */ - /* is running */ -}; - -/* - * 4.4.1 Get System Name, P1003.1b-1993, p. 90 - */ - -int uname( - struct utsname *name -); - -/* - * 4.5.2 Get Process Times, P1003.1b-1993, p. 92 - */ - -clock_t times( - struct tms *buffer -); - -#endif -/* end of include file */ - diff --git a/c/src/exec/rtems/include/rtems.h b/c/src/exec/rtems/include/rtems.h deleted file mode 100644 index e8826079b9..0000000000 --- a/c/src/exec/rtems/include/rtems.h +++ /dev/null @@ -1,121 +0,0 @@ -/* rtems.h - * - * This include file contains information about RTEMS executive that - * is required by the application and is CPU independent. It includes - * two (2) CPU dependent files to tailor its data structures for a - * particular processor. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_RTEMS_GENERIC_h -#define __RTEMS_RTEMS_GENERIC_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Unless told otherwise, the RTEMS include files will hide some stuff - * from normal application code. Defining this crosses a boundary which - * is undesirable since it means your application is using RTEMS features - * which are not included in the formally defined and supported API. - * Define this at your own risk. - */ - -#ifndef __RTEMS_VIOLATE_KERNEL_VISIBILITY__ -#define __RTEMS_APPLICATION__ -#endif - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#define RTEMS_HAS_HARDWARE_FP CPU_HARDWARE_FP - -/* - * The following define the constants which may be used in name searches. - */ - -#define RTEMS_SEARCH_ALL_NODES OBJECTS_SEARCH_ALL_NODES -#define RTEMS_SEARCH_OTHER_NODES OBJECTS_SEARCH_OTHER_NODES -#define RTEMS_SEARCH_LOCAL_NODE OBJECTS_SEARCH_LOCAL_NODE -#define RTEMS_WHO_AM_I OBJECTS_WHO_AM_I - -/* - * Parameters and return id's for _Objects_Get_next - */ - -#define RTEMS_OBJECT_ID_INITIAL_INDEX OBJECTS_ID_INITIAL_INDEX -#define RTEMS_OBJECT_ID_FINAL_INDEX OBJECTS_ID_FINAL_INDEX - -#define RTEMS_OBJECT_ID_INITIAL(class, node) OBJECTS_ID_INITIAL(class, node) -#define RTEMS_OBJECT_ID_FINAL OBJECTS_ID_FINAL - -/* - * The following constant defines the minimum stack size which every - * thread must exceed. - */ - -#define RTEMS_MINIMUM_STACK_SIZE STACK_MINIMUM_SIZE - -/* - * Constant for indefinite wait. (actually an illegal interval) - */ - -#define RTEMS_NO_TIMEOUT WATCHDOG_NO_TIMEOUT - -/* - * An MPCI must support packets of at least this size. - */ - -#define RTEMS_MINIMUM_PACKET_SIZE MP_PACKET_MINIMUM_PACKET_SIZE - -/* - * The following constant defines the number of unsigned32's - * in a packet which must be converted to native format in a - * heterogeneous system. In packets longer than - * MP_PACKET_MINIMUN_HETERO_CONVERSION unsigned32's, some of the "extra" data - * may a user message buffer which is not automatically endian swapped. - */ - -#define RTEMS_MINIMUN_HETERO_CONVERSION MP_PACKET_MINIMUN_HETERO_CONVERSION - - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/asr.h b/c/src/exec/rtems/include/rtems/rtems/asr.h deleted file mode 100644 index 31758fc06b..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/asr.h +++ /dev/null @@ -1,112 +0,0 @@ -/* asr.h - * - * This include file contains all the constants and structures associated - * with the Asynchronous Signal Handler. This Handler provides the low-level - * support required by the Signal Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_ASR_h -#define __RTEMS_ASR_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* - * - * The following type defines the control block used to manage - * each signal set. - */ - -typedef unsigned32 rtems_signal_set; - -/* - * Return type for ASR Handler - */ - -typedef void rtems_asr; - -/* - * The following type corresponds to the applications asynchronous - * signal processing routine. - */ - -typedef rtems_asr ( *rtems_asr_entry )( - rtems_signal_set - ); - -/* - * - * The following defines the control structure used to manage - * signals. Each thread has a copy of this record. - */ - -typedef struct { - boolean is_enabled; /* are ASRs enabled currently? */ - rtems_asr_entry handler; /* address of RTEMS_ASR */ - Modes_Control mode_set; /* RTEMS_ASR mode */ - rtems_signal_set signals_posted; /* signal set */ - rtems_signal_set signals_pending; /* pending signal set */ - unsigned32 nest_level; /* nest level of RTEMS_ASR */ -} ASR_Information; - -/* - * The following constants define the individual signals which may - * be used to compose a signal set. - */ - -#define RTEMS_SIGNAL_0 0x00000001 -#define RTEMS_SIGNAL_1 0x00000002 -#define RTEMS_SIGNAL_2 0x00000004 -#define RTEMS_SIGNAL_3 0x00000008 -#define RTEMS_SIGNAL_4 0x00000010 -#define RTEMS_SIGNAL_5 0x00000020 -#define RTEMS_SIGNAL_6 0x00000040 -#define RTEMS_SIGNAL_7 0x00000080 -#define RTEMS_SIGNAL_8 0x00000100 -#define RTEMS_SIGNAL_9 0x00000200 -#define RTEMS_SIGNAL_10 0x00000400 -#define RTEMS_SIGNAL_11 0x00000800 -#define RTEMS_SIGNAL_12 0x00001000 -#define RTEMS_SIGNAL_13 0x00002000 -#define RTEMS_SIGNAL_14 0x00004000 -#define RTEMS_SIGNAL_15 0x00008000 -#define RTEMS_SIGNAL_16 0x00010000 -#define RTEMS_SIGNAL_17 0x00020000 -#define RTEMS_SIGNAL_18 0x00040000 -#define RTEMS_SIGNAL_19 0x00080000 -#define RTEMS_SIGNAL_20 0x00100000 -#define RTEMS_SIGNAL_21 0x00200000 -#define RTEMS_SIGNAL_22 0x00400000 -#define RTEMS_SIGNAL_23 0x00800000 -#define RTEMS_SIGNAL_24 0x01000000 -#define RTEMS_SIGNAL_25 0x02000000 -#define RTEMS_SIGNAL_26 0x04000000 -#define RTEMS_SIGNAL_27 0x08000000 -#define RTEMS_SIGNAL_28 0x10000000 -#define RTEMS_SIGNAL_29 0x20000000 -#define RTEMS_SIGNAL_30 0x40000000 -#define RTEMS_SIGNAL_31 0x80000000 - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/attr.h b/c/src/exec/rtems/include/rtems/rtems/attr.h deleted file mode 100644 index 8262a3a381..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/attr.h +++ /dev/null @@ -1,84 +0,0 @@ -/* attr.h - * - * This include file contains all information about the Object Attributes - * Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_ATTRIBUTES_h -#define __RTEMS_ATTRIBUTES_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* types */ - -typedef unsigned32 rtems_attribute; - -/* constants */ - -#define RTEMS_DEFAULT_ATTRIBUTES 0x00000000 - -#define RTEMS_NO_FLOATING_POINT 0x00000000 /* don't use FP HW */ -#define RTEMS_FLOATING_POINT 0x00000001 /* utilize coprocessor */ - -#define RTEMS_LOCAL 0x00000000 /* local resource */ -#define RTEMS_GLOBAL 0x00000002 /* global resource */ - -#define RTEMS_FIFO 0x00000000 /* process RTEMS_FIFO */ -#define RTEMS_PRIORITY 0x00000004 /* process by priority */ - -#define RTEMS_COUNTING_SEMAPHORE 0x00000000 -#define RTEMS_BINARY_SEMAPHORE 0x00000010 - -#define RTEMS_NO_INHERIT_PRIORITY 0x00000000 -#define RTEMS_INHERIT_PRIORITY 0x00000020 - -#define RTEMS_NO_PRIORITY_CEILING 0x00000000 -#define RTEMS_PRIORITY_CEILING 0x00000040 - -#if ( CPU_HARDWARE_FP == TRUE ) -#define ATTRIBUTES_NOT_SUPPORTED 0 -#else -#define ATTRIBUTES_NOT_SUPPORTED RTEMS_FLOATING_POINT -#endif - -#if ( CPU_ALL_TASKS_ARE_FP == TRUE ) -#define ATTRIBUTES_REQUIRED RTEMS_FLOATING_POINT -#else -#define ATTRIBUTES_REQUIRED 0 -#endif - -/* - * _Attributes_Handler_initialization - * - * DESCRIPTION: - * - * This routine performs initialization for this handler. - * - * NOTE: There is no initialization required in C. Conditional compilation - * takes care of this in C. - */ - -#define _Attributes_Handler_initialization() - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/clock.h b/c/src/exec/rtems/include/rtems/rtems/clock.h deleted file mode 100644 index d7c032a282..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/clock.h +++ /dev/null @@ -1,103 +0,0 @@ -/* clock.h - * - * This include file contains all the constants and structures associated - * with the Clock Manager. This manager provides facilities to set, obtain, - * and continually update the current date and time. - * - * This manager provides directives to: - * - * + set the current date and time - * + obtain the current date and time - * + announce a clock tick - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_CLOCK_h -#define __RTEMS_CLOCK_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -/* - * List of things which can be returned by the rtems_clock_get directive. - */ - -typedef enum { - RTEMS_CLOCK_GET_TOD, - RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH, - RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, - RTEMS_CLOCK_GET_TICKS_PER_SECOND, - RTEMS_CLOCK_GET_TIME_VALUE -} rtems_clock_get_options; - -/* - * Standard flavor style to return TOD in for a rtems_clock_get option. - */ - -typedef struct { - unsigned32 seconds; - unsigned32 microseconds; -} rtems_clock_time_value; - -/* - * rtems_clock_get - * - * DESCRIPTION: - * - * This routine implements the rtems_clock_get directive. It returns - * one of the following: - * + current time of day - * + seconds since epoch - * + ticks since boot - * + ticks per second - */ - -rtems_status_code rtems_clock_get( - rtems_clock_get_options option, - void *time_buffer -); - -/* - * rtems_clock_set - * - * DESCRIPTION: - * - * This routine implements the rtems_clock_set directive. It sets - * the current time of day to that in the time_buffer record. - */ - -rtems_status_code rtems_clock_set( - rtems_time_of_day *time_buffer -); - -/* - * rtems_clock_tick - * - * DESCRIPTION: - * - * This routine implements the rtems_clock_tick directive. It is invoked - * to inform RTEMS of the occurrence of a clock tick. - */ - -rtems_status_code rtems_clock_tick( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/config.h b/c/src/exec/rtems/include/rtems/rtems/config.h deleted file mode 100644 index b0a0811bfe..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/config.h +++ /dev/null @@ -1,54 +0,0 @@ -/* config.h - * - * This include file contains the table of user defined configuration - * parameters specific for the RTEMS API. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_RTEMS_CONFIGURATION_h -#define __RTEMS_RTEMS_CONFIGURATION_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -/* - * The following records define the Configuration Table. The - * information contained in this table is required in all - * RTEMS systems, whether single or multiprocessor. This - * table primarily defines the following: - * - * + required number of each object type - */ - -typedef struct { - unsigned32 maximum_tasks; - unsigned32 maximum_timers; - unsigned32 maximum_semaphores; - unsigned32 maximum_message_queues; - unsigned32 maximum_partitions; - unsigned32 maximum_regions; - unsigned32 maximum_ports; - unsigned32 maximum_periods; - unsigned32 number_of_initialization_tasks; - rtems_initialization_tasks_table *User_initialization_tasks_table; -} rtems_api_configuration_table; - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/dpmem.h b/c/src/exec/rtems/include/rtems/rtems/dpmem.h deleted file mode 100644 index 6f8893dd4b..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/dpmem.h +++ /dev/null @@ -1,157 +0,0 @@ -/* dpmem.h - * - * This include file contains all the constants and structures associated - * with the Dual Ported Memory Manager. This manager provides a mechanism - * for converting addresses between internal and external representations - * for multiple dual-ported memory areas. - * - * Directives provided are: - * - * + create a port - * + get ID of a port - * + delete a port - * + convert external to internal address - * + convert internal to external address - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_DUAL_PORTED_MEMORY_h -#define __RTEMS_DUAL_PORTED_MEMORY_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* - * The following structure defines the port control block. Each port - * has a control block associated with it. This control block contains - * all information required to support the port related operations. - */ - -typedef struct { - Objects_Control Object; - void *internal_base; /* base internal address */ - void *external_base; /* base external address */ - unsigned32 length; /* length of dual-ported area */ -} Dual_ported_memory_Control; - -/* - * The following define the internal Dual Ported Memory information. - */ - -RTEMS_EXTERN Objects_Information _Dual_ported_memory_Information; - -/* - * _Dual_ported_memory_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _Dual_ported_memory_Manager_initialization( - unsigned32 maximum_ports -); - -/* - * rtems_port_create - * - * DESCRIPTION: - * - * This routine implements the rtems_port_create directive. The port - * will have the name name. The port maps onto an area of dual ported - * memory of length bytes which has internal_start and external_start - * as the internal and external starting addresses, respectively. - * It returns the id of the created port in ID. - */ - -rtems_status_code rtems_port_create( - rtems_name name, - void *internal_start, - void *external_start, - unsigned32 length, - Objects_Id *id -); - -/* - * rtems_port_ident - * - * DESCRIPTION: - * - * This routine implements the rtems_port_ident directive. This directive - * returns the port ID associated with name. If more than one port is - * named name, then the port to which the ID belongs is arbitrary. - */ - -rtems_status_code rtems_port_ident( - rtems_name name, - Objects_Id *id -); - -/* - * rtems_port_delete - * - * DESCRIPTION: - * - * This routine implements the rtems_port_delete directive. It deletes - * the port associated with ID. - */ - -rtems_status_code rtems_port_delete( - Objects_Id id -); - -/* - * rtems_port_external_to_internal - * - * DESCRIPTION: - * - * This routine implements the rtems_port_external_to_internal directive. - * It returns the internal port address which maps to the provided - * external port address for the specified port ID. - */ - -rtems_status_code rtems_port_external_to_internal( - Objects_Id id, - void *external, - void **internal -); - -/* - * rtems_port_internal_to_external - * - * DESCRIPTION: - * - * This routine implements the Port_internal_to_external directive. - * It returns the external port address which maps to the provided - * internal port address for the specified port ID. - */ - -rtems_status_code rtems_port_internal_to_external( - Objects_Id id, - void *internal, - void **external -); - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/event.h b/c/src/exec/rtems/include/rtems/rtems/event.h deleted file mode 100644 index 6cb9882da5..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/event.h +++ /dev/null @@ -1,174 +0,0 @@ -/* event.h - * - * This include file contains the information pertaining to the Event - * Manager. This manager provides a high performance method of communication - * and synchronization. - * - * Directives provided are: - * - * + send an event set to a task - * + receive event condition - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_EVENT_h -#define __RTEMS_EVENT_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include - -/* - * This constant is passed as the event_in to the - * rtems_event_receive directive to determine which events are pending. - */ - -#define EVENT_CURRENT 0 - -/* - * The following enumerated types indicate what happened while the event - * manager was in the synchronization window. - */ - -typedef enum { - EVENT_SYNC_SYNCHRONIZED, - EVENT_SYNC_NOTHING_HAPPENED, - EVENT_SYNC_TIMEOUT, - EVENT_SYNC_SATISFIED -} Event_Sync_states; - -/* - * Event_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _Event_Manager_initialization( void ); - -/* - * rtems_event_send - * - * DESCRIPTION: - * - * This routine implements the rtems_event_send directive. It sends - * event_in to the task specified by ID. If the task is blocked - * waiting to receive events and the posting of event_in satisfies - * the task's event condition, then it is unblocked. - */ - -rtems_status_code rtems_event_send ( - Objects_Id id, - rtems_event_set event_in -); - -/* - * rtems_event_receive - * - * DESCRIPTION: - * - * This routine implements the rtems_event_receive directive. This - * directive is invoked when the calling task wishes to receive - * the event_in event condition. One of the fields in the option_set - * parameter determines whether the receive request is satisfied if - * any or all of the events are pending. If the event condition - * is not satisfied immediately, then the task may block with an - * optional timeout of TICKS clock ticks or return immediately. - * This determination is based on another field in the option_set - * parameter. This directive returns the events received in the - * event_out parameter. - */ - -rtems_status_code rtems_event_receive ( - rtems_event_set event_in, - rtems_option option_set, - rtems_interval ticks, - rtems_event_set *event_out -); - -/* - * _Event_Seize - * - * DESCRIPTION: - * - * This routine determines if the event condition event_in is - * satisfied. If so or if the no_wait option is enabled in option_set, - * then the procedure returns immediately. If neither of these - * conditions is true, then the calling task is blocked with an - * optional timeout of ticks clock ticks. - */ - -void _Event_Seize ( - rtems_event_set event_in, - rtems_option option_set, - rtems_interval ticks, - rtems_event_set *event_out -); - -/* - * _Event_Surrender - * - * DESCRIPTION: - * - * This routine determines if the event condition of the_thread - * has been satisfied. If so, it unblocks the_thread. - */ - -void _Event_Surrender ( - Thread_Control *the_thread -); - -/* - * _Event_Timeout - * - * DESCRIPTION: - * - * This routine is invoked when a task's event receive request - * has not been satisfied after the specified timeout interval. - * The task represented by ID will be unblocked and its status - * code will be set in it's control block to indicate that a timeout - * has occurred. - */ - -void _Event_Timeout ( - Objects_Id id, - void *ignored -); - -/* - * The following defines the synchronization flag used by the - * Event Manager to insure that signals sent to the currently - * executing thread are received properly. - */ - -RTEMS_EXTERN volatile Event_Sync_states _Event_Sync_state; - -#include -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/eventmp.h b/c/src/exec/rtems/include/rtems/rtems/eventmp.h deleted file mode 100644 index a6f5b912b0..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/eventmp.h +++ /dev/null @@ -1,147 +0,0 @@ -/* eventmp.h - * - * This include file contains all the constants and structures associated - * with the Multiprocessing Support in the Event Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_EVENT_MP_h -#define __RTEMS_EVENT_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include - -/* - * The following enumerated type defines the list of - * remote event operations. - */ - -typedef enum { - EVENT_MP_SEND_REQUEST = 0, - EVENT_MP_SEND_RESPONSE = 1 -} Event_MP_Remote_operations; - -/* - * The following data structure defines the packet used to perform - * remote event operations. - */ - -typedef struct { - rtems_packet_prefix Prefix; - Event_MP_Remote_operations operation; - rtems_event_set event_in; -} Event_MP_Packet; - -/* - * _Event_MP_Send_process_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * process operation can be performed on another node. - * - * This routine is not needed since there are no process - * packets to be sent by this manager. - */ - -/* - * _Event_MP_Send_request_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. - */ - -rtems_status_code _Event_MP_Send_request_packet ( - Event_MP_Remote_operations operation, - Objects_Id event_id, - rtems_event_set event_in -); - -/* - * _Event_MP_Send_response_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive can be performed on another node. - */ - -void _Event_MP_Send_response_packet ( - Event_MP_Remote_operations operation, - Thread_Control *the_thread -); - -/* - * - * _Event_MP_Process_packet - * - * DESCRIPTION: - * - * This routine performs the actions specific to this package for - * the request from another node. - */ - -void _Event_MP_Process_packet ( - rtems_packet_prefix *the_packet_prefix -); - -/* - * _Event_MP_Send_object_was_deleted - * - * DESCRIPTION: - * - * This routine is invoked indirectly by the thread queue - * when a proxy has been removed from the thread queue and - * the remote node must be informed of this. - * - * This routine is not needed since there are no objects - * deleted by this manager. - */ - -/* - * _Event_MP_Send_extract_proxy - * - * DESCRIPTION: - * - * This routine is invoked when a task is deleted and it - * has a proxy which must be removed from a thread queue and - * the remote node must be informed of this. - * - * This routine is not needed since there are no objects - * deleted by this manager. - */ - -/* - * _Event_MP_Get_packet - * - * DESCRIPTION: - * - * This function is used to obtain a event mp packet. - */ - -Event_MP_Packet *_Event_MP_Get_packet ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/eventset.h b/c/src/exec/rtems/include/rtems/rtems/eventset.h deleted file mode 100644 index 0f3e122e5f..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/eventset.h +++ /dev/null @@ -1,89 +0,0 @@ -/* eventset.h - * - * This include file contains the information pertaining to the - * Event Sets Handler. This handler provides methods for the manipulation - * of event sets which will be sent and received by tasks. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_EVENT_SET_h -#define __RTEMS_EVENT_SET_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The following defines the type used to control event sets. - */ - -typedef unsigned32 rtems_event_set; - -/* - * The following constants define the individual events which may - * be used to compose an event set. - */ - -#define RTEMS_PENDING_EVENTS 0 /* receive pending events */ -#define RTEMS_ALL_EVENTS 0xFFFFFFFF - -#define RTEMS_EVENT_0 0x00000001 -#define RTEMS_EVENT_1 0x00000002 -#define RTEMS_EVENT_2 0x00000004 -#define RTEMS_EVENT_3 0x00000008 -#define RTEMS_EVENT_4 0x00000010 -#define RTEMS_EVENT_5 0x00000020 -#define RTEMS_EVENT_6 0x00000040 -#define RTEMS_EVENT_7 0x00000080 -#define RTEMS_EVENT_8 0x00000100 -#define RTEMS_EVENT_9 0x00000200 -#define RTEMS_EVENT_10 0x00000400 -#define RTEMS_EVENT_11 0x00000800 -#define RTEMS_EVENT_12 0x00001000 -#define RTEMS_EVENT_13 0x00002000 -#define RTEMS_EVENT_14 0x00004000 -#define RTEMS_EVENT_15 0x00008000 -#define RTEMS_EVENT_16 0x00010000 -#define RTEMS_EVENT_17 0x00020000 -#define RTEMS_EVENT_18 0x00040000 -#define RTEMS_EVENT_19 0x00080000 -#define RTEMS_EVENT_20 0x00100000 -#define RTEMS_EVENT_21 0x00200000 -#define RTEMS_EVENT_22 0x00400000 -#define RTEMS_EVENT_23 0x00800000 -#define RTEMS_EVENT_24 0x01000000 -#define RTEMS_EVENT_25 0x02000000 -#define RTEMS_EVENT_26 0x04000000 -#define RTEMS_EVENT_27 0x08000000 -#define RTEMS_EVENT_28 0x10000000 -#define RTEMS_EVENT_29 0x20000000 -#define RTEMS_EVENT_30 0x40000000 -#define RTEMS_EVENT_31 0x80000000 - - -/* - * The following constant is the value of an event set which - * has no events pending. - */ - -#define EVENT_SETS_NONE_PENDING 0 - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/intr.h b/c/src/exec/rtems/include/rtems/rtems/intr.h deleted file mode 100644 index 8681ccf9e0..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/intr.h +++ /dev/null @@ -1,160 +0,0 @@ -/* intr.h - * - * This include file contains all the constants and structures associated - * with the Interrupt Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_INTERRUPT_h -#define __RTEMS_INTERRUPT_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* - * Interrupt level type - */ - -typedef ISR_Level rtems_interrupt_level; - -/* - * The following type defines the control block used to manage - * the vectors. - */ - -typedef ISR_Vector_number rtems_vector_number; - -/* - * Return type for ISR Handler - */ - -typedef void rtems_isr; - -/* - * Pointer to an ISR Handler - */ - -typedef rtems_isr ( *rtems_isr_entry )( - rtems_vector_number - ); - -/* - * _Interrupt_Manager_initialization - * - * DESCRIPTION: - * - * This routine initializes the interrupt manager. - * - */ - -void _Interrupt_Manager_initialization( void ); - -/* - * rtems_interrupt_catch - * - * DESCRIPTION: - * - * This routine implements the rtems_interrupt_catch directive. This - * directive installs new_isr_handler as the RTEMS interrupt service - * routine for vector. The previous RTEMS interrupt service - * routine is returned in old_isr_handler. - */ - -rtems_status_code rtems_interrupt_catch( - rtems_isr_entry new_isr_handler, - rtems_vector_number vector, - rtems_isr_entry *old_isr_handler -); - -/* - * rtems_interrupt_disable - * - * DESCRIPTION: - * - * This routine disables all maskable interrupts and returns the - * previous level in _isr_cookie. - */ - -#define rtems_interrupt_disable( _isr_cookie ) \ - _ISR_Disable(_isr_cookie) - -/* - * rtems_interrupt_enable - * - * DESCRIPTION: - * - * This routine enables maskable interrupts to the level indicated - * _isr_cookie. - */ - -#define rtems_interrupt_enable( _isr_cookie ) \ - _ISR_Enable(_isr_cookie) - -/* - * rtems_interrupt_flash - * - * DESCRIPTION: - * - * This routine temporarily enables maskable interrupts to the - * level in _isr_cookie before redisabling them. - */ - -#define rtems_interrupt_flash( _isr_cookie ) \ - _ISR_Flash(_isr_cookie) - -/* - * rtems_interrupt_is_in_progress - * - * DESCRIPTION: - * - * This function returns TRUE if the processor is currently servicing - * and interrupt and FALSE otherwise. A return value of TRUE indicates - * that the caller is an interrupt service routine, NOT a thread. The - * directives available to an interrupt service routine are restricted. - */ - -#define rtems_interrupt_is_in_progress() \ - _ISR_Is_in_progress() - -/* - * rtems_interrupt_cause - * - * DESCRIPTION: - * - * This routine generates an interrupt. - * - * NOTE: No implementation. - */ - -#define rtems_interrupt_cause( _interrupt_to_cause ) - -/* - * rtems_interrupt_cause - * - * DESCRIPTION: - * - * This routine clears the specified interrupt. - * - * NOTE: No implementation. - */ - -#define rtems_interrupt_clear( _interrupt_to_clear ) - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/message.h b/c/src/exec/rtems/include/rtems/rtems/message.h deleted file mode 100644 index 0f8fe9f1b1..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/message.h +++ /dev/null @@ -1,317 +0,0 @@ -/* message.h - * - * This include file contains all the constants and structures associated - * with the Message Queue Manager. This manager provides a mechanism for - * communication and synchronization between tasks using messages. - * - * Directives provided are: - * - * + create a queue - * + get ID of a queue - * + delete a queue - * + put a message at the rear of a queue - * + put a message at the front of a queue - * + broadcast N messages to a queue - * + receive message from a queue - * + flush all messages on a queue - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_MESSAGE_QUEUE_h -#define __RTEMS_MESSAGE_QUEUE_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include - -/* - * The following enumerated type details the modes in which a message - * may be submitted to a message queue. The message may be posted - * in a send or urgent fashion. - */ - -typedef enum { - MESSAGE_QUEUE_SEND_REQUEST = 0, - MESSAGE_QUEUE_URGENT_REQUEST = 1 -} Message_queue_Submit_types; - -/* - * The following records define the control block used to manage - * each message queue. - */ - -typedef struct { - Objects_Control Object; - rtems_attribute attribute_set; - CORE_message_queue_Control message_queue; -} Message_queue_Control; - -/* - * The following defines the information control block used to - * manage this class of objects. - */ - -RTEMS_EXTERN Objects_Information _Message_queue_Information; - -/* - * _Message_queue_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _Message_queue_Manager_initialization( - unsigned32 maximum_message_queues -); - -/* - * rtems_message_queue_create - * - * DESCRIPTION: - * - * This routine implements the rtems_message_queue_create directive. The - * message queue will have the name name. If the attribute_set indicates - * that the message queue is to be limited in the number of messages - * that can be outstanding, then count indicates the maximum number of - * messages that will be held. It returns the id of the created - * message queue in ID. - */ - -rtems_status_code rtems_message_queue_create( - rtems_name name, - unsigned32 count, - unsigned32 max_message_size, - rtems_attribute attribute_set, - Objects_Id *id -); - -/* - * rtems_message_queue_ident - * - * DESCRIPTION: - * - * This routine implements the rtems_message_queue_ident directive. - * This directive returns the message queue ID associated with NAME. - * If more than one message queue is named name, then the message - * queue to which the ID belongs is arbitrary. node indicates the - * extent of the search for the ID of the message queue named name. - * The search can be limited to a particular node or allowed to - * encompass all nodes. - */ - -rtems_status_code rtems_message_queue_ident( - rtems_name name, - unsigned32 node, - Objects_Id *id -); - -/* - * rtems_message_queue_delete - * - * DESCRIPTION: - * - * This routine implements the rtems_message_queue_delete directive. The - * message queue indicated by ID is deleted. - */ - -rtems_status_code rtems_message_queue_delete( - Objects_Id id -); - -/* - * rtems_message_queue_send - * - * DESCRIPTION: - * - * This routine implements the rtems_message_queue_send directive. - * This directive sends the message buffer to the message queue - * indicated by ID. If one or more tasks is blocked waiting - * to receive a message from this message queue, then one will - * receive the message. The task selected to receive the - * message is based on the task queue discipline algorithm in - * use by this particular message queue. If no tasks are waiting, - * then the message buffer will be placed at the rear of the - * chain of pending messages for this message queue. - */ - -rtems_status_code rtems_message_queue_send( - Objects_Id id, - void *buffer, - unsigned32 size -); - -/* - * rtems_message_queue_urgent - * - * DESCRIPTION: - * - * This routine implements the rtems_message_queue_send directive. - * This directive sends the message buffer to the message queue - * indicated by ID. If one or more tasks is blocked waiting - * to receive a message from this message queue, then one will - * receive the message. The task selected to receive the - * message is based on the task queue discipline algorithm in - * use by this particular message queue. If no tasks are waiting, - * then the message buffer will be placed at the rear of the - * chain of pending messages for this message queue. - */ - -rtems_status_code rtems_message_queue_urgent( - Objects_Id id, - void *buffer, - unsigned32 size -); - -/* - * rtems_message_queue_broadcast - * - * DESCRIPTION: - * - * This routine implements the rtems_message_queue_send directive. - * This directive sends the message buffer to the message queue - * indicated by ID. If one or more tasks is blocked waiting - * to receive a message from this message queue, then one will - * receive the message. The task selected to receive the - * message is based on the task queue discipline algorithm in - * use by this particular message queue. If no tasks are waiting, - * then the message buffer will be placed at the rear of the - * chain of pending messages for this message queue. - */ - -rtems_status_code rtems_message_queue_broadcast( - Objects_Id id, - void *buffer, - unsigned32 size, - unsigned32 *count -); - -/* - * rtems_message_queue_receive - * - * DESCRIPTION: - * - * This routine implements the rtems_message_queue_receive directive. - * This directive is invoked when the calling task wishes to receive - * a message from the message queue indicated by ID. The received - * message is to be placed in buffer. If no messages are outstanding - * and the option_set indicates that the task is willing to block, - * then the task will be blocked until a message arrives or until, - * optionally, timeout clock ticks have passed. - */ - -rtems_status_code rtems_message_queue_receive( - Objects_Id id, - void *buffer, - unsigned32 *size, - unsigned32 option_set, - rtems_interval timeout -); - -/* - * rtems_message_queue_flush - * - * DESCRIPTION: - * - * This routine implements the rtems_message_queue_flush directive. - * This directive takes all outstanding messages for the message - * queue indicated by ID and returns them to the inactive message - * chain. The number of messages flushed is returned in COUNT. - */ - -rtems_status_code rtems_message_queue_flush( - Objects_Id id, - unsigned32 *count -); - -/* - * _Message_queue_Submit - * - * DESCRIPTION: - * - * This routine implements the directives rtems_message_queue_send - * and rtems_message_queue_urgent. It processes a message that is - * to be submitted to the designated message queue. The message will - * either be processed as a send send message which it will be inserted - * at the rear of the queue or it will be processed as an urgent message - * which will be inserted at the front of the queue. - */ - -rtems_status_code _Message_queue_Submit( - Objects_Id id, - void *buffer, - unsigned32 size, - Message_queue_Submit_types submit_type -); - -/* - * _Message_queue_Allocate - * - * DESCRIPTION: - * - * This function allocates a message queue control block from - * the inactive chain of free message queue control blocks. - */ - -Message_queue_Control *_Message_queue_Allocate ( - unsigned32 count, - unsigned32 max_message_size -); - -/* - * _Message_queue_Translate_core_message_queue_return_code - * - * DESCRIPTION: - * - * This function returns a RTEMS status code based on the core message queue - * status code specified. - */ - -rtems_status_code _Message_queue_Translate_core_message_queue_return_code ( - unsigned32 the_message_queue_status -); - -/* - * - * _Message_queue_Core_message_queue_mp_support - * - * Input parameters: - * the_thread - the remote thread the message was submitted to - * id - id of the message queue - * - * Output parameters: NONE - */ - -void _Message_queue_Core_message_queue_mp_support ( - Thread_Control *the_thread, - Objects_Id id -); - -#ifndef __RTEMS_APPLICATION__ -#include -#endif -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/modes.h b/c/src/exec/rtems/include/rtems/rtems/modes.h deleted file mode 100644 index 34a23c7b20..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/modes.h +++ /dev/null @@ -1,89 +0,0 @@ -/* modes.h - * - * This include file contains all constants and structures associated - * with the RTEMS thread and RTEMS_ASR modes. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_MODES_h -#define __RTEMS_MODES_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* - * The following type defines the control block used to manage - * each a mode set. - */ - -typedef unsigned32 Modes_Control; - -/* - * The following constants define the individual modes and masks - * which may be used to compose a mode set and to alter modes. - */ - -#define RTEMS_ALL_MODE_MASKS 0x0000ffff - -#define RTEMS_DEFAULT_MODES 0x00000000 -#define RTEMS_CURRENT_MODE 0 - -#define RTEMS_PREEMPT_MASK 0x00000100 /* preemption bit */ -#define RTEMS_TIMESLICE_MASK 0x00000200 /* timeslice bit */ -#define RTEMS_ASR_MASK 0x00000400 /* RTEMS_ASR enable bit */ -#define RTEMS_INTERRUPT_MASK CPU_MODES_INTERRUPT_MASK - -#define RTEMS_PREEMPT 0x00000000 /* enable preemption */ -#define RTEMS_NO_PREEMPT 0x00000100 /* disable preemption */ - -#define RTEMS_NO_TIMESLICE 0x00000000 /* disable timeslicing */ -#define RTEMS_TIMESLICE 0x00000200 /* enable timeslicing */ - -#define RTEMS_ASR 0x00000000 /* enable RTEMS_ASR */ -#define RTEMS_NO_ASR 0x00000400 /* disable RTEMS_ASR */ - -/* - * The number of bits for interrupt levels is CPU dependent. - * RTEMS supports 0 to 256 levels in bits 0-7 of the mode. - */ - -/*PAGE - * - * RTEMS_INTERRUPT_LEVEL - * - * DESCRIPTION: - * - * This function returns the processor dependent interrupt - * level which corresponds to the requested interrupt level. - * - * NOTE: RTEMS supports 256 interrupt levels using the least - * significant eight bits of MODES.CONTROL. On any - * particular CPU, fewer than 256 levels may be supported. - */ - -#define RTEMS_INTERRUPT_LEVEL( _mode_set ) \ - ( (_mode_set) & RTEMS_INTERRUPT_MASK ) - - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/mp.h b/c/src/exec/rtems/include/rtems/rtems/mp.h deleted file mode 100644 index 079f55b093..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/mp.h +++ /dev/null @@ -1,53 +0,0 @@ -/* mp.h - * - * This include file contains all the constants and structures associated - * with the Multiprocessing Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_MP_h -#define __RTEMS_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * - * _Multiprocessing_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _Multiprocessing_Manager_initialization ( void ); - -/* - * - * rtems_multiprocessing_announce - * - * DESCRIPTION: - * - * This routine implements the MULTIPROCESSING_ANNOUNCE directive. - * It is invoked by the MPCI layer to indicate that an MPCI packet - * has been received. - */ - -void rtems_multiprocessing_announce ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/msgmp.h b/c/src/exec/rtems/include/rtems/rtems/msgmp.h deleted file mode 100644 index 070ed6fcaa..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/msgmp.h +++ /dev/null @@ -1,175 +0,0 @@ -/* msgmp.h - * - * This include file contains all the constants and structures associated - * with the Multiprocessing Support in the Message Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_MESSAGE_QUEUE_MP_h -#define __RTEMS_MESSAGE_QUEUE_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include - -/* - * The following enumerated type defines the list of - * remote message queue operations. - */ - -typedef enum { - MESSAGE_QUEUE_MP_ANNOUNCE_CREATE = 0, - MESSAGE_QUEUE_MP_ANNOUNCE_DELETE = 1, - MESSAGE_QUEUE_MP_EXTRACT_PROXY = 2, - MESSAGE_QUEUE_MP_RECEIVE_REQUEST = 3, - MESSAGE_QUEUE_MP_RECEIVE_RESPONSE = 4, - MESSAGE_QUEUE_MP_SEND_REQUEST = 5, - MESSAGE_QUEUE_MP_SEND_RESPONSE = 6, - MESSAGE_QUEUE_MP_URGENT_REQUEST = 7, - MESSAGE_QUEUE_MP_URGENT_RESPONSE = 8, - MESSAGE_QUEUE_MP_BROADCAST_REQUEST = 9, - MESSAGE_QUEUE_MP_BROADCAST_RESPONSE = 10, - MESSAGE_QUEUE_MP_FLUSH_REQUEST = 11, - MESSAGE_QUEUE_MP_FLUSH_RESPONSE = 12 -} Message_queue_MP_Remote_operations; - -/* - * The following data structure defines the packet used to perform - * remote message queue operations. - */ - -typedef struct { - rtems_packet_prefix Prefix; - Message_queue_MP_Remote_operations operation; - rtems_name name; - rtems_option option_set; - Objects_Id proxy_id; - unsigned32 count; - unsigned32 size; - unsigned32 pad0; - CORE_message_queue_Buffer Buffer; -} Message_queue_MP_Packet; - -/* - * _Message_queue_MP_Send_process_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * process operation can be performed on another node. - */ - -void _Message_queue_MP_Send_process_packet ( - Message_queue_MP_Remote_operations operation, - Objects_Id message_queue_id, - rtems_name name, - Objects_Id proxy_id -); - -/* - * _Message_queue_MP_Send_request_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. - */ - -rtems_status_code _Message_queue_MP_Send_request_packet ( - Message_queue_MP_Remote_operations operation, - Objects_Id message_queue_id, - void *buffer, - unsigned32 *size_p, - rtems_option option_set, - Watchdog_Interval timeout -); - -/* - * _Message_queue_MP_Send_response_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive can be performed on another node. - */ - -void _Message_queue_MP_Send_response_packet ( - Message_queue_MP_Remote_operations operation, - Objects_Id message_queue_id, - Thread_Control *the_thread -); - -/* - * - * _Message_queue_MP_Process_packet - * - * DESCRIPTION: - * - * This routine performs the actions specific to this package for - * the request from another node. - */ - -void _Message_queue_MP_Process_packet ( - rtems_packet_prefix *the_packet_prefix -); - -/* - * _Message_queue_MP_Send_object_was_deleted - * - * DESCRIPTION: - * - * This routine is invoked indirectly by the thread queue - * when a proxy has been removed from the thread queue and - * the remote node must be informed of this. - */ - -void _Message_queue_MP_Send_object_was_deleted ( - Thread_Control *the_proxy -); - -/* - * _Message_queue_MP_Send_extract_proxy - * - * DESCRIPTION: - * - * This routine is invoked when a task is deleted and it - * has a proxy which must be removed from a thread queue and - * the remote node must be informed of this. - */ - -void _Message_queue_MP_Send_extract_proxy ( - Thread_Control *the_thread -); - -/* - * _Message_queue_MP_Get_packet - * - * DESCRIPTION: - * - * This function is used to obtain a message queue mp packet. - */ - -Message_queue_MP_Packet *_Message_queue_MP_Get_packet ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/options.h b/c/src/exec/rtems/include/rtems/rtems/options.h deleted file mode 100644 index 069d7721b3..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/options.h +++ /dev/null @@ -1,53 +0,0 @@ -/* options.h - * - * This include file contains information which defines the - * options available on many directives. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_OPTIONS_h -#define __RTEMS_OPTIONS_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The following type defines the control block used to manage - * option sets. - */ - -typedef unsigned32 rtems_option; - -/* - * The following constants define the individual options which may - * be used to compose an option set. - */ - -#define RTEMS_DEFAULT_OPTIONS 0x00000000 - -#define RTEMS_WAIT 0x00000000 /* wait on resource */ -#define RTEMS_NO_WAIT 0x00000001 /* do not wait on resource */ - -#define RTEMS_EVENT_ALL 0x00000000 /* wait for all events */ -#define RTEMS_EVENT_ANY 0x00000002 /* wait on any event */ - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/part.h b/c/src/exec/rtems/include/rtems/rtems/part.h deleted file mode 100644 index c3410da9b3..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/part.h +++ /dev/null @@ -1,168 +0,0 @@ -/* partition.h - * - * This include file contains all the constants and structures associated - * with the Partition Manager. This manager provides facilities to - * dynamically allocate memory in fixed-sized units which are returned - * as buffers. - * - * Directives provided are: - * - * + create a partition - * + get an ID of a partition - * + delete a partition - * + get a buffer from a partition - * + return a buffer to a partition - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_PARTITION_h -#define __RTEMS_PARTITION_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -/* - * The following defines the control block used to manage each partition. - */ - -typedef struct { - Objects_Control Object; - void *starting_address; /* physical address */ - unsigned32 length; /* in bytes */ - unsigned32 buffer_size; /* in bytes */ - rtems_attribute attribute_set; /* attributes */ - unsigned32 number_of_used_blocks; /* or allocated buffers */ - Chain_Control Memory; /* buffer chain */ -} Partition_Control; - -/* - * The following defines the information control block used to - * manage this class of objects. - */ - -RTEMS_EXTERN Objects_Information _Partition_Information; - -/* - * _Partition_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _Partition_Manager_initialization( - unsigned32 maximum_partitions -); - -/* - * rtems_partition_create - * - * DESCRIPTION: - * - * This routine implements the rtems_partition_create directive. The - * partition will have the name name. The memory area managed by - * the partition is of length bytes and starts at starting_address. - * The memory area will be divided into as many buffers of - * buffer_size bytes as possible. The attribute_set determines if - * the partition is global or local. It returns the id of the - * created partition in ID. - */ - -rtems_status_code rtems_partition_create( - rtems_name name, - void *starting_address, - unsigned32 length, - unsigned32 buffer_size, - rtems_attribute attribute_set, - Objects_Id *id -); - -/* - * rtems_partition_ident - * - * DESCRIPTION: - * - * This routine implements the rtems_partition_ident directive. - * This directive returns the partition ID associated with name. - * If more than one partition is named name, then the partition - * to which the ID belongs is arbitrary. node indicates the - * extent of the search for the ID of the partition named name. - * The search can be limited to a particular node or allowed to - * encompass all nodes. - */ - -rtems_status_code rtems_partition_ident( - rtems_name name, - unsigned32 node, - Objects_Id *id -); - -/* - * rtems_partition_delete - * - * DESCRIPTION: - * - * This routine implements the rtems_partition_delete directive. The - * partition indicated by ID is deleted. - */ - -rtems_status_code rtems_partition_delete( - Objects_Id id -); - -/* - * rtems_partition_get_buffer - * - * DESCRIPTION: - * - * This routine implements the rtems_partition_get_buffer directive. It - * attempts to allocate a buffer from the partition associated with ID. - * If a buffer is allocated, its address is returned in buffer. - */ - -rtems_status_code rtems_partition_get_buffer( - Objects_Id id, - void **buffer -); - -/* - * rtems_partition_return_buffer - * - * DESCRIPTION: - * - * This routine implements the rtems_partition_return_buffer directive. It - * frees the buffer to the partition associated with ID. The buffer must - * have been previously allocated from the same partition. - */ - -rtems_status_code rtems_partition_return_buffer( - Objects_Id id, - void *buffer -); - -#ifndef __RTEMS_APPLICATION__ -#include -#endif -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/partmp.h b/c/src/exec/rtems/include/rtems/rtems/partmp.h deleted file mode 100644 index fd7d442dd3..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/partmp.h +++ /dev/null @@ -1,161 +0,0 @@ -/* partmp.h - * - * This include file contains all the constants and structures associated - * with the Multiprocessing Support in the Partition Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_PARTITION_MP_h -#define __RTEMS_PARTITION_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -#include - -/* - * The following enumerated type defines the list of - * remote partition operations. - */ - -typedef enum { - PARTITION_MP_ANNOUNCE_CREATE = 0, - PARTITION_MP_ANNOUNCE_DELETE = 1, - PARTITION_MP_EXTRACT_PROXY = 2, - PARTITION_MP_GET_BUFFER_REQUEST = 3, - PARTITION_MP_GET_BUFFER_RESPONSE = 4, - PARTITION_MP_RETURN_BUFFER_REQUEST = 5, - PARTITION_MP_RETURN_BUFFER_RESPONSE = 6 -} Partition_MP_Remote_operations; - -/* - * The following data structure defines the packet used to perform - * remote partition operations. - */ - -typedef struct { - rtems_packet_prefix Prefix; - Partition_MP_Remote_operations operation; - rtems_name name; - void *buffer; - Objects_Id proxy_id; -} Partition_MP_Packet; - -/* - * _Partition_MP_Send_process_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * process operation can be performed on another node. - */ - -void _Partition_MP_Send_process_packet ( - Partition_MP_Remote_operations operation, - Objects_Id partition_id, - rtems_name name, - Objects_Id proxy_id -); - -/* - * _Partition_MP_Send_request_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. - */ - -rtems_status_code _Partition_MP_Send_request_packet ( - Partition_MP_Remote_operations operation, - Objects_Id partition_id, - void *buffer -); - -/* - * _Partition_MP_Send_response_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive can be performed on another node. - */ - -void _Partition_MP_Send_response_packet ( - Partition_MP_Remote_operations operation, - Objects_Id partition_id, - Thread_Control *the_thread -); - -/* - * - * _Partition_MP_Process_packet - * - * DESCRIPTION: - * - * This routine performs the actions specific to this package for - * the request from another node. - */ - -void _Partition_MP_Process_packet ( - rtems_packet_prefix *the_packet_prefix -); - -/* - * _Partition_MP_Send_object_was_deleted - * - * DESCRIPTION: - * - * This routine is invoked indirectly by the thread queue - * when a proxy has been removed from the thread queue and - * the remote node must be informed of this. - * - * This routine is not needed by the Partition since a partition - * cannot be deleted when buffers are in use. - */ - -/* - * _Partition_MP_Send_extract_proxy - * - * DESCRIPTION: - * - * This routine is invoked when a task is deleted and it - * has a proxy which must be removed from a thread queue and - * the remote node must be informed of this. - */ - -void _Partition_MP_Send_extract_proxy ( - Thread_Control *the_thread -); - -/* - * _Partition_MP_Get_packet - * - * DESCRIPTION: - * - * This function is used to obtain a partition mp packet. - */ - -Partition_MP_Packet *_Partition_MP_Get_packet ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/ratemon.h b/c/src/exec/rtems/include/rtems/rtems/ratemon.h deleted file mode 100644 index 85c17cf3eb..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/ratemon.h +++ /dev/null @@ -1,185 +0,0 @@ -/* ratemon.h - * - * This include file contains all the constants, structures, and - * prototypes associated with the Rate Monotonic Manager. This manager - * provides facilities to implement tasks which execute in a periodic fashion. - * - * Directives provided are: - * - * + create a rate monotonic timer - * + cancel a period - * + delete a rate monotonic timer - * + conclude current and start the next period - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_RATE_MONOTONIC_h -#define __RTEMS_RATE_MONOTONIC_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -/* - * The following enumerated type defines the states in which a - * period may be. - */ - -typedef enum { - RATE_MONOTONIC_INACTIVE, /* off chain, never initialized */ - RATE_MONOTONIC_OWNER_IS_BLOCKING, /* on chain, owner is blocking on it */ - RATE_MONOTONIC_ACTIVE, /* on chain, running continuously */ - RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING, /* on chain, expired while owner was */ - /* was blocking on it */ - RATE_MONOTONIC_EXPIRED /* off chain, will be reset by next */ - /* rtems_rate_monotonic_period */ -} Rate_Monotonic_Period_states; - -/* - * The following constant is the interval passed to the rate_monontonic_period - * directive to obtain status information. - */ - -#define RTEMS_PERIOD_STATUS WATCHDOG_NO_TIMEOUT - -/* - * The following structure defines the control block used to manage - * each period. - */ - -typedef struct { - Objects_Control Object; - Watchdog_Control Timer; - Rate_Monotonic_Period_states state; - Thread_Control *owner; -} Rate_monotonic_Control; - -RTEMS_EXTERN Objects_Information _Rate_monotonic_Information; - -/* - * _Rate_monotonic_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _Rate_monotonic_Manager_initialization( - unsigned32 maximum_periods -); - -/* - * rtems_rate_monotonic_create - * - * DESCRIPTION: - * - * This routine implements the rate_monotonic_create directive. The - * period will have the name name. It returns the id of the - * created period in ID. - */ - -rtems_status_code rtems_rate_monotonic_create( - rtems_name name, - Objects_Id *id -); - -/* - * rtems_rate_monotonic_ident - * - * DESCRIPTION: - * - * This routine implements the rtems_rate_monotonic_ident directive. - * This directive returns the period ID associated with name. - * If more than one period is named name, then the period - * to which the ID belongs is arbitrary. - */ - -rtems_status_code rtems_rate_monotonic_ident( - rtems_name name, - Objects_Id *id -); - -/* - * rtems_rate_monotonic_cancel - * - * DESCRIPTION: - * - * This routine implements the rtems_rate_monotonic_cancel directive. This - * directive stops the period associated with ID from continuing to - * run. - */ - -rtems_status_code rtems_rate_monotonic_cancel( - Objects_Id id -); - -/* - * rtems_rate_monotonic_delete - * - * DESCRIPTION: - * - * This routine implements the rtems_rate_monotonic_delete directive. The - * period indicated by ID is deleted. - */ - -rtems_status_code rtems_rate_monotonic_delete( - Objects_Id id -); - -/* - * rtems_rate_monotonic_period - * - * DESCRIPTION: - * - * This routine implements the rtems_rate_monotonic_period directive. When - * length is non-zero, this directive initiates the period associated with - * ID from continuing for a period of length. If length is zero, then - * result is set to indicate the current state of the period. - */ - -rtems_status_code rtems_rate_monotonic_period( - Objects_Id id, - rtems_interval length -); - -/* - * _Rate_monotonic_Timeout - * - * DESCRIPTION: - * - * This routine is invoked when the period represented - * by ID expires. If the task which owns this period is blocked - * waiting for the period to expire, then it is readied and the - * period is restarted. If the owning task is not waiting for the - * period to expire, then the period is placed in the EXPIRED - * state and not restarted. - */ - -void _Rate_monotonic_Timeout ( - Objects_Id id, - void *ignored -); - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/region.h b/c/src/exec/rtems/include/rtems/rtems/region.h deleted file mode 100644 index 1683613087..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/region.h +++ /dev/null @@ -1,234 +0,0 @@ -/* region.h - * - * This include file contains all the constants and structures associated - * with the Region Manager. This manager provides facilities to dynamically - * allocate memory in variable sized units which are returned as segments. - * - * Directives provided are: - * - * + create a region - * + get an ID of a region - * + delete a region - * + get a segment from a region - * + return a segment to a region - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_REGION_h -#define __RTEMS_REGION_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include - -/* - * The following records define the control block used to manage - * each region. - */ - -typedef struct { - Objects_Control Object; - Thread_queue_Control Wait_queue; /* waiting threads */ - void *starting_address; /* physical start addr */ - unsigned32 length; /* physical length(bytes) */ - unsigned32 page_size; /* in bytes */ - unsigned32 maximum_segment_size; /* in bytes */ - rtems_attribute attribute_set; - unsigned32 number_of_used_blocks; /* blocks allocated */ - Heap_Control Memory; -} Region_Control; - -/* - * The following defines the information control block used to - * manage this class of objects. - */ - -RTEMS_EXTERN Objects_Information _Region_Information; - -/* - * _Region_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _Region_Manager_initialization( - unsigned32 maximum_regions -); - -/* - * rtems_region_create - * - * DESCRIPTION: - * - * This routine implements the rtems_region_create directive. The - * region will have the name name. The memory area managed by - * the region is of length bytes and starts at starting_address. - * The memory area will be divided into as many allocatable units of - * page_size bytes as possible. The attribute_set determines which - * thread queue discipline is used by the region. It returns the - * id of the created region in ID. - */ - -rtems_status_code rtems_region_create( - rtems_name name, - void *starting_address, - unsigned32 length, - unsigned32 page_size, - rtems_attribute attribute_set, - Objects_Id *id -); - -/* - * rtems_region_extend - * - * DESCRIPTION: - * - * This routine implements the rtems_region_extend directive. The - * region will have the name name. The memory area managed by - * the region will be attempted to be grown by length bytes using - * the memory starting at starting_address. - */ - -rtems_status_code rtems_region_extend( - Objects_Id id, - void *starting_address, - unsigned32 length -); - -/* - * rtems_region_ident - * - * DESCRIPTION: - * - * This routine implements the rtems_region_ident directive. - * This directive returns the region ID associated with name. - * If more than one region is named name, then the region - * to which the ID belongs is arbitrary. - */ - -rtems_status_code rtems_region_ident( - rtems_name name, - Objects_Id *id -); - -/* - * rtems_region_delete - * - * DESCRIPTION: - * - * This routine implements the rtems_region_delete directive. The - * region indicated by ID is deleted. - */ - -rtems_status_code rtems_region_delete( - Objects_Id id -); - -/* - * rtems_region_get_segment - * - * DESCRIPTION: - * - * This routine implements the rtems_region_get_segment directive. It - * attempts to allocate a segment from the region associated with ID. - * If a segment of the requested size can be allocated, its address - * is returned in segment. If no segment is available, then the task - * may return immediately or block waiting for a segment with an optional - * timeout of timeout clock ticks. Whether the task blocks or returns - * immediately is based on the no_wait option in the option_set. - */ - -rtems_status_code rtems_region_get_segment( - Objects_Id id, - unsigned32 size, - rtems_option option_set, - rtems_interval timeout, - void **segment -); - -/* - * rtems_region_get_segment_size - * - * DESCRIPTION: - * - * This routine implements the rtems_region_get_segment_size directive. It - * returns the size in bytes of the specified user memory area. - */ - -rtems_status_code rtems_region_get_segment_size( - Objects_Id id, - void *segment, - unsigned32 *size -); - -/* - * rtems_region_return_segment - * - * DESCRIPTION: - * - * This routine implements the rtems_region_return_segment directive. It - * frees the segment to the region associated with ID. The segment must - * have been previously allocated from the same region. If freeing the - * segment results in enough memory being available to satisfy the - * rtems_region_get_segment of the first blocked task, then that task and as - * many subsequent tasks as possible will be unblocked with their requests - * satisfied. - */ - -rtems_status_code rtems_region_return_segment( - Objects_Id id, - void *segment -); - -#ifndef __RTEMS_APPLICATION__ -#include -#endif -#include - -/* - * _Region_Debug_Walk - * - * DESCRIPTION: - * - * This routine is invoked to verify the integrity of a heap associated - * with the_region. - */ - -#ifdef RTEMS_DEBUG - -#define _Region_Debug_Walk( _the_region, _source ) \ - do { \ - if ( _Debug_Is_enabled( RTEMS_DEBUG_REGION ) ) \ - _Heap_Walk( &(_the_region)->Memory, _source, FALSE ); \ - } while ( 0 ) - -#else - -#define _Region_Debug_Walk( _the_region, _source ) - -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/regionmp.h b/c/src/exec/rtems/include/rtems/rtems/regionmp.h deleted file mode 100644 index b59fe9235e..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/regionmp.h +++ /dev/null @@ -1,166 +0,0 @@ -/* regionmp.h - * - * This include file contains all the constants and structures associated - * with the Multiprocessing Support in the Region Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_REGION_MP_h -#define __RTEMS_REGION_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#include -#include - -/* - * The following enumerated type defines the list of - * remote region operations. - */ - -typedef enum { - REGION_MP_ANNOUNCE_CREATE = 0, - REGION_MP_ANNOUNCE_DELETE = 1, - REGION_MP_EXTRACT_PROXY = 2, - REGION_MP_GET_SEGMENT_REQUEST = 3, - REGION_MP_GET_SEGMENT_RESPONSE = 4, - REGION_MP_RETURN_SEGMENT_REQUEST = 5, - REGION_MP_RETURN_SEGMENT_RESPONSE = 6 -} Region_MP_Remote_operations; - -/* - * The following data structure defines the packet used to perform - * remote region operations. - */ - -typedef struct { - rtems_packet_prefix Prefix; - Region_MP_Remote_operations operation; - rtems_name name; - rtems_option option_set; - unsigned32 size; - Objects_Id proxy_id; - void *segment; -} Region_MP_Packet; - -/* - * _Region_MP_Send_process_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * process operation can be performed on another node. - */ - -void _Region_MP_Send_process_packet ( - Region_MP_Remote_operations operation, - Objects_Id region_id, - rtems_name name, - Objects_Id proxy_id -); - -/* - * _Region_MP_Send_request_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. - */ - -rtems_status_code _Region_MP_Send_request_packet ( - Region_MP_Remote_operations operation, - Objects_Id region_id, - void *segment, - unsigned32 size, - rtems_option option_set, - rtems_interval timeout -); - -/* - * _Region_MP_Send_response_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive can be performed on another node. - */ - -void _Region_MP_Send_response_packet ( - Region_MP_Remote_operations operation, - Objects_Id region_id, - Thread_Control *the_thread -); - -/* - * - * _Region_MP_Process_packet - * - * DESCRIPTION: - * - * This routine performs the actions specific to this package for - * the request from another node. - */ - -void _Region_MP_Process_packet ( - rtems_packet_prefix *the_packet_prefix -); - -/* - * _Region_MP_Send_object_was_deleted - * - * DESCRIPTION: - * - * This routine is invoked indirectly by the thread queue - * when a proxy has been removed from the thread queue and - * the remote node must be informed of this. - * - * This routine is not needed by the Region since a region - * cannot be deleted when segments are in use. - */ - -/* - * _Region_MP_Send_extract_proxy - * - * DESCRIPTION: - * - * This routine is invoked when a task is deleted and it - * has a proxy which must be removed from a thread queue and - * the remote node must be informed of this. - */ - -void _Region_MP_Send_extract_proxy ( - Thread_Control *the_thread -); - -/* - * _Region_MP_Get_packet - * - * DESCRIPTION: - * - * This function is used to obtain a region mp packet. - */ - -Region_MP_Packet *_Region_MP_Get_packet ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/rtemsapi.h b/c/src/exec/rtems/include/rtems/rtems/rtemsapi.h deleted file mode 100644 index e43de773fd..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/rtemsapi.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * RTEMS API Support - * - * NOTE: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_API_h -#define __RTEMS_API_h - -#include - -/*PAGE - * - * _RTEMS_API_Initialize - * - * XXX - */ - -void _RTEMS_API_Initialize( - rtems_configuration_table *configuration_table -); - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/sem.h b/c/src/exec/rtems/include/rtems/rtems/sem.h deleted file mode 100644 index cb47ee3548..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/sem.h +++ /dev/null @@ -1,248 +0,0 @@ -/* semaphore.h - * - * This include file contains all the constants and structures associated - * with the Semaphore Manager. This manager utilizes standard Dijkstra - * counting semaphores to provide synchronization and mutual exclusion - * capabilities. - * - * Directives provided are: - * - * + create a semaphore - * + get an ID of a semaphore - * + delete a semaphore - * + acquire a semaphore - * + release a semaphore - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_SEMAPHORE_h -#define __RTEMS_SEMAPHORE_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * The following defines the control block used to manage each semaphore. - */ - -typedef struct { - Objects_Control Object; - rtems_attribute attribute_set; - union { - CORE_mutex_Control mutex; - CORE_semaphore_Control semaphore; - } Core_control; -} Semaphore_Control; - -/* - * The following defines the information control block used to manage - * this class of objects. - */ - -RTEMS_EXTERN Objects_Information _Semaphore_Information; - -/* - * _Semaphore_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _Semaphore_Manager_initialization( - unsigned32 maximum_semaphores -); - -/* - * rtems_semaphore_create - * - * DESCRIPTION: - * - * This routine implements the rtems_semaphore_create directive. The - * semaphore will have the name name. The starting count for - * the semaphore is count. The attribute_set determines if - * the semaphore is global or local and the thread queue - * discipline. It returns the id of the created semaphore in ID. - */ - -rtems_status_code rtems_semaphore_create( - rtems_name name, - unsigned32 count, - rtems_attribute attribute_set, - rtems_task_priority priority_ceiling, - rtems_id *id -); - -/* - * rtems_semaphore_ident - * - * DESCRIPTION: - * - * This routine implements the rtems_semaphore_ident directive. - * This directive returns the semaphore ID associated with name. - * If more than one semaphore is named name, then the semaphore - * to which the ID belongs is arbitrary. node indicates the - * extent of the search for the ID of the semaphore named name. - * The search can be limited to a particular node or allowed to - * encompass all nodes. - */ - -rtems_status_code rtems_semaphore_ident( - rtems_name name, - unsigned32 node, - rtems_id *id -); - -/* - * rtems_semaphore_delete - * - * DESCRIPTION: - * - * This routine implements the rtems_semaphore_delete directive. The - * semaphore indicated by ID is deleted. - */ - -rtems_status_code rtems_semaphore_delete( - rtems_id id -); - -/* - * rtems_semaphore_obtain - * - * DESCRIPTION: - * - * This routine implements the rtems_semaphore_obtain directive. It - * attempts to obtain a unit from the semaphore associated with ID. - * If a unit can be allocated, the calling task will return immediately. - * If no unit is available, then the task may return immediately or - * block waiting for a unit with an optional timeout of timeout - * clock ticks. Whether the task blocks or returns immediately - * is based on the RTEMS_NO_WAIT option in the option_set. - */ - -rtems_status_code rtems_semaphore_obtain( - rtems_id id, - unsigned32 option_set, - rtems_interval timeout -); - -/* - * rtems_semaphore_release - * - * DESCRIPTION: - * - * This routine implements the rtems_semaphore_release directive. It - * frees a unit to the semaphore associated with ID. If a task was - * blocked waiting for a unit from this semaphore, then that task will - * be readied and the unit given to that task. Otherwise, the unit - * will be returned to the semaphore. - */ - -rtems_status_code rtems_semaphore_release( - rtems_id id -); - -/* - * _Semaphore_Seize - * - * DESCRIPTION: - * - * This routine attempts to receive a unit from the_semaphore. - * If a unit is available or if the RTEMS_NO_WAIT option is enabled in - * option_set, then the routine returns. Otherwise, the calling task - * is blocked until a unit becomes available. - */ - -boolean _Semaphore_Seize( - Semaphore_Control *the_semaphore, - unsigned32 option_set -); - -/* - * _Semaphore_Translate_core_mutex_return_code - * - * DESCRIPTION: - * - * This function returns a RTEMS status code based on the mutex - * status code specified. - */ - -rtems_status_code _Semaphore_Translate_core_mutex_return_code ( - unsigned32 the_mutex_status -); - -/* - * _Semaphore_Translate_core_semaphore_return_code - * - * DESCRIPTION: - * - * This function returns a RTEMS status code based on the semaphore - * status code specified. - */ - -rtems_status_code _Semaphore_Translate_core_semaphore_return_code ( - unsigned32 the_mutex_status -); - -/*PAGE - * - * _Semaphore_Core_mutex_mp_support - * - * DESCRIPTION: - * - * This function processes the global actions necessary for remote - * accesses to a global semaphore based on a core mutex. This function - * is called by the core. - */ - -void _Semaphore_Core_mutex_mp_support ( - Thread_Control *the_thread, - rtems_id id -); - -/*PAGE - * - * _Semaphore_Core_mp_support - * - * DESCRIPTION: - * - * This function processes the global actions necessary for remote - * accesses to a global semaphore based on a core semaphore. This function - * is called by the core. - */ - -void _Semaphore_Core_semaphore_mp_support ( - Thread_Control *the_thread, - rtems_id id -); - -#ifndef __RTEMS_APPLICATION__ -#include -#endif -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/semmp.h b/c/src/exec/rtems/include/rtems/rtems/semmp.h deleted file mode 100644 index 4d9618256d..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/semmp.h +++ /dev/null @@ -1,163 +0,0 @@ -/* semmp.h - * - * This include file contains all the constants and structures associated - * with the Multiprocessing Support in the Semaphore Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_SEMAPHORE_MP_h -#define __RTEMS_SEMAPHORE_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include - -/* - * The following enumerated type defines the list of - * remote semaphore operations. - */ - -typedef enum { - SEMAPHORE_MP_ANNOUNCE_CREATE = 0, - SEMAPHORE_MP_ANNOUNCE_DELETE = 1, - SEMAPHORE_MP_EXTRACT_PROXY = 2, - SEMAPHORE_MP_OBTAIN_REQUEST = 3, - SEMAPHORE_MP_OBTAIN_RESPONSE = 4, - SEMAPHORE_MP_RELEASE_REQUEST = 5, - SEMAPHORE_MP_RELEASE_RESPONSE = 6 -} Semaphore_MP_Remote_operations; - -/* - * The following data structure defines the packet used to perform - * remote semaphore operations. - */ - -typedef struct { - rtems_packet_prefix Prefix; - Semaphore_MP_Remote_operations operation; - rtems_name name; - rtems_option option_set; - Objects_Id proxy_id; -} Semaphore_MP_Packet; - -/* - * _Semaphore_MP_Send_process_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * process operation can be performed on another node. - */ - -void _Semaphore_MP_Send_process_packet ( - Semaphore_MP_Remote_operations operation, - Objects_Id semaphore_id, - rtems_name name, - Objects_Id proxy_id -); - -/* - * _Semaphore_MP_Send_request_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. - */ - -rtems_status_code _Semaphore_MP_Send_request_packet ( - Semaphore_MP_Remote_operations operation, - Objects_Id semaphore_id, - rtems_option option_set, - rtems_interval timeout -); - -/* - * _Semaphore_MP_Send_response_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive can be performed on another node. - */ - -void _Semaphore_MP_Send_response_packet ( - Semaphore_MP_Remote_operations operation, - Objects_Id semaphore_id, - Thread_Control *the_thread -); - -/* - * - * _Semaphore_MP_Process_packet - * - * DESCRIPTION: - * - * This routine performs the actions specific to this package for - * the request from another node. - */ - -void _Semaphore_MP_Process_packet ( - rtems_packet_prefix *the_packet_prefix -); - -/* - * _Semaphore_MP_Send_object_was_deleted - * - * DESCRIPTION: - * - * This routine is invoked indirectly by the thread queue - * when a proxy has been removed from the thread queue and - * the remote node must be informed of this. - */ - -void _Semaphore_MP_Send_object_was_deleted ( - Thread_Control *the_proxy -); - -/* - * _Semaphore_MP_Send_extract_proxy - * - * DESCRIPTION: - * - * This routine is invoked when a task is deleted and it - * has a proxy which must be removed from a thread queue and - * the remote node must be informed of this. - */ - -void _Semaphore_MP_Send_extract_proxy ( - Thread_Control *the_thread -); - -/* - * _Semaphore_MP_Get_packet - * - * DESCRIPTION: - * - * This function is used to obtain a semaphore mp packet. - */ - -Semaphore_MP_Packet *_Semaphore_MP_Get_packet ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/signal.h b/c/src/exec/rtems/include/rtems/rtems/signal.h deleted file mode 100644 index e72bcb2dbc..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/signal.h +++ /dev/null @@ -1,83 +0,0 @@ -/* signal.h - * - * This include file contains all the constants and structures associated - * with the Signal Manager. This manager provides capabilities required - * for asynchronous communication between tasks via signal sets. - * - * Directives provided are: - * - * + establish an asynchronous signal routine - * + send a signal set to a task - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_SIGNAL_h -#define __RTEMS_SIGNAL_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include - -/* - * _Signal_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _Signal_Manager_initialization( void ); - -/* - * rtems_signal_catch - * - * DESCRIPTION: - * - * This routine implements the rtems_signal_catch directive. This directive - * is used to establish asr_handler as the Asynchronous Signal Routine - * (RTEMS_ASR) for the calling task. The asr_handler will execute with a - * mode of mode_set. - */ - -rtems_status_code rtems_signal_catch( - rtems_asr_entry asr_handler, - rtems_mode mode_set -); - -/* - * rtems_signal_send - * - * DESCRIPTION: - * - * This routine implements the rtems_signal_send directive. This directive - * sends the signal_set to the task specified by ID. - */ - -rtems_status_code rtems_signal_send( - Objects_Id id, - rtems_signal_set signal_set -); - -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/signalmp.h b/c/src/exec/rtems/include/rtems/rtems/signalmp.h deleted file mode 100644 index 91d36b729f..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/signalmp.h +++ /dev/null @@ -1,147 +0,0 @@ -/* signalmp.h - * - * This include file contains all the constants and structures associated - * with the Multiprocessing Support in the Signal Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_SIGNAL_MP_h -#define __RTEMS_SIGNAL_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include - -/* - * The following enumerated type defines the list of - * remote signal operations. - */ - -typedef enum { - SIGNAL_MP_SEND_REQUEST = 0, - SIGNAL_MP_SEND_RESPONSE = 1 -} Signal_MP_Remote_operations; - -/* - * The following data structure defines the packet used to perform - * remote signal operations. - */ - -typedef struct { - rtems_packet_prefix Prefix; - Signal_MP_Remote_operations operation; - rtems_signal_set signal_in; -} Signal_MP_Packet; - -/* - * _Signal_MP_Send_process_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * process operation can be performed on another node. - * - * This routine is not needed since there are no process - * packets to be sent by this manager. - */ - -/* - * _Signal_MP_Send_request_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. - */ - -rtems_status_code _Signal_MP_Send_request_packet ( - Signal_MP_Remote_operations operation, - Objects_Id task_id, - rtems_signal_set signal_in -); - -/* - * _Signal_MP_Send_response_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive can be performed on another node. - */ - -void _Signal_MP_Send_response_packet ( - Signal_MP_Remote_operations operation, - Thread_Control *the_thread -); - -/* - * - * _Signal_MP_Process_packet - * - * DESCRIPTION: - * - * This routine performs the actions specific to this package for - * the request from another node. - */ - -void _Signal_MP_Process_packet ( - rtems_packet_prefix *the_packet_prefix -); - -/* - * _Signal_MP_Send_object_was_deleted - * - * DESCRIPTION: - * - * This routine is invoked indirectly by the thread queue - * when a proxy has been removed from the thread queue and - * the remote node must be informed of this. - * - * This routine is not needed since there are no objects - * deleted by this manager. - */ - -/* - * _Signal_MP_Send_extract_proxy - * - * DESCRIPTION: - * - * This routine is invoked when a task is deleted and it - * has a proxy which must be removed from a thread queue and - * the remote node must be informed of this. - * - * This routine is not needed since there are no objects - * deleted by this manager. - */ - -/* - * _Signal_MP_Get_packet - * - * DESCRIPTION: - * - * This function is used to obtain a signal mp packet. - */ - -Signal_MP_Packet *_Signal_MP_Get_packet ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/status.h b/c/src/exec/rtems/include/rtems/rtems/status.h deleted file mode 100644 index ac9b9d1046..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/status.h +++ /dev/null @@ -1,82 +0,0 @@ -/* status.h - * - * This include file contains the status codes returned from the - * executive directives. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_STATUS_h -#define __RTEMS_STATUS_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* types */ - -/* enumerated constants */ - -typedef enum { - RTEMS_SUCCESSFUL = 0, /* successful completion */ - RTEMS_TASK_EXITTED = 1, /* returned from a thread */ - RTEMS_MP_NOT_CONFIGURED = 2, /* multiprocessing not configured */ - RTEMS_INVALID_NAME = 3, /* invalid object name */ - RTEMS_INVALID_ID = 4, /* invalid object id */ - RTEMS_TOO_MANY = 5, /* too many */ - RTEMS_TIMEOUT = 6, /* timed out waiting */ - RTEMS_OBJECT_WAS_DELETED = 7, /* object deleted while waiting */ - RTEMS_INVALID_SIZE = 8, /* specified size was invalid */ - RTEMS_INVALID_ADDRESS = 9, /* address specified is invalid */ - RTEMS_INVALID_NUMBER = 10, /* number was invalid */ - RTEMS_NOT_DEFINED = 11, /* item has not been initialized */ - RTEMS_RESOURCE_IN_USE = 12, /* resources still outstanding */ - RTEMS_UNSATISFIED = 13, /* request not satisfied */ - RTEMS_INCORRECT_STATE = 14, /* thread is in wrong state */ - RTEMS_ALREADY_SUSPENDED = 15, /* thread already in state */ - RTEMS_ILLEGAL_ON_SELF = 16, /* illegal on calling thread */ - RTEMS_ILLEGAL_ON_REMOTE_OBJECT = 17, /* illegal for remote object */ - RTEMS_CALLED_FROM_ISR = 18, /* called from wrong environment */ - RTEMS_INVALID_PRIORITY = 19, /* invalid thread priority */ - RTEMS_INVALID_CLOCK = 20, /* invalid date/time */ - RTEMS_INVALID_NODE = 21, /* invalid node id */ - RTEMS_NOT_CONFIGURED = 22, /* directive not configured */ - RTEMS_NOT_OWNER_OF_RESOURCE = 23, /* not owner of resource */ - RTEMS_NOT_IMPLEMENTED = 24, /* directive not implemented */ - RTEMS_INTERNAL_ERROR = 25, /* RTEMS inconsistency detected */ - RTEMS_NO_MEMORY = 26 /* could not get enough memory */ -} rtems_status_code; - -#define RTEMS_STATUS_CODES_FIRST RTEMS_SUCCESSFUL -#define RTEMS_STATUS_CODES_LAST RTEMS_NO_MEMORY - -extern rtems_status_code _Status_Object_name_errors_to_status[]; - -#ifdef RTEMS_API_INIT -rtems_status_code _Status_Object_name_errors_to_status[] = { - RTEMS_SUCCESSFUL, /* OBJECTS_SUCCESSFUL */ - RTEMS_INVALID_NAME, /* OBJECTS_INVALID_NAME */ - RTEMS_INVALID_NODE /* OBJECTS_INVALID_NODE */ -}; -#endif - -/* - * Applications are allowed to use the macros to compare status codes. - */ - -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/support.h b/c/src/exec/rtems/include/rtems/rtems/support.h deleted file mode 100644 index 3305ffd4d3..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/support.h +++ /dev/null @@ -1,97 +0,0 @@ -/* support.h - * - * This include file contains information about support functions for - * the RTEMS API. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_RTEMS_SUPPORT_h -#define __RTEMS_RTEMS_SUPPORT_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* - * rtems_build_name - * - * DESCRIPTION: - * - * This function returns an object name composed of the four characters - * C1, C2, C3, and C4. - * - * NOTE: - * - * This must be implemented as a macro for use in Configuration Tables. - * - */ - -#define rtems_build_name( _C1, _C2, _C3, _C4 ) \ - ( (_C1) << 24 | (_C2) << 16 | (_C3) << 8 | (_C4) ) - -/* - * rtems_get_class - * - * DESCRIPTION: - * - * This function returns the class portion of the ID. - * - */ - -#define rtems_get_class( _id ) \ - _Objects_Get_class( _id ) - -/* - * rtems_get_node - * - * DESCRIPTION: - * - * This function returns the node portion of the ID. - * - */ - -#define rtems_get_node( _id ) \ - _Objects_Get_node( _id ) - -/* - * rtems_get_index - * - * DESCRIPTION: - * - * This function returns the index portion of the ID. - * - */ - -#define rtems_get_index( _id ) \ - _Objects_Get_index( _id ) - -/* - * Time related - */ - -#define RTEMS_MILLISECONDS_TO_MICROSECONDS(_ms) \ - TOD_MILLISECONDS_TO_MICROSECONDS(_ms) -#define RTEMS_MILLISECONDS_TO_TICKS(_ms) \ - TOD_MILLISECONDS_TO_TICKS(_ms) - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/taskmp.h b/c/src/exec/rtems/include/rtems/rtems/taskmp.h deleted file mode 100644 index 032d5645d1..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/taskmp.h +++ /dev/null @@ -1,167 +0,0 @@ -/* taskmp.h - * - * This include file contains all the constants and structures associated - * with the multiprocessing support in the task manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_RTEMS_TASKS_MP_h -#define __RTEMS_RTEMS_TASKS_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include - -/* - * The following enumerated type defines the list of - * remote task operations. - */ - -typedef enum { - RTEMS_TASKS_MP_ANNOUNCE_CREATE = 0, - RTEMS_TASKS_MP_ANNOUNCE_DELETE = 1, - RTEMS_TASKS_MP_SUSPEND_REQUEST = 2, - RTEMS_TASKS_MP_SUSPEND_RESPONSE = 3, - RTEMS_TASKS_MP_RESUME_REQUEST = 4, - RTEMS_TASKS_MP_RESUME_RESPONSE = 5, - RTEMS_TASKS_MP_SET_PRIORITY_REQUEST = 6, - RTEMS_TASKS_MP_SET_PRIORITY_RESPONSE = 7, - RTEMS_TASKS_MP_GET_NOTE_REQUEST = 8, - RTEMS_TASKS_MP_GET_NOTE_RESPONSE = 9, - RTEMS_TASKS_MP_SET_NOTE_REQUEST = 10, - RTEMS_TASKS_MP_SET_NOTE_RESPONSE = 11 -} RTEMS_tasks_MP_Remote_operations; - -/* - * The following data structure defines the packet used to perform - * remote task operations. - */ - -typedef struct { - rtems_packet_prefix Prefix; - RTEMS_tasks_MP_Remote_operations operation; - rtems_name name; - rtems_task_priority the_priority; - unsigned32 notepad; - unsigned32 note; -} RTEMS_tasks_MP_Packet; - -/* - * _RTEMS_tasks_MP_Send_process_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * process operation can be performed on another node. - */ - -void _RTEMS_tasks_MP_Send_process_packet ( - RTEMS_tasks_MP_Remote_operations operation, - Objects_Id task_id, - rtems_name name -); - -/* - * _RTEMS_tasks_MP_Send_request_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. - */ - -rtems_status_code _RTEMS_tasks_MP_Send_request_packet ( - RTEMS_tasks_MP_Remote_operations operation, - Objects_Id task_id, - rtems_task_priority the_priority, - unsigned32 notepad, - unsigned32 note -); - -/* - * _RTEMS_tasks_MP_Send_response_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive can be performed on another node. - */ - -void _RTEMS_tasks_MP_Send_response_packet ( - RTEMS_tasks_MP_Remote_operations operation, - Thread_Control *the_thread -); - -/* - * - * _RTEMS_tasks_MP_Process_packet - * - * DESCRIPTION: - * - * This routine performs the actions specific to this package for - * the request from another node. - */ - -void _RTEMS_tasks_MP_Process_packet ( - rtems_packet_prefix *the_packet_prefix -); - -/* - * _RTEMS_tasks_MP_Send_object_was_deleted - * - * DESCRIPTION: - * - * This routine is invoked indirectly by the thread queue - * when a proxy has been removed from the thread queue and - * the remote node must be informed of this. - * - * This routine is not needed by RTEMS_tasks since a task - * cannot be deleted when segments are in use. - */ - -/* - * _RTEMS_tasks_MP_Send_extract_proxy - * - * DESCRIPTION: - * - * This routine is invoked when a task is deleted and it - * has a proxy which must be removed from a thread queue and - * the remote node must be informed of this. - * - * This routine is not needed since there are no objects - * deleted by this manager. - * - */ - -/* - * _RTEMS_tasks_MP_Get_packet - * - * DESCRIPTION: - * - * This function is used to obtain a task mp packet. - */ - -RTEMS_tasks_MP_Packet *_RTEMS_tasks_MP_Get_packet ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/tasks.h b/c/src/exec/rtems/include/rtems/rtems/tasks.h deleted file mode 100644 index dc30264635..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/tasks.h +++ /dev/null @@ -1,421 +0,0 @@ -/* tasks.h - * - * This include file contains all constants and structures associated - * with RTEMS tasks. This manager provides a comprehensive set of directives - * to create, delete, and administer tasks. - * - * Directives provided are: - * - * + create a task - * + get an ID of a task - * + start a task - * + restart a task - * + delete a task - * + suspend a task - * + resume a task - * + set a task's priority - * + change the current task's mode - * + get a task notepad entry - * + set a task notepad entry - * + wake up after interval - * + wake up when specified - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_RTEMS_TASKS_h -#define __RTEMS_RTEMS_TASKS_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Constant to be used as the ID of current task - */ - -#define RTEMS_SELF OBJECTS_ID_OF_SELF - -/* - * This constant is passed to the rtems_task_wake_after directive as the - * interval when a task wishes to yield the CPU. - */ - -#define RTEMS_YIELD_PROCESSOR WATCHDOG_NO_TIMEOUT - -/* - * Define the type for an RTEMS API task priority. - */ - -typedef Priority_Control rtems_task_priority; - -#define RTEMS_NO_PRIORITY RTEMS_CURRENT_PRIORITY - -#define RTEMS_MINIMUM_PRIORITY (PRIORITY_MINIMUM + 1) -#define RTEMS_MAXIMUM_PRIORITY PRIORITY_MAXIMUM - -/* - * The following constant is passed to rtems_task_set_priority when the - * caller wants to obtain the current priority. - */ - -#define RTEMS_CURRENT_PRIORITY PRIORITY_MINIMUM - -/* - * Notepads constants (indices into notepad array) - */ - -#define RTEMS_NOTEPAD_FIRST 0 /* lowest numbered notepad */ -#define RTEMS_NOTEPAD_0 0 /* notepad location 0 */ -#define RTEMS_NOTEPAD_1 1 /* notepad location 1 */ -#define RTEMS_NOTEPAD_2 2 /* notepad location 2 */ -#define RTEMS_NOTEPAD_3 3 /* notepad location 3 */ -#define RTEMS_NOTEPAD_4 4 /* notepad location 4 */ -#define RTEMS_NOTEPAD_5 5 /* notepad location 5 */ -#define RTEMS_NOTEPAD_6 6 /* notepad location 6 */ -#define RTEMS_NOTEPAD_7 7 /* notepad location 7 */ -#define RTEMS_NOTEPAD_8 8 /* notepad location 8 */ -#define RTEMS_NOTEPAD_9 9 /* notepad location 9 */ -#define RTEMS_NOTEPAD_10 10 /* notepad location 10 */ -#define RTEMS_NOTEPAD_11 11 /* notepad location 11 */ -#define RTEMS_NOTEPAD_12 12 /* notepad location 12 */ -#define RTEMS_NOTEPAD_13 13 /* notepad location 13 */ -#define RTEMS_NOTEPAD_14 14 /* notepad location 14 */ -#define RTEMS_NOTEPAD_15 15 /* notepad location 15 */ -#define RTEMS_NOTEPAD_LAST RTEMS_NOTEPAD_15 /* highest numbered notepad */ - -#define RTEMS_NUMBER_NOTEPADS (RTEMS_NOTEPAD_LAST+1) - -/* - * External API name for Thread_Control - */ - -typedef Thread_Control rtems_tcb; - -/* - * The following defines the "return type" of an RTEMS task. - */ - -typedef void rtems_task; - -/* - * The following defines the argument to an RTEMS task. - */ - -typedef unsigned32 rtems_task_argument; - -/* - * The following defines the type for the entry point of an RTEMS task. - */ - -typedef rtems_task ( *rtems_task_entry )( - rtems_task_argument - ); - -/* - * The following records define the Initialization Tasks Table. - * Each entry contains the information required by RTEMS to - * create and start a user task automatically at executive - * initialization time. - */ - -typedef struct { - rtems_name name; /* task name */ - unsigned32 stack_size; /* task stack size */ - rtems_task_priority initial_priority; /* task priority */ - rtems_attribute attribute_set; /* task attributes */ - rtems_task_entry entry_point; /* task entry point */ - rtems_mode mode_set; /* task initial mode */ - unsigned32 argument; /* task argument */ -} rtems_initialization_tasks_table; - -/* - * This is the API specific information required by each thread for - * the RTEMS API to function correctly. - */ - - -typedef struct { - unsigned32 Notepads[ RTEMS_NUMBER_NOTEPADS ]; - rtems_event_set pending_events; - rtems_event_set event_condition; - ASR_Information Signal; -} RTEMS_API_Control; - -/* - * The following defines the information control block used to - * manage this class of objects. - */ - -RTEMS_EXTERN Objects_Information _RTEMS_tasks_Information; - -/* - * These are used to manage the user initialization tasks. - */ - -RTEMS_EXTERN rtems_initialization_tasks_table - *_RTEMS_tasks_User_initialization_tasks; -RTEMS_EXTERN unsigned32 _RTEMS_tasks_Number_of_initialization_tasks; - -/* - * _RTEMS_tasks_Manager_initialization - * - * DESCRIPTION: - * - * This routine initializes all Task Manager related data structures. - */ - -void _RTEMS_tasks_Manager_initialization( - unsigned32 maximum_tasks, - unsigned32 number_of_initialization_tasks, - rtems_initialization_tasks_table *user_tasks -); - -/* - * rtems_task_create - * - * DESCRIPTION: - * - * This routine implements the rtems_task_create directive. The task - * will have the name name. The attribute_set can be used to indicate - * that the task will be globally accessible or utilize floating point. - * The task's stack will be stack_size bytes. The task will begin - * execution with initial_priority and initial_modes. It returns the - * id of the created task in ID. - */ - -rtems_status_code rtems_task_create( - rtems_name name, - rtems_task_priority initial_priority, - unsigned32 stack_size, - rtems_mode initial_modes, - rtems_attribute attribute_set, - Objects_Id *id -); - -/* - * rtems_task_ident - * - * DESCRIPTION: - * - * This routine implements the rtems_task_ident directive. - * This directive returns the task ID associated with name. - * If more than one task is named name, then the task to - * which the ID belongs is arbitrary. node indicates the - * extent of the search for the ID of the task named name. - * The search can be limited to a particular node or allowed to - * encompass all nodes. - */ - -rtems_status_code rtems_task_ident( - rtems_name name, - unsigned32 node, - Objects_Id *id -); - -/* - * rtems_task_delete - * - * DESCRIPTION: - * - * This routine implements the rtems_task_delete directive. The - * task indicated by ID is deleted. - */ - -rtems_status_code rtems_task_delete( - Objects_Id id -); - -/* - * rtems_task_get_note - * - * DESCRIPTION: - * - * This routine implements the rtems_task_get_note directive. The - * value of the indicated notepad for the task associated with ID - * is returned in note. - */ - -rtems_status_code rtems_task_get_note( - Objects_Id id, - unsigned32 notepad, - unsigned32 *note -); - -/* - * rtems_task_set_note - * - * DESCRIPTION: - * - * This routine implements the rtems_task_set_note directive. The - * value of the indicated notepad for the task associated with ID - * is returned in note. - */ - -rtems_status_code rtems_task_set_note( - Objects_Id id, - unsigned32 notepad, - unsigned32 note -); - -/* - * rtems_task_mode - * - * DESCRIPTION: - * - * This routine implements the rtems_task_mode directive. The current - * values of the modes indicated by mask of the calling task are changed - * to that indicated in mode_set. The former mode of the task is - * returned in mode_set. - */ - -rtems_status_code rtems_task_mode( - rtems_mode mode_set, - rtems_mode mask, - rtems_mode *previous_mode_set -); - -/* - * rtems_task_restart - * - * DESCRIPTION: - * - * This routine implements the rtems_task_restart directive. The - * task associated with ID is restarted at its initial entry - * point with the new argument. - */ - -rtems_status_code rtems_task_restart( - Objects_Id id, - unsigned32 arg -); - -/* - * rtems_task_suspend - * - * DESCRIPTION: - * - * This routine implements the rtems_task_suspend directive. The - * SUSPENDED state is set for task associated with ID. - */ - -rtems_status_code rtems_task_suspend( - Objects_Id id -); - -/* - * rtems_task_resume - * - * DESCRIPTION: - * - * This routine implements the rtems_task_resume Directive. The - * SUSPENDED state is cleared for task associated with ID. - */ - -rtems_status_code rtems_task_resume( - Objects_Id id -); - -/* - * rtems_task_set_priority - * - * DESCRIPTION: - * - * This routine implements the rtems_task_set_priority directive. The - * current priority of the task associated with ID is set to - * new_priority. The former priority of that task is returned - * in old_priority. - */ - -rtems_status_code rtems_task_set_priority( - Objects_Id id, - rtems_task_priority new_priority, - rtems_task_priority *old_priority -); - -/* - * rtems_task_start - * - * DESCRIPTION: - * - * This routine implements the rtems_task_start directive. The - * starting execution point of the task associated with ID is - * set to entry_point with the initial argument. - */ - -rtems_status_code rtems_task_start( - Objects_Id id, - rtems_task_entry entry_point, - unsigned32 argument -); - -/* - * rtems_task_wake_when - * - * DESCRIPTION: - * - * This routine implements the rtems_task_wake_when directive. The - * calling task is blocked until the current time of day is - * equal to that indicated by time_buffer. - */ - -rtems_status_code rtems_task_wake_when( - rtems_time_of_day *time_buffer -); - -/* - * rtems_task_wake_after - * - * DESCRIPTION: - * - * This routine implements the rtems_task_wake_after directive. The - * calling task is blocked until the indicated number of clock - * ticks have occurred. - */ - -rtems_status_code rtems_task_wake_after( - rtems_interval ticks -); - -/*PAGE - * - * _RTEMS_tasks_Initialize_user_tasks - * - * This routine creates and starts all configured user - * initialzation threads. - * - * Input parameters: NONE - * - * Output parameters: NONE - */ - -void _RTEMS_tasks_Initialize_user_tasks( void ); - -#ifndef __RTEMS_APPLICATION__ -#include -#endif -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/timer.h b/c/src/exec/rtems/include/rtems/rtems/timer.h deleted file mode 100644 index 197719c17b..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/timer.h +++ /dev/null @@ -1,207 +0,0 @@ -/* timer.h - * - * This include file contains all the constants, structures, and - * prototypes associated with the Timer Manager. This manager provides - * facilities to configure, initiate, cancel, and delete timers which will - * fire at specified intervals of time. - * - * Directives provided are: - * - * + create a timer - * + get an ID of a timer - * + delete a timer - * + set a timer to fire after a number of ticks have passed - * + set a timer to fire when a specified date and time has been reached - * + reset a timer - * + cancel a time - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_TIMER_h -#define __RTEMS_TIMER_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -/* - * The following enumerated type details the classes to which a timer - * may belong. - */ - -typedef enum { - TIMER_INTERVAL, - TIMER_TIME_OF_DAY, - TIMER_DORMANT -} Timer_Classes; - -/* - * The following types define a pointer to a timer service routine. - */ - -typedef void rtems_timer_service_routine; - -typedef rtems_timer_service_routine ( *rtems_timer_service_routine_entry )( - rtems_id, - void * - ); - -/* - * The following defines the information control block used to manage - * this class of objects. - */ - -RTEMS_EXTERN Objects_Information _Timer_Information; - -/* - * The following records define the control block used to manage - * each timer. - */ - -typedef struct { - Objects_Control Object; - Watchdog_Control Ticker; - Timer_Classes the_class; -} Timer_Control; - -/* - * _Timer_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _Timer_Manager_initialization( - unsigned32 maximum_timers -); - -/* - * rtems_timer_create - * - * DESCRIPTION: - * - * This routine implements the rtems_timer_create directive. The - * timer will have the name name. It returns the id of the - * created timer in ID. - */ - -rtems_status_code rtems_timer_create( - rtems_name name, - Objects_Id *id -); - -/* - * rtems_timer_ident - * - * DESCRIPTION: - * - * This routine implements the rtems_timer_ident directive. - * This directive returns the timer ID associated with name. - * If more than one timer is named name, then the timer - * to which the ID belongs is arbitrary. - */ - -rtems_status_code rtems_timer_ident( - rtems_name name, - Objects_Id *id -); - -/* - * rtems_timer_cancel - * - * DESCRIPTION: - * - * This routine implements the rtems_timer_cancel directive. It is used - * to stop the timer associated with ID from firing. - */ - -rtems_status_code rtems_timer_cancel( - Objects_Id id -); - -/* - * rtems_timer_delete - * - * DESCRIPTION: - * - * This routine implements the rtems_timer_delete directive. The - * timer indicated by ID is deleted. - */ - -rtems_status_code rtems_timer_delete( - Objects_Id id -); - -/* - * rtems_timer_fire_after - * - * DESCRIPTION: - * - * This routine implements the rtems_timer_fire_after directive. It - * initiates the timer associated with ID to fire in ticks clock - * ticks. When the timer fires, the routine will be invoked. - */ - -rtems_status_code rtems_timer_fire_after( - Objects_Id id, - rtems_interval ticks, - rtems_timer_service_routine_entry routine, - void *user_data -); - -/* - * rtems_timer_fire_when - * - * DESCRIPTION: - * - * This routine implements the rtems_timer_fire_when directive. It - * initiates the timer associated with ID to fire at wall_time - * When the timer fires, the routine will be invoked. - */ - -rtems_status_code rtems_timer_fire_when( - Objects_Id id, - rtems_time_of_day *wall_time, - rtems_timer_service_routine_entry routine, - void *user_data -); - -/* - * rtems_timer_reset - * - * DESCRIPTION: - * - * This routine implements the rtems_timer_reset directive. It is used - * to reinitialize the interval timer associated with ID just as if - * rtems_timer_fire_after were re-invoked with the same arguments that - * were used to initiate this timer. - */ - -rtems_status_code rtems_timer_reset( - Objects_Id id -); - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/types.h b/c/src/exec/rtems/include/rtems/rtems/types.h deleted file mode 100644 index 1dc8cd5373..0000000000 --- a/c/src/exec/rtems/include/rtems/rtems/types.h +++ /dev/null @@ -1,96 +0,0 @@ -/* types.h - * - * This include file defines the types used by the RTEMS API. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_RTEMS_TYPES_h -#define __RTEMS_RTEMS_TYPES_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include - -/* - * RTEMS basic type definitions - */ - -typedef unsigned8 rtems_unsigned8; /* unsigned 8-bit value */ -typedef unsigned16 rtems_unsigned16; /* unsigned 16-bit value */ -typedef unsigned32 rtems_unsigned32; /* unsigned 32-bit value */ - -typedef signed8 rtems_signed8; /* signed 8-bit value */ -typedef signed16 rtems_signed16; /* signed 16-bit value */ -typedef signed32 rtems_signed32; /* signed 32-bit value */ - -/* - * some C++ compilers (eg: HP's) don't do 'long long' - */ -#if defined(__GNUC__) -typedef unsigned64 rtems_unsigned64; /* unsigned 64-bit value */ -typedef signed64 rtems_signed64; /* signed 64-bit value */ -#endif - -typedef single_precision rtems_single; /* single precision float */ -typedef double_precision rtems_double; /* double precision float */ - -typedef boolean rtems_boolean; - -typedef unsigned32 rtems_name; -typedef Objects_Id rtems_id; - -typedef Context_Control rtems_context; -typedef Context_Control_fp rtems_context_fp; -typedef CPU_Interrupt_frame rtems_interrupt_frame; - -/* - * Time related - */ - -typedef Watchdog_Interval rtems_interval; -typedef TOD_Control rtems_time_of_day; - -/* - * Define the type for an RTEMS API task mode. - */ - -typedef Modes_Control rtems_mode; - -/* - * MPCI related entries - */ - -typedef MP_packet_Classes rtems_mp_packet_classes; -typedef MP_packet_Prefix rtems_packet_prefix; - -typedef MPCI_initialization_entry rtems_mpci_initialization_entry; -typedef MPCI_get_packet_entry rtems_mpci_get_packet_entry; -typedef MPCI_return_packet_entry rtems_mpci_return_packet_entry; -typedef MPCI_send_entry rtems_mpci_send_packet_entry; -typedef MPCI_receive_entry rtems_mpci_receive_packet_entry; - -typedef MPCI_Entry rtems_mpci_entry; - -typedef MPCI_Control rtems_mpci_table; - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/inline/rtems/rtems/asr.inl b/c/src/exec/rtems/inline/rtems/rtems/asr.inl deleted file mode 100644 index 4a0ac6146b..0000000000 --- a/c/src/exec/rtems/inline/rtems/rtems/asr.inl +++ /dev/null @@ -1,128 +0,0 @@ -/* inline/asr.inl - * - * This include file contains the implemenation of all routines - * associated with the asynchronous signal handler which are inlined. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __INLINE_ASR_inl -#define __INLINE_ASR_inl - -#include - -/*PAGE - * - * _ASR_Initialize - * - * DESCRIPTION: - * - * This routine initializes the given RTEMS_ASR information record. - */ - -RTEMS_INLINE_ROUTINE void _ASR_Initialize ( - ASR_Information *information -) -{ - information->is_enabled = TRUE; - information->handler = NULL; - information->mode_set = RTEMS_DEFAULT_MODES; - information->signals_posted = 0; - information->signals_pending = 0; - information->nest_level = 0; -} - -/*PAGE - * - * _ASR_Swap_signals - * - * DESCRIPTION: - * - * This routine atomically swaps the pending and posted signal - * sets. This is done when the thread alters its mode in such a - * way that the RTEMS_ASR disable/enable flag changes. - */ - -RTEMS_INLINE_ROUTINE void _ASR_Swap_signals ( - ASR_Information *information -) -{ - rtems_signal_set _signals; - ISR_Level _level; - - _ISR_Disable( _level ); - _signals = information->signals_pending; - information->signals_pending = information->signals_posted; - information->signals_posted = _signals; - _ISR_Enable( _level ); -} - -/*PAGE - * - * _ASR_Is_null_handler - * - * DESCRIPTION: - * - * This function returns TRUE if the given asr_handler is NULL and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _ASR_Is_null_handler ( - rtems_asr_entry asr_handler -) -{ - return asr_handler == NULL; -} - -/*PAGE - * - * _ASR_Are_signals_pending - * - * DESCRIPTION: - * - * This function returns TRUE if there are signals pending in the - * given RTEMS_ASR information record and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _ASR_Are_signals_pending ( - ASR_Information *information -) -{ - return information->signals_posted != 0; -} - -/*PAGE - * - * _ASR_Post_signals - * - * DESCRIPTION: - * - * This routine posts the given signals into the signal_set - * passed in. The result is returned to the user in signal_set. - * - * NOTE: This must be implemented as a macro. - */ - -RTEMS_INLINE_ROUTINE void _ASR_Post_signals( - rtems_signal_set signals, - rtems_signal_set *signal_set -) -{ - ISR_Level _level; - - _ISR_Disable( _level ); - *signal_set |= signals; - _ISR_Enable( _level ); -} - - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/inline/rtems/rtems/attr.inl b/c/src/exec/rtems/inline/rtems/rtems/attr.inl deleted file mode 100644 index 06c7e796db..0000000000 --- a/c/src/exec/rtems/inline/rtems/rtems/attr.inl +++ /dev/null @@ -1,159 +0,0 @@ -/* inline/attr.inl - * - * This include file contains all of the inlined routines associated - * with attributes. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __INLINE_ATTRIBUTES_inl -#define __INLINE_ATTRIBUTES_inl - -/*PAGE - * - * _Attributes_Set - * - * DESCRIPTION: - * - * This function sets the requested new_attributes in the attribute_set - * passed in. The result is returned to the user. - */ - -RTEMS_INLINE_ROUTINE rtems_attribute _Attributes_Set ( - rtems_attribute new_attributes, - rtems_attribute attribute_set -) -{ - return attribute_set | new_attributes; -} - -/*PAGE - * - * _Attributes_Clear - * - * DESCRIPTION: - * - * This function clears the requested new_attributes in the attribute_set - * passed in. The result is returned to the user. - */ - -RTEMS_INLINE_ROUTINE rtems_attribute _Attributes_Clear ( - rtems_attribute attribute_set, - rtems_attribute mask -) -{ - return attribute_set & ~mask; -} - -/*PAGE - * - * _Attributes_Is_floating_point - * - * DESCRIPTION: - * - * This function returns TRUE if the floating point attribute is - * enabled in the attribute_set and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Attributes_Is_floating_point( - rtems_attribute attribute_set -) -{ - return ( attribute_set & RTEMS_FLOATING_POINT ); -} - -/*PAGE - * - * _Attributes_Is_global - * - * DESCRIPTION: - * - * This function returns TRUE if the global object attribute is - * enabled in the attribute_set and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Attributes_Is_global( - rtems_attribute attribute_set -) -{ - return ( attribute_set & RTEMS_GLOBAL ); -} - -/*PAGE - * - * _Attributes_Is_priority - * - * DESCRIPTION: - * - * This function returns TRUE if the priority attribute is - * enabled in the attribute_set and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Attributes_Is_priority( - rtems_attribute attribute_set -) -{ - return ( attribute_set & RTEMS_PRIORITY ); -} - -/*PAGE - * - * _Attributes_Is_binary_semaphore - * - * DESCRIPTION: - * - * This function returns TRUE if the binary semaphore attribute is - * enabled in the attribute_set and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Attributes_Is_binary_semaphore( - rtems_attribute attribute_set -) -{ - return ( attribute_set & RTEMS_BINARY_SEMAPHORE ); -} - -/*PAGE - * - * _Attributes_Is_inherit_priority - * - * DESCRIPTION: - * - * This function returns TRUE if the priority inheritance attribute - * is enabled in the attribute_set and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Attributes_Is_inherit_priority( - rtems_attribute attribute_set -) -{ - return ( attribute_set & RTEMS_INHERIT_PRIORITY ); -} - -/*PAGE - * - * _Attributes_Is_priority_ceiling - * - * DESCRIPTION: - * - * This function returns TRUE if the priority ceiling attribute - * is enabled in the attribute_set and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Attributes_Is_priority_ceiling( - rtems_attribute attribute_set -) -{ - return ( attribute_set & RTEMS_PRIORITY_CEILING ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/inline/rtems/rtems/dpmem.inl b/c/src/exec/rtems/inline/rtems/rtems/dpmem.inl deleted file mode 100644 index 8bc76879a0..0000000000 --- a/c/src/exec/rtems/inline/rtems/rtems/dpmem.inl +++ /dev/null @@ -1,95 +0,0 @@ -/* inline/dpmem.inl - * - * This include file contains the inline routine used in conjunction - * with the Dual Ported Memory Manager - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __INLINE_DPMEM_inl -#define __INLINE_DPMEM_inl - - -/*PAGE - * - * _Dual_ported_memory_Allocate - * - * DESCRIPTION: - * - * This routine allocates a port control block from the inactive chain - * of free port control blocks. - */ - -RTEMS_INLINE_ROUTINE Dual_ported_memory_Control - *_Dual_ported_memory_Allocate ( void ) -{ - return (Dual_ported_memory_Control *) - _Objects_Allocate( &_Dual_ported_memory_Information ); -} - -/*PAGE - * - * _Dual_ported_memory_Free - * - * DESCRIPTION: - * - * This routine frees a port control block to the inactive chain - * of free port control blocks. - */ - -RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free ( - Dual_ported_memory_Control *the_port -) -{ - _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); -} - -/*PAGE - * - * _Dual_ported_memory_Get - * - * DESCRIPTION: - * - * This function maps port IDs to port control blocks. If ID - * corresponds to a local port, then it returns the_port control - * pointer which maps to ID and location is set to OBJECTS_LOCAL. - * Global ports are not supported, thus if ID does not map to a - * local port, location is set to OBJECTS_ERROR and the_port is - * undefined. - */ - -RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( - Objects_Id id, - Objects_Locations *location -) -{ - return (Dual_ported_memory_Control *) - _Objects_Get( &_Dual_ported_memory_Information, id, location ); -} - -/*PAGE - * - * _Dual_ported_memory_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_port is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Dual_ported_memory_Is_null( - Dual_ported_memory_Control *the_port -) -{ - return ( the_port == NULL ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/inline/rtems/rtems/event.inl b/c/src/exec/rtems/inline/rtems/rtems/event.inl deleted file mode 100644 index 1f41e0a5fc..0000000000 --- a/c/src/exec/rtems/inline/rtems/rtems/event.inl +++ /dev/null @@ -1,21 +0,0 @@ -/* inline/event.inl - * - * This include file contains the static inline implementation of - * macros for the Event Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __MACROS_EVENT_inl -#define __MACROS_EVENT_inl - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/inline/rtems/rtems/eventset.inl b/c/src/exec/rtems/inline/rtems/rtems/eventset.inl deleted file mode 100644 index 887e2c1ac3..0000000000 --- a/c/src/exec/rtems/inline/rtems/rtems/eventset.inl +++ /dev/null @@ -1,91 +0,0 @@ -/* inline/eventset.inl - * - * This include file contains the information pertaining to event sets. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __INLINE_EVENT_SET_inl -#define __INLINE_EVENT_SET_inl - -/*PAGE - * - * _Event_sets_Is_empty - * - * DESCRIPTION: - * - * This function returns TRUE if on events are posted in the event_set, - * and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Event_sets_Is_empty( - rtems_event_set the_event_set -) -{ - return ( the_event_set == 0 ); -} - -/*PAGE - * - * _Event_sets_Post - * - * DESCRIPTION: - * - * This routine posts the given new_events into the event_set - * passed in. The result is returned to the user in event_set. - */ - -RTEMS_INLINE_ROUTINE void _Event_sets_Post( - rtems_event_set the_new_events, - rtems_event_set *the_event_set -) -{ - *the_event_set |= the_new_events; -} - -/*PAGE - * - * _Event_sets_Get - * - * DESCRIPTION: - * - * This function returns the events in event_condition which are - * set in event_set. - */ - -RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( - rtems_event_set the_event_set, - rtems_event_set the_event_condition -) -{ - return ( the_event_set & the_event_condition ); -} - -/*PAGE - * - * _Event_sets_Clear - * - * DESCRIPTION: - * - * This function removes the events in mask from the event_set - * passed in. The result is returned to the user in event_set. - */ - -RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( - rtems_event_set the_event_set, - rtems_event_set the_mask -) -{ - return ( the_event_set & ~(the_mask) ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/inline/rtems/rtems/message.inl b/c/src/exec/rtems/inline/rtems/rtems/message.inl deleted file mode 100644 index 3db2d3a6c3..0000000000 --- a/c/src/exec/rtems/inline/rtems/rtems/message.inl +++ /dev/null @@ -1,83 +0,0 @@ -/* message.inl - * - * This include file contains the static inline implementation of all - * inlined routines in the Message Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __MESSAGE_QUEUE_inl -#define __MESSAGE_QUEUE_inl - -#include - -/*PAGE - * - * _Message_queue_Is_null - * - * DESCRIPTION: - * - * This function places the_message at the rear of the outstanding - * messages on the_message_queue. - */ - -RTEMS_INLINE_ROUTINE boolean _Message_queue_Is_null ( - Message_queue_Control *the_message_queue -) -{ - return ( the_message_queue == NULL ); -} - - -/*PAGE - * - * _Message_queue_Free - * - * DESCRIPTION: - * - * This routine deallocates a message queue control block into - * the inactive chain of free message queue control blocks. - */ - -RTEMS_INLINE_ROUTINE void _Message_queue_Free ( - Message_queue_Control *the_message_queue -) -{ - _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); -} - -/*PAGE - * - * _Message_queue_Get - * - * DESCRIPTION: - * - * This function maps message queue IDs to message queue control - * blocks. If ID corresponds to a local message queue, then it - * returns the_message_queue control pointer which maps to ID - * and location is set to OBJECTS_LOCAL. If the message queue ID is - * global and resides on a remote node, then location is set - * to OBJECTS_REMOTE, and the_message_queue is undefined. - * Otherwise, location is set to OBJECTS_ERROR and - * the_message_queue is undefined. - */ - -RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( - Objects_Id id, - Objects_Locations *location -) -{ - return (Message_queue_Control *) - _Objects_Get( &_Message_queue_Information, id, location ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/inline/rtems/rtems/modes.inl b/c/src/exec/rtems/inline/rtems/rtems/modes.inl deleted file mode 100644 index 7811646910..0000000000 --- a/c/src/exec/rtems/inline/rtems/rtems/modes.inl +++ /dev/null @@ -1,152 +0,0 @@ -/* modes.inl - * - * This include file contains the static inline implementation of the - * inlined routines in the Mode Handler - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __MODES_inl -#define __MODES_inl - -/*PAGE - * - * _Modes_Mask_changed - * - * DESCRIPTION: - * - * This function returns TRUE if any of the mode flags in mask - * are set in mode_set, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Modes_Mask_changed ( - Modes_Control mode_set, - Modes_Control masks -) -{ - return ( mode_set & masks ); -} - -/*PAGE - * - * _Modes_Is_asr_disabled - * - * DESCRIPTION: - * - * This function returns TRUE if mode_set indicates that Asynchronous - * Signal Processing is disabled, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Modes_Is_asr_disabled ( - Modes_Control mode_set -) -{ - return (mode_set & RTEMS_ASR_MASK) == RTEMS_NO_ASR; -} - -/*PAGE - * - * _Modes_Is_preempt - * - * DESCRIPTION: - * - * This function returns TRUE if mode_set indicates that preemption - * is enabled, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Modes_Is_preempt ( - Modes_Control mode_set -) -{ - return (mode_set & RTEMS_PREEMPT_MASK) == RTEMS_PREEMPT; -} - -/*PAGE - * - * _Modes_Is_timeslice - * - * DESCRIPTION: - * - * This function returns TRUE if mode_set indicates that timeslicing - * is enabled, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Modes_Is_timeslice ( - Modes_Control mode_set -) -{ - return (mode_set & RTEMS_TIMESLICE_MASK) == RTEMS_TIMESLICE; -} - -/*PAGE - * - * _Modes_Get_interrupt_level - * - * DESCRIPTION: - * - * This function returns the interrupt level portion of the mode_set. - */ - -RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( - Modes_Control mode_set -) -{ - return ( mode_set & RTEMS_INTERRUPT_MASK ); -} - -/*PAGE - * - * _Modes_Set_interrupt_level - * - * DESCRIPTION: - * - * This routine sets the current interrupt level to that specified - * in the mode_set. - */ - -RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( - Modes_Control mode_set -) -{ - _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); -} - -/*PAGE - * - * _Modes_Change - * - * DESCRIPTION: - * - * This routine changes the modes in old_mode_set indicated by - * mask to the requested values in new_mode_set. The resulting - * mode set is returned in out_mode_set and the modes that changed - * is returned in changed. - */ - -RTEMS_INLINE_ROUTINE void _Modes_Change ( - Modes_Control old_mode_set, - Modes_Control new_mode_set, - Modes_Control mask, - Modes_Control *out_mode_set, - Modes_Control *changed -) -{ - Modes_Control _out_mode; - - _out_mode = old_mode_set; - _out_mode &= ~mask; - _out_mode |= new_mode_set & mask; - *changed = _out_mode ^ old_mode_set; - *out_mode_set = _out_mode; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/inline/rtems/rtems/options.inl b/c/src/exec/rtems/inline/rtems/rtems/options.inl deleted file mode 100644 index 621f39bf1e..0000000000 --- a/c/src/exec/rtems/inline/rtems/rtems/options.inl +++ /dev/null @@ -1,55 +0,0 @@ -/* options.inl - * - * This file contains the static inline implementation of the inlined - * routines from the Options Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __OPTIONS_inl -#define __OPTIONS_inl - -/*PAGE - * - * _Options_Is_no_wait - * - * DESCRIPTION: - * - * This function returns TRUE if the RTEMS_NO_WAIT option is enabled in - * option_set, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Options_Is_no_wait ( - rtems_option option_set -) -{ - return (option_set & RTEMS_NO_WAIT); -} - -/*PAGE - * - * _Options_Is_any - * - * DESCRIPTION: - * - * This function returns TRUE if the RTEMS_EVENT_ANY option is enabled in - * OPTION_SET, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Options_Is_any ( - rtems_option option_set -) -{ - return (option_set & RTEMS_EVENT_ANY); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/inline/rtems/rtems/part.inl b/c/src/exec/rtems/inline/rtems/rtems/part.inl deleted file mode 100644 index b3fcf94038..0000000000 --- a/c/src/exec/rtems/inline/rtems/rtems/part.inl +++ /dev/null @@ -1,199 +0,0 @@ -/* part.inl - * - * This file contains the macro implementation of all inlined routines - * in the Partition Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __PARTITION_inl -#define __PARTITION_inl - -/*PAGE - * - * _Partition_Allocate_buffer - * - * DESCRIPTION: - * - * This function attempts to allocate a buffer from the_partition. - * If successful, it returns the address of the allocated buffer. - * Otherwise, it returns NULL. - */ - -RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( - Partition_Control *the_partition -) -{ - return _Chain_Get( &the_partition->Memory ); -} - -/*PAGE - * - * _Partition_Free_buffer - * - * DESCRIPTION: - * - * This routine frees the_buffer to the_partition. - */ - -RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( - Partition_Control *the_partition, - Chain_Node *the_buffer -) -{ - _Chain_Append( &the_partition->Memory, the_buffer ); -} - -/*PAGE - * - * _Partition_Is_buffer_on_boundary - * - * DESCRIPTION: - * - * This function returns TRUE if the_buffer is on a valid buffer - * boundary for the_partition, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Partition_Is_buffer_on_boundary ( - void *the_buffer, - Partition_Control *the_partition -) -{ - unsigned32 offset; - - offset = (unsigned32) _Addresses_Subtract( - the_buffer, - the_partition->starting_address - ); - - return ((offset % the_partition->buffer_size) == 0); -} - -/*PAGE - * - * _Partition_Is_buffer_valid - * - * DESCRIPTION: - * - * This function returns TRUE if the_buffer is a valid buffer from - * the_partition, otherwise FALSE is returned. - */ - -RTEMS_INLINE_ROUTINE boolean _Partition_Is_buffer_valid ( - Chain_Node *the_buffer, - Partition_Control *the_partition -) -{ - void *starting; - void *ending; - - starting = the_partition->starting_address; - ending = _Addresses_Add_offset( starting, the_partition->length ); - - return ( - _Addresses_Is_in_range( the_buffer, starting, ending ) && - _Partition_Is_buffer_on_boundary( the_buffer, the_partition ) - ); -} - -/*PAGE - * - * _Partition_Is_buffer_size_aligned - * - * DESCRIPTION: - * - * This function returns TRUE if the use of the specified buffer_size - * will result in the allocation of buffers whose first byte is - * properly aligned, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Partition_Is_buffer_size_aligned ( - unsigned32 buffer_size -) -{ - return ((buffer_size % CPU_PARTITION_ALIGNMENT) == 0); -} - -/*PAGE - * - * _Partition_Allocate - * - * DESCRIPTION: - * - * This function allocates a partition control block from - * the inactive chain of free partition control blocks. - */ - -RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) -{ - return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); -} - -/*PAGE - * - * _Partition_Free - * - * DESCRIPTION: - * - * This routine frees a partition control block to the - * inactive chain of free partition control blocks. - */ - -RTEMS_INLINE_ROUTINE void _Partition_Free ( - Partition_Control *the_partition -) -{ - _Objects_Free( &_Partition_Information, &the_partition->Object ); -} - -/*PAGE - * - * _Partition_Get - * - * DESCRIPTION: - * - * This function maps partition IDs to partition control blocks. - * If ID corresponds to a local partition, then it returns - * the_partition control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. If the partition ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_partition is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_partition is undefined. - */ - -RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( - Objects_Id id, - Objects_Locations *location -) -{ - return (Partition_Control *) - _Objects_Get( &_Partition_Information, id, location ); -} - -/*PAGE - * - * _Partition_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_partition is NULL - * and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Partition_Is_null ( - Partition_Control *the_partition -) -{ - return ( the_partition == NULL ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/inline/rtems/rtems/ratemon.inl b/c/src/exec/rtems/inline/rtems/rtems/ratemon.inl deleted file mode 100644 index e47ccf81c8..0000000000 --- a/c/src/exec/rtems/inline/rtems/rtems/ratemon.inl +++ /dev/null @@ -1,143 +0,0 @@ -/* ratemon.inl - * - * This file contains the static inline implementation of the inlined - * routines in the Rate Monotonic Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RATE_MONOTONIC_inl -#define __RATE_MONOTONIC_inl - -/*PAGE - * - * _Rate_monotonic_Allocate - * - * DESCRIPTION: - * - * This function allocates a period control block from - * the inactive chain of free period control blocks. - */ - -RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) -{ - return (Rate_monotonic_Control *) - _Objects_Allocate( &_Rate_monotonic_Information ); -} - -/*PAGE - * - * _Rate_monotonic_Free - * - * DESCRIPTION: - * - * This routine allocates a period control block from - * the inactive chain of free period control blocks. - */ - -RTEMS_INLINE_ROUTINE void _Rate_monotonic_Free ( - Rate_monotonic_Control *the_period -) -{ - _Objects_Free( &_Rate_monotonic_Information, &the_period->Object ); -} - -/*PAGE - * - * _Rate_monotonic_Get - * - * DESCRIPTION: - * - * This function maps period IDs to period control blocks. - * If ID corresponds to a local period, then it returns - * the_period control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. Otherwise, location is set - * to OBJECTS_ERROR and the_period is undefined. - */ - -RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( - Objects_Id id, - Objects_Locations *location -) -{ - return (Rate_monotonic_Control *) - _Objects_Get( &_Rate_monotonic_Information, id, location ); -} - -/*PAGE - * - * _Rate_monotonic_Is_active - * - * DESCRIPTION: - * - * This function returns TRUE if the_period is in the ACTIVE state, - * and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Rate_monotonic_Is_active ( - Rate_monotonic_Control *the_period -) -{ - return (the_period->state == RATE_MONOTONIC_ACTIVE); -} - -/*PAGE - * - * _Rate_monotonic_Is_inactive - * - * DESCRIPTION: - * - * This function returns TRUE if the_period is in the ACTIVE state, - * and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Rate_monotonic_Is_inactive ( - Rate_monotonic_Control *the_period -) -{ - return (the_period->state == RATE_MONOTONIC_INACTIVE); -} - -/*PAGE - * - * _Rate_monotonic_Is_expired - * - * DESCRIPTION: - * - * This function returns TRUE if the_period is in the EXPIRED state, - * and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Rate_monotonic_Is_expired ( - Rate_monotonic_Control *the_period -) -{ - return (the_period->state == RATE_MONOTONIC_EXPIRED); -} - -/*PAGE - * - * _Rate_monotonic_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_period is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Rate_monotonic_Is_null ( - Rate_monotonic_Control *the_period -) -{ - return (the_period == NULL); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/inline/rtems/rtems/region.inl b/c/src/exec/rtems/inline/rtems/rtems/region.inl deleted file mode 100644 index 2e01385b20..0000000000 --- a/c/src/exec/rtems/inline/rtems/rtems/region.inl +++ /dev/null @@ -1,127 +0,0 @@ -/* region.inl - * - * This file contains the macro implementation of the inlined - * routines from the Region Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __REGION_inl -#define __REGION_inl - -/*PAGE - * - * _Region_Allocate - * - * DESCRIPTION: - * - * This function allocates a region control block from - * the inactive chain of free region control blocks. - */ - -RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) -{ - return (Region_Control *) _Objects_Allocate( &_Region_Information ); -} - -/*PAGE - * - * _Region_Free - * - * DESCRIPTION: - * - * This routine frees a region control block to the - * inactive chain of free region control blocks. - */ - -RTEMS_INLINE_ROUTINE void _Region_Free ( - Region_Control *the_region -) -{ - _Objects_Free( &_Region_Information, &the_region->Object ); -} - -/*PAGE - * - * _Region_Get - * - * DESCRIPTION: - * - * This function maps region IDs to region control blocks. - * If ID corresponds to a local region, then it returns - * the_region control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. Otherwise, location is set - * to OBJECTS_ERROR and the_region is undefined. - */ - -RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( - Objects_Id id, - Objects_Locations *location -) -{ - return (Region_Control *) - _Objects_Get( &_Region_Information, id, location ); -} - -/*PAGE - * - * _Region_Allocate_segment - * - * DESCRIPTION: - * - * This function attempts to allocate a segment from the_region. - * If successful, it returns the address of the allocated segment. - * Otherwise, it returns NULL. - */ - -RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( - Region_Control *the_region, - unsigned32 size -) -{ - return _Heap_Allocate( &the_region->Memory, size ); -} - -/*PAGE - * - * _Region_Free_segment - * - * DESCRIPTION: - * - * This function frees the_segment to the_region. - */ - -RTEMS_INLINE_ROUTINE boolean _Region_Free_segment ( - Region_Control *the_region, - void *the_segment -) -{ - return _Heap_Free( &the_region->Memory, the_segment ); -} - -/*PAGE - * - * _Region_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_region is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Region_Is_null ( - Region_Control *the_region -) -{ - return ( the_region == NULL ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/inline/rtems/rtems/sem.inl b/c/src/exec/rtems/inline/rtems/rtems/sem.inl deleted file mode 100644 index bed24e4acf..0000000000 --- a/c/src/exec/rtems/inline/rtems/rtems/sem.inl +++ /dev/null @@ -1,93 +0,0 @@ -/* sem.inl - * - * This file contains the static inlin implementation of the inlined - * routines from the Semaphore Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __SEMAPHORE_inl -#define __SEMAPHORE_inl - -/*PAGE - * - * _Semaphore_Allocate - * - * DESCRIPTION: - * - * This function allocates a semaphore control block from - * the inactive chain of free semaphore control blocks. - */ - -RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) -{ - return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); -} - -/*PAGE - * - * _Semaphore_Free - * - * DESCRIPTION: - * - * This routine frees a semaphore control block to the - * inactive chain of free semaphore control blocks. - */ - -RTEMS_INLINE_ROUTINE void _Semaphore_Free ( - Semaphore_Control *the_semaphore -) -{ - _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); -} - -/*PAGE - * - * _Semaphore_Get - * - * DESCRIPTION: - * - * This function maps semaphore IDs to semaphore control blocks. - * If ID corresponds to a local semaphore, then it returns - * the_semaphore control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. if the semaphore ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_semaphore is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_semaphore is undefined. - */ - -RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( - Objects_Id id, - Objects_Locations *location -) -{ - return (Semaphore_Control *) - _Objects_Get( &_Semaphore_Information, id, location ); -} - -/*PAGE - * - * _Semaphore_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_semaphore is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Semaphore_Is_null ( - Semaphore_Control *the_semaphore -) -{ - return ( the_semaphore == NULL ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/inline/rtems/rtems/status.inl b/c/src/exec/rtems/inline/rtems/rtems/status.inl deleted file mode 100644 index a8accfc0d6..0000000000 --- a/c/src/exec/rtems/inline/rtems/rtems/status.inl +++ /dev/null @@ -1,56 +0,0 @@ -/* inline/status.inl - * - * This include file contains the implementations of the inlined - * routines for the status package. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __INLINE_STATUS_inl -#define __INLINE_STATUS_inl - -/*PAGE - * - * rtems_is_status_successful - * - * DESCRIPTION: - * - * This function returns TRUE if the status code is equal to RTEMS_SUCCESSFUL, - * and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean rtems_is_status_successful( - rtems_status_code code -) -{ - return (code == RTEMS_SUCCESSFUL); -} - -/*PAGE - * - * rtems_are_statuses_equal - * - * DESCRIPTION: - * - * This function returns TRUE if the status code1 is equal to code2, - * and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean rtems_are_statuses_equal( - rtems_status_code code1, - rtems_status_code code2 -) -{ - return (code1 == code2); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/inline/rtems/rtems/support.inl b/c/src/exec/rtems/inline/rtems/rtems/support.inl deleted file mode 100644 index df2482c9e8..0000000000 --- a/c/src/exec/rtems/inline/rtems/rtems/support.inl +++ /dev/null @@ -1,61 +0,0 @@ -/* support.inl - * - * This include file contains the static inline implementation of all - * of the inlined routines specific to the RTEMS API. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_SUPPORT_inl -#define __RTEMS_SUPPORT_inl - -/*PAGE - * - * rtems_is_name_valid - * - * DESCRIPTION: - * - * This function returns TRUE if the name is valid, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE rtems_boolean rtems_is_name_valid ( - rtems_name name -) -{ - return ( name != 0 ); -} - -/*PAGE - * - * rtems_name_to_characters - * - * DESCRIPTION: - * - * This function breaks the object name into the four component - * characters C1, C2, C3, and C4. - */ - -RTEMS_INLINE_ROUTINE void rtems_name_to_characters( - rtems_name name, - char *c1, - char *c2, - char *c3, - char *c4 -) -{ - *c1 = (name >> 24) & 0xff; - *c2 = (name >> 16) & 0xff; - *c3 = (name >> 8) & 0xff; - *c4 = name & 0xff; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/inline/rtems/rtems/tasks.inl b/c/src/exec/rtems/inline/rtems/rtems/tasks.inl deleted file mode 100644 index ed1f5cd9f0..0000000000 --- a/c/src/exec/rtems/inline/rtems/rtems/tasks.inl +++ /dev/null @@ -1,90 +0,0 @@ -/* tasks.inl - * - * This file contains the static inline implementation of all inlined - * routines in the with RTEMS Tasks Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_TASKS_inl -#define __RTEMS_TASKS_inl - -/*PAGE - * - * _RTEMS_tasks_Allocate - * - * DESCRIPTION: - * - * This function allocates a task control block from - * the inactive chain of free task control blocks. - */ - -RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void ) -{ - return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information ); -} - -/*PAGE - * - * _RTEMS_tasks_Free - * - * DESCRIPTION: - * - * This routine frees a task control block to the - * inactive chain of free task control blocks. - */ - -RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( - Thread_Control *the_task -) -{ - _Objects_Free( - _Objects_Get_information( the_task->Object.id ), - &the_task->Object - ); -} - -/*PAGE - * - * _RTEMS_tasks_Priority_to_Core - * - * DESCRIPTION: - * - * This function converts an RTEMS API priority into a core priority. - */ - -RTEMS_INLINE_ROUTINE Priority_Control _RTEMS_tasks_Priority_to_Core( - rtems_task_priority priority -) -{ - return (Priority_Control) priority; -} - -/*PAGE - * - * _RTEMS_tasks_Priority_is_valid - * - * DESCRIPTION: - * - * This function returns TRUE if the_priority is a valid user task priority - * and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _RTEMS_tasks_Priority_is_valid ( - rtems_task_priority the_priority -) -{ - return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && - ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/inline/rtems/rtems/timer.inl b/c/src/exec/rtems/inline/rtems/rtems/timer.inl deleted file mode 100644 index ce87668ac3..0000000000 --- a/c/src/exec/rtems/inline/rtems/rtems/timer.inl +++ /dev/null @@ -1,142 +0,0 @@ -/* timer.inl - * - * This file contains the static inline implementation of the inlined routines - * from the Timer Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __TIMER_inl -#define __TIMER_inl - -/*PAGE - * - * _Timer_Allocate - * - * DESCRIPTION: - * - * This function allocates a timer control block from - * the inactive chain of free timer control blocks. - */ - -RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void ) -{ - return (Timer_Control *) _Objects_Allocate( &_Timer_Information ); -} - -/*PAGE - * - * _Timer_Free - * - * DESCRIPTION: - * - * This routine frees a timer control block to the - * inactive chain of free timer control blocks. - */ - -RTEMS_INLINE_ROUTINE void _Timer_Free ( - Timer_Control *the_timer -) -{ - _Objects_Free( &_Timer_Information, &the_timer->Object ); -} - -/*PAGE - * - * _Timer_Get - * - * DESCRIPTION: - * - * This function maps timer IDs to timer control blocks. - * If ID corresponds to a local timer, then it returns - * the timer control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. Otherwise, location is set - * to OBJECTS_ERROR and the returned value is undefined. - */ - -RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( - Objects_Id id, - Objects_Locations *location -) -{ - return (Timer_Control *) - _Objects_Get( &_Timer_Information, id, location ); -} - -/*PAGE - * - * _Timer_Is_interval_class - * - * DESCRIPTION: - * - * This function returns TRUE if the class is that of an INTERVAL - * timer, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Timer_Is_interval_class ( - Timer_Classes the_class -) -{ - return ( the_class == TIMER_INTERVAL ); -} - -/*PAGE - * - * _Timer_Is_time_of_day_class - * - * DESCRIPTION: - * - * This function returns TRUE if the class is that of an INTERVAL - * timer, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Timer_Is_timer_of_day_class ( - Timer_Classes the_class -) -{ - return ( the_class == TIMER_TIME_OF_DAY ); -} - -/*PAGE - * - * _Timer_Is_dormant_class - * - * DESCRIPTION: - * - * This function returns TRUE if the class is that of a DORMANT - * timer, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Timer_Is_dormant_class ( - Timer_Classes the_class -) -{ - return ( the_class == TIMER_DORMANT ); -} - -/*PAGE - * - * _Timer_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_timer is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Timer_Is_null ( - Timer_Control *the_timer -) -{ - return ( the_timer == NULL ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/macros/rtems/rtems/asr.inl b/c/src/exec/rtems/macros/rtems/rtems/asr.inl deleted file mode 100644 index d6806b00f6..0000000000 --- a/c/src/exec/rtems/macros/rtems/rtems/asr.inl +++ /dev/null @@ -1,90 +0,0 @@ -/* macros/asr.h - * - * This include file contains the implemenation of all routines - * associated with the asynchronous signal handler which are inlined. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __INLINE_ASR_h -#define __INLINE_ASR_h - -#include - -/*PAGE - * - * _ASR_Initialize - * - */ - -#define _ASR_Initialize( _information ) \ -{ \ - (_information)->is_enabled = TRUE; \ - (_information)->handler = NULL; \ - (_information)->mode_set = RTEMS_DEFAULT_MODES; \ - (_information)->signals_posted = 0; \ - (_information)->signals_pending = 0; \ - (_information)->nest_level = 0; \ -} - -/*PAGE - * - * _ASR_Swap_signals - * - */ - -#define _ASR_Swap_signals( _information ) \ -{ \ - rtems_signal_set _signals; \ - ISR_Level _level; \ - \ - _ISR_Disable( _level ); \ - _signals = (_information)->signals_pending; \ - (_information)->signals_pending = (_information)->signals_posted; \ - (_information)->signals_posted = _signals; \ - _ISR_Enable( _level ); \ -} - -/*PAGE - * - * _ASR_Is_null_handler - * - */ - -#define _ASR_Is_null_handler( _asr_handler ) \ - ( (_asr_handler) == NULL ) - -/*PAGE - * - * _ASR_Are_signals_pending - * - */ - -#define _ASR_Are_signals_pending( _information ) \ - ( (_information)->signals_posted != 0 ) - -/*PAGE - * - * _ASR_Post_signals - * - */ - -#define _ASR_Post_signals( _signals, _signal_set ) \ - do { \ - ISR_Level _level; \ - \ - _ISR_Disable( _level ); \ - *(_signal_set) |= (_signals); \ - _ISR_Enable( _level ); \ - } while ( 0 ) - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/macros/rtems/rtems/attr.inl b/c/src/exec/rtems/macros/rtems/rtems/attr.inl deleted file mode 100644 index 27231871ba..0000000000 --- a/c/src/exec/rtems/macros/rtems/rtems/attr.inl +++ /dev/null @@ -1,91 +0,0 @@ -/* macros/attr.h - * - * This include file contains all of the inlined routines associated - * with attributes. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __MACROS_ATTRIBUTES_h -#define __MACROS_ATTRIBUTES_h - -/*PAGE - * - * _Attributes_Set - */ - -#define _Attributes_Set( _new_attributes, _attribute_set ) \ - ( (_attribute_set) | (_new_attributes) ) - -/*PAGE - * - * _Attributes_Clear - */ - -#define _Attributes_Clear( _attribute_set, _mask ) \ - ( (_attribute_set) & ~(_mask) ) - -/*PAGE - * - * _Attributes_Is_floating_point - * - */ - -#define _Attributes_Is_floating_point( _attribute_set ) \ - ( (_attribute_set) & RTEMS_FLOATING_POINT ) - -/*PAGE - * - * _Attributes_Is_global - * - */ - -#define _Attributes_Is_global( _attribute_set ) \ - ( (_attribute_set) & RTEMS_GLOBAL ) - -/*PAGE - * - * _Attributes_Is_priority - * - */ - -#define _Attributes_Is_priority( _attribute_set ) \ - ( (_attribute_set) & RTEMS_PRIORITY ) - -/*PAGE - * - * _Attributes_Is_binary_semaphore - * - */ - -#define _Attributes_Is_binary_semaphore( _attribute_set ) \ - ( (_attribute_set) & RTEMS_BINARY_SEMAPHORE ) - -/*PAGE - * - * _Attributes_Is_inherit_priority - * - */ - -#define _Attributes_Is_inherit_priority( _attribute_set ) \ - ( (_attribute_set) & RTEMS_INHERIT_PRIORITY ) - -/*PAGE - * - * _Attributes_Is_priority_ceiling - * - */ - -#define _Attributes_Is_priority_ceiling( _attribute_set ) \ - ( (_attribute_set) & RTEMS_PRIORITY_CEILING ) - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/macros/rtems/rtems/dpmem.inl b/c/src/exec/rtems/macros/rtems/rtems/dpmem.inl deleted file mode 100644 index 3e1d7bce95..0000000000 --- a/c/src/exec/rtems/macros/rtems/rtems/dpmem.inl +++ /dev/null @@ -1,59 +0,0 @@ -/* macros/dpmem.h - * - * This include file contains the inline routine used in conjunction - * with the Dual Ported Memory Manager - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __MACROS_DPMEM_h -#define __MACROS_DPMEM_h - -/*PAGE - * - * _Dual_ported_memory_Allocate - * - */ - -#define _Dual_ported_memory_Allocate() \ - (Dual_ported_memory_Control *) \ - _Objects_Allocate( &_Dual_ported_memory_Information ) - -/*PAGE - * - * _Dual_ported_memory_Free - * - */ - -#define _Dual_ported_memory_Free( _the_port ) \ - _Objects_Free( &_Dual_ported_memory_Information, &(_the_port)->Object ) - -/*PAGE - * - * _Dual_ported_memory_Get - * - */ - -#define _Dual_ported_memory_Get( _id, _location ) \ - (Dual_ported_memory_Control *) \ - _Objects_Get( &_Dual_ported_memory_Information, (_id), (_location) ) - - -/*PAGE - * - * _Dual_ported_memory_Is_null - */ - -#define _Dual_ported_memory_Is_null( _the_port ) \ - ( (_the_port) == NULL ) - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/macros/rtems/rtems/event.inl b/c/src/exec/rtems/macros/rtems/rtems/event.inl deleted file mode 100644 index e37f6813bf..0000000000 --- a/c/src/exec/rtems/macros/rtems/rtems/event.inl +++ /dev/null @@ -1,21 +0,0 @@ -/* macros/event.h - * - * This include file contains the implementation of macros for - * the Event Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __MACROS_EVENT_h -#define __MACROS_EVENT_h - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/macros/rtems/rtems/eventset.inl b/c/src/exec/rtems/macros/rtems/rtems/eventset.inl deleted file mode 100644 index 1803d18637..0000000000 --- a/c/src/exec/rtems/macros/rtems/rtems/eventset.inl +++ /dev/null @@ -1,53 +0,0 @@ -/* eventset.inl - * - * This include file contains the macro implementation of inlined - * routines in the event set object. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __EVENT_SET_inl -#define __EVENT_SET_inl - -/*PAGE - * - * _Event_sets_Is_empty - */ - -#define _Event_sets_Is_empty( _the_event_set ) \ - ((_the_event_set) == 0 ) - -/*PAGE - * - * _Event_sets_Is_empty - */ - -#define _Event_sets_Post( _the_new_events, _the_event_set ) \ - *(_the_event_set) |= (_the_new_events) - -/*PAGE - * - * _Event_sets_Is_empty - */ - -#define _Event_sets_Get( _the_event_set, _the_event_condition ) \ - ((_the_event_set) & (_the_event_condition)) - -/*PAGE - * - * _Event_sets_Clear - */ - -#define _Event_sets_Clear( _the_event_set, _the_mask ) \ - ((_the_event_set) & ~(_the_mask)) - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/macros/rtems/rtems/message.inl b/c/src/exec/rtems/macros/rtems/rtems/message.inl deleted file mode 100644 index 62b6ac0ceb..0000000000 --- a/c/src/exec/rtems/macros/rtems/rtems/message.inl +++ /dev/null @@ -1,49 +0,0 @@ -/* message.inl - * - * This include file contains the macro implementation of all - * inlined routines in the Message Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __MESSAGE_QUEUE_inl -#define __MESSAGE_QUEUE_inl - -/*PAGE - * - * _Message_queue_Is_null - * - */ - -#define _Message_queue_Is_null( _the_message_queue ) \ - ( (_the_message_queue) == NULL ) - -/*PAGE - * - * _Message_queue_Free - * - */ - -#define _Message_queue_Free( _the_message_queue ) \ - _Objects_Free( &_Message_queue_Information, &(_the_message_queue)->Object ) - -/*PAGE - * - * _Message_queue_Get - * - */ - -#define _Message_queue_Get( _id, _location ) \ - (Message_queue_Control *) \ - _Objects_Get( &_Message_queue_Information, (_id), (_location) ) - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/macros/rtems/rtems/modes.inl b/c/src/exec/rtems/macros/rtems/rtems/modes.inl deleted file mode 100644 index a7dea6516d..0000000000 --- a/c/src/exec/rtems/macros/rtems/rtems/modes.inl +++ /dev/null @@ -1,92 +0,0 @@ -/* modes.inl - * - * This include file contains the macro implementation of the - * inlined routines in the Mode Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __MODES_inl -#define __MODES_inl - -/*PAGE - * - * _Modes_Mask_changed - * - */ - -#define _Modes_Mask_changed( _mode_set, _masks ) \ - ( (_mode_set) & (_masks) ) - -/*PAGE - * - * _Modes_Is_asr_disabled - * - */ - -#define _Modes_Is_asr_disabled( _mode_set ) \ - (((_mode_set) & RTEMS_ASR_MASK) == RTEMS_NO_ASR) - -/*PAGE - * - * _Modes_Is_preempt - * - */ - -#define _Modes_Is_preempt( _mode_set ) \ - ( ( (_mode_set) & RTEMS_PREEMPT_MASK ) == RTEMS_PREEMPT ) - -/*PAGE - * - * _Modes_Is_timeslice - * - */ - -#define _Modes_Is_timeslice( _mode_set ) \ - (((_mode_set) & RTEMS_TIMESLICE_MASK) == RTEMS_TIMESLICE) - -/*PAGE - * - * _Modes_Get_interrupt_level - * - */ - -#define _Modes_Get_interrupt_level( _mode_set ) \ - ( (_mode_set) & RTEMS_INTERRUPT_MASK ) - -/*PAGE - * - * _Modes_Set_interrupt_level - * - */ - -#define _Modes_Set_interrupt_level( _mode_set ) \ - _ISR_Set_level( _Modes_Get_interrupt_level( (_mode_set) ) ) - -/*PAGE - * - * _Modes_Change - * - */ - -#define _Modes_Change( _old_mode_set, _new_mode_set, \ - _mask, _out_mode_set, _changed ) \ - { Modes_Control _out_mode; \ - \ - _out_mode = (_old_mode_set); \ - _out_mode &= ~(_mask); \ - _out_mode |= (_new_mode_set) & (_mask); \ - *(_changed) = _out_mode ^ (_old_mode_set); \ - *(_out_mode_set) = _out_mode; \ - } - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/macros/rtems/rtems/options.inl b/c/src/exec/rtems/macros/rtems/rtems/options.inl deleted file mode 100644 index 7c14e4fe4f..0000000000 --- a/c/src/exec/rtems/macros/rtems/rtems/options.inl +++ /dev/null @@ -1,39 +0,0 @@ -/* options.inl - * - * This file contains the macro implementation of the inlined - * routines from the Options Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __OPTIONS_inl -#define __OPTIONS_inl - -/*PAGE - * - * _Options_Is_no_wait - * - */ - -#define _Options_Is_no_wait( _option_set ) \ - ( (_option_set) & RTEMS_NO_WAIT ) - -/*PAGE - * - * _Options_Is_any - * - */ - -#define _Options_Is_any( _option_set ) \ - ( (_option_set) & RTEMS_EVENT_ANY ) - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/macros/rtems/rtems/part.inl b/c/src/exec/rtems/macros/rtems/rtems/part.inl deleted file mode 100644 index 55c188b210..0000000000 --- a/c/src/exec/rtems/macros/rtems/rtems/part.inl +++ /dev/null @@ -1,117 +0,0 @@ -/* part.inl - * - * This file contains the macro implementation of all inlined routines - * in the Partition Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __PARTITION_inl -#define __PARTITION_inl - -/*PAGE - * - * _Partition_Allocate_buffer - * - */ - -#define _Partition_Allocate_buffer( _the_partition ) \ - _Chain_Get( &(_the_partition)->Memory ) - -/*PAGE - * - * _Partition_Free_buffer - * - */ - -#define _Partition_Free_buffer( _the_partition, _the_buffer ) \ - _Chain_Append( &(_the_partition)->Memory, (_the_buffer) ) - -/*PAGE - * - * _Partition_Is_buffer_on_boundary - * - */ - -#define _Partition_Is_buffer_on_boundary( _the_buffer, _the_partition ) \ - ((((unsigned32) _Addresses_Subtract( \ - (_the_buffer), \ - (_the_partition)->starting_address ) \ - ) % \ - (_the_partition)->buffer_size) == 0) - -/*PAGE - * - * _Partition_Is_buffer_valid - * - */ - -#define _Partition_Is_buffer_valid( _the_buffer, _the_partition ) \ - ( \ - _Addresses_Is_in_range( \ - (_the_buffer), \ - (_the_partition)->starting_address, \ - _Addresses_Add_offset( \ - (_the_partition)->starting_address, \ - (_the_partition)->length \ - ) \ - ) && \ - _Partition_Is_buffer_on_boundary( (_the_buffer), (_the_partition) ) \ - ) - -/*PAGE - * - * _Partition_Is_buffer_size_aligned - * - */ - -#define _Partition_Is_buffer_size_aligned( _buffer_size ) \ - ((_buffer_size) % CPU_PARTITION_ALIGNMENT == 0) - -/*PAGE - * - * _Partition_Allocate - * - */ - -#define _Partition_Allocate() \ - (Partition_Control *) _Objects_Allocate( &_Partition_Information ) - -/*PAGE - * - * _Partition_Free - * - */ - -#define _Partition_Free( _the_partition ) \ - _Objects_Free( &_Partition_Information, &(_the_partition)->Object ) - -/*PAGE - * - * _Partition_Get - * - */ - -#define _Partition_Get( _id, _location ) \ - (Partition_Control *) \ - _Objects_Get( &_Partition_Information, (_id), (_location) ) - -/*PAGE - * - * _Partition_Is_null - * - */ - -#define _Partition_Is_null( _the_partition ) \ - ( (_the_partition) == NULL ) - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/macros/rtems/rtems/ratemon.inl b/c/src/exec/rtems/macros/rtems/rtems/ratemon.inl deleted file mode 100644 index ebb182e6f1..0000000000 --- a/c/src/exec/rtems/macros/rtems/rtems/ratemon.inl +++ /dev/null @@ -1,85 +0,0 @@ -/* ratemon.inl - * - * This file contains the macro implementation of the inlined - * routines in the Rate Monotonic Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RATE_MONOTONIC_inl -#define __RATE_MONOTONIC_inl - -/*PAGE - * - * _Rate_monotonic_Allocate - * - */ - -#define _Rate_monotonic_Allocate() \ - (Rate_monotonic_Control *) \ - _Objects_Allocate( &_Rate_monotonic_Information ) - -/*PAGE - * - * _Rate_monotonic_Free - * - */ - -#define _Rate_monotonic_Free( _the_period ) \ - _Objects_Free( &_Rate_monotonic_Information, &(_the_period)->Object ) - -/*PAGE - * - * _Rate_monotonic_Get - * - */ - -#define _Rate_monotonic_Get( _id, _location ) \ - (Rate_monotonic_Control *) \ - _Objects_Get( &_Rate_monotonic_Information, (_id), (_location) ) - -/*PAGE - * - * _Rate_monotonic_Is_active - * - */ - -#define _Rate_monotonic_Is_active( _the_period ) \ - ((_the_period)->state == RATE_MONOTONIC_ACTIVE) - -/*PAGE - * - * _Rate_monotonic_Is_inactive - * - */ - -#define _Rate_monotonic_Is_inactive( _the_period ) \ - ((_the_period)->state == RATE_MONOTONIC_INACTIVE) - -/*PAGE - * - * _Rate_monotonic_Is_expired - * - */ - -#define _Rate_monotonic_Is_expired( _the_period ) \ - ((_the_period)->state == RATE_MONOTONIC_EXPIRED) - -/*PAGE - * - * _Rate_monotonic_Is_null - * - */ - -#define _Rate_monotonic_Is_null( _the_period ) ( (_the_period) == NULL ) - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/macros/rtems/rtems/region.inl b/c/src/exec/rtems/macros/rtems/rtems/region.inl deleted file mode 100644 index 667d77e307..0000000000 --- a/c/src/exec/rtems/macros/rtems/rtems/region.inl +++ /dev/null @@ -1,75 +0,0 @@ -/* region.inl - * - * This file contains the macro implementation of the inlined - * routines from the Region Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __REGION_inl -#define __REGION_inl - -/*PAGE - * - * _Region_Allocate - * - */ - -#define _Region_Allocate() \ - (Region_Control *) _Objects_Allocate( &_Region_Information ) - -/*PAGE - * - * _Region_Free - * - */ - -#define _Region_Free( _the_region ) \ - _Objects_Free( &_Region_Information, &(_the_region)->Object ) - -/*PAGE - * - * _Region_Get - * - */ - -#define _Region_Get( _id, _location ) \ - (Region_Control *) \ - _Objects_Get( &_Region_Information, (_id), (_location) ) - -/*PAGE - * - * _Region_Allocate_segment - * - */ - -#define _Region_Allocate_segment( _the_region, _size ) \ - _Heap_Allocate( &(_the_region)->Memory, (_size) ) - -/*PAGE - * - * _Region_Free_segment - * - */ - -#define _Region_Free_segment( _the_region, _the_segment ) \ - _Heap_Free( &(_the_region)->Memory, (_the_segment) ) - -/*PAGE - * - * _Region_Is_null - * - */ - -#define _Region_Is_null( _the_region ) ( (_the_region) == NULL ) - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/macros/rtems/rtems/sem.inl b/c/src/exec/rtems/macros/rtems/rtems/sem.inl deleted file mode 100644 index 7e94069009..0000000000 --- a/c/src/exec/rtems/macros/rtems/rtems/sem.inl +++ /dev/null @@ -1,58 +0,0 @@ -/* sem.inl - * - * This file contains the macro implementation of the inlined - * routines from the Semaphore Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __SEMAPHORE_inl -#define __SEMAPHORE_inl - -/*PAGE - * - * _Semaphore_Allocate - * - */ - -#define _Semaphore_Allocate() \ - (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ) - -/*PAGE - * - * _Semaphore_Free - * - */ - -#define _Semaphore_Free( _the_semaphore ) \ - _Objects_Free( &_Semaphore_Information, &(_the_semaphore)->Object ) - -/*PAGE - * - * _Semaphore_Get - * - */ - -#define _Semaphore_Get( _id, _location ) \ - (Semaphore_Control *) \ - _Objects_Get( &_Semaphore_Information, (_id), (_location) ) - -/*PAGE - * - * _Semaphore_Is_null - * - */ - -#define _Semaphore_Is_null( _the_semaphore ) \ - ( (_the_semaphore) == NULL ) - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/macros/rtems/rtems/status.inl b/c/src/exec/rtems/macros/rtems/rtems/status.inl deleted file mode 100644 index 408cb816d1..0000000000 --- a/c/src/exec/rtems/macros/rtems/rtems/status.inl +++ /dev/null @@ -1,39 +0,0 @@ -/* macros/status.h - * - * This include file contains the implementations of the inlined - * routines for the status package. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __MACROS_STATUS_h -#define __MACROS_STATUS_h - -/*PAGE - * - * rtems_is_status_successful - * - */ - -#define rtems_is_status_successful( _code ) \ - ( (_code) == RTEMS_SUCCESSFUL ) - -/*PAGE - * - * rtems_are_statuses_equal - * - */ - -#define rtems_are_statuses_equal( _code1, _code2 ) \ - ((_code1) == (_code2)) - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/macros/rtems/rtems/support.inl b/c/src/exec/rtems/macros/rtems/rtems/support.inl deleted file mode 100644 index a25b445aff..0000000000 --- a/c/src/exec/rtems/macros/rtems/rtems/support.inl +++ /dev/null @@ -1,44 +0,0 @@ -/* support.inl - * - * This include file contains the macros implementation of all - * of the inlined routines specific to the RTEMS API. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_SUPPORT_inl -#define __RTEMS_SUPPORT_inl - -/*PAGE - * - * rtems_is_name_valid - * - */ - -#define rtems_is_name_valid( _name ) \ - ( (_name) != 0 ) - -/*PAGE - * - * rtems_name_to_characters - * - */ - -#define rtems_name_to_characters( _name, _c1, _c2, _c3, _c4 ) \ - { \ - (*(_c1) = ((_name) >> 24) & 0xff; \ - (*(_c2) = ((_name) >> 16) & 0xff; \ - (*(_c3) = ((_name) >> 8) & 0xff; \ - (*(_c4) = ((_name)) & 0xff; \ - } - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/macros/rtems/rtems/tasks.inl b/c/src/exec/rtems/macros/rtems/rtems/tasks.inl deleted file mode 100644 index 8dd6ff351b..0000000000 --- a/c/src/exec/rtems/macros/rtems/rtems/tasks.inl +++ /dev/null @@ -1,58 +0,0 @@ -/* tasks.inl - * - * This file contains the macro implementation of all inlined - * routines in the with RTEMS Tasks Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_TASKS_inl -#define __RTEMS_TASKS_inl - -/*PAGE - * - * _RTEMS_tasks_Allocate - * - */ - -#define _RTEMS_tasks_Allocate() \ - (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information ) - -/*PAGE - * - * _RTEMS_tasks_Free - * - */ - -#define _RTEMS_tasks_Free( _the_task ) \ - _Objects_Free( &_RTEMS_tasks_Information, &(_the_task)->Object ) - -/*PAGE - * - * _RTEMS_tasks_Priority_to_Core - */ - -#define _RTEMS_tasks_Priority_to_Core( _priority ) \ - ((Priority_Control) (_priority)) - -/*PAGE - * - * _RTEMS_tasks_Priority_is_valid - * - */ - -#define _RTEMS_tasks_Priority_is_valid( _the_priority ) \ - ( ((_the_priority) >= RTEMS_MINIMUM_PRIORITY) && \ - ((_the_priority) <= RTEMS_MAXIMUM_PRIORITY) ) - - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/macros/rtems/rtems/timer.inl b/c/src/exec/rtems/macros/rtems/rtems/timer.inl deleted file mode 100644 index 9026bed570..0000000000 --- a/c/src/exec/rtems/macros/rtems/rtems/timer.inl +++ /dev/null @@ -1,85 +0,0 @@ -/* timer.inl - * - * This file contains the macro implementation of the inlined routines - * from the Timer Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __TIMER_inl -#define __TIMER_inl - -/*PAGE - * - * _Timer_Allocate - * - */ - -#define _Timer_Allocate() \ - (Timer_Control *) _Objects_Allocate( &_Timer_Information ) - -/*PAGE - * - * _Timer_Free - * - */ - -#define _Timer_Free( _the_timer ) \ - _Objects_Free( &_Timer_Information, &(_the_timer)->Object ) - -/*PAGE - * - * _Timer_Get - * - */ - -#define _Timer_Get( _id, _location ) \ - (Timer_Control *) \ - _Objects_Get( &_Timer_Information, (_id), (_location) ) - -/*PAGE - * - * _Timer_Is_interval_class - * - */ - -#define _Timer_Is_interval_class( _the_class ) \ - ( (_the_class) == TIMER_INTERVAL ) - -/*PAGE - * - * _Timer_Is_time_of_day_class - * - */ - -#define _Timer_Is_time_of_day_class( _the_class ) \ - ( (_the_class) == TIMER_TIME_OF_DAY ) - -/*PAGE - * - * _Timer_Is_dormant_class - * - */ - -#define _Timer_Is_dormant_class( _the_class ) \ - ( (_the_class) == TIMER_DORMANT ) - -/*PAGE - * - * _Timer_Is_null - * - */ - -#define _Timer_Is_null( _the_timer ) \ - ( (_the_timer) == NULL ) - -#endif -/* end of include file */ diff --git a/c/src/exec/rtems/src/rtclock.c b/c/src/exec/rtems/src/rtclock.c deleted file mode 100644 index 4b7b5f5b31..0000000000 --- a/c/src/exec/rtems/src/rtclock.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Clock Manager - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include -#include - -/*PAGE - * - * rtems_clock_get - * - * This directive returns the current date and time. If the time has - * not been set by a tm_set then an error is returned. - * - * Input parameters: - * option - which value to return - * time_buffer - pointer to output buffer (a time and date structure - * or an interval) - * - * Output parameters: - * time_buffer - output filled in - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful - */ - -rtems_status_code rtems_clock_get( - rtems_clock_get_options option, - void *time_buffer -) -{ - ISR_Level level; - rtems_interval tmp; - - switch ( option ) { - case RTEMS_CLOCK_GET_TOD: - if ( !_TOD_Is_set ) - return RTEMS_NOT_DEFINED; - - *(rtems_time_of_day *)time_buffer = _TOD_Current; - return RTEMS_SUCCESSFUL; - - case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: - if ( !_TOD_Is_set ) - return RTEMS_NOT_DEFINED; - - *(rtems_interval *)time_buffer = _TOD_Seconds_since_epoch; - return RTEMS_SUCCESSFUL; - - case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: - *(rtems_interval *)time_buffer = _Watchdog_Ticks_since_boot; - return RTEMS_SUCCESSFUL; - - case RTEMS_CLOCK_GET_TICKS_PER_SECOND: - *(rtems_interval *)time_buffer = _TOD_Ticks_per_second; - return RTEMS_SUCCESSFUL; - - case RTEMS_CLOCK_GET_TIME_VALUE: - if ( !_TOD_Is_set ) - return RTEMS_NOT_DEFINED; - - _ISR_Disable( level ); - ((rtems_clock_time_value *)time_buffer)->seconds = - _TOD_Seconds_since_epoch; - tmp = _TOD_Current.ticks; - _ISR_Enable( level ); - - tmp *= _TOD_Microseconds_per_tick; - ((rtems_clock_time_value *)time_buffer)->microseconds = tmp; - - return RTEMS_SUCCESSFUL; - } - - return RTEMS_INTERNAL_ERROR; /* should never get here */ - -} - -/*PAGE - * - * rtems_clock_set - * - * This directive sets the date and time for this node. - * - * Input parameters: - * time_buffer - pointer to the time and date structure - * - * Output parameters: - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful - */ - -rtems_status_code rtems_clock_set( - rtems_time_of_day *time_buffer -) -{ - rtems_interval seconds; - - if ( _TOD_Validate( time_buffer ) ) { - seconds = _TOD_To_seconds( time_buffer ); - _Thread_Disable_dispatch(); - _TOD_Set( time_buffer, seconds ); - _Thread_Enable_dispatch(); - return RTEMS_SUCCESSFUL; - } - return RTEMS_INVALID_CLOCK; -} - -/*PAGE - * - * rtems_clock_tick - * - * This directive notifies the executve that a tick has occurred. - * When the tick occurs the time manager updates and maintains - * the calendar time, timeslicing, and any timeout delays. - * - * Input parameters: NONE - * - * Output parameters: - * RTEMS_SUCCESSFUL - always succeeds - * - * NOTE: This routine only works for leap-years through 2099. - */ - -rtems_status_code rtems_clock_tick( void ) -{ - _TOD_Tickle_ticks(); - - _Watchdog_Tickle_ticks(); - - _Thread_Tickle_timeslice(); - - if ( _Thread_Is_context_switch_necessary() && - _Thread_Is_dispatching_enabled() ) - _Thread_Dispatch(); - - return RTEMS_SUCCESSFUL; -} diff --git a/c/src/exec/rtems/src/rtemstimer.c b/c/src/exec/rtems/src/rtemstimer.c deleted file mode 100644 index 40ee526f26..0000000000 --- a/c/src/exec/rtems/src/rtemstimer.c +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Timer Manager - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -/*PAGE - * - * _Timer_Manager_initialization - * - * This routine initializes all timer manager related data structures. - * - * Input parameters: - * maximum_timers - number of timers to initialize - * - * Output parameters: NONE - */ - -void _Timer_Manager_initialization( - unsigned32 maximum_timers -) -{ - _Objects_Initialize_information( - &_Timer_Information, - OBJECTS_RTEMS_TIMERS, - FALSE, - maximum_timers, - sizeof( Timer_Control ), - FALSE, - RTEMS_MAXIMUM_NAME_LENGTH, - FALSE - ); -} - -/*PAGE - * - * rtems_timer_create - * - * This directive creates a timer and performs some initialization. - * - * Input parameters: - * name - timer name - * id - pointer to timer id - * - * Output parameters: - * id - timer id - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful - */ - -rtems_status_code rtems_timer_create( - rtems_name name, - Objects_Id *id -) -{ - Timer_Control *the_timer; - - if ( !rtems_is_name_valid( name ) ) - return RTEMS_INVALID_NAME; - - _Thread_Disable_dispatch(); /* to prevent deletion */ - - the_timer = _Timer_Allocate(); - - if ( !the_timer ) { - _Thread_Enable_dispatch(); - return RTEMS_TOO_MANY; - } - - the_timer->the_class = TIMER_DORMANT; - - _Objects_Open( &_Timer_Information, &the_timer->Object, &name ); - - *id = the_timer->Object.id; - _Thread_Enable_dispatch(); - return RTEMS_SUCCESSFUL; -} - -/*PAGE - * - * rtems_timer_ident - * - * This directive returns the system ID associated with - * the timer name. - * - * Input parameters: - * name - user defined message queue name - * id - pointer to timer id - * - * Output parameters: - * *id - message queue id - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful - */ - -rtems_status_code rtems_timer_ident( - rtems_name name, - Objects_Id *id -) -{ - Objects_Name_to_id_errors status; - - status = _Objects_Name_to_id( - &_Timer_Information, - &name, - OBJECTS_SEARCH_LOCAL_NODE, - id - ); - - return _Status_Object_name_errors_to_status[ status ]; -} - -/*PAGE - * - * rtems_timer_cancel - * - * This directive allows a thread to cancel a timer. - * - * Input parameters: - * id - timer id - * - * Output parameters: - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful - */ - -rtems_status_code rtems_timer_cancel( - Objects_Id id -) -{ - Timer_Control *the_timer; - Objects_Locations location; - - the_timer = _Timer_Get( id, &location ); - switch ( location ) { - case OBJECTS_ERROR: - return RTEMS_INVALID_ID; - case OBJECTS_REMOTE: /* should never return this */ - return RTEMS_INTERNAL_ERROR; - case OBJECTS_LOCAL: - if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) - (void) _Watchdog_Remove( &the_timer->Ticker ); - _Thread_Enable_dispatch(); - return RTEMS_SUCCESSFUL; - } - - return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ -} - -/*PAGE - * - * rtems_timer_delete - * - * This directive allows a thread to delete a timer. - * - * Input parameters: - * id - timer id - * - * Output parameters: - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful - */ - -rtems_status_code rtems_timer_delete( - Objects_Id id -) -{ - Timer_Control *the_timer; - Objects_Locations location; - - the_timer = _Timer_Get( id, &location ); - switch ( location ) { - case OBJECTS_ERROR: - return RTEMS_INVALID_ID; - case OBJECTS_REMOTE: /* should never return this */ - return RTEMS_INTERNAL_ERROR; - case OBJECTS_LOCAL: - _Objects_Close( &_Timer_Information, &the_timer->Object ); - (void) _Watchdog_Remove( &the_timer->Ticker ); - _Timer_Free( the_timer ); - _Thread_Enable_dispatch(); - return RTEMS_SUCCESSFUL; - } - - return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ -} - -/*PAGE - * - * rtems_timer_fire_after - * - * This directive allows a thread to start a timer. - * - * Input parameters: - * id - timer id - * ticks - interval until routine is fired - * routine - routine to schedule - * - * Output parameters: - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful - */ - -rtems_status_code rtems_timer_fire_after( - Objects_Id id, - rtems_interval ticks, - rtems_timer_service_routine_entry routine, - void *user_data -) -{ - Timer_Control *the_timer; - Objects_Locations location; - - if ( ticks == 0 ) - return RTEMS_INVALID_NUMBER; - - the_timer = _Timer_Get( id, &location ); - switch ( location ) { - case OBJECTS_ERROR: - return RTEMS_INVALID_ID; - case OBJECTS_REMOTE: /* should never return this */ - return RTEMS_INTERNAL_ERROR; - case OBJECTS_LOCAL: - (void) _Watchdog_Remove( &the_timer->Ticker ); - the_timer->the_class = TIMER_INTERVAL; - _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); - _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); - _Thread_Enable_dispatch(); - return RTEMS_SUCCESSFUL; - } - - return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ -} - -/*PAGE - * - * rtems_timer_fire_when - * - * This directive allows a thread to start a timer. - * - * Input parameters: - * id - timer id - * wall_time - time of day to fire timer - * routine - routine to schedule - * - * Output parameters: - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful - */ - -rtems_status_code rtems_timer_fire_when( - Objects_Id id, - rtems_time_of_day *wall_time, - rtems_timer_service_routine_entry routine, - void *user_data -) -{ - Timer_Control *the_timer; - Objects_Locations location; - rtems_interval seconds; - - if ( !_TOD_Is_set ) - return RTEMS_NOT_DEFINED; - - if ( !_TOD_Validate( wall_time ) ) - return RTEMS_INVALID_CLOCK; - - seconds = _TOD_To_seconds( wall_time ); - if ( seconds <= _TOD_Seconds_since_epoch ) - return RTEMS_INVALID_CLOCK; - - the_timer = _Timer_Get( id, &location ); - switch ( location ) { - case OBJECTS_ERROR: - return RTEMS_INVALID_ID; - case OBJECTS_REMOTE: /* should never return this */ - return RTEMS_INTERNAL_ERROR; - case OBJECTS_LOCAL: - (void) _Watchdog_Remove( &the_timer->Ticker ); - the_timer->the_class = TIMER_TIME_OF_DAY; - _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); - _Watchdog_Insert_seconds( - &the_timer->Ticker, - seconds - _TOD_Seconds_since_epoch - ); - _Thread_Enable_dispatch(); - return RTEMS_SUCCESSFUL; - } - - return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ -} - -/*PAGE - * - * rtems_timer_reset - * - * This directive allows a thread to reset a timer. - * - * Input parameters: - * id - timer id - * - * Output parameters: - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful - */ - -rtems_status_code rtems_timer_reset( - Objects_Id id -) -{ - Timer_Control *the_timer; - Objects_Locations location; - - the_timer = _Timer_Get( id, &location ); - switch ( location ) { - case OBJECTS_ERROR: - return RTEMS_INVALID_ID; - case OBJECTS_REMOTE: /* should never return this */ - return RTEMS_INTERNAL_ERROR; - case OBJECTS_LOCAL: - if ( _Timer_Is_interval_class( the_timer->the_class ) ) { - _Watchdog_Reset( &the_timer->Ticker ); - _Thread_Enable_dispatch(); - return RTEMS_SUCCESSFUL; - } - _Thread_Enable_dispatch(); - return RTEMS_NOT_DEFINED; - } - - return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ -} diff --git a/c/src/exec/sapi/headers/confdefs.h b/c/src/exec/sapi/headers/confdefs.h deleted file mode 100644 index aa2d0e8bdd..0000000000 --- a/c/src/exec/sapi/headers/confdefs.h +++ /dev/null @@ -1,485 +0,0 @@ -/* confdefs.h - * - * This include file contains the configuration table template that will - * be used by the single processor tests to define its default configuration - * parameters. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __CONFIGURATION_TEMPLATE_h -#define __CONFIGURATION_TEMPLATE_h - -#ifdef __cplusplus -extern "C" { -#endif - -extern rtems_initialization_tasks_table Initialization_tasks[]; -extern rtems_driver_address_table Device_drivers[]; -extern rtems_configuration_table Configuration; -extern rtems_multiprocessing_table Multiprocessing_configuration; -#ifdef RTEMS_POSIX_API -extern posix_api_configuration_table Configuration_POSIX_API; -#endif - -/* - * Default User Initialization Task Table. This table guarantees that - * one user initialization table is defined. - */ - -#ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE - -/* - * The user is defining their own table information and setting the - * appropriate variables. - */ - -#else - -#ifndef CONFIGURE_INIT_TASK_NAME -#define CONFIGURE_INIT_TASK_NAME rtems_build_name( 'U', 'I', '1', ' ' ) -#endif - -#ifndef CONFIGURE_INIT_TASK_STACK_SIZE -#define CONFIGURE_INIT_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE -#endif - -#ifndef CONFIGURE_INIT_TASK_PRIORITY -#define CONFIGURE_INIT_TASK_PRIORITY 1 -#endif - -#ifndef CONFIGURE_INIT_TASK_ATTRIBUTES -#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES -#endif - -#ifndef CONFIGURE_INIT_TASK_ENTRY_POINT -#define CONFIGURE_INIT_TASK_ENTRY_POINT Init -#endif - -#ifndef CONFIGURE_INIT_TASK_INITIAL_MODES -#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT -#endif - -#ifndef CONFIGURE_INIT_TASK_ARGUMENTS -#define CONFIGURE_INIT_TASK_ARGUMENTS 0 -#endif - -#ifdef CONFIGURE_INIT -rtems_initialization_tasks_table Initialization_tasks[] = { - { CONFIGURE_INIT_TASK_NAME, - CONFIGURE_INIT_TASK_STACK_SIZE, - CONFIGURE_INIT_TASK_PRIORITY, - CONFIGURE_INIT_TASK_ATTRIBUTES, - CONFIGURE_INIT_TASK_ENTRY_POINT, - CONFIGURE_INIT_TASK_INITIAL_MODES, - CONFIGURE_INIT_TASK_ARGUMENTS - } -}; -#endif - -#define CONFIGURE_INIT_TASK_TABLE Initialization_tasks - -#define CONFIGURE_INIT_TASK_TABLE_SIZE \ - sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table) - -#endif /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */ - -#else /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */ - -#define CONFIGURE_INIT_TASK_TABLE NULL -#define CONFIGURE_INIT_TASK_TABLE_SIZE 0 - -#endif - -/* - * Default Device Driver Table. Each driver needed by the test is explicitly - * choosen by that test. There is always a null driver entry. - */ - -#define NULL_DRIVER_TABLE_ENTRY \ - { NULL, NULL, NULL, NULL, NULL, NULL } - -#ifdef CONFIGURE_TEST_NEEDS_TIMER_DRIVER -#include -#endif - -#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER -#include -#endif - -#ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE - -#ifdef CONFIGURE_INIT -rtems_driver_address_table Device_drivers[] = { -#ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER - CONSOLE_DRIVER_TABLE_ENTRY, -#endif -#ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER - CLOCK_DRIVER_TABLE_ENTRY, -#endif -#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER - STUB_DRIVER_TABLE_ENTRY, -#endif - NULL_DRIVER_TABLE_ENTRY -}; -#endif - -#endif /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */ - -/* - * Default the number of devices per device driver. This value may be - * overridden by the user. - */ - -#ifndef CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES - -#ifndef CONFIGURE_MAXIMUM_DEVICES -#define CONFIGURE_MAXIMUM_DEVICES 20 -#endif - -#endif /* CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES */ - -/* - * Default Configuration Table. This table contains the most values set in - * the RTEMS Test Suite. Each value may be overridden within each test to - * customize the environment. - */ - -#ifdef CONFIGURE_MPTEST -#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE - -#ifndef CONFIGURE_MP_NODE_NUMBER -#define CONFIGURE_MP_NODE_NUMBER NODE_NUMBER -#endif - -#ifndef CONFIGURE_MP_MAXIMUM_NODES -#define CONFIGURE_MP_MAXIMUM_NODES 2 -#endif - -#ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS -#define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 32 -#endif - -#ifndef CONFIGURE_MP_MAXIMUM_PROXIES -#define CONFIGURE_MP_MAXIMUM_PROXIES 32 -#endif - -#ifndef CONFIGURE_MP_MPCI_TABLE_POINTER -#include -#define CONFIGURE_MP_MPCI_TABLE_POINTER &MPCI_table -#endif - -#ifdef CONFIGURE_INIT -rtems_multiprocessing_table Multiprocessing_configuration = { - CONFIGURE_MP_NODE_NUMBER, /* local node number */ - CONFIGURE_MP_MAXIMUM_NODES, /* maximum # nodes in system */ - CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS, /* maximum # global objects */ - CONFIGURE_MP_MAXIMUM_PROXIES, /* maximum # proxies */ - CONFIGURE_MP_MPCI_TABLE_POINTER /* pointer to MPCI config table */ -}; -#endif - -#define CONFIGURE_MULTIPROCESSING_TABLE &Multiprocessing_configuration - -#endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */ - -#else - -#define CONFIGURE_MULTIPROCESSING_TABLE NULL - -#endif /* CONFIGURE_MPTEST */ - -/* - * Default Configuration Table. This table contains the most values set in - * the RTEMS Test Suite. Each value may be overridden within each test to - * customize the environment. - */ - -#ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE - -#ifndef CONFIGURE_EXECUTIVE_RAM_WORK_AREA -#define CONFIGURE_EXECUTIVE_RAM_WORK_AREA NULL -#endif - -#ifndef CONFIGURE_MAXIMUM_TASKS -#define CONFIGURE_MAXIMUM_TASKS 10 -#endif - -#ifndef CONFIGURE_MAXIMUM_TIMERS -#define CONFIGURE_MAXIMUM_TIMERS 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_SEMAPHORES -#define CONFIGURE_MAXIMUM_SEMAPHORES 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES -#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_PARTITIONS -#define CONFIGURE_MAXIMUM_PARTITIONS 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_REGIONS -#define CONFIGURE_MAXIMUM_REGIONS 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_PORTS -#define CONFIGURE_MAXIMUM_PORTS 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_PERIODS -#define CONFIGURE_MAXIMUM_PERIODS 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS -#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0 -#endif - -#ifndef CONFIGURE_MICROSECONDS_PER_TICK -#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(10) -#endif - -#ifndef CONFIGURE_TICKS_PER_TIMESLICE -#define CONFIGURE_TICKS_PER_TIMESLICE 50 -#endif - -#ifndef CONFIGURE_INITIAL_EXTENSIONS -#define CONFIGURE_INITIAL_EXTENSIONS NULL -#endif - -/* - * POSIX API Configuration Parameters - */ - -#ifdef RTEMS_POSIX_API - -#ifndef CONFIGURE_MAXIMUM_POSIX_THREADS -#define CONFIGURE_MAXIMUM_POSIX_THREADS 10 -#endif - -#ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES -#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES -#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_POSIX_KEYS -#define CONFIGURE_MAXIMUM_POSIX_KEYS 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS -#define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0 -#endif - -#ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE - -#ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE - -/* - * The user is defining their own table information and setting the - * appropriate variables. - */ - -#else - -#ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT -#define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT POSIX_Init -#endif - -#ifdef CONFIGURE_INIT -posix_initialization_threads_table POSIX_Initialization_threads[] = { - { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT } -}; -#endif - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME POSIX_Initialization_threads - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \ - sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \ - sizeof(posix_initialization_threads_table) - -#endif /* CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */ - -#else /* CONFIGURE_POSIX_INIT_THREAD_TABLE */ - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL -#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0 - -#endif - -#endif /* RTEMS_POSIX_API */ - -/* - * Calculate the RAM size based on the maximum number of objects configured. - * The model is to estimate the memory required for each configured item, - * sum the memory requirements and insure that there is at least 32K greater - * than that for things not directly addressed such as: - * - * + stacks greater than minimum size - * + FP contexts - * + API areas (should be optional) - * + messages - * + object name and local pointer table overhead - * + per node memory requirements - * + executive fixed requirements (including at least internal threads - * and the Ready chains) - * - * NOTE: Eventually this should take into account some of the above. - * Basically, this is a "back of the envelope" estimate for - * memory requirements. It could be more accurate. - */ - -#ifndef CONFIGURE_EXECUTIVE_RAM_SIZE - -#define CONFIGURE_OBJECT_TABLE_STUFF \ - ( sizeof(Objects_Control *) + sizeof(rtems_name *) + sizeof(rtems_name) ) - -#define CONFIGURE_MEMORY_FOR_TASKS(_tasks) \ - ((_tasks) * \ - ((sizeof(Thread_Control) + CONTEXT_FP_SIZE + \ - STACK_MINIMUM_SIZE + sizeof( RTEMS_API_Control ) + \ - CONFIGURE_OBJECT_TABLE_STUFF)) \ - ) - -#define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \ - ((_timers) * ( sizeof(Timer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) - -#define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \ - ((_semaphores) * \ - ( sizeof(Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) - -#define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \ - ( (_queues) * \ - ( sizeof(Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) - -#define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \ - ( (_partitions) * \ - ( sizeof(Partition_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) - -#define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \ - ( (_regions) * \ - ( sizeof(Region_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) - -#define CONFIGURE_MEMORY_FOR_PORTS(_ports) \ - ( (_ports) * \ - ( sizeof(Dual_ported_memory_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) - -#define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \ - ( (_periods) * \ - ( sizeof(Rate_monotonic_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) - -#define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \ - ( (_extensions) * \ - ( sizeof(Extension_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) - -#define CONFIGURE_MEMORY_FOR_DEVICES(_devices) \ - (((_devices) + 1) * ( sizeof(rtems_driver_name_t) ) ) - -#ifdef CONFIGURE_MPTEST - -#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE - -#define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \ - ( ((_proxies) + 1) * ( sizeof(Thread_Proxy_control) ) ) - -#define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \ - ((_global_objects) * ( sizeof(Objects_MP_Control) ) ) - -#define CONFIGURE_MEMORY_FOR_MP \ - ( CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \ - CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) \ - ) - -#endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */ - -#else - -#define CONFIGURE_MEMORY_FOR_MP 0 - -#endif -#define CONFIGURE_EXECUTIVE_RAM_SIZE \ -(( CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS) + \ - CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \ - CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \ - CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \ - CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \ - CONFIGURE_MEMORY_FOR_REGIONS(CONFIGURE_MAXIMUM_REGIONS) + \ - CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \ - CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \ - CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) + \ - CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \ - CONFIGURE_MEMORY_FOR_MP + \ - (96*1024) \ -) & 0xffff8000) -#endif - -#ifdef CONFIGURE_INIT - -rtems_api_configuration_table Configuration_RTEMS_API = { - CONFIGURE_MAXIMUM_TASKS, - CONFIGURE_MAXIMUM_TIMERS, - CONFIGURE_MAXIMUM_SEMAPHORES, - CONFIGURE_MAXIMUM_MESSAGE_QUEUES, - CONFIGURE_MAXIMUM_PARTITIONS, - CONFIGURE_MAXIMUM_REGIONS, - CONFIGURE_MAXIMUM_PORTS, - CONFIGURE_MAXIMUM_PERIODS, - CONFIGURE_INIT_TASK_TABLE_SIZE, - CONFIGURE_INIT_TASK_TABLE -}; - -#ifdef RTEMS_POSIX_API -posix_api_configuration_table Configuration_POSIX_API = { - CONFIGURE_MAXIMUM_POSIX_THREADS, - CONFIGURE_MAXIMUM_POSIX_MUTEXES, - CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES, - CONFIGURE_MAXIMUM_POSIX_KEYS, - CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS, - CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE, - CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME -}; -#endif - -rtems_configuration_table Configuration = { - CONFIGURE_EXECUTIVE_RAM_WORK_AREA, - CONFIGURE_EXECUTIVE_RAM_SIZE, - CONFIGURE_MAXIMUM_USER_EXTENSIONS, - CONFIGURE_MICROSECONDS_PER_TICK, - CONFIGURE_TICKS_PER_TIMESLICE, - CONFIGURE_MAXIMUM_DEVICES, - sizeof (Device_drivers)/ - sizeof(rtems_driver_address_table), /* number of device drivers */ - Device_drivers, /* pointer to driver table */ - CONFIGURE_INITIAL_EXTENSIONS, /* pointer to initial extensions */ - CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */ - &Configuration_RTEMS_API, /* pointer to RTEMS API config */ -#ifdef RTEMS_POSIX_API - &Configuration_POSIX_API /* pointer to POSIX API config */ -#else - NULL /* pointer to POSIX API config */ -#endif -}; -#endif - -#endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */ - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/sapi/include/confdefs.h b/c/src/exec/sapi/include/confdefs.h deleted file mode 100644 index aa2d0e8bdd..0000000000 --- a/c/src/exec/sapi/include/confdefs.h +++ /dev/null @@ -1,485 +0,0 @@ -/* confdefs.h - * - * This include file contains the configuration table template that will - * be used by the single processor tests to define its default configuration - * parameters. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __CONFIGURATION_TEMPLATE_h -#define __CONFIGURATION_TEMPLATE_h - -#ifdef __cplusplus -extern "C" { -#endif - -extern rtems_initialization_tasks_table Initialization_tasks[]; -extern rtems_driver_address_table Device_drivers[]; -extern rtems_configuration_table Configuration; -extern rtems_multiprocessing_table Multiprocessing_configuration; -#ifdef RTEMS_POSIX_API -extern posix_api_configuration_table Configuration_POSIX_API; -#endif - -/* - * Default User Initialization Task Table. This table guarantees that - * one user initialization table is defined. - */ - -#ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE - -/* - * The user is defining their own table information and setting the - * appropriate variables. - */ - -#else - -#ifndef CONFIGURE_INIT_TASK_NAME -#define CONFIGURE_INIT_TASK_NAME rtems_build_name( 'U', 'I', '1', ' ' ) -#endif - -#ifndef CONFIGURE_INIT_TASK_STACK_SIZE -#define CONFIGURE_INIT_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE -#endif - -#ifndef CONFIGURE_INIT_TASK_PRIORITY -#define CONFIGURE_INIT_TASK_PRIORITY 1 -#endif - -#ifndef CONFIGURE_INIT_TASK_ATTRIBUTES -#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES -#endif - -#ifndef CONFIGURE_INIT_TASK_ENTRY_POINT -#define CONFIGURE_INIT_TASK_ENTRY_POINT Init -#endif - -#ifndef CONFIGURE_INIT_TASK_INITIAL_MODES -#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT -#endif - -#ifndef CONFIGURE_INIT_TASK_ARGUMENTS -#define CONFIGURE_INIT_TASK_ARGUMENTS 0 -#endif - -#ifdef CONFIGURE_INIT -rtems_initialization_tasks_table Initialization_tasks[] = { - { CONFIGURE_INIT_TASK_NAME, - CONFIGURE_INIT_TASK_STACK_SIZE, - CONFIGURE_INIT_TASK_PRIORITY, - CONFIGURE_INIT_TASK_ATTRIBUTES, - CONFIGURE_INIT_TASK_ENTRY_POINT, - CONFIGURE_INIT_TASK_INITIAL_MODES, - CONFIGURE_INIT_TASK_ARGUMENTS - } -}; -#endif - -#define CONFIGURE_INIT_TASK_TABLE Initialization_tasks - -#define CONFIGURE_INIT_TASK_TABLE_SIZE \ - sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table) - -#endif /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */ - -#else /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */ - -#define CONFIGURE_INIT_TASK_TABLE NULL -#define CONFIGURE_INIT_TASK_TABLE_SIZE 0 - -#endif - -/* - * Default Device Driver Table. Each driver needed by the test is explicitly - * choosen by that test. There is always a null driver entry. - */ - -#define NULL_DRIVER_TABLE_ENTRY \ - { NULL, NULL, NULL, NULL, NULL, NULL } - -#ifdef CONFIGURE_TEST_NEEDS_TIMER_DRIVER -#include -#endif - -#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER -#include -#endif - -#ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE - -#ifdef CONFIGURE_INIT -rtems_driver_address_table Device_drivers[] = { -#ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER - CONSOLE_DRIVER_TABLE_ENTRY, -#endif -#ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER - CLOCK_DRIVER_TABLE_ENTRY, -#endif -#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER - STUB_DRIVER_TABLE_ENTRY, -#endif - NULL_DRIVER_TABLE_ENTRY -}; -#endif - -#endif /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */ - -/* - * Default the number of devices per device driver. This value may be - * overridden by the user. - */ - -#ifndef CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES - -#ifndef CONFIGURE_MAXIMUM_DEVICES -#define CONFIGURE_MAXIMUM_DEVICES 20 -#endif - -#endif /* CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES */ - -/* - * Default Configuration Table. This table contains the most values set in - * the RTEMS Test Suite. Each value may be overridden within each test to - * customize the environment. - */ - -#ifdef CONFIGURE_MPTEST -#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE - -#ifndef CONFIGURE_MP_NODE_NUMBER -#define CONFIGURE_MP_NODE_NUMBER NODE_NUMBER -#endif - -#ifndef CONFIGURE_MP_MAXIMUM_NODES -#define CONFIGURE_MP_MAXIMUM_NODES 2 -#endif - -#ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS -#define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 32 -#endif - -#ifndef CONFIGURE_MP_MAXIMUM_PROXIES -#define CONFIGURE_MP_MAXIMUM_PROXIES 32 -#endif - -#ifndef CONFIGURE_MP_MPCI_TABLE_POINTER -#include -#define CONFIGURE_MP_MPCI_TABLE_POINTER &MPCI_table -#endif - -#ifdef CONFIGURE_INIT -rtems_multiprocessing_table Multiprocessing_configuration = { - CONFIGURE_MP_NODE_NUMBER, /* local node number */ - CONFIGURE_MP_MAXIMUM_NODES, /* maximum # nodes in system */ - CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS, /* maximum # global objects */ - CONFIGURE_MP_MAXIMUM_PROXIES, /* maximum # proxies */ - CONFIGURE_MP_MPCI_TABLE_POINTER /* pointer to MPCI config table */ -}; -#endif - -#define CONFIGURE_MULTIPROCESSING_TABLE &Multiprocessing_configuration - -#endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */ - -#else - -#define CONFIGURE_MULTIPROCESSING_TABLE NULL - -#endif /* CONFIGURE_MPTEST */ - -/* - * Default Configuration Table. This table contains the most values set in - * the RTEMS Test Suite. Each value may be overridden within each test to - * customize the environment. - */ - -#ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE - -#ifndef CONFIGURE_EXECUTIVE_RAM_WORK_AREA -#define CONFIGURE_EXECUTIVE_RAM_WORK_AREA NULL -#endif - -#ifndef CONFIGURE_MAXIMUM_TASKS -#define CONFIGURE_MAXIMUM_TASKS 10 -#endif - -#ifndef CONFIGURE_MAXIMUM_TIMERS -#define CONFIGURE_MAXIMUM_TIMERS 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_SEMAPHORES -#define CONFIGURE_MAXIMUM_SEMAPHORES 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES -#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_PARTITIONS -#define CONFIGURE_MAXIMUM_PARTITIONS 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_REGIONS -#define CONFIGURE_MAXIMUM_REGIONS 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_PORTS -#define CONFIGURE_MAXIMUM_PORTS 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_PERIODS -#define CONFIGURE_MAXIMUM_PERIODS 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS -#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0 -#endif - -#ifndef CONFIGURE_MICROSECONDS_PER_TICK -#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(10) -#endif - -#ifndef CONFIGURE_TICKS_PER_TIMESLICE -#define CONFIGURE_TICKS_PER_TIMESLICE 50 -#endif - -#ifndef CONFIGURE_INITIAL_EXTENSIONS -#define CONFIGURE_INITIAL_EXTENSIONS NULL -#endif - -/* - * POSIX API Configuration Parameters - */ - -#ifdef RTEMS_POSIX_API - -#ifndef CONFIGURE_MAXIMUM_POSIX_THREADS -#define CONFIGURE_MAXIMUM_POSIX_THREADS 10 -#endif - -#ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES -#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES -#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_POSIX_KEYS -#define CONFIGURE_MAXIMUM_POSIX_KEYS 0 -#endif - -#ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS -#define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0 -#endif - -#ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE - -#ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE - -/* - * The user is defining their own table information and setting the - * appropriate variables. - */ - -#else - -#ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT -#define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT POSIX_Init -#endif - -#ifdef CONFIGURE_INIT -posix_initialization_threads_table POSIX_Initialization_threads[] = { - { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT } -}; -#endif - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME POSIX_Initialization_threads - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \ - sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \ - sizeof(posix_initialization_threads_table) - -#endif /* CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */ - -#else /* CONFIGURE_POSIX_INIT_THREAD_TABLE */ - -#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL -#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0 - -#endif - -#endif /* RTEMS_POSIX_API */ - -/* - * Calculate the RAM size based on the maximum number of objects configured. - * The model is to estimate the memory required for each configured item, - * sum the memory requirements and insure that there is at least 32K greater - * than that for things not directly addressed such as: - * - * + stacks greater than minimum size - * + FP contexts - * + API areas (should be optional) - * + messages - * + object name and local pointer table overhead - * + per node memory requirements - * + executive fixed requirements (including at least internal threads - * and the Ready chains) - * - * NOTE: Eventually this should take into account some of the above. - * Basically, this is a "back of the envelope" estimate for - * memory requirements. It could be more accurate. - */ - -#ifndef CONFIGURE_EXECUTIVE_RAM_SIZE - -#define CONFIGURE_OBJECT_TABLE_STUFF \ - ( sizeof(Objects_Control *) + sizeof(rtems_name *) + sizeof(rtems_name) ) - -#define CONFIGURE_MEMORY_FOR_TASKS(_tasks) \ - ((_tasks) * \ - ((sizeof(Thread_Control) + CONTEXT_FP_SIZE + \ - STACK_MINIMUM_SIZE + sizeof( RTEMS_API_Control ) + \ - CONFIGURE_OBJECT_TABLE_STUFF)) \ - ) - -#define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \ - ((_timers) * ( sizeof(Timer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) - -#define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \ - ((_semaphores) * \ - ( sizeof(Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) - -#define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \ - ( (_queues) * \ - ( sizeof(Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) - -#define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \ - ( (_partitions) * \ - ( sizeof(Partition_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) - -#define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \ - ( (_regions) * \ - ( sizeof(Region_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) - -#define CONFIGURE_MEMORY_FOR_PORTS(_ports) \ - ( (_ports) * \ - ( sizeof(Dual_ported_memory_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) - -#define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \ - ( (_periods) * \ - ( sizeof(Rate_monotonic_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) - -#define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \ - ( (_extensions) * \ - ( sizeof(Extension_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) - -#define CONFIGURE_MEMORY_FOR_DEVICES(_devices) \ - (((_devices) + 1) * ( sizeof(rtems_driver_name_t) ) ) - -#ifdef CONFIGURE_MPTEST - -#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE - -#define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \ - ( ((_proxies) + 1) * ( sizeof(Thread_Proxy_control) ) ) - -#define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \ - ((_global_objects) * ( sizeof(Objects_MP_Control) ) ) - -#define CONFIGURE_MEMORY_FOR_MP \ - ( CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \ - CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) \ - ) - -#endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */ - -#else - -#define CONFIGURE_MEMORY_FOR_MP 0 - -#endif -#define CONFIGURE_EXECUTIVE_RAM_SIZE \ -(( CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS) + \ - CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \ - CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \ - CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \ - CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \ - CONFIGURE_MEMORY_FOR_REGIONS(CONFIGURE_MAXIMUM_REGIONS) + \ - CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \ - CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \ - CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) + \ - CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \ - CONFIGURE_MEMORY_FOR_MP + \ - (96*1024) \ -) & 0xffff8000) -#endif - -#ifdef CONFIGURE_INIT - -rtems_api_configuration_table Configuration_RTEMS_API = { - CONFIGURE_MAXIMUM_TASKS, - CONFIGURE_MAXIMUM_TIMERS, - CONFIGURE_MAXIMUM_SEMAPHORES, - CONFIGURE_MAXIMUM_MESSAGE_QUEUES, - CONFIGURE_MAXIMUM_PARTITIONS, - CONFIGURE_MAXIMUM_REGIONS, - CONFIGURE_MAXIMUM_PORTS, - CONFIGURE_MAXIMUM_PERIODS, - CONFIGURE_INIT_TASK_TABLE_SIZE, - CONFIGURE_INIT_TASK_TABLE -}; - -#ifdef RTEMS_POSIX_API -posix_api_configuration_table Configuration_POSIX_API = { - CONFIGURE_MAXIMUM_POSIX_THREADS, - CONFIGURE_MAXIMUM_POSIX_MUTEXES, - CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES, - CONFIGURE_MAXIMUM_POSIX_KEYS, - CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS, - CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE, - CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME -}; -#endif - -rtems_configuration_table Configuration = { - CONFIGURE_EXECUTIVE_RAM_WORK_AREA, - CONFIGURE_EXECUTIVE_RAM_SIZE, - CONFIGURE_MAXIMUM_USER_EXTENSIONS, - CONFIGURE_MICROSECONDS_PER_TICK, - CONFIGURE_TICKS_PER_TIMESLICE, - CONFIGURE_MAXIMUM_DEVICES, - sizeof (Device_drivers)/ - sizeof(rtems_driver_address_table), /* number of device drivers */ - Device_drivers, /* pointer to driver table */ - CONFIGURE_INITIAL_EXTENSIONS, /* pointer to initial extensions */ - CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */ - &Configuration_RTEMS_API, /* pointer to RTEMS API config */ -#ifdef RTEMS_POSIX_API - &Configuration_POSIX_API /* pointer to POSIX API config */ -#else - NULL /* pointer to POSIX API config */ -#endif -}; -#endif - -#endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */ - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/sapi/include/rtems/config.h b/c/src/exec/sapi/include/rtems/config.h deleted file mode 100644 index 19a8edeb0f..0000000000 --- a/c/src/exec/sapi/include/rtems/config.h +++ /dev/null @@ -1,103 +0,0 @@ -/* config.h - * - * This include file contains the table of user defined configuration - * parameters. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_CONFIGURATION_h -#define __RTEMS_CONFIGURATION_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This is kind of kludgy but it allows targets to totally ignore the - * POSIX API safely. - */ - -#ifdef RTEMS_POSIX_API -#include -#else - -typedef void *posix_api_configuration_table; -#endif - -#include - -/* XXX should cover these -#include -#include -#include -*/ - -#include -#include -#include - -/* - * The following records define the Multiprocessor Configuration - * Table. This table defines the multiprocessor system - * characteristics which must be known by RTEMS in a multiprocessor - * system. - */ - -typedef struct { - unsigned32 node; /* local node number */ - unsigned32 maximum_nodes; /* maximum # nodes in system */ - unsigned32 maximum_global_objects; /* maximum # global objects */ - unsigned32 maximum_proxies; /* maximum # proxies */ - MPCI_Control *User_mpci_table; /* pointer to MPCI table */ -} rtems_multiprocessing_table; - -/* - * The following records define the Configuration Table. The - * information contained in this table is required in all - * RTEMS systems, whether single or multiprocessor. This - * table primarily defines the following: - * - * + location and size of the RTEMS Workspace - * + microseconds per clock tick - * + clock ticks per task timeslice - * + required number of each object type for each API configured - */ - -typedef struct { - void *work_space_start; - unsigned32 work_space_size; - unsigned32 maximum_extensions; - unsigned32 microseconds_per_tick; - unsigned32 ticks_per_timeslice; - unsigned32 maximum_devices; - unsigned32 number_of_device_drivers; - rtems_driver_address_table *Device_driver_table; - rtems_extensions_table *User_extension_table; - rtems_multiprocessing_table *User_multiprocessing_table; - rtems_api_configuration_table *RTEMS_api_configuration; - posix_api_configuration_table *POSIX_api_configuration; -} rtems_configuration_table; - -/* - * The following are provided strictly for the convenience of - * the user. They are not used in RTEMS itself. - */ - -SAPI_EXTERN rtems_configuration_table *_Configuration_Table; -SAPI_EXTERN rtems_multiprocessing_table *_Configuration_MP_table; - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/sapi/include/rtems/directives.h b/c/src/exec/sapi/include/rtems/directives.h deleted file mode 100644 index 938cf68460..0000000000 --- a/c/src/exec/sapi/include/rtems/directives.h +++ /dev/null @@ -1,120 +0,0 @@ -/* directives.h - * - * The following definitions are the directive numbers used - * in the assembly interface. - * - * COPYRIGHT (c) 19891990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_DIRECTIVES_h -#define __RTEMS_DIRECTIVES_h - -#ifdef __cplusplus -extern "C" { -#endif - -#define RTEMS_INITIALIZE_EXECUTIVE 0 -#define RTEMS_INITIALIZE_EXECUTIVE_EARLY 1 -#define RTEMS_INITIALIZE_EXECUTIVE_LATE 2 -#define RTEMS_SHUTDOWN_EXECUTIVE 3 -#define RTEMS_TASKS_CREATE 4 -#define RTEMS_TASKS_NAME_TO_ID 5 -#define RTEMS_TASKS_START 6 -#define RTEMS_TASKS_RESTART 7 -#define RTEMS_TASKS_DELETE 8 -#define RTEMS_TASKS_SUSPEND 9 -#define RTEMS_TASKS_RESUME 10 -#define RTEMS_TASKS_SET_PRIORITY 11 -#define RTEMS_TASKS_MODE 12 -#define RTEMS_TASKS_GET_NOTE 13 -#define RTEMS_TASKS_SET_NOTE 14 -#define RTEMS_TASKS_WAKE_AFTER 15 -#define RTEMS_TASKS_WAKE_WHEN 16 -#define RTEMS_INTERRUPT_CATCH 17 -#define RTEMS_CLOCK_SET 18 -#define RTEMS_CLOCK_GET 19 -#define RTEMS_CLOCK_TICK 20 -#define RTEMS_EXTENSION_CREATE 21 -#define RTEMS_EXTENSION_NAME_TO_ID 22 -#define RTEMS_EXTENSION_DELETE 23 -#define RTEMS_TIMER_CREATE 24 -#define RTEMS_TIMER_NAME_TO_ID 25 -#define RTEMS_TIMER_CANCEL 26 -#define RTEMS_TIMER_DELETE 27 -#define RTEMS_TIMER_FIRE_AFTER 28 -#define RTEMS_TIMER_FIRE_WHEN 29 -#define RTEMS_TIMER_RESET 30 -#define RTEMS_SEMAPHORE_CREATE 31 -#define RTEMS_SEMAPHORE_NAME_TO_ID 32 -#define RTEMS_SEMAPHORE_DELETE 33 -#define RTEMS_SEMAPHORE_OBTAIN 34 -#define RTEMS_SEMAPHORE_RELEASE 35 -#define RTEMS_MESSAGE_QUEUE_CREATE 36 -#define RTEMS_MESSAGE_QUEUE_NAME_TO_ID 37 -#define RTEMS_MESSAGE_QUEUE_DELETE 38 -#define RTEMS_MESSAGE_QUEUE_SEND 39 -#define RTEMS_MESSAGE_QUEUE_URGENT 40 -#define RTEMS_MESSAGE_QUEUE_BROADCAST 41 -#define RTEMS_MESSAGE_QUEUE_RECEIVE 42 -#define RTEMS_MESSAGE_QUEUE_FLUSH 43 -#define RTEMS_EVENT_SEND 44 -#define RTEMS_EVENT_RECEIVE 45 -#define RTEMS_SIGNAL_CATCH 46 -#define RTEMS_SIGNAL_SEND 47 -#define RTEMS_PARTITION_CREATE 48 -#define RTEMS_PARTITION_NAME_TO_ID 49 -#define RTEMS_PARTITION_DELETE 50 -#define RTEMS_PARTITION_GET_BUFFER 51 -#define RTEMS_PARTITION_RETURN_BUFFER 52 -#define RTEMS_REGION_CREATE 53 -#define RTEMS_REGION_EXTEND 54 -#define RTEMS_REGION_NAME_TO_ID 55 -#define RTEMS_REGION_DELETE 56 -#define RTEMS_REGION_GET_SEGMENT_SIZE 57 -#define RTEMS_REGION_GET_SEGMENT 58 -#define RTEMS_REGION_RETURN_SEGMENT 59 -#define RTEMS_DUAL_PORTED_MEMORY_CREATE 60 -#define RTEMS_DUAL_PORTED_MEMORY_NAME_TO_ID 61 -#define RTEMS_DUAL_PORTED_MEMORY_DELETE 62 -#define RTEMS_DUAL_PORTED_MEMORY_EXTERNAL_TO_INTERNAL 63 -#define RTEMS_DUAL_PORTED_MEMORY_INTERNAL_TO_EXTERNAL 64 -#define RTEMS_IO_INITIALIZE 65 -#define RTEMS_IO_REGISTER_NAME 66 -#define RTEMS_IO_LOOKUP_NAME 67 -#define RTEMS_IO_OPEN 68 -#define RTEMS_IO_CLOSE 69 -#define RTEMS_IO_READ 70 -#define RTEMS_IO_WRITE 71 -#define RTEMS_IO_CONTROL 72 -#define RTEMS_FATAL_ERROR_OCCURRED 73 -#define RTEMS_RATE_MONOTONIC_CREATE 74 -#define RTEMS_RATE_MONOTONIC_NAME_TO_ID 75 -#define RTEMS_RATE_MONOTONIC_DELETE 76 -#define RTEMS_RATE_MONOTONIC_CANCEL 77 -#define RTEMS_RATE_MONOTONIC_PERIOD 78 -#define RTEMS_MULTIPROCESSING_ANNOUNCE 79 -#define RTEMS_DEBUG_ENABLE 80 -#define RTEMS_DEBUG_DISABLE 81 - -#define RTEMS_NUMBER_OF_ENTRY_POINTS 82 - -/* - * The jump table of entry points into RTEMS directives. - */ - -extern const void *_Entry_points[ RTEMS_NUMBER_OF_ENTRY_POINTS ]; - -#ifdef __cplusplus -} -#endif - -#endif -/* end of directives.h */ diff --git a/c/src/exec/sapi/include/rtems/extension.h b/c/src/exec/sapi/include/rtems/extension.h deleted file mode 100644 index ed95339348..0000000000 --- a/c/src/exec/sapi/include/rtems/extension.h +++ /dev/null @@ -1,136 +0,0 @@ -/* extension.h - * - * This include file contains all the constants, structures, and - * prototypes associated with the User Extension Manager. This manager - * provides a mechanism for manipulating sets of user-defined extensions. - * - * Directives provided are: - * - * + create user extension set - * + get ID of user extension set - * + delete user extension set - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_EXTENSION_MANAGER_h -#define __RTEMS_EXTENSION_MANAGER_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include /* XXX */ -#include /* XXX */ - -/* - * Extension related types - */ - -typedef User_extensions_routine rtems_extension; -typedef User_extensions_thread_create_extension rtems_task_create_extension; -typedef User_extensions_thread_delete_extension rtems_task_delete_extension; -typedef User_extensions_thread_start_extension rtems_task_start_extension; -typedef User_extensions_thread_restart_extension rtems_task_restart_extension; -typedef User_extensions_thread_switch_extension rtems_task_switch_extension; -typedef User_extensions_thread_begin_extension rtems_task_begin_extension; -typedef User_extensions_thread_exitted_extension rtems_task_exitted_extension; -typedef User_extensions_fatal_extension rtems_fatal_extension; - -typedef User_extensions_Table rtems_extensions_table; - -/* - * The following defines the information control block used to manage - * this class of objects. - */ - -SAPI_EXTERN Objects_Information _Extension_Information; - -/* - * The following records define the control block used to manage - * each extension. - */ - -typedef struct { - Objects_Control Object; - User_extensions_Control Extension; -} Extension_Control; - -/* - * _Extension_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _Extension_Manager_initialization( - unsigned32 maximum_extensions -); - -/* - * rtems_extension_create - * - * DESCRIPTION: - * - * This routine implements the rtems_extension_create directive. The - * extension will have the name name. The entry points of the - * routines which constitute this extension set are in EXTENSION_TABLE. - * It returns the id of the created extension in ID. - */ - -rtems_status_code rtems_extension_create( - rtems_name name, - rtems_extensions_table *extension_table, - Objects_Id *id -); - -/* - * rtems_extension_ident - * - * DESCRIPTION: - * - * This routine implements the rtems_extension_ident directive. - * This directive returns the extension ID associated with name. - * If more than one extension is named name, then the extension - * to which the ID belongs is arbitrary. - */ - -rtems_status_code rtems_extension_ident( - rtems_name name, - Objects_Id *id -); - -/* - * rtems_extension_delete - * - * DESCRIPTION: - * - * This routine implements the rtems_extension_delete directive. The - * extension indicated by ID is deleted. - */ - -rtems_status_code rtems_extension_delete( - Objects_Id id -); - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/sapi/include/rtems/fatal.h b/c/src/exec/sapi/include/rtems/fatal.h deleted file mode 100644 index f61b4183f3..0000000000 --- a/c/src/exec/sapi/include/rtems/fatal.h +++ /dev/null @@ -1,49 +0,0 @@ -/* fatal.h - * - * This include file contains constants and prototypes related - * to the Fatal Error Manager. This manager processes all fatal or - * irrecoverable errors. - * - * This manager provides directives to: - * - * + announce a fatal error has occurred - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_FATAL_h -#define __RTEMS_FATAL_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * rtems_fatal_error_occurred - * - * DESCRIPTION: - * - * This is the routine which implements the rtems_fatal_error_occurred - * directive. It is invoked when the application or RTEMS - * determines that a fatal error has occurred. - */ - -void volatile rtems_fatal_error_occurred( - unsigned32 the_error -); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/sapi/include/rtems/init.h b/c/src/exec/sapi/include/rtems/init.h deleted file mode 100644 index e008c45ebc..0000000000 --- a/c/src/exec/sapi/include/rtems/init.h +++ /dev/null @@ -1,110 +0,0 @@ -/* init.h - * - * This include file contains all the constants and structures associated - * with the Initialization Manager. This manager is responsible for - * initializing RTEMS, creating and starting all configured initialization - * tasks, invoking the initialization routine for each user-supplied device - * driver, and initializing the optional multiprocessor layer. - * - * This manager provides directives to: - * - * + initialize the RTEMS executive - * + shutdown the RTEMS executive - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_INIT_h -#define __RTEMS_INIT_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -/* - * The following defines the default Multiprocessing Configuration - * Table. This table is used in a single processor system. - */ - -extern const rtems_multiprocessing_table - _Initialization_Default_multiprocessing_table; - -/* - * rtems_initialize_executive - * - * DESCRIPTION: - * - * This routine implements the rtems_initialize_executive directive. This - * directive is invoked at system startup to initialize the RTEMS - * multitasking environment. - */ - -void rtems_initialize_executive( - rtems_configuration_table *configuration_table, - rtems_cpu_table *cpu_table -); - -/* - * rtems_initialize_executive_early - * - * DESCRIPTION: - * - * This routine implements the early portion of rtems_initialize_executive - * directive up to the pretasking hook. This directive is invoked at system - * startup to initialize the RTEMS multitasking environment. - */ - -rtems_interrupt_level rtems_initialize_executive_early( - rtems_configuration_table *configuration_table, - rtems_cpu_table *cpu_table -); - -/* - * rtems_initialize_executive_late - * - * DESCRIPTION: - * - * This routine implements the early portion of rtems_initialize_executive - * directive up to the pretasking hook. This directive is invoked at system - * startup to initialize the RTEMS multitasking environment. - */ - -void rtems_initialize_executive_late( - rtems_interrupt_level bsp_level -); - -/* - * rtems_shutdown_executive - * - * DESCRIPTION: - * - * This routine implements the rtems_shutdown_executive directive. The - * invocation of this directive results in the RTEMS environment being - * shutdown and multitasking halted. From the application's perspective, - * invocation of this directive results in the rtems_initialize_executive - * directive exitting to the startup code which invoked it. - */ - -void rtems_shutdown_executive( - unsigned32 result -); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/sapi/include/rtems/io.h b/c/src/exec/sapi/include/rtems/io.h deleted file mode 100644 index 01042ce762..0000000000 --- a/c/src/exec/sapi/include/rtems/io.h +++ /dev/null @@ -1,244 +0,0 @@ -/* io.h - * - * This include file contains all the constants and structures associated - * with the Input/Output Manager. This manager provides a well defined - * mechanism for accessing device drivers and a structured methodology for - * organizing device drivers. - * - * Directives provided are: - * - * + initialize a device driver - * + open a device driver - * + close a device driver - * + read from a device driver - * + write to a device driver - * + special device services - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_IO_h -#define __RTEMS_IO_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* - * - * The following defines the types for: - * - * + major and minor numbers - * + the return type of a device driver entry - * + a pointer to a device driver entry - * + an entry in the the Device Driver Address Table. Each entry in this - * table corresponds to an application provided device driver and - * defines the entry points for that device driver. - */ - -typedef unsigned32 rtems_device_major_number; -typedef unsigned32 rtems_device_minor_number; - -typedef rtems_status_code rtems_device_driver; - -typedef rtems_device_driver ( *rtems_device_driver_entry )( - rtems_device_major_number, - rtems_device_minor_number, - void * - ); - -typedef struct { - rtems_device_driver_entry initialization; /* initialization procedure */ - rtems_device_driver_entry open; /* open request procedure */ - rtems_device_driver_entry close; /* close request procedure */ - rtems_device_driver_entry read; /* read request procedure */ - rtems_device_driver_entry write; /* write request procedure */ - rtems_device_driver_entry control; /* special functions procedure */ -} rtems_driver_address_table; - -/* - * Table for the io device names - */ - -typedef struct { - char *device_name; - unsigned32 device_name_length; - rtems_device_major_number major; - rtems_device_minor_number minor; -} rtems_driver_name_t; - -/* - * This is the table of device names. - */ - -/* - * The following declare the data required to manage the Driver - * Address Table and Device Name Table. - */ - -SAPI_EXTERN unsigned32 _IO_Number_of_drivers; -SAPI_EXTERN rtems_driver_address_table *_IO_Driver_address_table; -SAPI_EXTERN unsigned32 _IO_Number_of_devices; -SAPI_EXTERN rtems_driver_name_t *_IO_Driver_name_table; - -/* - * _IO_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _IO_Manager_initialization( - rtems_driver_address_table *driver_table, - unsigned32 number_of_drivers, - unsigned32 number_of_devices -); - -/* - * rtems_io_register_name - * - * DESCRIPTION: - * - * Associate a name with a driver. - * - */ - -rtems_status_code rtems_io_register_name( - char *device_name, - rtems_device_major_number major, - rtems_device_minor_number minor -); - - -/* - * rtems_io_lookup_name - * - * DESCRIPTION: - * - * Find what driver "owns" this name - */ - -rtems_status_code rtems_io_lookup_name( - const char *name, - rtems_driver_name_t **device_info -); - - -/* - * rtems_io_initialize - * - * DESCRIPTION: - * - * This routine implements the rtems_io_initialize directive. It is invoked - * to initialize a device driver or an individual device. - */ - -rtems_status_code rtems_io_initialize( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *argument -); - -/* - * rtems_io_open - * - * DESCRIPTION: - * - * This routine implements the rtems_io_open directive. It is invoked - * to open a device. - */ - -rtems_status_code rtems_io_open( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *argument -); - -/* - * rtems_io_close - * - * DESCRIPTION: - * - * This routine implements the rtems_io_close directive. It is invoked - * to close a device. - */ - -rtems_status_code rtems_io_close( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *argument -); - -/* - * rtems_io_read - * - * DESCRIPTION: - * - * This routine implements the rtems_io_read directive. It is invoked - * to read from a device. - */ - -rtems_status_code rtems_io_read( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *argument -); - -/* - * rtems_io_write - * - * DESCRIPTION: - * - * This routine implements the rtems_io_write directive. It is invoked - * to write to a device. - */ - -rtems_status_code rtems_io_write( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *argument -); - -/* - * rtems_io_control - * - * DESCRIPTION: - * - * This routine implements the rtems_io_control directive. It is invoked - * to perform a device specific operation on a device. - */ - -rtems_status_code rtems_io_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *argument -); - -/* - * _IO_Initialize_all_drivers - * - * DESCRIPTION: - * - * This routine initializes all of the device drivers configured - * in the Device Driver Address Table. - */ - -void _IO_Initialize_all_drivers( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/sapi/include/rtems/mptables.h b/c/src/exec/sapi/include/rtems/mptables.h deleted file mode 100644 index b8e4c6de43..0000000000 --- a/c/src/exec/sapi/include/rtems/mptables.h +++ /dev/null @@ -1,29 +0,0 @@ -/* mptables.h - * - * This include file contains the executive's pre-initialized tables - * used in a multiprocessor configuration. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_MPTABLES_h -#define __RTEMS_MPTABLES_h - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/sapi/include/rtems/sptables.h b/c/src/exec/sapi/include/rtems/sptables.h deleted file mode 100644 index 17b07f066e..0000000000 --- a/c/src/exec/sapi/include/rtems/sptables.h +++ /dev/null @@ -1,162 +0,0 @@ -/* sptables.h - * - * This include file contains the executive's pre-initialized tables - * used when in a single processor configuration. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_SPTABLES_h -#define __RTEMS_SPTABLES_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * This is the default Multiprocessing Configuration Table. - * It is used in single processor configurations. - */ - -const rtems_multiprocessing_table - _Initialization_Default_multiprocessing_table = { - 1, /* local node number */ - 1, /* maximum number nodes in system */ - 0, /* maximum number global objects */ - 0, /* maximum number proxies */ - NULL, /* pointer to MPCI address table */ -}; - -/* - * This is the version string. - */ - -const char _RTEMS_version[] = - "RTEMS RELEASE V3.6.0 (" CPU_NAME "/" CPU_MODEL_NAME ")"; - - -/* - * This table is used by the single entry point code. - */ - -const void * _Entry_points[ RTEMS_NUMBER_OF_ENTRY_POINTS ] = { - (void *) rtems_initialize_executive, /* 0 */ - (void *) rtems_initialize_executive_early, /* 1 */ - (void *) rtems_initialize_executive_late, /* 2 */ - (void *) rtems_shutdown_executive, /* 3 */ - (void *) rtems_task_create, /* 4 */ - (void *) rtems_task_ident, /* 5 */ - (void *) rtems_task_start, /* 6 */ - (void *) rtems_task_restart, /* 7 */ - (void *) rtems_task_delete, /* 8 */ - (void *) rtems_task_suspend, /* 9 */ - (void *) rtems_task_resume, /* 10 */ - (void *) rtems_task_set_priority, /* 11 */ - (void *) rtems_task_mode, /* 12 */ - (void *) rtems_task_get_note, /* 13 */ - (void *) rtems_task_set_note, /* 14 */ - (void *) rtems_task_wake_after, /* 15 */ - (void *) rtems_task_wake_when, /* 16 */ - (void *) rtems_interrupt_catch, /* 17 */ - (void *) rtems_clock_set, /* 18 */ - (void *) rtems_clock_get, /* 19 */ - (void *) rtems_clock_tick, /* 20 */ - (void *) rtems_extension_create, /* 21 */ - (void *) rtems_extension_ident, /* 22 */ - (void *) rtems_extension_delete, /* 23 */ - (void *) rtems_timer_create, /* 24 */ - (void *) rtems_timer_ident, /* 25 */ - (void *) rtems_timer_cancel, /* 26 */ - (void *) rtems_timer_delete, /* 27 */ - (void *) rtems_timer_fire_after, /* 28 */ - (void *) rtems_timer_fire_when, /* 29 */ - (void *) rtems_timer_reset, /* 30 */ - (void *) rtems_semaphore_create, /* 31 */ - (void *) rtems_semaphore_ident, /* 32 */ - (void *) rtems_semaphore_delete, /* 33 */ - (void *) rtems_semaphore_obtain, /* 34 */ - (void *) rtems_semaphore_release, /* 35 */ - (void *) rtems_message_queue_create, /* 36 */ - (void *) rtems_message_queue_ident, /* 37 */ - (void *) rtems_message_queue_delete, /* 38 */ - (void *) rtems_message_queue_send, /* 39 */ - (void *) rtems_message_queue_urgent, /* 40 */ - (void *) rtems_message_queue_broadcast, /* 41 */ - (void *) rtems_message_queue_receive, /* 42 */ - (void *) rtems_message_queue_flush, /* 43 */ - (void *) rtems_event_send, /* 44 */ - (void *) rtems_event_receive, /* 45 */ - (void *) rtems_signal_catch, /* 46 */ - (void *) rtems_signal_send, /* 47 */ - (void *) rtems_partition_create, /* 48 */ - (void *) rtems_partition_ident, /* 49 */ - (void *) rtems_partition_delete, /* 50 */ - (void *) rtems_partition_get_buffer, /* 51 */ - (void *) rtems_partition_return_buffer, /* 52 */ - (void *) rtems_region_create, /* 53 */ - (void *) rtems_region_extend, /* 54 */ - (void *) rtems_region_ident, /* 55 */ - (void *) rtems_region_delete, /* 56 */ - (void *) rtems_region_get_segment, /* 57 */ - (void *) rtems_region_get_segment_size, /* 58 */ - (void *) rtems_region_return_segment, /* 59 */ - (void *) rtems_port_create, /* 60 */ - (void *) rtems_port_ident, /* 61 */ - (void *) rtems_port_delete, /* 62 */ - (void *) rtems_port_external_to_internal, /* 63 */ - (void *) rtems_port_internal_to_external, /* 64 */ - (void *) rtems_io_initialize, /* 65 */ - (void *) rtems_io_register_name, /* 66 */ - (void *) rtems_io_lookup_name, /* 67 */ - (void *) rtems_io_open, /* 68 */ - (void *) rtems_io_close, /* 69 */ - (void *) rtems_io_read, /* 70 */ - (void *) rtems_io_write, /* 71 */ - (void *) rtems_io_control, /* 72 */ - (void *) rtems_fatal_error_occurred, /* 73 */ - (void *) rtems_rate_monotonic_create, /* 74 */ - (void *) rtems_rate_monotonic_ident, /* 75 */ - (void *) rtems_rate_monotonic_delete, /* 76 */ - (void *) rtems_rate_monotonic_cancel, /* 77 */ - (void *) rtems_rate_monotonic_period, /* 78 */ - (void *) rtems_multiprocessing_announce, /* 79 */ - (void *) rtems_debug_enable, /* 80 */ - (void *) rtems_debug_disable /* 81 */ -}; - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/sapi/inline/rtems/extension.inl b/c/src/exec/sapi/inline/rtems/extension.inl deleted file mode 100644 index 9f43f1ad07..0000000000 --- a/c/src/exec/sapi/inline/rtems/extension.inl +++ /dev/null @@ -1,91 +0,0 @@ -/* extension.inl - * - * This file contains the static inline implementation of the inlined routines - * from the Extension Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __EXTENSION_MANAGER_inl -#define __EXTENSION_MANAGER_inl - -/*PAGE - * - * _Extension_Allocate - * - * DESCRIPTION: - * - * This function allocates a extension control block from - * the inactive chain of free extension control blocks. - */ - -RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) -{ - return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); -} - -/*PAGE - * - * _Extension_Free - * - * DESCRIPTION: - * - * This routine frees a extension control block to the - * inactive chain of free extension control blocks. - */ - -RTEMS_INLINE_ROUTINE void _Extension_Free ( - Extension_Control *the_extension -) -{ - _Objects_Free( &_Extension_Information, &the_extension->Object ); -} - -/*PAGE - * - * _Extension_Get - * - * DESCRIPTION: - * - * This function maps extension IDs to extension control blocks. - * If ID corresponds to a local extension, then it returns - * the extension control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. Otherwise, location is set - * to OBJECTS_ERROR and the returned value is undefined. - */ - -RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( - Objects_Id id, - Objects_Locations *location -) -{ - return (Extension_Control *) - _Objects_Get( &_Extension_Information, id, location ); -} - -/*PAGE - * - * _Extension_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_extension is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Extension_Is_null ( - Extension_Control *the_extension -) -{ - return ( the_extension == NULL ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/sapi/macros/rtems/extension.inl b/c/src/exec/sapi/macros/rtems/extension.inl deleted file mode 100644 index 96fb9d1b3e..0000000000 --- a/c/src/exec/sapi/macros/rtems/extension.inl +++ /dev/null @@ -1,58 +0,0 @@ -/* extension.inl - * - * This file contains the macro implementation of the inlined routines - * from the Extension Manager. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __EXTENSION_inl -#define __EXTENSION_inl - -/*PAGE - * - * _Extension_Allocate - * - */ - -#define _Extension_Allocate() \ - (Extension_Control *) _Objects_Allocate( &_Extension_Information ) - -/*PAGE - * - * _Extension_Free - * - */ - -#define _Extension_Free( _the_extension ) \ - _Objects_Free( &_Extension_Information, &(_the_extension)->Object ) - -/*PAGE - * - * _Extension_Get - * - */ - -#define _Extension_Get( _id, _location ) \ - (Extension_Control *) \ - _Objects_Get( &_Extension_Information, (_id), (_location) ) - -/*PAGE - * - * _Extension_Is_null - * - */ - -#define _Extension_Is_null( _the_extension ) \ - ( (_the_extension) == NULL ) - -#endif -/* end of include file */ diff --git a/c/src/exec/sapi/src/exinit.c b/c/src/exec/sapi/src/exinit.c deleted file mode 100644 index 442465dda4..0000000000 --- a/c/src/exec/sapi/src/exinit.c +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Initialization Manager - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -/* - * SCORE_INIT and SAPI_INIT are defined so all of the super core and - * super API data will be included in this object file. - */ - -#define SAPI_INIT -#define SCORE_INIT - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -#include -#ifdef RTEMS_POSIX_API -#include -#endif - -/*PAGE - * - * rtems_initialize_executive - * - * This directive initializes all the kernels data structures - * to the states necessary for the kernel to begin execution. All - * include files that contain global variable definitions should be - * included in this file. The system threads and initialization threads - * are created and started by this routine. This routine then - * initiates multithreading. - * - * Input parameters: - * configuration_table - pointer to the user's configuration table - * cpu_table - pointer to the user's CPU configuration table - * - * Output parameters: NONE - */ - -void rtems_initialize_executive( - rtems_configuration_table *configuration_table, - rtems_cpu_table *cpu_table -) -{ - rtems_interrupt_level bsp_level; - - bsp_level = rtems_initialize_executive_early(configuration_table, cpu_table); - rtems_initialize_executive_late( bsp_level ); -} - -rtems_interrupt_level rtems_initialize_executive_early( - rtems_configuration_table *configuration_table, - rtems_cpu_table *cpu_table -) -{ - rtems_interrupt_level bsp_level; - rtems_multiprocessing_table *multiprocessing_table; - - /* - * Dispatching and interrupts are disabled until the end of the - * initialization sequence. This prevents an inadvertent context - * switch before the executive is initialized. - */ - - _ISR_Disable( bsp_level ); - - if ( cpu_table == NULL ) - _Internal_error_Occurred( - INTERNAL_ERROR_CORE, - TRUE, - INTERNAL_ERROR_NO_CONFIGURATION_TABLE - ); - - /* - * Initialize the system state based on whether this is an MP system. - */ - - multiprocessing_table = configuration_table->User_multiprocessing_table; - - _System_state_Handler_initialization( - (multiprocessing_table) ? TRUE : FALSE - ); - - /* - * Provided just for user convenience. - */ - - _Configuration_Table = configuration_table; - _Configuration_MP_table = multiprocessing_table; - - /* - * Internally we view single processor systems as a very restricted - * multiprocessor system. - */ - - if ( multiprocessing_table == NULL ) - multiprocessing_table = - (void *)&_Initialization_Default_multiprocessing_table; - - if ( cpu_table == NULL ) - _Internal_error_Occurred( - INTERNAL_ERROR_CORE, - TRUE, - INTERNAL_ERROR_NO_CPU_TABLE - ); - - _CPU_Initialize( cpu_table, _Thread_Dispatch ); - - /* - * Do this as early as possible to insure no debugging output - * is even attempted to be printed. - */ - - _Debug_Manager_initialization(); - - _API_extensions_Initialization(); - - _Thread_Dispatch_initialization(); - - _User_extensions_Handler_initialization( - configuration_table->User_extension_table - ); - - _Workspace_Handler_initialization( - (void *)configuration_table->work_space_start, - configuration_table->work_space_size - ); - - _ISR_Handler_initialization(); - - _Objects_Handler_initialization( - multiprocessing_table->node, - multiprocessing_table->maximum_nodes, - multiprocessing_table->maximum_global_objects - ); - - _Priority_Handler_initialization(); - - _Watchdog_Handler_initialization(); - - _TOD_Handler_initialization( configuration_table->microseconds_per_tick ); - - _Thread_Handler_initialization( - configuration_table->ticks_per_timeslice, - configuration_table->maximum_extensions, - multiprocessing_table->maximum_proxies - ); - - _MPCI_Handler_initialization( - multiprocessing_table->User_mpci_table, - RTEMS_TIMEOUT - ); - -/* MANAGERS */ - - _Extension_Manager_initialization( configuration_table->maximum_extensions ); - - _IO_Manager_initialization( - configuration_table->Device_driver_table, - configuration_table->number_of_device_drivers, - configuration_table->maximum_devices - ); - - _RTEMS_API_Initialize( configuration_table ); - -#ifdef RTEMS_POSIX_API - _POSIX_API_Initialize( configuration_table ); -#endif - - _System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING ); - - if ( cpu_table->pretasking_hook ) - (*cpu_table->pretasking_hook)(); - - /* - * No threads should be created before this point!!! - * - * At this point all API extensions are in place. After the call to - * _Thread_Create_idle() _Thread_Executing will be set. - * and _Thread_Heir are not set yet. - */ - - _Thread_Create_idle(); - - _MPCI_Create_server(); - - /* - * Run the API and BSPs predriver hook. - */ - - _API_extensions_Run_predriver(); - - if ( _CPU_Table.predriver_hook ) - (*_CPU_Table.predriver_hook)(); - - /* - * Initialize all the device drivers and initialize the MPCI layer. - * - * NOTE: The MPCI may be build upon a device driver. - */ - - _IO_Initialize_all_drivers(); - - if ( _System_state_Is_multiprocessing ) { - _MPCI_Initialization(); - _MPCI_Internal_packets_Send_process_packet( - MPCI_PACKETS_SYSTEM_VERIFY - ); - } - - /* - * Run the APIs and BSPs postdriver hooks. - * - * The API extensions are supposed to create user initialization tasks. - */ - - _API_extensions_Run_postdriver(); - - if ( _CPU_Table.postdriver_hook ) - (*_CPU_Table.postdriver_hook)(); - - return bsp_level; -} - -void rtems_initialize_executive_late( - rtems_interrupt_level bsp_level -) -{ - - _System_state_Set( SYSTEM_STATE_BEGIN_MULTITASKING ); - - _Thread_Start_multitasking(); - - /* - * Restore the interrupt level to what the BSP had. Technically, - * this is unnecessary since the BSP should have all interrupts - * disabled when rtems_initialize_executive is invoked. But this keeps - * the ISR Disable/Enable calls paired. - */ - - _ISR_Enable( bsp_level ); -} - -/*PAGE - * - * rtems_shutdown_executive - * - * This kernel routine shutdowns the executive. It halts multitasking - * and returns control to the application execution "thread" which - * initialially invoked the rtems_initialize_executive directive. - * - * Input parameters: NONE - * - * Output parameters: NONE - */ - -void rtems_shutdown_executive( - unsigned32 result -) -{ - _Thread_Stop_multitasking(); -} diff --git a/c/src/exec/score/cpu/hppa1.1/cpu.c b/c/src/exec/score/cpu/hppa1.1/cpu.c deleted file mode 100644 index d72dda4941..0000000000 --- a/c/src/exec/score/cpu/hppa1.1/cpu.c +++ /dev/null @@ -1,191 +0,0 @@ -/* - * HP PA-RISC Dependent Source - * - * COPYRIGHT (c) 1994 by Division Incorporated - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of Division Incorporated not be - * used in advertising or publicity pertaining to distribution - * of the software without specific, written prior permission. - * Division Incorporated makes no representations about the - * suitability of this software for any purpose. - * - * $Id$ - */ - -#include -#include -void hppa_cpu_halt(unsigned32 the_error); - - -/*PAGE - * - * _CPU_ISR_install_raw_handler - */ - -void _CPU_ISR_install_raw_handler( - unsigned32 vector, - proc_ptr new_handler, - proc_ptr *old_handler -) -{ - /* - * This is unsupported. For HPPA this function is handled by BSP - */ - - _CPU_Fatal_halt( 0xdeaddead ); -} - - - -/* - * This is the default handler which is called if - * _CPU_ISR_install_vector() has not been called for the - * specified vector. It simply forwards onto the spurious - * handler defined in the cpu-table. - */ - -static ISR_Handler -hppa_interrupt_report_spurious(ISR_Vector_number vector, - void* rtems_isr_frame) /* HPPA extension */ -{ - - /* - * If the CPU table defines a spurious_handler, then - * call it. If the handler returns halt. - */ - if ( _CPU_Table.spurious_handler ) - _CPU_Table.spurious_handler(vector, rtems_isr_frame); - - hppa_cpu_halt(vector); -} - - -/*PAGE - * - * _CPU_ISR_Get_level - */ - -unsigned32 _CPU_ISR_Get_level(void) -{ - int level; - HPPA_ASM_SSM(0, level); /* change no bits; just get copy */ - if (level & HPPA_PSW_I) - return 0; - return 1; -} - -/*PAGE - * - * _CPU_ISR_install_vector - * - * This kernel routine installs the RTEMS handler for the - * specified vector. The handler is a C callable routine. - * - * Input parameters: - * vector - interrupt vector number - * old_handler - former ISR for this vector number - * new_handler - replacement ISR for this vector number - * - * Output parameters: NONE - * - */ - -void _CPU_ISR_install_vector( - unsigned32 vector, - proc_ptr new_handler, - proc_ptr *old_handler -) -{ - *old_handler = _ISR_Vector_table[vector]; - - _ISR_Vector_table[vector] = new_handler; -} - -/* _CPU_Initialize - * - * This routine performs processor dependent initialization. - * - * INPUT PARAMETERS: - * cpu_table - CPU table to initialize - * thread_dispatch - address of disptaching routine - * - */ - -void _CPU_Initialize( - rtems_cpu_table *cpu_table, - void (*thread_dispatch) /* ignored on this CPU */ -) -{ - register unsigned8 *fp_context; - int i; - proc_ptr old_handler; - - /* - * This is the default fp context for all tasks - * Set it up so that denormalized results go to zero. - */ - - fp_context = (unsigned8*) &_CPU_Null_fp_context; - for (i=0 ; i /* pick up machine definitions */ -#ifndef ASM -#include -#endif - -/* conditional compilation parameters */ - -#define CPU_INLINE_ENABLE_DISPATCH FALSE -#define CPU_UNROLL_ENQUEUE_PRIORITY TRUE - -/* - * RTEMS manages an interrupt stack in software for the HPPA. - */ - -#define CPU_HAS_SOFTWARE_INTERRUPT_STACK TRUE -#define CPU_HAS_HARDWARE_INTERRUPT_STACK FALSE -#define CPU_ALLOCATE_INTERRUPT_STACK TRUE - -/* - * HPPA has hardware FP, it is assumed to exist by GCC so all tasks - * may implicitly use it (especially for integer multiplies). Because - * the FP context is technically part of the basic integer context - * on this CPU, we cannot use the deferred FP context switch algorithm. - */ - -#define CPU_HARDWARE_FP TRUE -#define CPU_ALL_TASKS_ARE_FP TRUE -#define CPU_IDLE_TASK_IS_FP FALSE -#define CPU_USE_DEFERRED_FP_SWITCH FALSE - -#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE -#define CPU_STACK_GROWS_UP TRUE -#define CPU_STRUCTURE_ALIGNMENT __attribute__ ((__aligned__ (32))) - -/* constants */ - -#define CPU_MODES_INTERRUPT_LEVEL 0x00000001 /* interrupt level in mode */ -#define CPU_MODES_INTERRUPT_MASK 0x00000001 /* interrupt level in mode */ - -/* - * PSW contstants - */ - -#define CPU_PSW_BASE (HPPA_PSW_C | HPPA_PSW_Q | HPPA_PSW_P | HPPA_PSW_D) -#define CPU_PSW_INTERRUPTS_ON (CPU_PSW_BASE | HPPA_PSW_I) -#define CPU_PSW_INTERRUPTS_OFF (CPU_PSW_BASE) - -#define CPU_PSW_DEFAULT CPU_PSW_BASE - - -#ifndef ASM - -/* - * Contexts - * - * This means we have the following context items: - * 1. task level context stuff:: Context_Control - * 2. floating point task stuff:: Context_Control_fp - * - * The PA-RISC is very fast so the expense of saving an extra register - * or two is not of great concern at the present. So we are not making - * a distinction between what is saved during a task switch and what is - * saved at each interrupt. Plus saving the entire context should make - * it easier to make gdb aware of RTEMS tasks. - */ - -typedef struct { - unsigned32 flags; /* whatever */ - unsigned32 gr1; /* scratch -- caller saves */ - unsigned32 gr2; /* RP -- return pointer */ - unsigned32 gr3; /* scratch -- callee saves */ - unsigned32 gr4; /* scratch -- callee saves */ - unsigned32 gr5; /* scratch -- callee saves */ - unsigned32 gr6; /* scratch -- callee saves */ - unsigned32 gr7; /* scratch -- callee saves */ - unsigned32 gr8; /* scratch -- callee saves */ - unsigned32 gr9; /* scratch -- callee saves */ - unsigned32 gr10; /* scratch -- callee saves */ - unsigned32 gr11; /* scratch -- callee saves */ - unsigned32 gr12; /* scratch -- callee saves */ - unsigned32 gr13; /* scratch -- callee saves */ - unsigned32 gr14; /* scratch -- callee saves */ - unsigned32 gr15; /* scratch -- callee saves */ - unsigned32 gr16; /* scratch -- callee saves */ - unsigned32 gr17; /* scratch -- callee saves */ - unsigned32 gr18; /* scratch -- callee saves */ - unsigned32 gr19; /* scratch -- caller saves */ - unsigned32 gr20; /* scratch -- caller saves */ - unsigned32 gr21; /* scratch -- caller saves */ - unsigned32 gr22; /* scratch -- caller saves */ - unsigned32 gr23; /* argument 3 */ - unsigned32 gr24; /* argument 2 */ - unsigned32 gr25; /* argument 1 */ - unsigned32 gr26; /* argument 0 */ - unsigned32 gr27; /* DP -- global data pointer */ - unsigned32 gr28; /* return values -- caller saves */ - unsigned32 gr29; /* return values -- caller saves */ - unsigned32 sp; /* gr30 */ - unsigned32 gr31; - - /* Various control registers */ - - unsigned32 sar; /* cr11 */ - unsigned32 ipsw; /* cr22; full 32 bits of psw */ - unsigned32 iir; /* cr19; interrupt instruction register */ - unsigned32 ior; /* cr21; interrupt offset register */ - unsigned32 isr; /* cr20; interrupt space register (not used) */ - unsigned32 pcoqfront; /* cr18; front que offset */ - unsigned32 pcoqback; /* cr18; back que offset */ - unsigned32 pcsqfront; /* cr17; front que space (not used) */ - unsigned32 pcsqback; /* cr17; back que space (not used) */ - unsigned32 itimer; /* cr16; itimer value */ - -} Context_Control; - - -/* Must be double word aligned. - * This will be ok since our allocator returns 8 byte aligned chunks - */ - -typedef struct { - double fr0; /* status */ - double fr1; /* exception information */ - double fr2; /* exception information */ - double fr3; /* exception information */ - double fr4; /* argument */ - double fr5; /* argument */ - double fr6; /* argument */ - double fr7; /* argument */ - double fr8; /* scratch -- caller saves */ - double fr9; /* scratch -- caller saves */ - double fr10; /* scratch -- caller saves */ - double fr11; /* scratch -- caller saves */ - double fr12; /* callee saves -- (PA-RISC 1.1 CPUs) */ - double fr13; /* callee saves -- (PA-RISC 1.1 CPUs) */ - double fr14; /* callee saves -- (PA-RISC 1.1 CPUs) */ - double fr15; /* callee saves -- (PA-RISC 1.1 CPUs) */ - double fr16; /* callee saves -- (PA-RISC 1.1 CPUs) */ - double fr17; /* callee saves -- (PA-RISC 1.1 CPUs) */ - double fr18; /* callee saves -- (PA-RISC 1.1 CPUs) */ - double fr19; /* callee saves -- (PA-RISC 1.1 CPUs) */ - double fr20; /* callee saves -- (PA-RISC 1.1 CPUs) */ - double fr21; /* callee saves -- (PA-RISC 1.1 CPUs) */ - double fr22; /* caller saves -- (PA-RISC 1.1 CPUs) */ - double fr23; /* caller saves -- (PA-RISC 1.1 CPUs) */ - double fr24; /* caller saves -- (PA-RISC 1.1 CPUs) */ - double fr25; /* caller saves -- (PA-RISC 1.1 CPUs) */ - double fr26; /* caller saves -- (PA-RISC 1.1 CPUs) */ - double fr27; /* caller saves -- (PA-RISC 1.1 CPUs) */ - double fr28; /* caller saves -- (PA-RISC 1.1 CPUs) */ - double fr29; /* caller saves -- (PA-RISC 1.1 CPUs) */ - double fr30; /* caller saves -- (PA-RISC 1.1 CPUs) */ - double fr31; /* caller saves -- (PA-RISC 1.1 CPUs) */ -} Context_Control_fp; - -/* - * The following structure defines the set of information saved - * on the current stack by RTEMS upon receipt of each interrupt. - */ - -typedef struct { - Context_Control Integer; - Context_Control_fp Floating_Point; -} CPU_Interrupt_frame; - -/* - * Our interrupt handlers take a 2nd argument: - * a pointer to a CPU_Interrupt_frame - * So we use our own prototype instead of rtems_isr_entry - */ - -typedef void ( *hppa_rtems_isr_entry )( - unsigned32, - CPU_Interrupt_frame * - ); - -/* - * The following table contains the information required to configure - * the HPPA specific parameters. - */ - -typedef struct { - void (*pretasking_hook)( void ); - void (*predriver_hook)( void ); - void (*postdriver_hook)( void ); - void (*idle_task)( void ); - boolean do_zero_of_workspace; - unsigned32 interrupt_stack_size; - unsigned32 extra_mpci_receive_server_stack; - void * (*stack_allocate_hook)( unsigned32 ); - void (*stack_free_hook)( void * ); - /* end of fields required on all CPUs */ - - hppa_rtems_isr_entry spurious_handler; - - unsigned32 itimer_clicks_per_microsecond; /* for use by Clock driver */ -} rtems_cpu_table; - -/* variables */ - -SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; -SCORE_EXTERN unsigned32 _CPU_Default_gr27; -SCORE_EXTERN void *_CPU_Interrupt_stack_low; -SCORE_EXTERN void *_CPU_Interrupt_stack_high; - -#endif /* ! ASM */ - -/* - * context sizes - */ - -#ifndef ASM -#define CPU_CONTEXT_SIZE sizeof( Context_Control ) -#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp ) -#endif - -/* - * size of a frame on the stack - */ - -#define CPU_FRAME_SIZE (16 * 4) - -/* - * (Optional) # of bytes for libmisc/stackchk to check - * If not specifed, then it defaults to something reasonable - * for most architectures. - */ - -#define CPU_STACK_CHECK_SIZE (CPU_FRAME_SIZE * 2) - -/* - * extra stack required by the MPCI receive server thread - */ - -#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0 - -/* - * HPPA has 32 traps, then 32 external interrupts - * Rtems (_ISR_Vector_Table) is aware ONLY of the first 32 - * The BSP is aware of the external interrupts and possibly more. - * - */ - -#define CPU_INTERRUPT_NUMBER_OF_VECTORS (HPPA_INTERNAL_TRAPS) -#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1) - -/* - * Don't be chintzy here; we don't want to debug these problems - * Some of the tests eat almost 4k. - * Plus, the HPPA always allocates chunks of 64 bytes for stack - * growth. - */ - -#define CPU_STACK_MINIMUM_SIZE (8 * 1024) - -/* - * HPPA double's must be on 8 byte boundary - */ - -#define CPU_ALIGNMENT 8 - -/* - * just follow the basic HPPA alignment for the heap and partition - */ - -#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT -#define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT - -/* - * HPPA stack is best when 64 byte aligned. - */ - -#define CPU_STACK_ALIGNMENT 64 - -#ifndef ASM - -/* macros */ - -/* - * ISR handler macros - * - * These macros perform the following functions: - * + disable all maskable CPU interrupts - * + restore previous interrupt level (enable) - * + temporarily restore interrupts (flash) - * + set a particular level - */ - -/* Disable interrupts; returning previous psw bits in _isr_level */ -#define _CPU_ISR_Disable( _isr_level ) \ - do { \ - HPPA_ASM_RSM(HPPA_PSW_I, _isr_level); \ - if (_isr_level & HPPA_PSW_I) _isr_level = 0; \ - else _isr_level = 1; \ - } while(0) - -/* Enable interrupts to previous level from _CPU_ISR_Disable - * does not change 'level' */ -#define _CPU_ISR_Enable( _isr_level ) \ - { \ - register int _ignore; \ - if (_isr_level == 0) HPPA_ASM_SSM(HPPA_PSW_I, _ignore); \ - else HPPA_ASM_RSM(HPPA_PSW_I, _ignore); \ - } - -/* restore, then disable interrupts; does not change level */ -#define _CPU_ISR_Flash( _isr_level ) \ - { \ - if (_isr_level == 0) \ - { \ - register int _ignore; \ - HPPA_ASM_SSM(HPPA_PSW_I, _ignore); \ - HPPA_ASM_RSM(HPPA_PSW_I, _ignore); \ - } \ - } - -/* - * Interrupt task levels - * - * Future scheme proposal - * level will be an index into a array. - * Each entry of array will be the interrupt bits - * enabled for that level. There will be 32 bits of external - * interrupts (to be placed in EIEM) and some (optional) bsp - * specific bits - * - * For pixel flow this *may* mean something like: - * level 0: all interrupts enabled (external + rhino) - * level 1: rhino disabled - * level 2: all io interrupts disabled (timer still enabled) - * level 7: *ALL* disabled (timer disabled) - */ - -/* set interrupts on or off; does not return new level */ -#define _CPU_ISR_Set_level( new_level ) \ - { \ - volatile int ignore; \ - if ( new_level ) HPPA_ASM_RSM(HPPA_PSW_I, ignore); \ - else HPPA_ASM_SSM(HPPA_PSW_I, ignore); \ - } - -/* return current level */ -unsigned32 _CPU_ISR_Get_level( void ); - -/* end of ISR handler macros */ - -/* - * Context handler macros - * - * These macros perform the following functions: - * + initialize a context area - * + restart the current thread - * + calculate the initial pointer into a FP context area - * + initialize an FP context area - * - * HPPA port adds two macros which hide the "indirectness" of the - * pointer passed the save/restore FP context assembly routines. - */ - -#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \ - _new_level, _entry_point, _is_fp ) \ - do { \ - unsigned32 _stack; \ - \ - (_the_context)->flags = 0xfeedf00d; \ - (_the_context)->pcoqfront = (unsigned32)(_entry_point); \ - (_the_context)->pcoqback = (unsigned32)(_entry_point) + 4; \ - (_the_context)->pcsqfront = 0; \ - (_the_context)->pcsqback = 0; \ - if ( (_new_level) ) \ - (_the_context)->ipsw = CPU_PSW_INTERRUPTS_OFF; \ - else \ - (_the_context)->ipsw = CPU_PSW_INTERRUPTS_ON; \ - \ - _stack = ((unsigned32)(_stack_base) + (CPU_STACK_ALIGNMENT - 1)); \ - _stack &= ~(CPU_STACK_ALIGNMENT - 1); \ - if ((_stack - (unsigned32) (_stack_base)) < CPU_FRAME_SIZE) \ - _stack += CPU_FRAME_SIZE; \ - \ - (_the_context)->sp = (_stack); \ - (_the_context)->gr27 = _CPU_Default_gr27; \ - } while (0) - -#define _CPU_Context_Restart_self( _the_context ) \ - do { \ - _CPU_Context_restore( (_the_context) ); \ - } while (0) - -#define _CPU_Context_Fp_start( _base, _offset ) \ - ( (void *) _Addresses_Add_offset( (_base), (_offset) ) ) - -#define _CPU_Context_Initialize_fp( _destination ) \ - do { \ - *((Context_Control_fp *) *((void **) _destination)) = _CPU_Null_fp_context;\ - } while(0) - -#define _CPU_Context_save_fp( _fp_context ) \ - _CPU_Save_float_context( *(Context_Control_fp **)(_fp_context) ) - -#define _CPU_Context_restore_fp( _fp_context ) \ - _CPU_Restore_float_context( *(Context_Control_fp **)(_fp_context) ) - -/* end of Context handler macros */ - -/* - * Fatal Error manager macros - * - * These macros perform the following functions: - * + disable interrupts and halt the CPU - */ - -void hppa_cpu_halt(unsigned32 the_error); -#define _CPU_Fatal_halt( _error ) \ - hppa_cpu_halt(_error) - -/* end of Fatal Error manager macros */ - -/* - * Bitfield handler macros - * - * These macros perform the following functions: - * + scan for the highest numbered (MSB) set in a 16 bit bitfield - * - * NOTE: - * - * The HPPA does not have a scan instruction. This functionality - * is implemented in software. - */ - -#define CPU_USE_GENERIC_BITFIELD_CODE FALSE -#define CPU_USE_GENERIC_BITFIELD_DATA FALSE - -int hppa_rtems_ffs(unsigned int value); -#define _CPU_Bitfield_Find_first_bit( _value, _output ) \ - _output = hppa_rtems_ffs(_value) - -/* end of Bitfield handler macros */ - -/* - * Priority handler macros - * - * These macros perform the following functions: - * + return a mask with the bit for this major/minor portion of - * of thread priority set. - * + translate the bit number returned by "Bitfield_find_first_bit" - * into an index into the thread ready chain bit maps - * - * Note: 255 is the lowest priority - */ - -#define _CPU_Priority_Mask( _bit_number ) \ - ( 1 << (_bit_number) ) - -#define _CPU_Priority_bits_index( _priority ) \ - (_priority) - -/* end of Priority handler macros */ - -/* functions */ - -/* - * _CPU_Initialize - * - * This routine performs CPU dependent initialization. - */ - -void _CPU_Initialize( - rtems_cpu_table *cpu_table, - void (*thread_dispatch) -); - -/* - * _CPU_ISR_install_raw_handler - * - * This routine installs a "raw" interrupt handler directly into the - * processor's vector table. - */ - -void _CPU_ISR_install_raw_handler( - unsigned32 vector, - proc_ptr new_handler, - proc_ptr *old_handler -); - -/* - * _CPU_ISR_install_vector - * - * This routine installs an interrupt vector. - */ - -void _CPU_ISR_install_vector( - unsigned32 vector, - proc_ptr new_handler, - proc_ptr *old_handler -); - -/* - * _CPU_Context_switch - * - * This routine switches from the run context to the heir context. - */ - -void _CPU_Context_switch( - Context_Control *run, - Context_Control *heir -); - -/* - * _CPU_Context_restore - * - * This routine is generally used only to restart self in an - * efficient manner and avoid stack conflicts. - */ - -void _CPU_Context_restore( - Context_Control *new_context -); - -/* - * _CPU_Save_float_context - * - * This routine saves the floating point context passed to it. - * - * NOTE: _CPU_Context_save_fp is implemented as a macro on the HPPA - * which dereferences the pointer before calling this. - */ - -void _CPU_Save_float_context( - Context_Control_fp *fp_context -); - -/* - * _CPU_Restore_float_context - * - * This routine restores the floating point context passed to it. - * - * NOTE: _CPU_Context_save_fp is implemented as a macro on the HPPA - * which dereferences the pointer before calling this. - */ - -void _CPU_Restore_float_context( - Context_Control_fp *fp_context -); - - -/* - * The raw interrupt handler for external interrupts - */ - -extern void _Generic_ISR_Handler( - void -); - - -/* The following routine swaps the endian format of an unsigned int. - * It must be static so it can be referenced indirectly. - */ - -static inline unsigned int -CPU_swap_u32(unsigned32 value) -{ - unsigned32 swapped; - - HPPA_ASM_SWAPBYTES(value, swapped); - - return( swapped ); -} - -#endif /* ! ASM */ - -#ifdef __cplusplus -} -#endif - -#endif /* ! __CPU_h */ diff --git a/c/src/exec/score/cpu/hppa1.1/cpu_asm.h b/c/src/exec/score/cpu/hppa1.1/cpu_asm.h deleted file mode 100644 index 951f80dcf0..0000000000 --- a/c/src/exec/score/cpu/hppa1.1/cpu_asm.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 1990,1991 The University of Utah and - * the Center for Software Science (CSS). All rights reserved. - * - * Permission to use, copy, modify and distribute this software is hereby - * granted provided that (1) source code retains these copyright, permission, - * and disclaimer notices, and (2) redistributions including binaries - * reproduce the notices in supporting documentation, and (3) all advertising - * materials mentioning features or use of this software display the following - * acknowledgement: ``This product includes software developed by the Center - * for Software Science at the University of Utah.'' - * - * THE UNIVERSITY OF UTAH AND CSS ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS - * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSS DISCLAIM ANY LIABILITY OF - * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * CSS requests users of this software to return to css-dist@cs.utah.edu any - * improvements that they make and grant CSS redistribution rights. - * - * Utah $Hdr: asm.h 1.6 91/12/03$ - * - * $Id$ - */ - -/* - * Hardware Space Registers - */ -sr0 .reg %sr0 -sr1 .reg %sr1 -sr2 .reg %sr2 -sr3 .reg %sr3 -sr4 .reg %sr4 -sr5 .reg %sr5 -sr6 .reg %sr6 -sr7 .reg %sr7 - -/* - * Control register aliases - */ - -rctr .reg %cr0 -pidr1 .reg %cr8 -pidr2 .reg %cr9 -ccr .reg %cr10 -sar .reg %cr11 -pidr3 .reg %cr12 -pidr4 .reg %cr13 -iva .reg %cr14 -eiem .reg %cr15 -itmr .reg %cr16 -pcsq .reg %cr17 -pcoq .reg %cr18 -iir .reg %cr19 -isr .reg %cr20 -ior .reg %cr21 -ipsw .reg %cr22 -eirr .reg %cr23 - -/* - * Calling Convention - */ -rp .reg %r2 -arg3 .reg %r23 -arg2 .reg %r24 -arg1 .reg %r25 -arg0 .reg %r26 -dp .reg %r27 -ret0 .reg %r28 -ret1 .reg %r29 -sl .reg %r29 -sp .reg %r30 - - diff --git a/c/src/exec/score/cpu/hppa1.1/cpu_asm.s b/c/src/exec/score/cpu/hppa1.1/cpu_asm.s deleted file mode 100644 index bf0d4b0bee..0000000000 --- a/c/src/exec/score/cpu/hppa1.1/cpu_asm.s +++ /dev/null @@ -1,705 +0,0 @@ -# -# TODO: -# Context_switch needs to only save callee save registers -# I think this means can skip: r1, r2, r19-29, r31 -# Ref: p 3-2 of Procedure Calling Conventions Manual -# This should be #ifndef DEBUG so that debugger has -# accurate visibility into all registers -# -# This file contains the assembly code for the HPPA implementation -# of RTEMS. -# -# COPYRIGHT (c) 1994,95 by Division Incorporated -# -# To anyone who acknowledges that this file is provided "AS IS" -# without any express or implied warranty: -# permission to use, copy, modify, and distribute this file -# for any purpose is hereby granted without fee, provided that -# the above copyright notice and this notice appears in all -# copies, and that the name of Division Incorporated not be -# used in advertising or publicity pertaining to distribution -# of the software without specific, written prior permission. -# Division Incorporated makes no representations about the -# suitability of this software for any purpose. -# -# $Id$ -# - -#include -#include -#include -#include - - .SPACE $PRIVATE$ - .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31 - .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82 - .SPACE $TEXT$ - .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44 - .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY - .SPACE $TEXT$ - .SUBSPA $CODE$ - -# -# Special register usage for context switch and interrupts -# Stay away from %cr28 which is used for TLB misses on 72000 -# - -isr_arg0 .reg %cr24 -isr_r9 .reg %cr25 -isr_r8 .reg %cr26 - -# -# Interrupt stack frame looks like this -# -# offset item -# ----------------------------------------------------------------- -# INTEGER_CONTEXT_OFFSET Context_Control -# FP_CONTEXT_OFFSET Context_Control_fp -# -# It is padded out to a multiple of 64 -# - - -# PAGE^L -# void _Generic_ISR_Handler() -# -# This routine provides the RTEMS interrupt management. -# -# We jump here from the interrupt vector. -# The HPPA hardware has done some stuff for us: -# PSW saved in IPSW -# PSW set to 0 -# PSW[E] set to default (0) -# PSW[M] set to 1 iff this is HPMC -# -# IIA queue is frozen (since PSW[Q] is now 0) -# privilege level promoted to 0 -# IIR, ISR, IOR potentially updated if PSW[Q] was 1 at trap -# registers GR 1,8,9,16,17,24,25 copied to shadow regs -# SHR 0 1 2 3 4 5 6 -# -# Our vector stub (in the BSP) MUST have done the following: -# -# a) Saved the original %r9 into %isr_r9 (%cr25) -# b) Placed the vector number in %r9 -# c) Was allowed to also destroy $isr_r8 (%cr26), -# but the stub was NOT allowed to destroy any other registers. -# -# The typical stub sequence (in the BSP) should look like this: -# -# a) mtctl %r9,isr_r9 ; (save r9 in cr25) -# b) ldi vector,%r9 ; (load constant vector number in r9) -# c) mtctl %r8,isr_r8 ; (save r8 in cr26) -# d) ldil L%MY_BSP_first_level_interrupt_handler,%r8 -# e) ldo R%MY_BSP_first_level_interrupt_handler(%r8),%r8 -# ; (point to BSP raw handler table) -# f) ldwx,s %r9(%r8),%r8 ; (load value from raw handler table) -# g) bv 0(%r8) ; (call raw handler: _Generic_ISR_Handler) -# h) mfctl isr_r8,%r8 ; (restore r8 from cr26 in delay slot) -# -# Optionally, steps (c) thru (h) _could_ be replaced with a single -# bl,n _Generic_ISR_Handler,%r0 -# -# -# - .EXPORT _Generic_ISR_Handler,ENTRY,PRIV_LEV=0 -_Generic_ISR_Handler: - .PROC - .CALLINFO FRAME=0,NO_CALLS - .ENTRY - - mtctl arg0, isr_arg0 - -# save interrupt state - mfctl ipsw, arg0 - stw arg0, IPSW_OFFSET(sp) - - mfctl iir, arg0 - stw arg0, IIR_OFFSET(sp) - - mfctl ior, arg0 - stw arg0, IOR_OFFSET(sp) - - mfctl pcoq, arg0 - stw arg0, PCOQFRONT_OFFSET(sp) - - mtctl %r0, pcoq - mfctl pcoq, arg0 - stw arg0, PCOQBACK_OFFSET(sp) - - mfctl %sar, arg0 - stw arg0, SAR_OFFSET(sp) - -# -# Build an interrupt frame to hold the contexts we will need. -# We have already saved the interrupt items on the stack - -# At this point the following registers are damaged wrt the interrupt -# reg current value saved value -# ------------------------------------------------ -# arg0 scratch isr_arg0 (cr24) -# r9 vector number isr_r9 (cr25) -# -# Point to beginning of integer context and -# save the integer context - stw %r1,R1_OFFSET(sp) - stw %r2,R2_OFFSET(sp) - stw %r3,R3_OFFSET(sp) - stw %r4,R4_OFFSET(sp) - stw %r5,R5_OFFSET(sp) - stw %r6,R6_OFFSET(sp) - stw %r7,R7_OFFSET(sp) - stw %r8,R8_OFFSET(sp) -# skip r9 - stw %r10,R10_OFFSET(sp) - stw %r11,R11_OFFSET(sp) - stw %r12,R12_OFFSET(sp) - stw %r13,R13_OFFSET(sp) - stw %r14,R14_OFFSET(sp) - stw %r15,R15_OFFSET(sp) - stw %r16,R16_OFFSET(sp) - stw %r17,R17_OFFSET(sp) - stw %r18,R18_OFFSET(sp) - stw %r19,R19_OFFSET(sp) - stw %r20,R20_OFFSET(sp) - stw %r21,R21_OFFSET(sp) - stw %r22,R22_OFFSET(sp) - stw %r23,R23_OFFSET(sp) - stw %r24,R24_OFFSET(sp) - stw %r25,R25_OFFSET(sp) -# skip arg0 - stw %r27,R27_OFFSET(sp) - stw %r28,R28_OFFSET(sp) - stw %r29,R29_OFFSET(sp) - stw %r30,R30_OFFSET(sp) - stw %r31,R31_OFFSET(sp) - -# Now most registers are available since they have been saved -# -# The following items are currently wrong in the integer context -# reg current value saved value -# ------------------------------------------------ -# arg0 scratch isr_arg0 (cr24) -# r9 vector number isr_r9 (cr25) -# -# Fix them - - mfctl isr_arg0,%r3 - stw %r3,ARG0_OFFSET(sp) - - mfctl isr_r9,%r3 - stw %r3,R9_OFFSET(sp) - -# -# At this point we are done with isr_arg0, and isr_r9 control registers -# -# Prepare to re-enter virtual mode -# We need Q in case the interrupt handler enables interrupts -# - - ldil L%CPU_PSW_DEFAULT, arg0 - ldo R%CPU_PSW_DEFAULT(arg0), arg0 - mtctl arg0, ipsw - -# Now jump to "rest_of_isr_handler" with the rfi -# We are assuming the space queues are all correct already - - ldil L%rest_of_isr_handler, arg0 - ldo R%rest_of_isr_handler(arg0), arg0 - mtctl arg0, pcoq - ldo 4(arg0), arg0 - mtctl arg0, pcoq - - rfi - nop - -# At this point we are back in virtual mode and all our -# normal addressing is once again ok. -# -# It is now ok to take an exception or trap -# - -rest_of_isr_handler: - -# Point to beginning of float context and -# save the floating point context -- doing whatever patches are necessary - .call ARGW0=GR - bl _CPU_Save_float_context,%r2 - ldo FP_CONTEXT_OFFSET(sp),arg0 - -# save the ptr to interrupt frame as an argument for the interrupt handler - copy sp, arg1 - -# Advance the frame to point beyond all interrupt contexts (integer & float) -# this also includes the pad to align to 64byte stack boundary - ldo CPU_INTERRUPT_FRAME_SIZE(sp), sp - -# r3 -- &_ISR_Nest_level -# r5 -- value _ISR_Nest_level -# r4 -- &_Thread_Dispatch_disable_level -# r6 -- value _Thread_Dispatch_disable_level -# r9 -- vector number - - .import _ISR_Nest_level,data - ldil L%_ISR_Nest_level,%r3 - ldo R%_ISR_Nest_level(%r3),%r3 - ldw 0(%r3),%r5 - - .import _Thread_Dispatch_disable_level,data - ldil L%_Thread_Dispatch_disable_level,%r4 - ldo R%_Thread_Dispatch_disable_level(%r4),%r4 - ldw 0(%r4),%r6 - -# increment interrupt nest level counter. If outermost interrupt -# switch the stack and squirrel away the previous sp. - addi 1,%r5,%r5 - stw %r5, 0(%r3) - -# compute and save new stack (with frame) -# just in case we are nested -- simpler this way - comibf,= 1,%r5,stack_done - ldo 128(sp),%r7 - -# -# Switch to interrupt stack allocated by the interrupt manager (intr.c) -# - .import _CPU_Interrupt_stack_low,data - ldil L%_CPU_Interrupt_stack_low,%r7 - ldw R%_CPU_Interrupt_stack_low(%r7),%r7 - ldo 128(%r7),%r7 - -stack_done: -# save our current stack pointer where the "old sp" is supposed to be - stw sp, -4(%r7) -# and switch stacks (or advance old stack in nested case) - copy %r7, sp - -# increment the dispatch disable level counter. - addi 1,%r6,%r6 - stw %r6, 0(%r4) - -# load address of user handler -# Note: No error checking is done, it is assumed that the -# vector table contains a valid address or a stub -# spurious handler. - .import _ISR_Vector_table,data - ldil L%_ISR_Vector_table,%r8 - ldo R%_ISR_Vector_table(%r8),%r8 - ldwx,s %r9(%r8),%r8 - -# invoke user interrupt handler -# Interrupts are currently disabled, as per RTEMS convention -# The handler has the option of re-enabling interrupts -# NOTE: can not use 'bl' since it uses "pc-relative" addressing -# and we are using a hard coded address from a table -# So... we fudge r2 ourselves (ala dynacall) -# arg0 = vector number, arg1 = ptr to rtems_interrupt_frame - copy %r9, %r26 - .call ARGW0=GR, ARGW1=GR - blr %r0, rp - bv,n 0(%r8) - -post_user_interrupt_handler: - -# Back from user handler(s) -# Disable external interrupts (since the interrupt handler could -# have turned them on) and return to the interrupted task stack (assuming -# (_ISR_Nest_level == 0) - - rsm HPPA_PSW_I + HPPA_PSW_R, %r0 - ldw -4(sp), sp - -# r3 -- (most of) &_ISR_Nest_level -# r5 -- value _ISR_Nest_level -# r4 -- (most of) &_Thread_Dispatch_disable_level -# r6 -- value _Thread_Dispatch_disable_level -# r7 -- (most of) &_ISR_Signals_to_thread_executing -# r8 -- value _ISR_Signals_to_thread_executing - - .import _ISR_Nest_level,data - ldil L%_ISR_Nest_level,%r3 - ldw R%_ISR_Nest_level(%r3),%r5 - - .import _Thread_Dispatch_disable_level,data - ldil L%_Thread_Dispatch_disable_level,%r4 - ldw R%_Thread_Dispatch_disable_level(%r4),%r6 - - .import _ISR_Signals_to_thread_executing,data - ldil L%_ISR_Signals_to_thread_executing,%r7 - -# decrement isr nest level - addi -1, %r5, %r5 - stw %r5, R%_ISR_Nest_level(%r3) - -# decrement dispatch disable level counter and, if not 0, go on - addi -1,%r6,%r6 - comibf,= 0,%r6,isr_restore - stw %r6, R%_Thread_Dispatch_disable_level(%r4) - -# check whether or not a context switch is necessary - .import _Context_Switch_necessary,data - ldil L%_Context_Switch_necessary,%r8 - ldw R%_Context_Switch_necessary(%r8),%r8 - comibf,=,n 0,%r8,ISR_dispatch - -# check whether or not a context switch is necessary because an ISR -# sent signals to the interrupted task - ldw R%_ISR_Signals_to_thread_executing(%r7),%r8 - comibt,=,n 0,%r8,isr_restore - - -# OK, something happened while in ISR and we need to switch to a task -# other than the one which was interrupted or the -# ISR_Signals_to_thread_executing case -# We also turn on interrupts, since the interrupted task had them -# on (obviously :-) and Thread_Dispatch is happy to leave ints on. -# - -ISR_dispatch: - stw %r0, R%_ISR_Signals_to_thread_executing(%r7) - - ssm HPPA_PSW_I, %r0 - - .import _Thread_Dispatch,code - .call - bl _Thread_Dispatch,%r2 - ldo 128(sp),sp - - ldo -128(sp),sp - -isr_restore: - -# enable interrupts during most of restore - ssm HPPA_PSW_I, %r0 - -# Get a pointer to beginning of our stack frame - ldo -CPU_INTERRUPT_FRAME_SIZE(sp), %arg1 - -# restore float - .call ARGW0=GR - bl _CPU_Restore_float_context,%r2 - ldo FP_CONTEXT_OFFSET(%arg1), arg0 - - copy %arg1, %arg0 - -# ********** FALL THRU ********** - -# Jump here from bottom of Context_Switch -# Also called directly by _CPU_Context_Restart_self via _Thread_Restart_self -# restore interrupt state -# - - .EXPORT _CPU_Context_restore -_CPU_Context_restore: - -# -# restore integer state -# - ldw R1_OFFSET(arg0),%r1 - ldw R2_OFFSET(arg0),%r2 - ldw R3_OFFSET(arg0),%r3 - ldw R4_OFFSET(arg0),%r4 - ldw R5_OFFSET(arg0),%r5 - ldw R6_OFFSET(arg0),%r6 - ldw R7_OFFSET(arg0),%r7 - ldw R8_OFFSET(arg0),%r8 - ldw R9_OFFSET(arg0),%r9 - ldw R10_OFFSET(arg0),%r10 - ldw R11_OFFSET(arg0),%r11 - ldw R12_OFFSET(arg0),%r12 - ldw R13_OFFSET(arg0),%r13 - ldw R14_OFFSET(arg0),%r14 - ldw R15_OFFSET(arg0),%r15 - ldw R16_OFFSET(arg0),%r16 - ldw R17_OFFSET(arg0),%r17 - ldw R18_OFFSET(arg0),%r18 - ldw R19_OFFSET(arg0),%r19 - ldw R20_OFFSET(arg0),%r20 - ldw R21_OFFSET(arg0),%r21 - ldw R22_OFFSET(arg0),%r22 - ldw R23_OFFSET(arg0),%r23 - ldw R24_OFFSET(arg0),%r24 -# skipping r25; used as scratch register below -# skipping r26 (arg0) until we are done with it - ldw R27_OFFSET(arg0),%r27 - ldw R28_OFFSET(arg0),%r28 - ldw R29_OFFSET(arg0),%r29 -# skipping r30 (sp) until we turn off interrupts - ldw R31_OFFSET(arg0),%r31 - -# Turn off Q & R & I so we can write r30 and interrupt control registers - rsm HPPA_PSW_Q + HPPA_PSW_R + HPPA_PSW_I, %r0 - -# now safe to restore r30 - ldw R30_OFFSET(arg0),%r30 - - ldw IPSW_OFFSET(arg0), %r25 - mtctl %r25, ipsw - - ldw SAR_OFFSET(arg0), %r25 - mtctl %r25, sar - - ldw PCOQFRONT_OFFSET(arg0), %r25 - mtctl %r25, pcoq - - ldw PCOQBACK_OFFSET(arg0), %r25 - mtctl %r25, pcoq - -# Load r25 with interrupts off - ldw R25_OFFSET(arg0),%r25 -# Must load r26 (arg0) last - ldw R26_OFFSET(arg0),%r26 - -isr_exit: - rfi - .EXIT - .PROCEND - -# -# This section is used to context switch floating point registers. -# Ref: 6-35 of Architecture 1.1 -# -# NOTE: since integer multiply uses the floating point unit, -# we have to save/restore fp on every trap. We cannot -# just try to keep track of fp usage. - - .align 32 - .EXPORT _CPU_Save_float_context,ENTRY,PRIV_LEV=0 -_CPU_Save_float_context: - .PROC - .CALLINFO FRAME=0,NO_CALLS - .ENTRY - fstds,ma %fr0,8(%arg0) - fstds,ma %fr1,8(%arg0) - fstds,ma %fr2,8(%arg0) - fstds,ma %fr3,8(%arg0) - fstds,ma %fr4,8(%arg0) - fstds,ma %fr5,8(%arg0) - fstds,ma %fr6,8(%arg0) - fstds,ma %fr7,8(%arg0) - fstds,ma %fr8,8(%arg0) - fstds,ma %fr9,8(%arg0) - fstds,ma %fr10,8(%arg0) - fstds,ma %fr11,8(%arg0) - fstds,ma %fr12,8(%arg0) - fstds,ma %fr13,8(%arg0) - fstds,ma %fr14,8(%arg0) - fstds,ma %fr15,8(%arg0) - fstds,ma %fr16,8(%arg0) - fstds,ma %fr17,8(%arg0) - fstds,ma %fr18,8(%arg0) - fstds,ma %fr19,8(%arg0) - fstds,ma %fr20,8(%arg0) - fstds,ma %fr21,8(%arg0) - fstds,ma %fr22,8(%arg0) - fstds,ma %fr23,8(%arg0) - fstds,ma %fr24,8(%arg0) - fstds,ma %fr25,8(%arg0) - fstds,ma %fr26,8(%arg0) - fstds,ma %fr27,8(%arg0) - fstds,ma %fr28,8(%arg0) - fstds,ma %fr29,8(%arg0) - fstds,ma %fr30,8(%arg0) - fstds %fr31,0(%arg0) - bv 0(%r2) - addi -(31*8), %arg0, %arg0 ; restore arg0 just for fun - .EXIT - .PROCEND - - .align 32 - .EXPORT _CPU_Restore_float_context,ENTRY,PRIV_LEV=0 -_CPU_Restore_float_context: - .PROC - .CALLINFO FRAME=0,NO_CALLS - .ENTRY - addi (31*8), %arg0, %arg0 ; point at last double - fldds 0(%arg0),%fr31 - fldds,mb -8(%arg0),%fr30 - fldds,mb -8(%arg0),%fr29 - fldds,mb -8(%arg0),%fr28 - fldds,mb -8(%arg0),%fr27 - fldds,mb -8(%arg0),%fr26 - fldds,mb -8(%arg0),%fr25 - fldds,mb -8(%arg0),%fr24 - fldds,mb -8(%arg0),%fr23 - fldds,mb -8(%arg0),%fr22 - fldds,mb -8(%arg0),%fr21 - fldds,mb -8(%arg0),%fr20 - fldds,mb -8(%arg0),%fr19 - fldds,mb -8(%arg0),%fr18 - fldds,mb -8(%arg0),%fr17 - fldds,mb -8(%arg0),%fr16 - fldds,mb -8(%arg0),%fr15 - fldds,mb -8(%arg0),%fr14 - fldds,mb -8(%arg0),%fr13 - fldds,mb -8(%arg0),%fr12 - fldds,mb -8(%arg0),%fr11 - fldds,mb -8(%arg0),%fr10 - fldds,mb -8(%arg0),%fr9 - fldds,mb -8(%arg0),%fr8 - fldds,mb -8(%arg0),%fr7 - fldds,mb -8(%arg0),%fr6 - fldds,mb -8(%arg0),%fr5 - fldds,mb -8(%arg0),%fr4 - fldds,mb -8(%arg0),%fr3 - fldds,mb -8(%arg0),%fr2 - fldds,mb -8(%arg0),%fr1 - bv 0(%r2) - fldds,mb -8(%arg0),%fr0 - .EXIT - .PROCEND - -# -# These 2 small routines are unused right now. -# Normally we just go thru _CPU_Save_float_context (and Restore) -# -# Here we just deref the ptr and jump up, letting _CPU_Save_float_context -# do the return for us. -# - .EXPORT _CPU_Context_save_fp,ENTRY,PRIV_LEV=0 -_CPU_Context_save_fp: - .PROC - .CALLINFO FRAME=0,NO_CALLS - .ENTRY - bl _CPU_Save_float_context, %r0 - ldw 0(%arg0), %arg0 - .EXIT - .PROCEND - - .EXPORT _CPU_Context_restore_fp,ENTRY,PRIV_LEV=0 -_CPU_Context_restore_fp: - .PROC - .CALLINFO FRAME=0,NO_CALLS - .ENTRY - bl _CPU_Restore_float_context, %r0 - ldw 0(%arg0), %arg0 - .EXIT - .PROCEND - - -# void _CPU_Context_switch( run_context, heir_context ) -# -# This routine performs a normal non-FP context switch. -# - - .align 32 - .EXPORT _CPU_Context_switch,ENTRY,PRIV_LEV=0,ARGW0=GR,ARGW1=GR -_CPU_Context_switch: - .PROC - .CALLINFO FRAME=64 - .ENTRY - -# Save the integer context - stw %r1,R1_OFFSET(arg0) - stw %r2,R2_OFFSET(arg0) - stw %r3,R3_OFFSET(arg0) - stw %r4,R4_OFFSET(arg0) - stw %r5,R5_OFFSET(arg0) - stw %r6,R6_OFFSET(arg0) - stw %r7,R7_OFFSET(arg0) - stw %r8,R8_OFFSET(arg0) - stw %r9,R9_OFFSET(arg0) - stw %r10,R10_OFFSET(arg0) - stw %r11,R11_OFFSET(arg0) - stw %r12,R12_OFFSET(arg0) - stw %r13,R13_OFFSET(arg0) - stw %r14,R14_OFFSET(arg0) - stw %r15,R15_OFFSET(arg0) - stw %r16,R16_OFFSET(arg0) - stw %r17,R17_OFFSET(arg0) - stw %r18,R18_OFFSET(arg0) - stw %r19,R19_OFFSET(arg0) - stw %r20,R20_OFFSET(arg0) - stw %r21,R21_OFFSET(arg0) - stw %r22,R22_OFFSET(arg0) - stw %r23,R23_OFFSET(arg0) - stw %r24,R24_OFFSET(arg0) - stw %r25,R25_OFFSET(arg0) - stw %r26,R26_OFFSET(arg0) - stw %r27,R27_OFFSET(arg0) - stw %r28,R28_OFFSET(arg0) - stw %r29,R29_OFFSET(arg0) - stw %r30,R30_OFFSET(arg0) - stw %r31,R31_OFFSET(arg0) - -# fill in interrupt context section - stw %r2, PCOQFRONT_OFFSET(%arg0) - ldo 4(%r2), %r2 - stw %r2, PCOQBACK_OFFSET(%arg0) - -# Generate a suitable IPSW by using the system default psw -# with the current low bits added in. - - ldil L%CPU_PSW_DEFAULT, %r2 - ldo R%CPU_PSW_DEFAULT(%r2), %r2 - ssm 0, %arg2 - dep %arg2, 31, 8, %r2 - stw %r2, IPSW_OFFSET(%arg0) - -# at this point, the running task context is completely saved -# Now jump to the bottom of the interrupt handler to load the -# heirs context - - b _CPU_Context_restore - copy %arg1, %arg0 - - .EXIT - .PROCEND - - -/* - * Find first bit - * NOTE: - * This is used (and written) only for the ready chain code and - * priority bit maps. - * Any other use constitutes fraud. - * Returns first bit from the least significant side. - * Eg: if input is 0x8001 - * output will indicate the '1' bit and return 0. - * This is counter to HPPA bit numbering which calls this - * bit 31. This way simplifies the macros _CPU_Priority_Mask - * and _CPU_Priority_Bits_index. - * - * NOTE: - * We just use 16 bit version - * does not handle zero case - * - * Based on the UTAH Mach libc version of ffs. - */ - - .align 32 - .EXPORT hppa_rtems_ffs,ENTRY,PRIV_LEV=0,ARGW0=GR -hppa_rtems_ffs: - .PROC - .CALLINFO FRAME=0,NO_CALLS - .ENTRY - -#ifdef RETURN_ERROR_ON_ZERO - comb,= %arg0,%r0,ffsdone ; If arg0 is 0 - ldi -1,%ret0 ; return -1 -#endif - -#if BITFIELD_SIZE == 32 - ldi 31,%ret0 ; Set return to high bit - extru,= %arg0,31,16,%r0 ; If low 16 bits are non-zero - addi,tr -16,%ret0,%ret0 ; subtract 16 from bitpos - shd %r0,%arg0,16,%arg0 ; else shift right 16 bits -#else - ldi 15,%ret0 ; Set return to high bit -#endif - extru,= %arg0,31,8,%r0 ; If low 8 bits are non-zero - addi,tr -8,%ret0,%ret0 ; subtract 8 from bitpos - shd %r0,%arg0,8,%arg0 ; else shift right 8 bits - extru,= %arg0,31,4,%r0 ; If low 4 bits are non-zero - addi,tr -4,%ret0,%ret0 ; subtract 4 from bitpos - shd %r0,%arg0,4,%arg0 ; else shift right 4 bits - extru,= %arg0,31,2,%r0 ; If low 2 bits are non-zero - addi,tr -2,%ret0,%ret0 ; subtract 2 from bitpos - shd %r0,%arg0,2,%arg0 ; else shift right 2 bits - extru,= %arg0,31,1,%r0 ; If low bit is non-zero - addi -1,%ret0,%ret0 ; subtract 1 from bitpos -ffsdone: - bv,n 0(%r2) - nop - .EXIT - .PROCEND diff --git a/c/src/exec/score/cpu/hppa1.1/hppa.h b/c/src/exec/score/cpu/hppa1.1/hppa.h deleted file mode 100644 index 87ba027aab..0000000000 --- a/c/src/exec/score/cpu/hppa1.1/hppa.h +++ /dev/null @@ -1,745 +0,0 @@ -/* - * Description: - * - * Definitions for HP PA Risc - * ref: PA RISC 1.1 Architecture and Instruction Set Reference Manual - * - * COPYRIGHT (c) 1994 by Division Incorporated - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of Division Incorporated not be - * used in advertising or publicity pertaining to distribution - * of the software without specific, written prior permission. - * Division Incorporated makes no representations about the - * suitability of this software for any purpose. - * - * - * Note: - * This file is included by both C and assembler code ( -DASM ) - * - * $Id$ - */ - -#ifndef _INCLUDE_HPPA_H -#define _INCLUDE_HPPA_H - -#if defined(__cplusplus) -extern "C" { -#endif - -/* - * The following define the CPU Family and Model within the family - * - * NOTE: The string "REPLACE_THIS_WITH_THE_CPU_MODEL" is replaced - * with the name of the appropriate macro for this target CPU. - */ - -#ifdef hppa1_1 -#undef hppa1_1 -#endif -#define hppa1_1 - -#ifdef REPLACE_THIS_WITH_THE_CPU_MODEL -#undef REPLACE_THIS_WITH_THE_CPU_MODEL -#endif -#define REPLACE_THIS_WITH_THE_CPU_MODEL - -#ifdef REPLACE_THIS_WITH_THE_BSP -#undef REPLACE_THIS_WITH_THE_BSP -#endif -#define REPLACE_THIS_WITH_THE_BSP - -/* - * This section contains the information required to build - * RTEMS for a particular member of the Hewlett Packard - * PA-RISC family. It does this by setting variables to - * indicate which implementation dependent features are - * present in a particular member of the family. - */ - -#if !defined(CPU_MODEL_NAME) - -#if defined(hppa7100) - -#define CPU_MODEL_NAME "hppa 7100" - -#elif defined(hppa7200) - -#define CPU_MODEL_NAME "hppa 7200" - -#else - -#define CPU_MODEL_NAME Unsupported CPU Model /* cause an error on usage */ - -#endif - -#endif /* !defined(CPU_MODEL_NAME) */ - -/* - * Define the name of the CPU family. - */ - -#if !defined(CPU_NAME) -#define CPU_NAME "HP PA-RISC 1.1" -#endif - -/* - * Processor Status Word (PSW) Masks - */ - -#define HPPA_PSW_Y 0x80000000 /* Data Debug Trap Disable */ -#define HPPA_PSW_Z 0x40000000 /* Instruction Debug Trap Disable */ -#define HPPA_PSW_r2 0x20000000 /* reserved */ -#define HPPA_PSW_r3 0x10000000 /* reserved */ -#define HPPA_PSW_r4 0x08000000 /* reserved */ -#define HPPA_PSW_E 0x04000000 /* Little Endian on Memory References */ -#define HPPA_PSW_S 0x02000000 /* Secure Interval Timer */ -#define HPPA_PSW_T 0x01000000 /* Taken Branch Trap Enable */ -#define HPPA_PSW_H 0x00800000 /* Higher-Privilege Transfer Trap Enable*/ -#define HPPA_PSW_L 0x00400000 /* Lower-Privilege Transfer Trap Enable */ -#define HPPA_PSW_N 0x00200000 /* PC Queue Front Instruction Nullified */ -#define HPPA_PSW_X 0x00100000 /* Data Memory Break Disable */ -#define HPPA_PSW_B 0x00080000 /* Taken Branch in Previous Cycle */ -#define HPPA_PSW_C 0x00040000 /* Code Address Translation Enable */ -#define HPPA_PSW_V 0x00020000 /* Divide Step Correction */ -#define HPPA_PSW_M 0x00010000 /* High-Priority Machine Check Disable */ -#define HPPA_PSW_CB 0x0000ff00 /* Carry/Borrow Bits */ -#define HPPA_PSW_r24 0x00000080 /* reserved */ -#define HPPA_PSW_G 0x00000040 /* Debug trap Enable */ -#define HPPA_PSW_F 0x00000020 /* Performance monitor interrupt unmask */ -#define HPPA_PSW_R 0x00000010 /* Recovery Counter Enable */ -#define HPPA_PSW_Q 0x00000008 /* Interruption State Collection Enable */ -#define HPPA_PSW_P 0x00000004 /* Protection ID Validation Enable */ -#define HPPA_PSW_D 0x00000002 /* Data Address Translation Enable */ -#define HPPA_PSW_I 0x00000001 /* External, Power Failure, */ - /* Low-Priority Machine Check */ - /* Interruption Enable */ - -/* - * HPPA traps and interrupts - * basic layout. Note numbers do not denote priority - * - * 0-31 basic traps and interrupts defined by HPPA architecture - * 0-31 32 external interrupts - * 32-... bsp defined - */ - -#define HPPA_TRAP_NON_EXISTENT 0 -/* group 1 */ -#define HPPA_TRAP_HIGH_PRIORITY_MACHINE_CHECK 1 -/* group 2 */ -#define HPPA_TRAP_POWER_FAIL 2 -#define HPPA_TRAP_RECOVERY_COUNTER 3 -#define HPPA_TRAP_EXTERNAL_INTERRUPT 4 -#define HPPA_TRAP_LOW_PRIORITY_MACHINE_CHECK 5 -#define HPPA_TRAP_PERFORMANCE_MONITOR 29 -/* group 3 */ -#define HPPA_TRAP_INSTRUCTION_TLB_MISS 6 -#define HPPA_TRAP_INSTRUCTION_MEMORY_PROTECTION 7 -#define HPPA_TRAP_INSTRUCTION_DEBUG 30 -#define HPPA_TRAP_ILLEGAL_INSTRUCTION 8 -#define HPPA_TRAP_BREAK_INSTRUCTION 9 -#define HPPA_TRAP_PRIVILEGED_OPERATION 10 -#define HPPA_TRAP_PRIVILEGED_REGISTER 11 -#define HPPA_TRAP_OVERFLOW 12 -#define HPPA_TRAP_CONDITIONAL 13 -#define HPPA_TRAP_ASSIST_EXCEPTION 14 -#define HPPA_TRAP_DATA_TLB_MISS 15 -#define HPPA_TRAP_NON_ACCESS_INSTRUCTION_TLB_MISS 16 -#define HPPA_TRAP_NON_ACCESS_DATA_TLB_MISS 17 -#define HPPA_TRAP_DATA_MEMORY_ACCESS_RIGHTS 26 -#define HPPA_TRAP_DATA_MEMORY_PROTECTION_ID 27 -#define HPPA_TRAP_UNALIGNED_DATA_REFERENCE 28 -#define HPPA_TRAP_DATA_MEMORY_PROTECTION 18 -#define HPPA_TRAP_DATA_MEMORY_BREAK 19 -#define HPPA_TRAP_TLB_DIRTY_BIT 20 -#define HPPA_TRAP_PAGE_REFERENCE 21 -#define HPPA_TRAP_DATA_DEBUG 31 -#define HPPA_TRAP_ASSIST_EMULATION 22 -/* group 4 */ -#define HPPA_TRAP_HIGHER_PRIVILEGE_TRANSFER 23 -#define HPPA_TRAP_LOWER_PRIVILEGE_TRANSFER 24 -#define HPPA_TRAP_TAKEN_BRANCH 25 - -#define HPPA_INTERNAL_TRAPS 32 - -/* External Interrupts via interrupt 4 */ - -#define HPPA_INTERRUPT_EXTERNAL_0 0 -#define HPPA_INTERRUPT_EXTERNAL_1 1 -#define HPPA_INTERRUPT_EXTERNAL_2 2 -#define HPPA_INTERRUPT_EXTERNAL_3 3 -#define HPPA_INTERRUPT_EXTERNAL_4 4 -#define HPPA_INTERRUPT_EXTERNAL_5 5 -#define HPPA_INTERRUPT_EXTERNAL_6 6 -#define HPPA_INTERRUPT_EXTERNAL_7 7 -#define HPPA_INTERRUPT_EXTERNAL_8 8 -#define HPPA_INTERRUPT_EXTERNAL_9 9 -#define HPPA_INTERRUPT_EXTERNAL_10 10 -#define HPPA_INTERRUPT_EXTERNAL_11 11 -#define HPPA_INTERRUPT_EXTERNAL_12 12 -#define HPPA_INTERRUPT_EXTERNAL_13 13 -#define HPPA_INTERRUPT_EXTERNAL_14 14 -#define HPPA_INTERRUPT_EXTERNAL_15 15 -#define HPPA_INTERRUPT_EXTERNAL_16 16 -#define HPPA_INTERRUPT_EXTERNAL_17 17 -#define HPPA_INTERRUPT_EXTERNAL_18 18 -#define HPPA_INTERRUPT_EXTERNAL_19 19 -#define HPPA_INTERRUPT_EXTERNAL_20 20 -#define HPPA_INTERRUPT_EXTERNAL_21 21 -#define HPPA_INTERRUPT_EXTERNAL_22 22 -#define HPPA_INTERRUPT_EXTERNAL_23 23 -#define HPPA_INTERRUPT_EXTERNAL_24 24 -#define HPPA_INTERRUPT_EXTERNAL_25 25 -#define HPPA_INTERRUPT_EXTERNAL_26 26 -#define HPPA_INTERRUPT_EXTERNAL_27 27 -#define HPPA_INTERRUPT_EXTERNAL_28 28 -#define HPPA_INTERRUPT_EXTERNAL_29 29 -#define HPPA_INTERRUPT_EXTERNAL_30 30 -#define HPPA_INTERRUPT_EXTERNAL_31 31 - -#define HPPA_INTERRUPT_EXTERNAL_INTERVAL_TIMER HPPA_INTERRUPT_EXTERNAL_0 -#define HPPA_EXTERNAL_INTERRUPTS 32 - -/* BSP defined interrupts begin here */ - -#define HPPA_INTERRUPT_MAX 32 - -/* - * Cache characteristics - */ - -#define HPPA_CACHELINE_SIZE 32 -#define HPPA_CACHELINE_MASK (HPPA_CACHELINE_SIZE - 1) - -/* - * page size characteristics - */ - -#define HPPA_PAGE_SIZE 4096 -#define HPPA_PAGE_MASK (0xfffff000) - - -/* - * TLB characteristics - * - * Flags and Access Control layout for using TLB protection insertion - * - * 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 - * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * |?|?|T|D|B|type |PL1|Pl2|U| access id |?| - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * - */ - -/* - * Access rights (type + PL1 + PL2) - */ -#define HPPA_PROT_R 0x00c00000 /* Read Only, no Write, no Execute */ -#define HPPA_PROT_RW 0x01c00000 /* Read & Write Only, no Execute */ -#define HPPA_PROT_RX 0x02c00000 /* Read & Execute Only, no Write */ -#define HPPA_PROT_RWX 0x03c00000 /* Read, Write, Execute */ -#define HPPA_PROT_X0 0x04c00000 /* Execute Only, Promote to Level 0 */ -#define HPPA_PROT_X1 0x05c00000 /* Execute Only, Promote to Level 1 */ -#define HPPA_PROT_X2 0x06c00000 /* Execute Only, Promote to Level 2 */ -#define HPPA_PROT_X3 0x07c00000 /* Execute Only, Promote to Level 3 */ - -/* - * Floating point status register definitions - */ - -#define HPPA_FPSTATUS_ENABLE_I 0x00000001 /* inexact operation */ -#define HPPA_FPSTATUS_ENABLE_U 0x00000002 /* underflow */ -#define HPPA_FPSTATUS_ENABLE_O 0x00000004 /* overflow */ -#define HPPA_FPSTATUS_ENABLE_Z 0x00000008 /* division by zero */ -#define HPPA_FPSTATUS_ENABLE_V 0x00000010 /* invalid operation */ -#define HPPA_FPSTATUS_D 0x00000020 /* denormalize as zero */ -#define HPPA_FPSTATUS_T 0x00000040 /* delayed trap */ -#define HPPA_FPSTATUS_RM_MASK 0x00000600 /* rounding mode */ -#define HPPA_FPSTATUS_RM_SHIFT 9 -#define HPPA_FPSTATUS_CQ_MASK 0x001FFC00 /* compare queue */ -#define HPPA_FPSTATUS_CQ_SHIFT 13 -#define HPPA_FPSTATUS_C 0x04000000 /* most recent ompare bit */ -#define HPPA_FPSTATUS_FLAG_I 0x08000000 /* inexact */ -#define HPPA_FPSTATUS_FLAG_U 0x10000000 /* underflow */ -#define HPPA_FPSTATUS_FLAG_O 0x20000000 /* overflow */ -#define HPPA_FPSTATUS_FLAG_Z 0x40000000 /* division by zero */ -#define HPPA_FPSTATUS_FLAG_V 0x80000000 /* invalid operation */ - - -/* - * Inline macros for misc. interesting opcodes - */ - -/* generate a global label */ -#define HPPA_ASM_LABEL(label) \ - asm(".export " label ", ! .label " label); - -/* Return From Interrupt RFI */ -#define HPPA_ASM_RFI() asm volatile ("rfi") - -/* Set System Mask SSM i,t */ -#define HPPA_ASM_SSM(i,gr) asm volatile ("ssm %1, %0" \ - : "=r" (gr) \ - : "i" (i)) -/* Reset System Mask RSM i,t */ -#define HPPA_ASM_RSM(i,gr) asm volatile ("rsm %1, %0" \ - : "=r" (gr) \ - : "i" (i)) -/* Move To System Mask MTSM r */ -#define HPPA_ASM_MTSM(gr) asm volatile ("mtsm %0" \ - : : "r" (gr)) - -/* Load Space Identifier LDSID (s,b),t */ -#define HPPA_ASM_LDSID(sr,grb,grt) asm volatile ("ldsid (%1,%2),%0" \ - : "=r" (grt) \ - : "i" (sr), \ - "r" (grb)) - -/* - * Gcc extended asm doesn't really allow for treatment of space registers - * as "registers", so we have to use "i" format. - * Unfortunately this means that the "=" constraint is not available. - */ - -/* Move To Space Register MTSP r,sr */ -#define HPPA_ASM_MTSP(gr,sr) asm volatile ("mtsp %1,%0" \ - : : "i" (sr), \ - "r" (gr)) - -/* Move From Space Register MFSP sr,t */ -#define HPPA_ASM_MFSP(sr,gr) asm volatile ("mfsp %1,%0" \ - : "=r" (gr) \ - : "i" (sr)) - -/* Move To Control register MTCTL r,t */ -#define HPPA_ASM_MTCTL(gr,cr) asm volatile ("mtctl %1,%0" \ - : : "i" (cr), \ - "r" (gr)) - -/* Move From Control register MFCTL r,t */ -#define HPPA_ASM_MFCTL(cr,gr) asm volatile ("mfctl %1,%0" \ - : "=r" (gr) \ - : "i" (cr)) - -/* Synchronize caches SYNC */ -#define HPPA_ASM_SYNC() asm volatile ("sync") - -/* Probe Read Access PROBER (s,b),r,t */ -#define HPPA_ASM_PROBER(sr,groff,gracc,grt) \ - asm volatile ("prober (%1,%2),%3,%0" \ - : "=r" (grt) \ - : "i" (sr), \ - "r" (groff), \ - "r" (gracc)) - -/* Probe Read Access Immediate PROBERI (s,b),i,t*/ -#define HPPA_ASM_PROBERI(sr,groff,iacc,grt) \ - asm volatile ("proberi (%1,%2),%3,%0" \ - : "=r" (grt) \ - : "i" (sr), \ - "r" (groff), \ - "i" (iacc)) - -/* Probe Write Access PROBEW (s,b),r,t */ -#define HPPA_ASM_PROBEW(sr,groff,gracc,grt) \ - asm volatile ("probew (%1,%2),%3,%0" \ - : "=r" (grt) \ - : "i" (sr), \ - "r" (groff), \ - "r" (gracc)) - -/* Probe Write Access Immediate PROBEWI (s,b),i,t */ -#define HPPA_ASM_PROBEWI(sr,groff,iacc,grt) \ - asm volatile ("probewi (%1,%2),%3,%0" \ - : "=r" (grt) \ - : "i" (sr), \ - "r" (groff), \ - "i" (iacc)) - -/* Load Physical Address LPA x(s,b),t */ -#define HPPA_ASM_LPA(sr,grb,grt) asm volatile ("lpa %%r0(%1,%2),%0" \ - : "=r" (grt) \ - : "i" (sr), \ - "r" (grb)) - -/* Load Coherence Index LCI x(s,b),t */ -/* AKA: Load Hash Address LHA x(s,b),t */ -#define HPPA_ASM_LCI(grx,sr,grb,grt) asm volatile ("lha %1(%2,%3),%0" \ - : "=r" (grt) \ - : "r" (grx),\ - "i" (sr), \ - "r" (grb)) -#define HPPA_ASM_LHA(grx,sr,grb,grt) HPPA_ASM_LCI(grx,sr,grb,grt) - -/* Purge Data Tlb PDTLB x(s,b) */ -#define HPPA_ASM_PDTLB(grx,sr,grb) asm volatile ("pdtlb %0(%1,%2)" \ - : : "r" (grx), \ - "i" (sr), \ - "r" (grb)) - -/* Purge Instruction Tlb PITLB x(s,b) */ -#define HPPA_ASM_PITLB(grx,sr,grb) asm volatile ("pitlb %0(%1,%2)" \ - : : "r" (grx), \ - "i" (sr), \ - "r" (grb)) - -/* Purge Data Tlb Entry PDTLBE x(s,b) */ -#define HPPA_ASM_PDTLBE(grx,sr,grb) asm volatile ("pdtlbe %0(%1,%2)" \ - : : "r" (grx), \ - "i" (sr), \ - "r" (grb)) - -/* Purge Instruction Tlb Entry PITLBE x(s,b) */ -#define HPPA_ASM_PITLBE(grx,sr,grb) asm volatile ("pitlbe %0(%1,%2)" \ - : : "r" (grx), \ - "i" (sr), \ - "r" (grb)) - - -/* Insert Data TLB Address IDTLBA r,(s,b) */ -#define HPPA_ASM_IDTLBA(gr,sr,grb) asm volatile ("idtlba %0,(%1,%2)" \ - : : "r" (gr), \ - "i" (sr), \ - "r" (grb)) - -/* Insert Instruction TLB Address IITLBA r,(s,b) */ -#define HPPA_ASM_IITLBA(gr,sr,grb) asm volatile ("iitlba %0,(%1,%2)" \ - : : "r" (gr), \ - "i" (sr), \ - "r" (grb)) - -/* Insert Data TLB Protection IDTLBP r,(s,b) */ -#define HPPA_ASM_IDTLBP(gr,sr,grb) asm volatile ("idtlbp %0,(%1,%2)" \ - : : "r" (gr), \ - "i" (sr), \ - "r" (grb)) - -/* Insert Instruction TLB Protection IITLBP r,(s,b) */ -#define HPPA_ASM_IITLBP(gr,sr,grb) asm volatile ("iitlbp %0,(%1,%2)" \ - : : "r" (gr), \ - "i" (sr), \ - "r" (grb)) - -/* Purge Data Cache PDC x(s,b) */ -#define HPPA_ASM_PDC(grx,sr,grb) asm volatile ("pdc %0(%1,%2)" \ - : : "r" (grx), \ - "i" (sr), \ - "r" (grb)) - -/* Flush Data Cache FDC x(s,b) */ -#define HPPA_ASM_FDC(grx,sr,grb) asm volatile ("fdc %0(%1,%2)" \ - : : "r" (grx), \ - "i" (sr), \ - "r" (grb)) - -/* Flush Instruction Cache FDC x(s,b) */ -#define HPPA_ASM_FIC(grx,sr,grb) asm volatile ("fic %0(%1,%2)" \ - : : "r" (grx), \ - "i" (sr), \ - "r" (grb)) - -/* Flush Data Cache Entry FDCE x(s,b) */ -#define HPPA_ASM_FDCE(grx,sr,grb) asm volatile ("fdce %0(%1,%2)" \ - : : "r" (grx), \ - "i" (sr), \ - "r" (grb)) - -/* Flush Instruction Cache Entry FICE x(s,b) */ -#define HPPA_ASM_FICE(grx,sr,grb) asm volatile ("fice %0(%1,%2)" \ - : : "r" (grx), \ - "i" (sr), \ - "r" (grb)) - -/* Break BREAK i5,i13 */ -#define HPPA_ASM_BREAK(i5,i13) asm volatile ("break %0,%1" \ - : : "i" (i5), \ - "i" (i13)) - -/* Load and Clear Word Short LDCWS d(s,b),t */ -#define HPPA_ASM_LDCWS(i,sr,grb,grt) asm volatile ("ldcws %1(%2,%3),%0" \ - : "=r" (grt) \ - : "i" (i), \ - "i" (sr), \ - "r" (grb)) - -/* Load and Clear Word Indexed LDCWX x(s,b),t */ -#define HPPA_ASM_LDCWX(grx,sr,grb,grt) asm volatile ("ldcwx %1(%2,%3),%0" \ - : "=r" (grt) \ - : "r" (grx), \ - "i" (sr), \ - "r" (grb)) - -/* Load Word Absolute Short LDWAS d(b),t */ -/* NOTE: "short" here means "short displacement" */ -#define HPPA_ASM_LDWAS(disp,grbase,gr) asm volatile("ldwas %1(%2),%0" \ - : "=r" (gr) \ - : "i" (disp), \ - "r" (grbase)) - -/* Store Word Absolute Short STWAS r,d(b) */ -/* NOTE: "short" here means "short displacement" */ -#define HPPA_ASM_STWAS(gr,disp,grbase) asm volatile("stwas %0,%1(%2)" \ - : : "r" (gr), \ - "i" (disp), \ - "r" (grbase)) - -/* - * Swap bytes - * REFERENCE: PA72000 TRM -- Appendix C - */ -#define HPPA_ASM_SWAPBYTES(value, swapped) asm volatile( \ - " shd %1,%1,16,%0 \n\ - dep %0,15,8,%0 \n\ - shd %1,%0,8,%0" \ - : "=r" (swapped) \ - : "r" (value) \ - ) - - -/* 72000 Diagnose instructions follow - * These macros assume gas knows about these instructions. - * gas2.2.u1 did not. - * I added them to my copy and installed it locally. - * - * There are *very* special requirements for these guys - * ref: TRM 6.1.3 Programming Constraints - * - * The macros below handle the following rules - * - * Except for WIT, WDT, WDD, WIDO, WIDE, all DIAGNOSE must be doubled. - * Must never be nullified (hence the leading nop) - * NOP must preced every RDD,RDT,WDD,WDT,RDTLB - * Instruction preceeding GR_SHDW must not set any of the GR's saved - * - * The macros do *NOT* deal with the following problems - * doubled DIAGNOSE instructions must not straddle a page boundary - * if code translation enabled. (since 2nd could trap on ITLB) - * If you care about DHIT and DPE bits of DR0, then - * No store instruction in the 2 insn window before RDD - */ - - -/* Move To CPU/DIAG register MTCPU r,t */ -#define HPPA_ASM_MTCPU(gr,dr) asm volatile (" nop \n" \ - " mtcpu %1,%0 \n" \ - " mtcpu %1,%0" \ - : : "i" (dr), \ - "r" (gr)) - -/* Move From CPU/DIAG register MFCPU r,t */ -#define HPPA_ASM_MFCPU(dr,gr) asm volatile (" nop \n" \ - " mfcpu %1,%0\n" \ - " mfcpu %1,%0" \ - : "=r" (gr) \ - : "i" (dr)) - -/* Transfer of Control Enable TOC_EN */ -#define HPPA_ASM_TOC_EN() asm volatile (" tocen \n" \ - " tocen") - -/* Transfer of Control Disable TOC_DIS */ -#define HPPA_ASM_TOC_DIS() asm volatile (" tocdis \n" \ - " tocdis") - -/* Shadow Registers to General Register SHDW_GR */ -#define HPPA_ASM_SHDW_GR() asm volatile (" shdwgr \n" \ - " shdwgr" \ - ::: "r1" "r8" "r9" "r16" \ - "r17" "r24" "r25") - -/* General Registers to Shadow Register GR_SHDW */ -#define HPPA_ASM_GR_SHDW() asm volatile (" nop \n" \ - " grshdw \n" \ - " grshdw") - -/* - * Definitions of special registers for use by the above macros. - */ - -/* Hardware Space Registers */ -#define HPPA_SR0 0 -#define HPPA_SR1 1 -#define HPPA_SR2 2 -#define HPPA_SR3 3 -#define HPPA_SR4 4 -#define HPPA_SR5 5 -#define HPPA_SR6 6 -#define HPPA_SR7 7 - -/* Hardware Control Registers */ -#define HPPA_CR0 0 -#define HPPA_RCTR 0 /* Recovery Counter Register */ - -#define HPPA_CR8 8 /* Protection ID 1 */ -#define HPPA_PIDR1 8 - -#define HPPA_CR9 9 /* Protection ID 2 */ -#define HPPA_PIDR2 9 - -#define HPPA_CR10 10 -#define HPPA_CCR 10 /* Coprocessor Confiquration Register */ - -#define HPPA_CR11 11 -#define HPPA_SAR 11 /* Shift Amount Register */ - -#define HPPA_CR12 12 -#define HPPA_PIDR3 12 /* Protection ID 3 */ - -#define HPPA_CR13 13 -#define HPPA_PIDR4 13 /* Protection ID 4 */ - -#define HPPA_CR14 14 -#define HPPA_IVA 14 /* Interrupt Vector Address */ - -#define HPPA_CR15 15 -#define HPPA_EIEM 15 /* External Interrupt Enable Mask */ - -#define HPPA_CR16 16 -#define HPPA_ITMR 16 /* Interval Timer */ - -#define HPPA_CR17 17 -#define HPPA_PCSQ 17 /* Program Counter Space queue */ - -#define HPPA_CR18 18 -#define HPPA_PCOQ 18 /* Program Counter Offset queue */ - -#define HPPA_CR19 19 -#define HPPA_IIR 19 /* Interruption Instruction Register */ - -#define HPPA_CR20 20 -#define HPPA_ISR 20 /* Interruption Space Register */ - -#define HPPA_CR21 21 -#define HPPA_IOR 21 /* Interruption Offset Register */ - -#define HPPA_CR22 22 -#define HPPA_IPSW 22 /* Interrpution Processor Status Word */ - -#define HPPA_CR23 23 -#define HPPA_EIRR 23 /* External Interrupt Request */ - -#define HPPA_CR24 24 -#define HPPA_PPDA 24 /* Physcial Page Directory Address */ -#define HPPA_TR0 24 /* Temporary register 0 */ - -#define HPPA_CR25 25 -#define HPPA_HTA 25 /* Hash Table Address */ -#define HPPA_TR1 25 /* Temporary register 1 */ - -#define HPPA_CR26 26 -#define HPPA_TR2 26 /* Temporary register 2 */ - -#define HPPA_CR27 27 -#define HPPA_TR3 27 /* Temporary register 3 */ - -#define HPPA_CR28 28 -#define HPPA_TR4 28 /* Temporary register 4 */ - -#define HPPA_CR29 29 -#define HPPA_TR5 29 /* Temporary register 5 */ - -#define HPPA_CR30 30 -#define HPPA_TR6 30 /* Temporary register 6 */ - -#define HPPA_CR31 31 -#define HPPA_CPUID 31 /* MP identifier */ - -/* - * Diagnose registers - */ - -#define HPPA_DR0 0 -#define HPPA_DR1 1 -#define HPPA_DR8 8 -#define HPPA_DR24 24 -#define HPPA_DR25 25 - -/* - * Tear apart a break instruction to find its type. - */ -#define HPPA_BREAK5(x) ((x) & 0x1F) -#define HPPA_BREAK13(x) (((x) >> 13) & 0x1FFF) - -/* assemble a break instruction */ -#define HPPA_BREAK(i5,i13) (((i5) & 0x1F) | (((i13) & 0x1FFF) << 13)) - - -/* - * this won't work in ASM or non-GNU compilers - */ - -#if !defined(ASM) && defined(__GNUC__) - -/* - * static inline utility functions to get at control registers - */ - -#define EMIT_GET_CONTROL(name, reg) \ -static __inline__ unsigned int \ -get_ ## name (void) \ -{ \ - unsigned int value; \ - HPPA_ASM_MFCTL(reg, value); \ - return value; \ -} - -#define EMIT_SET_CONTROL(name, reg) \ -static __inline__ void \ -set_ ## name (unsigned int new_value) \ -{ \ - HPPA_ASM_MTCTL(new_value, reg); \ -} - -#define EMIT_CONTROLS(name, reg) \ - EMIT_GET_CONTROL(name, reg) \ - EMIT_SET_CONTROL(name, reg) - -EMIT_CONTROLS(recovery, HPPA_RCTR); /* CR0 */ -EMIT_CONTROLS(pid1, HPPA_PIDR1); /* CR8 */ -EMIT_CONTROLS(pid2, HPPA_PIDR2); /* CR9 */ -EMIT_CONTROLS(ccr, HPPA_CCR); /* CR10; CCR and SCR share CR10 */ -EMIT_CONTROLS(scr, HPPA_CCR); /* CR10; CCR and SCR share CR10 */ -EMIT_CONTROLS(sar, HPPA_SAR); /* CR11 */ -EMIT_CONTROLS(pid3, HPPA_PIDR3); /* CR12 */ -EMIT_CONTROLS(pid4, HPPA_PIDR4); /* CR13 */ -EMIT_CONTROLS(iva, HPPA_IVA); /* CR14 */ -EMIT_CONTROLS(eiem, HPPA_EIEM); /* CR15 */ -EMIT_CONTROLS(itimer, HPPA_ITMR); /* CR16 */ -EMIT_CONTROLS(pcsq, HPPA_PCSQ); /* CR17 */ -EMIT_CONTROLS(pcoq, HPPA_PCOQ); /* CR18 */ -EMIT_CONTROLS(iir, HPPA_IIR); /* CR19 */ -EMIT_CONTROLS(isr, HPPA_ISR); /* CR20 */ -EMIT_CONTROLS(ior, HPPA_IOR); /* CR21 */ -EMIT_CONTROLS(ipsw, HPPA_IPSW); /* CR22 */ -EMIT_CONTROLS(eirr, HPPA_EIRR); /* CR23 */ -EMIT_CONTROLS(tr0, HPPA_TR0); /* CR24 */ -EMIT_CONTROLS(tr1, HPPA_TR1); /* CR25 */ -EMIT_CONTROLS(tr2, HPPA_TR2); /* CR26 */ -EMIT_CONTROLS(tr3, HPPA_TR3); /* CR27 */ -EMIT_CONTROLS(tr4, HPPA_TR4); /* CR28 */ -EMIT_CONTROLS(tr5, HPPA_TR5); /* CR29 */ -EMIT_CONTROLS(tr6, HPPA_TR6); /* CR30 */ -EMIT_CONTROLS(tr7, HPPA_CR31); /* CR31 */ - -#endif /* ASM and GNU */ - -/* - * If and How to invoke the debugger (a ROM debugger generally) - */ -#define CPU_INVOKE_DEBUGGER \ - do { \ - HPPA_ASM_BREAK(1,1); \ - } while (0) - -#ifdef __cplusplus -} -#endif - -#endif /* ! _INCLUDE_HPPA_H */ - diff --git a/c/src/exec/score/cpu/hppa1.1/hppatypes.h b/c/src/exec/score/cpu/hppa1.1/hppatypes.h deleted file mode 100644 index 512323819b..0000000000 --- a/c/src/exec/score/cpu/hppa1.1/hppatypes.h +++ /dev/null @@ -1,46 +0,0 @@ -/* hppatypes.h - * - * This include file contains type definitions pertaining to the Hewlett - * Packard PA-RISC processor family. - * - * $Id$ - */ - -#ifndef _INCLUDE_HPPATYPES_H -#define _INCLUDE_HPPATYPES_H - -#ifndef ASM - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This section defines the basic types for this processor. - */ - -typedef unsigned char unsigned8; /* 8-bit unsigned integer */ -typedef unsigned short unsigned16; /* 16-bit unsigned integer */ -typedef unsigned int unsigned32; /* 32-bit unsigned integer */ -typedef unsigned long long unsigned64; /* 64-bit unsigned integer */ - -typedef unsigned16 Priority_Bit_map_control; - -typedef signed char signed8; /* 8-bit signed integer */ -typedef signed short signed16; /* 16-bit signed integer */ -typedef signed int signed32; /* 32-bit signed integer */ -typedef signed long long signed64; /* 64 bit signed integer */ - -typedef unsigned32 boolean; /* Boolean value */ - -typedef float single_precision; /* single precision float */ -typedef double double_precision; /* double precision float */ - -#ifdef __cplusplus -} -#endif - -#endif /* !ASM */ - -#endif /* _INCLUDE_HPPATYPES_H */ -/* end of include file */ diff --git a/c/src/exec/score/cpu/hppa1.1/rtems.s b/c/src/exec/score/cpu/hppa1.1/rtems.s deleted file mode 100644 index 06de39dddf..0000000000 --- a/c/src/exec/score/cpu/hppa1.1/rtems.s +++ /dev/null @@ -1,53 +0,0 @@ -/* rtems.S - * - * This file contains the single entry point code for - * the HPPA implementation of RTEMS. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include - - .SPACE $PRIVATE$ - .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31 - .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82 - .SPACE $TEXT$ - .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44 - .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY - .SPACE $TEXT$ - .SUBSPA $CODE$ - - .align 32 - .EXPORT cpu_jump_to_directive,ENTRY,PRIV_LEV=0 -cpu_jump_to_directive - .PROC - .CALLINFO FRAME=0,NO_CALLS - .ENTRY - -# invoke user interrupt handler - -# XXX: look at register usage and code -# XXX: this is not necessarily right!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -# r9 = directive number - - .import _Entry_points,data - ldil L%_Entry_points,%r8 - ldo R%_Entry_points(%r8),%r8 - ldwx,s %r9(%r8),%r8 - - .call ARGW0=GR - bv,n 0(%r8) - nop - - .EXIT - .PROCEND - diff --git a/c/src/exec/score/cpu/mips/asm.h b/c/src/exec/score/cpu/mips/asm.h deleted file mode 100644 index d45405b669..0000000000 --- a/c/src/exec/score/cpu/mips/asm.h +++ /dev/null @@ -1,99 +0,0 @@ -/* asm.h - * - * This include file attempts to address the problems - * caused by incompatible flavors of assemblers and - * toolsets. It primarily addresses variations in the - * use of leading underscores on symbols and the requirement - * that register names be preceded by a %. - * - * - * NOTE: The spacing in the use of these macros - * is critical to them working as advertised. - * - * COPYRIGHT: - * - * This file is based on similar code found in newlib available - * from ftp.cygnus.com. The file which was used had no copyright - * notice. This file is freely distributable as long as the source - * of the file is noted. This file is: - * - * COPYRIGHT (c) 1994. - * On-Line Applications Research Corporation (OAR). - * - * $Id$ - */ -/* @(#)asm.h 03/15/96 1.1 */ - -#ifndef __NO_CPU_ASM_h -#define __NO_CPU_ASM_h - -/* - * Indicate we are in an assembly file and get the basic CPU definitions. - */ - -#define ASM -#include - -/* - * Recent versions of GNU cpp define variables which indicate the - * need for underscores and percents. If not using GNU cpp or - * the version does not support this, then you will obviously - * have to define these as appropriate. - */ - -#ifndef __USER_LABEL_PREFIX__ -#define __USER_LABEL_PREFIX__ _ -#endif - -#ifndef __REGISTER_PREFIX__ -#define __REGISTER_PREFIX__ -#endif - -/* ANSI concatenation macros. */ - -#define CONCAT1(a, b) CONCAT2(a, b) -#define CONCAT2(a, b) a ## b - -/* Use the right prefix for global labels. */ - -#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x) - -/* Use the right prefix for registers. */ - -#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x) - -/* - * define macros for all of the registers on this CPU - * - * EXAMPLE: #define d0 REG (d0) - */ - -/* - * Define macros to handle section beginning and ends. - */ - - -#define BEGIN_CODE_DCL .text -#define END_CODE_DCL -#define BEGIN_DATA_DCL .data -#define END_DATA_DCL -#define BEGIN_CODE .text -#define END_CODE -#define BEGIN_DATA -#define END_DATA -#define BEGIN_BSS -#define END_BSS -#define END - -/* - * Following must be tailor for a particular flavor of the C compiler. - * They may need to put underscores in front of the symbols. - */ - -#define PUBLIC(sym) .globl SYM (sym) -#define EXTERN(sym) .globl SYM (sym) - -#endif -/* end of include file */ - - diff --git a/c/src/exec/score/cpu/mips/cpu.c b/c/src/exec/score/cpu/mips/cpu.c deleted file mode 100644 index 5088c2ad84..0000000000 --- a/c/src/exec/score/cpu/mips/cpu.c +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Mips CPU Dependent Source - * - * Author: Craig Lebakken - * - * COPYRIGHT (c) 1996 by Transition Networks Inc. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of Transition Networks not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * Transition Networks makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/exec/score/cpu/no_cpu/cpu.c: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef lint -static char _sccsid[] = "@(#)cpu.c 08/20/96 1.5\n"; -#endif - -#include -#include -#include - - -ISR_Handler_entry _ISR_Vector_table[ ISR_NUMBER_OF_VECTORS ]; - -/* _CPU_Initialize - * - * This routine performs processor dependent initialization. - * - * INPUT PARAMETERS: - * cpu_table - CPU table to initialize - * thread_dispatch - address of disptaching routine - */ - - -void null_handler( void ) -{ -} - - -void _CPU_Initialize( - rtems_cpu_table *cpu_table, - void (*thread_dispatch) /* ignored on this CPU */ -) -{ - unsigned int i = ISR_NUMBER_OF_VECTORS; - - while ( i-- ) - { - _ISR_Vector_table[i] = (ISR_Handler_entry)null_handler; - } - - /* - * The thread_dispatch argument is the address of the entry point - * for the routine called at the end of an ISR once it has been - * decided a context switch is necessary. On some compilation - * systems it is difficult to call a high-level language routine - * from assembly. This allows us to trick these systems. - * - * If you encounter this problem save the entry point in a CPU - * dependent variable. - */ - - _CPU_Thread_dispatch_pointer = thread_dispatch; - - /* - * If there is not an easy way to initialize the FP context - * during Context_Initialize, then it is usually easier to - * save an "uninitialized" FP context here and copy it to - * the task's during Context_Initialize. - */ - - /* FP context initialization support goes here */ - - _CPU_Table = *cpu_table; - -} - -/*PAGE - * - * _CPU_ISR_Get_level - */ - -#if 0 /* located in cpu_asm.S */ -unsigned32 _CPU_ISR_Get_level( void ) -{ - /* - * This routine returns the current interrupt level. - */ -} -#endif - -/*PAGE - * - * _CPU_ISR_install_raw_handler - */ - -void _CPU_ISR_install_raw_handler( - unsigned32 vector, - proc_ptr new_handler, - proc_ptr *old_handler -) -{ - /* - * This is where we install the interrupt handler into the "raw" interrupt - * table used by the CPU to dispatch interrupt handlers. - */ - -#if 0 /* not necessary */ -/* use IDT/Sim to set interrupt vector. Needed to co-exist with debugger. */ - add_ext_int_func( vector, new_handler ); -#endif -} - -/*PAGE - * - * _CPU_ISR_install_vector - * - * This kernel routine installs the RTEMS handler for the - * specified vector. - * - * Input parameters: - * vector - interrupt vector number - * old_handler - former ISR for this vector number - * new_handler - replacement ISR for this vector number - * - * Output parameters: NONE - * - */ - -void _CPU_ISR_install_vector( - unsigned32 vector, - proc_ptr new_handler, - proc_ptr *old_handler -) -{ - *old_handler = _ISR_Vector_table[ vector ]; - - /* - * If the interrupt vector table is a table of pointer to isr entry - * points, then we need to install the appropriate RTEMS interrupt - * handler for this vector number. - */ - - _CPU_ISR_install_raw_handler( vector, _ISR_Handler, old_handler ); - - /* - * We put the actual user ISR address in '_ISR_vector_table'. This will - * be used by the _ISR_Handler so the user gets control. - */ - - _ISR_Vector_table[ vector ] = new_handler; -} - -/*PAGE - * - * _CPU_Install_interrupt_stack - */ - -void _CPU_Install_interrupt_stack( void ) -{ -/* we don't support this yet */ -} - -/*PAGE - * - * _CPU_Internal_threads_Idle_thread_body - * - * NOTES: - * - * 1. This is the same as the regular CPU independent algorithm. - * - * 2. If you implement this using a "halt", "idle", or "shutdown" - * instruction, then don't forget to put it in an infinite loop. - * - * 3. Be warned. Some processors with onboard DMA have been known - * to stop the DMA if the CPU were put in IDLE mode. This might - * also be a problem with other on-chip peripherals. So use this - * hook with caution. - */ - -#if 0 /* located in cpu_asm.S */ -void _CPU_Thread_Idle_body( void ) -{ - - for( ; ; ) - /* insert your "halt" instruction here */ ; -} -#endif - -extern void mips_break( int error ); - -#include - -void mips_fatal_error( int error ) -{ - printf("fatal error 0x%x %d\n",error,error); - mips_break( error ); -} diff --git a/c/src/exec/score/cpu/mips/cpu_asm.S b/c/src/exec/score/cpu/mips/cpu_asm.S deleted file mode 100644 index 9f95229b8f..0000000000 --- a/c/src/exec/score/cpu/mips/cpu_asm.S +++ /dev/null @@ -1,972 +0,0 @@ -/* cpu_asm.S - * - * This file contains the basic algorithms for all assembly code used - * in an specific CPU port of RTEMS. These algorithms must be implemented - * in assembly language - * - * Author: Craig Lebakken - * - * COPYRIGHT (c) 1996 by Transition Networks Inc. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of Transition Networks not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * Transition Networks makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/exec/score/cpu/no_cpu/cpu_asm.s: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ -/* @(#)cpu_asm.S 08/20/96 1.15 */ - -#include "cpu_asm.h" - -#include "iregdef.h" -#include "idtcpu.h" - -#define FRAME(name,frm_reg,offset,ret_reg) \ - .globl name; \ - .ent name; \ -name:; \ - .frame frm_reg,offset,ret_reg -#define ENDFRAME(name) \ - .end name - - -#define EXCP_STACK_SIZE (NREGS*R_SZ) - -#if __ghs__ -#define sd sw -#define ld lw -#define dmtc0 mtc0 -#define dsll sll -#define dmfc0 mfc0 -#endif - -#if 1 /* 32 bit unsigned32 types */ -#define sint sw -#define lint lw -#define stackadd addiu -#define intadd addu -#define SZ_INT 4 -#define SZ_INT_POW2 2 -#else /* 64 bit unsigned32 types */ -#define sint dw -#define lint dw -#define stackadd daddiu -#define intadd daddu -#define SZ_INT 8 -#define SZ_INT_POW2 3 -#endif - -#ifdef __GNUC__ -#define EXTERN(x,size) .extern x,size -#else -#define EXTERN(x,size) -#endif - -/* NOTE: these constants must match the Context_Control structure in cpu.h */ -#define S0_OFFSET 0 -#define S1_OFFSET 1 -#define S2_OFFSET 2 -#define S3_OFFSET 3 -#define S4_OFFSET 4 -#define S5_OFFSET 5 -#define S6_OFFSET 6 -#define S7_OFFSET 7 -#define SP_OFFSET 8 -#define FP_OFFSET 9 -#define RA_OFFSET 10 -#define C0_SR_OFFSET 11 -#define C0_EPC_OFFSET 12 - -/* NOTE: these constants must match the Context_Control_fp structure in cpu.h */ -#define FP0_OFFSET 0 -#define FP1_OFFSET 1 -#define FP2_OFFSET 2 -#define FP3_OFFSET 3 -#define FP4_OFFSET 4 -#define FP5_OFFSET 5 -#define FP6_OFFSET 6 -#define FP7_OFFSET 7 -#define FP8_OFFSET 8 -#define FP9_OFFSET 9 -#define FP10_OFFSET 10 -#define FP11_OFFSET 11 -#define FP12_OFFSET 12 -#define FP13_OFFSET 13 -#define FP14_OFFSET 14 -#define FP15_OFFSET 15 -#define FP16_OFFSET 16 -#define FP17_OFFSET 17 -#define FP18_OFFSET 18 -#define FP19_OFFSET 19 -#define FP20_OFFSET 20 -#define FP21_OFFSET 21 -#define FP22_OFFSET 22 -#define FP23_OFFSET 23 -#define FP24_OFFSET 24 -#define FP25_OFFSET 25 -#define FP26_OFFSET 26 -#define FP27_OFFSET 27 -#define FP28_OFFSET 28 -#define FP29_OFFSET 29 -#define FP30_OFFSET 30 -#define FP31_OFFSET 31 - - -/*PAGE - * - * _CPU_ISR_Get_level - */ - -#if 0 -unsigned32 _CPU_ISR_Get_level( void ) -{ - /* - * This routine returns the current interrupt level. - */ -} -#endif -/* return the current exception level for the 4650 */ -FRAME(_CPU_ISR_Get_level,sp,0,ra) - mfc0 v0,C0_SR - nop - andi v0,SR_EXL - srl v0,1 - j ra -ENDFRAME(_CPU_ISR_Get_level) - -FRAME(_CPU_ISR_Set_level,sp,0,ra) - nop - mfc0 a0,C0_SR - nop - andi a0,SR_EXL - beqz a0,_CPU_ISR_Set_1 /* normalize a0 */ - nop - li a0,1 -_CPU_ISR_Set_1: - beq v0,a0,_CPU_ISR_Set_exit /* if (current_level != new_level ) */ - nop - bnez a0,_CPU_ISR_Set_2 - nop - nop - mfc0 t0,C0_SR - nop - li t1,~SR_EXL - and t0,t1 - nop - mtc0 t0,C0_SR /* disable exception level */ - nop - j ra - nop -_CPU_ISR_Set_2: - nop - mfc0 t0,C0_SR - nop - li t1,~SR_IE - and t0,t1 - nop - mtc0 t0,C0_SR /* first disable ie bit (recommended) */ - nop - ori t0,SR_EXL|SR_IE /* enable exception level */ - nop - mtc0 t0,C0_SR - nop -_CPU_ISR_Set_exit: - j ra - nop -ENDFRAME(_CPU_ISR_Set_level) - -/* - * _CPU_Context_save_fp_context - * - * This routine is responsible for saving the FP context - * at *fp_context_ptr. If the point to load the FP context - * from is changed then the pointer is modified by this routine. - * - * Sometimes a macro implementation of this is in cpu.h which dereferences - * the ** and a similarly named routine in this file is passed something - * like a (Context_Control_fp *). The general rule on making this decision - * is to avoid writing assembly language. - */ - -/* void _CPU_Context_save_fp( - * void **fp_context_ptr - * ) - * { - * } - */ - -FRAME(_CPU_Context_save_fp,sp,0,ra) - .set noat - ld a1,(a0) - swc1 $f0,FP0_OFFSET*4(a1) - swc1 $f1,FP1_OFFSET*4(a1) - swc1 $f2,FP2_OFFSET*4(a1) - swc1 $f3,FP3_OFFSET*4(a1) - swc1 $f4,FP4_OFFSET*4(a1) - swc1 $f5,FP5_OFFSET*4(a1) - swc1 $f6,FP6_OFFSET*4(a1) - swc1 $f7,FP7_OFFSET*4(a1) - swc1 $f8,FP8_OFFSET*4(a1) - swc1 $f9,FP9_OFFSET*4(a1) - swc1 $f10,FP10_OFFSET*4(a1) - swc1 $f11,FP11_OFFSET*4(a1) - swc1 $f12,FP12_OFFSET*4(a1) - swc1 $f13,FP13_OFFSET*4(a1) - swc1 $f14,FP14_OFFSET*4(a1) - swc1 $f15,FP15_OFFSET*4(a1) - swc1 $f16,FP16_OFFSET*4(a1) - swc1 $f17,FP17_OFFSET*4(a1) - swc1 $f18,FP18_OFFSET*4(a1) - swc1 $f19,FP19_OFFSET*4(a1) - swc1 $f20,FP20_OFFSET*4(a1) - swc1 $f21,FP21_OFFSET*4(a1) - swc1 $f22,FP22_OFFSET*4(a1) - swc1 $f23,FP23_OFFSET*4(a1) - swc1 $f24,FP24_OFFSET*4(a1) - swc1 $f25,FP25_OFFSET*4(a1) - swc1 $f26,FP26_OFFSET*4(a1) - swc1 $f27,FP27_OFFSET*4(a1) - swc1 $f28,FP28_OFFSET*4(a1) - swc1 $f29,FP29_OFFSET*4(a1) - swc1 $f30,FP30_OFFSET*4(a1) - swc1 $f31,FP31_OFFSET*4(a1) - j ra - nop - .set at -ENDFRAME(_CPU_Context_save_fp) - -/* - * _CPU_Context_restore_fp_context - * - * This routine is responsible for restoring the FP context - * at *fp_context_ptr. If the point to load the FP context - * from is changed then the pointer is modified by this routine. - * - * Sometimes a macro implementation of this is in cpu.h which dereferences - * the ** and a similarly named routine in this file is passed something - * like a (Context_Control_fp *). The general rule on making this decision - * is to avoid writing assembly language. - */ - -/* void _CPU_Context_restore_fp( - * void **fp_context_ptr - * ) - * { - * } - */ - -FRAME(_CPU_Context_restore_fp,sp,0,ra) - .set noat - ld a1,(a0) - lwc1 $f0,FP0_OFFSET*4(a1) - lwc1 $f1,FP1_OFFSET*4(a1) - lwc1 $f2,FP2_OFFSET*4(a1) - lwc1 $f3,FP3_OFFSET*4(a1) - lwc1 $f4,FP4_OFFSET*4(a1) - lwc1 $f5,FP5_OFFSET*4(a1) - lwc1 $f6,FP6_OFFSET*4(a1) - lwc1 $f7,FP7_OFFSET*4(a1) - lwc1 $f8,FP8_OFFSET*4(a1) - lwc1 $f9,FP9_OFFSET*4(a1) - lwc1 $f10,FP10_OFFSET*4(a1) - lwc1 $f11,FP11_OFFSET*4(a1) - lwc1 $f12,FP12_OFFSET*4(a1) - lwc1 $f13,FP13_OFFSET*4(a1) - lwc1 $f14,FP14_OFFSET*4(a1) - lwc1 $f15,FP15_OFFSET*4(a1) - lwc1 $f16,FP16_OFFSET*4(a1) - lwc1 $f17,FP17_OFFSET*4(a1) - lwc1 $f18,FP18_OFFSET*4(a1) - lwc1 $f19,FP19_OFFSET*4(a1) - lwc1 $f20,FP20_OFFSET*4(a1) - lwc1 $f21,FP21_OFFSET*4(a1) - lwc1 $f22,FP22_OFFSET*4(a1) - lwc1 $f23,FP23_OFFSET*4(a1) - lwc1 $f24,FP24_OFFSET*4(a1) - lwc1 $f25,FP25_OFFSET*4(a1) - lwc1 $f26,FP26_OFFSET*4(a1) - lwc1 $f27,FP27_OFFSET*4(a1) - lwc1 $f28,FP28_OFFSET*4(a1) - lwc1 $f29,FP29_OFFSET*4(a1) - lwc1 $f30,FP30_OFFSET*4(a1) - lwc1 $f31,FP31_OFFSET*4(a1) - j ra - nop - .set at -ENDFRAME(_CPU_Context_restore_fp) - -/* _CPU_Context_switch - * - * This routine performs a normal non-FP context switch. - */ - -/* void _CPU_Context_switch( - * Context_Control *run, - * Context_Control *heir - * ) - * { - * } - */ - -FRAME(_CPU_Context_switch,sp,0,ra) - - mfc0 t0,C0_SR - li t1,~SR_IE - sd t0,C0_SR_OFFSET*8(a0) /* save status register */ - and t0,t1 - mtc0 t0,C0_SR /* first disable ie bit (recommended) */ - ori t0,SR_EXL|SR_IE /* enable exception level to disable interrupts */ - mtc0 t0,C0_SR - - sd ra,RA_OFFSET*8(a0) /* save current context */ - sd sp,SP_OFFSET*8(a0) - sd fp,FP_OFFSET*8(a0) - sd s0,S0_OFFSET*8(a0) - sd s1,S1_OFFSET*8(a0) - sd s2,S2_OFFSET*8(a0) - sd s3,S3_OFFSET*8(a0) - sd s4,S4_OFFSET*8(a0) - sd s5,S5_OFFSET*8(a0) - sd s6,S6_OFFSET*8(a0) - sd s7,S7_OFFSET*8(a0) - dmfc0 t0,C0_EPC - sd t0,C0_EPC_OFFSET*8(a0) - -_CPU_Context_switch_restore: - ld s0,S0_OFFSET*8(a1) /* restore context */ - ld s1,S1_OFFSET*8(a1) - ld s2,S2_OFFSET*8(a1) - ld s3,S3_OFFSET*8(a1) - ld s4,S4_OFFSET*8(a1) - ld s5,S5_OFFSET*8(a1) - ld s6,S6_OFFSET*8(a1) - ld s7,S7_OFFSET*8(a1) - ld fp,FP_OFFSET*8(a1) - ld sp,SP_OFFSET*8(a1) - ld ra,RA_OFFSET*8(a1) - ld t0,C0_EPC_OFFSET*8(a1) - dmtc0 t0,C0_EPC - ld t0,C0_SR_OFFSET*8(a1) - andi t0,SR_EXL - bnez t0,_CPU_Context_1 /* set exception level from restore context */ - li t0,~SR_EXL - mfc0 t1,C0_SR - nop - and t1,t0 - mtc0 t1,C0_SR -_CPU_Context_1: - j ra - nop -ENDFRAME(_CPU_Context_switch) - -/* - * _CPU_Context_restore - * - * This routine is generally used only to restart self in an - * efficient manner. It may simply be a label in _CPU_Context_switch. - * - * NOTE: May be unnecessary to reload some registers. - */ - -#if 0 -void _CPU_Context_restore( - Context_Control *new_context -) -{ -} -#endif - -FRAME(_CPU_Context_restore,sp,0,ra) - dadd a1,a0,zero - j _CPU_Context_switch_restore - nop -ENDFRAME(_CPU_Context_restore) - -EXTERN(_ISR_Nest_level, SZ_INT) -EXTERN(_Thread_Dispatch_disable_level,SZ_INT) -EXTERN(_Context_Switch_necessary,SZ_INT) -EXTERN(_ISR_Signals_to_thread_executing,SZ_INT) -.extern _Thread_Dispatch -.extern _ISR_Vector_table - -/* void __ISR_Handler() - * - * This routine provides the RTEMS interrupt management. - * - */ - -#if 0 -void _ISR_Handler() -{ - /* - * This discussion ignores a lot of the ugly details in a real - * implementation such as saving enough registers/state to be - * able to do something real. Keep in mind that the goal is - * to invoke a user's ISR handler which is written in C and - * uses a certain set of registers. - * - * Also note that the exact order is to a large extent flexible. - * Hardware will dictate a sequence for a certain subset of - * _ISR_Handler while requirements for setting - */ - - /* - * At entry to "common" _ISR_Handler, the vector number must be - * available. On some CPUs the hardware puts either the vector - * number or the offset into the vector table for this ISR in a - * known place. If the hardware does not give us this information, - * then the assembly portion of RTEMS for this port will contain - * a set of distinct interrupt entry points which somehow place - * the vector number in a known place (which is safe if another - * interrupt nests this one) and branches to _ISR_Handler. - * - */ -#endif -FRAME(_ISR_Handler,sp,0,ra) -.set noreorder -#if USE_IDTKIT -/* IDT/Kit incorrectly adds 4 to EPC before returning. This compensates */ - lreg k0, R_EPC*R_SZ(sp) - daddiu k0,k0,-4 - sreg k0, R_EPC*R_SZ(sp) - lreg k0, R_CAUSE*R_SZ(sp) - li k1, ~CAUSE_BD - and k0, k1 - sreg k0, R_CAUSE*R_SZ(sp) -#endif - -/* save registers not already saved by IDT/sim */ - stackadd sp,sp,-EXCP_STACK_SIZE /* store ra on the stack */ - - sreg ra, R_RA*R_SZ(sp) - sreg v0, R_V0*R_SZ(sp) - sreg v1, R_V1*R_SZ(sp) - sreg a0, R_A0*R_SZ(sp) - sreg a1, R_A1*R_SZ(sp) - sreg a2, R_A2*R_SZ(sp) - sreg a3, R_A3*R_SZ(sp) - sreg t0, R_T0*R_SZ(sp) - sreg t1, R_T1*R_SZ(sp) - sreg t2, R_T2*R_SZ(sp) - sreg t3, R_T3*R_SZ(sp) - sreg t4, R_T4*R_SZ(sp) - sreg t5, R_T5*R_SZ(sp) - sreg t6, R_T6*R_SZ(sp) - sreg t7, R_T7*R_SZ(sp) - mflo k0 - sreg t8, R_T8*R_SZ(sp) - sreg k0, R_MDLO*R_SZ(sp) - sreg t9, R_T9*R_SZ(sp) - mfhi k0 - sreg gp, R_GP*R_SZ(sp) - sreg fp, R_FP*R_SZ(sp) - sreg k0, R_MDHI*R_SZ(sp) - .set noat - sreg AT, R_AT*R_SZ(sp) - .set at - - stackadd sp,sp,-40 /* store ra on the stack */ - sd ra,32(sp) - -/* determine if an interrupt generated this exception */ - mfc0 k0,C0_CAUSE - and k1,k0,CAUSE_EXCMASK - bnez k1,_ISR_Handler_prom_exit /* not an external interrupt, pass exception to Monitor */ - mfc0 k1,C0_SR - and k0,k1 - and k0,CAUSE_IPMASK - beq k0,zero,_ISR_Handler_quick_exit /* external interrupt not enabled, ignore */ - nop - - /* - * save some or all context on stack - * may need to save some special interrupt information for exit - * - * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE ) - * if ( _ISR_Nest_level == 0 ) - * switch to software interrupt stack - * #endif - */ -#if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE ) - lint t0,_ISR_Nest_level - beq t0, zero, _ISR_Handler_1 - nop - /* switch stacks */ -_ISR_Handler_1: -#else - lint t0,_ISR_Nest_level -#endif - /* - * _ISR_Nest_level++; - */ - addi t0,t0,1 - sint t0,_ISR_Nest_level - /* - * _Thread_Dispatch_disable_level++; - */ - lint t1,_Thread_Dispatch_disable_level - addi t1,t1,1 - sint t1,_Thread_Dispatch_disable_level -#if 0 - nop - j _ISR_Handler_4 - nop - /* - * while ( interrupts_pending(cause_reg) ) { - * vector = BITFIELD_TO_INDEX(cause_reg); - * (*_ISR_Vector_table[ vector ])( vector ); - * } - */ -_ISR_Handler_2: -/* software interrupt priorities can be applied here */ - li t1,-1 -/* convert bit field into interrupt index */ -_ISR_Handler_3: - andi t2,t0,1 - addi t1,1 - beql t2,zero,_ISR_Handler_3 - dsrl t0,1 - li t1,7 - dsll t1,3 /* convert index to byte offset (*8) */ - la t3,_ISR_Vector_table - intadd t1,t3 - lint t1,(t1) - jalr t1 - nop - j _ISR_Handler_5 - nop -_ISR_Handler_4: - mfc0 t0,C0_CAUSE - andi t0,CAUSE_IPMASK - bne t0,zero,_ISR_Handler_2 - dsrl t0,t0,8 -_ISR_Handler_5: -#else - nop - li t1,7 - dsll t1,t1,SZ_INT_POW2 - la t3,_ISR_Vector_table - intadd t1,t3 - lint t1,(t1) - jalr t1 - nop -#endif - /* - * --_ISR_Nest_level; - */ - lint t2,_ISR_Nest_level - addi t2,t2,-1 - sint t2,_ISR_Nest_level - /* - * --_Thread_Dispatch_disable_level; - */ - lint t1,_Thread_Dispatch_disable_level - addi t1,t1,-1 - sint t1,_Thread_Dispatch_disable_level - /* - * if ( _Thread_Dispatch_disable_level || _ISR_Nest_level ) - * goto the label "exit interrupt (simple case)" - */ - or t0,t2,t1 - bne t0,zero,_ISR_Handler_exit - nop - /* - * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE ) - * restore stack - * #endif - * - * if ( !_Context_Switch_necessary && !_ISR_Signals_to_thread_executing ) - * goto the label "exit interrupt (simple case)" - */ - lint t0,_Context_Switch_necessary - lint t1,_ISR_Signals_to_thread_executing - or t0,t0,t1 - beq t0,zero,_ISR_Handler_exit - nop - - /* - * call _Thread_Dispatch() or prepare to return to _ISR_Dispatch - */ - jal _Thread_Dispatch - nop - /* - * prepare to get out of interrupt - * return from interrupt (maybe to _ISR_Dispatch) - * - * LABEL "exit interrupt (simple case): - * prepare to get out of interrupt - * return from interrupt - */ -_ISR_Handler_exit: - ld ra,32(sp) - stackadd sp,sp,40 - -/* restore interrupt context from stack */ - lreg k0, R_MDLO*R_SZ(sp) - mtlo k0 - lreg k0, R_MDHI*R_SZ(sp) - lreg a2, R_A2*R_SZ(sp) - mthi k0 - lreg a3, R_A3*R_SZ(sp) - lreg t0, R_T0*R_SZ(sp) - lreg t1, R_T1*R_SZ(sp) - lreg t2, R_T2*R_SZ(sp) - lreg t3, R_T3*R_SZ(sp) - lreg t4, R_T4*R_SZ(sp) - lreg t5, R_T5*R_SZ(sp) - lreg t6, R_T6*R_SZ(sp) - lreg t7, R_T7*R_SZ(sp) - lreg t8, R_T8*R_SZ(sp) - lreg t9, R_T9*R_SZ(sp) - lreg gp, R_GP*R_SZ(sp) - lreg fp, R_FP*R_SZ(sp) - lreg ra, R_RA*R_SZ(sp) - lreg a0, R_A0*R_SZ(sp) - lreg a1, R_A1*R_SZ(sp) - lreg v1, R_V1*R_SZ(sp) - lreg v0, R_V0*R_SZ(sp) - .set noat - lreg AT, R_AT*R_SZ(sp) - .set at - - stackadd sp,sp,EXCP_STACK_SIZE /* store ra on the stack */ - -#if USE_IDTKIT -/* we handled exception, so return non-zero value */ - li v0,1 -#endif - -_ISR_Handler_quick_exit: -#ifdef USE_IDTKIT - j ra -#else - eret -#endif - nop - -_ISR_Handler_prom_exit: -#ifdef CPU_R3000 - la k0, (R_VEC+((48)*8)) -#endif - -#ifdef CPU_R4000 - la k0, (R_VEC+((112)*8)) /* R4000 Sim's location is different */ -#endif - j k0 - nop - - .set reorder - -ENDFRAME(_ISR_Handler) - - -FRAME(mips_enable_interrupts,sp,0,ra) - mfc0 t0,C0_SR /* get status reg */ - nop - or t0,t0,a0 - mtc0 t0,C0_SR /* save updated status reg */ - j ra - nop -ENDFRAME(mips_enable_interrupts) - -FRAME(mips_disable_interrupts,sp,0,ra) - mfc0 v0,C0_SR /* get status reg */ - li t1,SR_IMASK /* t1 = load interrupt mask word */ - not t0,t1 /* t0 = ~t1 */ - and t0,v0 /* clear imask bits */ - mtc0 t0,C0_SR /* save status reg */ - and v0,t1 /* mask return value (only return imask bits) */ - jr ra - nop -ENDFRAME(mips_disable_interrupts) - -FRAME(mips_enable_global_interrupts,sp,0,ra) - mfc0 t0,C0_SR /* get status reg */ - nop - ori t0,SR_IE - mtc0 t0,C0_SR /* save updated status reg */ - j ra - nop -ENDFRAME(mips_enable_global_interrupts) - -FRAME(mips_disable_global_interrupts,sp,0,ra) - li t1,SR_IE - mfc0 t0,C0_SR /* get status reg */ - not t1 - and t0,t1 - mtc0 t0,C0_SR /* save updated status reg */ - j ra - nop -ENDFRAME(mips_disable_global_interrupts) - -/* return the value of the status register in v0. Used for debugging */ -FRAME(mips_get_sr,sp,0,ra) - mfc0 v0,C0_SR - j ra - nop -ENDFRAME(mips_get_sr) - -FRAME(mips_break,sp,0,ra) -#if 1 - break 0x0 - j mips_break -#else - j ra -#endif - nop -ENDFRAME(mips_break) - -/*PAGE - * - * _CPU_Internal_threads_Idle_thread_body - * - * NOTES: - * - * 1. This is the same as the regular CPU independent algorithm. - * - * 2. If you implement this using a "halt", "idle", or "shutdown" - * instruction, then don't forget to put it in an infinite loop. - * - * 3. Be warned. Some processors with onboard DMA have been known - * to stop the DMA if the CPU were put in IDLE mode. This might - * also be a problem with other on-chip peripherals. So use this - * hook with caution. - */ - -FRAME(_CPU_Thread_Idle_body,sp,0,ra) - wait /* enter low power mode */ - j _CPU_Thread_Idle_body - nop -ENDFRAME(_CPU_Thread_Idle_body) - -#define VEC_CODE_LENGTH 10*4 - -/************************************************************************** -** -** init_exc_vecs() - moves the exception code into the addresses -** reserved for exception vectors -** -** UTLB Miss exception vector at address 0x80000000 -** -** General exception vector at address 0x80000080 -** -** RESET exception vector is at address 0xbfc00000 -** -***************************************************************************/ - -#define INITEXCFRM ((2*4)+4) /* ra + 2 arguments */ -FRAME(init_exc_vecs,sp,0,ra) -/* This code yanked from SIM */ -#if defined(CPU_R3000) - .set noreorder - la t1,exc_utlb_code - la t2,exc_norm_code - li t3,UT_VEC - li t4,E_VEC - li t5,VEC_CODE_LENGTH -1: - lw t6,0(t1) - lw t7,0(t2) - sw t6,0(t3) - sw t7,0(t4) - addiu t1,4 - addiu t3,4 - addiu t4,4 - subu t5,4 - bne t5,zero,1b - addiu t2,4 - move t5,ra # assumes clear_cache doesnt use t5 - li a0,UT_VEC - jal clear_cache - li a1,VEC_CODE_LENGTH - nop - li a0,E_VEC - jal clear_cache - li a1,VEC_CODE_LENGTH - move ra,t5 # restore ra - j ra - nop - .set reorder -#endif -#if defined(CPU_R4000) - .set reorder - move t5,ra # assumes clear_cache doesnt use t5 - - /* TLB exception vector */ - la t1,exc_tlb_code - li t2,T_VEC |K1BASE - li t3,VEC_CODE_LENGTH -1: - lw t6,0(t1) - addiu t1,4 - subu t3,4 - sw t6,0(t2) - addiu t2,4 - bne t3,zero,1b - - li a0,T_VEC - li a1,VEC_CODE_LENGTH - jal clear_cache - - la t1,exc_xtlb_code - li t2,X_VEC |K1BASE - li t3,VEC_CODE_LENGTH -1: - lw t6,0(t1) - addiu t1,4 - subu t3,4 - sw t6,0(t2) - addiu t2,4 - bne t3,zero,1b - - /* extended TLB exception vector */ - li a0,X_VEC - li a1,VEC_CODE_LENGTH - jal clear_cache - - /* cache error exception vector */ - la t1,exc_cache_code - li t2,C_VEC |K1BASE - li t3,VEC_CODE_LENGTH -1: - lw t6,0(t1) - addiu t1,4 - subu t3,4 - sw t6,0(t2) - addiu t2,4 - bne t3,zero,1b - - li a0,C_VEC - li a1,VEC_CODE_LENGTH - jal clear_cache - - /* normal exception vector */ - la t1,exc_norm_code - li t2,E_VEC |K1BASE - li t3,VEC_CODE_LENGTH -1: - lw t6,0(t1) - addiu t1,4 - subu t3,4 - sw t6,0(t2) - addiu t2,4 - bne t3,zero,1b - - li a0,E_VEC - li a1,VEC_CODE_LENGTH - jal clear_cache - - move ra,t5 # restore ra - j ra -#endif -ENDFRAME(init_exc_vecs) - - -#if defined(CPU_R4000) -FRAME(exc_tlb_code,sp,0,ra) -#ifdef CPU_R3000 - la k0, (R_VEC+((48)*8)) -#endif - -#ifdef CPU_R4000 - la k0, (R_VEC+((112)*8)) /* R4000 Sim's location is different */ -#endif - j k0 - nop - -ENDFRAME(exc_tlb_code) - - -FRAME(exc_xtlb_code,sp,0,ra) -#ifdef CPU_R3000 - la k0, (R_VEC+((48)*8)) -#endif - -#ifdef CPU_R4000 - la k0, (R_VEC+((112)*8)) /* R4000 Sim's location is different */ -#endif - j k0 - nop - -ENDFRAME(exc_xtlb_code) - - -FRAME(exc_cache_code,sp,0,ra) -#ifdef CPU_R3000 - la k0, (R_VEC+((48)*8)) -#endif - -#ifdef CPU_R4000 - la k0, (R_VEC+((112)*8)) /* R4000 Sim's location is different */ -#endif - j k0 - nop - -ENDFRAME(exc_cache_code) - - -FRAME(exc_norm_code,sp,0,ra) - la k0, _ISR_Handler /* generic external int hndlr */ - j k0 - nop - subu sp, EXCP_STACK_SIZE /* set up local stack frame */ -ENDFRAME(exc_norm_code) -#endif - -/************************************************************************** -** -** enable_int(mask) - enables interrupts - mask is positioned so it only -** needs to be or'ed into the status reg. This -** also does some other things !!!! caution should -** be used if invoking this while in the middle -** of a debugging session where the client may have -** nested interrupts. -** -****************************************************************************/ -FRAME(enable_int,sp,0,ra) - .set noreorder - mfc0 t0,C0_SR - or a0,1 - or t0,a0 - mtc0 t0,C0_SR - j ra - nop - .set reorder -ENDFRAME(enable_int) - - -/*************************************************************************** -** -** disable_int(mask) - disable the interrupt - mask is the complement -** of the bits to be cleared - i.e. to clear ext int -** 5 the mask would be - 0xffff7fff -** -****************************************************************************/ -FRAME(disable_int,sp,0,ra) - .set noreorder - mfc0 t0,C0_SR - nop - and t0,a0 - mtc0 t0,C0_SR - j ra - nop -ENDFRAME(disable_int) - - diff --git a/c/src/exec/score/cpu/mips/cpu_asm.h b/c/src/exec/score/cpu/mips/cpu_asm.h deleted file mode 100644 index 8c104bfdb4..0000000000 --- a/c/src/exec/score/cpu/mips/cpu_asm.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * cpu_asm.h - * - * Author: Craig Lebakken - * - * COPYRIGHT (c) 1996 by Transition Networks Inc. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of Transition Networks not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * Transition Networks makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/exec/score/cpu/no_cpu/cpu_asm.h: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - * - */ -/* @(#)cpu_asm.h 08/20/96 1.2 */ - -#ifndef __CPU_ASM_h -#define __CPU_ASM_h - -/* pull in the generated offsets */ - -/* #include */ - -/* - * Hardware General Registers - */ - -/* put something here */ - -/* - * Hardware Floating Point Registers - */ - -#define R_FP0 0 -#define R_FP1 1 -#define R_FP2 2 -#define R_FP3 3 -#define R_FP4 4 -#define R_FP5 5 -#define R_FP6 6 -#define R_FP7 7 -#define R_FP8 8 -#define R_FP9 9 -#define R_FP10 10 -#define R_FP11 11 -#define R_FP12 12 -#define R_FP13 13 -#define R_FP14 14 -#define R_FP15 15 -#define R_FP16 16 -#define R_FP17 17 -#define R_FP18 18 -#define R_FP19 19 -#define R_FP20 20 -#define R_FP21 21 -#define R_FP22 22 -#define R_FP23 23 -#define R_FP24 24 -#define R_FP25 25 -#define R_FP26 26 -#define R_FP27 27 -#define R_FP28 28 -#define R_FP29 29 -#define R_FP30 30 -#define R_FP31 31 - -/* - * Hardware Control Registers - */ - -/* put something here */ - -/* - * Calling Convention - */ - -/* put something here */ - -/* - * Temporary registers - */ - -/* put something here */ - -/* - * Floating Point Registers - SW Conventions - */ - -/* put something here */ - -/* - * Temporary floating point registers - */ - -/* put something here */ - -#endif - -/* end of file */ diff --git a/c/src/exec/score/cpu/mips/idtcpu.h b/c/src/exec/score/cpu/mips/idtcpu.h deleted file mode 100644 index f921e85ef6..0000000000 --- a/c/src/exec/score/cpu/mips/idtcpu.h +++ /dev/null @@ -1,440 +0,0 @@ -/* - -Based upon IDT provided code with the following release: - -This source code has been made available to you by IDT on an AS-IS -basis. Anyone receiving this source is licensed under IDT copyrights -to use it in any way he or she deems fit, including copying it, -modifying it, compiling it, and redistributing it either with or -without modifications. No license under IDT patents or patent -applications is to be implied by the copyright license. - -Any user of this software should understand that IDT cannot provide -technical support for this software and will not be responsible for -any consequences resulting from the use of this software. - -Any person who transfers this source code or any derivative work must -include the IDT copyright notice, this paragraph, and the preceeding -two paragraphs in the transferred software. - -COPYRIGHT IDT CORPORATION 1996 -LICENSED MATERIAL - PROGRAM PROPERTY OF IDT - - $Id$ -*/ - -/* -** idtcpu.h -- cpu related defines -*/ - -#ifndef _IDTCPU_H__ -#define _IDTCPU_H__ - -/* - * 950313: Ketan added Register definition for XContext reg. - * added define for WAIT instruction. - * 950421: Ketan added Register definition for Config reg (R3081) - */ - -/* -** memory configuration and mapping -*/ -#define K0BASE 0x80000000 -#define K0SIZE 0x20000000 -#define K1BASE 0xa0000000 -#define K1SIZE 0x20000000 -#define K2BASE 0xc0000000 -#define K2SIZE 0x20000000 -#if defined(CPU_R4000) -#define KSBASE 0xe0000000 -#define KSSIZE 0x20000000 -#endif - -#define KUBASE 0 -#define KUSIZE 0x80000000 - -/* -** Exception Vectors -*/ -#if defined(CPU_R3000) -#define UT_VEC K0BASE /* utlbmiss vector */ -#define E_VEC (K0BASE+0x80) /* exception vevtor */ -#endif -#if defined(CPU_R4000) -#define T_VEC (K0BASE+0x000) /* tlbmiss vector */ -#define X_VEC (K0BASE+0x080) /* xtlbmiss vector */ -#define C_VEC (K0BASE+0x100) /* cache error vector */ -#define E_VEC (K0BASE+0x180) /* exception vector */ -#endif -#define R_VEC (K1BASE+0x1fc00000) /* reset vector */ - -/* -** Address conversion macros -*/ -#ifdef CLANGUAGE -#define CAST(as) (as) -#else -#define CAST(as) -#endif -#define K0_TO_K1(x) (CAST(unsigned)(x)|0xA0000000) /* kseg0 to kseg1 */ -#define K1_TO_K0(x) (CAST(unsigned)(x)&0x9FFFFFFF) /* kseg1 to kseg0 */ -#define K0_TO_PHYS(x) (CAST(unsigned)(x)&0x1FFFFFFF) /* kseg0 to physical */ -#define K1_TO_PHYS(x) (CAST(unsigned)(x)&0x1FFFFFFF) /* kseg1 to physical */ -#define PHYS_TO_K0(x) (CAST(unsigned)(x)|0x80000000) /* physical to kseg0 */ -#define PHYS_TO_K1(x) (CAST(unsigned)(x)|0xA0000000) /* physical to kseg1 */ - -/* -** Cache size constants -*/ -#define MINCACHE 0x200 /* 512 For 3041. */ -#define MAXCACHE 0x40000 /* 256*1024 256k */ - -#if defined(CPU_R4000) -/* R4000 configuration register definitions */ -#define CFG_CM 0x80000000 /* Master-Checker mode */ -#define CFG_ECMASK 0x70000000 /* System Clock Ratio */ -#define CFG_ECBY2 0x00000000 /* divide by 2 */ -#define CFG_ECBY3 0x10000000 /* divide by 3 */ -#define CFG_ECBY4 0x20000000 /* divide by 4 */ -#define CFG_EPMASK 0x0f000000 /* Transmit data pattern */ -#define CFG_EPD 0x00000000 /* D */ -#define CFG_EPDDX 0x01000000 /* DDX */ -#define CFG_EPDDXX 0x02000000 /* DDXX */ -#define CFG_EPDXDX 0x03000000 /* DXDX */ -#define CFG_EPDDXXX 0x04000000 /* DDXXX */ -#define CFG_EPDDXXXX 0x05000000 /* DDXXXX */ -#define CFG_EPDXXDXX 0x06000000 /* DXXDXX */ -#define CFG_EPDDXXXXX 0x07000000 /* DDXXXXX */ -#define CFG_EPDXXXDXXX 0x08000000 /* DXXXDXXX */ -#define CFG_SBMASK 0x00c00000 /* Secondary cache block size */ -#define CFG_SBSHIFT 22 -#define CFG_SB4 0x00000000 /* 4 words */ -#define CFG_SB8 0x00400000 /* 8 words */ -#define CFG_SB16 0x00800000 /* 16 words */ -#define CFG_SB32 0x00c00000 /* 32 words */ -#define CFG_SS 0x00200000 /* Split secondary cache */ -#define CFG_SW 0x00100000 /* Secondary cache port width */ -#define CFG_EWMASK 0x000c0000 /* System port width */ -#define CFG_EWSHIFT 18 -#define CFG_EW64 0x00000000 /* 64 bit */ -#define CFG_EW32 0x00010000 /* 32 bit */ -#define CFG_SC 0x00020000 /* Secondary cache absent */ -#define CFG_SM 0x00010000 /* Dirty Shared mode disabled */ -#define CFG_BE 0x00008000 /* Big Endian */ -#define CFG_EM 0x00004000 /* ECC mode enable */ -#define CFG_EB 0x00002000 /* Block ordering */ -#define CFG_ICMASK 0x00000e00 /* Instruction cache size */ -#define CFG_ICSHIFT 9 -#define CFG_DCMASK 0x000001c0 /* Data cache size */ -#define CFG_DCSHIFT 6 -#define CFG_IB 0x00000020 /* Instruction cache block size */ -#define CFG_DB 0x00000010 /* Data cache block size */ -#define CFG_CU 0x00000008 /* Update on Store Conditional */ -#define CFG_K0MASK 0x00000007 /* KSEG0 coherency algorithm */ - -/* - * R4000 primary cache mode - */ -#define CFG_C_UNCACHED 2 -#define CFG_C_NONCOHERENT 3 -#define CFG_C_COHERENTXCL 4 -#define CFG_C_COHERENTXCLW 5 -#define CFG_C_COHERENTUPD 6 - -/* - * R4000 cache operations (should be in assembler...?) - */ -#define Index_Invalidate_I 0x0 /* 0 0 */ -#define Index_Writeback_Inv_D 0x1 /* 0 1 */ -#define Index_Invalidate_SI 0x2 /* 0 2 */ -#define Index_Writeback_Inv_SD 0x3 /* 0 3 */ -#define Index_Load_Tag_I 0x4 /* 1 0 */ -#define Index_Load_Tag_D 0x5 /* 1 1 */ -#define Index_Load_Tag_SI 0x6 /* 1 2 */ -#define Index_Load_Tag_SD 0x7 /* 1 3 */ -#define Index_Store_Tag_I 0x8 /* 2 0 */ -#define Index_Store_Tag_D 0x9 /* 2 1 */ -#define Index_Store_Tag_SI 0xA /* 2 2 */ -#define Index_Store_Tag_SD 0xB /* 2 3 */ -#define Create_Dirty_Exc_D 0xD /* 3 1 */ -#define Create_Dirty_Exc_SD 0xF /* 3 3 */ -#define Hit_Invalidate_I 0x10 /* 4 0 */ -#define Hit_Invalidate_D 0x11 /* 4 1 */ -#define Hit_Invalidate_SI 0x12 /* 4 2 */ -#define Hit_Invalidate_SD 0x13 /* 4 3 */ -#define Hit_Writeback_Inv_D 0x15 /* 5 1 */ -#define Hit_Writeback_Inv_SD 0x17 /* 5 3 */ -#define Fill_I 0x14 /* 5 0 */ -#define Hit_Writeback_D 0x19 /* 6 1 */ -#define Hit_Writeback_SD 0x1B /* 6 3 */ -#define Hit_Writeback_I 0x18 /* 6 0 */ -#define Hit_Set_Virtual_SI 0x1E /* 7 2 */ -#define Hit_Set_Virtual_SD 0x1F /* 7 3 */ - -#ifndef WAIT -#define WAIT .word 0x42000020 -#endif WAIT - -#ifndef wait -#define wait .word 0x42000020 -#endif wait - -#endif - -/* -** TLB resource defines -*/ -#if defined(CPU_R3000) -#define N_TLB_ENTRIES 64 -#define TLB_PGSIZE 0x1000 -#define RANDBASE 8 -#define TLBLO_PFNMASK 0xfffff000 -#define TLBLO_PFNSHIFT 12 -#define TLBLO_N 0x800 /* non-cacheable */ -#define TLBLO_D 0x400 /* writeable */ -#define TLBLO_V 0x200 /* valid bit */ -#define TLBLO_G 0x100 /* global access bit */ - -#define TLBHI_VPNMASK 0xfffff000 -#define TLBHI_VPNSHIFT 12 -#define TLBHI_PIDMASK 0xfc0 -#define TLBHI_PIDSHIFT 6 -#define TLBHI_NPID 64 - -#define TLBINX_PROBE 0x80000000 -#define TLBINX_INXMASK 0x00003f00 -#define TLBINX_INXSHIFT 8 - -#define TLBRAND_RANDMASK 0x00003f00 -#define TLBRAND_RANDSHIFT 8 - -#define TLBCTXT_BASEMASK 0xffe00000 -#define TLBCTXT_BASESHIFT 21 - -#define TLBCTXT_VPNMASK 0x001ffffc -#define TLBCTXT_VPNSHIFT 2 -#endif -#if defined(CPU_R4000) -#define N_TLB_ENTRIES 48 - -#define TLBHI_VPN2MASK 0xffffe000 -#define TLBHI_PIDMASK 0x000000ff -#define TLBHI_NPID 256 - -#define TLBLO_PFNMASK 0x3fffffc0 -#define TLBLO_PFNSHIFT 6 -#define TLBLO_D 0x00000004 /* writeable */ -#define TLBLO_V 0x00000002 /* valid bit */ -#define TLBLO_G 0x00000001 /* global access bit */ -#define TLBLO_CMASK 0x00000038 /* cache algorithm mask */ -#define TLBLO_CSHIFT 3 - -#define TLBLO_UNCACHED (CFG_C_UNCACHED< k, 1 => u */ -#define SR_IEO 0x00000010 /* old interrupt enable, 1 => enable */ -#define SR_KUP 0x00000008 /* prev kernel/user, 0 => k, 1 => u */ -#define SR_IEP 0x00000004 /* prev interrupt enable, 1 => enable */ -#define SR_KUC 0x00000002 /* cur kernel/user, 0 => k, 1 => u */ -#define SR_IEC 0x00000001 /* cur interrupt enable, 1 => enable */ -#endif - -#if defined(CPU_R4000) -#define SR_CUMASK 0xf0000000 /* coproc usable bits */ -#define SR_CU3 0x80000000 /* Coprocessor 3 usable */ -#define SR_CU2 0x40000000 /* Coprocessor 2 usable */ -#define SR_CU1 0x20000000 /* Coprocessor 1 usable */ -#define SR_CU0 0x10000000 /* Coprocessor 0 usable */ - -#define SR_RP 0x08000000 /* Reduced power operation */ -#define SR_FR 0x04000000 /* Additional floating point registers */ -#define SR_RE 0x02000000 /* Reverse endian in user mode */ - -#define SR_BEV 0x00400000 /* Use boot exception vectors */ -#define SR_TS 0x00200000 /* TLB shutdown */ -#define SR_SR 0x00100000 /* Soft reset */ -#define SR_CH 0x00040000 /* Cache hit */ -#define SR_CE 0x00020000 /* Use cache ECC */ -#define SR_DE 0x00010000 /* Disable cache exceptions */ - -/* -** status register interrupt masks and bits -*/ - -#define SR_IMASK 0x0000ff00 /* Interrupt mask */ -#define SR_IMASK8 0x00000000 /* mask level 8 */ -#define SR_IMASK7 0x00008000 /* mask level 7 */ -#define SR_IMASK6 0x0000c000 /* mask level 6 */ -#define SR_IMASK5 0x0000e000 /* mask level 5 */ -#define SR_IMASK4 0x0000f000 /* mask level 4 */ -#define SR_IMASK3 0x0000f800 /* mask level 3 */ -#define SR_IMASK2 0x0000fc00 /* mask level 2 */ -#define SR_IMASK1 0x0000fe00 /* mask level 1 */ -#define SR_IMASK0 0x0000ff00 /* mask level 0 */ - -#define SR_IMASKSHIFT 8 - -#define SR_IBIT8 0x00008000 /* bit level 8 */ -#define SR_IBIT7 0x00004000 /* bit level 7 */ -#define SR_IBIT6 0x00002000 /* bit level 6 */ -#define SR_IBIT5 0x00001000 /* bit level 5 */ -#define SR_IBIT4 0x00000800 /* bit level 4 */ -#define SR_IBIT3 0x00000400 /* bit level 3 */ -#define SR_IBIT2 0x00000200 /* bit level 2 */ -#define SR_IBIT1 0x00000100 /* bit level 1 */ - -#define SR_KSMASK 0x00000018 /* Kernel mode mask */ -#define SR_KSUSER 0x00000010 /* User mode */ -#define SR_KSSUPER 0x00000008 /* Supervisor mode */ -#define SR_KSKERNEL 0x00000000 /* Kernel mode */ -#define SR_ERL 0x00000004 /* Error level */ -#define SR_EXL 0x00000002 /* Exception level */ -#define SR_IE 0x00000001 /* Interrupts enabled */ -#endif - - - -/* - * Cause Register - */ -#define CAUSE_BD 0x80000000 /* Branch delay slot */ -#define CAUSE_CEMASK 0x30000000 /* coprocessor error */ -#define CAUSE_CESHIFT 28 - - -#define CAUSE_IPMASK 0x0000FF00 /* Pending interrupt mask */ -#define CAUSE_IPSHIFT 8 - -#define CAUSE_EXCMASK 0x0000003C /* Cause code bits */ -#define CAUSE_EXCSHIFT 2 - -#ifndef XDS -/* -** Coprocessor 0 registers -*/ -#define C0_INX $0 /* tlb index */ -#define C0_RAND $1 /* tlb random */ -#if defined(CPU_R3000) -#define C0_TLBLO $2 /* tlb entry low */ -#endif -#if defined(CPU_R4000) -#define C0_TLBLO0 $2 /* tlb entry low 0 */ -#define C0_TLBLO1 $3 /* tlb entry low 1 */ -#endif - -#define C0_CTXT $4 /* tlb context */ - -#if defined(CPU_R4000) -#define C0_PAGEMASK $5 /* tlb page mask */ -#define C0_WIRED $6 /* number of wired tlb entries */ -#endif - -#define C0_BADVADDR $8 /* bad virtual address */ - -#if defined(CPU_R4000) -#define C0_COUNT $9 /* cycle count */ -#endif - -#define C0_TLBHI $10 /* tlb entry hi */ - -#if defined(CPU_R4000) -#define C0_COMPARE $11 /* cyccle count comparator */ -#endif - -#define C0_SR $12 /* status register */ -#define C0_CAUSE $13 /* exception cause */ -#define C0_EPC $14 /* exception pc */ -#define C0_PRID $15 /* revision identifier */ - -#if defined(CPU_R3000) -#define C0_CONFIG $3 /* configuration register R3081*/ -#endif - -#if defined(CPU_R4000) -#define C0_CONFIG $16 /* configuration register */ -#define C0_LLADDR $17 /* linked load address */ -#define C0_WATCHLO $18 /* watchpoint trap register */ -#define C0_WATCHHI $19 /* watchpoint trap register */ -#define C0_XCTXT $20 /* extended tlb context */ -#define C0_ECC $26 /* secondary cache ECC control */ -#define C0_CACHEERR $27 /* cache error status */ -#define C0_TAGLO $28 /* cache tag lo */ -#define C0_TAGHI $29 /* cache tag hi */ -#define C0_ERRPC $30 /* cache error pc */ -#endif - -#endif XDS - -#ifdef R4650 -#define IWATCH $18 -#define DWATCH $19 -#define IBASE $0 -#define IBOUND $1 -#define DBASE $2 -#define DBOUND $3 -#define CALG $17 -#endif - -#endif /* _IDTCPU_H__ */ - diff --git a/c/src/exec/score/cpu/mips/idtmon.h b/c/src/exec/score/cpu/mips/idtmon.h deleted file mode 100644 index b42211ed5c..0000000000 --- a/c/src/exec/score/cpu/mips/idtmon.h +++ /dev/null @@ -1,171 +0,0 @@ -/* - -Based upon IDT provided code with the following release: - -This source code has been made available to you by IDT on an AS-IS -basis. Anyone receiving this source is licensed under IDT copyrights -to use it in any way he or she deems fit, including copying it, -modifying it, compiling it, and redistributing it either with or -without modifications. No license under IDT patents or patent -applications is to be implied by the copyright license. - -Any user of this software should understand that IDT cannot provide -technical support for this software and will not be responsible for -any consequences resulting from the use of this software. - -Any person who transfers this source code or any derivative work must -include the IDT copyright notice, this paragraph, and the preceeding -two paragraphs in the transferred software. - -COPYRIGHT IDT CORPORATION 1996 -LICENSED MATERIAL - PROGRAM PROPERTY OF IDT - - $Id$ -*/ - -/* -** idtmon.h - General header file for the IDT Prom Monitor -** -** Copyright 1989 Integrated Device Technology, Inc. -** All Rights Reserved. -** -** June 1989 - D.Cahoon -*/ -#ifndef __IDTMON_H__ -#define __IDTMON_H__ - -/* -** P_STACKSIZE is the size of the Prom Stack. -** the prom stack grows downward -*/ -#define P_STACKSIZE 0x2000 /* sets stack size to 8k */ - -/* -** M_BUSWIDTH -** Memory bus width (including bank interleaving) in bytes -** used when doing memory sizing to prevent bus capacitance -** reporting ghost memory locations -*/ -#if defined(CPU_R3000) -#define M_BUSWIDTH 8 /* 32bit memory bank interleaved */ -#endif -#if defined(CPU_R4000) -#define M_BUSWIDTH 16 /* 64 bit memory bank interleaved */ -#endif - -/* -** this is the default value for the number of bytes to add in calculating -** the checksums in the checksum command -*/ -#define CHK_SUM_CNT 0x20000 /* number of bytes to calc chksum for */ - -/* -** Monitor modes -*/ -#define MODE_MONITOR 5 /* IDT Prom Monitor is executing */ -#define MODE_USER 0xa /* USER is executing */ - -/* -** memory reference widths -*/ -#define SW_BYTE 1 -#define SW_HALFWORD 2 -#define SW_WORD 4 -#define SW_TRIBYTEL 12 -#define SW_TRIBYTER 20 - -#ifdef CPU_R4000 -/* -** definitions for select_cache call -*/ -#define DCACHE 0 -#define ICACHE 1 -#define SCACHE 2 - -#endif - -#if defined (CLANGUAGE) || defined(_LANGUAGE_C) -typedef struct { - unsigned int mem_size; - unsigned int icache_size; - unsigned int dcache_size; -#ifdef CPU_R4000 - unsigned int scache_size; -#endif - - } mem_config; - -#endif CLANGUAGE || defined(_LANGUAGE_C) - -/* -** general equates for diagnostics and boolean functions -*/ -#define PASS 0 -#define FAIL 1 - -#ifndef TRUE -#define TRUE 1 -#endif TRUE -#ifndef NULL -#define NULL 0 -#endif NULL - -#ifndef FALSE -#define FALSE 0 -#endif FALSE - - -/* -** portablility equates -*/ - -#ifndef BOOL -#define BOOL unsigned int -#endif BOOL - -#ifndef GLOBAL -#define GLOBAL /**/ -#endif GLOBAL - -#ifndef MLOCAL -#define MLOCAL static -#endif MLOCAL - - -#ifdef XDS -#define CONST const -#else -#define CONST -#endif XDS - -#define u_char unsigned char -#define u_short unsigned short -#define u_int unsigned int -/* -** assembly instructions for compatability between xds and mips -*/ -#ifndef XDS -#define sllv sll -#define srlv srl -#endif XDS -/* -** debugger macros for assembly language routines. Allows the -** programmer to set up the necessary stack frame info -** required by debuggers to do stack traces. -*/ - -#ifndef XDS -#define FRAME(name,frm_reg,offset,ret_reg) \ - .globl name; \ - .ent name; \ -name:; \ - .frame frm_reg,offset,ret_reg -#define ENDFRAME(name) \ - .end name -#else -#define FRAME(name,frm_reg,offset,ret_reg) \ - .globl _##name;\ -_##name: -#define ENDFRAME(name) -#endif XDS -#endif /* __IDTMON_H__ */ diff --git a/c/src/exec/score/cpu/mips/iregdef.h b/c/src/exec/score/cpu/mips/iregdef.h deleted file mode 100644 index f0953da852..0000000000 --- a/c/src/exec/score/cpu/mips/iregdef.h +++ /dev/null @@ -1,325 +0,0 @@ -/* - -Based upon IDT provided code with the following release: - -This source code has been made available to you by IDT on an AS-IS -basis. Anyone receiving this source is licensed under IDT copyrights -to use it in any way he or she deems fit, including copying it, -modifying it, compiling it, and redistributing it either with or -without modifications. No license under IDT patents or patent -applications is to be implied by the copyright license. - -Any user of this software should understand that IDT cannot provide -technical support for this software and will not be responsible for -any consequences resulting from the use of this software. - -Any person who transfers this source code or any derivative work must -include the IDT copyright notice, this paragraph, and the preceeding -two paragraphs in the transferred software. - -COPYRIGHT IDT CORPORATION 1996 -LICENSED MATERIAL - PROGRAM PROPERTY OF IDT - - $Id$ -*/ - -/* -** iregdef.h - IDT R3000 register structure header file -** -** Copyright 1989 Integrated Device Technology, Inc -** All Rights Reserved -** -*/ -#ifndef __IREGDEF_H__ -#define __IREGDEF_H__ - -/* - * 950313: Ketan added sreg/lreg and R_SZ for 64-bit saves - * added Register definition for XContext reg. - * Look towards end of this file. - */ -/* -** register names -*/ -#define r0 $0 -#define r1 $1 -#define r2 $2 -#define r3 $3 -#define r4 $4 -#define r5 $5 -#define r6 $6 -#define r7 $7 -#define r8 $8 -#define r9 $9 -#define r10 $10 -#define r11 $11 -#define r12 $12 -#define r13 $13 - -#define r14 $14 -#define r15 $15 -#define r16 $16 -#define r17 $17 -#define r18 $18 -#define r19 $19 -#define r20 $20 -#define r21 $21 -#define r22 $22 -#define r23 $23 -#define r24 $24 -#define r25 $25 -#define r26 $26 -#define r27 $27 -#define r28 $28 -#define r29 $29 -#define r30 $30 -#define r31 $31 - -#define fp0 $f0 -#define fp1 $f1 -#define fp2 $f2 -#define fp3 $f3 -#define fp4 $f4 -#define fp5 $f5 -#define fp6 $f6 -#define fp7 $f7 -#define fp8 $f8 -#define fp9 $f9 -#define fp10 $f10 -#define fp11 $f11 -#define fp12 $f12 -#define fp13 $f13 -#define fp14 $f14 -#define fp15 $f15 -#define fp16 $f16 -#define fp17 $f17 -#define fp18 $f18 -#define fp19 $f19 -#define fp20 $f20 -#define fp21 $f21 -#define fp22 $f22 -#define fp23 $f23 -#define fp24 $f24 -#define fp25 $f25 -#define fp26 $f26 -#define fp27 $f27 -#define fp28 $f28 -#define fp29 $f29 -#define fp30 $f30 -#define fp31 $f31 - -#define fcr0 $0 -#define fcr30 $30 -#define fcr31 $31 - -#define zero $0 /* wired zero */ -#define AT $at /* assembler temp */ -#define v0 $2 /* return value */ -#define v1 $3 -#define a0 $4 /* argument registers a0-a3 */ -#define a1 $5 -#define a2 $6 -#define a3 $7 -#define t0 $8 /* caller saved t0-t9 */ -#define t1 $9 -#define t2 $10 -#define t3 $11 -#define t4 $12 -#define t5 $13 -#define t6 $14 -#define t7 $15 -#define s0 $16 /* callee saved s0-s8 */ -#define s1 $17 -#define s2 $18 -#define s3 $19 -#define s4 $20 -#define s5 $21 -#define s6 $22 -#define s7 $23 -#define t8 $24 -#define t9 $25 -#define k0 $26 /* kernel usage */ -#define k1 $27 /* kernel usage */ -#define gp $28 /* sdata pointer */ -#define sp $29 /* stack pointer */ -#define s8 $30 /* yet another saved reg for the callee */ -#define fp $30 /* frame pointer - this is being phased out by MIPS */ -#define ra $31 /* return address */ - - -/* -** relative position of registers in save reg area -*/ -#define R_R0 0 -#define R_R1 1 -#define R_R2 2 -#define R_R3 3 -#define R_R4 4 -#define R_R5 5 -#define R_R6 6 -#define R_R7 7 -#define R_R8 8 -#define R_R9 9 -#define R_R10 10 -#define R_R11 11 -#define R_R12 12 -#define R_R13 13 -#define R_R14 14 -#define R_R15 15 -#define R_R16 16 -#define R_R17 17 -#define R_R18 18 -#define R_R19 19 -#define R_R20 20 -#define R_R21 21 -#define R_R22 22 -#define R_R23 23 -#define R_R24 24 -#define R_R25 25 -#define R_R26 26 -#define R_R27 27 -#define R_R28 28 -#define R_R29 29 -#define R_R30 30 -#define R_R31 31 -#define R_F0 32 -#define R_F1 33 -#define R_F2 34 -#define R_F3 35 -#define R_F4 36 -#define R_F5 37 -#define R_F6 38 -#define R_F7 39 -#define R_F8 40 -#define R_F9 41 -#define R_F10 42 -#define R_F11 43 -#define R_F12 44 -#define R_F13 45 -#define R_F14 46 -#define R_F15 47 -#define R_F16 48 -#define R_F17 49 -#define R_F18 50 -#define R_F19 51 -#define R_F20 52 -#define R_F21 53 -#define R_F22 54 -#define R_F23 55 -#define R_F24 56 -#define R_F25 57 -#define R_F26 58 -#define R_F27 59 -#define R_F28 60 -#define R_F29 61 -#define R_F30 62 -#define R_F31 63 -#define NCLIENTREGS 64 -#define R_EPC 64 -#define R_MDHI 65 -#define R_MDLO 66 -#define R_SR 67 -#define R_CAUSE 68 -#define R_TLBHI 69 -#if defined(CPU_R3000) -#define R_TLBLO 70 -#endif -#if defined(CPU_R4000) -#define R_TLBLO0 70 -#endif -#define R_BADVADDR 71 -#define R_INX 72 -#define R_RAND 73 -#define R_CTXT 74 -#define R_EXCTYPE 75 -#define R_MODE 76 -#define R_PRID 77 -#define R_FCSR 78 -#define R_FEIR 79 -#if defined(CPU_R3000) -#define NREGS 80 -#endif -#if defined(CPU_R4000) -#define R_TLBLO1 80 -#define R_PAGEMASK 81 -#define R_WIRED 82 -#define R_COUNT 83 -#define R_COMPARE 84 -#define R_CONFIG 85 -#define R_LLADDR 86 -#define R_WATCHLO 87 -#define R_WATCHHI 88 -#define R_ECC 89 -#define R_CACHEERR 90 -#define R_TAGLO 91 -#define R_TAGHI 92 -#define R_ERRPC 93 -#define R_XCTXT 94 /* Ketan added from SIM64bit */ - -#define NREGS 95 -#endif - -/* -** For those who like to think in terms of the compiler names for the regs -*/ -#define R_ZERO R_R0 -#define R_AT R_R1 -#define R_V0 R_R2 -#define R_V1 R_R3 -#define R_A0 R_R4 -#define R_A1 R_R5 -#define R_A2 R_R6 -#define R_A3 R_R7 -#define R_T0 R_R8 -#define R_T1 R_R9 -#define R_T2 R_R10 -#define R_T3 R_R11 -#define R_T4 R_R12 -#define R_T5 R_R13 -#define R_T6 R_R14 -#define R_T7 R_R15 -#define R_S0 R_R16 -#define R_S1 R_R17 -#define R_S2 R_R18 -#define R_S3 R_R19 -#define R_S4 R_R20 -#define R_S5 R_R21 -#define R_S6 R_R22 -#define R_S7 R_R23 -#define R_T8 R_R24 -#define R_T9 R_R25 -#define R_K0 R_R26 -#define R_K1 R_R27 -#define R_GP R_R28 -#define R_SP R_R29 -#define R_FP R_R30 -#define R_RA R_R31 - -/* Ketan added the following */ -#ifdef CPU_R3000 -#define sreg sw -#define lreg lw -#define rmfc0 mfc0 -#define rmtc0 mtc0 -#define R_SZ 4 -#endif CPU_R3000 - -#ifdef CPU_R4000 -#if __mips < 3 -#define sreg sw -#define lreg lw -#define rmfc0 mfc0 -#define rmtc0 mtc0 -#define R_SZ 4 -#else -#define sreg sd -#define lreg ld -#define rmfc0 dmfc0 -#define rmtc0 dmtc0 -#define R_SZ 8 -#endif -#endif CPU_R4000 -/* Ketan till here */ - -#endif /* __IREGDEF_H__ */ - diff --git a/c/src/exec/score/cpu/mips/rtems.c b/c/src/exec/score/cpu/mips/rtems.c deleted file mode 100644 index f7ef2c32ab..0000000000 --- a/c/src/exec/score/cpu/mips/rtems.c +++ /dev/null @@ -1,49 +0,0 @@ -/* rtems.c ===> rtems.S or rtems.s - * - * This file contains the single entry point code for - * the XXX implementation of RTEMS. - * - * NOTE: This is supposed to be a .S or .s file NOT a C file. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef lint -static char _sccsid[] = "@(#)rtems.c 03/15/96 1.1\n"; -#endif - -/* - * This is supposed to be an assembly file. This means that system.h - * and cpu.h should not be included in a "real" rtems file. - */ - -#include -#include -/* #include "asm.h> */ - -/* - * RTEMS - * - * This routine jumps to the directive indicated in the - * CPU defined register. This routine is used when RTEMS is - * linked by itself and placed in ROM. This routine is the - * first address in the ROM space for RTEMS. The user "calls" - * this address with the directive arguments in the normal place. - * This routine then jumps indirectly to the correct directive - * preserving the arguments. The directive should not realize - * it has been "wrapped" in this way. The table "_Entry_points" - * is used to look up the directive. - */ - -void RTEMS() -{ -} - diff --git a/c/src/exec/score/cpu/powerpc/README b/c/src/exec/score/cpu/powerpc/README deleted file mode 100644 index fc0dd9c7d7..0000000000 --- a/c/src/exec/score/cpu/powerpc/README +++ /dev/null @@ -1,71 +0,0 @@ -# -# $Id$ -# - -There are various issues regarding this port: - - - -1) Legal - -This port is written by Andrew Bray , and -is copyright 1995 i-cubed ltd. - - - -2) CPU support. - -This release fully supports the IBM PPC403GA and PPC403GB processors. - -It has only been tested on the PPC403GA (using software floating -point). - -With the gratefully acknowledged assistance of IBM and Blue Micro, -this release contains code to support the following processors - PPC601, PPC603, PPC603e, PPC604, and PPC602. - -The support for these processors is incomplete, especially that for -the PPC602 for which only sketchy data is currently available. - - - -3) Application Binary INterface - -In the context of RTEMS, the ABI is of interest for the following -aspects: - -a) Register usage. Which registers are used to provide static variable - linkage, stack pointer etc. - -b) Function calling convention. How parameters are passed, how function - variables should be invoked, how values are returned, etc. - -c) Stack frame layout. - -I am aware of a number of ABIs for the PowerPC: - -a) The PowerOpen ABI. This is the original Power ABI used on the RS/6000. - This is the only ABI supported by versions of GCC before 2.7.0. - -b) The SVR4 ABI. This is the ABI defined by SunSoft for the Solaris port - to the PowerPC. - -c) The Embedded ABI. This is an embedded ABI for PowerPC use, which has no - operating system interface defined. It is promoted by SunSoft, Motorola, - and Cygnus Support. Cygnus are porting the GNU toolchain to this ABI. - -d) GCC 2.7.0. This compiler is partway along the road to supporting the EABI, - but is currently halfway in between. - -This port was built and tested using the PowerOpen ABI, with the following -caveat: we used an ELF assembler and linker. So some attention may be required -on the assembler files to get them through a traditional (XCOFF) PowerOpen -assembler. - -This port contains support for the other ABIs, but this may prove to be incomplete -as it is untested. - -In the long term, the RTEMS PowerPC port should move to the EABI as its primary -or only port. This should wait on a true EABI version of GCC. - -Andrew Bray 4/December/1995 diff --git a/c/src/exec/score/cpu/powerpc/TODO b/c/src/exec/score/cpu/powerpc/TODO deleted file mode 100644 index 6e3e04e6ca..0000000000 --- a/c/src/exec/score/cpu/powerpc/TODO +++ /dev/null @@ -1,7 +0,0 @@ -# -# $Id$ -# - -Todo list: - -Maybe decode external interrupts like the HPPA does. diff --git a/c/src/exec/score/cpu/powerpc/cpu.c b/c/src/exec/score/cpu/powerpc/cpu.c deleted file mode 100644 index 77aacc2ed7..0000000000 --- a/c/src/exec/score/cpu/powerpc/cpu.c +++ /dev/null @@ -1,264 +0,0 @@ -/* - * PowerPC CPU Dependent Source - * - * Author: Andrew Bray - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/exec/cpu/no_cpu/cpu.c: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include -#include - -/* - * These are for testing purposes. - */ -#undef Testing - -#ifdef Testing -static unsigned32 msr; -#ifdef ppc403 -static unsigned32 evpr; -static unsigned32 exier; -#endif -#endif - -/* - * ppc_interrupt_level_to_msr - * - * This routine converts a two bit interrupt level to an MSR bit map. - */ - -const unsigned32 _CPU_msrs[4] = - { PPC_MSR_0, PPC_MSR_1, PPC_MSR_2, PPC_MSR_3 }; - -/* _CPU_Initialize - * - * This routine performs processor dependent initialization. - * - * INPUT PARAMETERS: - * cpu_table - CPU table to initialize - * thread_dispatch - address of disptaching routine - */ - -static void ppc_spurious(int, CPU_Interrupt_frame *); - -void _CPU_Initialize( - rtems_cpu_table *cpu_table, - void (*thread_dispatch) /* ignored on this CPU */ -) -{ - proc_ptr handler = (proc_ptr)ppc_spurious; - int i; -#if (PPC_ABI != PPC_ABI_POWEROPEN) - register unsigned32 r2; -#if (PPC_ABI != PPC_ABI_GCC27) - register unsigned32 r13; - - asm ("mr %0,13" : "=r" ((r13)) : "0" ((r13))); - _CPU_IRQ_info.Default_r13 = r13; -#endif - - asm ("mr %0,2" : "=r" ((r2)) : "0" ((r2))); - _CPU_IRQ_info.Default_r2 = r2; -#endif - - _CPU_IRQ_info.Nest_level = &_ISR_Nest_level; - _CPU_IRQ_info.Disable_level = &_Thread_Dispatch_disable_level; - _CPU_IRQ_info.Vector_table = _ISR_Vector_table; -#if (PPC_ABI == PPC_ABI_POWEROPEN) - _CPU_IRQ_info.Dispatch_r2 = ((unsigned32 *)_Thread_Dispatch)[1]; -#endif - _CPU_IRQ_info.Switch_necessary = &_Context_Switch_necessary; - _CPU_IRQ_info.Signal = &_ISR_Signals_to_thread_executing; - - i = (int)&_CPU_IRQ_info; - asm volatile("mtspr 0x113, %0" : "=r" (i) : "0" (i)); /* SPRG 3 */ - - i = PPC_MSR_INITIAL & ~PPC_MSR_DISABLE_MASK; - asm volatile("mtspr 0x112, %0" : "=r" (i) : "0" (i)); /* SPRG 2 */ - -#ifdef Testing - { - unsigned32 tmp; - - asm volatile ("mfmsr %0" : "=r" (tmp)); - msr = tmp; -#ifdef ppc403 - asm volatile ("mfspr %0, 0x3d6" : "=r" (tmp)); /* EVPR */ - evpr = tmp; - asm volatile ("mfdcr %0, 0x42" : "=r" (tmp)); /* EXIER */ - exier = tmp; - asm volatile ("mtspr 0x3d6, %0" :: "r" (0)); /* EVPR */ -#endif - } -#endif - - if ( cpu_table->spurious_handler ) - handler = (proc_ptr)cpu_table->spurious_handler; - - for (i = 0; i < PPC_INTERRUPT_MAX; i++) - _ISR_Vector_table[i] = handler; - - _CPU_Table = *cpu_table; -} - -/*PAGE - * - * _CPU_ISR_Get_level - * - * COMMENTS FROM Andrew Bray : - * - * The PowerPC puts its interrupt enable status in the MSR register - * which also contains things like endianness control. To be more - * awkward, the layout varies from processor to processor. This - * is why I adopted a table approach in my interrupt handling. - * Thus the inverse process is slow, because it requires a table - * search. - * - * This could fail, and return 4 (an invalid level) if the MSR has been - * set to a value not in the table. This is also quite an expensive - * operation - I do hope its not too common. - * - */ - -unsigned32 _CPU_ISR_Get_level( void ) -{ - unsigned32 level, msr; - - asm volatile("mfmsr %0" : "=r" ((msr))); - - msr &= PPC_MSR_DISABLE_MASK; - - for (level = 0; level < 4; level++) - if ((_CPU_msrs[level] & PPC_MSR_DISABLE_MASK) == msr) - break; - - return level; -} - -/* _CPU_ISR_install_vector - * - * This kernel routine installs the RTEMS handler for the - * specified vector. - * - * Input parameters: - * vector - interrupt vector number - * old_handler - former ISR for this vector number - * new_handler - replacement ISR for this vector number - * - * Output parameters: NONE - * - */ - -void _CPU_ISR_install_vector( - unsigned32 vector, - proc_ptr new_handler, - proc_ptr *old_handler -) -{ - *old_handler = _ISR_Vector_table[ vector ]; - - /* - * If the interrupt vector table is a table of pointer to isr entry - * points, then we need to install the appropriate RTEMS interrupt - * handler for this vector number. - */ - - /* - * We put the actual user ISR address in '_ISR_vector_table'. This will - * be used by the _ISR_Handler so the user gets control. - */ - - _ISR_Vector_table[ vector ] = new_handler ? (ISR_Handler_entry)new_handler : - _CPU_Table.spurious_handler ? - (ISR_Handler_entry)_CPU_Table.spurious_handler : - (ISR_Handler_entry)ppc_spurious; -} - -/*PAGE - * - * _CPU_Install_interrupt_stack - */ - -void _CPU_Install_interrupt_stack( void ) -{ -#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27) - _CPU_IRQ_info.Stack = _CPU_Interrupt_stack_high - 56; -#else - _CPU_IRQ_info.Stack = _CPU_Interrupt_stack_high - 8; -#endif -} - -/* Handle a spurious interrupt */ -static void ppc_spurious(int v, CPU_Interrupt_frame *i) -{ -#if 0 - printf("Spurious interrupt on vector %d from %08.8x\n", - v, i->pc); -#endif -#ifdef ppc403 - if (v == PPC_IRQ_EXTERNAL) - { - register int r = 0; - - asm volatile("mtdcr 0x42, %0" : "=r" ((r)) : "0" ((r))); /* EXIER */ - } - else if (v == PPC_IRQ_PIT) - { - register int r = 0x08000000; - - asm volatile("mtspr 0x3d8, %0" : "=r" ((r)) : "0" ((r))); /* TSR */ - } - else if (v == PPC_IRQ_FIT) - { - register int r = 0x04000000; - - asm volatile("mtspr 0x3d8, %0" : "=r" ((r)) : "0" ((r))); /* TSR */ - } -#endif -} - -void _CPU_Fatal_error(unsigned32 _error) -{ -#ifdef Testing - unsigned32 tmp; - - tmp = msr; - asm volatile ("mtmsr %0" :: "r" (tmp)); -#ifdef ppc403 - tmp = evpr; - asm volatile ("mtspr 0x3d6, %0" :: "r" (tmp)); /* EVPR */ - tmp = exier; - asm volatile ("mtdcr 0x42, %0" :: "r" (tmp)); /* EXIER */ -#endif -#endif - asm volatile ("mr 3, %0" : : "r" ((_error))); - asm volatile ("tweq 5,5"); - asm volatile ("li 0,0; mtmsr 0"); - while (1) ; -} diff --git a/c/src/exec/score/cpu/powerpc/cpu.h b/c/src/exec/score/cpu/powerpc/cpu.h deleted file mode 100644 index bb7b1fea49..0000000000 --- a/c/src/exec/score/cpu/powerpc/cpu.h +++ /dev/null @@ -1,1017 +0,0 @@ -/* cpu.h - * - * This include file contains information pertaining to the PowerPC - * processor. - * - * Author: Andrew Bray - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/exec/cpu/no_cpu/cpu.h: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __CPU_h -#define __CPU_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include /* pick up machine definitions */ -#ifndef ASM -struct CPU_Interrupt_frame; - -#include -#endif - -/* conditional compilation parameters */ - -/* - * Should the calls to _Thread_Enable_dispatch be inlined? - * - * If TRUE, then they are inlined. - * If FALSE, then a subroutine call is made. - * - * Basically this is an example of the classic trade-off of size - * versus speed. Inlining the call (TRUE) typically increases the - * size of RTEMS while speeding up the enabling of dispatching. - * [NOTE: In general, the _Thread_Dispatch_disable_level will - * only be 0 or 1 unless you are in an interrupt handler and that - * interrupt handler invokes the executive.] When not inlined - * something calls _Thread_Enable_dispatch which in turns calls - * _Thread_Dispatch. If the enable dispatch is inlined, then - * one subroutine call is avoided entirely.] - */ - -#define CPU_INLINE_ENABLE_DISPATCH FALSE - -/* - * Should the body of the search loops in _Thread_queue_Enqueue_priority - * be unrolled one time? In unrolled each iteration of the loop examines - * two "nodes" on the chain being searched. Otherwise, only one node - * is examined per iteration. - * - * If TRUE, then the loops are unrolled. - * If FALSE, then the loops are not unrolled. - * - * The primary factor in making this decision is the cost of disabling - * and enabling interrupts (_ISR_Flash) versus the cost of rest of the - * body of the loop. On some CPUs, the flash is more expensive than - * one iteration of the loop body. In this case, it might be desirable - * to unroll the loop. It is important to note that on some CPUs, this - * code is the longest interrupt disable period in RTEMS. So it is - * necessary to strike a balance when setting this parameter. - */ - -#define CPU_UNROLL_ENQUEUE_PRIORITY FALSE - -/* - * Does RTEMS manage a dedicated interrupt stack in software? - * - * If TRUE, then a stack is allocated in _Interrupt_Manager_initialization. - * If FALSE, nothing is done. - * - * If the CPU supports a dedicated interrupt stack in hardware, - * then it is generally the responsibility of the BSP to allocate it - * and set it up. - * - * If the CPU does not support a dedicated interrupt stack, then - * the porter has two options: (1) execute interrupts on the - * stack of the interrupted task, and (2) have RTEMS manage a dedicated - * interrupt stack. - * - * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE. - * - * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and - * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is - * possible that both are FALSE for a particular CPU. Although it - * is unclear what that would imply about the interrupt processing - * procedure on that CPU. - */ - -#define CPU_HAS_SOFTWARE_INTERRUPT_STACK FALSE - -/* - * Does this CPU have hardware support for a dedicated interrupt stack? - * - * If TRUE, then it must be installed during initialization. - * If FALSE, then no installation is performed. - * - * If this is TRUE, CPU_ALLOCATE_INTERRUPT_STACK should also be TRUE. - * - * Only one of CPU_HAS_SOFTWARE_INTERRUPT_STACK and - * CPU_HAS_HARDWARE_INTERRUPT_STACK should be set to TRUE. It is - * possible that both are FALSE for a particular CPU. Although it - * is unclear what that would imply about the interrupt processing - * procedure on that CPU. - */ - -/* - * ACB: This is a lie, but it gets us a handle on a call to set up - * a variable derived from the top of the interrupt stack. - */ - -#define CPU_HAS_HARDWARE_INTERRUPT_STACK TRUE - -/* - * Does RTEMS allocate a dedicated interrupt stack in the Interrupt Manager? - * - * If TRUE, then the memory is allocated during initialization. - * If FALSE, then the memory is allocated during initialization. - * - * This should be TRUE is CPU_HAS_SOFTWARE_INTERRUPT_STACK is TRUE - * or CPU_INSTALL_HARDWARE_INTERRUPT_STACK is TRUE. - */ - -#define CPU_ALLOCATE_INTERRUPT_STACK TRUE - -/* - * Does the CPU have hardware floating point? - * - * If TRUE, then the RTEMS_FLOATING_POINT task attribute is supported. - * If FALSE, then the RTEMS_FLOATING_POINT task attribute is ignored. - * - * If there is a FP coprocessor such as the i387 or mc68881, then - * the answer is TRUE. - * - * The macro name "PPC_HAS_FPU" should be made CPU specific. - * It indicates whether or not this CPU model has FP support. For - * example, it would be possible to have an i386_nofp CPU model - * which set this to false to indicate that you have an i386 without - * an i387 and wish to leave floating point support out of RTEMS. - */ - -#if ( PPC_HAS_FPU == 1 ) -#define CPU_HARDWARE_FP TRUE -#else -#define CPU_HARDWARE_FP FALSE -#endif - -/* - * Are all tasks RTEMS_FLOATING_POINT tasks implicitly? - * - * If TRUE, then the RTEMS_FLOATING_POINT task attribute is assumed. - * If FALSE, then the RTEMS_FLOATING_POINT task attribute is followed. - * - * So far, the only CPU in which this option has been used is the - * HP PA-RISC. The HP C compiler and gcc both implicitly use the - * floating point registers to perform integer multiplies. If - * a function which you would not think utilize the FP unit DOES, - * then one can not easily predict which tasks will use the FP hardware. - * In this case, this option should be TRUE. - * - * If CPU_HARDWARE_FP is FALSE, then this should be FALSE as well. - */ - -#define CPU_ALL_TASKS_ARE_FP FALSE - -/* - * Should the IDLE task have a floating point context? - * - * If TRUE, then the IDLE task is created as a RTEMS_FLOATING_POINT task - * and it has a floating point context which is switched in and out. - * If FALSE, then the IDLE task does not have a floating point context. - * - * Setting this to TRUE negatively impacts the time required to preempt - * the IDLE task from an interrupt because the floating point context - * must be saved as part of the preemption. - */ - -#define CPU_IDLE_TASK_IS_FP FALSE - -/* - * Should the saving of the floating point registers be deferred - * until a context switch is made to another different floating point - * task? - * - * If TRUE, then the floating point context will not be stored until - * necessary. It will remain in the floating point registers and not - * disturned until another floating point task is switched to. - * - * If FALSE, then the floating point context is saved when a floating - * point task is switched out and restored when the next floating point - * task is restored. The state of the floating point registers between - * those two operations is not specified. - * - * If the floating point context does NOT have to be saved as part of - * interrupt dispatching, then it should be safe to set this to TRUE. - * - * Setting this flag to TRUE results in using a different algorithm - * for deciding when to save and restore the floating point context. - * The deferred FP switch algorithm minimizes the number of times - * the FP context is saved and restored. The FP context is not saved - * until a context switch is made to another, different FP task. - * Thus in a system with only one FP task, the FP context will never - * be saved or restored. - */ -/* - * ACB Note: This could make debugging tricky.. - */ - -#define CPU_USE_DEFERRED_FP_SWITCH TRUE - -/* - * Does this port provide a CPU dependent IDLE task implementation? - * - * If TRUE, then the routine _CPU_Thread_Idle_body - * must be provided and is the default IDLE thread body instead of - * _CPU_Thread_Idle_body. - * - * If FALSE, then use the generic IDLE thread body if the BSP does - * not provide one. - * - * This is intended to allow for supporting processors which have - * a low power or idle mode. When the IDLE thread is executed, then - * the CPU can be powered down. - * - * The order of precedence for selecting the IDLE thread body is: - * - * 1. BSP provided - * 2. CPU dependent (if provided) - * 3. generic (if no BSP and no CPU dependent) - */ - -#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE - -/* - * Does the stack grow up (toward higher addresses) or down - * (toward lower addresses)? - * - * If TRUE, then the grows upward. - * If FALSE, then the grows toward smaller addresses. - */ - -#define CPU_STACK_GROWS_UP FALSE - -/* - * The following is the variable attribute used to force alignment - * of critical RTEMS structures. On some processors it may make - * sense to have these aligned on tighter boundaries than - * the minimum requirements of the compiler in order to have as - * much of the critical data area as possible in a cache line. - * - * The placement of this macro in the declaration of the variables - * is based on the syntactically requirements of the GNU C - * "__attribute__" extension. For example with GNU C, use - * the following to force a structures to a 32 byte boundary. - * - * __attribute__ ((aligned (32))) - * - * NOTE: Currently only the Priority Bit Map table uses this feature. - * To benefit from using this, the data must be heavily - * used so it will stay in the cache and used frequently enough - * in the executive to justify turning this on. - */ - -#define CPU_STRUCTURE_ALIGNMENT __attribute__ ((aligned (PPC_CACHE_ALIGNMENT))) - -/* - * The following defines the number of bits actually used in the - * interrupt field of the task mode. How those bits map to the - * CPU interrupt levels is defined by the routine _CPU_ISR_Set_level(). - */ -/* - * ACB Note: Levels are: - * 0: All maskable interrupts enabled - * 1: Other critical exceptions enabled - * 2: Machine check enabled - * 3: All maskable IRQs disabled - */ - -#define CPU_MODES_INTERRUPT_MASK 0x00000003 - -/* - * Processor defined structures - * - * Examples structures include the descriptor tables from the i386 - * and the processor control structure on the i960ca. - */ - -/* may need to put some structures here. */ - -/* - * Contexts - * - * Generally there are 2 types of context to save. - * 1. Interrupt registers to save - * 2. Task level registers to save - * - * This means we have the following 3 context items: - * 1. task level context stuff:: Context_Control - * 2. floating point task stuff:: Context_Control_fp - * 3. special interrupt level context :: Context_Control_interrupt - * - * On some processors, it is cost-effective to save only the callee - * preserved registers during a task context switch. This means - * that the ISR code needs to save those registers which do not - * persist across function calls. It is not mandatory to make this - * distinctions between the caller/callee saves registers for the - * purpose of minimizing context saved during task switch and on interrupts. - * If the cost of saving extra registers is minimal, simplicity is the - * choice. Save the same context on interrupt entry as for tasks in - * this case. - * - * Additionally, if gdb is to be made aware of RTEMS tasks for this CPU, then - * care should be used in designing the context area. - * - * On some CPUs with hardware floating point support, the Context_Control_fp - * structure will not be used or it simply consist of an array of a - * fixed number of bytes. This is done when the floating point context - * is dumped by a "FP save context" type instruction and the format - * is not really defined by the CPU. In this case, there is no need - * to figure out the exact format -- only the size. Of course, although - * this is enough information for RTEMS, it is probably not enough for - * a debugger such as gdb. But that is another problem. - */ - -typedef struct { - unsigned32 gpr1; /* Stack pointer for all */ - unsigned32 gpr2; /* TOC in PowerOpen, reserved SVR4, section ptr EABI + */ - unsigned32 gpr13; /* First non volatile PowerOpen, section ptr SVR4/EABI */ - unsigned32 gpr14; /* Non volatile for all */ - unsigned32 gpr15; /* Non volatile for all */ - unsigned32 gpr16; /* Non volatile for all */ - unsigned32 gpr17; /* Non volatile for all */ - unsigned32 gpr18; /* Non volatile for all */ - unsigned32 gpr19; /* Non volatile for all */ - unsigned32 gpr20; /* Non volatile for all */ - unsigned32 gpr21; /* Non volatile for all */ - unsigned32 gpr22; /* Non volatile for all */ - unsigned32 gpr23; /* Non volatile for all */ - unsigned32 gpr24; /* Non volatile for all */ - unsigned32 gpr25; /* Non volatile for all */ - unsigned32 gpr26; /* Non volatile for all */ - unsigned32 gpr27; /* Non volatile for all */ - unsigned32 gpr28; /* Non volatile for all */ - unsigned32 gpr29; /* Non volatile for all */ - unsigned32 gpr30; /* Non volatile for all */ - unsigned32 gpr31; /* Non volatile for all */ - unsigned32 cr; /* PART of the CR is non volatile for all */ - unsigned32 pc; /* Program counter/Link register */ - unsigned32 msr; /* Initial interrupt level */ -} Context_Control; - -typedef struct { - /* The ABIs (PowerOpen/SVR4/EABI) only require saving f14-f31 over - * procedure calls. However, this would mean that the interrupt - * frame had to hold f0-f13, and the fpscr. And as the majority - * of tasks will not have an FP context, we will save the whole - * context here. - */ -#if (PPC_HAS_DOUBLE == 1) - double f[32]; - double fpscr; -#else - float f[32]; - float fpscr; -#endif -} Context_Control_fp; - -typedef struct CPU_Interrupt_frame { - unsigned32 stacklink; /* Ensure this is a real frame (also reg1 save) */ -#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27) - unsigned32 dummy[13]; /* Used by callees: PowerOpen ABI */ -#else - unsigned32 dummy[1]; /* Used by callees: SVR4/EABI */ -#endif - /* This is what is left out of the primary contexts */ - unsigned32 gpr0; - unsigned32 gpr2; /* play safe */ - unsigned32 gpr3; - unsigned32 gpr4; - unsigned32 gpr5; - unsigned32 gpr6; - unsigned32 gpr7; - unsigned32 gpr8; - unsigned32 gpr9; - unsigned32 gpr10; - unsigned32 gpr11; - unsigned32 gpr12; - unsigned32 gpr13; /* Play safe */ - unsigned32 gpr28; /* For internal use by the IRQ handler */ - unsigned32 gpr29; /* For internal use by the IRQ handler */ - unsigned32 gpr30; /* For internal use by the IRQ handler */ - unsigned32 gpr31; /* For internal use by the IRQ handler */ - unsigned32 cr; /* Bits of this are volatile, so no-one may save */ - unsigned32 ctr; - unsigned32 xer; - unsigned32 lr; - unsigned32 pc; - unsigned32 msr; - unsigned32 pad[3]; -} CPU_Interrupt_frame; - - -/* - * The following table contains the information required to configure - * the PowerPC processor specific parameters. - */ - -typedef struct { - void (*pretasking_hook)( void ); - void (*predriver_hook)( void ); - void (*postdriver_hook)( void ); - void (*idle_task)( void ); - boolean do_zero_of_workspace; - unsigned32 interrupt_stack_size; - unsigned32 extra_mpci_receive_server_stack; - void * (*stack_allocate_hook)( unsigned32 ); - void (*stack_free_hook)( void* ); - /* end of fields required on all CPUs */ - - unsigned32 clicks_per_usec; /* Timer clicks per microsecond */ - unsigned32 serial_per_sec; /* Serial clocks per second */ - boolean serial_external_clock; - boolean serial_xon_xoff; - boolean serial_cts_rts; - unsigned32 serial_rate; - unsigned32 timer_average_overhead; /* Average overhead of timer in ticks */ - unsigned32 timer_least_valid; /* Least valid number from timer */ - void (*spurious_handler)(unsigned32 vector, CPU_Interrupt_frame *); -} rtems_cpu_table; - -/* - * This variable is optional. It is used on CPUs on which it is difficult - * to generate an "uninitialized" FP context. It is filled in by - * _CPU_Initialize and copied into the task's FP context area during - * _CPU_Context_Initialize. - */ - -/* EXTERN Context_Control_fp _CPU_Null_fp_context; */ - -/* - * On some CPUs, RTEMS supports a software managed interrupt stack. - * This stack is allocated by the Interrupt Manager and the switch - * is performed in _ISR_Handler. These variables contain pointers - * to the lowest and highest addresses in the chunk of memory allocated - * for the interrupt stack. Since it is unknown whether the stack - * grows up or down (in general), this give the CPU dependent - * code the option of picking the version it wants to use. - * - * NOTE: These two variables are required if the macro - * CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE. - */ - -SCORE_EXTERN void *_CPU_Interrupt_stack_low; -SCORE_EXTERN void *_CPU_Interrupt_stack_high; - -/* - * With some compilation systems, it is difficult if not impossible to - * call a high-level language routine from assembly language. This - * is especially true of commercial Ada compilers and name mangling - * C++ ones. This variable can be optionally defined by the CPU porter - * and contains the address of the routine _Thread_Dispatch. This - * can make it easier to invoke that routine at the end of the interrupt - * sequence (if a dispatch is necessary). - */ - -/* EXTERN void (*_CPU_Thread_dispatch_pointer)(); */ - -/* - * Nothing prevents the porter from declaring more CPU specific variables. - */ - -SCORE_EXTERN struct { - unsigned32 *Nest_level; - unsigned32 *Disable_level; - void *Vector_table; - void *Stack; -#if (PPC_ABI == PPC_ABI_POWEROPEN) - unsigned32 Dispatch_r2; -#else - unsigned32 Default_r2; -#if (PPC_ABI != PPC_ABI_GCC27) - unsigned32 Default_r13; -#endif -#endif - boolean *Switch_necessary; - boolean *Signal; -} _CPU_IRQ_info CPU_STRUCTURE_ALIGNMENT; - -/* - * The size of the floating point context area. On some CPUs this - * will not be a "sizeof" because the format of the floating point - * area is not defined -- only the size is. This is usually on - * CPUs with a "floating point save context" instruction. - */ - -#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp ) - -/* - * (Optional) # of bytes for libmisc/stackchk to check - * If not specifed, then it defaults to something reasonable - * for most architectures. - */ - -#define CPU_STACK_CHECK_SIZE (128) - -/* - * Amount of extra stack (above minimum stack size) required by - * MPCI receive server thread. Remember that in a multiprocessor - * system this thread must exist and be able to process all directives. - */ - -#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0 - -/* - * This defines the number of entries in the ISR_Vector_table managed - * by RTEMS. - */ - -#define CPU_INTERRUPT_NUMBER_OF_VECTORS (PPC_INTERRUPT_MAX) -#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1) - -/* - * Should be large enough to run all RTEMS tests. This insures - * that a "reasonable" small application should not have any problems. - */ - -#define CPU_STACK_MINIMUM_SIZE (1024*3) - -/* - * CPU's worst alignment requirement for data types on a byte boundary. This - * alignment does not take into account the requirements for the stack. - */ - -#define CPU_ALIGNMENT (PPC_ALIGNMENT) - -/* - * This number corresponds to the byte alignment requirement for the - * heap handler. This alignment requirement may be stricter than that - * for the data types alignment specified by CPU_ALIGNMENT. It is - * common for the heap to follow the same alignment requirement as - * CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict enough for the heap, - * then this should be set to CPU_ALIGNMENT. - * - * NOTE: This does not have to be a power of 2. It does have to - * be greater or equal to than CPU_ALIGNMENT. - */ - -#define CPU_HEAP_ALIGNMENT (PPC_ALIGNMENT) - -/* - * This number corresponds to the byte alignment requirement for memory - * buffers allocated by the partition manager. This alignment requirement - * may be stricter than that for the data types alignment specified by - * CPU_ALIGNMENT. It is common for the partition to follow the same - * alignment requirement as CPU_ALIGNMENT. If the CPU_ALIGNMENT is strict - * enough for the partition, then this should be set to CPU_ALIGNMENT. - * - * NOTE: This does not have to be a power of 2. It does have to - * be greater or equal to than CPU_ALIGNMENT. - */ - -#define CPU_PARTITION_ALIGNMENT (PPC_ALIGNMENT) - -/* - * This number corresponds to the byte alignment requirement for the - * stack. This alignment requirement may be stricter than that for the - * data types alignment specified by CPU_ALIGNMENT. If the CPU_ALIGNMENT - * is strict enough for the stack, then this should be set to 0. - * - * NOTE: This must be a power of 2 either 0 or greater than CPU_ALIGNMENT. - */ - -#define CPU_STACK_ALIGNMENT (PPC_STACK_ALIGNMENT) - -/* ISR handler macros */ - -/* - * Disable all interrupts for an RTEMS critical section. The previous - * level is returned in _level. - */ - -#define loc_string(a,b) a " (" #b ")\n" - -#define _CPU_ISR_Disable( _isr_cookie ) \ - { \ - asm volatile ( \ - "mfmsr %0; andc %1,%0,%1; mtmsr %1" : \ - "=r" ((_isr_cookie)) : "r" ((PPC_MSR_DISABLE_MASK)) \ - ); \ - } - -/* - * Enable interrupts to the previous level (returned by _CPU_ISR_Disable). - * This indicates the end of an RTEMS critical section. The parameter - * _level is not modified. - */ - -#define _CPU_ISR_Enable( _isr_cookie ) \ - { \ - asm volatile ( "mtmsr %0" : \ - "=r" ((_isr_cookie)) : "0" ((_isr_cookie))); \ - } - -/* - * This temporarily restores the interrupt to _level before immediately - * disabling them again. This is used to divide long RTEMS critical - * sections into two or more parts. The parameter _level is not - * modified. - */ - -#define _CPU_ISR_Flash( _isr_cookie ) \ - { \ - asm volatile ( \ - "mtmsr %0; andc %1,%0,%1; mtmsr %1" : \ - "=r" ((_isr_cookie)) : \ - "r" ((PPC_MSR_DISABLE_MASK)), "0" ((_isr_cookie)) \ - ); \ - } - -/* - * Map interrupt level in task mode onto the hardware that the CPU - * actually provides. Currently, interrupt levels which do not - * map onto the CPU in a generic fashion are undefined. Someday, - * it would be nice if these were "mapped" by the application - * via a callout. For example, m68k has 8 levels 0 - 7, levels - * 8 - 255 would be available for bsp/application specific meaning. - * This could be used to manage a programmable interrupt controller - * via the rtems_task_mode directive. - */ - -#define _CPU_ISR_Set_level( new_level ) \ - { \ - register unsigned32 tmp; \ - asm volatile ( \ - "mfmsr %0; andc %0,%0,%1; and %2, %2, %1; or %0, %0, %2; mtmsr %0" : \ - "=r" ((tmp)) : \ - "r" ((PPC_MSR_DISABLE_MASK)), "r" ((_CPU_msrs[new_level])), "0" ((tmp)) \ - ); \ - } - -unsigned32 _CPU_ISR_Get_level( void ); - -/* end of ISR handler macros */ - -/* Context handler macros */ - -/* - * Initialize the context to a state suitable for starting a - * task after a context restore operation. Generally, this - * involves: - * - * - setting a starting address - * - preparing the stack - * - preparing the stack and frame pointers - * - setting the proper interrupt level in the context - * - initializing the floating point context - * - * This routine generally does not set any unnecessary register - * in the context. The state of the "general data" registers is - * undefined at task start time. - */ - -#if PPC_ABI == PPC_ABI_POWEROPEN -#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \ - _isr, _entry_point, _is_fp ) \ - { \ - unsigned32 sp, *desc; \ - \ - sp = ((unsigned32)_stack_base) + (_size) - 56; \ - *((unsigned32 *)sp) = 0; \ - \ - desc = (unsigned32 *)_entry_point; \ - \ - (_the_context)->msr = PPC_MSR_INITIAL | \ - _CPU_msrs[ _isr ]; \ - (_the_context)->pc = desc[0]; \ - (_the_context)->gpr1 = sp; \ - (_the_context)->gpr2 = desc[1]; \ - } -#endif -#if PPC_ABI == PPC_ABI_SVR4 -#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \ - _isr, _entry_point ) \ - { \ - unsigned32 sp, r13; \ - \ - sp = ((unsigned32)_stack_base) + (_size) - 8; \ - *((unsigned32 *)sp) = 0; \ - \ - asm volatile ("mr %0, 13" : "=r" ((r13))); \ - \ - (_the_context->msr) = PPC_MSR_INITIAL | \ - _CPU_msrs[ _isr ]; \ - (_the_context->pc) = _entry_point; \ - (_the_context->gpr1) = sp; \ - (_the_context->gpr13) = r13; \ - } -#endif -#if PPC_ABI == PPC_ABI_EABI -#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \ - _isr, _entry_point ) \ - { \ - unsigned32 sp, r2, r13; \ - \ - sp = ((unsigned32)_stack_base) + (_size) - 8; \ - *((unsigned32 *)sp) = 0; \ - \ - asm volatile ("mr %0,2; mr %1,13" : "=r" ((r2)), "=r" ((r13))); \ - \ - (_the_context)->msr = PPC_MSR_INITIAL | \ - _CPU_msrs[ _isr ]; \ - (_the_context->pc) = _entry_point; \ - (_the_context->gpr1) = sp; \ - (_the_context->gpr2) = r2; \ - (_the_context->gpr13) = r13; \ - } -#endif - -/* - * This routine is responsible for somehow restarting the currently - * executing task. If you are lucky, then all that is necessary - * is restoring the context. Otherwise, there will need to be - * a special assembly routine which does something special in this - * case. Context_Restore should work most of the time. It will - * not work if restarting self conflicts with the stack frame - * assumptions of restoring a context. - */ - -#define _CPU_Context_Restart_self( _the_context ) \ - _CPU_Context_restore( (_the_context) ); - -/* - * The purpose of this macro is to allow the initial pointer into - * a floating point context area (used to save the floating point - * context) to be at an arbitrary place in the floating point - * context area. - * - * This is necessary because some FP units are designed to have - * their context saved as a stack which grows into lower addresses. - * Other FP units can be saved by simply moving registers into offsets - * from the base of the context area. Finally some FP units provide - * a "dump context" instruction which could fill in from high to low - * or low to high based on the whim of the CPU designers. - */ - -#define _CPU_Context_Fp_start( _base, _offset ) \ - ( (void *) _Addresses_Add_offset( (_base), (_offset) ) ) - -/* - * This routine initializes the FP context area passed to it to. - * There are a few standard ways in which to initialize the - * floating point context. The code included for this macro assumes - * that this is a CPU in which a "initial" FP context was saved into - * _CPU_Null_fp_context and it simply copies it to the destination - * context passed to it. - * - * Other models include (1) not doing anything, and (2) putting - * a "null FP status word" in the correct place in the FP context. - */ - -#define _CPU_Context_Initialize_fp( _destination ) \ - { \ - ((Context_Control_fp *) *((void **) _destination))->fpscr = PPC_INIT_FPSCR; \ - } - -/* end of Context handler macros */ - -/* Fatal Error manager macros */ - -/* - * This routine copies _error into a known place -- typically a stack - * location or a register, optionally disables interrupts, and - * halts/stops the CPU. - */ - -#define _CPU_Fatal_halt( _error ) \ - _CPU_Fatal_error(_error) - -/* end of Fatal Error manager macros */ - -/* Bitfield handler macros */ - -/* - * This routine sets _output to the bit number of the first bit - * set in _value. _value is of CPU dependent type Priority_Bit_map_control. - * This type may be either 16 or 32 bits wide although only the 16 - * least significant bits will be used. - * - * There are a number of variables in using a "find first bit" type - * instruction. - * - * (1) What happens when run on a value of zero? - * (2) Bits may be numbered from MSB to LSB or vice-versa. - * (3) The numbering may be zero or one based. - * (4) The "find first bit" instruction may search from MSB or LSB. - * - * RTEMS guarantees that (1) will never happen so it is not a concern. - * (2),(3), (4) are handled by the macros _CPU_Priority_mask() and - * _CPU_Priority_Bits_index(). These three form a set of routines - * which must logically operate together. Bits in the _value are - * set and cleared based on masks built by _CPU_Priority_mask(). - * The basic major and minor values calculated by _Priority_Major() - * and _Priority_Minor() are "massaged" by _CPU_Priority_Bits_index() - * to properly range between the values returned by the "find first bit" - * instruction. This makes it possible for _Priority_Get_highest() to - * calculate the major and directly index into the minor table. - * This mapping is necessary to ensure that 0 (a high priority major/minor) - * is the first bit found. - * - * This entire "find first bit" and mapping process depends heavily - * on the manner in which a priority is broken into a major and minor - * components with the major being the 4 MSB of a priority and minor - * the 4 LSB. Thus (0 << 4) + 0 corresponds to priority 0 -- the highest - * priority. And (15 << 4) + 14 corresponds to priority 254 -- the next - * to the lowest priority. - * - * If your CPU does not have a "find first bit" instruction, then - * there are ways to make do without it. Here are a handful of ways - * to implement this in software: - * - * - a series of 16 bit test instructions - * - a "binary search using if's" - * - _number = 0 - * if _value > 0x00ff - * _value >>=8 - * _number = 8; - * - * if _value > 0x0000f - * _value >=8 - * _number += 4 - * - * _number += bit_set_table[ _value ] - * - * where bit_set_table[ 16 ] has values which indicate the first - * bit set - */ - -#define _CPU_Bitfield_Find_first_bit( _value, _output ) \ - { \ - asm volatile ("cntlzw %0, %1" : "=r" ((_output)), "=r" ((_value)) : \ - "1" ((_value))); \ - } - -/* end of Bitfield handler macros */ - -/* - * This routine builds the mask which corresponds to the bit fields - * as searched by _CPU_Bitfield_Find_first_bit(). See the discussion - * for that routine. - */ - -#define _CPU_Priority_Mask( _bit_number ) \ - ( 0x80000000 >> (_bit_number) ) - -/* - * This routine translates the bit numbers returned by - * _CPU_Bitfield_Find_first_bit() into something suitable for use as - * a major or minor component of a priority. See the discussion - * for that routine. - */ - -#define _CPU_Priority_bits_index( _priority ) \ - (_priority) - -/* end of Priority handler macros */ - -/* variables */ - -extern const unsigned32 _CPU_msrs[4]; - -/* functions */ - -/* - * _CPU_Initialize - * - * This routine performs CPU dependent initialization. - */ - -void _CPU_Initialize( - rtems_cpu_table *cpu_table, - void (*thread_dispatch) -); - -/* - * _CPU_ISR_install_vector - * - * This routine installs an interrupt vector. - */ - -void _CPU_ISR_install_vector( - unsigned32 vector, - proc_ptr new_handler, - proc_ptr *old_handler -); - -/* - * _CPU_Install_interrupt_stack - * - * This routine installs the hardware interrupt stack pointer. - * - * NOTE: It need only be provided if CPU_HAS_HARDWARE_INTERRUPT_STACK - * is TRUE. - */ - -void _CPU_Install_interrupt_stack( void ); - -/* - * _CPU_Context_switch - * - * This routine switches from the run context to the heir context. - */ - -void _CPU_Context_switch( - Context_Control *run, - Context_Control *heir -); - -/* - * _CPU_Context_restore - * - * This routine is generallu used only to restart self in an - * efficient manner. It may simply be a label in _CPU_Context_switch. - * - * NOTE: May be unnecessary to reload some registers. - */ - -void _CPU_Context_restore( - Context_Control *new_context -); - -/* - * _CPU_Context_save_fp - * - * This routine saves the floating point context passed to it. - */ - -void _CPU_Context_save_fp( - void **fp_context_ptr -); - -/* - * _CPU_Context_restore_fp - * - * This routine restores the floating point context passed to it. - */ - -void _CPU_Context_restore_fp( - void **fp_context_ptr -); - -void _CPU_Fatal_error( - unsigned32 _error -); - -/* The following routine swaps the endian format of an unsigned int. - * It must be static because it is referenced indirectly. - * - * This version will work on any processor, but if there is a better - * way for your CPU PLEASE use it. The most common way to do this is to: - * - * swap least significant two bytes with 16-bit rotate - * swap upper and lower 16-bits - * swap most significant two bytes with 16-bit rotate - * - * Some CPUs have special instructions which swap a 32-bit quantity in - * a single instruction (e.g. i486). It is probably best to avoid - * an "endian swapping control bit" in the CPU. One good reason is - * that interrupts would probably have to be disabled to insure that - * an interrupt does not try to access the same "chunk" with the wrong - * endian. Another good reason is that on some CPUs, the endian bit - * endianness for ALL fetches -- both code and data -- so the code - * will be fetched incorrectly. - */ - -static inline unsigned int CPU_swap_u32( - unsigned int value -) -{ - unsigned32 swapped; - - asm volatile("rlwimi %0,%1,8,24,31;" - "rlwimi %0,%1,24,16,23;" - "rlwimi %0,%1,8,8,15;" - "rlwimi %0,%1,24,0,7;" : - "=r" ((swapped)) : "r" ((value))); - - return( swapped ); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/c/src/exec/score/cpu/powerpc/cpu_asm.s b/c/src/exec/score/cpu/powerpc/cpu_asm.s deleted file mode 100644 index cf95e25a5c..0000000000 --- a/c/src/exec/score/cpu/powerpc/cpu_asm.s +++ /dev/null @@ -1,749 +0,0 @@ - -/* cpu_asm.s 1.1 - 95/12/04 - * - * This file contains the assembly code for the PowerPC implementation - * of RTEMS. - * - * Author: Andrew Bray - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/exec/cpu/no_cpu/cpu_asm.c: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include "asm.h" - -/* - * Offsets for various Contexts - */ - .set GP_1, 0 - .set GP_2, (GP_1 + 4) - .set GP_13, (GP_2 + 4) - .set GP_14, (GP_13 + 4) - - .set GP_15, (GP_14 + 4) - .set GP_16, (GP_15 + 4) - .set GP_17, (GP_16 + 4) - .set GP_18, (GP_17 + 4) - - .set GP_19, (GP_18 + 4) - .set GP_20, (GP_19 + 4) - .set GP_21, (GP_20 + 4) - .set GP_22, (GP_21 + 4) - - .set GP_23, (GP_22 + 4) - .set GP_24, (GP_23 + 4) - .set GP_25, (GP_24 + 4) - .set GP_26, (GP_25 + 4) - - .set GP_27, (GP_26 + 4) - .set GP_28, (GP_27 + 4) - .set GP_29, (GP_28 + 4) - .set GP_30, (GP_29 + 4) - - .set GP_31, (GP_30 + 4) - .set GP_CR, (GP_31 + 4) - .set GP_PC, (GP_CR + 4) - .set GP_MSR, (GP_PC + 4) - -#if (PPC_HAS_DOUBLE == 1) - .set FP_0, 0 - .set FP_1, (FP_0 + 8) - .set FP_2, (FP_1 + 8) - .set FP_3, (FP_2 + 8) - .set FP_4, (FP_3 + 8) - .set FP_5, (FP_4 + 8) - .set FP_6, (FP_5 + 8) - .set FP_7, (FP_6 + 8) - .set FP_8, (FP_7 + 8) - .set FP_9, (FP_8 + 8) - .set FP_10, (FP_9 + 8) - .set FP_11, (FP_10 + 8) - .set FP_12, (FP_11 + 8) - .set FP_13, (FP_12 + 8) - .set FP_14, (FP_13 + 8) - .set FP_15, (FP_14 + 8) - .set FP_16, (FP_15 + 8) - .set FP_17, (FP_16 + 8) - .set FP_18, (FP_17 + 8) - .set FP_19, (FP_18 + 8) - .set FP_20, (FP_19 + 8) - .set FP_21, (FP_20 + 8) - .set FP_22, (FP_21 + 8) - .set FP_23, (FP_22 + 8) - .set FP_24, (FP_23 + 8) - .set FP_25, (FP_24 + 8) - .set FP_26, (FP_25 + 8) - .set FP_27, (FP_26 + 8) - .set FP_28, (FP_27 + 8) - .set FP_29, (FP_28 + 8) - .set FP_30, (FP_29 + 8) - .set FP_31, (FP_30 + 8) - .set FP_FPSCR, (FP_31 + 8) -#else - .set FP_0, 0 - .set FP_1, (FP_0 + 4) - .set FP_2, (FP_1 + 4) - .set FP_3, (FP_2 + 4) - .set FP_4, (FP_3 + 4) - .set FP_5, (FP_4 + 4) - .set FP_6, (FP_5 + 4) - .set FP_7, (FP_6 + 4) - .set FP_8, (FP_7 + 4) - .set FP_9, (FP_8 + 4) - .set FP_10, (FP_9 + 4) - .set FP_11, (FP_10 + 4) - .set FP_12, (FP_11 + 4) - .set FP_13, (FP_12 + 4) - .set FP_14, (FP_13 + 4) - .set FP_15, (FP_14 + 4) - .set FP_16, (FP_15 + 4) - .set FP_17, (FP_16 + 4) - .set FP_18, (FP_17 + 4) - .set FP_19, (FP_18 + 4) - .set FP_20, (FP_19 + 4) - .set FP_21, (FP_20 + 4) - .set FP_22, (FP_21 + 4) - .set FP_23, (FP_22 + 4) - .set FP_24, (FP_23 + 4) - .set FP_25, (FP_24 + 4) - .set FP_26, (FP_25 + 4) - .set FP_27, (FP_26 + 4) - .set FP_28, (FP_27 + 4) - .set FP_29, (FP_28 + 4) - .set FP_30, (FP_29 + 4) - .set FP_31, (FP_30 + 4) - .set FP_FPSCR, (FP_31 + 4) -#endif - - .set IP_LINK, 0 -#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27) - .set IP_0, (IP_LINK + 56) -#else - .set IP_0, (IP_LINK + 8) -#endif - .set IP_2, (IP_0 + 4) - - .set IP_3, (IP_2 + 4) - .set IP_4, (IP_3 + 4) - .set IP_5, (IP_4 + 4) - .set IP_6, (IP_5 + 4) - - .set IP_7, (IP_6 + 4) - .set IP_8, (IP_7 + 4) - .set IP_9, (IP_8 + 4) - .set IP_10, (IP_9 + 4) - - .set IP_11, (IP_10 + 4) - .set IP_12, (IP_11 + 4) - .set IP_13, (IP_12 + 4) - .set IP_28, (IP_13 + 4) - - .set IP_29, (IP_28 + 4) - .set IP_30, (IP_29 + 4) - .set IP_31, (IP_30 + 4) - .set IP_CR, (IP_31 + 4) - - .set IP_CTR, (IP_CR + 4) - .set IP_XER, (IP_CTR + 4) - .set IP_LR, (IP_XER + 4) - .set IP_PC, (IP_LR + 4) - - .set IP_MSR, (IP_PC + 4) - .set IP_END, (IP_MSR + 16) - - /* _CPU_IRQ_info offsets */ - /* These must be in this order */ - .set Nest_level, 0 - .set Disable_level, 4 - .set Vector_table, 8 - .set Stack, 12 -#if (PPC_ABI == PPC_ABI_POWEROPEN) - .set Dispatch_r2, 16 - .set Switch_necessary, 20 -#else - .set Default_r2, 16 -#if (PPC_ABI != PPC_ABI_GCC27) - .set Default_r13, 20 - .set Switch_necessary, 24 -#else - .set Switch_necessary, 20 -#endif -#endif - .set Signal, Switch_necessary + 4 - - BEGIN_CODE -/* - * _CPU_Context_save_fp_context - * - * This routine is responsible for saving the FP context - * at *fp_context_ptr. If the point to load the FP context - * from is changed then the pointer is modified by this routine. - * - * Sometimes a macro implementation of this is in cpu.h which dereferences - * the ** and a similarly named routine in this file is passed something - * like a (Context_Control_fp *). The general rule on making this decision - * is to avoid writing assembly language. - */ - - ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER) - PUBLIC_PROC (_CPU_Context_save_fp) -PROC (_CPU_Context_save_fp): -#if (PPC_HAS_FPU == 1) - lwz r3, 0(r3) -#if (PPC_HAS_DOUBLE == 1) - stfd f0, FP_0(r3) - stfd f1, FP_1(r3) - stfd f2, FP_2(r3) - stfd f3, FP_3(r3) - stfd f4, FP_4(r3) - stfd f5, FP_5(r3) - stfd f6, FP_6(r3) - stfd f7, FP_7(r3) - stfd f8, FP_8(r3) - stfd f9, FP_9(r3) - stfd f10, FP_10(r3) - stfd f11, FP_11(r3) - stfd f12, FP_12(r3) - stfd f13, FP_13(r3) - stfd f14, FP_14(r3) - stfd f15, FP_15(r3) - stfd f16, FP_16(r3) - stfd f17, FP_17(r3) - stfd f18, FP_18(r3) - stfd f19, FP_19(r3) - stfd f20, FP_20(r3) - stfd f21, FP_21(r3) - stfd f22, FP_22(r3) - stfd f23, FP_23(r3) - stfd f24, FP_24(r3) - stfd f25, FP_25(r3) - stfd f26, FP_26(r3) - stfd f27, FP_27(r3) - stfd f28, FP_28(r3) - stfd f29, FP_29(r3) - stfd f30, FP_30(r3) - stfd f31, FP_31(r3) - mffs f2 - stfd f2, FP_FPSCR(r3) -#else - stfs f0, FP_0(r3) - stfs f1, FP_1(r3) - stfs f2, FP_2(r3) - stfs f3, FP_3(r3) - stfs f4, FP_4(r3) - stfs f5, FP_5(r3) - stfs f6, FP_6(r3) - stfs f7, FP_7(r3) - stfs f8, FP_8(r3) - stfs f9, FP_9(r3) - stfs f10, FP_10(r3) - stfs f11, FP_11(r3) - stfs f12, FP_12(r3) - stfs f13, FP_13(r3) - stfs f14, FP_14(r3) - stfs f15, FP_15(r3) - stfs f16, FP_16(r3) - stfs f17, FP_17(r3) - stfs f18, FP_18(r3) - stfs f19, FP_19(r3) - stfs f20, FP_20(r3) - stfs f21, FP_21(r3) - stfs f22, FP_22(r3) - stfs f23, FP_23(r3) - stfs f24, FP_24(r3) - stfs f25, FP_25(r3) - stfs f26, FP_26(r3) - stfs f27, FP_27(r3) - stfs f28, FP_28(r3) - stfs f29, FP_29(r3) - stfs f30, FP_30(r3) - stfs f31, FP_31(r3) - mffs f2 - stfs f2, FP_FPSCR(r3) -#endif -#endif - blr - -/* - * _CPU_Context_restore_fp_context - * - * This routine is responsible for restoring the FP context - * at *fp_context_ptr. If the point to load the FP context - * from is changed then the pointer is modified by this routine. - * - * Sometimes a macro implementation of this is in cpu.h which dereferences - * the ** and a similarly named routine in this file is passed something - * like a (Context_Control_fp *). The general rule on making this decision - * is to avoid writing assembly language. - */ - - ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER) - PUBLIC_PROC (_CPU_Context_restore_fp) -PROC (_CPU_Context_restore_fp): -#if (PPC_HAS_FPU == 1) - lwz r3, 0(r3) -#if (PPC_HAS_DOUBLE == 1) - lfd f2, FP_FPSCR(r3) - mtfsf 255, f2 - lfd f0, FP_0(r3) - lfd f1, FP_1(r3) - lfd f2, FP_2(r3) - lfd f3, FP_3(r3) - lfd f4, FP_4(r3) - lfd f5, FP_5(r3) - lfd f6, FP_6(r3) - lfd f7, FP_7(r3) - lfd f8, FP_8(r3) - lfd f9, FP_9(r3) - lfd f10, FP_10(r3) - lfd f11, FP_11(r3) - lfd f12, FP_12(r3) - lfd f13, FP_13(r3) - lfd f14, FP_14(r3) - lfd f15, FP_15(r3) - lfd f16, FP_16(r3) - lfd f17, FP_17(r3) - lfd f18, FP_18(r3) - lfd f19, FP_19(r3) - lfd f20, FP_20(r3) - lfd f21, FP_21(r3) - lfd f22, FP_22(r3) - lfd f23, FP_23(r3) - lfd f24, FP_24(r3) - lfd f25, FP_25(r3) - lfd f26, FP_26(r3) - lfd f27, FP_27(r3) - lfd f28, FP_28(r3) - lfd f29, FP_29(r3) - lfd f30, FP_30(r3) - lfd f31, FP_31(r3) -#else - lfs f2, FP_FPSCR(r3) - mtfsf 255, f2 - lfs f0, FP_0(r3) - lfs f1, FP_1(r3) - lfs f2, FP_2(r3) - lfs f3, FP_3(r3) - lfs f4, FP_4(r3) - lfs f5, FP_5(r3) - lfs f6, FP_6(r3) - lfs f7, FP_7(r3) - lfs f8, FP_8(r3) - lfs f9, FP_9(r3) - lfs f10, FP_10(r3) - lfs f11, FP_11(r3) - lfs f12, FP_12(r3) - lfs f13, FP_13(r3) - lfs f14, FP_14(r3) - lfs f15, FP_15(r3) - lfs f16, FP_16(r3) - lfs f17, FP_17(r3) - lfs f18, FP_18(r3) - lfs f19, FP_19(r3) - lfs f20, FP_20(r3) - lfs f21, FP_21(r3) - lfs f22, FP_22(r3) - lfs f23, FP_23(r3) - lfs f24, FP_24(r3) - lfs f25, FP_25(r3) - lfs f26, FP_26(r3) - lfs f27, FP_27(r3) - lfs f28, FP_28(r3) - lfs f29, FP_29(r3) - lfs f30, FP_30(r3) - lfs f31, FP_31(r3) -#endif -#endif - blr - - -/* _CPU_Context_switch - * - * This routine performs a normal non-FP context switch. - */ - ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER) - PUBLIC_PROC (_CPU_Context_switch) -PROC (_CPU_Context_switch): - sync - isync -#if (PPC_CACHE_ALIGNMENT == 4) /* No cache */ - stw r1, GP_1(r3) - lwz r1, GP_1(r4) - stw r2, GP_2(r3) - lwz r2, GP_2(r4) -#if (PPC_USE_MULTIPLE == 1) - stmw r13, GP_13(r3) - lmw r13, GP_13(r4) -#else - stw r13, GP_13(r3) - lwz r13, GP_13(r4) - stw r14, GP_14(r3) - lwz r14, GP_14(r4) - stw r15, GP_15(r3) - lwz r15, GP_15(r4) - stw r16, GP_16(r3) - lwz r16, GP_16(r4) - stw r17, GP_17(r3) - lwz r17, GP_17(r4) - stw r18, GP_18(r3) - lwz r18, GP_18(r4) - stw r19, GP_19(r3) - lwz r19, GP_19(r4) - stw r20, GP_20(r3) - lwz r20, GP_20(r4) - stw r21, GP_21(r3) - lwz r21, GP_21(r4) - stw r22, GP_22(r3) - lwz r22, GP_22(r4) - stw r23, GP_23(r3) - lwz r23, GP_23(r4) - stw r24, GP_24(r3) - lwz r24, GP_24(r4) - stw r25, GP_25(r3) - lwz r25, GP_25(r4) - stw r26, GP_26(r3) - lwz r26, GP_26(r4) - stw r27, GP_27(r3) - lwz r27, GP_27(r4) - stw r28, GP_28(r3) - lwz r28, GP_28(r4) - stw r29, GP_29(r3) - lwz r29, GP_29(r4) - stw r30, GP_30(r3) - lwz r30, GP_30(r4) - stw r31, GP_31(r3) - lwz r31, GP_31(r4) -#endif - mfcr r5 - stw r5, GP_CR(r3) - lwz r5, GP_CR(r4) - mflr r6 - mtcrf 255, r5 - stw r6, GP_PC(r3) - lwz r6, GP_PC(r4) - mfmsr r7 - mtlr r6 - stw r7, GP_MSR(r3) - lwz r7, GP_MSR(r4) - mtmsr r7 -#endif -#if (PPC_CACHE_ALIGNMENT == 16) - /* This assumes that all the registers are in the given order */ - li r5, 16 - addi r3,r3,-4 - dcbz r5, r3 - stw r1, GP_1+4(r3) - stw r2, GP_2+4(r3) -#if (PPC_USE_MULTIPLE == 1) - addi r3, r3, GP_14+4 - dcbz r5, r3 - addi r3, r3, GP_18-GP_14 - dcbz r5, r3 - addi r3, r3, GP_22-GP_18 - dcbz r5, r3 - addi r3, r3, GP_26-GP_22 - dcbz r5, r3 - stmw r13, GP_13-GP_26(r3) -#else - stw r13, GP_13+4(r3) - stwu r14, GP_14+4(r3) - dcbz r5, r3 - stw r15, GP_15-GP_14(r3) - stw r16, GP_16-GP_14(r3) - stw r17, GP_17-GP_14(r3) - stwu r18, GP_18-GP_14(r3) - dcbz r5, r3 - stw r19, GP_19-GP_18(r3) - stw r20, GP_20-GP_18(r3) - stw r21, GP_21-GP_18(r3) - stwu r22, GP_22-GP_18(r3) - dcbz r5, r3 - stw r23, GP_23-GP_22(r3) - stw r24, GP_24-GP_22(r3) - stw r25, GP_25-GP_22(r3) - stwu r26, GP_26-GP_22(r3) - dcbz r5, r3 - stw r27, GP_27-GP_26(r3) - stw r28, GP_28-GP_26(r3) - stw r29, GP_29-GP_26(r3) - stw r30, GP_30-GP_26(r3) - stw r31, GP_31-GP_26(r3) -#endif - dcbt r0, r4 - mfcr r6 - stw r6, GP_CR-GP_26(r3) - mflr r7 - stw r7, GP_PC-GP_26(r3) - mfmsr r8 - stw r8, GP_MSR-GP_26(r3) - - dcbt r5, r4 - lwz r1, GP_1(r4) - lwz r2, GP_2(r4) -#if (PPC_USE_MULTIPLE == 1) - addi r4, r4, GP_15 - dcbt r5, r4 - addi r4, r4, GP_19-GP_15 - dcbt r5, r4 - addi r4, r4, GP_23-GP_19 - dcbt r5, r4 - addi r4, r4, GP_27-GP_23 - dcbt r5, r4 - lmw r13, GP_13-GP_27(r4) -#else - lwz r13, GP_13(r4) - lwz r14, GP_14(r4) - lwzu r15, GP_15(r4) - dcbt r5, r4 - lwz r16, GP_16-GP_15(r4) - lwz r17, GP_17-GP_15(r4) - lwz r18, GP_18-GP_15(r4) - lwzu r19, GP_19-GP_15(r4) - dcbt r5, r4 - lwz r20, GP_20-GP_19(r4) - lwz r21, GP_21-GP_19(r4) - lwz r22, GP_22-GP_19(r4) - lwzu r23, GP_23-GP_19(r4) - dcbt r5, r4 - lwz r24, GP_24-GP_23(r4) - lwz r25, GP_25-GP_23(r4) - lwz r26, GP_26-GP_23(r4) - lwzu r27, GP_27-GP_23(r4) - dcbt r5, r4 - lwz r28, GP_28-GP_27(r4) - lwz r29, GP_29-GP_27(r4) - lwz r30, GP_30-GP_27(r4) - lwz r31, GP_31-GP_27(r4) -#endif - lwz r6, GP_CR-GP_27(r4) - lwz r7, GP_PC-GP_27(r4) - lwz r8, GP_MSR-GP_27(r4) - mtcrf 255, r6 - mtlr r7 - mtmsr r8 -#endif -#if (PPC_CACHE_ALIGNMENT == 32) - /* This assumes that all the registers are in the given order */ - li r5, 32 - addi r3,r3,-4 - dcbz r5, r3 - stw r1, GP_1+4(r3) - stw r2, GP_2+4(r3) -#if (PPC_USE_MULTIPLE == 1) - addi r3, r3, GP_18+4 - dcbz r5, r3 - stmw r13, GP_13-GP_18(r3) -#else - stw r13, GP_13+4(r3) - stw r14, GP_14+4(r3) - stw r15, GP_15+4(r3) - stw r16, GP_16+4(r3) - stw r17, GP_17+4(r3) - stwu r18, GP_18+4(r3) - dcbz r5, r3 - stw r19, GP_19-GP_18(r3) - stw r20, GP_20-GP_18(r3) - stw r21, GP_21-GP_18(r3) - stw r22, GP_22-GP_18(r3) - stw r23, GP_23-GP_18(r3) - stw r24, GP_24-GP_18(r3) - stw r25, GP_25-GP_18(r3) - stw r26, GP_26-GP_18(r3) - stw r27, GP_27-GP_18(r3) - stw r28, GP_28-GP_18(r3) - stw r29, GP_29-GP_18(r3) - stw r30, GP_30-GP_18(r3) - stw r31, GP_31-GP_18(r3) -#endif - dcbt r0, r4 - mfcr r6 - stw r6, GP_CR-GP_18(r3) - mflr r7 - stw r7, GP_PC-GP_18(r3) - mfmsr r8 - stw r8, GP_MSR-GP_18(r3) - - dcbt r5, r4 - lwz r1, GP_1(r4) - lwz r2, GP_2(r4) -#if (PPC_USE_MULTIPLE == 1) - addi r4, r4, GP_19 - dcbt r5, r4 - lmw r13, GP_13-GP_19(r4) -#else - lwz r13, GP_13(r4) - lwz r14, GP_14(r4) - lwz r15, GP_15(r4) - lwz r16, GP_16(r4) - lwz r17, GP_17(r4) - lwz r18, GP_18(r4) - lwzu r19, GP_19(r4) - dcbt r5, r4 - lwz r20, GP_20-GP_19(r4) - lwz r21, GP_21-GP_19(r4) - lwz r22, GP_22-GP_19(r4) - lwz r23, GP_23-GP_19(r4) - lwz r24, GP_24-GP_19(r4) - lwz r25, GP_25-GP_19(r4) - lwz r26, GP_26-GP_19(r4) - lwz r27, GP_27-GP_19(r4) - lwz r28, GP_28-GP_19(r4) - lwz r29, GP_29-GP_19(r4) - lwz r30, GP_30-GP_19(r4) - lwz r31, GP_31-GP_19(r4) -#endif - lwz r6, GP_CR-GP_19(r4) - lwz r7, GP_PC-GP_19(r4) - lwz r8, GP_MSR-GP_19(r4) - mtcrf 255, r6 - mtlr r7 - mtmsr r8 -#endif - blr - -/* - * _CPU_Context_restore - * - * This routine is generallu used only to restart self in an - * efficient manner. It may simply be a label in _CPU_Context_switch. - * - * NOTE: May be unnecessary to reload some registers. - */ -/* - * ACB: Don't worry about cache optimisation here - this is not THAT critical. - */ - ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER) - PUBLIC_PROC (_CPU_Context_restore) -PROC (_CPU_Context_restore): - lwz r5, GP_CR(r3) - lwz r6, GP_PC(r3) - lwz r7, GP_MSR(r3) - mtcrf 255, r5 - mtlr r6 - mtmsr r7 - lwz r1, GP_1(r3) - lwz r2, GP_2(r3) -#if (PPC_USE_MULTIPLE == 1) - lmw r13, GP_13(r3) -#else - lwz r13, GP_13(r3) - lwz r14, GP_14(r3) - lwz r15, GP_15(r3) - lwz r16, GP_16(r3) - lwz r17, GP_17(r3) - lwz r18, GP_18(r3) - lwz r19, GP_19(r3) - lwz r20, GP_20(r3) - lwz r21, GP_21(r3) - lwz r22, GP_22(r3) - lwz r23, GP_23(r3) - lwz r24, GP_24(r3) - lwz r25, GP_25(r3) - lwz r26, GP_26(r3) - lwz r27, GP_27(r3) - lwz r28, GP_28(r3) - lwz r29, GP_29(r3) - lwz r30, GP_30(r3) - lwz r31, GP_31(r3) -#endif - - blr - -/* Individual interrupt prologues look like this: - * #if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27) - * #if (PPC_HAS_FPU) - * stwu r1, -(20*4 + 18*8 + IP_END)(r1) - * #else - * stwu r1, -(20*4 + IP_END)(r1) - * #endif - * #else - * stwu r1, -(IP_END)(r1) - * #endif - * stw r0, IP_0(r1) - * - * li r0, vectornum - * b PROC (_ISR_Handler{,C}) - */ - -/* void __ISR_Handler() - * - * This routine provides the RTEMS interrupt management. - * The vector number is in r0. R0 has already been stacked. - * - */ - ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER) - PUBLIC_PROC (_ISR_Handler) -PROC (_ISR_Handler): -#define LABEL(x) x -#define MTSAVE(x) mtspr sprg0, x -#define MFSAVE(x) mfspr x, sprg0 -#define MTPC(x) mtspr srr0, x -#define MFPC(x) mfspr x, srr0 -#define MTMSR(x) mtspr srr1, x -#define MFMSR(x) mfspr x, srr1 - #include "irq_stub.s" - rfi - -#if (PPC_HAS_RFCI == 1) -/* void __ISR_HandlerC() - * - * This routine provides the RTEMS interrupt management. - * For critical interrupts - * - */ - ALIGN (PPC_CACHE_ALIGNMENT, PPC_CACHE_ALIGN_POWER) - PUBLIC_PROC (_ISR_HandlerC) -PROC (_ISR_HandlerC): -#undef LABEL -#undef MTSAVE -#undef MFSAVE -#undef MTPC -#undef MFPC -#undef MTMSR -#undef MFMSR -#define LABEL(x) x##_C -#define MTSAVE(x) mtspr sprg1, x -#define MFSAVE(x) mfspr x, sprg1 -#define MTPC(x) mtspr srr2, x -#define MFPC(x) mfspr x, srr2 -#define MTMSR(x) mtspr srr3, x -#define MFMSR(x) mfspr x, srr3 - #include "irq_stub.s" - rfci -#endif - -/* PowerOpen descriptors for indirect function calls. - */ - -#if (PPC_ABI == PPC_ABI_POWEROPEN) - DESCRIPTOR (_CPU_Context_save_fp) - DESCRIPTOR (_CPU_Context_restore_fp) - DESCRIPTOR (_CPU_Context_switch) - DESCRIPTOR (_CPU_Context_restore) - DESCRIPTOR (_ISR_Handler) -#if (PPC_HAS_RFCI == 1) - DESCRIPTOR (_ISR_HandlerC) -#endif -#endif diff --git a/c/src/exec/score/cpu/powerpc/irq_stub.s b/c/src/exec/score/cpu/powerpc/irq_stub.s deleted file mode 100644 index 42a63e991f..0000000000 --- a/c/src/exec/score/cpu/powerpc/irq_stub.s +++ /dev/null @@ -1,228 +0,0 @@ -/* irq_stub.s 1.1 - 95/12/04 - * - * This file contains the interrupt handler assembly code for the PowerPC - * implementation of RTEMS. It is #included from cpu_asm.s. - * - * Author: Andrew Bray - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - * $Id$ - */ - -/* void __ISR_Handler() - * - * This routine provides the RTEMS interrupt management. - * The vector number is in r0. R0 has already been stacked. - * - */ - /* Finish off the interrupt frame */ - stw r2, IP_2(r1) - stw r3, IP_3(r1) - stw r4, IP_4(r1) - stw r5, IP_5(r1) - stw r6, IP_6(r1) - stw r7, IP_7(r1) - stw r8, IP_8(r1) - stw r9, IP_9(r1) - stw r10, IP_10(r1) - stw r11, IP_11(r1) - stw r12, IP_12(r1) - stw r13, IP_13(r1) - stmw r28, IP_28(r1) - mfcr r5 - mfctr r6 - mfxer r7 - mflr r8 - MFPC (r9) - MFMSR (r10) - /* Establish addressing */ - mfspr r11, sprg3 - dcbt r0, r11 - stw r5, IP_CR(r1) - stw r6, IP_CTR(r1) - stw r7, IP_XER(r1) - stw r8, IP_LR(r1) - stw r9, IP_PC(r1) - stw r10, IP_MSR(r1) - - lwz r30, Vector_table(r11) - slwi r4,r0,2 - lwz r28, Nest_level(r11) - add r4, r4, r30 - - lwz r30, 0(r28) - mr r3, r0 - lwz r31, Stack(r11) - /* - * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE ) - * if ( _ISR_Nest_level == 0 ) - * switch to software interrupt stack - * #endif - */ - /* Switch stacks, here we must prevent ALL interrupts */ - mfmsr r5 - mfspr r6, sprg2 - mtmsr r6 - cmpwi r30, 0 - lwz r29, Disable_level(r11) - subf r31,r1,r31 - bne LABEL (nested) - stwux r1,r1,r31 -LABEL (nested): - /* - * _ISR_Nest_level++; - */ - lwz r31, 0(r29) - addi r30,r30,1 - stw r30,0(r28) - /* From here on out, interrupts can be re-enabled. RTEMS - * convention says not. - */ - lwz r4,0(r4) - /* - * _Thread_Dispatch_disable_level++; - */ - addi r31,r31,1 - stw r31, 0(r29) - mtmsr r5 - /* - * (*_ISR_Vector_table[ vector ])( vector ); - */ -#if (PPC_ABI == PPC_ABI_POWEROPEN) - lwz r6,0(r4) - lwz r2,4(r4) - mtlr r6 - lwz r11,8(r4) -#endif -#if (PPC_ABI == PPC_ABI_GCC27) - lwz r2, Default_r2(r11) - mtlr r4 - lwz r2, 0(r2) -#endif -#if (PPC_ABI == PPC_ABI_SVR4 || PPC_ABI == PPC_ABI_EABI) - mtlr r4 - lwz r2, Default_r2(r11) - lwz r13, Default_r13(r11) - lwz r2, 0(r2) - lwz r13, 0(r13) -#endif - mr r4,r1 - blrl - /* NOP marker for debuggers */ - or r6,r6,r6 - - /* We must re-disable the interrupts */ - mfspr r11, sprg3 - mfspr r0, sprg2 - mtmsr r0 - lwz r30, 0(r28) - lwz r31, 0(r29) - - /* - * if (--Thread_Dispatch_disable,--_ISR_Nest_level) - * goto easy_exit; - */ - addi r30, r30, -1 - cmpwi r30, 0 - addi r31, r31, -1 - stw r30, 0(r28) - stw r31, 0(r29) - bne LABEL (easy_exit) - cmpwi r31, 0 - - lwz r30, Switch_necessary(r11) - - /* - * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE ) - * restore stack - * #endif - */ - lwz r1,0(r1) - bne LABEL (easy_exit) - lwz r30, 0(r30) - lwz r31, Signal(r11) - - /* - * if ( _Context_Switch_necessary ) - * goto switch - */ - cmpwi r30, 0 - lwz r28, 0(r31) - li r6,0 - bne LABEL (switch) - /* - * if ( !_ISR_Signals_to_thread_executing ) - * goto easy_exit - * _ISR_Signals_to_thread_executing = 0; - */ - cmpwi r28, 0 - beq LABEL (easy_exit) - - /* - * switch: - * call _Thread_Dispatch() or prepare to return to _ISR_Dispatch - */ -LABEL (switch): - stw r6, 0(r31) - /* Re-enable interrupts */ - lwz r0, IP_MSR(r1) -#if (PPC_ABI == PPC_ABI_POWEROPEN) - lwz r2, Dispatch_r2(r11) -#else - /* R2 and R13 still hold their values from the last call */ -#endif - mtmsr r0 - bl SYM (_Thread_Dispatch) - /* NOP marker for debuggers */ - or r6,r6,r6 - /* - * prepare to get out of interrupt - */ - /* Re-disable IRQs */ - mfspr r0, sprg2 - mtmsr r0 - /* - * easy_exit: - * prepare to get out of interrupt - * return from interrupt - */ -LABEL (easy_exit): - lwz r5, IP_CR(r1) - lwz r6, IP_CTR(r1) - lwz r7, IP_XER(r1) - lwz r8, IP_LR(r1) - lwz r9, IP_PC(r1) - lwz r10, IP_MSR(r1) - mtcrf 255,r5 - mtctr r6 - mtxer r7 - mtlr r8 - MTPC (r9) - MTMSR (r10) - lwz r0, IP_0(r1) - lwz r2, IP_2(r1) - lwz r3, IP_3(r1) - lwz r4, IP_4(r1) - lwz r5, IP_5(r1) - lwz r6, IP_6(r1) - lwz r7, IP_7(r1) - lwz r8, IP_8(r1) - lwz r9, IP_9(r1) - lwz r10, IP_10(r1) - lwz r11, IP_11(r1) - lwz r12, IP_12(r1) - lwz r13, IP_13(r1) - lmw r28, IP_28(r1) - lwz r1, 0(r1) diff --git a/c/src/exec/score/cpu/powerpc/ppc.h b/c/src/exec/score/cpu/powerpc/ppc.h deleted file mode 100644 index c05760ed53..0000000000 --- a/c/src/exec/score/cpu/powerpc/ppc.h +++ /dev/null @@ -1,318 +0,0 @@ -/* ppc.h - * - * This file contains definitions for the IBM/Motorola PowerPC - * family members. - * - * Author: Andrew Bray - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/exec/cpu/no_cpu/no_cpu.h: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * - * Note: - * This file is included by both C and assembler code ( -DASM ) - * - * $Id$ - */ - -#ifndef _INCLUDE_PPC_h -#define _INCLUDE_PPC_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The following define the CPU Family and Model within the family - * - * NOTE: The string "REPLACE_THIS_WITH_THE_CPU_MODEL" is replaced - * with the name of the appropriate macro for this target CPU. - */ - -#ifdef ppc -#undef ppc -#endif -#define ppc - -#ifdef REPLACE_THIS_WITH_THE_CPU_MODEL -#undef REPLACE_THIS_WITH_THE_CPU_MODEL -#endif -#define REPLACE_THIS_WITH_THE_CPU_MODEL - -#ifdef REPLACE_THIS_WITH_THE_BSP -#undef REPLACE_THIS_WITH_THE_BSP -#endif -#define REPLACE_THIS_WITH_THE_BSP - -/* - * This file contains the information required to build - * RTEMS for a particular member of the "no cpu" - * family when executing in protected mode. It does - * this by setting variables to indicate which implementation - * dependent features are present in a particular member - * of the family. - */ - -#if defined(ppc403) - -#define CPU_MODEL_NAME "PowerPC 403" - -#define PPC_ALIGNMENT 4 -#define PPC_CACHE_ALIGNMENT 16 -#define PPC_CACHE_ALIGN_POWER 4 -#define PPC_INTERRUPT_MAX 16 -#define PPC_HAS_FPU 0 -#define PPC_HAS_DOUBLE 0 -#define PPC_HAS_RFCI 1 -#define PPC_MSR_DISABLE_MASK 0x00029200 -#define PPC_MSR_INITIAL 0x00000000 -#define PPC_INIT_FPSCR 0x00000000 -#define PPC_USE_MULTIPLE 1 -#define PPC_I_CACHE 2048 -#define PPC_D_CACHE 1024 - -#define PPC_MSR_0 0x00029200 -#define PPC_MSR_1 0x00021200 -#define PPC_MSR_2 0x00021000 -#define PPC_MSR_3 0x00000000 - -#elif defined(ppc601) - -#define CPU_MODEL_NAME "PowerPC 601" - -#define PPC_ALIGNMENT 8 -#define PPC_CACHE_ALIGNMENT 32 -#define PPC_CACHE_ALIGN_POWER 5 -#define PPC_INTERRUPT_MAX 16 -#define PPC_HAS_FPU 1 -#define PPC_HAS_DOUBLE 1 -#define PPC_HAS_RFCI 0 -#define PPC_MSR_DISABLE_MASK 0x00009900 -#define PPC_MSR_INITIAL 0x00002000 -#define PPC_INIT_FPSCR 0x000000f8 -#define PPC_USE_MULTIPLE 1 -#define PPC_I_CACHE 0 -#define PPC_D_CACHE 32768 - -#define PPC_MSR_0 0x00009900 -#define PPC_MSR_1 0x00001000 -#define PPC_MSR_2 0x00001000 -#define PPC_MSR_3 0x00000000 - -#elif defined(ppc602) - -#define CPU_MODEL_NAME "PowerPC 602" - -#define PPC_ALIGNMENT 4 -#define PPC_CACHE_ALIGNMENT 32 -#define PPC_CACHE_ALIGN_POWER 5 -#define PPC_INTERRUPT_MAX 16 -#define PPC_HAS_FPU 1 -#define PPC_HAS_DOUBLE 0 -#define PPC_HAS_RFCI 0 -#define PPC_MSR_DISABLE_MASK -#define PPC_MSR_INITIAL -#define PPC_INIT_FPSCR -#define PPC_USE_MULTIPLE 0 -#define PPC_I_CACHE 4096 -#define PPC_D_CACHE 4096 - -#elif defined(ppc603) - -#define CPU_MODEL_NAME "PowerPC 603" - -#define PPC_ALIGNMENT 8 -#define PPC_CACHE_ALIGNMENT 32 -#define PPC_CACHE_ALIGN_POWER 5 -#define PPC_INTERRUPT_MAX 16 -#define PPC_HAS_FPU 1 -#define PPC_HAS_DOUBLE 1 -#define PPC_HAS_RFCI 0 -#define PPC_MSR_DISABLE_MASK 0x00009900 -#define PPC_MSR_INITIAL 0x00002000 -#define PPC_INIT_FPSCR 0x000000f8 -#define PPC_USE_MULTIPLE 0 -#define PPC_I_CACHE 8192 -#define PPC_D_CACHE 8192 - -#define PPC_MSR_0 0x00009900 -#define PPC_MSR_1 0x00001000 -#define PPC_MSR_2 0x00001000 -#define PPC_MSR_3 0x00000000 - -#elif defined(ppc603e) - -#define CPU_MODEL_NAME "PowerPC 603e" - -#define PPC_ALIGNMENT 8 -#define PPC_CACHE_ALIGNMENT 32 -#define PPC_CACHE_ALIGN_POWER 5 -#define PPC_INTERRUPT_MAX 16 -#define PPC_HAS_FPU 1 -#define PPC_HAS_DOUBLE 1 -#define PPC_HAS_RFCI 0 -#define PPC_MSR_DISABLE_MASK 0x00009900 -#define PPC_MSR_INITIAL 0x00002000 -#define PPC_INIT_FPSCR 0x000000f8 -#define PPC_USE_MULTIPLE 0 -#define PPC_I_CACHE 16384 -#define PPC_D_CACHE 16384 - -#define PPC_MSR_0 0x00009900 -#define PPC_MSR_1 0x00001000 -#define PPC_MSR_2 0x00001000 -#define PPC_MSR_3 0x00000000 - -#elif defined(ppc604) - -#define CPU_MODEL_NAME "PowerPC 604" - -#define PPC_ALIGNMENT 8 -#define PPC_CACHE_ALIGNMENT 32 -#define PPC_CACHE_ALIGN_POWER 5 -#define PPC_INTERRUPT_MAX 16 -#define PPC_HAS_FPU 1 -#define PPC_HAS_DOUBLE 1 -#define PPC_HAS_RFCI 0 -#define PPC_MSR_DISABLE_MASK 0x00009900 -#define PPC_MSR_INITIAL 0x00002000 -#define PPC_INIT_FPSCR 0x000000f8 -#define PPC_USE_MULTIPLE 0 -#define PPC_I_CACHE 16384 -#define PPC_D_CACHE 16384 - -#define PPC_MSR_0 0x00009900 -#define PPC_MSR_1 0x00001000 -#define PPC_MSR_2 0x00001000 -#define PPC_MSR_3 0x00000000 - -#else - -#error "Unsupported CPU Model" - -#endif - -/* - * Application binary interfaces. - * PPC_ABI MUST be defined as one of these. - * Only PPC_ABI_POWEROPEN is currently fully supported. - * Only EABI will be supported in the end when - * the tools are there. - * Only big endian is currently supported. - */ -/* - * PowerOpen ABI. This is Andy's hack of the - * PowerOpen ABI to ELF. ELF rather than a - * XCOFF assembler is used. This may work - * if PPC_ASM == PPC_ASM_XCOFF is defined. - */ -#define PPC_ABI_POWEROPEN 0 -/* - * GCC 2.7.0 munched version of EABI, with - * PowerOpen calling convention and stack frames, - * but EABI style indirect function calls. - */ -#define PPC_ABI_GCC27 1 -/* - * SVR4 ABI - */ -#define PPC_ABI_SVR4 2 -/* - * Embedded ABI - */ -#define PPC_ABI_EABI 3 - -#if (PPC_ABI == PPC_ABI_POWEROPEN) -#define PPC_STACK_ALIGNMENT 8 -#elif (PPC_ABI == PPC_ABI_GCC27) -#define PPC_STACK_ALIGNMENT 8 -#elif (PPC_ABI == PPC_ABI_SVR4) -#define PPC_STACK_ALIGNMENT 16 -#elif (PPC_ABI == PPC_ABI_EABI) -#define PPC_STACK_ALIGNMENT 8 -#else -#error "PPC_ABI is not properly defined" -#endif -#ifndef PPC_ABI -#error "PPC_ABI is not properly defined" -#endif - -/* - * Assemblers. - * PPC_ASM MUST be defined as one of these. - * Only PPC_ABI_ELF is currently fully supported. - */ -/* - * ELF assembler. Currently used for all ABIs. - */ -#define PPC_ASM_ELF 0 -/* - * XCOFF assembler, may be needed for PowerOpen ABI. - */ -#define PPC_ASM_XCOFF 1 - -/* - * Define the name of the CPU family. - */ - -#define CPU_NAME "PowerPC" - -/* - * Interrupt vectors. - */ -/* Machine check */ -#define PPC_IRQ_MCHECK 0 -/* Protection violation */ -#define PPC_IRQ_PROTECT 1 -/* External interrupt */ -#define PPC_IRQ_EXTERNAL 2 -/* Program exception */ -#define PPC_IRQ_PROGRAM 3 -/* System call */ -#define PPC_IRQ_SCALL 4 -/* Floating point unavailable */ -#define PPC_IRQ_NOFP 5 -/* Program interval timer */ -#define PPC_IRQ_PIT 6 -/* Fixed interval timer */ -#define PPC_IRQ_FIT 7 -/* Critical interrupt pin */ -#define PPC_IRQ_CRIT 8 -/* Watchdog timer */ -#define PPC_IRQ_WATCHDOG 9 -/* Debug exceptions */ -#define PPC_IRQ_DEBUG 10 - -/* - * The following exceptions are not maskable, and are not - * necessarily predictable, so cannot be offered to RTEMS: - * Alignment exception - handled by the CPU module - * Data exceptions. - * Instruction exceptions. - */ - -#ifdef __cplusplus -} -#endif - -#endif /* ! _INCLUDE_PPC_h */ -/* end of include file */ diff --git a/c/src/exec/score/cpu/powerpc/ppctypes.h b/c/src/exec/score/cpu/powerpc/ppctypes.h deleted file mode 100644 index 4bbb436bf8..0000000000 --- a/c/src/exec/score/cpu/powerpc/ppctypes.h +++ /dev/null @@ -1,74 +0,0 @@ -/* ppctypes.h - * - * This include file contains type definitions pertaining to the PowerPC - * processor family. - * - * Author: Andrew Bray - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/exec/cpu/no_cpu/no_cputypes.h: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __PPC_TYPES_h -#define __PPC_TYPES_h - -#ifndef ASM - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This section defines the basic types for this processor. - */ - -typedef unsigned char unsigned8; /* unsigned 8-bit integer */ -typedef unsigned short unsigned16; /* unsigned 16-bit integer */ -typedef unsigned int unsigned32; /* unsigned 32-bit integer */ -typedef unsigned long long unsigned64; /* unsigned 64-bit integer */ - -typedef unsigned32 Priority_Bit_map_control; - -typedef signed char signed8; /* 8-bit signed integer */ -typedef signed short signed16; /* 16-bit signed integer */ -typedef signed int signed32; /* 32-bit signed integer */ -typedef signed long long signed64; /* 64 bit signed integer */ - -typedef unsigned32 boolean; /* Boolean value */ - -typedef float single_precision; /* single precision float */ -typedef double double_precision; /* double precision float */ - -typedef void ppc_isr; -typedef void ( *ppc_isr_entry )( int, struct CPU_Interrupt_frame * ); - -#ifdef __cplusplus -} -#endif - -#endif /* !ASM */ - -#endif -/* end of include file */ diff --git a/c/src/exec/score/cpu/powerpc/rtems.s b/c/src/exec/score/cpu/powerpc/rtems.s deleted file mode 100644 index ae6022d24b..0000000000 --- a/c/src/exec/score/cpu/powerpc/rtems.s +++ /dev/null @@ -1,132 +0,0 @@ -/* rtems.s - * - * This file contains the single entry point code for - * the PowerPC implementation of RTEMS. - * - * Author: Andrew Bray - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/exec/cpu/no_cpu/rtems.c: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include "asm.h" - - BEGIN_CODE -/* - * RTEMS - * - * This routine jumps to the directive indicated in r11. - * This routine is used when RTEMS is linked by itself and placed - * in ROM. This routine is the first address in the ROM space for - * RTEMS. The user "calls" this address with the directive arguments - * in the normal place. - * This routine then jumps indirectly to the correct directive - * preserving the arguments. The directive should not realize - * it has been "wrapped" in this way. The table "_Entry_points" - * is used to look up the directive. - */ - - ALIGN (4, 2) - PUBLIC_PROC (RTEMS) -PROC (RTEMS): -#if (PPC_ABI == PPC_ABI_POWEROPEN) - mflr r0 - stw r0, 8(r1) - stwu r1, -64(r1) - - /* Establish addressing */ - bl base -base: - mflr r12 - addi r12, r12, tabaddr - base - - lwz r12, Entry_points-abase(r12) - slwi r11, r11, 2 - lwzx r12, r12, r11 - - stw r2, 56(r1) - lwz r0, 0(r12) - mtlr r0 - lwz r2, 4(r12) - lwz r11, 8(r12) - blrl - lwz r2, 56(r1) - addi r1, r1, 64 - lwz r0, 8(r1) - mtlr r0 -#else - mflr r0 - stw r0, 4(r1) - stwu r1, -16(r1) - - /* Establish addressing */ - bl base -base: - mflr r12 - addi r12, r12, tabaddr - base - - lwz r12, Entry_points-abase(r12) - slwi r11, r11, 2 - lwzx r11, r12, r11 - - stw r2, 8(r1) -#if (PPC_ABI != PPC_ABI_GCC27) - stw r13, 12(r1) -#endif - mtlr r11 - lwz r11, irqinfo-abase(r12) - lwz r2, 0(r11) -#if (PPC_ABI != PPC_ABI_GCC27) - lwz r13, 4(r11) -#endif - blrl - lwz r2, 8(r1) -#if (PPC_ABI != PPC_ABI_GCC27) - lwz r13, 12(r1) -#endif - addi r1, r1, 16 - lwz r0, 4(r1) - mtlr r0 -#endif - blr - - - /* Addressability stuff */ -tabaddr: -abase: - EXTERN_VAR (_Entry_points) -Entry_points: - EXT_SYM_REF (_Entry_points) -#if (PPC_ABI != PPC_ABI_POWEROPEN) - EXTERN_VAR (_CPU_IRQ_info) -irqinfo: - EXT_SYM_REF (_CPU_IRQ_info) -#endif - -#if (PPC_ABI == PPC_ABI_POWEROPEN) - DESCRIPTOR (RTEMS) -#endif - - diff --git a/c/src/exec/score/include/rtems/debug.h b/c/src/exec/score/include/rtems/debug.h deleted file mode 100644 index c0cb20a7ea..0000000000 --- a/c/src/exec/score/include/rtems/debug.h +++ /dev/null @@ -1,98 +0,0 @@ -/* debug.h - * - * This include file contains the information pertaining to the debug - * support within RTEMS. It is currently cast in the form of a - * Manager since it is externally accessible. - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_DEBUG_h -#define __RTEMS_DEBUG_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The following type is used to manage the debug mask. - */ - -typedef unsigned32 rtems_debug_control; - -/* - * These constants represent various classes of debugging. - */ - -#define RTEMS_DEBUG_ALL_MASK 0xffffffff -#define RTEMS_DEBUG_REGION 0x00000001 - -/* - * This variable contains the current debug level. - */ - -SCORE_EXTERN rtems_debug_control _Debug_Level; - -/* - * _Debug_Manager_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this manager. - */ - -void _Debug_Manager_initialization( void ); - -/* - * rtems_debug_enable - * - * DESCRIPTION: - * - * This routine enables the specified types of debug checks. - */ - -void rtems_debug_enable ( - rtems_debug_control to_be_enabled -); - -/* - * rtems_debug_disable - * - * DESCRIPTION: - * - * This routine disables the specified types of debug checks. - */ - -void rtems_debug_disable ( - rtems_debug_control to_be_disabled -); - -/* - * - * _Debug_Is_enabled - * - * DESCRIPTION: - * - * This routine returns TRUE if the requested debug level is - * enabled, and FALSE otherwise. - */ - -boolean _Debug_Is_enabled( - rtems_debug_control level -); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/address.h b/c/src/exec/score/include/rtems/score/address.h deleted file mode 100644 index d9be75ee4b..0000000000 --- a/c/src/exec/score/include/rtems/score/address.h +++ /dev/null @@ -1,31 +0,0 @@ -/* address.h - * - * This include file contains the information required to manipulate - * physical addresses. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_ADDRESSES_h -#define __RTEMS_ADDRESSES_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/apiext.h b/c/src/exec/score/include/rtems/score/apiext.h deleted file mode 100644 index f9556f540a..0000000000 --- a/c/src/exec/score/include/rtems/score/apiext.h +++ /dev/null @@ -1,102 +0,0 @@ -/* apiext.h - * - * XXX - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - - -#ifndef __API_EXTENSIONS_h -#define __API_EXTENSIONS_h - -#include -#include - -/* - * The control structure which defines the points at which an API - * can add an extension to the system initialization thread. - */ - -typedef void (*API_extensions_Predriver_hook)(void); -typedef void (*API_extensions_Postdriver_hook)(void); -typedef void (*API_extensions_Postswitch_hook)( - Thread_Control * - ); - - -typedef struct { - Chain_Node Node; - API_extensions_Predriver_hook predriver_hook; - API_extensions_Postdriver_hook postdriver_hook; - API_extensions_Postswitch_hook postswitch_hook; -} API_extensions_Control; - -/* - * This is the list of API extensions to the system initialization. - */ - -SCORE_EXTERN Chain_Control _API_extensions_List; - -/* - * _API_extensions_Initialization - * - * DESCRIPTION: - * - * This routine initializes the API extension handler. - * - */ - -void _API_extensions_Initialization( void ); - -/* - * _API_extensions_Add - * - * DESCRIPTION: - * - * XXX - */ - -void _API_extensions_Add( - API_extensions_Control *the_extension -); - -/* - * _API_extensions_Run_predriver - * - * DESCRIPTION: - * - * XXX - */ - -void _API_extensions_Run_predriver( void ); - -/* - * _API_extensions_Run_postdriver - * - * DESCRIPTION: - * - * XXX - */ - -void _API_extensions_Run_postdriver( void ); - -/* - * _API_extensions_Run_postswitch - * - * DESCRIPTION: - * - * XXX - */ - -void _API_extensions_Run_postswitch( void ); - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/bitfield.h b/c/src/exec/score/include/rtems/score/bitfield.h deleted file mode 100644 index 3fda9b4904..0000000000 --- a/c/src/exec/score/include/rtems/score/bitfield.h +++ /dev/null @@ -1,98 +0,0 @@ -/* bitfield.h - * - * This include file contains all bit field manipulation routines. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_BITFIELD_h -#define __RTEMS_BITFIELD_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * _Bitfield_Find_first_bit - * - * DESCRIPTION: - * - * This routine returns the bit_number of the first bit set - * in the specified value. The correspondence between bit_number - * and actual bit position is processor dependent. The search for - * the first bit set may run from most to least significant bit - * or vice-versa. - * - * NOTE: - * - * This routine is used when the executing thread is removed - * from the ready state and, as a result, its performance has a - * significant impact on the performance of the executive as a whole. - */ - -#if ( CPU_USE_GENERIC_BITFIELD_DATA == TRUE ) - -#ifndef SCORE_INIT -extern const unsigned char __log2table[256]; -#else -const unsigned char __log2table[256] = { - 7, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; -#endif - -#endif - -#if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE ) - -#define _Bitfield_Find_first_bit( _value, _bit_number ) \ - _CPU_Bitfield_Find_first_bit( _value, _bit_number ) - -#else - -/* - * The following must be a macro because if a CPU specific version - * is used it will most likely use inline assembly. - */ - -#define _Bitfield_Find_first_bit( _value, _bit_number ) \ - { \ - register __value = (_value); \ - register const unsigned char *__p = __log2table; \ - \ - if ( __value < 0x100 ) \ - (_bit_number) = __p[ __value ] + 8; \ - else \ - (_bit_number) = __p[ __value >> 8 ]; \ - } - -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/chain.h b/c/src/exec/score/include/rtems/score/chain.h deleted file mode 100644 index 11c1f8aee0..0000000000 --- a/c/src/exec/score/include/rtems/score/chain.h +++ /dev/null @@ -1,168 +0,0 @@ -/* chain.h - * - * This include file contains all the constants and structures associated - * with the Doubly Linked Chain Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_CHAIN_h -#define __RTEMS_CHAIN_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* - * This is used to manage each element (node) which is placed - * on a chain. - * - * NOTE: Typically, a more complicated structure will use the - * chain package. The more complicated structure will - * include a chain node as the first element in its - * control structure. It will then call the chain package - * with a pointer to that node element. The node pointer - * and the higher level structure start at the same address - * so the user can cast the pointers back and forth. - * - */ - -typedef struct Chain_Node_struct Chain_Node; - -struct Chain_Node_struct { - Chain_Node *next; - Chain_Node *previous; -}; - -/* - * This is used to manage a chain. A chain consists of a doubly - * linked list of zero or more nodes. - * - * NOTE: This implementation does not require special checks for - * manipulating the first and last elements on the chain. - * To accomplish this the chain control structure is - * treated as two overlapping chain nodes. The permanent - * head of the chain overlays a node structure on the - * first and permanent_null fields. The permanent tail - * of the chain overlays a node structure on the - * permanent_null and last elements of the structure. - * - */ - -typedef struct { - Chain_Node *first; - Chain_Node *permanent_null; - Chain_Node *last; -} Chain_Control; - -/* - * _Chain_Initialize - * - * DESCRIPTION: - * - * This routine initializes the_chain structure to manage the - * contiguous array of number_nodes nodes which starts at - * starting_address. Each node is of node_size bytes. - * - */ - -void _Chain_Initialize( - Chain_Control *the_chain, - void *starting_address, - unsigned32 number_nodes, - unsigned32 node_size -); - -/* - * _Chain_Get_first_unprotected - */ - -#ifndef USE_INLINES -Chain_Node *_Chain_Get_first_unprotected( - Chain_Control *the_chain -); -#endif - -/* - * _Chain_Extract - * - * DESCRIPTION: - * - * This routine extracts the_node from the chain on which it resides. - * It disables interrupts to insure the atomicity of the - * extract operation. - * - */ - -void _Chain_Extract( - Chain_Node *the_node -); - -/* - * _Chain_Get - * - * DESCRIPTION: - * - * This function removes the first node from the_chain and returns - * a pointer to that node. If the_chain is empty, then NULL is returned. - * It disables interrupts to insure the atomicity of the - * get operation. - * - */ - -Chain_Node *_Chain_Get( - Chain_Control *the_chain -); - -/* - * _Chain_Insert - * - * DESCRIPTION: - * - * This routine inserts the_node on a chain immediately following - * after_node. It disables interrupts to insure the atomicity - * of the extract operation. - * - */ - -void _Chain_Insert( - Chain_Node *after_node, - Chain_Node *the_node -); - -/* - * _Chain_Append - * - * DESCRIPTION: - * - * This routine appends the_node onto the end of the_chain. - * It disables interrupts to insure the atomicity of the - * append operation. - * - */ - -void _Chain_Append( - Chain_Control *the_chain, - Chain_Node *the_node -); - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/context.h b/c/src/exec/score/include/rtems/score/context.h deleted file mode 100644 index 6b48036480..0000000000 --- a/c/src/exec/score/include/rtems/score/context.h +++ /dev/null @@ -1,134 +0,0 @@ -/* context.h - * - * This include file contains all information about a context. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_CONTEXT_h -#define __RTEMS_CONTEXT_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* - * The following constant defines the number of bytes required - * to store a full floating point context. - */ - -#define CONTEXT_FP_SIZE CPU_CONTEXT_FP_SIZE - -/* - * The following variable is set to TRUE when a reschedule operation - * has determined that the processor should be taken away from the - * currently executing thread and given to the heir thread. - */ - -SCORE_EXTERN volatile boolean _Context_Switch_necessary; - -/* - * _Context_Initialize - * - * DESCRIPTION: - * - * This routine initializes THE_CONTEXT such that the stack - * pointer, interrupt level, and entry point are correct for the - * thread's initial state. - */ - -#define \ - _Context_Initialize( _the_context, _stack, _size, _isr, _entry, _is_fp ) \ - _CPU_Context_Initialize( _the_context, _stack, _size, _isr, _entry, _is_fp ) - -/* - * _Context_Switch - * - * DESCRIPTION: - * - * This routine saves the current context into the EXECUTING - * context record and restores the context specified by HEIR. - */ - -#define _Context_Switch( _executing, _heir ) \ - _CPU_Context_switch( _executing, _heir ) - -/* - * _Context_Restart_self - * - * DESCRIPTION: - * - * This routine restarts the calling thread by restoring its initial - * stack pointer and returning to the thread's entry point. - */ - -#define _Context_Restart_self( _the_context ) \ - _CPU_Context_Restart_self( _the_context ) - -/* - * _Context_Fp_start - * - * DESCRIPTION: - * - * This function returns the starting address of the floating - * point context save area. It is assumed that the are reserved - * for the floating point save area is large enough. - */ - -#define _Context_Fp_start( _base, _offset ) \ - _CPU_Context_Fp_start( (_base), (_offset) ) - -/* - * _Context_Initialize_fp - * - * DESCRIPTION: - * - * This routine initializes the floating point context save - * area to contain an initial known state. - */ - -#define _Context_Initialize_fp( _fp_area ) \ - _CPU_Context_Initialize_fp( _fp_area ) - -/* - * _Context_Restore_fp - * - * DESCRIPTION: - * - * This routine restores the floating point context contained - * in the FP_CONTEXT area. It is assumed that the current - * floating point context has been saved by a previous invocation - * of SAVE_FP. - */ - -#define _Context_Restore_fp( _fp ) \ - _CPU_Context_restore_fp( _fp ) - -/* - * _Context_Save_fp - * - * DESCRIPTION: - * - * This routine saves the current floating point context - * in the FP_CONTEXT area. - */ - -#define _Context_Save_fp( _fp ) \ - _CPU_Context_save_fp( _fp ) - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/copyrt.h b/c/src/exec/score/include/rtems/score/copyrt.h deleted file mode 100644 index a146206f01..0000000000 --- a/c/src/exec/score/include/rtems/score/copyrt.h +++ /dev/null @@ -1,42 +0,0 @@ -/* copyrt.h - * - * This include file contains the copyright notice for RTEMS - * which is included in every binary copy of the executive. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_COPYRIGHT_h -#define __RTEMS_COPYRIGHT_h - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef SCORE_INIT - -const char _Copyright_Notice[] = -"COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.\n\ -On-Line Applications Research Corporation (OAR).\n\ -All rights assigned to U.S. Government, 1994.\n"; - -#else - -extern const char _Copyright_Notice[]; - -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/coremsg.h b/c/src/exec/score/include/rtems/score/coremsg.h deleted file mode 100644 index 202078f7c4..0000000000 --- a/c/src/exec/score/include/rtems/score/coremsg.h +++ /dev/null @@ -1,267 +0,0 @@ -/* coremsg.h - * - * This include file contains all the constants and structures associated - * with the Message queue Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_CORE_MESSAGE_QUEUE_h -#define __RTEMS_CORE_MESSAGE_QUEUE_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -/* - * The following type defines the callout which the API provides - * to support global/multiprocessor operations on message_queues. - */ - -typedef void ( *CORE_message_queue_API_mp_support_callout )( - Thread_Control *, - Objects_Id - ); - -/* - * The following defines the data types needed to manipulate - * the contents of message buffers. - * - * NOTE: The buffer field is normally longer than a single unsigned32. - * but since messages are variable length we just make a ptr to 1. - */ - -typedef struct { - unsigned32 size; - unsigned32 buffer[1]; -} CORE_message_queue_Buffer; - -/* - * The following records define the organization of a message - * buffer. - */ - -typedef struct { - Chain_Node Node; - CORE_message_queue_Buffer Contents; -} CORE_message_queue_Buffer_control; - -/* - * Blocking disciplines for a message_queue. - */ - -typedef enum { - CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO, - CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY -} CORE_message_queue_Disciplines; - -/* - * The following enumerated type details the modes in which a message - * may be submitted to a message queue. The message may be posted - * in a send or urgent fashion. - */ - -typedef enum { - CORE_MESSAGE_QUEUE_SEND_REQUEST = 0, - CORE_MESSAGE_QUEUE_URGENT_REQUEST = 1 -} CORE_message_queue_Submit_types; - -/* - * Core Message queue handler return statuses. - */ - -typedef enum { - CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL, - CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE, - CORE_MESSAGE_QUEUE_STATUS_TOO_MANY, - CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED, - CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT, - CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED, - CORE_MESSAGE_QUEUE_STATUS_TIMEOUT -} CORE_message_queue_Status; - -/* - * The following defines the control block used to manage the - * attributes of each message queue. - */ - -typedef struct { - CORE_message_queue_Disciplines discipline; -} CORE_message_queue_Attributes; - -/* - * The following defines the type for a Notification handler. A notification - * handler is invoked when the message queue makes a 0->1 transition on - * pending messages. - */ - -typedef void (*CORE_message_queue_Notify_Handler)( void * ); - -/* - * The following defines the control block used to manage each - * counting message_queue. - */ - -typedef struct { - Thread_queue_Control Wait_queue; - CORE_message_queue_Attributes Attributes; - unsigned32 maximum_pending_messages; - unsigned32 number_of_pending_messages; - unsigned32 maximum_message_size; - Chain_Control Pending_messages; - CORE_message_queue_Buffer *message_buffers; - CORE_message_queue_Notify_Handler notify_handler; - void *notify_argument; - Chain_Control Inactive_messages; -} CORE_message_queue_Control; - -/* - * _CORE_message_queue_Initialize - * - * DESCRIPTION: - * - * This routine initializes the message_queue based on the parameters passed. - */ - -boolean _CORE_message_queue_Initialize( - CORE_message_queue_Control *the_message_queue, - Objects_Classes the_class, - CORE_message_queue_Attributes *the_message_queue_attributes, - unsigned32 maximum_pending_messages, - unsigned32 maximum_message_size, - Thread_queue_Extract_callout proxy_extract_callout -); - -/* - * _CORE_message_queue_Close - * - * DESCRIPTION: - * - * This function closes a message by returning all allocated space and - * flushing the message_queue's task wait queue. - */ - -void _CORE_message_queue_Close( - CORE_message_queue_Control *the_message_queue, - Thread_queue_Flush_callout remote_extract_callout, - unsigned32 status -); - -/* - * - * _CORE_message_queue_Flush - * - * DESCRIPTION: - * - * This function flushes the message_queue's task wait queue. The number - * messages flushed from the queue is returned. - * - */ - -unsigned32 _CORE_message_queue_Flush( - CORE_message_queue_Control *the_message_queue -); - -/* - * _CORE_message_queue_Flush_support - * - * DESCRIPTION: - * - * This routine flushes all outstanding messages and returns - * them to the inactive message chain. - */ - -unsigned32 _CORE_message_queue_Flush_support( - CORE_message_queue_Control *the_message_queue -); - -/* - * - * _CORE_message_queue_Broadcast - * - * DESCRIPTION: - * - * This function sends a message for every thread waiting on the queue and - * returns the number of threads made ready by the message. - * - */ - -CORE_message_queue_Status _CORE_message_queue_Broadcast( - CORE_message_queue_Control *the_message_queue, - void *buffer, - unsigned32 size, - Objects_Id id, - CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, - unsigned32 *count -); - -/* - * - * _CORE_message_queue_Submit - * - * DESCRIPTION: - * - * This routine implements the send and urgent message functions. It - * processes a message that is to be submitted to the designated - * message queue. The message will either be processed as a - * send message which it will be inserted at the rear of the queue - * or it will be processed as an urgent message which will be inserted - * at the front of the queue. - * - */ - -CORE_message_queue_Status _CORE_message_queue_Submit( - CORE_message_queue_Control *the_message_queue, - void *buffer, - unsigned32 size, - Objects_Id id, - CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, - CORE_message_queue_Submit_types submit_type -); - -/* - * - * _CORE_message_queue_Seize - * - * DESCRIPTION: - * - * This kernel routine dequeues a message, copies the message buffer to - * a given destination buffer, and frees the message buffer to the - * inactive message pool. The thread will be blocked if wait is TRUE, - * otherwise an error will be given to the thread if no messages are available. - * - */ - -void _CORE_message_queue_Seize( - CORE_message_queue_Control *the_message_queue, - Objects_Id id, - void *buffer, - unsigned32 *size, - boolean wait, - Watchdog_Interval timeout -); - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - diff --git a/c/src/exec/score/include/rtems/score/coremutex.h b/c/src/exec/score/include/rtems/score/coremutex.h deleted file mode 100644 index d9ba197502..0000000000 --- a/c/src/exec/score/include/rtems/score/coremutex.h +++ /dev/null @@ -1,172 +0,0 @@ -/* mutex.h - * - * This include file contains all the constants and structures associated - * with the Mutex Handler. A mutex is an enhanced version of the standard - * Dijkstra binary semaphore used to provide synchronization and mutual - * exclusion capabilities. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_CORE_MUTEX_h -#define __RTEMS_CORE_MUTEX_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -/* - * The following type defines the callout which the API provides - * to support global/multiprocessor operations on mutexes. - */ - -typedef void ( *CORE_mutex_API_mp_support_callout )( - Thread_Control *, - Objects_Id - ); - -/* - * Blocking disciplines for a mutex. - */ - -typedef enum { - CORE_MUTEX_DISCIPLINES_FIFO, - CORE_MUTEX_DISCIPLINES_PRIORITY, - CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, - CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING -} CORE_mutex_Disciplines; - -/* - * Mutex handler return statuses. - */ - -typedef enum { - CORE_MUTEX_STATUS_SUCCESSFUL, - CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT, - CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED, - CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE, - CORE_MUTEX_WAS_DELETED, - CORE_MUTEX_TIMEOUT, - CORE_MUTEX_STATUS_CEILING_VIOLATED -} CORE_mutex_Status; - -/* - * Locked and unlocked values - */ - -#define CORE_MUTEX_UNLOCKED 1 -#define CORE_MUTEX_LOCKED 0 - -/* - * The following defines the control block used to manage the - * attributes of each mutex. - */ - -typedef struct { - boolean allow_nesting; - CORE_mutex_Disciplines discipline; - Priority_Control priority_ceiling; -} CORE_mutex_Attributes; - -/* - * The following defines the control block used to manage each mutex. - */ - -typedef struct { - Thread_queue_Control Wait_queue; - CORE_mutex_Attributes Attributes; - unsigned32 lock; - unsigned32 nest_count; - Thread_Control *holder; - Objects_Id holder_id; -} CORE_mutex_Control; - -/* - * _CORE_mutex_Initialize - * - * DESCRIPTION: - * - * This routine initializes the mutex based on the parameters passed. - */ - -void _CORE_mutex_Initialize( - CORE_mutex_Control *the_mutex, - Objects_Classes the_class, - CORE_mutex_Attributes *the_mutex_attributes, - unsigned32 initial_lock, - Thread_queue_Extract_callout proxy_extract_callout -); - -/* - * _CORE_mutex_Seize - * - * DESCRIPTION: - * - * This routine attempts to receive a unit from the_mutex. - * If a unit is available or if the wait flag is FALSE, then the routine - * returns. Otherwise, the calling task is blocked until a unit becomes - * available. - */ - -void _CORE_mutex_Seize( - CORE_mutex_Control *the_mutex, - Objects_Id id, - boolean wait, - Watchdog_Interval timeout -); - -/* - * _CORE_mutex_Surrender - * - * DESCRIPTION: - * - * This routine frees a unit to the mutex. If a task was blocked waiting for - * a unit from this mutex, then that task will be readied and the unit - * given to that task. Otherwise, the unit will be returned to the mutex. - */ - -CORE_mutex_Status _CORE_mutex_Surrender( - CORE_mutex_Control *the_mutex, - Objects_Id id, - CORE_mutex_API_mp_support_callout api_mutex_mp_support -); - -/* - * _CORE_mutex_Flush - * - * DESCRIPTION: - * - * This routine assists in the deletion of a mutex by flushing the associated - * wait queue. - */ - -void _CORE_mutex_Flush( - CORE_mutex_Control *the_mutex, - Thread_queue_Flush_callout remote_extract_callout, - unsigned32 status -); - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - diff --git a/c/src/exec/score/include/rtems/score/coresem.h b/c/src/exec/score/include/rtems/score/coresem.h deleted file mode 100644 index 88f712be5d..0000000000 --- a/c/src/exec/score/include/rtems/score/coresem.h +++ /dev/null @@ -1,156 +0,0 @@ -/* core_sem.h - * - * This include file contains all the constants and structures associated - * with the Counting Semaphore Handler. A counting semaphore is the - * standard Dijkstra binary semaphore used to provide synchronization - * and mutual exclusion capabilities. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_CORE_COUNTING_SEMAPHORE_h -#define __RTEMS_CORE_COUNTING_SEMAPHORE_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include - -/* - * The following type defines the callout which the API provides - * to support global/multiprocessor operations on semaphores. - */ - -typedef void ( *CORE_semaphore_API_mp_support_callout )( - Thread_Control *, - Objects_Id - ); - -/* - * Blocking disciplines for a semaphore. - */ - -typedef enum { - CORE_SEMAPHORE_DISCIPLINES_FIFO, - CORE_SEMAPHORE_DISCIPLINES_PRIORITY -} CORE_semaphore_Disciplines; - -/* - * Core Semaphore handler return statuses. - */ - -typedef enum { - CORE_SEMAPHORE_STATUS_SUCCESSFUL, - CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT, - CORE_SEMAPHORE_WAS_DELETED, - CORE_SEMAPHORE_TIMEOUT -} CORE_semaphore_Status; - -/* - * The following defines the control block used to manage the - * attributes of each semaphore. - */ - -typedef struct { - CORE_semaphore_Disciplines discipline; -} CORE_semaphore_Attributes; - -/* - * The following defines the control block used to manage each - * counting semaphore. - */ - -typedef struct { - Thread_queue_Control Wait_queue; - CORE_semaphore_Attributes Attributes; - unsigned32 count; -} CORE_semaphore_Control; - -/* - * _CORE_semaphore_Initialize - * - * DESCRIPTION: - * - * This routine initializes the semaphore based on the parameters passed. - */ - -void _CORE_semaphore_Initialize( - CORE_semaphore_Control *the_semaphore, - Objects_Classes the_class, - CORE_semaphore_Attributes *the_semaphore_attributes, - unsigned32 initial_value, - Thread_queue_Extract_callout proxy_extract_callout -); - -/* - * _CORE_semaphore_Seize - * - * DESCRIPTION: - * - * This routine attempts to receive a unit from the_semaphore. - * If a unit is available or if the wait flag is FALSE, then the routine - * returns. Otherwise, the calling task is blocked until a unit becomes - * available. - */ - -void _CORE_semaphore_Seize( - CORE_semaphore_Control *the_semaphore, - Objects_Id id, - boolean wait, - Watchdog_Interval timeout -); - -/* - * _CORE_semaphore_Surrender - * - * DESCRIPTION: - * - * This routine frees a unit to the semaphore. If a task was blocked waiting - * for a unit from this semaphore, then that task will be readied and the unit - * given to that task. Otherwise, the unit will be returned to the semaphore. - */ - -CORE_semaphore_Status _CORE_semaphore_Surrender( - CORE_semaphore_Control *the_semaphore, - Objects_Id id, - CORE_semaphore_API_mp_support_callout api_semaphore_mp_support -); - -/* - * _CORE_semaphore_Flush - * - * DESCRIPTION: - * - * This routine assists in the deletion of a semaphore by flushing the - * associated wait queue. - */ - -void _CORE_semaphore_Flush( - CORE_semaphore_Control *the_semaphore, - Thread_queue_Flush_callout remote_extract_callout, - unsigned32 status -); - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - diff --git a/c/src/exec/score/include/rtems/score/heap.h b/c/src/exec/score/include/rtems/score/heap.h deleted file mode 100644 index c1a0650d0a..0000000000 --- a/c/src/exec/score/include/rtems/score/heap.h +++ /dev/null @@ -1,226 +0,0 @@ -/* heap.h - * - * This include file contains the information pertaining to the Heap - * Handler. A heap is a doubly linked list of variable size - * blocks which are allocated using the first fit method. Garbage - * collection is performed each time a block is returned to the heap by - * coalescing neighbor blocks. Control information for both allocated - * and unallocated blocks is contained in the heap space. A heap header - * contains control information for the heap. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_HEAP_h -#define __RTEMS_HEAP_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Status codes for heap_extend - */ - -typedef enum { - HEAP_EXTEND_SUCCESSFUL, - HEAP_EXTEND_ERROR, - HEAP_EXTEND_NOT_IMPLEMENTED -} Heap_Extend_status; - -/* - * Constants used in the size/used field of each heap block to - * indicate when a block is free or in use. - */ - -#define HEAP_BLOCK_USED 1 /* indicates block is in use */ -#define HEAP_BLOCK_FREE 0 /* indicates block is free */ - -/* - * The size/used field value for the dummy front and back flags. - */ - -#define HEAP_DUMMY_FLAG (0 + HEAP_BLOCK_USED) - -/* - * The following constants reflect various requirements of the - * heap data structures which impact the management of a heap. - * - * NOTE: Because free block overhead is greater than used block - * overhead AND a portion of the allocated space is from - * the extra free block overhead, the absolute lower bound - * of the minimum fragment size is equal to the size of - * the free block overhead. - */ - -#define HEAP_OVERHEAD \ - (sizeof( unsigned32 ) * 2) /* size dummy first and last blocks */ -#define HEAP_BLOCK_USED_OVERHEAD \ - (sizeof( void * ) * 2) /* num bytes overhead in used block */ -#define HEAP_MINIMUM_SIZE \ - (HEAP_OVERHEAD + sizeof (Heap_Block)) - /* min number of bytes the user may */ - /* specify for the heap size */ - -/* - * The following defines the data structure used to manage - * individual blocks in a heap. When the block is allocated, the - * next and previous fields are not used by the Heap Handler - * and thus the address returned for the block starts at - * the address of the next field. - * - * NOTE: The next and previous pointers are only valid when the - * block is free. Caution must be exercised to insure that - * allocated blocks are large enough to contain them and - * that they are not accidentally overwritten when the - * block is actually allocated. - */ - -typedef struct Heap_Block_struct Heap_Block; - -struct Heap_Block_struct { - unsigned32 back_flag; /* size and status of prev block */ - unsigned32 front_flag; /* size and status of block */ - Heap_Block *next; /* pointer to next block */ - Heap_Block *previous; /* pointer to previous block */ -}; - -/* - * The following defines the control block used to manage each heap. - * - * NOTE: - * - * This structure is layed out such that it can be used a a dummy - * first and last block on the free block chain. The extra padding - * insures the dummy last block is the correct size. - * - * The first Heap_Block starts at first while the second starts at - * final. This is effectively the same trick as is used in the Chain - * Handler. - */ - -typedef struct { - Heap_Block *start; /* first valid block address in heap */ - Heap_Block *final; /* last valid block address in heap */ - - Heap_Block *first; /* pointer to first block in heap */ - Heap_Block *permanent_null; /* always NULL pointer */ - Heap_Block *last; /* pointer to last block in heap */ - unsigned32 page_size; /* allocation unit */ - unsigned32 reserved; -} Heap_Control; - -/* - * _Heap_Initialize - * - * DESCRIPTION: - * - * This routine initializes the_heap record to manage the - * contiguous heap of size bytes which starts at starting_address. - * Blocks of memory are allocated from the heap in multiples of - * page_size byte units. - */ - -unsigned32 _Heap_Initialize( - Heap_Control *the_heap, - void *starting_address, - unsigned32 size, - unsigned32 page_size -); - -/* - * _Heap_Extend - * - * DESCRIPTION: - * - * This routine grows the_heap memory area using the size bytes which - * begin at starting_address. - */ - -Heap_Extend_status _Heap_Extend( - Heap_Control *the_heap, - void *starting_address, - unsigned32 size, - unsigned32 *amount_extended -); - -/* - * _Heap_Allocate - * - * DESCRIPTION: - * - * DESCRIPTION: - * - * This function attempts to allocate a block of size bytes from - * the_heap. If insufficient memory is free in the_heap to allocate - * a block of the requested size, then NULL is returned. - */ - -void *_Heap_Allocate( - Heap_Control *the_heap, - unsigned32 size -); - -/* - * _Heap_Size_of_user_area - * - * DESCRIPTION: - * - * This kernel routine sets size to the size of the given heap block. - * It returns TRUE if the starting_address is in the heap, and FALSE - * otherwise. - */ - -boolean _Heap_Size_of_user_area( - Heap_Control *the_heap, - void *starting_address, - unsigned32 *size -); - -/* - * _Heap_Free - * - * DESCRIPTION: - * - * This routine returns the block of memory which begins - * at starting_address to the_heap. Any coalescing which is - * possible with the freeing of this routine is performed. - */ - -boolean _Heap_Free( - Heap_Control *the_heap, - void *start_address -); - -/* - * _Heap_Walk - * - * DESCRIPTION: - * - * This routine walks the heap to verify its integrity. - */ - -void _Heap_Walk( - Heap_Control *the_heap, - int source, - boolean do_dump -); - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/interr.h b/c/src/exec/score/include/rtems/score/interr.h deleted file mode 100644 index 3d315473b0..0000000000 --- a/c/src/exec/score/include/rtems/score/interr.h +++ /dev/null @@ -1,95 +0,0 @@ -/* interr.h - * - * This include file contains constants and prototypes related - * to the Internal Error Handler. - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_INTERNAL_ERROR_h -#define __RTEMS_INTERNAL_ERROR_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This type lists the possible sources from which an error - * can be reported. - */ - -typedef enum { - INTERNAL_ERROR_CORE, - INTERNAL_ERROR_RTEMS_API, - INTERNAL_ERROR_POSIX_API -} Internal_errors_Source; - -/* - * A list of errors which are generated internally by the executive core. - */ - -typedef enum { - INTERNAL_ERROR_NO_CONFIGURATION_TABLE, - INTERNAL_ERROR_NO_CPU_TABLE, - INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS, - INTERNAL_ERROR_TOO_LITTLE_WORKSPACE, - INTERNAL_ERROR_WORKSPACE_ALLOCATION, - INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL, - INTERNAL_ERROR_THREAD_EXITTED, - INTERNAL_ERROR_INCONSISTENT_MP_INFORMATION, - INTERNAL_ERROR_INVALID_NODE, - INTERNAL_ERROR_NO_MPCI, - INTERNAL_ERROR_BAD_PACKET, - INTERNAL_ERROR_OUT_OF_PACKETS, - INTERNAL_ERROR_OUT_OF_GLOBAL_OBJECTS, - INTERNAL_ERROR_OUT_OF_PROXIES, - INTERNAL_ERROR_INVALID_GLOBAL_ID, - INTERNAL_ERROR_BAD_STACK_HOOK -} Internal_errors_Core_list; - -/* - * This type holds the fatal error information. - */ - -typedef struct { - Internal_errors_Source the_source; - boolean is_internal; - unsigned32 the_error; -} Internal_errors_Information; - -/* - * When a fatal error occurs, the error information is stored here. - */ - -SCORE_EXTERN Internal_errors_Information Internal_errors_What_happened; - -/* - * _Internal_error_Occurred - * - * DESCRIPTION: - * - * This routine is invoked when the application or the executive itself - * determines that a fatal error has occurred. - */ - -void volatile _Internal_error_Occurred( - Internal_errors_Source the_source, - boolean is_internal, - unsigned32 the_error -); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/isr.h b/c/src/exec/score/include/rtems/score/isr.h deleted file mode 100644 index c24b81eb5b..0000000000 --- a/c/src/exec/score/include/rtems/score/isr.h +++ /dev/null @@ -1,224 +0,0 @@ -/* isr.h - * - * This include file contains all the constants and structures associated - * with the management of processor interrupt levels. This handler - * supports interrupt critical sections, vectoring of user interrupt - * handlers, nesting of interrupts, and manipulating interrupt levels. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __ISR_h -#define __ISR_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The following type defines the control block used to manage - * the interrupt level portion of the status register. - */ - -typedef unsigned32 ISR_Level; - -/* - * The following type defines the type used to manage the vectors. - */ - -typedef unsigned32 ISR_Vector_number; - -/* - * Return type for ISR Handler - */ - -typedef void ISR_Handler; - -/* - * Pointer to an ISR Handler - */ - -typedef ISR_Handler ( *ISR_Handler_entry )( - ISR_Vector_number - ); -/* - * This constant promotes out the number of vectors truly supported by - * the current CPU being used. This is usually the number of distinct vectors - * the cpu can vector. - */ - -#define ISR_NUMBER_OF_VECTORS CPU_INTERRUPT_NUMBER_OF_VECTORS - -/* - * This constant promotes out the highest valid interrupt vector number. - */ - -#define ISR_INTERRUPT_MAXIMUM_VECTOR_NUMBER CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER - -/* - * The following is TRUE if signals have been sent to the currently - * executing thread by an ISR handler. - */ - -SCORE_EXTERN boolean _ISR_Signals_to_thread_executing; - -/* - * The following contains the interrupt service routine nest level. - * When this variable is zero, a thread is executing. - */ - -SCORE_EXTERN unsigned32 _ISR_Nest_level; - -/* - * The following declares the Vector Table. Application - * interrupt service routines are vectored by the ISR Handler via this table. - */ - -SCORE_EXTERN ISR_Handler_entry _ISR_Vector_table[ ISR_NUMBER_OF_VECTORS ]; - -/* - * _ISR_Handler_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this handler. - */ - -void _ISR_Handler_initialization ( void ); - -/* - * _ISR_Disable - * - * DESCRIPTION: - * - * This routine disables all interrupts so that a critical section - * of code can be executing without being interrupted. Upon return, - * the argument _level will contain the previous interrupt mask level. - */ - -#define _ISR_Disable( _level ) \ - _CPU_ISR_Disable( _level ) - -/* - * _ISR_Enable - * - * DESCRIPTION: - * - * This routine enables interrupts to the previous interrupt mask - * LEVEL. It is used at the end of a critical section of code to - * enable interrupts so they can be processed again. - */ - -#define _ISR_Enable( _level ) \ - _CPU_ISR_Enable( _level ) - -/* - * _ISR_Flash - * - * DESCRIPTION: - * - * This routine temporarily enables interrupts to the previous - * interrupt mask level and then disables all interrupts so that - * the caller can continue into the second part of a critical - * section. This routine is used to temporarily enable interrupts - * during a long critical section. It is used in long sections of - * critical code when a point is reached at which interrupts can - * be temporarily enabled. Deciding where to flash interrupts - * in a long critical section is often difficult and the point - * must be selected with care to insure that the critical section - * properly protects itself. - */ - -#define _ISR_Flash( _level ) \ - _CPU_ISR_Flash( _level ) - -/* - * _ISR_Install_vector - * - * DESCRIPTION: - * - * This routine installs new_handler as the interrupt service routine - * for the specified vector. The previous interrupt service routine is - * returned as old_handler. - */ - -#define _ISR_Install_vector( _vector, _new_handler, _old_handler ) \ - _CPU_ISR_install_vector( _vector, _new_handler, _old_handler ) - -/* - * _ISR_Get_level - * - * DESCRIPTION: - * - * This routine returns the current interrupt level. - */ - -#define _ISR_Get_level() \ - _CPU_ISR_Get_level() - -/* - * _ISR_Set_level - * - * DESCRIPTION: - * - * This routine sets the current interrupt level to that specified - * by new_level. The new interrupt level is effective when the - * routine exits. - */ - -#define _ISR_Set_level( _new_level ) \ - _CPU_ISR_Set_level( _new_level ) - -/* - * _ISR_Handler - * - * DESCRIPTION: - * - * This routine is the interrupt dispatcher. ALL interrupts - * are vectored to this routine so that minimal context can be saved - * and setup performed before the application's high-level language - * interrupt service routine is invoked. After the application's - * interrupt service routine returns control to this routine, it - * will determine if a thread dispatch is necessary. If so, it will - * insure that the necessary thread scheduling operations are - * performed when the outermost interrupt service routine exits. - * - * NOTE: Implemented in assembly language. - */ - -void _ISR_Handler( void ); - -/* - * _ISR_Dispatch - * - * DESCRIPTION: - * - * This routine provides a wrapper so that the routine - * _Thread_Dispatch can be invoked when a reschedule is necessary - * at the end of the outermost interrupt service routine. This - * wrapper is necessary to establish the processor context needed - * by _Thread_Dispatch and to save the processor context which is - * corrupted by _Thread_Dispatch. This context typically consists - * of registers which are not preserved across routine invocations. - * - * NOTE: Implemented in assembly language. - */ - -void _ISR_Dispatch( void ); - -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/mpci.h b/c/src/exec/score/include/rtems/score/mpci.h deleted file mode 100644 index fe954c2442..0000000000 --- a/c/src/exec/score/include/rtems/score/mpci.h +++ /dev/null @@ -1,412 +0,0 @@ -/* mpci.h - * - * This include file contains all the constants and structures associated - * with the MPCI layer. It provides mechanisms to utilize packets. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __MPCI_h -#define __MPCI_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include -#include - -/* - * The following constants define the stack size requirements for - * the system threads. - */ - -#define MPCI_RECEIVE_SERVER_STACK_SIZE \ - ( STACK_MINIMUM_SIZE + \ - CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK + \ - _CPU_Table.extra_mpci_receive_server_stack \ - ) - -/* - * The following defines the node number used when a broadcast is desired. - */ - -#define MPCI_ALL_NODES 0 - -/* - * For packets associated with requests that don't already have a timeout, - * use the one specified by this MPCI driver. The value specified by - * the MPCI driver sets an upper limit on how long a remote request - * should take to complete. - */ - -#define MPCI_DEFAULT_TIMEOUT 0xFFFFFFFF - -/* - * The following records define the Multiprocessor Communications - * Interface (MPCI) Table. This table defines the user-provided - * MPCI which is a required part of a multiprocessor system. - * - * For non-blocking local operations that become remote operations, - * we need a timeout. This is a per-driver timeout: default_timeout - */ - -typedef void MPCI_Entry; - -typedef MPCI_Entry ( *MPCI_initialization_entry )( void ); - -typedef MPCI_Entry ( *MPCI_get_packet_entry )( - MP_packet_Prefix ** - ); - -typedef MPCI_Entry ( *MPCI_return_packet_entry )( - MP_packet_Prefix * - ); - -typedef MPCI_Entry ( *MPCI_send_entry )( - unsigned32, - MP_packet_Prefix * - ); - -typedef MPCI_Entry ( *MPCI_receive_entry )( - MP_packet_Prefix ** - ); - -typedef struct { - unsigned32 default_timeout; /* in ticks */ - unsigned32 maximum_packet_size; - MPCI_initialization_entry initialization; - MPCI_get_packet_entry get_packet; - MPCI_return_packet_entry return_packet; - MPCI_send_entry send_packet; - MPCI_receive_entry receive_packet; -} MPCI_Control; - -/* - * The following defines the type for packet processing routines - * invoked by the MPCI Receive server. - */ - -typedef void (*MPCI_Packet_processor)( MP_packet_Prefix * ); - -/* - * The following enumerated type defines the list of - * internal MP operations. - */ - -typedef enum { - MPCI_PACKETS_SYSTEM_VERIFY = 0 -} MPCI_Internal_Remote_operations; - -/* - * The following data structure defines the packet used to perform - * remote event operations. - */ - -typedef struct { - MP_packet_Prefix Prefix; - MPCI_Internal_Remote_operations operation; - unsigned32 maximum_nodes; - unsigned32 maximum_global_objects; -} MPCI_Internal_packet; - -/* - * This is the core semaphore which the MPCI Receive Server blocks on. - */ - -SCORE_EXTERN CORE_semaphore_Control _MPCI_Semaphore; -/* - * The following thread queue is used to maintain a list of tasks - * which currently have outstanding remote requests. - */ - -SCORE_EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads; - -/* - * The following define the internal pointers to the user's - * configuration information. - */ - -SCORE_EXTERN MPCI_Control *_MPCI_table; - -/* - * The following points to the MPCI Receive Server. - */ - -SCORE_EXTERN Thread_Control *_MPCI_Receive_server_tcb; - -/* - * The following table contains the process packet routines provided - * by each object that supports MP operations. - */ - -SCORE_EXTERN MPCI_Packet_processor - _MPCI_Packet_processors[MP_PACKET_CLASSES_LAST+1]; - -/* - * _MPCI_Handler_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this handler. - */ - -void _MPCI_Handler_initialization( - MPCI_Control *users_mpci_table, - unsigned32 timeout_status -); - -/* - * _MPCI_Create_server - * - * DESCRIPTION: - * - * This routine creates the packet receive server used in MP systems. - */ - -void _MPCI_Create_server( void ); - -/* - * _MPCI_Initialization - * - * DESCRIPTION: - * - * This routine initializes the MPCI driver by - * invoking the user provided MPCI initialization callout. - */ - -void _MPCI_Initialization ( void ); - -/* - * _MPCI_Register_packet_processor - * - * DESCRIPTION: - * - * This routine registers the MPCI packet processor for the - * designated object class. - */ - -void _MPCI_Register_packet_processor( - MP_packet_Classes the_class, - MPCI_Packet_processor the_packet_processor - -); - -/* - * _MPCI_Get_packet - * - * DESCRIPTION: - * - * This function obtains a packet by invoking the user provided - * MPCI get packet callout. - */ - -MP_packet_Prefix *_MPCI_Get_packet ( void ); - -/* - * _MPCI_Return_packet - * - * DESCRIPTION: - * - * This routine returns a packet by invoking the user provided - * MPCI return packet callout. - */ - -void _MPCI_Return_packet ( - MP_packet_Prefix *the_packet -); - -/* - * _MPCI_Send_process_packet - * - * DESCRIPTION: - * - * This routine sends a process packet by invoking the user provided - * MPCI send callout. - */ - -void _MPCI_Send_process_packet ( - unsigned32 destination, - MP_packet_Prefix *the_packet -); - -/* - * _MPCI_Send_request_packet - * - * DESCRIPTION: - * - * This routine sends a request packet by invoking the user provided - * MPCI send callout. - */ - -unsigned32 _MPCI_Send_request_packet ( - unsigned32 destination, - MP_packet_Prefix *the_packet, - States_Control extra_state -); - -/* - * _MPCI_Send_response_packet - * - * DESCRIPTION: - * - * This routine sends a response packet by invoking the user provided - * MPCI send callout. - */ - -void _MPCI_Send_response_packet ( - unsigned32 destination, - MP_packet_Prefix *the_packet -); - -/* - * _MPCI_Receive_packet - * - * DESCRIPTION: - * - * This routine receives a packet by invoking the user provided - * MPCI receive callout. - */ - -MP_packet_Prefix *_MPCI_Receive_packet ( void ); - -/* - * _MPCI_Process_response - * - * DESCRIPTION: - * - * This routine obtains a packet by invoking the user provided - * MPCI get packet callout. - */ - -Thread_Control *_MPCI_Process_response ( - MP_packet_Prefix *the_packet -); - -/*PAGE - * - * _MPCI_Receive_server - * - */ - -Thread _MPCI_Receive_server( - unsigned32 ignored -); - -/*PAGE - * - * _MPCI_Announce - * - * DESCRIPTION: - * - * XXX - */ - -void _MPCI_Announce ( void ); - -/* - * _MPCI_Internal_packets_Send_process_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * process operation can be performed on another node. - */ - -void _MPCI_Internal_packets_Send_process_packet ( - MPCI_Internal_Remote_operations operation -); - -/* - * _MPCI_Internal_packets_Send_request_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive operation can be initiated on another node. - * - * This routine is not needed since there are no request - * packets to be sent by this manager. - */ - -/* - * _MPCI_Internal_packets_Send_response_packet - * - * DESCRIPTION: - * - * This routine performs a remote procedure call so that a - * directive can be performed on another node. - * - * This routine is not needed since there are no response - * packets to be sent by this manager. - */ - -/* - * - * _MPCI_Internal_packets_Process_packet - * - * DESCRIPTION: - * - * This routine performs the actions specific to this package for - * the request from another node. - */ - -void _MPCI_Internal_packets_Process_packet ( - MP_packet_Prefix *the_packet_prefix -); - -/* - * _MPCI_Internal_packets_Send_object_was_deleted - * - * DESCRIPTION: - * - * This routine is invoked indirectly by the thread queue - * when a proxy has been removed from the thread queue and - * the remote node must be informed of this. - * - * This routine is not needed since there are no objects - * deleted by this manager. - */ - -/* - * _MPCI_Internal_packets_Send_extract_proxy - * - * DESCRIPTION: - * - * This routine is invoked when a task is deleted and it - * has a proxy which must be removed from a thread queue and - * the remote node must be informed of this. - * - * This routine is not needed since there are no objects - * deleted by this manager. - */ - -/* - * _MPCI_Internal_packets_Get_packet - * - * DESCRIPTION: - * - * This routine is used to obtain a internal threads mp packet. - */ - - MPCI_Internal_packet *_MPCI_Internal_packets_Get_packet ( void ); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/mppkt.h b/c/src/exec/score/include/rtems/score/mppkt.h deleted file mode 100644 index 3bd4282d30..0000000000 --- a/c/src/exec/score/include/rtems/score/mppkt.h +++ /dev/null @@ -1,101 +0,0 @@ -/* mppkt.h - * - * This package is the specification for the Packet Handler. - * This handler defines the basic packet and provides - * mechanisms to utilize packets based on this prefix. - * Packets are the fundamental basis for messages passed between - * nodes in an MP system. - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __MP_PACKET_h -#define __MP_PACKET_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -/* - * The following enumerated type defines the packet classes. - * - * NOTE: In general, each class corresponds to a manager - * which supports global operations. Each manager - * defines the set of supported operations. - */ - -typedef enum { - MP_PACKET_MPCI_INTERNAL = 0, - MP_PACKET_TASKS = 1, - MP_PACKET_MESSAGE_QUEUE = 2, - MP_PACKET_SEMAPHORE = 3, - MP_PACKET_PARTITION = 4, - MP_PACKET_REGION = 5, - MP_PACKET_EVENT = 6, - MP_PACKET_SIGNAL = 7 -} MP_packet_Classes; - -#define MP_PACKET_CLASSES_FIRST MP_PACKET_MPCI_INTERNAL -#define MP_PACKET_CLASSES_LAST MP_PACKET_SIGNAL - -/* - * The following record contains the prefix for every packet - * passed between nodes in an MP system. - * - * NOTE: This structure is padded to insure that anything - * following it is on a 16 byte boundary. This is - * the most stringent structure alignment rule - * encountered yet (i960CA). - */ - -typedef struct { - MP_packet_Classes the_class; - Objects_Id id; - Objects_Id source_tid; - Priority_Control source_priority; - unsigned32 return_code; - unsigned32 length; - unsigned32 to_convert; - Watchdog_Interval timeout; -} MP_packet_Prefix; - -/* - * An MPCI must support packets of at least this size. - */ - -#define MP_PACKET_MINIMUM_PACKET_SIZE 64 - -/* - * The following constant defines the number of unsigned32's - * in a packet which must be converted to native format in a - * heterogeneous system. In packets longer than - * MP_PACKET_MINIMUN_HETERO_CONVERSION unsigned32's, some of the "extra" data - * may a user message buffer which is not automatically endian swapped. - */ - -#define MP_PACKET_MINIMUN_HETERO_CONVERSION \ - ( sizeof( MP_packet_Prefix ) / sizeof( unsigned32 ) ) - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/object.h b/c/src/exec/score/include/rtems/score/object.h deleted file mode 100644 index 9dc53423d4..0000000000 --- a/c/src/exec/score/include/rtems/score/object.h +++ /dev/null @@ -1,397 +0,0 @@ -/* object.h - * - * This include file contains all the constants and structures associated - * with the Object Handler. This Handler provides mechanisms which - * can be used to initialize and manipulate all objects which have - * ids. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __OBJECTS_h -#define __OBJECTS_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* - * The following type defines the control block used to manage - * object names. - */ - -typedef void * Objects_Name; - -/* - * Space for object names is allocated in multiples of this. - * - * NOTE: Must be a power of 2. Matches the name manipulation routines. - */ - -#define OBJECTS_NAME_ALIGNMENT sizeof( unsigned32 ) - -/* - * Functions which compare names are prototyped like this. - */ - -typedef boolean (*Objects_Name_comparators)( - void * /* name_1 */, - void * /* name_2 */, - unsigned32 /* length */ -); - -/* - * The following type defines the control block used to manage - * object IDs. The format is as follows (0=LSB): - * - * Bits 0 .. 15 = index - * Bits 16 .. 25 = node - * Bits 26 .. 31 = class - */ - -typedef unsigned32 Objects_Id; - -#define OBJECTS_INDEX_START_BIT 0 -#define OBJECTS_NODE_START_BIT 16 -#define OBJECTS_CLASS_START_BIT 26 - -#define OBJECTS_INDEX_MASK 0x0000ffff -#define OBJECTS_NODE_MASK 0x03ff0000 -#define OBJECTS_CLASS_MASK 0xfc000000 - -#define OBJECTS_INDEX_VALID_BITS 0x0000ffff -#define OBJECTS_NODE_VALID_BITS 0x000003ff -#define OBJECTS_CLASS_VALID_BITS 0x000000cf - -/* - * This enumerated type is used in the class field of the object ID. - */ - -typedef enum { - OBJECTS_NO_CLASS = 0, - OBJECTS_INTERNAL_THREADS = 1, - OBJECTS_RTEMS_TASKS = 2, - OBJECTS_POSIX_THREADS = 3, - OBJECTS_RTEMS_TIMERS = 4, - OBJECTS_RTEMS_SEMAPHORES = 5, - OBJECTS_RTEMS_MESSAGE_QUEUES = 6, - OBJECTS_RTEMS_PARTITIONS = 7, - OBJECTS_RTEMS_REGIONS = 8, - OBJECTS_RTEMS_PORTS = 9, - OBJECTS_RTEMS_PERIODS = 10, - OBJECTS_RTEMS_EXTENSIONS = 11, - OBJECTS_POSIX_KEYS = 12, - OBJECTS_POSIX_INTERRUPTS = 13, - OBJECTS_POSIX_MESSAGE_QUEUES = 14, - OBJECTS_POSIX_MUTEXES = 15, - OBJECTS_POSIX_SEMAPHORES = 16, - OBJECTS_POSIX_CONDITION_VARIABLES = 17 -} Objects_Classes; - -#define OBJECTS_CLASSES_FIRST OBJECTS_NO_CLASS -#define OBJECTS_CLASSES_LAST OBJECTS_POSIX_CONDITION_VARIABLES -#define OBJECTS_CLASSES_FIRST_THREAD_CLASS OBJECTS_INTERNAL_THREADS -#define OBJECTS_CLASSES_LAST_THREAD_CLASS OBJECTS_POSIX_THREADS - -/* - * This enumerated type lists the locations which may be returned - * by _Objects_Get. These codes indicate the success of locating - * an object with the specified ID. - */ - -typedef enum { - OBJECTS_LOCAL = 0, /* object is local */ - OBJECTS_REMOTE = 1, /* object is remote */ - OBJECTS_ERROR = 2 /* id was invalid */ -} Objects_Locations; - -/* - * The following defines the Object Control Block used to manage - * each object local to this node. - */ - -typedef struct { - Chain_Node Node; - Objects_Id id; - Objects_Name name; -} Objects_Control; - -/* - * The following defines the structure for the information used to - * manage each class of objects. - */ - -typedef struct { - Objects_Classes the_class; /* Class of this object */ - Objects_Id minimum_id; /* minimum valid id of this type */ - Objects_Id maximum_id; /* maximum valid id of this type */ - unsigned32 maximum; /* maximum number of objects */ - Objects_Control **local_table; /* table of local object pointers */ - Objects_Name *name_table; /* table of local object names */ - Chain_Control *global_table; /* pointer to global table */ - Chain_Control Inactive; /* chain of inactive ctl blocks */ - boolean is_string; /* TRUE if names are strings */ - unsigned32 name_length; /* maximum length of names */ - boolean is_thread; /* TRUE if these are threads */ - /* irregardless of API */ -} Objects_Information; - -/* - * The following defines the data storage which contains the - * node number of the local node. - */ - -SCORE_EXTERN unsigned32 _Objects_Local_node; -SCORE_EXTERN unsigned32 _Objects_Maximum_nodes; - -/* - * The following is the list of information blocks for each object - * class. From the ID, we can go to one of these information blocks, - * and obtain a pointer to the appropriate object control block. - */ - -SCORE_EXTERN Objects_Information - *_Objects_Information_table[OBJECTS_CLASSES_LAST + 1]; - -/* - * The following defines the constant which may be used - * with _Objects_Get to manipulate the calling task. - * - */ - -#define OBJECTS_ID_OF_SELF ((Objects_Id) 0) - -/* - * The following define the constants which may be used in name searches. - */ - -#define OBJECTS_SEARCH_ALL_NODES 0 -#define OBJECTS_SEARCH_OTHER_NODES 0x7FFFFFFE -#define OBJECTS_SEARCH_LOCAL_NODE 0x7FFFFFFF -#define OBJECTS_WHO_AM_I 0 - -/* - * Parameters and return id's for _Objects_Get_next - */ - -#define OBJECTS_ID_INITIAL_INDEX (0) -#define OBJECTS_ID_FINAL_INDEX (0xffff) - -#define OBJECTS_ID_INITIAL(_class, _node) \ - _Objects_Build_id( (_class), (_node), OBJECTS_ID_INITIAL_INDEX ) - -#define OBJECTS_ID_FINAL ((Objects_Id)~0) - -/* - * _Objects_Handler_initialization - * - * DESCRIPTION: - * - * This function performs the initialization necessary for this handler. - * - */ - -void _Objects_Handler_initialization( - unsigned32 node, - unsigned32 maximum_nodes, - unsigned32 maximum_global_objects -); - -/* - * _Objects_Initialize_information - * - * DESCRIPTION: - * - * This function initializes an object class information record. - * SUPPORTS_GLOBAL is TRUE if the object class supports global - * objects, and FALSE otherwise. Maximum indicates the number - * of objects required in this class and size indicates the size - * in bytes of each control block for this object class. The - * name length and string designator are also set. In addition, - * the class may be a task, therefore this information is also included. - */ - -void _Objects_Initialize_information ( - Objects_Information *information, - Objects_Classes the_class, - boolean supports_global, - unsigned32 maximum, - unsigned32 size, - boolean is_string, - unsigned32 maximum_name_length, - boolean is_task -); - -/* - * _Objects_Clear_name - * - * DESCRIPTION: - * - * XXX - */ - -void _Objects_Clear_name( - void *name, - unsigned32 length -); - -/* - * _Objects_Copy_name_string - * - * DESCRIPTION: - * - * XXX - */ - -void _Objects_Copy_name_string( - void *source, - void *destination -); - -/* - * _Objects_Copy_name_raw - * - * DESCRIPTION: - * - * XXX - */ - -void _Objects_Copy_name_raw( - void *source, - void *destination, - unsigned32 length -); - -/* - * _Objects_Compare_name_string - * - * DESCRIPTION: - * - * XXX - */ - -boolean _Objects_Compare_name_string( - void *name_1, - void *name_2, - unsigned32 length -); - -/* - * _Objects_Compare_name_raw - * - * DESCRIPTION: - * - * XXX - */ - -boolean _Objects_Compare_name_raw( - void *name_1, - void *name_2, - unsigned32 length -); -/* - * _Objects_Name_to_id - * - * DESCRIPTION: - * - * This function implements the common portion of the object - * identification directives. This directive returns the object - * id associated with name. If more than one object of this class - * is named name, then the object to which the id belongs is - * arbitrary. Node indicates the extent of the search for the - * id of the object named name. If the object class supports global - * objects, then the search can be limited to a particular node - * or allowed to encompass all nodes. - * - */ - -typedef enum { - OBJECTS_SUCCESSFUL, - OBJECTS_INVALID_NAME, - OBJECTS_INVALID_NODE -} Objects_Name_to_id_errors; - -#define OBJECTS_NAME_ERRORS_FIRST OBJECTS_SUCCESSFUL -#define OBJECTS_NAME_ERRORS_LAST OBJECTS_INVALID_NODE - -Objects_Name_to_id_errors _Objects_Name_to_id( - Objects_Information *information, - Objects_Name name, - unsigned32 node, - Objects_Id *id -); - -/* - * _Objects_Get - * - * DESCRIPTION: - * - * This function maps object ids to object control blocks. - * If id corresponds to a local object, then it returns - * the_object control pointer which maps to id and location - * is set to OBJECTS_LOCAL. If the object class supports global - * objects and the object id is global and resides on a remote - * node, then location is set to OBJECTS_REMOTE, and the_object - * is undefined. Otherwise, location is set to OBJECTS_ERROR - * and the_object is undefined. - * - */ - -Objects_Control *_Objects_Get ( - Objects_Information *information, - Objects_Id id, - Objects_Locations *location -); - -/* - * _Objects_Get_next - * - * DESCRIPTION: - * - * Like _Objects_Get, but is used to find "next" open object. - * - */ - -Objects_Control *_Objects_Get_next( - Objects_Information *information, - Objects_Id id, - Objects_Locations *location_p, - Objects_Id *next_id_p -); - -/* - * _Objects_Get_information - * - * DESCRIPTION: - * - * Returns the information control block for the class of objects - * corresponding to this id. - */ - -Objects_Information *_Objects_Get_information( - Objects_Id id -); - -/* - * Pieces of object.inl are promoted out to the user - */ - -#include -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/objectmp.h b/c/src/exec/score/include/rtems/score/objectmp.h deleted file mode 100644 index 178b5d1c04..0000000000 --- a/c/src/exec/score/include/rtems/score/objectmp.h +++ /dev/null @@ -1,152 +0,0 @@ -/* objectmp.h - * - * This include file contains all the constants and structures associated - * with the manipulation of Global RTEMS Objects. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_OBJECTS_MP_h -#define __RTEMS_OBJECTS_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This defines the Global Object Control Block used to manage - * objects resident on other nodes. - */ - -typedef struct { - Objects_Control Object; - unsigned32 name; /* XXX broken but works */ - /* XXX If any API is MP with variable length names .. BOOM!!!! */ -} Objects_MP_Control; - -/* - * _Objects_MP_Handler_initialization - * - * DESCRIPTION: - * - * This routine intializes the inactive global object chain - * based on the maximum number of global objects configured. - */ - -void _Objects_MP_Handler_initialization ( - unsigned32 node, - unsigned32 maximum_nodes, - unsigned32 maximum_global_objects -); - -/*PAGE - * - * _Objects_MP_Open - * - * DESCRIPTION: - * - * This routine place the specified global object in the - * specified information table. - */ - -void _Objects_MP_Open ( - Objects_Information *information, - Objects_MP_Control *the_global_object, - unsigned32 the_name, /* XXX -- wrong for variable */ - Objects_Id the_id -); - -/* - * _Objects_MP_Allocate_and_open - * - * DESCRIPTION: - * - * This routine allocates a global object control block - * and places it in the specified information table. If the - * allocation fails, then is_fatal_error determines the - * error processing actions taken. - */ - -boolean _Objects_MP_Allocate_and_open ( - Objects_Information *information, - unsigned32 the_name, /* XXX -- wrong for variable length */ - Objects_Id the_id, - boolean is_fatal_error -); - -/* - * _Objects_MP_Close - * - * DESCRIPTION: - * - * This routine removes a global object from the specified - * information table and deallocates the global object control block. - */ - -void _Objects_MP_Close ( - Objects_Information *information, - Objects_Id the_id -); - -/* - * _Objects_MP_Global_name_search - * - * DESCRIPTION: - * - * This routine looks for the object with the_name in the global - * object tables indicated by information. It returns the ID of the - * object with that name if one is found. - */ - -Objects_Name_to_id_errors _Objects_MP_Global_name_search ( - Objects_Information *information, - Objects_Name the_name, - unsigned32 nodes_to_search, - Objects_Id *the_id -); - -/* - * _Objects_MP_Is_remote - * - * DESCRIPTION: - * - * This function searches the Global Object Table managed - * by information for the object indicated by ID. If the object - * is found, then location is set to objects_remote, otherwise - * location is set to objects_error. In both cases, the_object - * is undefined. - */ - -void _Objects_MP_Is_remote ( - Objects_Information *information, - Objects_Id the_id, - Objects_Locations *location, - Objects_Control **the_object -); - -/* - * The following chain header is used to manage the set of - * inactive global object control blocks. - */ - -SCORE_EXTERN unsigned32 _Objects_MP_Maximum_global_objects; -SCORE_EXTERN Chain_Control _Objects_MP_Inactive_global_objects; - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/priority.h b/c/src/exec/score/include/rtems/score/priority.h deleted file mode 100644 index a17870d868..0000000000 --- a/c/src/exec/score/include/rtems/score/priority.h +++ /dev/null @@ -1,97 +0,0 @@ -/* priority.h - * - * This include file contains all thread priority manipulation routines. - * This Handler provides mechanisms which can be used to - * initialize and manipulate thread priorities. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __PRIORITY_h -#define __PRIORITY_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The following type defines the control block used to manage - * thread priorities. - * - * NOTE: Priority 0 is reserved for internal threads only. - */ - -typedef unsigned32 Priority_Control; - -#define PRIORITY_MINIMUM 0 /* highest thread priority */ -#define PRIORITY_MAXIMUM 255 /* lowest thread priority */ - -/* - * The following record defines the information associated with - * each thread to manage its interaction with the priority bit maps. - */ - -typedef struct { - Priority_Bit_map_control *minor; /* addr of minor bit map slot */ - Priority_Bit_map_control ready_major; /* priority bit map ready mask */ - Priority_Bit_map_control ready_minor; /* priority bit map ready mask */ - Priority_Bit_map_control block_major; /* priority bit map block mask */ - Priority_Bit_map_control block_minor; /* priority bit map block mask */ -} Priority_Information; - -/* - * The following data items are the priority bit map. - * Each of the sixteen bits used in the _Priority_Major_bit_map is - * associated with one of the sixteen entries in the _Priority_Bit_map. - * Each bit in the _Priority_Bit_map indicates whether or not there are - * threads ready at a particular priority. The mapping of - * individual priority levels to particular bits is processor - * dependent as is the value of each bit used to indicate that - * threads are ready at that priority. - */ - -SCORE_EXTERN volatile Priority_Bit_map_control _Priority_Major_bit_map; -SCORE_EXTERN Priority_Bit_map_control - _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT; - -/* - * The definition of the Priority_Bit_map_control type is CPU dependent. - * - */ - -/* - * Priority Bitfield Manipulation Routines - * - * NOTE: - * - * These may simply be pass throughs to CPU dependent routines. - */ - -#if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE ) - -#define _Priority_Mask( _bit_number ) \ - _CPU_Priority_Mask( _bit_number ) - -#define _Priority_Bits_index( _priority ) \ - _CPU_Priority_bits_index( _priority ) - -#endif - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/stack.h b/c/src/exec/score/include/rtems/score/stack.h deleted file mode 100644 index bf72782b42..0000000000 --- a/c/src/exec/score/include/rtems/score/stack.h +++ /dev/null @@ -1,50 +0,0 @@ -/* stack.h - * - * This include file contains all information about the thread - * Stack Handler. This Handler provides mechanisms which can be used to - * initialize and utilize stacks. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __STACK_h -#define __STACK_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The following constant defines the minimum stack size which every - * thread must exceed. - */ - -#define STACK_MINIMUM_SIZE CPU_STACK_MINIMUM_SIZE - -/* - * The following defines the control block used to manage each stack. - */ - -typedef struct { - unsigned32 size; /* stack size */ - void *area; /* low memory addr of stack */ -} Stack_Control; - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/states.h b/c/src/exec/score/include/rtems/score/states.h deleted file mode 100644 index 8e2dce52c6..0000000000 --- a/c/src/exec/score/include/rtems/score/states.h +++ /dev/null @@ -1,84 +0,0 @@ -/* states.h - * - * This include file contains thread execution state information. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_STATES_h -#define __RTEMS_STATES_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The following type defines the control block used to manage a - * thread's state. - */ - -typedef unsigned32 States_Control; - -/* - * The following constants define the individual states which may be - * be used to compose and manipulate a thread's state. - */ - -#define STATES_ALL_SET 0xfffff /* all states */ -#define STATES_READY 0x00000 /* ready to run */ -#define STATES_DORMANT 0x00001 /* created not started */ -#define STATES_SUSPENDED 0x00002 /* waiting for resume */ -#define STATES_TRANSIENT 0x00004 /* in transition */ -#define STATES_DELAYING 0x00008 /* wait for timeout */ -#define STATES_WAITING_FOR_TIME 0x00010 /* wait for TOD */ -#define STATES_WAITING_FOR_BUFFER 0x00020 -#define STATES_WAITING_FOR_SEGMENT 0x00040 -#define STATES_WAITING_FOR_MESSAGE 0x00080 -#define STATES_WAITING_FOR_EVENT 0x00100 -#define STATES_WAITING_FOR_SEMAPHORE 0x00200 -#define STATES_WAITING_FOR_MUTEX 0x00400 -#define STATES_WAITING_FOR_CONDITION_VARIABLE 0x00800 -#define STATES_WAITING_FOR_JOIN_AT_EXIT 0x01000 -#define STATES_WAITING_FOR_RPC_REPLY 0x02000 -#define STATES_WAITING_FOR_PERIOD 0x04000 -#define STATES_WAITING_FOR_SIGNAL 0x08000 -#define STATES_INTERRUPTIBLE_BY_SIGNAL 0x10000 - -#define STATES_LOCALLY_BLOCKED ( STATES_WAITING_FOR_BUFFER | \ - STATES_WAITING_FOR_SEGMENT | \ - STATES_WAITING_FOR_MESSAGE | \ - STATES_WAITING_FOR_SEMAPHORE | \ - STATES_WAITING_FOR_MUTEX | \ - STATES_WAITING_FOR_CONDITION_VARIABLE | \ - STATES_WAITING_FOR_JOIN_AT_EXIT | \ - STATES_WAITING_FOR_SIGNAL ) - -#define STATES_WAITING_ON_THREAD_QUEUE \ - ( STATES_LOCALLY_BLOCKED | \ - STATES_WAITING_FOR_RPC_REPLY ) - -#define STATES_BLOCKED ( STATES_DELAYING | \ - STATES_WAITING_FOR_TIME | \ - STATES_WAITING_FOR_PERIOD | \ - STATES_WAITING_FOR_EVENT | \ - STATES_WAITING_ON_THREAD_QUEUE | \ - STATES_INTERRUPTIBLE_BY_SIGNAL ) - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/sysstate.h b/c/src/exec/score/include/rtems/score/sysstate.h deleted file mode 100644 index 1e38549db7..0000000000 --- a/c/src/exec/score/include/rtems/score/sysstate.h +++ /dev/null @@ -1,66 +0,0 @@ -/* sysstates.h - * - * This include file contains information regarding the system state. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_SYSTEM_STATE_h -#define __RTEMS_SYSTEM_STATE_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* types */ - -/* enumerated constants */ - -/* - * The following type defines the possible system states. - */ - -typedef enum { - SYSTEM_STATE_BEFORE_INITIALIZATION, /* start -> end of 1st init part */ - SYSTEM_STATE_BEFORE_MULTITASKING, /* end of 1st -> beginning of 2nd */ - SYSTEM_STATE_BEGIN_MULTITASKING, /* just before multitasking starts */ - SYSTEM_STATE_UP, /* normal operation */ - SYSTEM_STATE_FAILED /* fatal error occurred */ -} System_state_Codes; - -#define SYSTEM_STATE_CODES_FIRST SYSTEM_STATE_BEFORE_INITIALIZATION -#define SYSTEM_STATE_CODES_LAST SYSTEM_STATE_FAILED - -/* - * The following variable indicates whether or not this is - * an multiprocessing system. - */ - -SCORE_EXTERN boolean _System_state_Is_multiprocessing; - -/* - * The following variable contains the current system state. - */ - -SCORE_EXTERN System_state_Codes _System_state_Current; - -/* - * Make it possible for the application to get the system state information. - */ - -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/thread.h b/c/src/exec/score/include/rtems/score/thread.h deleted file mode 100644 index c0c59a5f74..0000000000 --- a/c/src/exec/score/include/rtems/score/thread.h +++ /dev/null @@ -1,623 +0,0 @@ -/* thread.h - * - * This include file contains all constants and structures associated - * with the thread control block. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __THREAD_h -#define __THREAD_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * The following defines the "return type" of a thread. - */ - -typedef void Thread; - -/* - * The following defines the ways in which the entry point for a - * thread can be invoked. Basically, it can be passed any - * combination/permutation of a pointer and an unsigned32 value. - * - * NOTE: For now, we are ignoring the return type. - */ - -typedef enum { - THREAD_START_NUMERIC, - THREAD_START_POINTER, - THREAD_START_BOTH_POINTER_FIRST, - THREAD_START_BOTH_NUMERIC_FIRST -} Thread_Start_types; - -typedef Thread ( *Thread_Entry )( ); - -/* - * The following lists the algorithms used to manage the thread cpu budget. - * - * Reset Timeslice: At each context switch, reset the time quantum. - * Exhaust Timeslice: Only reset the quantum once it is consumed. - * Callout: Execute routine when budget is consumed. - */ - -typedef enum { - THREAD_CPU_BUDGET_ALGORITHM_NONE, - THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE, - THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE, - THREAD_CPU_BUDGET_ALGORITHM_CALLOUT -} Thread_CPU_budget_algorithms; - -typedef struct Thread_Control_struct Thread_Control; - -typedef void (*Thread_CPU_budget_algorithm_callout )( Thread_Control * ); - -/* - * The following structure contains the information which defines - * the starting state of a thread. - */ - -typedef struct { - Thread_Entry entry_point; /* starting thread address */ - Thread_Start_types prototype; /* how task is invoked */ - void *pointer_argument; /* pointer argument */ - unsigned32 numeric_argument; /* numeric argument */ - /* initial execution modes */ - boolean is_preemptible; - Thread_CPU_budget_algorithms budget_algorithm; - Thread_CPU_budget_algorithm_callout budget_callout; - unsigned32 isr_level; - Priority_Control initial_priority; /* initial priority */ - boolean core_allocated_stack; - Stack_Control Initial_stack; /* stack information */ - void *fp_context; /* initial FP context area address */ - void *stack; /* initial FP context area address */ -} Thread_Start_information; - -/* - * The following structure contains the information necessary to manage - * a thread which it is waiting for a resource. - */ - -#define THREAD_STATUS_PROXY_BLOCKING 0x1111111 - -typedef struct { - Objects_Id id; /* waiting on this object */ - unsigned32 count; /* "generic" fields to be used */ - void *return_argument; /* when blocking */ - void *return_argument_1; - unsigned32 option; - - /* - * NOTE: The following assumes that all API return codes can be - * treated as an unsigned32. - */ - unsigned32 return_code; /* status for thread awakened */ - - Chain_Control Block2n; /* 2 - n priority blocked chain */ - Thread_queue_Control *queue; /* pointer to thread queue */ -} Thread_Wait_information; - -/* - * The following defines the control block used to manage - * each thread proxy. - * - * NOTE: It is critical that proxies and threads have identical - * memory images for the shared part. - */ - -typedef struct { - Objects_Control Object; - States_Control current_state; - Priority_Control current_priority; - Priority_Control real_priority; - unsigned32 resource_count; - Thread_Wait_information Wait; - Watchdog_Control Timer; - MP_packet_Prefix *receive_packet; - /****************** end of common block ********************/ - Chain_Node Active; -} Thread_Proxy_control; - - -/* - * The following record defines the control block used - * to manage each thread. - * - * NOTE: It is critical that proxies and threads have identical - * memory images for the shared part. - */ - -typedef enum { - THREAD_API_RTEMS, - THREAD_API_POSIX -} Thread_APIs; - -#define THREAD_API_FIRST THREAD_API_RTEMS -#define THREAD_API_LAST THREAD_API_POSIX - -struct Thread_Control_struct { - Objects_Control Object; - States_Control current_state; - Priority_Control current_priority; - Priority_Control real_priority; - unsigned32 resource_count; - Thread_Wait_information Wait; - Watchdog_Control Timer; - MP_packet_Prefix *receive_packet; - /****************** end of common block ********************/ - boolean is_global; - boolean do_post_task_switch_extension; - - boolean is_preemptible; - unsigned32 cpu_time_budget; - Thread_CPU_budget_algorithms budget_algorithm; - Thread_CPU_budget_algorithm_callout budget_callout; - - Chain_Control *ready; - Priority_Information Priority_map; - Thread_Start_information Start; - Context_Control Registers; - void *fp_context; - void *API_Extensions[ THREAD_API_LAST + 1 ]; - void **extensions; -}; - -/* - * The following constants define the stack size requirements for - * the idle thread. - */ - - -#define THREAD_IDLE_STACK_SIZE STACK_MINIMUM_SIZE - -/* - * The following defines the information control block used to - * manage this class of objects. - */ - -SCORE_EXTERN Objects_Information _Thread_Internal_information; - -/* - * The following define the thread control pointers used to access - * and manipulate the idle thread. - */ - -SCORE_EXTERN Thread_Control *_Thread_Idle; - -/* - * The following context area contains the context of the "thread" - * which invoked the start multitasking routine. This context is - * restored as the last action of the stop multitasking routine. Thus - * control of the processor can be returned to the environment - * which initiated the system. - */ - -SCORE_EXTERN Context_Control _Thread_BSP_context; - -/* - * The following declares the dispatch critical section nesting - * counter which is used to prevent context switches at inopportune - * moments. - */ - -SCORE_EXTERN unsigned32 _Thread_Dispatch_disable_level; - -/* - * If this is non-zero, then the post-task switch extension - * is run regardless of the state of the per thread flag. - */ - -SCORE_EXTERN unsigned32 _Thread_Do_post_task_switch_extension; - -/* - * The following holds how many user extensions are in the system. This - * is used to determine how many user extension data areas to allocate - * per thread. - */ - -SCORE_EXTERN unsigned32 _Thread_Maximum_extensions; - -/* - * The following is used to manage the length of a timeslice quantum. - */ - -SCORE_EXTERN unsigned32 _Thread_Ticks_per_timeslice; - -/* - * The following points to the array of FIFOs used to manage the - * set of ready threads. - */ - -SCORE_EXTERN Chain_Control *_Thread_Ready_chain; - -/* - * The following points to the thread which is currently executing. - * This thread is implicitly manipulated by numerous directives. - */ - -SCORE_EXTERN Thread_Control *_Thread_Executing; - -/* - * The following points to the highest priority ready thread - * in the system. Unless the current thread is not preemptibl, - * then this thread will be context switched to when the next - * dispatch occurs. - */ - -SCORE_EXTERN Thread_Control *_Thread_Heir; - -/* - * The following points to the thread whose floating point - * context is currently loaded. - */ - -SCORE_EXTERN Thread_Control *_Thread_Allocated_fp; - -/* - * _Thread_Handler_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this handler. - */ - -void _Thread_Handler_initialization ( - unsigned32 ticks_per_timeslice, - unsigned32 maximum_extensions, - unsigned32 maximum_proxies -); - -/* - * _Thread_Create_idle - * - * DESCRIPTION: - * - * This routine creates the idle thread. - * - * WARNING!! No thread should be created before this one. - */ - -void _Thread_Create_idle( void ); - -/* - * _Thread_Start_multitasking - * - * DESCRIPTION: - * - * This routine initiates multitasking. It is invoked only as - * part of initialization and its invocation is the last act of - * the non-multitasking part of the system initialization. - */ - -void _Thread_Start_multitasking( void ); - -/* - * _Thread_Dispatch - * - * DESCRIPTION: - * - * This routine is responsible for transferring control of the - * processor from the executing thread to the heir thread. As part - * of this process, it is responsible for the following actions: - * - * + saving the context of the executing thread - * + restoring the context of the heir thread - * + dispatching any signals for the resulting executing thread - */ - -void _Thread_Dispatch( void ); - -/* - * _Thread_Initialize - * - * DESCRIPTION: - * - * XXX - * - * NOTES: - * - * If stack_area is NULL, it is allocated from the workspace. - * - * If the stack is allocated from the workspace, then it is guaranteed to be - * of at least minimum size. - */ - -boolean _Thread_Initialize( - Objects_Information *information, - Thread_Control *the_thread, - void *stack_area, - unsigned32 stack_size, - boolean is_fp, - Priority_Control priority, - boolean is_preemptible, - Thread_CPU_budget_algorithms budget_algorithm, - Thread_CPU_budget_algorithm_callout budget_callout, - unsigned32 isr_level, - Objects_Name name -); - -/* - * _Thread_Start - * - * DESCRIPTION: - * - * XXX - */ - -boolean _Thread_Start( - Thread_Control *the_thread, - Thread_Start_types the_prototype, - void *entry_point, - void *pointer_argument, - unsigned32 numeric_argument -); - -/* - * _Thread_Restart - * - * DESCRIPTION: - * - * XXX - */ - -/* XXX multiple task arg profiles */ - -boolean _Thread_Restart( - Thread_Control *the_thread, - void *pointer_argument, - unsigned32 numeric_argument -); - -/* - * _Thread_Close - * - * DESCRIPTION: - * - * XXX - */ - -void _Thread_Close( - Objects_Information *information, - Thread_Control *the_thread -); - -/* - * _Thread_Ready - * - * DESCRIPTION: - * - * This routine removes any set states for the_thread. It performs - * any necessary scheduling operations including the selection of - * a new heir thread. - */ - -void _Thread_Ready( - Thread_Control *the_thread -); - -/* - * _Thread_Clear_state - * - * DESCRIPTION: - * - * This routine clears the indicated STATES for the_thread. It performs - * any necessary scheduling operations including the selection of - * a new heir thread. - */ - -void _Thread_Clear_state( - Thread_Control *the_thread, - States_Control state -); - -/* - * _Thread_Set_state - * - * DESCRIPTION: - * - * This routine sets the indicated states for the_thread. It performs - * any necessary scheduling operations including the selection of - * a new heir thread. - * - */ - -void _Thread_Set_state( - Thread_Control *the_thread, - States_Control state -); - -/* - * _Thread_Set_transient - * - * DESCRIPTION: - * - * This routine sets the TRANSIENT state for the_thread. It performs - * any necessary scheduling operations including the selection of - * a new heir thread. - */ - -void _Thread_Set_transient( - Thread_Control *the_thread -); - -/* - * _Thread_Reset_timeslice - * - * DESCRIPTION: - * - * This routine is invoked upon expiration of the currently - * executing thread's timeslice. If no other thread's are ready - * at the priority of the currently executing thread, then the - * executing thread's timeslice is reset. Otherwise, the - * currently executing thread is placed at the rear of the - * FIFO for this priority and a new heir is selected. - */ - -void _Thread_Reset_timeslice( void ); - -/* - * _Thread_Tickle_timeslice - * - * DESCRIPTION: - * - * This routine is invoked as part of processing each clock tick. - * It is responsible for determining if the current thread allows - * timeslicing and, if so, when its timeslice expires. - */ - -void _Thread_Tickle_timeslice( void ); - -/* - * _Thread_Yield_processor - * - * DESCRIPTION: - * - * This routine is invoked when a thread wishes to voluntarily - * transfer control of the processor to another thread of equal - * or greater priority. - */ - -void _Thread_Yield_processor( void ); - -/* - * _Thread_Load_environment - * - * DESCRIPTION: - * - * This routine initializes the context of the_thread to its - * appropriate starting state. - */ - -void _Thread_Load_environment( - Thread_Control *the_thread -); - -/* - * _Thread_Handler - * - * DESCRIPTION: - * - * This routine is the wrapper function for all threads. It is - * the starting point for all threads. The user provided thread - * entry point is invoked by this routine. Operations - * which must be performed immediately before and after the user's - * thread executes are found here. - */ - -void _Thread_Handler( void ); - -/* - * _Thread_Delay_ended - * - * DESCRIPTION: - * - * This routine is invoked when a thread must be unblocked at the - * end of a time based delay (i.e. wake after or wake when). - */ - -void _Thread_Delay_ended( - Objects_Id id, - void *ignored -); - -/* - * _Thread_Change_priority - * - * DESCRIPTION: - * - * This routine changes the current priority of the_thread to - * new_priority. It performs any necessary scheduling operations - * including the selection of a new heir thread. - */ - -void _Thread_Change_priority ( - Thread_Control *the_thread, - Priority_Control new_priority -); - -/* - * _Thread_Set_priority - * - * DESCRIPTION: - * - * This routine updates the priority related fields in the_thread - * control block to indicate the current priority is now new_priority. - */ - -void _Thread_Set_priority( - Thread_Control *the_thread, - Priority_Control new_priority -); - -/* - * _Thread_Evaluate_mode - * - * DESCRIPTION: - * - * This routine XXX - */ - -boolean _Thread_Evaluate_mode( void ); - -/* - * _Thread_Get - * - * NOTE: If we are not using static inlines, this must be a real - * subroutine call. - */ - -#ifndef USE_INLINES -Thread_Control *_Thread_Get ( - Objects_Id id, - Objects_Locations *location -); -#endif - -/* - * _Thread_Idle_body - * - * DESCRIPTION: - * - * This routine is the body of the system idle thread. - */ - -#if (CPU_PROVIDES_IDLE_THREAD_BODY == FALSE) -Thread _Thread_Idle_body( - unsigned32 ignored -); -#endif - -#ifndef __RTEMS_APPLICATION__ -#include -#endif -#include - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/threadmp.h b/c/src/exec/score/include/rtems/score/threadmp.h deleted file mode 100644 index cd401e0ad8..0000000000 --- a/c/src/exec/score/include/rtems/score/threadmp.h +++ /dev/null @@ -1,89 +0,0 @@ -/* threadmp.h - * - * This include file contains the specification for all routines - * and data specific to the multiprocessing portion of the thread package. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_THREAD_MP_h -#define __RTEMS_THREAD_MP_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * _Thread_MP_Handler_initialization - * - * DESCRIPTION: - * - * This routine initializes the multiprocessing portion of the Thread Handler. - */ - -void _Thread_MP_Handler_initialization ( - unsigned32 maximum_proxies -); - -/* - * _Thread_MP_Allocate_proxy - * - * DESCRIPTION: - * - * This allocates a proxy control block from - * the inactive chain of free proxy control blocks. - * - * NOTE: This function returns a thread control pointer - * because proxies are substitutes for remote threads. - */ - -Thread_Control *_Thread_MP_Allocate_proxy ( - States_Control the_state -); - -/* - * _Thread_MP_Find_proxy - * - * DESCRIPTION: - * - * This function removes the proxy control block for the specified - * id from the active chain of proxy control blocks. - */ - -Thread_Control *_Thread_MP_Find_proxy ( - Objects_Id the_id -); - -/* - * The following is used to determine when the multiprocessing receive - * thread is executing so that a proxy can be allocated instead of - * blocking the multiprocessing receive thread. - */ - -SCORE_EXTERN Thread_Control *_Thread_MP_Receive; - -/* - * The following chains are used to manage proxies. - */ - -SCORE_EXTERN Chain_Control _Thread_MP_Active_proxies; -SCORE_EXTERN Chain_Control _Thread_MP_Inactive_proxies; - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/threadq.h b/c/src/exec/score/include/rtems/score/threadq.h deleted file mode 100644 index bfcb108db9..0000000000 --- a/c/src/exec/score/include/rtems/score/threadq.h +++ /dev/null @@ -1,301 +0,0 @@ -/* threadq.h - * - * This include file contains all the constants and structures associated - * with the manipulation of objects. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __THREAD_QUEUE_h -#define __THREAD_QUEUE_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include -#include - -/* - * Constant for indefinite wait. - */ - -#define THREAD_QUEUE_WAIT_FOREVER WATCHDOG_NO_TIMEOUT - -/* - * The following type defines the callout used when a remote task - * is extracted from a local thread queue. - */ - -typedef void ( *Thread_queue_Flush_callout )( - Thread_Control * - ); - -/* - * The following type defines the callout used when a local task - * is extracted from a remote thread queue (i.e. it's proxy must - * extracted from the remote queue). - */ - -typedef void ( *Thread_queue_Extract_callout )( - Thread_Control * - ); - -SCORE_EXTERN Thread_queue_Extract_callout - _Thread_queue_Extract_table[ OBJECTS_CLASSES_LAST + 1 ]; - -/* - * _Thread_queue_Dequeue - * - * DESCRIPTION: - * - * This function returns a pointer to a thread waiting on - * the_thread_queue. The selection of this thread is based on - * the discipline of the_thread_queue. If no threads are waiting - * on the_thread_queue, then NULL is returned. - */ - -Thread_Control *_Thread_queue_Dequeue( - Thread_queue_Control *the_thread_queue -); - -/* - * _Thread_queue_Enqueue - * - * DESCRIPTION: - * - * This routine enqueues the currently executing thread on - * the_thread_queue with an optional timeout. - */ - -void _Thread_queue_Enqueue( - Thread_queue_Control *the_thread_queue, - Watchdog_Interval timeout -); - -/* - * _Thread_queue_Extract - * - * DESCRIPTION: - * - * This routine removes the_thread from the_thread_queue - * and cancels any timeouts associated with this blocking. - */ - -void _Thread_queue_Extract( - Thread_queue_Control *the_thread_queue, - Thread_Control *the_thread -); - -/* - * _Thread_queue_Extract_with_proxy - * - * DESCRIPTION: - * - * This routine extracts the_thread from the_thread_queue - * and insures that if there is a proxy for this task on - * another node, it is also dealt with. - */ - -boolean _Thread_queue_Extract_with_proxy( - Thread_Control *the_thread -); - -/* - * _Thread_queue_First - * - * DESCRIPTION: - * - * This function returns a pointer to the "first" thread - * on the_thread_queue. The "first" thread is selected - * based on the discipline of the_thread_queue. - */ - -Thread_Control *_Thread_queue_First( - Thread_queue_Control *the_thread_queue -); - -/* - * _Thread_queue_Flush - * - * DESCRIPTION: - * - * This routine unblocks all threads blocked on the_thread_queue - * and cancels any associated timeouts. - */ - -void _Thread_queue_Flush( - Thread_queue_Control *the_thread_queue, - Thread_queue_Flush_callout remote_extract_callout, - unsigned32 status -); - -/* - * _Thread_queue_Initialize - * - * DESCRIPTION: - * - * This routine initializes the_thread_queue based on the - * discipline indicated in attribute_set. The state set on - * threads which block on the_thread_queue is state. - */ - -void _Thread_queue_Initialize( - Thread_queue_Control *the_thread_queue, - Objects_Classes the_class, - Thread_queue_Disciplines the_discipline, - States_Control state, - Thread_queue_Extract_callout proxy_extract_callout, - unsigned32 timeout_status -); - -/* - * _Thread_queue_Dequeue_priority - * - * DESCRIPTION: - * - * This function returns a pointer to the highest priority - * thread waiting on the_thread_queue. If no threads are waiting - * on the_thread_queue, then NULL is returned. - */ - -Thread_Control *_Thread_queue_Dequeue_priority( - Thread_queue_Control *the_thread_queue -); - -/* - * _Thread_queue_Enqueue_priority - * - * DESCRIPTION: - * - * This routine enqueues the currently executing thread on - * the_thread_queue with an optional timeout using the - * priority discipline. - */ - -void _Thread_queue_Enqueue_priority( - Thread_queue_Control *the_thread_queue, - Thread_Control *the_thread, - Watchdog_Interval timeout -); - -/* - * _Thread_queue_Extract_priority - * - * DESCRIPTION: - * - * This routine removes the_thread from the_thread_queue - * and cancels any timeouts associated with this blocking. - */ - -void _Thread_queue_Extract_priority( - Thread_queue_Control *the_thread_queue, - Thread_Control *the_thread -); - -/* - * _Thread_queue_First_priority - * - * DESCRIPTION: - * - * This function returns a pointer to the "first" thread - * on the_thread_queue. The "first" thread is the highest - * priority thread waiting on the_thread_queue. - */ - -Thread_Control *_Thread_queue_First_priority( - Thread_queue_Control *the_thread_queue -); - -/* - * _Thread_queue_Dequeue_FIFO - * - * DESCRIPTION: - * - * This function returns a pointer to the thread which has - * been waiting the longest on the_thread_queue. If no - * threads are waiting on the_thread_queue, then NULL is returned. - */ - -Thread_Control *_Thread_queue_Dequeue_fifo( - Thread_queue_Control *the_thread_queue -); - -/* - * _Thread_queue_Enqueue_FIFO - * - * DESCRIPTION: - * - * This routine enqueues the currently executing thread on - * the_thread_queue with an optional timeout using the - * FIFO discipline. - */ - -void _Thread_queue_Enqueue_fifo( - Thread_queue_Control *the_thread_queue, - Thread_Control *the_thread, - Watchdog_Interval timeout -); - -/* - * _Thread_queue_Extract_FIFO - * - * DESCRIPTION: - * - * This routine removes the_thread from the_thread_queue - * and cancels any timeouts associated with this blocking. - */ - -void _Thread_queue_Extract_fifo( - Thread_queue_Control *the_thread_queue, - Thread_Control *the_thread -); - -/* - * _Thread_queue_First_FIFO - * - * DESCRIPTION: - * - * This function returns a pointer to the "first" thread - * on the_thread_queue. The first thread is the thread - * which has been waiting longest on the_thread_queue. - */ - -Thread_Control *_Thread_queue_First_fifo( - Thread_queue_Control *the_thread_queue -); - -/* - * _Thread_queue_timeout - * - * DESCRIPTION: - * - * This routine is invoked when a task's request has not - * been satisfied after the timeout interval specified to - * enqueue. The task represented by ID will be unblocked and - * its status code will be set in it's control block to indicate - * that a timeout has occurred. - */ - -void _Thread_queue_Timeout ( - Objects_Id id, - void *ignored -); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/tod.h b/c/src/exec/score/include/rtems/score/tod.h deleted file mode 100644 index ea7a7855f1..0000000000 --- a/c/src/exec/score/include/rtems/score/tod.h +++ /dev/null @@ -1,262 +0,0 @@ -/* tod.h - * - * This include file contains all the constants and structures associated - * with the Time of Day Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __TIME_OF_DAY_h -#define __TIME_OF_DAY_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -/* - * The following constants are related to the time of day. - */ - -#define TOD_SECONDS_PER_MINUTE 60 -#define TOD_MINUTES_PER_HOUR 60 -#define TOD_MONTHS_PER_YEAR 12 -#define TOD_DAYS_PER_YEAR 365 -#define TOD_HOURS_PER_DAY 24 -#define TOD_SECONDS_PER_DAY (TOD_SECONDS_PER_MINUTE * \ - TOD_MINUTES_PER_HOUR * \ - TOD_HOURS_PER_DAY) - -#define TOD_SECONDS_PER_NON_LEAP_YEAR (365 * TOD_SECONDS_PER_DAY) - -#define TOD_MILLISECONDS_PER_SECOND 1000 -#define TOD_MICROSECONDS_PER_SECOND 1000000 -#define TOD_NANOSECONDS_PER_SECOND 1000000000 -#define TOD_NANOSECONDS_PER_MICROSECOND 1000 - -/* - * The following constant define the earliest year to which an - * time of day can be initialized. This is considered the - * epoch. - */ - -#define TOD_BASE_YEAR 1988 - -/* - * The following record defines the time of control block. This - * control block is used to maintain the current time of day. - */ - -typedef struct { /* RTEID style time/date */ - unsigned32 year; /* year, A.D. */ - unsigned32 month; /* month, 1 -> 12 */ - unsigned32 day; /* day, 1 -> 31 */ - unsigned32 hour; /* hour, 0 -> 23 */ - unsigned32 minute; /* minute, 0 -> 59 */ - unsigned32 second; /* second, 0 -> 59 */ - unsigned32 ticks; /* elapsed ticks between secs */ -} TOD_Control; - -/* - * The following is TRUE if the application has set the current - * time of day, and FALSE otherwise. - */ - -SCORE_EXTERN boolean _TOD_Is_set; - -/* - * The following contains the current time of day. - */ - -SCORE_EXTERN TOD_Control _TOD_Current; - -/* - * The following contains the number of seconds from 00:00:00 - * January 1, TOD_BASE_YEAR until the current time of day. - */ - -SCORE_EXTERN Watchdog_Interval _TOD_Seconds_since_epoch; - -/* - * The following contains the number of microseconds per tick. - */ - -SCORE_EXTERN unsigned32 _TOD_Microseconds_per_tick; - -/* - * The following contains the number of clock ticks per second. - * - * NOTE: - * - * If one second is NOT evenly divisible by the number of microseconds - * per clock tick, this value will contain only the integer portion - * of the division. This means that the interval between clock ticks - * can be a source of error in the current time of day. - */ - -SCORE_EXTERN unsigned32 _TOD_Ticks_per_second; - -/* - * This is the control structure for the watchdog timer which - * fires to service the seconds chain. - */ - -SCORE_EXTERN Watchdog_Control _TOD_Seconds_watchdog; - -#ifdef SCORE_INIT - -/* - * The following array contains the number of days in all months. - * The first dimension should be 1 for leap years, and 0 otherwise. - * The second dimension should range from 1 to 12 for January to - * February, respectively. - */ - -const unsigned32 _TOD_Days_per_month[ 2 ][ 13 ] = { - { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, - { 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } -}; - -/* - * The following array contains the number of days in all months - * up to the month indicated by the index of the second dimension. - * The first dimension should be 1 for leap years, and 0 otherwise. - */ - -const unsigned16 _TOD_Days_to_date[2][13] = { - { 0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }, - { 0, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 } -}; - -/* - * The following array contains the number of days in the years - * since the last leap year. The index should be 0 for leap - * years, and the number of years since the beginning of a leap - * year otherwise. - */ - -const unsigned16 _TOD_Days_since_last_leap_year[4] = { 0, 366, 761, 1126 }; - -#else - -extern const unsigned16 _TOD_Days_to_date[2][13]; /* Julian days */ -extern const unsigned16 _TOD_Days_since_last_leap_year[4]; -extern const unsigned32 _TOD_Days_per_month[2][13]; - -#endif - -/* - * _TOD_Handler_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this handler. - */ - -void _TOD_Handler_initialization( - unsigned32 microseconds_per_tick -); - -/* - * _TOD_Set - * - * DESCRIPTION: - * - * This routine sets the current time of day to THE_TOD and - * the equivalent SECONDS_SINCE_EPOCH. - */ - -void _TOD_Set( - TOD_Control *the_tod, - Watchdog_Interval seconds_since_epoch -); - -/* - * _TOD_Validate - * - * DESCRIPTION: - * - * This function returns TRUE if THE_TOD contains - * a valid time of day, and FALSE otherwise. - */ - -boolean _TOD_Validate( - TOD_Control *the_tod -); - -/* - * _TOD_To_seconds - * - * DESCRIPTION: - * - * This function returns the number seconds between the epoch and THE_TOD. - */ - -Watchdog_Interval _TOD_To_seconds( - TOD_Control *the_tod -); - -/* - * _TOD_Tickle - * - * DESCRIPTION: - * - * This routine is scheduled as a watchdog function and is invoked at - * each second boundary. It updates the current time of day to indicate - * that a second has passed and processes the seconds watchdog chain. - */ - -void _TOD_Tickle( - Objects_Id id, - void *ignored -); - -/* - * TOD_MILLISECONDS_TO_MICROSECONDS - * - * DESCRIPTION: - * - * This routine converts an interval expressed in milliseconds to microseconds. - * - * NOTE: - * - * This must be a macro so it can be used in "static" tables. - */ - -#define TOD_MILLISECONDS_TO_MICROSECONDS(_ms) ((_ms) * 1000) - -/* - * TOD_MILLISECONDS_TO_TICKS - * - * DESCRIPTION: - * - * This routine converts an interval expressed in milliseconds to ticks. - * - * NOTE: - * - * This must be a macro so it can be used in "static" tables. - */ - -#define TOD_MILLISECONDS_TO_TICKS(_ms) \ - (TOD_MILLISECONDS_TO_MICROSECONDS(_ms) / _TOD_Microseconds_per_tick) - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/tqdata.h b/c/src/exec/score/include/rtems/score/tqdata.h deleted file mode 100644 index e00c736426..0000000000 --- a/c/src/exec/score/include/rtems/score/tqdata.h +++ /dev/null @@ -1,90 +0,0 @@ -/* tqdata.h - * - * This include file contains all the constants and structures - * needed to declare a thread queue. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __THREAD_QUEUE_DATA_h -#define __THREAD_QUEUE_DATA_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -/* - * The following enumerated type details all of the disciplines - * supported by the Thread Queue Handler. - */ - -typedef enum { - THREAD_QUEUE_DISCIPLINE_FIFO, /* FIFO queue discipline */ - THREAD_QUEUE_DISCIPLINE_PRIORITY /* PRIORITY queue discipline */ -} Thread_queue_Disciplines; - -/* - * The following enumerated types indicate what happened while the thread - * queue was in the synchronization window. - */ - -typedef enum { - THREAD_QUEUE_SYNCHRONIZED, - THREAD_QUEUE_NOTHING_HAPPENED, - THREAD_QUEUE_TIMEOUT, - THREAD_QUEUE_SATISFIED -} Thread_queue_States; - -/* - * The following constants are used to manage the priority queues. - * - * There are four chains used to maintain a priority -- each chain - * manages a distinct set of task priorities. The number of chains - * is determined by TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS. - * The following set must be consistent. - * - * The set below configures 4 headers -- each contains 64 priorities. - * Header x manages priority range (x*64) through ((x*64)+63). If - * the priority is more than half way through the priority range it - * is in, then the search is performed from the rear of the chain. - * This halves the search time to find the insertion point. - */ - -#define TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS 4 -#define TASK_QUEUE_DATA_PRIORITIES_PER_HEADER 64 -#define TASK_QUEUE_DATA_REVERSE_SEARCH_MASK 0x20 - -typedef struct { - union { - Chain_Control Fifo; /* FIFO discipline list */ - Chain_Control Priority[TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS]; - /* priority discipline list */ - } Queues; - Thread_queue_States sync_state; /* alloc/dealloc critical section */ - Thread_queue_Disciplines discipline; /* queue discipline */ - States_Control state; /* state of threads on Thread_q */ - unsigned32 timeout_status; -} Thread_queue_Control; - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/userext.h b/c/src/exec/score/include/rtems/score/userext.h deleted file mode 100644 index 5ef2b4e30e..0000000000 --- a/c/src/exec/score/include/rtems/score/userext.h +++ /dev/null @@ -1,213 +0,0 @@ -/* userext.h - * - * This include file contains all information about user extensions. This - * Handler provides mechanisms which can be used to initialize and manipulate - * all user extensions. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __USER_EXTENSIONS_h -#define __USER_EXTENSIONS_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -/* - * The following records defines the User Extension Table. - * This table defines the application dependent routines which - * are invoked at critical points in the life of each thread and - * the system as a whole. - */ - -typedef void User_extensions_routine; - -typedef boolean ( *User_extensions_thread_create_extension )( - Thread_Control *, - Thread_Control * - ); - -typedef User_extensions_routine ( *User_extensions_thread_delete_extension )( - Thread_Control *, - Thread_Control * - ); - -typedef User_extensions_routine ( *User_extensions_thread_start_extension )( - Thread_Control *, - Thread_Control * - ); - -typedef User_extensions_routine ( *User_extensions_thread_restart_extension )( - Thread_Control *, - Thread_Control * - ); - -typedef User_extensions_routine ( *User_extensions_thread_switch_extension )( - Thread_Control *, - Thread_Control * - ); - -typedef User_extensions_routine ( *User_extensions_thread_begin_extension )( - Thread_Control * - ); - -typedef User_extensions_routine ( *User_extensions_thread_exitted_extension )( - Thread_Control * - ); - -typedef User_extensions_routine ( *User_extensions_fatal_extension )( - Internal_errors_Source /* the_source */, - boolean /* is_internal */, - unsigned32 /* the_error */ - ); - - -typedef struct { - User_extensions_thread_create_extension thread_create; - User_extensions_thread_start_extension thread_start; - User_extensions_thread_restart_extension thread_restart; - User_extensions_thread_delete_extension thread_delete; - User_extensions_thread_switch_extension thread_switch; - User_extensions_thread_begin_extension thread_begin; - User_extensions_thread_exitted_extension thread_exitted; - User_extensions_fatal_extension fatal; -} User_extensions_Table; - -/* - * The following is used to manage each user extension set. - */ - -typedef struct { - Chain_Node Node; - User_extensions_Table Callouts; -} User_extensions_Control; - -/* - * The following contains the static extension set which may be - * configured by the application. - */ - -SCORE_EXTERN User_extensions_Control _User_extensions_Initial; - -/* - * The following is used to manage the list of active extensions. - */ - -SCORE_EXTERN Chain_Control _User_extensions_List; - -/* - * _User_extensions_Thread_create - * - * DESCRIPTION: - * - * This routine is used to invoke the user extension for - * the thread creation operate. - */ - -boolean _User_extensions_Thread_create ( - Thread_Control *the_thread -); - -/* - * _User_extensions_Thread_delete - * - * DESCRIPTION: - * - * This routine is used to invoke the user extension for - * the thread deletion operation. - */ - -void _User_extensions_Thread_delete ( - Thread_Control *the_thread -); - -/* - * _User_extensions_Thread_start - * - * DESCRIPTION: - * - * This routine is used to invoke the user extension for - * the thread start operation. - */ - -void _User_extensions_Thread_start ( - Thread_Control *the_thread -); - -/* - * _User_extensions_Thread_restart - * - * DESCRIPTION: - * - * This routine is used to invoke the user extension for - * the thread restart operation. - */ - -void _User_extensions_Thread_restart ( - Thread_Control *the_thread -); - -/* - * _User_extensions_Thread_begin - * - * DESCRIPTION: - * - * This routine is used to invoke the user extension which - * is invoked when a thread begins. - */ - -void _User_extensions_Thread_begin ( - Thread_Control *executing -); - -/* - * _User_extensions_Thread_exitted - * - * DESCRIPTION: - * - * This routine is used to invoke the user extension which - * is invoked when a thread exits. - */ - -void _User_extensions_Thread_exitted ( - Thread_Control *executing -); - -/* - * _User_extensions_Fatal - * - * DESCRIPTION: - * - * This routine is used to invoke the user extension invoked - * when a fatal error occurs. - */ - -void _User_extensions_Fatal ( - Internal_errors_Source the_source, - boolean is_internal, - unsigned32 the_error -); - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/watchdog.h b/c/src/exec/score/include/rtems/score/watchdog.h deleted file mode 100644 index c77d9f1307..0000000000 --- a/c/src/exec/score/include/rtems/score/watchdog.h +++ /dev/null @@ -1,194 +0,0 @@ -/* watchdog.h - * - * This include file contains all the constants and structures associated - * with watchdog timers. This Handler provides mechanisms which can be - * used to initialize and manipulate watchdog timers. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __WATCHDOG_h -#define __WATCHDOG_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* - * The following type defines the control block used to manage - * intervals. - */ - -typedef unsigned32 Watchdog_Interval; - -/* - * The following types define a pointer to a watchdog service routine. - */ - -typedef void Watchdog_Service_routine; - -typedef Watchdog_Service_routine ( *Watchdog_Service_routine_entry )( - Objects_Id, - void * - ); - -/* - * Constant for indefinite wait. (actually an illegal interval) - */ - -#define WATCHDOG_NO_TIMEOUT 0 - -/* - * The following enumerated type lists the states in which a - * watchdog timer may be at any given time. - */ - -typedef enum { - WATCHDOG_INACTIVE, /* off all chains */ - WATCHDOG_BEING_INSERTED, /* off all chains, searching for insertion point */ - WATCHDOG_ACTIVE, /* on chain, allowed to fire */ - WATCHDOG_REMOVE_IT /* on chain, remove without firing if expires */ -} Watchdog_States; - -/* - * The following enumerated type details the manner in which - * a watchdog chain may be adjusted by the Watchdog_Adjust - * routine. The direction indicates a movement FORWARD - * or BACKWARD in time. - */ - -typedef enum { - WATCHDOG_FORWARD, /* adjust delta value forward */ - WATCHDOG_BACKWARD /* adjust delta value backward */ -} Watchdog_Adjust_directions; - -/* - * The following record defines the control block used - * to manage each watchdog timer. - */ - -typedef struct { - Chain_Node Node; - Watchdog_States state; - Watchdog_Interval initial; - Watchdog_Interval delta_interval; - Watchdog_Interval start_time; - Watchdog_Interval stop_time; - Watchdog_Service_routine_entry routine; - Objects_Id id; - void *user_data; -} Watchdog_Control; - -/* - * The following are used for synchronization purposes - * during an insert on a watchdog delta chain. - */ - -SCORE_EXTERN volatile unsigned32 _Watchdog_Sync_level; -SCORE_EXTERN volatile unsigned32 _Watchdog_Sync_count; - -/* - * The following contains the number of ticks since the - * system was booted. - */ - -SCORE_EXTERN Watchdog_Interval _Watchdog_Ticks_since_boot; - -/* - * The following defines the watchdog chains which are managed - * on ticks and second boundaries. - */ - -SCORE_EXTERN Chain_Control _Watchdog_Ticks_chain; -SCORE_EXTERN Chain_Control _Watchdog_Seconds_chain; - -/* - * _Watchdog_Handler_initialization - * - * DESCRIPTION: - * - * This routine initializes the watchdog handler. The watchdog - * synchronization flag is initialized and the watchdog chains are - * initialized and emptied. - */ - -void _Watchdog_Handler_initialization( void ); - -/* - * _Watchdog_Remove - * - * DESCRIPTION: - * - * This routine removes THE_WATCHDOG from the watchdog chain on which - * it resides and returns the state THE_WATCHDOG timer was in. - */ - -Watchdog_States _Watchdog_Remove ( - Watchdog_Control *the_watchdog -); - -/* - * _Watchdog_Adjust - * - * DESCRIPTION: - * - * This routine adjusts the HEADER watchdog chain in the forward - * or backward DIRECTION for UNITS ticks. - */ - -void _Watchdog_Adjust ( - Chain_Control *header, - Watchdog_Adjust_directions direction, - Watchdog_Interval units -); - -/* - * _Watchdog_Insert - * - * DESCRIPTION: - * - * This routine inserts THE_WATCHDOG into the HEADER watchdog chain - * for a time of UNITS. The INSERT_MODE indicates whether - * THE_WATCHDOG is to be activated automatically or later, explicitly - * by the caller. - * - */ - -void _Watchdog_Insert ( - Chain_Control *header, - Watchdog_Control *the_watchdog -); - -/* - * _Watchdog_Tickle - * - * DESCRIPTION: - * - * This routine is invoked at appropriate intervals to update - * the HEADER watchdog chain. - */ - -void _Watchdog_Tickle ( - Chain_Control *header -); - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/score/wkspace.h b/c/src/exec/score/include/rtems/score/wkspace.h deleted file mode 100644 index b351663ee5..0000000000 --- a/c/src/exec/score/include/rtems/score/wkspace.h +++ /dev/null @@ -1,71 +0,0 @@ -/* wkspace.h - * - * This include file contains information related to the - * RAM Workspace. This Handler provides mechanisms which can be used to - * define, initialize and manipulate the workspace. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __WORKSPACE_h -#define __WORKSPACE_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -/* - * The following is used to manage the Workspace. - * - */ - -SCORE_EXTERN Heap_Control _Workspace_Area; /* executive heap header */ - -/* - * _Workspace_Handler_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this handler. - */ - -void _Workspace_Handler_initialization( - void *starting_address, - unsigned32 size -); - -/* - * _Workspace_Allocate_or_fatal_error - * - * DESCRIPTION: - * - * This routine returns the address of a block of memory of size - * bytes. If a block of the appropriate size cannot be allocated - * from the workspace, then the internal error handler is invoked. - */ - -void *_Workspace_Allocate_or_fatal_error( - unsigned32 size -); - -#ifndef __RTEMS_APPLICATION__ -#include -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/include/rtems/system.h b/c/src/exec/score/include/rtems/system.h deleted file mode 100644 index 74929eade6..0000000000 --- a/c/src/exec/score/include/rtems/system.h +++ /dev/null @@ -1,157 +0,0 @@ -/* system.h - * - * This include file contains information that is included in every - * function in the executive. This must be the first include file - * included in all internal RTEMS files. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __RTEMS_SYSTEM_h -#define __RTEMS_SYSTEM_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The following define the CPU Family and Model within the family - * - * NOTE: The string "REPLACE_THIS_WITH_USE_INLINE_OR_MACROS" is replaced - * with either "USE_INLINES" or "USE_MACROS" based upon the - * whether this target configuration uses the inline or - * macro implementations of the inlined RTEMS routines. - */ - - -#define REPLACE_THIS_WITH_USE_INLINE_OR_MACROS - -/* - * The following insures that all data is declared in the space - * of the initialization routine for either the Initialization Manager - * or the initialization file for the appropriate API. It is - * referenced as "external" in every other file. - */ - -#ifdef SCORE_INIT -#undef SCORE_EXTERN -#define SCORE_EXTERN -#else -#undef SCORE_EXTERN -#define SCORE_EXTERN extern -#endif - -#ifdef SAPI_INIT -#undef SAPI_EXTERN -#define SAPI_EXTERN -#else -#undef SAPI_EXTERN -#define SAPI_EXTERN extern -#endif - -#ifdef RTEMS_API_INIT -#undef RTEMS_EXTERN -#define RTEMS_EXTERN -#else -#undef RTEMS_EXTERN -#define RTEMS_EXTERN extern -#endif - -#ifdef POSIX_API_INIT -#undef POSIX_EXTERN -#define POSIX_EXTERN -#else -#undef POSIX_EXTERN -#define POSIX_EXTERN extern -#endif - -/* - * The following (in conjunction with compiler arguments) are used - * to choose between the use of static inline functions and macro - * functions. The static inline implementation allows better - * type checking with no cost in code size or execution speed. - */ - -#ifdef USE_INLINES -# ifdef __GNUC__ -# define RTEMS_INLINE_ROUTINE static __inline__ -# else -# define RTEMS_INLINE_ROUTINE static inline -# endif -#else -# define RTEMS_INLINE_ROUTINE -#endif - -/* - * Include a base set of files. - */ - -/* - * XXX: Eventually proc_ptr needs to disappear!!! - */ - -typedef void * proc_ptr; - -#include /* processor specific information */ - -/* - * Define NULL - */ - -#ifndef NULL -#define NULL 0 /* NULL value */ -#endif - -/* - * Boolean constants - */ - -#if !defined( TRUE ) || (TRUE != 1) -#undef TRUE -#define TRUE (1) -#endif - -#if !defined( FALSE ) || (FALSE != 0) -#undef FALSE -#define FALSE (0) -#endif - -#define stringify( _x ) # _x - -#define RTEMS_offsetof(type, field) \ - ((unsigned32) &(((type *) 0)->field)) - -/* - * The following is the extern for the RTEMS version string. - * The contents of this string are CPU specific. - */ - -extern const char _RTEMS_version[]; /* RTEMS version string */ -extern const char _Copyright_Notice[]; /* RTEMS copyright string */ - -/* - * The following defines the CPU dependent information table. - */ - -SCORE_EXTERN rtems_cpu_table _CPU_Table; /* CPU dependent info */ - -/* - * XXX weird RTEMS stuff - */ - -#define RTEMS_MAXIMUM_NAME_LENGTH 4 - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/address.inl b/c/src/exec/score/inline/rtems/score/address.inl deleted file mode 100644 index 149b570624..0000000000 --- a/c/src/exec/score/inline/rtems/score/address.inl +++ /dev/null @@ -1,120 +0,0 @@ -/* inline/address.inl - * - * This include file contains the bodies of the routines - * about addresses which are inlined. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __INLINE_ADDRESSES_inl -#define __INLINE_ADDRESSES_inl - -/*PAGE - * - * _Addresses_Add_offset - * - * DESCRIPTION: - * - * This function is used to add an offset to a base address. - * It returns the resulting address. This address is typically - * converted to an access type before being used further. - */ - -RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( - void *base, - unsigned32 offset -) -{ - return (void *)((char *)base + offset); -} - -/*PAGE - * - * _Addresses_Subtract_offset - * - * DESCRIPTION: - * - * This function is used to subtract an offset from a base - * address. It returns the resulting address. This address is - * typically converted to an access type before being used further. - */ - -RTEMS_INLINE_ROUTINE void *_Addresses_Subtract_offset ( - void *base, - unsigned32 offset -) -{ - return (void *)((char *)base - offset); -} - -/*PAGE - * - * _Addresses_Subtract - * - * DESCRIPTION: - * - * This function is used to subtract two addresses. It returns the - * resulting offset. - * - * NOTE: The cast of an address to an unsigned32 makes this code - * dependent on an addresses being thirty two bits. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Addresses_Subtract ( - void *left, - void *right -) -{ - return ((char *) left - (char *) right); -} - -/*PAGE - * - * _Addresses_Is_aligned - * - * DESCRIPTION: - * - * This function returns TRUE if the given address is correctly - * aligned for this processor and FALSE otherwise. Proper alignment - * is based on correctness and efficiency. - */ - -RTEMS_INLINE_ROUTINE boolean _Addresses_Is_aligned ( - void *address -) -{ - return ( ( (unsigned32)address % CPU_ALIGNMENT ) == 0 ); -} - -/*PAGE - * - * _Addresses_Is_in_range - * - * DESCRIPTION: - * - * This function returns TRUE if the given address is within the - * memory range specified and FALSE otherwise. base is the address - * of the first byte in the memory range and limit is the address - * of the last byte in the memory range. The base address is - * assumed to be lower than the limit address. - */ - -RTEMS_INLINE_ROUTINE boolean _Addresses_Is_in_range ( - void *address, - void *base, - void *limit -) -{ - return ( address >= base && address <= limit ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/chain.inl b/c/src/exec/score/inline/rtems/score/chain.inl deleted file mode 100644 index 9283fa4c7e..0000000000 --- a/c/src/exec/score/inline/rtems/score/chain.inl +++ /dev/null @@ -1,390 +0,0 @@ -/* inline/chain.inl - * - * This include file contains the bodies of the routines which are - * associated with doubly linked chains and inlined. - * - * NOTE: The routines in this file are ordered from simple - * to complex. No other Chain Handler routine is referenced - * unless it has already been defined. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __INLINE_CHAIN_inl -#define __INLINE_CHAIN_inl - -/*PAGE - * - * _Chain_Are_nodes_equal - * - * DESCRIPTION: - * - * This function returns TRUE if LEFT and RIGHT are equal, - * and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Chain_Are_nodes_equal( - Chain_Node *left, - Chain_Node *right -) -{ - return left == right; -} - -/*PAGE - * - * _Chain_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_chain is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Chain_Is_null( - Chain_Control *the_chain -) -{ - return ( the_chain == NULL ); -} - -/*PAGE - * - * _Chain_Is_null_node - * - * DESCRIPTION: - * - * This function returns TRUE if the_node is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Chain_Is_null_node( - Chain_Node *the_node -) -{ - return ( the_node == NULL ); -} - -/*PAGE - * - * _Chain_Head - * - * DESCRIPTION: - * - * This function returns a pointer to the first node on the chain. - */ - -RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( - Chain_Control *the_chain -) -{ - return (Chain_Node *) the_chain; -} - -/*PAGE - * - * _Chain_Tail - * - * DESCRIPTION: - * - * This function returns a pointer to the last node on the chain. - */ - -RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( - Chain_Control *the_chain -) -{ - return (Chain_Node *) &the_chain->permanent_null; -} - -/*PAGE - * - * _Chain_Is_empty - * - * DESCRIPTION: - * - * This function returns TRUE if there a no nodes on the_chain and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( - Chain_Control *the_chain -) -{ - return ( the_chain->first == _Chain_Tail( the_chain ) ); -} - -/*PAGE - * - * _Chain_Is_first - * - * DESCRIPTION: - * - * This function returns TRUE if the_node is the first node on a chain and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Chain_Is_first( - Chain_Node *the_node -) -{ - return ( the_node->previous == NULL ); -} - -/*PAGE - * - * _Chain_Is_last - * - * DESCRIPTION: - * - * This function returns TRUE if the_node is the last node on a chain and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Chain_Is_last( - Chain_Node *the_node -) -{ - return ( the_node->next == NULL ); -} - -/*PAGE - * - * _Chain_Has_only_one_node - * - * DESCRIPTION: - * - * This function returns TRUE if there is only one node on the_chain and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Chain_Has_only_one_node( - Chain_Control *the_chain -) -{ - return ( the_chain->first == the_chain->last ); -} - -/*PAGE - * - * _Chain_Is_head - * - * DESCRIPTION: - * - * This function returns TRUE if the_node is the head of the_chain and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Chain_Is_head( - Chain_Control *the_chain, - Chain_Node *the_node -) -{ - return ( the_node == _Chain_Head( the_chain ) ); -} - -/*PAGE - * - * _Chain_Is_tail - * - * DESCRIPTION: - * - * This function returns TRUE if the_node is the tail of the_chain and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Chain_Is_tail( - Chain_Control *the_chain, - Chain_Node *the_node -) -{ - return ( the_node == _Chain_Tail( the_chain ) ); -} - -/*PAGE - * - * Chain_Initialize_empty - * - * DESCRIPTION: - * - * This routine initializes the specified chain to contain zero nodes. - */ - -RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( - Chain_Control *the_chain -) -{ - the_chain->first = _Chain_Tail( the_chain ); - the_chain->permanent_null = NULL; - the_chain->last = _Chain_Head( the_chain ); -} - -/*PAGE - * - * _Chain_Extract_unprotected - * - * DESCRIPTION: - * - * This routine extracts the_node from the chain on which it resides. - * It does NOT disable interrupts to insure the atomicity of the - * extract operation. - */ - -RTEMS_INLINE_ROUTINE void _Chain_Extract_unprotected( - Chain_Node *the_node -) -{ - Chain_Node *next; - Chain_Node *previous; - - next = the_node->next; - previous = the_node->previous; - next->previous = previous; - previous->next = next; -} - -/*PAGE - * - * _Chain_Get_first_unprotected - * - * DESCRIPTION: - * - * This function removes the first node from the_chain and returns - * a pointer to that node. It does NOT disable interrupts to insure - * the atomicity of the get operation. - */ - -RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected( - Chain_Control *the_chain -) -{ - Chain_Node *return_node; - Chain_Node *new_first; - - return_node = the_chain->first; - new_first = return_node->next; - the_chain->first = new_first; - new_first->previous = _Chain_Head( the_chain ); - - return return_node; -} - -/*PAGE - * - * Chain_Get_unprotected - * - * DESCRIPTION: - * - * This function removes the first node from the_chain and returns - * a pointer to that node. If the_chain is empty, then NULL is returned. - * It does NOT disable interrupts to insure the atomicity of the - * get operation. - */ - -RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( - Chain_Control *the_chain -) -{ - if ( !_Chain_Is_empty( the_chain ) ) - return _Chain_Get_first_unprotected( the_chain ); - else - return NULL; -} - -/*PAGE - * - * _Chain_Insert_unprotected - * - * DESCRIPTION: - * - * This routine inserts the_node on a chain immediately following - * after_node. It does NOT disable interrupts to insure the atomicity - * of the extract operation. - */ - -RTEMS_INLINE_ROUTINE void _Chain_Insert_unprotected( - Chain_Node *after_node, - Chain_Node *the_node -) -{ - Chain_Node *before_node; - - the_node->previous = after_node; - before_node = after_node->next; - after_node->next = the_node; - the_node->next = before_node; - before_node->previous = the_node; -} - -/*PAGE - * - * _Chain_Append_unprotected - * - * DESCRIPTION: - * - * This routine appends the_node onto the end of the_chain. - * It does NOT disable interrupts to insure the atomicity of the - * append operation. - */ - -RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( - Chain_Control *the_chain, - Chain_Node *the_node -) -{ - Chain_Node *old_last_node; - - the_node->next = _Chain_Tail( the_chain ); - old_last_node = the_chain->last; - the_chain->last = the_node; - old_last_node->next = the_node; - the_node->previous = old_last_node; -} - -/*PAGE - * - * _Chain_Prepend_unprotected - * - * DESCRIPTION: - * - * This routine prepends the_node onto the front of the_chain. - * It does NOT disable interrupts to insure the atomicity of the - * prepend operation. - */ - -RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected( - Chain_Control *the_chain, - Chain_Node *the_node -) -{ - _Chain_Insert_unprotected( _Chain_Head( the_chain ), the_node ); - -} - -/*PAGE - * - * _Chain_Prepend - * - * DESCRIPTION: - * - * This routine prepends the_node onto the front of the_chain. - * It disables interrupts to insure the atomicity of the - * prepend operation. - */ - -RTEMS_INLINE_ROUTINE void _Chain_Prepend( - Chain_Control *the_chain, - Chain_Node *the_node -) -{ - _Chain_Insert( _Chain_Head( the_chain ), the_node ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/coremsg.inl b/c/src/exec/score/inline/rtems/score/coremsg.inl deleted file mode 100644 index 1467f962c7..0000000000 --- a/c/src/exec/score/inline/rtems/score/coremsg.inl +++ /dev/null @@ -1,260 +0,0 @@ -/* coremsg.inl - * - * This include file contains the static inline implementation of all - * inlined routines in the Core Message Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __CORE_MESSAGE_QUEUE_inl -#define __CORE_MESSAGE_QUEUE_inl - -#include /* needed for memcpy */ - -/*PAGE - * - * _CORE_message_queue_Send - * - * DESCRIPTION: - * - * This routine sends a message to the end of the specified message queue. - */ - -RTEMS_INLINE_ROUTINE CORE_message_queue_Status _CORE_message_queue_Send( - CORE_message_queue_Control *the_message_queue, - void *buffer, - unsigned32 size, - Objects_Id id, - CORE_message_queue_API_mp_support_callout api_message_queue_mp_support -) -{ - return _CORE_message_queue_Submit( - the_message_queue, - buffer, - size, - id, - api_message_queue_mp_support, - CORE_MESSAGE_QUEUE_SEND_REQUEST - ); -} - -/*PAGE - * - * _CORE_message_queue_Urgent - * - * DESCRIPTION: - * - * This routine sends a message to the front of the specified message queue. - */ - -RTEMS_INLINE_ROUTINE CORE_message_queue_Status _CORE_message_queue_Urgent( - CORE_message_queue_Control *the_message_queue, - void *buffer, - unsigned32 size, - Objects_Id id, - CORE_message_queue_API_mp_support_callout api_message_queue_mp_support -) -{ - return _CORE_message_queue_Submit( - the_message_queue, - buffer, - size, - id, - api_message_queue_mp_support, - CORE_MESSAGE_QUEUE_URGENT_REQUEST - ); -} - -/*PAGE - * - * _CORE_message_queue_Copy_buffer - * - * DESCRIPTION: - * - * This routine copies the contents of the source message buffer - * to the destination message buffer. - */ - -RTEMS_INLINE_ROUTINE void _CORE_message_queue_Copy_buffer ( - void *source, - void *destination, - unsigned32 size -) -{ - memcpy(destination, source, size); -} - -/*PAGE - * - * _CORE_message_queue_Allocate_message_buffer - * - * DESCRIPTION: - * - * This function allocates a message buffer from the inactive - * message buffer chain. - */ - -RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * -_CORE_message_queue_Allocate_message_buffer ( - CORE_message_queue_Control *the_message_queue -) -{ - return (CORE_message_queue_Buffer_control *) - _Chain_Get( &the_message_queue->Inactive_messages ); -} - -/*PAGE - * - * _CORE_message_queue_Free_message_buffer - * - * DESCRIPTION: - * - * This routine frees a message buffer to the inactive - * message buffer chain. - */ - -RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( - CORE_message_queue_Control *the_message_queue, - CORE_message_queue_Buffer_control *the_message -) -{ - _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); -} - -/*PAGE - * - * _CORE_message_queue_Get_pending_message - * - * DESCRIPTION: - * - * This function removes the first message from the_message_queue - * and returns a pointer to it. - */ - -RTEMS_INLINE_ROUTINE - CORE_message_queue_Buffer_control *_CORE_message_queue_Get_pending_message ( - CORE_message_queue_Control *the_message_queue -) -{ - return (CORE_message_queue_Buffer_control *) - _Chain_Get_unprotected( &the_message_queue->Pending_messages ); -} - -/*PAGE - * - * _CORE_message_queue_Is_priority - * - * DESCRIPTION: - * - * This function returns TRUE if the priority attribute is - * enabled in the attribute_set and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_message_queue_Is_priority( - CORE_message_queue_Attributes *the_attribute -) -{ - return (the_attribute->discipline == CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY); -} - -/*PAGE - * - * _CORE_message_queue_Append - * - * DESCRIPTION: - * - * This routine places the_message at the rear of the outstanding - * messages on the_message_queue. - */ - -RTEMS_INLINE_ROUTINE void _CORE_message_queue_Append ( - CORE_message_queue_Control *the_message_queue, - CORE_message_queue_Buffer_control *the_message -) -{ - _Chain_Append( &the_message_queue->Pending_messages, &the_message->Node ); -} - -/*PAGE - * - * _CORE_message_queue_Prepend - * - * DESCRIPTION: - * - * This routine places the_message at the front of the outstanding - * messages on the_message_queue. - */ - -RTEMS_INLINE_ROUTINE void _CORE_message_queue_Prepend ( - CORE_message_queue_Control *the_message_queue, - CORE_message_queue_Buffer_control *the_message -) -{ - _Chain_Prepend( - &the_message_queue->Pending_messages, - &the_message->Node - ); -} - -/*PAGE - * - * _CORE_message_queue_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_message_queue is TRUE and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_message_queue_Is_null ( - CORE_message_queue_Control *the_message_queue -) -{ - return ( the_message_queue == NULL ); -} - -/*PAGE - * - * _CORE_message_queue_Is_notify_enabled - * - * DESCRIPTION: - * - * This function returns TRUE if notification is enabled on this message - * queue and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_message_queue_Is_notify_enabled ( - CORE_message_queue_Control *the_message_queue -) -{ - return (the_message_queue->notify_handler != NULL); -} - -/*PAGE - * - * _CORE_message_queue_Set_notify - * - * DESCRIPTION: - * - * This routine initializes the notification information for the_message_queue. - */ - -RTEMS_INLINE_ROUTINE void _CORE_message_queue_Set_notify ( - CORE_message_queue_Control *the_message_queue, - CORE_message_queue_Notify_Handler the_handler, - void *the_argument -) -{ - the_message_queue->notify_handler = the_handler; - the_message_queue->notify_argument = the_argument; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/coremutex.inl b/c/src/exec/score/inline/rtems/score/coremutex.inl deleted file mode 100644 index 21d7a12c05..0000000000 --- a/c/src/exec/score/inline/rtems/score/coremutex.inl +++ /dev/null @@ -1,124 +0,0 @@ -/* inline/coremutex.inl - * - * This include file contains all of the inlined routines associated - * with the CORE mutexes. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __INLINE_CORE_MUTEX_inl -#define __INLINE_CORE_MUTEX_inl - -/*PAGE - * - * _CORE_mutex_Is_locked - * - * DESCRIPTION: - * - * This routine returns TRUE if the mutex specified is locked and FALSE - * otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_locked( - CORE_mutex_Control *the_mutex -) -{ - return the_mutex->lock == CORE_MUTEX_LOCKED; -} - -/*PAGE - * - * _CORE_mutex_Is_fifo - * - * DESCRIPTION: - * - * This routine returns TRUE if the mutex's wait discipline is FIFO and FALSE - * otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_fifo( - CORE_mutex_Attributes *the_attribute -) -{ - return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_FIFO; -} - -/*PAGE - * - * _CORE_mutex_Is_priority - * - * DESCRIPTION: - * - * This routine returns TRUE if the mutex's wait discipline is PRIORITY and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_priority( - CORE_mutex_Attributes *the_attribute -) -{ - return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY; -} - -/*PAGE - * - * _CORE_mutex_Is_inherit_priority - * - * DESCRIPTION: - * - * This routine returns TRUE if the mutex's wait discipline is - * INHERIT_PRIORITY and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( - CORE_mutex_Attributes *the_attribute -) -{ - return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; -} - -/*PAGE - * - * _CORE_mutex_Is_priority_ceiling - * - * DESCRIPTION: - * - * This routine returns TRUE if the mutex's wait discipline is - * PRIORITY_CEILING and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_priority_ceiling( - CORE_mutex_Attributes *the_attribute -) -{ - return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; -} - -/*PAGE - * - * _CORE_mutex_Is_nesting_allowed - * - * DESCRIPTION: - * - * This routine returns TRUE if the mutex allows a task to obtain a - * semaphore more than once and nest. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_nesting_allowed( - CORE_mutex_Attributes *the_attribute -) -{ - return the_attribute->allow_nesting == TRUE; - -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/coresem.inl b/c/src/exec/score/inline/rtems/score/coresem.inl deleted file mode 100644 index 4f3a4e0834..0000000000 --- a/c/src/exec/score/inline/rtems/score/coresem.inl +++ /dev/null @@ -1,54 +0,0 @@ -/* inline/coresem.inl - * - * This include file contains all of the inlined routines associated - * with the CORE semaphore. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __INLINE_CORE_SEMAPHORE_inl -#define __INLINE_CORE_SEMAPHORE_inl - -/*PAGE - * - * _CORE_semaphore_Is_priority - * - * DESCRIPTION: - * - * This function returns TRUE if the priority attribute is - * enabled in the attribute_set and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _CORE_semaphore_Is_priority( - CORE_semaphore_Attributes *the_attribute -) -{ - return ( the_attribute->discipline == CORE_SEMAPHORE_DISCIPLINES_PRIORITY ); -} - -/*PAGE - * - * _CORE_semaphore_Get_count - * - * DESCRIPTION: - * - * This routine returns the current count associated with the semaphore. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _CORE_semaphore_Get_count( - CORE_semaphore_Control *the_semaphore -) -{ - return the_semaphore->count; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/heap.inl b/c/src/exec/score/inline/rtems/score/heap.inl deleted file mode 100644 index a02991a39d..0000000000 --- a/c/src/exec/score/inline/rtems/score/heap.inl +++ /dev/null @@ -1,274 +0,0 @@ -/* heap.inl - * - * This file contains the static inline implementation of the inlined - * routines from the heap handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __HEAP_inl -#define __HEAP_inl - -#include - -/*PAGE - * - * _Heap_Head - * - * DESCRIPTION: - * - * This function returns the head of the specified heap. - */ - -RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Head ( - Heap_Control *the_heap -) -{ - return (Heap_Block *)&the_heap->start; -} - -/*PAGE - * - * _Heap_Tail - * - * DESCRIPTION: - * - * This function returns the tail of the specified heap. - */ - -RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Tail ( - Heap_Control *the_heap -) -{ - return (Heap_Block *)&the_heap->final; -} - -/*PAGE - * - * _Heap_Previous_block - * - * DESCRIPTION: - * - * This function returns the address of the block which physically - * precedes the_block in memory. - */ - -RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Previous_block ( - Heap_Block *the_block -) -{ - return (Heap_Block *) _Addresses_Subtract_offset( - (void *)the_block, - the_block->back_flag & ~ HEAP_BLOCK_USED - ); -} - -/*PAGE - * - * _Heap_Next_block - * - * DESCRIPTION: - * - * This function returns the address of the block which physically - * follows the_block in memory. - * - * NOTE: Next_block assumes that the block is free. - */ - -RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Next_block ( - Heap_Block *the_block -) -{ - return (Heap_Block *) _Addresses_Add_offset( - (void *)the_block, - the_block->front_flag & ~ HEAP_BLOCK_USED - ); -} - -/*PAGE - * - * _Heap_Block_at - * - * DESCRIPTION: - * - * This function calculates and returns a block's location (address) - * in the heap based upad a base address and an offset. - */ - -RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( - void *base, - unsigned32 offset -) -{ - return (Heap_Block *) _Addresses_Add_offset( (void *)base, offset ); -} - -/*PAGE - * - * _Heap_User_block_at - * - * DESCRIPTION: - * - * XXX - */ - -RTEMS_INLINE_ROUTINE Heap_Block *_Heap_User_block_at( - void *base -) -{ - unsigned32 offset; - - offset = *(((unsigned32 *) base) - 1); - return _Heap_Block_at( base, -offset + -HEAP_BLOCK_USED_OVERHEAD); -} - -/*PAGE - * - * _Heap_Is_previous_block_free - * - * DESCRIPTION: - * - * This function returns TRUE if the previous block of the_block - * is free, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Heap_Is_previous_block_free ( - Heap_Block *the_block -) -{ - return !(the_block->back_flag & HEAP_BLOCK_USED); -} - -/*PAGE - * - * _Heap_Is_block_free - * - * DESCRIPTION: - * - * This function returns TRUE if the block is free, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Heap_Is_block_free ( - Heap_Block *the_block -) -{ - return !(the_block->front_flag & HEAP_BLOCK_USED); -} - -/*PAGE - * - * _Heap_Is_block_used - * - * DESCRIPTION: - * - * This function returns TRUE if the block is currently allocated, - * and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Heap_Is_block_used ( - Heap_Block *the_block -) -{ - return (the_block->front_flag & HEAP_BLOCK_USED); -} - -/*PAGE - * - * _Heap_Block_size - * - * DESCRIPTION: - * - * This function returns the size of the_block in bytes. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Heap_Block_size ( - Heap_Block *the_block -) -{ - return (the_block->front_flag & ~HEAP_BLOCK_USED); -} - -/*PAGE - * - * _Heap_Start_of_user_area - * - * DESCRIPTION: - * - * This function returns the starting address of the portion of the block - * which the user may access. - */ - -RTEMS_INLINE_ROUTINE void *_Heap_Start_of_user_area ( - Heap_Block *the_block -) -{ - return (void *) &the_block->next; -} - -/*PAGE - * - * _Heap_Is_block_in - * - * DESCRIPTION: - * - * This function returns TRUE if the_block is within the memory area - * managed by the_heap, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Heap_Is_block_in ( - Heap_Control *the_heap, - Heap_Block *the_block -) -{ - return _Addresses_Is_in_range( the_block, the_heap->start, the_heap->final ); -} - -/*PAGE - * - * _Heap_Is_page_size_valid - * - * DESCRIPTION: - * - * This function validates a specified heap page size. If the page size - * is 0 or if lies outside a page size alignment boundary it is invalid - * and FALSE is returned. Otherwise, the page size is valid and TRUE is - * returned. - */ - -RTEMS_INLINE_ROUTINE boolean _Heap_Is_page_size_valid( - unsigned32 page_size -) -{ - return ((page_size != 0) && - ((page_size % CPU_HEAP_ALIGNMENT) == 0)); -} - -/*PAGE - * - * _Heap_Build_flag - * - * DESCRIPTION: - * - * This function returns the block flag composed of size and in_use_flag. - * The flag returned is suitable for use as a back or front flag in a - * heap block. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Heap_Build_flag ( - unsigned32 size, - unsigned32 in_use_flag -) -{ - return size | in_use_flag; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/isr.inl b/c/src/exec/score/inline/rtems/score/isr.inl deleted file mode 100644 index a944711ff0..0000000000 --- a/c/src/exec/score/inline/rtems/score/isr.inl +++ /dev/null @@ -1,73 +0,0 @@ -/* isr.inl - * - * This include file contains the static implementation of all - * inlined routines in the Interrupt Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __ISR_inl -#define __ISR_inl - -/*PAGE - * - * _ISR_Is_in_progress - * - * DESCRIPTION: - * - * This function returns TRUE if the processor is currently servicing - * and interrupt and FALSE otherwise. A return value of TRUE indicates - * that the caller is an interrupt service routine, NOT a thread. The - * directives available to an interrupt service routine are restricted. - */ - -RTEMS_INLINE_ROUTINE boolean _ISR_Is_in_progress( void ) -{ - return (_ISR_Nest_level != 0); -} - -/*PAGE - * - * _ISR_Is_vector_number_valid - * - * DESCRIPTION: - * - * This function returns TRUE if the vector is a valid vector number - * for this processor and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _ISR_Is_vector_number_valid ( - unsigned32 vector -) -{ - return ( vector <= CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER ); -} - -/*PAGE - * - * _ISR_Is_valid_user_handler - * - * - * DESCRIPTION: - * - * This function returns TRUE if handler is the entry point of a valid - * use interrupt service routine and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _ISR_Is_valid_user_handler ( - void *handler -) -{ - return ( handler != NULL); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/mppkt.inl b/c/src/exec/score/inline/rtems/score/mppkt.inl deleted file mode 100644 index f6d4bdb52a..0000000000 --- a/c/src/exec/score/inline/rtems/score/mppkt.inl +++ /dev/null @@ -1,58 +0,0 @@ -/* inline/mppkt.inl - * - * This package is the implementation of the Packet Handler - * routines which are inlined. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __INLINE_MP_PACKET_inl -#define __INLINE_MP_PACKET_inl - -/*PAGE - * - * _Mp_packet_Is_valid_packet_class - * - * DESCRIPTION: - * - * This function returns TRUE if the the_packet_class is valid, - * and FALSE otherwise. - * - * NOTE: Check for lower bounds (MP_PACKET_CLASSES_FIRST ) is unnecessary - * because this enum starts at lower bound of zero. - */ - -RTEMS_INLINE_ROUTINE boolean _Mp_packet_Is_valid_packet_class ( - MP_packet_Classes the_packet_class -) -{ - return ( the_packet_class <= MP_PACKET_CLASSES_LAST ); -} - -/*PAGE - * - * _Mp_packet_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the the_packet_class is null, - * and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Mp_packet_Is_null ( - MP_packet_Prefix *the_packet -) -{ - return the_packet == NULL; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/object.inl b/c/src/exec/score/inline/rtems/score/object.inl deleted file mode 100644 index 4277eb2f02..0000000000 --- a/c/src/exec/score/inline/rtems/score/object.inl +++ /dev/null @@ -1,244 +0,0 @@ -/* object.inl - * - * This include file contains the static inline implementation of all - * of the inlined routines in the Object Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __OBJECTS_inl -#define __OBJECTS_inl - -/*PAGE - * - * _Objects_Build_id - * - * DESCRIPTION: - * - * This function builds an object's id from the processor node and index - * values specified. - */ - -RTEMS_INLINE_ROUTINE Objects_Id _Objects_Build_id( - Objects_Classes the_class, - unsigned32 node, - unsigned32 index -) -{ - return ( (the_class << OBJECTS_CLASS_START_BIT) | - (node << OBJECTS_NODE_START_BIT) | - (index << OBJECTS_INDEX_START_BIT) ); -} - -/*PAGE - * - * _Objects_Get_class - * - * DESCRIPTION: - * - * This function returns the class portion of the ID. - */ - -RTEMS_INLINE_ROUTINE Objects_Classes _Objects_Get_class( - Objects_Id id -) -{ - return (Objects_Classes) - ((id >> OBJECTS_CLASS_START_BIT) & OBJECTS_CLASS_VALID_BITS); -} - - -/*PAGE - * - * _Objects_Get_node - * - * DESCRIPTION: - * - * This function returns the node portion of the ID. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Objects_Get_node( - Objects_Id id -) -{ - return (id >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS; -} - -/*PAGE - * - * _Objects_Get_index - * - * DESCRIPTION: - * - * This function returns the index portion of the ID. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Objects_Get_index( - Objects_Id id -) -{ - return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS; -} - -/*PAGE - * - * _Objects_Is_class_valid - * - * DESCRIPTION: - * - * This function returns TRUE if the class is valid. - */ - -RTEMS_INLINE_ROUTINE boolean _Objects_Is_class_valid( - Objects_Classes the_class -) -{ - return the_class <= OBJECTS_CLASSES_LAST; -} - -/*PAGE - * - * _Objects_Is_local_node - * - * DESCRIPTION: - * - * This function returns TRUE if the node is of the local object, and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Objects_Is_local_node( - unsigned32 node -) -{ - return ( node == _Objects_Local_node ); -} - -/*PAGE - * - * _Objects_Is_local_id - * - * DESCRIPTION: - * - * This function returns TRUE if the id is of a local object, and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Objects_Is_local_id( - Objects_Id id -) -{ - return _Objects_Is_local_node( _Objects_Get_node(id) ); -} - -/*PAGE - * - * _Objects_Are_ids_equal - * - * DESCRIPTION: - * - * This function returns TRUE if left and right are equal, - * and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Objects_Are_ids_equal( - Objects_Id left, - Objects_Id right -) -{ - return ( left == right ); -} - -/*PAGE - * - * _Objects_Allocate - * - * DESCRIPTION: - * - * This function allocates a object control block from - * the inactive chain of free object control blocks. - */ - -RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Allocate( - Objects_Information *information -) -{ - return (Objects_Control *) _Chain_Get( &information->Inactive ); -} - -/*PAGE - * - * _Objects_Free - * - * DESCRIPTION: - * - * This function frees a object control block to the - * inactive chain of free object control blocks. - */ - -RTEMS_INLINE_ROUTINE void _Objects_Free( - Objects_Information *information, - Objects_Control *the_object -) -{ - _Chain_Append( &information->Inactive, &the_object->Node ); -} - -/*PAGE - * - * _Objects_Open - * - * DESCRIPTION: - * - * This function places the_object control pointer and object name - * in the Local Pointer and Local Name Tables, respectively. - */ - -RTEMS_INLINE_ROUTINE void _Objects_Open( - Objects_Information *information, - Objects_Control *the_object, - Objects_Name name -) -{ - unsigned32 index; - - index = _Objects_Get_index( the_object->id ); - information->local_table[ index ] = the_object; - - if ( information->is_string ) - _Objects_Copy_name_string( name, the_object->name ); - else - _Objects_Copy_name_raw( name, the_object->name, information->name_length ); -} - -/*PAGE - * - * _Objects_Close - * - * DESCRIPTION: - * - * This function removes the_object control pointer and object name - * in the Local Pointer and Local Name Tables. - */ - -RTEMS_INLINE_ROUTINE void _Objects_Close( - Objects_Information *information, - Objects_Control *the_object -) -{ - unsigned32 index; - - index = _Objects_Get_index( the_object->id ); - information->local_table[ index ] = NULL; - _Objects_Clear_name( the_object->name, information->name_length ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/objectmp.inl b/c/src/exec/score/inline/rtems/score/objectmp.inl deleted file mode 100644 index 51ec7ec154..0000000000 --- a/c/src/exec/score/inline/rtems/score/objectmp.inl +++ /dev/null @@ -1,73 +0,0 @@ -/* inline/objectmp.inl - * - * This include file contains the bodies of all inlined routines - * which deal with global objects. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __INLINE_MP_OBJECTS_inl -#define __INLINE_MP_OBJECTS_inl - -/*PAGE - * - * _Objects_MP_Allocate_global_object - * - * DESCRIPTION: - * - * This function allocates a Global Object control block. - */ - -RTEMS_INLINE_ROUTINE Objects_MP_Control *_Objects_MP_Allocate_global_object ( - void -) -{ - return (Objects_MP_Control *) - _Chain_Get( &_Objects_MP_Inactive_global_objects ); -} - -/*PAGE - * - * _Objects_MP_Free_global_object - * - * DESCRIPTION: - * - * This routine deallocates a Global Object control block. - */ - -RTEMS_INLINE_ROUTINE void _Objects_MP_Free_global_object ( - Objects_MP_Control *the_object -) -{ - _Chain_Append( - &_Objects_MP_Inactive_global_objects, - &the_object->Object.Node - ); -} - -/*PAGE - * - * _Objects_MP_Is_null_global_object - * - * DESCRIPTION: - * - * This function returns whether the global object is NULL or not. - */ - -RTEMS_INLINE_ROUTINE boolean _Objects_MP_Is_null_global_object ( - Objects_MP_Control *the_object -) -{ - return( the_object == NULL ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/priority.inl b/c/src/exec/score/inline/rtems/score/priority.inl deleted file mode 100644 index 266903724c..0000000000 --- a/c/src/exec/score/inline/rtems/score/priority.inl +++ /dev/null @@ -1,247 +0,0 @@ -/* priority.inl - * - * This file contains the static inline implementation of all inlined - * routines in the Priority Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __PRIORITY_inl -#define __PRIORITY_inl - -#include - -/*PAGE - * - * _Priority_Handler_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this handler. - */ - -RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) -{ - unsigned32 index; - - _Priority_Major_bit_map = 0; - for ( index=0 ; index <16 ; index++ ) - _Priority_Bit_map[ index ] = 0; -} - -/*PAGE - * - * _Priority_Is_valid - * - * DESCRIPTION: - * - * This function returns TRUE if the_priority if valid for a - * user task, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Priority_Is_valid ( - Priority_Control the_priority -) -{ - /* - * Since PRIORITY_MINIMUM is 0 and priorities are stored unsigned, - * then checking for less than 0 is unnecessary. - */ - - return ( the_priority <= PRIORITY_MAXIMUM ); -} - -/*PAGE - * - * _Priority_Major - * - * DESCRIPTION: - * - * This function returns the major portion of the_priority. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Priority_Major ( - Priority_Control the_priority -) -{ - return ( the_priority / 16 ); -} - -/*PAGE - * - * _Priority_Minor - * - * DESCRIPTION: - * - * This function returns the minor portion of the_priority. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Priority_Minor ( - Priority_Control the_priority -) -{ - return ( the_priority % 16 ); -} - -#if ( CPU_USE_GENERIC_BITFIELD_CODE == TRUE ) - -/*PAGE - * - * _Priority_Mask - * - * DESCRIPTION: - * - * This function returns the mask associated with the major or minor - * number passed to it. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Priority_Mask ( - unsigned32 bit_number -) -{ - return (0x8000 >> bit_number); -} - - -/*PAGE - * - * _Priority_Bits_index - * - * DESCRIPTION: - * - * This function translates the bit numbers returned by the bit scan - * of a priority bit field into something suitable for use as - * a major or minor component of a priority. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Priority_Bits_index ( - unsigned32 bit_number -) -{ - return bit_number; -} - -#endif - -/*PAGE - * - * _Priority_Add_to_bit_map - * - * DESCRIPTION: - * - * This routine uses the_priority_map to update the priority - * bit maps to indicate that a thread has been readied. - */ - -RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( - Priority_Information *the_priority_map -) -{ - *the_priority_map->minor |= the_priority_map->ready_minor; - _Priority_Major_bit_map |= the_priority_map->ready_major; -} - -/*PAGE - * - * _Priority_Remove_from_bit_map - * - * DESCRIPTION: - * - * This routine uses the_priority_map to update the priority - * bit maps to indicate that a thread has been removed from the - * ready state. - */ - -RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( - Priority_Information *the_priority_map -) -{ - *the_priority_map->minor &= the_priority_map->block_minor; - if ( *the_priority_map->minor == 0 ) - _Priority_Major_bit_map &= the_priority_map->block_major; -} - -/*PAGE - * - * _Priority_Get_highest - * - * DESCRIPTION: - * - * This function returns the priority of the highest priority - * ready thread. - */ - -RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) -{ - Priority_Bit_map_control minor; - Priority_Bit_map_control major; - - _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); - _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); - - return (_Priority_Bits_index( major ) << 4) + - _Priority_Bits_index( minor ); -} - -/*PAGE - * - * _Priority_Initialize_information - * - * DESCRIPTION: - * - * This routine initializes the_priority_map so that it - * contains the information necessary to manage a thread - * at new_priority. - */ - -RTEMS_INLINE_ROUTINE void _Priority_Initialize_information( - Priority_Information *the_priority_map, - Priority_Control new_priority -) -{ - Priority_Bit_map_control major; - Priority_Bit_map_control minor; - Priority_Bit_map_control mask; - - major = _Priority_Major( new_priority ); - minor = _Priority_Minor( new_priority ); - - the_priority_map->minor = - &_Priority_Bit_map[ _Priority_Bits_index(major) ]; - - mask = _Priority_Mask( major ); - the_priority_map->ready_major = mask; - the_priority_map->block_major = ~mask; - - mask = _Priority_Mask( minor ); - the_priority_map->ready_minor = mask; - the_priority_map->block_minor = ~mask; -} - -/*PAGE - * - * _Priority_Is_group_empty - * - * DESCRIPTION: - * - * This function returns TRUE if the priority GROUP is empty, and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Priority_Is_group_empty ( - Priority_Control the_priority -) -{ - return the_priority == 0; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/stack.inl b/c/src/exec/score/inline/rtems/score/stack.inl deleted file mode 100644 index b344ad5cc7..0000000000 --- a/c/src/exec/score/inline/rtems/score/stack.inl +++ /dev/null @@ -1,81 +0,0 @@ -/* stack.inl - * - * This file contains the static inline implementation of the inlined - * routines from the Stack Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __STACK_inl -#define __STACK_inl - -/*PAGE - * - * _Stack_Initialize - * - * DESCRIPTION: - * - * This routine initializes the_stack record to indicate that - * size bytes of memory starting at starting_address have been - * reserved for a stack. - */ - -RTEMS_INLINE_ROUTINE void _Stack_Initialize ( - Stack_Control *the_stack, - void *starting_address, - unsigned32 size -) -{ - the_stack->area = starting_address; - the_stack->size = size; -} - -/*PAGE - * - * _Stack_Is_enough - * - * DESCRIPTION: - * - * This function returns TRUE if size bytes is enough memory for - * a valid stack area on this processor, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Stack_Is_enough ( - unsigned32 size -) -{ - return ( size >= STACK_MINIMUM_SIZE ); -} - -/*PAGE - * - * _Stack_Adjust_size - * - * DESCRIPTION: - * - * This function increases the stack size to insure that the thread - * has the desired amount of stack space after the initial stack - * pointer is determined based on alignment restrictions. - * - * NOTE: - * - * The amount of adjustment for alignment is CPU dependent. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Stack_Adjust_size ( - unsigned32 size -) -{ - return size + CPU_STACK_ALIGNMENT; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/states.inl b/c/src/exec/score/inline/rtems/score/states.inl deleted file mode 100644 index 555972c19c..0000000000 --- a/c/src/exec/score/inline/rtems/score/states.inl +++ /dev/null @@ -1,384 +0,0 @@ -/* states.inl - * - * This file contains the macro implementation of the inlined - * routines associated with thread state information. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __STATES_inl -#define __STATES_inl - -/*PAGE - * - * _States_Set - * - * DESCRIPTION: - * - * This function sets the given states_to_set into the current_state - * passed in. The result is returned to the user in current_state. - */ - -RTEMS_INLINE_ROUTINE States_Control _States_Set ( - States_Control states_to_set, - States_Control current_state -) -{ - return (current_state | states_to_set); -} - -/*PAGE - * - * _States_Clear - * - * DESCRIPTION: - * - * This function clears the given states_to_clear into the current_state - * passed in. The result is returned to the user in current_state. - */ - -RTEMS_INLINE_ROUTINE States_Control _States_Clear ( - States_Control states_to_clear, - States_Control current_state -) -{ - return (current_state & ~states_to_clear); -} - -/*PAGE - * - * _States_Is_ready - * - * DESCRIPTION: - * - * This function returns TRUE if the_states indicates that the - * state is READY, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_ready ( - States_Control the_states -) -{ - return (the_states == STATES_READY); -} - -/*PAGE - * - * _States_Is_only_dormant - * - * DESCRIPTION: - * - * This function returns TRUE if the DORMANT state is the ONLY state - * set in the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_only_dormant ( - States_Control the_states -) -{ - return (the_states == STATES_DORMANT); -} - -/*PAGE - * - * _States_Is_dormant - * - * DESCRIPTION: - * - * This function returns TRUE if the DORMANT state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_dormant ( - States_Control the_states -) -{ - return (the_states & STATES_DORMANT); -} - -/*PAGE - * - * _States_Is_suspended - * - * DESCRIPTION: - * - * This function returns TRUE if the SUSPENDED state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_suspended ( - States_Control the_states -) -{ - return (the_states & STATES_SUSPENDED); -} - -/*PAGE - * - * _States_Is_Transient - * - * DESCRIPTION: - * - * This function returns TRUE if the TRANSIENT state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_transient ( - States_Control the_states -) -{ - return (the_states & STATES_TRANSIENT); -} - -/*PAGE - * - * _States_Is_delaying - * - * DESCRIPTION: - * - * This function returns TRUE if the DELAYING state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_delaying ( - States_Control the_states -) -{ - return (the_states & STATES_DELAYING); -} - -/*PAGE - * - * _States_Is_waiting_for_buffer - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_BUFFER state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_buffer ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_FOR_BUFFER); -} - -/*PAGE - * - * _States_Is_waiting_for_segment - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_SEGMENT state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_segment ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_FOR_SEGMENT); -} - -/*PAGE - * - * _States_Is_waiting_for_message - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_MESSAGE state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_message ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_FOR_MESSAGE); -} - -/*PAGE - * - * _States_Is_waiting_for_event - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_EVENT state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_event ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_FOR_EVENT); -} - -/*PAGE - * - * _States_Is_waiting_for_mutex - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_MUTEX state - * is set in the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_mutex ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_FOR_MUTEX); -} - -/*PAGE - * - * _States_Is_waiting_for_semaphore - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_SEMAPHORE state - * is set in the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_semaphore ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_FOR_SEMAPHORE); -} - -/*PAGE - * - * _States_Is_waiting_for_time - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_TIME state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_time ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_FOR_TIME); -} - -/*PAGE - * - * _States_Is_waiting_for_rpc_reply - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_TIME state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_rpc_reply ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_FOR_RPC_REPLY); -} - -/*PAGE - * - * _States_Is_waiting_for_period - * - * DESCRIPTION: - * - * This function returns TRUE if the WAITING_FOR_PERIOD state is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_for_period ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_FOR_PERIOD); -} - -/*PAGE - * - * _States_Is_locally_blocked - * - * DESCRIPTION: - * - * This function returns TRUE if one of the states which indicates - * that a task is blocked waiting for a local resource is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_locally_blocked ( - States_Control the_states -) -{ - return (the_states & STATES_LOCALLY_BLOCKED); -} - -/*PAGE - * - * _States_Is_waiting_on_thread_queue - * - * DESCRIPTION: - * - * This function returns TRUE if one of the states which indicates - * that a task is blocked waiting for a local resource is set in - * the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_waiting_on_thread_queue ( - States_Control the_states -) -{ - return (the_states & STATES_WAITING_ON_THREAD_QUEUE); -} - -/*PAGE - * - * _States_Is_blocked - * - * DESCRIPTION: - * - * This function returns TRUE if one of the states which indicates - * that a task is blocked is set in the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Is_blocked ( - States_Control the_states -) -{ - return (the_states & STATES_BLOCKED); -} - -/*PAGE - * - * - * _States_Are_set - * - * DESCRIPTION: - * - * This function returns TRUE if any of the states in the mask - * are set in the_states, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _States_Are_set ( - States_Control the_states, - States_Control mask -) -{ - return ( (the_states & mask) != STATES_READY); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/sysstate.inl b/c/src/exec/score/inline/rtems/score/sysstate.inl deleted file mode 100644 index 43a9cea308..0000000000 --- a/c/src/exec/score/inline/rtems/score/sysstate.inl +++ /dev/null @@ -1,154 +0,0 @@ -/* sysstates.inl - * - * This file contains the inline implementation of routines regarding the - * system state. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __SYSTEM_STATE_inl -#define __SYSTEM_STATE_inl - -/*PAGE - * - * _System_state_Handler_initialization - * - * DESCRIPTION: - * - * This routine initializes the system state handler. - */ - -RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization ( - boolean is_multiprocessing -) -{ - _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION; - _System_state_Is_multiprocessing = is_multiprocessing; -} - -/*PAGE - * - * _System_state_Set - * - * DESCRIPTION: - * - * This routine sets the current system state to that specified by - * the called. - */ - -RTEMS_INLINE_ROUTINE void _System_state_Set ( - System_state_Codes state -) -{ - _System_state_Current = state; -} - -/*PAGE - * - * _System_state_Get - * - * DESCRIPTION: - * - * This function returns the current system state. - */ - -RTEMS_INLINE_ROUTINE System_state_Codes _System_state_Get ( void ) -{ - return _System_state_Current; -} - -/*PAGE - * - * _System_state_Is_before_initialization - * - * DESCRIPTION: - * - * This function returns TRUE if the state is equal to the - * "before initialization" state, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _System_state_Is_before_initialization ( - System_state_Codes state -) -{ - return (state == SYSTEM_STATE_BEFORE_INITIALIZATION); -} - -/*PAGE - * - * _System_state_Is_before_multitasking - * - * DESCRIPTION: - * - * This function returns TRUE if the state is equal to the - * "before multitasking" state, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _System_state_Is_before_multitasking ( - System_state_Codes state -) -{ - return (state == SYSTEM_STATE_BEFORE_MULTITASKING); -} - -/*PAGE - * - * _System_state_Is_begin_multitasking - * - * DESCRIPTION: - * - * This function returns TRUE if the state is equal to the - * "begin multitasking" state, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _System_state_Is_begin_multitasking ( - System_state_Codes state -) -{ - return (state == SYSTEM_STATE_BEGIN_MULTITASKING); -} - -/*PAGE - * - * _System_state_Is_up - * - * DESCRIPTION: - * - * This function returns TRUE if the state is equal to the - * "up" state, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _System_state_Is_up ( - System_state_Codes state -) -{ - return (state == SYSTEM_STATE_UP); -} - -/*PAGE - * - * _System_state_Is_failed - * - * DESCRIPTION: - * - * This function returns TRUE if the state is equal to the - * "failed" state, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _System_state_Is_failed ( - System_state_Codes state -) -{ - return (state == SYSTEM_STATE_FAILED); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/thread.inl b/c/src/exec/score/inline/rtems/score/thread.inl deleted file mode 100644 index 573eb5bb35..0000000000 --- a/c/src/exec/score/inline/rtems/score/thread.inl +++ /dev/null @@ -1,404 +0,0 @@ -/* thread.inl - * - * This file contains the macro implementation of the inlined - * routines from the Thread handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __THREAD_inl -#define __THREAD_inl - -/*PAGE - * - * _Thread_Stop_multitasking - * - * DESCRIPTION: - * - * This routine halts multitasking and returns control to - * the "thread" (i.e. the BSP) which initially invoked the - * routine which initialized the system. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Stop_multitasking( void ) -{ - _Context_Switch( &_Thread_Executing->Registers, &_Thread_BSP_context ); -} - -/*PAGE - * - * _Thread_Is_executing - * - * DESCRIPTION: - * - * This function returns TRUE if the_thread is the currently executing - * thread, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_Is_executing ( - Thread_Control *the_thread -) -{ - return ( the_thread == _Thread_Executing ); -} - -/*PAGE - * - * _Thread_Is_heir - * - * DESCRIPTION: - * - * This function returns TRUE if the_thread is the heir - * thread, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_Is_heir ( - Thread_Control *the_thread -) -{ - return ( the_thread == _Thread_Heir ); -} - -/*PAGE - * - * _Thread_Is_executing_also_the_heir - * - * DESCRIPTION: - * - * This function returns TRUE if the currently executing thread - * is also the heir thread, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_Is_executing_also_the_heir( void ) -{ - return ( _Thread_Executing == _Thread_Heir ); -} - -/*PAGE - * - * _Thread_Resume - * - * DESCRIPTION: - * - * This routine clears the SUSPENDED state for the_thread. It performs - * any necessary scheduling operations including the selection of - * a new heir thread. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Resume ( - Thread_Control *the_thread -) -{ - _Thread_Clear_state( the_thread, STATES_SUSPENDED ); -} - -/*PAGE - * - * _Thread_Unblock - * - * DESCRIPTION: - * - * This routine clears any blocking state for the_thread. It performs - * any necessary scheduling operations including the selection of - * a new heir thread. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Unblock ( - Thread_Control *the_thread -) -{ - _Thread_Clear_state( the_thread, STATES_BLOCKED ); -} - -/*PAGE - * - * _Thread_Restart_self - * - * DESCRIPTION: - * - * This routine resets the current context of the calling thread - * to that of its initial state. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) -{ - if ( _Thread_Executing->fp_context != NULL ) - _Context_Restore_fp( &_Thread_Executing->fp_context ); - - _CPU_Context_Restart_self( &_Thread_Executing->Registers ); -} - -/*PAGE - * - * _Thread_Calculate_heir - * - * DESCRIPTION: - * - * This function returns a pointer to the highest priority - * ready thread. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) -{ - _Thread_Heir = (Thread_Control *) - _Thread_Ready_chain[ _Priority_Get_highest() ].first; -} - -/*PAGE - * - * _Thread_Is_allocated_fp - * - * DESCRIPTION: - * - * This function returns TRUE if the floating point context of - * the_thread is currently loaded in the floating point unit, and - * FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_Is_allocated_fp ( - Thread_Control *the_thread -) -{ - return ( the_thread == _Thread_Allocated_fp ); -} - -/*PAGE - * - * _Thread_Deallocate_fp - * - * DESCRIPTION: - * - * This routine is invoked when the currently loaded floating - * point context is now longer associated with an active thread. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) -{ - _Thread_Allocated_fp = NULL; -} - -/*PAGE - * - * _Thread_Disable_dispatch - * - * DESCRIPTION: - * - * This routine prevents dispatching. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void ) -{ - _Thread_Dispatch_disable_level += 1; -} - -/*PAGE - * - * _Thread_Enable_dispatch - * - * DESCRIPTION: - * - * This routine allows dispatching to occur again. If this is - * the outer most dispatching critical section, then a dispatching - * operation will be performed and, if necessary, control of the - * processor will be transferred to the heir thread. - */ - -#if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) -RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() -{ - if ( (--_Thread_Dispatch_disable_level) == 0 ) - _Thread_Dispatch(); -} -#endif - -#if ( CPU_INLINE_ENABLE_DISPATCH == FALSE ) -void _Thread_Enable_dispatch( void ); -#endif - -/*PAGE - * - * _Thread_Unnest_dispatch - * - * DESCRIPTION: - * - * This routine allows dispatching to occur again. However, - * no dispatching operation is performed even if this is the outer - * most dispatching critical section. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) -{ - _Thread_Dispatch_disable_level -= 1; -} - -/*PAGE - * - * _Thread_Is_dispatching_enabled - * - * DESCRIPTION: - * - * This function returns TRUE if dispatching is disabled, and FALSE - * otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_Is_dispatching_enabled( void ) -{ - return ( _Thread_Dispatch_disable_level == 0 ); -} - -/*PAGE - * - * _Thread_Is_context_switch_necessary - * - * DESCRIPTION: - * - * This function returns TRUE if dispatching is disabled, and FALSE - * otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_Is_context_switch_necessary( void ) -{ - return ( _Context_Switch_necessary ); -} - -/*PAGE - * - * _Thread_Dispatch_initialization - * - * DESCRIPTION: - * - * This routine initializes the thread dispatching subsystem. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) -{ - _Thread_Dispatch_disable_level = 1; -} - -/*PAGE - * - * _Thread_Is_null - * - * DESCRIPTION: - * - * This function returns TRUE if the_thread is NULL and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_Is_null ( - Thread_Control *the_thread -) -{ - return ( the_thread == NULL ); -} - -/*PAGE - * - * _Thread_Get - * - * DESCRIPTION: - * - * This function maps thread IDs to thread control - * blocks. If ID corresponds to a local thread, then it - * returns the_thread control pointer which maps to ID - * and location is set to OBJECTS_LOCAL. If the thread ID is - * global and resides on a remote node, then location is set - * to OBJECTS_REMOTE, and the_thread is undefined. - * Otherwise, location is set to OBJECTS_ERROR and - * the_thread is undefined. - * - * NOTE: XXX... This routine may be able to be optimized. - */ - -RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Get ( - Objects_Id id, - Objects_Locations *location -) -{ - Objects_Classes the_class; - Objects_Information *information; - Thread_Control *tp = (Thread_Control *) 0; - - if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { - _Thread_Disable_dispatch(); - *location = OBJECTS_LOCAL; - tp = _Thread_Executing; - goto done; - } - - the_class = _Objects_Get_class( id ); - - if ( the_class > OBJECTS_CLASSES_LAST ) { - *location = OBJECTS_ERROR; - goto done; - } - - information = _Objects_Information_table[ the_class ]; - - if ( !information || !information->is_thread ) { - *location = OBJECTS_ERROR; - goto done; - } - - tp = (Thread_Control *) _Objects_Get( information, id, location ); - -done: - return tp; -} - - -/* - * _Thread_Is_proxy_blocking - * - * DESCRIPTION: - * - * This function returns TRUE if the status code is equal to the - * status which indicates that a proxy is blocking, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_Is_proxy_blocking ( - unsigned32 code -) -{ - return (code == THREAD_STATUS_PROXY_BLOCKING); -} - -/*PAGE - * - * _Thread_Internal_allocate - * - * DESCRIPTION: - * - * This routine allocates an internal thread. - */ - -RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) -{ - return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); -} - -/*PAGE - * - * _Thread_Internal_free - * - * DESCRIPTION: - * - * This routine frees an internal thread. - */ - -RTEMS_INLINE_ROUTINE void _Thread_Internal_free ( - Thread_Control *the_task -) -{ - _Objects_Free( &_Thread_Internal_information, &the_task->Object ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/threadmp.inl b/c/src/exec/score/inline/rtems/score/threadmp.inl deleted file mode 100644 index 0451baf35e..0000000000 --- a/c/src/exec/score/inline/rtems/score/threadmp.inl +++ /dev/null @@ -1,61 +0,0 @@ -/* inline/threadmp.inl - * - * This include file contains the bodies of all inlined routines - * for the multiprocessing part of thread package. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __INLINE_MP_THREAD_inl -#define __INLINE_MP_THREAD_inl - -/*PAGE - * - * _Thread_MP_Is_receive - * - * DESCRIPTION: - * - * This function returns true if the thread in question is the - * multiprocessing receive thread. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_MP_Is_receive ( - Thread_Control *the_thread -) -{ - return the_thread == _Thread_MP_Receive; -} - -/*PAGE - * - * _Thread_MP_Free_proxy - * - * DESCRIPTION: - * - * This routine frees a proxy control block to the - * inactive chain of free proxy control blocks. - */ - -RTEMS_INLINE_ROUTINE void _Thread_MP_Free_proxy ( - Thread_Control *the_thread -) -{ - Thread_Proxy_control *the_proxy; - - the_proxy = (Thread_Proxy_control *) the_thread; - - _Chain_Extract( &the_proxy->Active ); - - _Chain_Append( &_Thread_MP_Inactive_proxies, &the_thread->Object.Node ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/tod.inl b/c/src/exec/score/inline/rtems/score/tod.inl deleted file mode 100644 index 5fa9193419..0000000000 --- a/c/src/exec/score/inline/rtems/score/tod.inl +++ /dev/null @@ -1,67 +0,0 @@ -/* tod.inl - * - * This file contains the static inline implementation of the inlined routines - * from the Time of Day Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __TIME_OF_DAY_inl -#define __TIME_OF_DAY_inl - -/*PAGE - * - * _TOD_Tickle_ticks - * - * DESCRIPTION: - * - * This routine increments the ticks field of the current time of - * day at each clock tick. - */ - -RTEMS_INLINE_ROUTINE void _TOD_Tickle_ticks( void ) -{ - _TOD_Current.ticks += 1; - _Watchdog_Ticks_since_boot += 1; -} - -/*PAGE - * - * _TOD_Deactivate - * - * DESCRIPTION: - * - * This routine deactivates updating of the current time of day. - */ - -RTEMS_INLINE_ROUTINE void _TOD_Deactivate( void ) -{ - _Watchdog_Remove( &_TOD_Seconds_watchdog ); -} - -/*PAGE - * - * _TOD_Activate - * - * DESCRIPTION: - * - * This routine activates updating of the current time of day. - */ - -RTEMS_INLINE_ROUTINE void _TOD_Activate( - Watchdog_Interval ticks -) -{ - _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, ticks ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/tqdata.inl b/c/src/exec/score/inline/rtems/score/tqdata.inl deleted file mode 100644 index 233c02ce3a..0000000000 --- a/c/src/exec/score/inline/rtems/score/tqdata.inl +++ /dev/null @@ -1,73 +0,0 @@ -/* tqdata.inl - * - * This file contains the static inline implementation of the inlined - * routines needed to support the Thread Queue Data. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __THREAD_QUEUE_DATA_inl -#define __THREAD_QUEUE_DATA_inl - -/*PAGE - * - * _Thread_queue_Header_number - * - * DESCRIPTION: - * - * This function returns the index of the priority chain on which - * a thread of the_priority should be placed. - */ - -RTEMS_INLINE_ROUTINE unsigned32 _Thread_queue_Header_number ( - Priority_Control the_priority -) -{ - return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); -} - -/*PAGE - * - * _Thread_queue_Is_reverse_search - * - * DESCRIPTION: - * - * This function returns TRUE if the_priority indicates that the - * enqueue search should start at the front of this priority - * group chain, and FALSE if the search should start at the rear. - */ - -RTEMS_INLINE_ROUTINE boolean _Thread_queue_Is_reverse_search ( - Priority_Control the_priority -) -{ - return ( the_priority & TASK_QUEUE_DATA_REVERSE_SEARCH_MASK ); -} - -/*PAGE - * - * _Thread_queue_Enter_critical_section - * - * DESCRIPTION: - * - * This routine is invoked to indicate that the specified thread queue is - * entering a critical section. - */ - -RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( - Thread_queue_Control *the_thread_queue -) -{ - the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/userext.inl b/c/src/exec/score/inline/rtems/score/userext.inl deleted file mode 100644 index dd08c46b49..0000000000 --- a/c/src/exec/score/inline/rtems/score/userext.inl +++ /dev/null @@ -1,121 +0,0 @@ -/* userext.inl - * - * This file contains the macro implementation of the inlined routines - * from the User Extension Handler - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __USER_EXTENSIONS_inl -#define __USER_EXTENSIONS_inl - -/*PAGE - * - * _User_extensions_Handler_initialization - * - * DESCRIPTION: - * - * This routine performs the initialization necessary for this handler. - */ - -RTEMS_INLINE_ROUTINE void _User_extensions_Handler_initialization ( - User_extensions_Table *initial_extensions -) -{ - _Chain_Initialize_empty( &_User_extensions_List ); - - if ( initial_extensions ) { - _User_extensions_Initial.Callouts = *initial_extensions; - _Chain_Append( &_User_extensions_List, &_User_extensions_Initial.Node ); - } -} - -/*PAGE - * - * _User_extensions_Add_set - * - * DESCRIPTION: - * - * This routine is used to add a user extension set to the active list. - */ - -RTEMS_INLINE_ROUTINE void _User_extensions_Add_set ( - User_extensions_Control *the_extension, - User_extensions_Table *extension_table -) -{ - the_extension->Callouts = *extension_table; - - _Chain_Append( &_User_extensions_List, &the_extension->Node ); -} - -/*PAGE - * - * _User_extensions_Add_API_set - * DESCRIPTION: - * - * This routine is used to add an API extension set to the active list. - */ - -RTEMS_INLINE_ROUTINE void _User_extensions_Add_API_set ( - User_extensions_Control *the_extension -) -{ - _Chain_Prepend( &_User_extensions_List, &the_extension->Node ); -} - -/*PAGE - * - * _User_extensions_Remove_set - * - * DESCRIPTION: - * - * This routine is used to remove a user extension set from the active list. - */ - -RTEMS_INLINE_ROUTINE void _User_extensions_Remove_set ( - User_extensions_Control *the_extension -) -{ - _Chain_Extract( &the_extension->Node ); -} - -/*PAGE - * - * _User_extensions_Thread_switch - * - * DESCRIPTION: - * - * This routine is used to invoke the user extension which - * is invoked when a context switch occurs. - */ - -RTEMS_INLINE_ROUTINE void _User_extensions_Thread_switch ( - Thread_Control *executing, - Thread_Control *heir -) -{ - Chain_Node *the_node; - User_extensions_Control *the_extension; - - for ( the_node = _User_extensions_List.first ; - !_Chain_Is_tail( &_User_extensions_List, the_node ) ; - the_node = the_node->next ) { - - the_extension = (User_extensions_Control *) the_node; - - if ( the_extension->Callouts.thread_switch != NULL ) - (*the_extension->Callouts.thread_switch)( executing, heir ); - } -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/watchdog.inl b/c/src/exec/score/inline/rtems/score/watchdog.inl deleted file mode 100644 index 5a429c3db0..0000000000 --- a/c/src/exec/score/inline/rtems/score/watchdog.inl +++ /dev/null @@ -1,324 +0,0 @@ -/* watchdog.inl - * - * This file contains the static inline implementation of all inlined - * routines in the Watchdog Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __WATCHDOG_inl -#define __WATCHDOG_inl - -/*PAGE - * - * _Watchdog_Initialize - * - * DESCRIPTION: - * - * This routine initializes the specified watchdog. The watchdog is - * made inactive, the watchdog id and handler routine are set to the - * specified values. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Initialize( - Watchdog_Control *the_watchdog, - Watchdog_Service_routine_entry routine, - Objects_Id id, - void *user_data -) -{ - the_watchdog->state = WATCHDOG_INACTIVE; - the_watchdog->routine = routine; - the_watchdog->id = id; - the_watchdog->user_data = user_data; -} - -/*PAGE - * - * _Watchdog_Is_active - * - * DESCRIPTION: - * - * This routine returns TRUE if the watchdog timer is in the ACTIVE - * state, and FALSE otherwise. - */ - -RTEMS_INLINE_ROUTINE boolean _Watchdog_Is_active( - Watchdog_Control *the_watchdog -) -{ - - return ( the_watchdog->state == WATCHDOG_ACTIVE ); - -} - -/*PAGE - * - * _Watchdog_Activate - * - * DESCRIPTION: - * - * This routine activates THE_WATCHDOG timer which is already - * on a watchdog chain. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Activate( - Watchdog_Control *the_watchdog -) -{ - - the_watchdog->state = WATCHDOG_ACTIVE; - -} - -/*PAGE - * - * _Watchdog_Deactivate - * - * DESCRIPTION: - * - * This routine deactivates THE_WATCHDOG timer which will remain - * on a watchdog chain. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( - Watchdog_Control *the_watchdog -) -{ - - the_watchdog->state = WATCHDOG_REMOVE_IT; - -} - -/*PAGE - * - * _Watchdog_Tickle_ticks - * - * DESCRIPTION: - * - * This routine is invoked at each clock tick to update the ticks - * watchdog chain. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) -{ - - _Watchdog_Tickle( &_Watchdog_Ticks_chain ); - -} - -/*PAGE - * - * _Watchdog_Tickle_seconds - * - * DESCRIPTION: - * - * This routine is invoked at each clock tick to update the seconds - * watchdog chain. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) -{ - - _Watchdog_Tickle( &_Watchdog_Seconds_chain ); - -} - -/*PAGE - * - * _Watchdog_Insert_ticks - * - * DESCRIPTION: - * - * This routine inserts THE_WATCHDOG into the ticks watchdog chain - * for a time of UNITS ticks. The INSERT_MODE indicates whether - * THE_WATCHDOG is to be activated automatically or later, explicitly - * by the caller. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Insert_ticks( - Watchdog_Control *the_watchdog, - Watchdog_Interval units -) -{ - - the_watchdog->initial = units; - - _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); - -} - -/*PAGE - * - * _Watchdog_Insert_seconds - * - * DESCRIPTION: - * - * This routine inserts THE_WATCHDOG into the seconds watchdog chain - * for a time of UNITS seconds. The INSERT_MODE indicates whether - * THE_WATCHDOG is to be activated automatically or later, explicitly - * by the caller. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Insert_seconds( - Watchdog_Control *the_watchdog, - Watchdog_Interval units -) -{ - - the_watchdog->initial = units; - - _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); - -} - -/*PAGE - * - * _Watchdog_Adjust_seconds - * - * DESCRIPTION: - * - * This routine adjusts the seconds watchdog chain in the forward - * or backward DIRECTION for UNITS seconds. This is invoked when the - * current time of day is changed. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Adjust_seconds( - Watchdog_Adjust_directions direction, - Watchdog_Interval units -) -{ - - _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); - -} - -/*PAGE - * - * _Watchdog_Adjust_ticks - * - * DESCRIPTION: - * - * This routine adjusts the ticks watchdog chain in the forward - * or backward DIRECTION for UNITS ticks. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Adjust_ticks( - Watchdog_Adjust_directions direction, - Watchdog_Interval units -) -{ - - _Watchdog_Adjust( &_Watchdog_Ticks_chain, direction, units ); - -} - -/*PAGE - * - * _Watchdog_Reset - * - * DESCRIPTION: - * - * This routine resets THE_WATCHDOG timer to its state at INSERT - * time. This routine is valid only on interval watchdog timers - * and is used to make an interval watchdog timer fire "every" so - * many ticks. - */ - -RTEMS_INLINE_ROUTINE void _Watchdog_Reset( - Watchdog_Control *the_watchdog -) -{ - - (void) _Watchdog_Remove( the_watchdog ); - - _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); - -} - -/*PAGE - * - * _Watchdog_Next - * - * DESCRIPTION: - * - * This routine returns a pointer to the watchdog timer following - * THE_WATCHDOG on the watchdog chain. - */ - -RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( - Watchdog_Control *the_watchdog -) -{ - - return ( (Watchdog_Control *) the_watchdog->Node.next ); - -} - -/*PAGE - * - * _Watchdog_Previous - * - * DESCRIPTION: - * - * This routine returns a pointer to the watchdog timer preceding - * THE_WATCHDOG on the watchdog chain. - */ - -RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Previous( - Watchdog_Control *the_watchdog -) -{ - - return ( (Watchdog_Control *) the_watchdog->Node.previous ); - -} - -/*PAGE - * - * _Watchdog_First - * - * DESCRIPTION: - * - * This routine returns a pointer to the first watchdog timer - * on the watchdog chain HEADER. - */ - -RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( - Chain_Control *header -) -{ - - return ( (Watchdog_Control *) header->first ); - -} - -/*PAGE - * - * _Watchdog_Last - * - * DESCRIPTION: - * - * This routine returns a pointer to the last watchdog timer - * on the watchdog chain HEADER. - */ - -RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Last( - Chain_Control *header -) -{ - - return ( (Watchdog_Control *) header->last ); - -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/inline/rtems/score/wkspace.inl b/c/src/exec/score/inline/rtems/score/wkspace.inl deleted file mode 100644 index 0ba6f72e92..0000000000 --- a/c/src/exec/score/inline/rtems/score/wkspace.inl +++ /dev/null @@ -1,57 +0,0 @@ -/* wkspace.inl - * - * This include file contains the bodies of the routines which contains - * information related to the RAM Workspace. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __WORKSPACE_inl -#define __WORKSPACE_inl - -/*PAGE - * - * _Workspace_Allocate - * - * DESCRIPTION: - * - * This routine returns the address of a block of memory of size - * bytes. If a block of the appropriate size cannot be allocated - * from the workspace, then NULL is returned. - */ - -RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( - unsigned32 size -) -{ - return _Heap_Allocate( &_Workspace_Area, size ); -} - -/*PAGE - * - * _Workspace_Free - * - * DESCRIPTION: - * - * This function frees the specified block of memory. If the block - * belongs to the Workspace and can be successfully freed, then - * TRUE is returned. Otherwise FALSE is returned. - */ - -RTEMS_INLINE_ROUTINE boolean _Workspace_Free( - void *block -) -{ - return _Heap_Free( &_Workspace_Area, block ); -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/README b/c/src/exec/score/macros/rtems/score/README deleted file mode 100644 index b2f0c4d481..0000000000 --- a/c/src/exec/score/macros/rtems/score/README +++ /dev/null @@ -1,18 +0,0 @@ -# -# $Id$ -# - -The files in this directory are not considered the "primary" source -of inlined routines for RTEMS. The "inline" directory contains -the implementations of the inlined basis which are regularly -tested. In general, an effort is made to keep the contents of -this directory up to date but testing is only performed irregularly -and even then it is usually with a single target processor and BSP. - -The primary purpose of the code in this directory is to insure -that RTEMS can be compiled using a C compiler which does not support -static inline routines. - -These were last successfully tested on 2/1/95 on a prerelease version -of 3.2.0. The testing was done only on the Force CPU386 i386 target board. -No testing was done on version of the code in the final release. diff --git a/c/src/exec/score/macros/rtems/score/address.inl b/c/src/exec/score/macros/rtems/score/address.inl deleted file mode 100644 index c0d45c3c6b..0000000000 --- a/c/src/exec/score/macros/rtems/score/address.inl +++ /dev/null @@ -1,68 +0,0 @@ -/* macros/address.h - * - * This include file contains the bodies of the routines - * about addresses which are inlined. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __MACROS_ADDRESSES_h -#define __MACROS_ADDRESSES_h - -/*PAGE - * - * _Addresses_Add_offset - * - */ - -#define _Addresses_Add_offset( _base, _offset ) \ - ((void *)((char *)(_base) + (_offset))) - -/*PAGE - * - * _Addresses_Subtract_offset - * - */ - -#define _Addresses_Subtract_offset( _base, _offset ) \ - ((void *)((char *)(_base) - (_offset))) - -/*PAGE - * - * _Addresses_Subtract - * - * NOTE: The cast of an address to an unsigned32 makes this code - * dependent on an addresses being thirty two bits. - */ - -#define _Addresses_Subtract( _left, _right ) \ - ((void *)(_left) - (void *)(_right)) - -/*PAGE - * - * _Addresses_Is_aligned - * - */ - -#define _Addresses_Is_aligned( _address ) \ - ( ( (unsigned32)(_address) % 4 ) == 0 ) - -/*PAGE - * - * _Addresses_Is_in_range - * - */ - -#define _Addresses_Is_in_range( _address, _base, _limit ) \ - ( (_address) >= (_base) && (_address) <= (_limit) ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/chain.inl b/c/src/exec/score/macros/rtems/score/chain.inl deleted file mode 100644 index 0f09499f1d..0000000000 --- a/c/src/exec/score/macros/rtems/score/chain.inl +++ /dev/null @@ -1,200 +0,0 @@ -/* macros/chain.h - * - * This include file contains the bodies of the routines which are - * associated with doubly linked chains and inlined. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __MACROS_CHAIN_h -#define __MACROS_CHAIN_h - -/*PAGE - * - * _Chain_Are_nodes_equal - */ - -#define _Chain_Are_nodes_equal( _left, _right ) \ - ( (_left) == (_right) ) - -/*PAGE - * - * _Chain_Is_null - */ - -#define _Chain_Is_null( _the_chain ) \ - ( (_the_chain) == NULL ) - -/*PAGE - * - * _Chain_Is_null_node - */ - -#define _Chain_Is_null_node( _the_node ) \ - ( (_the_node) == NULL ) - -/*PAGE - * - * _Chain_Head - */ - -#define _Chain_Head( _the_chain ) \ - ((Chain_Node *) (_the_chain)) - -/*PAGE - * - * _Chain_Tail - */ - -#define _Chain_Tail( _the_chain ) \ - ((Chain_Node *) &(_the_chain)->permanent_null) - -/*PAGE - * - * _Chain_Is_empty - */ - -#define _Chain_Is_empty( _the_chain ) \ - ( (_the_chain)->first == _Chain_Tail( (_the_chain) ) ) - -/*PAGE - * - * _Chain_Is_first - */ - -#define _Chain_Is_first( _the_node ) \ - ( (the_node)->previous == NULL ) - -/*PAGE - * - * _Chain_Is_last - */ - -#define _Chain_Is_last( _the_node ) \ - ( (_the_node)->next == NULL ) - -/*PAGE - * - * _Chain_Has_only_one_node - */ - -#define _Chain_Has_only_one_node( _the_chain ) \ - ( (_the_chain)->first == (_the_chain)->last ) - -/*PAGE - * - * _Chain_Is_head - */ - -#define _Chain_Is_head( _the_chain, _the_node ) \ - ( (_the_node) == _Chain_Head( (_the_chain) ) ) - -/*PAGE - * - * _Chain_Is_tail - */ - -#define _Chain_Is_tail( _the_chain, _the_node ) \ - ( (_the_node) == _Chain_Tail( (_the_chain) ) ) - -/*PAGE - * - * Chain_Initialize_empty - */ - -#define _Chain_Initialize_empty( _the_chain ) \ -{ \ - (_the_chain)->first = _Chain_Tail( (_the_chain) ); \ - (_the_chain)->permanent_null = NULL; \ - (_the_chain)->last = _Chain_Head( (_the_chain) ); \ -} - -/*PAGE - * - * _Chain_Extract_unprotected - */ - -#define _Chain_Extract_unprotected( _the_node ) \ -{ \ - Chain_Node *_next; \ - Chain_Node *_previous; \ - \ - _next = (_the_node)->next; \ - _previous = (_the_node)->previous; \ - _next->previous = _previous; \ - _previous->next = _next; \ -} - -/*PAGE - * - * _Chain_Get_unprotected - */ - -/*PAGE - * - * Chain_Get_unprotected - */ - -#define _Chain_Get_unprotected( _the_chain ) \ - (( !_Chain_Is_empty( (_the_chain) ) ) \ - ? _Chain_Get_first_unprotected( (_the_chain) ) \ - : NULL) - -/*PAGE - * - * _Chain_Insert_unprotected - */ - -#define _Chain_Insert_unprotected( _after_node, _the_node ) \ -{ \ - Chain_Node *_before_node; \ - \ - (_the_node)->previous = (_after_node); \ - _before_node = (_after_node)->next; \ - (_after_node)->next = (_the_node); \ - (_the_node)->next = _before_node; \ - _before_node->previous = (_the_node); \ -} - -/*PAGE - * - * _Chain_Append_unprotected - */ - -#define _Chain_Append_unprotected( _the_chain, _the_node ) \ -{ \ - Chain_Node *_old_last_node; \ - \ - (_the_node)->next = _Chain_Tail( (_the_chain) ); \ - _old_last_node = (_the_chain)->last; \ - (_the_chain)->last = (_the_node); \ - _old_last_node->next = (_the_node); \ - (_the_node)->previous = _old_last_node; \ -} - -/*PAGE - * - * _Chain_Prepend_unprotected - */ - -#define _Chain_Prepend_unprotected( _the_chain, _the_node ) \ - _Chain_Insert_unprotected( _Chain_Head( (_the_chain) ), (_the_node) ) - -/*PAGE - * - * _Chain_Prepend - */ - -#define _Chain_Prepend( _the_chain, _the_node ) \ - _Chain_Insert( _Chain_Head( (_the_chain) ), (_the_node) ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/coremsg.inl b/c/src/exec/score/macros/rtems/score/coremsg.inl deleted file mode 100644 index 90bef885ed..0000000000 --- a/c/src/exec/score/macros/rtems/score/coremsg.inl +++ /dev/null @@ -1,143 +0,0 @@ -/* coremsg.inl - * - * This include file contains the macro implementation of all - * inlined routines in the Core Message Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __CORE_MESSAGE_QUEUE_inl -#define __CORE_MESSAGE_QUEUE_inl - -/*PAGE - * - * _CORE_message_queue_Send - * - */ - -#define _CORE_message_queue_Send( _the_message_queue, _buffer, _size, \ -_id, _api_message_queue_mp_support ) \ - _CORE_message_queue_Submit( (_the_message_queue), (_buffer), (_size), \ - (_id), (_api_message_queue_mp_support), CORE_MESSAGE_QUEUE_SEND_REQUEST ) - -/*PAGE - * - * _CORE_message_queue_Urgent - * - */ - -#define _CORE_message_queue_Urgent( _the_message_queue, _buffer, _size, \ -_id, _api_message_queue_mp_support ) \ - _CORE_message_queue_Submit( (_the_message_queue), (_buffer), (_size), \ - (_id), (_api_message_queue_mp_support), CORE_MESSAGE_QUEUE_URGENT_REQUEST ) - -/*PAGE - * - * _CORE_message_queue_Copy_buffer - */ - -#define _CORE_message_queue_Copy_buffer( _source, _destination, _size ) \ - memcpy( _destination, _source, _size) - -/*PAGE - * - * _CORE_message_queue_Allocate_message_buffer - * - */ - -#define _CORE_message_queue_Allocate_message_buffer( _the_message_queue ) \ - (CORE_message_queue_Buffer_control *) \ - _Chain_Get( &(_the_message_queue)->Inactive_messages ) - -/*PAGE - * - * _CORE_message_queue_Free_message_buffer - * - */ - -#define _CORE_message_queue_Free_message_buffer( _the_message_queue, _the_message ) \ - _Chain_Append( \ - &(_the_message_queue)->Inactive_messages, \ - &(_the_message)->Node \ - ) - -/*PAGE - * - * _CORE_message_queue_Is_priority - * - */ - -#define _CORE_message_queue_Is_priority( _the_attribute ) \ - ((_the_attribute)->discipline == CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY) - -/*PAGE - * - * _CORE_message_queue_Get_pending_message - * - */ - -#define _CORE_message_queue_Get_pending_message( _the_message_queue ) \ - (CORE_message_queue_Buffer_control *) \ - _Chain_Get_unprotected( &(_the_message_queue)->Pending_messages ) - -/*PAGE - * - * _CORE_message_queue_Append - * - */ - -#define _CORE_message_queue_Append( _the_message_queue, _the_message ) \ - _Chain_Append( &(_the_message_queue)->Pending_messages, \ - &(_the_message)->Node ) - -/*PAGE - * - * _CORE_message_queue_Prepend - * - */ - -#define _CORE_message_queue_Prepend( _the_message_queue, _the_message ) \ - _Chain_Prepend( &(_the_message_queue)->Pending_messages, \ - &(_the_message)->Node ) - -/*PAGE - * - * _CORE_message_queue_Is_null - * - */ - -#define _CORE_message_queue_Is_null( _the_message_queue ) \ - ( (_the_message_queue) == NULL ) - -/*PAGE - * - * _CORE_message_queue_Is_notify_enabled - * - */ - -#define _CORE_message_queue_Is_notify_enabled( _the_message_queue ) \ - ( (_the_message_queue)->notify_handler != NULL ) - -/*PAGE - * - * _CORE_message_queue_Set_notify - * - */ - -#define _CORE_message_queue_Set_notify( \ - _the_message_queue, _the_handler, _the_argument ) \ - do { \ - (_the_message_queue)->notify_handler = (_the_handler); \ - (_the_message_queue)->notify_argument = (_the_argument); \ - } while ( 0 ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/coremutex.inl b/c/src/exec/score/macros/rtems/score/coremutex.inl deleted file mode 100644 index e8dbc9322c..0000000000 --- a/c/src/exec/score/macros/rtems/score/coremutex.inl +++ /dev/null @@ -1,77 +0,0 @@ -/* macros/coremutex.h - * - * This include file contains all of the inlined routines associated - * with core mutexes. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __MACROS_CORE_MUTEX_h -#define __MACROS_CORE_MUTEX_h - - -/*PAGE - * - * _CORE_mutex_Is_locked - * - */ - -#define _CORE_mutex_Is_locked( _the_mutex ) \ - ( (_the_mutex)->lock == CORE_MUTEX_LOCKED ) - -/*PAGE - * - * _CORE_mutex_Is_fifo - * - */ - -#define _CORE_mutex_Is_fifo( _the_attribute ) \ - ( (_the_attribute)->discipline == CORE_MUTEX_DISCIPLINES_FIFO ) - -/*PAGE - * - * _CORE_mutex_Is_priority - * - */ - -#define _CORE_mutex_Is_priority( _the_attribute ) \ - ( (_the_attribute)->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) - -/*PAGE - * - * _CORE_mutex_Is_inherit_priority - * - */ - -#define _CORE_mutex_Is_inherit_priority( _the_attribute ) \ - ( (_the_attribute)->discipline == \ - CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT ) - -/*PAGE - * - * _CORE_mutex_Is_priority_ceiling - * - */ - -#define _CORE_mutex_Is_priority_ceiling( _the_attribute )\ - ( (_the_attribute)->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING ) - -/*PAGE - * - * _CORE_mutex_Is_nesting_allowed - * - */ - -#define _CORE_mutex_Is_nesting_allowed( _the_attribute ) \ - ( (_the_attribute)->allow_nesting == TRUE ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/coresem.inl b/c/src/exec/score/macros/rtems/score/coresem.inl deleted file mode 100644 index 499b4a1433..0000000000 --- a/c/src/exec/score/macros/rtems/score/coresem.inl +++ /dev/null @@ -1,40 +0,0 @@ -/* macros/coresem.h - * - * This include file contains all of the inlined routines associated - * with core semaphores. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __MACROS_CORE_SEMAPHORE_h -#define __MACROS_CORE_SEMAPHORE_h - -/*PAGE - * - * _CORE_semaphore_Is_priority - * - */ - -#define _CORE_semaphore_Is_priority( _the_attribute ) \ - ( (_the_attribute)->discipline == CORE_SEMAPHORE_DISCIPLINES_PRIORITY ) - -/*PAGE - * - * _Core_semaphore_Get_count - * - */ - -#define _Core_semaphore_Get_count( _the_semaphore ) \ - ( (_the_semaphore)->count ) - - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/heap.inl b/c/src/exec/score/macros/rtems/score/heap.inl deleted file mode 100644 index 94f4ff9194..0000000000 --- a/c/src/exec/score/macros/rtems/score/heap.inl +++ /dev/null @@ -1,150 +0,0 @@ -/* heap.inl - * - * This file contains the macro implementation of the inlined - * routines from the heap handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __HEAP_inl -#define __HEAP_inl - -#include - -/*PAGE - * - * _Heap_Head - */ - -#define _Heap_Head( _the_heap ) \ - ((Heap_Block *)&(_the_heap)->start) - -/*PAGE - * - * _Heap_Tail - */ - -#define _Heap_Tail( _the_heap ) \ - ((Heap_Block *)&(_the_heap)->final) - -/*PAGE - * - * _Heap_Previous_block - */ - -#define _Heap_Previous_block( _the_block ) \ - ( (Heap_Block *) _Addresses_Subtract_offset( \ - (void *)(_the_block), \ - (_the_block)->back_flag & ~ HEAP_BLOCK_USED \ - ) \ - ) - -/*PAGE - * - * _Heap_Next_block - */ - -#define _Heap_Next_block( _the_block ) \ - ( (Heap_Block *) _Addresses_Add_offset( \ - (void *)(_the_block), \ - (_the_block)->front_flag & ~ HEAP_BLOCK_USED \ - ) \ - ) - -/*PAGE - * - * _Heap_Block_at - */ - -#define _Heap_Block_at( _base, _offset ) \ - ( (Heap_Block *) \ - _Addresses_Add_offset( (void *)(_base), (_offset) ) ) - -/*PAGE - * - * _Heap_User_block_at - * - */ - -#define _Heap_User_block_at( _base ) \ - _Heap_Block_at( \ - (_base), \ - -*(((unsigned32 *) (_base)) - 1) + -HEAP_BLOCK_USED_OVERHEAD \ - ) - -/*PAGE - * - * _Heap_Is_previous_block_free - */ - -#define _Heap_Is_previous_block_free( _the_block ) \ - ( !((_the_block)->back_flag & HEAP_BLOCK_USED) ) - -/*PAGE - * - * _Heap_Is_block_free - */ - -#define _Heap_Is_block_free( _the_block ) \ - ( !((_the_block)->front_flag & HEAP_BLOCK_USED) ) - -/*PAGE - * - * _Heap_Is_block_used - */ - -#define _Heap_Is_block_used( _the_block ) \ - ((_the_block)->front_flag & HEAP_BLOCK_USED) - -/*PAGE - * - * _Heap_Block_size - */ - -#define _Heap_Block_size( _the_block ) \ - ((_the_block)->front_flag & ~HEAP_BLOCK_USED) - -/*PAGE - * - * _Heap_Start_of_user_area - */ - -#define _Heap_Start_of_user_area( _the_block ) \ - ((void *) &(_the_block)->next) - -/*PAGE - * - * _Heap_Is_block_in - */ - -#define _Heap_Is_block_in( _the_heap, _the_block ) \ - ( ((_the_block) >= (_the_heap)->start) && \ - ((_the_block) <= (_the_heap)->final) ) - -/*PAGE - * - * _Heap_Is_page_size_valid - */ - -#define _Heap_Is_page_size_valid( _page_size ) \ - ( ((_page_size) != 0) && \ - (((_page_size) % CPU_HEAP_ALIGNMENT) == 0) ) - -/*PAGE - * - * _Heap_Build_flag - */ - -#define _Heap_Build_flag( _size, _in_use_flag ) \ - ( (_size) | (_in_use_flag)) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/isr.inl b/c/src/exec/score/macros/rtems/score/isr.inl deleted file mode 100644 index 95f0319396..0000000000 --- a/c/src/exec/score/macros/rtems/score/isr.inl +++ /dev/null @@ -1,48 +0,0 @@ -/* isr.inl - * - * This include file contains the macro implementation of all - * inlined routines in the Interrupt Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __ISR_inl -#define __ISR_inl - -/*PAGE - * - * _ISR_Is_in_progress - * - */ - -#define _ISR_Is_in_progress() \ - (_ISR_Nest_level != 0) - -/*PAGE - * - * _ISR_Is_vector_number_valid - * - */ - -#define _ISR_Is_vector_number_valid( _vector ) \ - ( (_vector) <= CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER ) - -/*PAGE - * - * _ISR_Is_valid_user_handler - * - */ - -#define _ISR_Is_valid_user_handler( _handler ) \ - ((_handler) != NULL) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/mppkt.inl b/c/src/exec/score/macros/rtems/score/mppkt.inl deleted file mode 100644 index ff1d51034b..0000000000 --- a/c/src/exec/score/macros/rtems/score/mppkt.inl +++ /dev/null @@ -1,41 +0,0 @@ -/* macros/mppkt.h - * - * This package is the implementation of the Packet Handler - * routines which are inlined. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __MACROS_MP_PACKET_h -#define __MACROS_MP_PACKET_h - -/*PAGE - * - * _Mp_packet_Is_valid_packet_class - * - * NOTE: Check for lower bounds (MP_PACKET_CLASSES_FIRST ) is unnecessary - * because this enum starts at lower bound of zero. - */ - -#define _Mp_packet_Is_valid_packet_class( _the_packet_class ) \ - ( (_the_packet_class) <= MP_PACKET_CLASSES_LAST ) - -/*PAGE - * - * _Mp_packet_Is_null - * - */ - -#define _Mp_packet_Is_null ( _the_packet ) \ - ( (_the_packet) == NULL ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/object.inl b/c/src/exec/score/macros/rtems/score/object.inl deleted file mode 100644 index 8a5a0a3411..0000000000 --- a/c/src/exec/score/macros/rtems/score/object.inl +++ /dev/null @@ -1,148 +0,0 @@ -/* object.inl - * - * This include file contains the macro implementation of all - * of the inlined routines in the Object Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __OBJECTS_inl -#define __OBJECTS_inl - -/*PAGE - * - * _Objects_Build_id - * - */ - -#define _Objects_Build_id( _the_class, _node, _index ) \ - ( ((_the_class) << OBJECTS_CLASS_START_BIT) | \ - ((_node) << OBJECTS_NODE_START_BIT) | \ - ((_index) << OBJECTS_INDEX_START_BIT) ) - -/*PAGE - * - * _Objects_Get_class - */ - -#define _Objects_Get_class( _id ) \ - (Objects_Classes) \ - (((_id) >> OBJECTS_CLASS_START_BIT) & OBJECTS_CLASS_VALID_BITS) - -/*PAGE - * - * _Objects_Get_node - * - */ - -#define _Objects_Get_node( _id ) \ - (((_id) >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS) - -/*PAGE - * - * _Objects_Get_index - * - */ - -#define _Objects_Get_index( _id ) \ - (((_id) >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS) - -/*PAGE - * - * _Objects_Is_class_valid - * - */ - -#define _Objects_Is_class_valid( _the_class ) \ - ( (_the_class) <= OBJECTS_CLASSES_LAST ) - -/*PAGE - * - * _Objects_Is_local_node - * - */ - -#define _Objects_Is_local_node( _node ) \ - ( (_node) == _Objects_Local_node ) - -/*PAGE - * - * _Objects_Is_local_id - * - */ - -#define _Objects_Is_local_id( _id ) \ - _Objects_Is_local_node( _Objects_Get_node(_id) ) - -/*PAGE - * - * _Objects_Are_ids_equal - * - */ - -#define _Objects_Are_ids_equal( _left, _right ) \ - ( (_left) == (_right) ) - -/*PAGE - * - * _Objects_Allocate - * - */ - -#define _Objects_Allocate( _information ) \ - (Objects_Control *) _Chain_Get( &(_information)->Inactive ) - -/*PAGE - * - * _Objects_Free - * - */ - -#define _Objects_Free( _information, _the_object ) \ - _Chain_Append( &(_information)->Inactive, &(_the_object)->Node ) - -/*PAGE - * - * _Objects_Open - * - */ - -#define _Objects_Open( _information, _the_object, _name ) \ - { \ - unsigned32 _index; \ - \ - _index = _Objects_Get_index( (_the_object)->id ); \ - (_information)->local_table[ _index ] = (_the_object); \ - \ - if ( (_information)->is_string ) \ - _Objects_Copy_name_string( (_name), (_the_object)->name ); \ - else \ - _Objects_Copy_name_raw( \ - (_name), (_the_object)->name, (_information)->name_length ); \ - } - -/*PAGE - * - * _Objects_Close - * - */ - -#define _Objects_Close( _information, _the_object ) \ - { \ - unsigned32 _index; \ - \ - _index = _Objects_Get_index( (_the_object)->id ); \ - (_information)->local_table[ _index ] = NULL; \ - _Objects_Clear_name( (_the_object)->name, (_information)->name_length ); \ - } - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/objectmp.inl b/c/src/exec/score/macros/rtems/score/objectmp.inl deleted file mode 100644 index 2f1c5ac7fa..0000000000 --- a/c/src/exec/score/macros/rtems/score/objectmp.inl +++ /dev/null @@ -1,50 +0,0 @@ -/* macros/objectmp.inl - * - * This include file contains the bodies of all inlined routines - * which deal with global objects. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __MACROS_MP_OBJECTS_inl -#define __MACROS_MP_OBJECTS_inl - -/*PAGE - * - * _Objects_MP_Allocate_global_object - * - */ - -#define _Objects_MP_Allocate_global_object() \ - (Objects_MP_Control *) \ - _Chain_Get( &_Objects_MP_Inactive_global_objects ) - -/*PAGE - * _Objects_MP_Free_global_object - * - */ - -#define _Objects_MP_Free_global_object( _the_object ) \ - _Chain_Append( \ - &_Objects_MP_Inactive_global_objects, \ - &(_the_object)->Object.Node \ - ) - -/*PAGE - * _Objects_MP_Is_null_global_object - * - */ - -#define _Objects_MP_Is_null_global_object( _the_object ) \ - ( (_the_object) == NULL ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/priority.inl b/c/src/exec/score/macros/rtems/score/priority.inl deleted file mode 100644 index 4c5d32b3b3..0000000000 --- a/c/src/exec/score/macros/rtems/score/priority.inl +++ /dev/null @@ -1,170 +0,0 @@ -/* priority.inl - * - * This file contains the macro implementation of all inlined routines - * in the Priority Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __PRIORITY_inl -#define __PRIORITY_inl - -#include - -/*PAGE - * - * _Priority_Handler_initialization - * - */ - -#define _Priority_Handler_initialization() \ - { \ - unsigned32 index; \ - \ - _Priority_Major_bit_map = 0; \ - for ( index=0 ; index <16 ; index++ ) \ - _Priority_Bit_map[ index ] = 0; \ - } - -/*PAGE - * - * _Priority_Is_valid - * - */ - - /* - * Since PRIORITY_MINIMUM is 0 and priorities are stored unsigned, - * then checking for less than 0 is unnecessary. - */ - -#define _Priority_Is_valid( _the_priority ) \ - ( (_the_priority) <= PRIORITY_MAXIMUM ) - -/*PAGE - * - * _Priority_Major - * - */ - -#define _Priority_Major( _the_priority ) ( (_the_priority) / 16 ) - -/*PAGE - * - * _Priority_Minor - * - */ - -#define _Priority_Minor( _the_priority ) ( (_the_priority) % 16 ) - -#if ( CPU_USE_GENERIC_BITFIELD_CODE == TRUE ) - -/*PAGE - * - * _Priority_Mask - * - */ - -#define _Priority_Mask( _bit_number ) \ - (0x8000 >> _bit_number) - -/*PAGE - * - * _Priority_Bits_index - * - */ - -#define _Priority_Bits_index( _bit_number ) \ - (_bit_number) - -#endif - -/*PAGE - * - * _Priority_Add_to_bit_map - * - */ - -#define _Priority_Add_to_bit_map( _the_priority_map ) \ - { \ - *(_the_priority_map)->minor |= (_the_priority_map)->ready_minor; \ - _Priority_Major_bit_map |= (_the_priority_map)->ready_major; \ - } - -/*PAGE - * - * _Priority_Remove_from_bit_map - * - */ - -#define _Priority_Remove_from_bit_map( _the_priority_map ) \ - { \ - *(_the_priority_map)->minor &= (_the_priority_map)->block_minor; \ - if ( *(_the_priority_map)->minor == 0 ) \ - _Priority_Major_bit_map &= (_the_priority_map)->block_major; \ - } - -/*PAGE - * - * _Priority_Get_highest - * - */ - -#define _Priority_Get_highest( _high_priority ) \ - { \ - Priority_Bit_map_control minor; \ - Priority_Bit_map_control major; \ - \ - _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); \ - _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); \ - \ - (_high_priority) = (_Priority_Bits_index( major ) * 16) + \ - _Priority_Bits_index( minor ); \ - } - -/*PAGE - * - * _Priority_Initialize_information - * - */ - -#define _Priority_Initialize_information( \ - _the_priority_map, _new_priority ) \ - { \ - Priority_Bit_map_control _major; \ - Priority_Bit_map_control _minor; \ - Priority_Bit_map_control _mask; \ - \ - _major = _Priority_Major( (_new_priority) ); \ - _minor = _Priority_Minor( (_new_priority) ); \ - \ - (_the_priority_map)->minor = \ - &_Priority_Bit_map[ _Priority_Bits_index(_major) ]; \ - \ - _mask = _Priority_Mask( _major ); \ - (_the_priority_map)->ready_major = _mask; \ - (_the_priority_map)->block_major = ~_mask; \ - \ - _mask = _Priority_Mask( _minor ); \ - (_the_priority_map)->ready_minor = _mask; \ - (_the_priority_map)->block_minor = ~_mask; \ - } - -/*PAGE - * - * _Priority_Is_group_empty - * - */ - -#define _Priority_Is_group_empty ( _the_priority ) \ - ( (_the_priority) == 0 ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/stack.inl b/c/src/exec/score/macros/rtems/score/stack.inl deleted file mode 100644 index d20eebd0b9..0000000000 --- a/c/src/exec/score/macros/rtems/score/stack.inl +++ /dev/null @@ -1,50 +0,0 @@ -/* stack.inl - * - * This file contains the macro implementation of the inlined - * routines from the Stack Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __STACK_inl -#define __STACK_inl - -/*PAGE - * - * _Stack_Initialize - * - */ - -#define _Stack_Initialize( _the_stack, _starting_address, _size ) \ - { \ - (_the_stack)->area = (_starting_address); \ - (_the_stack)->size = (_size); \ - } - -/*PAGE - * - * _Stack_Is_enough - * - */ - -#define _Stack_Is_enough( _size ) \ - ( (_size) >= STACK_MINIMUM_SIZE ) - -/*PAGE - * - * _Stack_Adjust_size - */ - -#define _Stack_Adjust_size( _size ) \ - ((_size) + CPU_STACK_ALIGNMENT) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/states.inl b/c/src/exec/score/macros/rtems/score/states.inl deleted file mode 100644 index 4fa138d107..0000000000 --- a/c/src/exec/score/macros/rtems/score/states.inl +++ /dev/null @@ -1,210 +0,0 @@ -/* states.inl - * - * This file contains the macro implementation of the inlined - * routines associated with thread state information. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __STATES_inl -#define __STATES_inl - -/*PAGE - * - * _States_Set - * - */ - -#define _States_Set( _states_to_set, _current_state ) \ - ((_current_state) | (_states_to_set)) - -/*PAGE - * - * _States_Clear - * - */ - -#define _States_Clear( _states_to_clear, _current_state ) \ - ((_current_state) & ~(_states_to_clear)) - -/*PAGE - * - * _States_Is_ready - * - */ - -#define _States_Is_ready( _the_states ) \ - ( (_the_states) == STATES_READY ) - -/*PAGE - * - * _States_Is_only_dormant - * - */ - -#define _States_Is_only_dormant( _the_states ) \ - ( (_the_states) == STATES_DORMANT ) - -/*PAGE - * - * _States_Is_dormant - * - */ - -#define _States_Is_dormant( _the_states ) \ - ( (_the_states) & STATES_DORMANT ) - -/*PAGE - * - * _States_Is_suspended - * - */ - -#define _States_Is_suspended( _the_states ) \ - ( (_the_states) & STATES_SUSPENDED ) - -/*PAGE - * - * _States_Is_Transient - * - */ - -#define _States_Is_transient( _the_states ) \ - ( (_the_states) & STATES_TRANSIENT ) - -/*PAGE - * - * _States_Is_delaying - * - */ - -#define _States_Is_delaying( _the_states ) \ - ( (_the_states) & STATES_DELAYING ) - -/*PAGE - * - * _States_Is_waiting_for_buffer - * - */ - -#define _States_Is_waiting_for_buffer( _the_states ) \ - ( (_the_states) & STATES_WAITING_FOR_BUFFER ) - -/*PAGE - * - * _States_Is_waiting_for_segment - * - */ - -#define _States_Is_waiting_for_segment( _the_states ) \ - ( (_the_states) & STATES_WAITING_FOR_SEGMENT ) - -/*PAGE - * - * _States_Is_waiting_for_message - * - */ - -#define _States_Is_waiting_for_message( _the_states ) \ - ( (_the_states) & STATES_WAITING_FOR_MESSAGE ) - -/*PAGE - * - * _States_Is_waiting_for_event - * - */ - -#define _States_Is_waiting_for_event( _the_states ) \ - ( (_the_states) & STATES_WAITING_FOR_EVENT ) - -/*PAGE - * - * _States_Is_waiting_for_mutex - * - */ - -#define _States_Is_waiting_for_mutex( _the_states ) \ - ( (_the_states) & STATES_WAITING_FOR_MUTEX ) - -/*PAGE - * - * _States_Is_waiting_for_semaphore - * - */ - -#define _States_Is_waiting_for_semaphore( _the_states ) \ - ( (_the_states) & STATES_WAITING_FOR_SEMAPHORE ) - -/*PAGE - * - * _States_Is_waiting_for_time - * - */ - -#define _States_Is_waiting_for_time( _the_states ) \ - ( (_the_states) & STATES_WAITING_FOR_TIME ) - -/*PAGE - * - * _States_Is_waiting_for_rpc_reply - * - */ - -#define _States_Is_waiting_for_rpc_reply( _the_states ) \ - ( (_the_states) & STATES_WAITING_FOR_RPC_REPLY ) - -/*PAGE - * - * _States_Is_waiting_for_period - * - */ - -#define _States_Is_waiting_for_period( _the_states ) \ - ( (_the_states) & STATES_WAITING_FOR_PERIOD ) - -/*PAGE - * - * _States_Is_locally_blocked - * - */ - -#define _States_Is_locally_blocked( _the_states ) \ - ( (_the_states) & STATES_LOCALLY_BLOCKED ) - -/*PAGE - * - * _States_Is_waiting_on_thread_queue - * - */ - -#define _States_Is_waiting_on_thread_queue( _the_states ) \ - ( (_the_states) & STATES_WAITING_ON_THREAD_QUEUE ) - -/*PAGE - * - * _States_Is_blocked - * - */ - -#define _States_Is_blocked( _the_states ) \ - ( (_the_states) & STATES_BLOCKED ) - -/*PAGE - * - * _States_Are_set - * - */ - -#define _States_Are_set( _the_states, _mask ) \ - ( ((_the_states) & (_mask)) != STATES_READY ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/sysstate.inl b/c/src/exec/score/macros/rtems/score/sysstate.inl deleted file mode 100644 index d0cb932924..0000000000 --- a/c/src/exec/score/macros/rtems/score/sysstate.inl +++ /dev/null @@ -1,90 +0,0 @@ -/* sysstates.inl - * - * This file contains the macro implementation of routines regarding the - * system state. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __SYSTEM_STATE_inl -#define __SYSTEM_STATE_inl - -/*PAGE - * - * _System_state_Handler_initialization - */ - -#define _System_state_Handler_initialization( _is_multiprocessing ) \ - do { \ - _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION; \ - _System_state_Is_multiprocessing = (_is_multiprocessing); \ - } while ( 0 ) - -/*PAGE - * - * _System_state_Set - */ - -#define _System_state_Set( _state ) \ - do { \ - _System_state_Current = (_state); \ - } while ( 0 ) - -/*PAGE - * - * _System_state_Get - */ - -#define _System_state_Get() \ - (_System_state_Current) - -/*PAGE - * - * _System_state_Is_before_initialization - */ - -#define _System_state_Is_before_initialization( _state ) \ - ((_state) == SYSTEM_STATE_BEFORE_INITIALIZATION) - -/*PAGE - * - * _System_state_Is_before_multitasking - */ - -#define _System_state_Is_before_multitasking( _state ) \ - ((_state) == SYSTEM_STATE_BEFORE_MULTITASKING) - -/*PAGE - * - * _System_state_Is_begin_multitasking - */ - -#define _System_state_Is_begin_multitasking( _state ) \ - ((_state) == SYSTEM_STATE_BEGIN_MULTITASKING) - -/*PAGE - * - * _System_state_Is_up - */ - -#define _System_state_Is_up( _state ) \ - ((_state) == SYSTEM_STATE_UP) - -/*PAGE - * - * _System_state_Is_failed - */ - -#define _System_state_Is_failed( _state ) \ - ((_state) == SYSTEM_STATE_FAILED) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/thread.inl b/c/src/exec/score/macros/rtems/score/thread.inl deleted file mode 100644 index 735686aa20..0000000000 --- a/c/src/exec/score/macros/rtems/score/thread.inl +++ /dev/null @@ -1,217 +0,0 @@ -/* thread.inl - * - * This file contains the macro implementation of the inlined - * routines from the Thread handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __THREAD_inl -#define __THREAD_inl - -/*PAGE - * - * _Thread_Stop_multitasking - * - */ - -#define _Thread_Stop_multitasking() \ - _Context_Switch( &_Thread_Executing->Registers, &_Thread_BSP_context ); - -/*PAGE - * - * _Thread_Is_executing - * - */ - -#define _Thread_Is_executing( _the_thread ) \ - ( (_the_thread) == _Thread_Executing ) - -/*PAGE - * - * _Thread_Is_heir - * - */ - -#define _Thread_Is_heir( _the_thread ) \ - ( (_the_thread) == _Thread_Heir ) - -/*PAGE - * - * _Thread_Is_executing_also_the_heir - * - */ - -#define _Thread_Is_executing_also_the_heir() \ - ( _Thread_Executing == _Thread_Heir ) - -/*PAGE - * - * _Thread_Resume - * - */ - -#define _Thread_Resume( _the_thread ) \ - _Thread_Clear_state( (_the_thread), STATES_SUSPENDED ) - -/*PAGE - * - * _Thread_Unblock - * - */ - -#define _Thread_Unblock( _the_thread ) \ - _Thread_Clear_state( (_the_thread), STATES_BLOCKED ); - -/*PAGE - * - * _Thread_Restart_self - * - */ - -#define _Thread_Restart_self() \ - { \ - if ( _Thread_Executing->fp_context != NULL ) \ - _Context_Restore_fp( &_Thread_Executing->fp_context ); \ - \ - _CPU_Context_Restart_self( &_Thread_Executing->Registers ); \ - } - -/*PAGE - * - * _Thread_Calculate_heir - * - */ - -#define _Thread_Calculate_heir() \ - { \ - Priority_Control highest; \ - \ - _Priority_Get_highest( highest ); \ - \ - _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ highest ].first; \ - } - -/*PAGE - * - * _Thread_Is_allocated_fp - * - */ - -#define _Thread_Is_allocated_fp( _the_thread ) \ - ( (_the_thread) == _Thread_Allocated_fp ) - -/*PAGE - * - * _Thread_Deallocate_fp - * - */ - -#define _Thread_Deallocate_fp() \ - _Thread_Allocated_fp = NULL - -/*PAGE - * - * _Thread_Disable_dispatch - * - */ - -#define _Thread_Disable_dispatch() \ - _Thread_Dispatch_disable_level += 1 - -/*PAGE - * - * _Thread_Enable_dispatch - * - */ - -#if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) -#define _Thread_Enable_dispatch() \ - { if ( (--_Thread_Dispatch_disable_level) == 0 ) \ - _Thread_Dispatch(); \ - } -#endif - -#if ( CPU_INLINE_ENABLE_DISPATCH == FALSE ) -void _Thread_Enable_dispatch( void ); -#endif - -/*PAGE - * - * _Thread_Unnest_dispatch - * - */ - -#define _Thread_Unnest_dispatch() \ - _Thread_Dispatch_disable_level -= 1 - -/*PAGE - * - * _Thread_Is_dispatching_enabled - * - */ - -#define _Thread_Is_dispatching_enabled() \ - ( _Thread_Dispatch_disable_level == 0 ) - -/*PAGE - * - * _Thread_Is_context_switch_necessary - * - */ - -#define _Thread_Is_context_switch_necessary() \ - ( _Context_Switch_necessary == TRUE ) - -/*PAGE - * - * _Thread_Dispatch_initialization - * - */ - -#define _Thread_Dispatch_initialization() \ - _Thread_Dispatch_disable_level = 1 - -/*PAGE - * - * _Thread_Is_null - * - */ - -#define _Thread_Is_null( _the_thread ) \ - ( (_the_thread) == NULL ) - -/* - * _Thread_Is_proxy_blocking - * - */ - -#define _Thread_Is_proxy_blocking( _code ) \ - ( (_code) == THREAD_STATUS_PROXY_BLOCKING ) - -/* - * _Thread_Internal_allocate - * - */ - -#define _Thread_Internal_allocate() \ - ((Thread_Control *) _Objects_Allocate( &_Thread_Internal_information )) - -/* - * _Thread_Internal_free - * - */ - -#define _Thread_Internal_free( _the_task ) \ - _Objects_Free( &_Thread_Internal_information, &(_the_task)->Object ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/threadmp.inl b/c/src/exec/score/macros/rtems/score/threadmp.inl deleted file mode 100644 index c601862f96..0000000000 --- a/c/src/exec/score/macros/rtems/score/threadmp.inl +++ /dev/null @@ -1,50 +0,0 @@ -/* macros/threadmp.h - * - * This include file contains the bodies of all inlined routines - * for the multiprocessing part of thread package. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __MACROS_MP_THREAD_h -#define __MACROS_MP_THREAD_h - -/*PAGE - * - * _Thread_MP_Is_receive - * - */ - -#define _Thread_MP_Is_receive( _the_thread ) \ - ( (_the_thread) == _Thread_MP_Receive) - -/*PAGE - * - * _Thread_MP_Free_proxy - * - */ - -#define _Thread_MP_Free_proxy( _the_thread ) \ -{ \ - Thread_Proxy_control *_the_proxy; \ - \ - _the_proxy = (Thread_Proxy_control *) (_the_thread); \ - \ - _Chain_Extract( &_the_proxy->Active ); \ - \ - _Chain_Append( \ - &_Thread_MP_Inactive_proxies, \ - &(_the_thread)->Object.Node \ - ); \ -} - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/tod.inl b/c/src/exec/score/macros/rtems/score/tod.inl deleted file mode 100644 index 17ac5395af..0000000000 --- a/c/src/exec/score/macros/rtems/score/tod.inl +++ /dev/null @@ -1,49 +0,0 @@ -/* tod.inl - * - * This file contains the macro implementation of the inlined routines - * from the Time of Day Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __TIME_OF_DAY_inl -#define __TIME_OF_DAY_inl - -/*PAGE - * - * _TOD_Tickle_ticks - * - */ - -#define _TOD_Tickle_ticks() \ - _TOD_Current.ticks++; \ - _Watchdog_Ticks_since_boot++ - -/*PAGE - * - * _TOD_Deactivate - * - */ - -#define _TOD_Deactivate() \ - _Watchdog_Remove( &_TOD_Seconds_watchdog ) - -/*PAGE - * - * _TOD_Activate - * - */ - -#define _TOD_Activate( _ticks ) \ - _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, (_ticks) ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/tqdata.inl b/c/src/exec/score/macros/rtems/score/tqdata.inl deleted file mode 100644 index 4fb8abb971..0000000000 --- a/c/src/exec/score/macros/rtems/score/tqdata.inl +++ /dev/null @@ -1,50 +0,0 @@ -/* tqdata.inl - * - * This file contains the macro implementation of the inlined - * routines needed to support the Thread Queue Data. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __THREAD_QUEUE_DATA_inl -#define __THREAD_QUEUE_DATA_inl - -/*PAGE - * - * _Thread_queue_Header_number - * - */ - -#define _Thread_queue_Header_number( _the_priority ) \ - ((_the_priority) / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER) - -/*PAGE - * - * _Thread_queue_Is_reverse_search - * - */ - -#define _Thread_queue_Is_reverse_search( _the_priority ) \ - ( (_the_priority) & TASK_QUEUE_DATA_REVERSE_SEARCH_MASK ) - -/*PAGE - * - * _Thread_queue_Enter_critical_section - * - */ - -#define _Thread_queue_Enter_critical_section( _the_thread_queue ) \ - do { \ - (_the_thread_queue)->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; \ - } while ( 0 ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/userext.inl b/c/src/exec/score/macros/rtems/score/userext.inl deleted file mode 100644 index 4b5b8083bf..0000000000 --- a/c/src/exec/score/macros/rtems/score/userext.inl +++ /dev/null @@ -1,126 +0,0 @@ -/* userext.inl - * - * This file contains the macro implementation of the inlined routines - * from the User Extension Handler - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __USER_EXTENSIONS_inl -#define __USER_EXTENSIONS_inl - -/*PAGE - * - * _User_extensions_Handler_initialization - * - */ - -#define _User_extensions_Handler_initialization( _initial_extensions ) \ - { \ - _Chain_Initialize_empty( &_User_extensions_List ); \ - \ - if ( (_initial_extensions) ) { \ - _User_extensions_Initial.Callouts = *(_initial_extensions); \ - _Chain_Append( \ - &_User_extensions_List, &_User_extensions_Initial.Node ); \ - } \ - } - -/*PAGE - * - * _User_extensions_Add_set - */ - -#define _User_extensions_Add_set( _the_extension, _extension_table ) \ - do { \ - (_the_extension)->Callouts = *(_extension_table); \ - \ - _Chain_Append( &_User_extensions_List, &(_the_extension)->Node ); \ - } while ( 0 ) - -/*PAGE - * - * _User_extensions_Add_API_set - */ - -#define _User_extensions_Add_API_set( _the_extension ) \ - _Chain_Prepend( &_User_extensions_List, &(_the_extension)->Node ) - - -/*PAGE - * - * _User_extensions_Remove_set - */ - -#define _User_extensions_Remove_set( _the_extension ) \ - _Chain_Extract( &(_the_extension)->Node ) - -/*PAGE - * - * _User_extensions_Run_list_forward - * - * NOTE: No parentheses around macro names here to avoid - * messing up the name and function call expansion. - */ - -#define _User_extensions_Run_list_forward( _name, _arguments ) \ - do { \ - Chain_Node *the_node; \ - User_extensions_Control *the_extension; \ - \ - for ( the_node = _User_extensions_List.first ; \ - !_Chain_Is_tail( &_User_extensions_List, the_node ) ; \ - the_node = the_node->next ) { \ - the_extension = (User_extensions_Control *) the_node; \ - \ - if ( the_extension->Callouts.## _name != NULL ) \ - (*the_extension->Callouts.## _name) _arguments; \ - \ - } \ - \ - } while ( 0 ) - -/*PAGE - * - * _User_extensions_Run_list_backward - * - * NOTE: No parentheses around macro names here to avoid - * messing up the name and function call expansion. - */ - -#define _User_extensions_Run_list_backward( _name, _arguments ) \ - do { \ - Chain_Node *the_node; \ - User_extensions_Control *the_extension; \ - \ - for ( the_node = _User_extensions_List.last ; \ - !_Chain_Is_head( &_User_extensions_List, the_node ) ; \ - the_node = the_node->previous ) { \ - the_extension = (User_extensions_Control *) the_node; \ - \ - if ( the_extension->Callouts.## _name != NULL ) \ - (*the_extension->Callouts.## _name) _arguments; \ - \ - } \ - \ - } while ( 0 ) - -/*PAGE - * - * _User_extensions_Thread_switch - * - */ - -#define _User_extensions_Thread_switch( _executing, _heir ) \ - _User_extensions_Run_list_forward(thread_switch, (_executing, _heir) ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/watchdog.inl b/c/src/exec/score/macros/rtems/score/watchdog.inl deleted file mode 100644 index d24224f93d..0000000000 --- a/c/src/exec/score/macros/rtems/score/watchdog.inl +++ /dev/null @@ -1,172 +0,0 @@ -/* watchdog.inl - * - * This file contains the macro implementation of all inlined routines - * in the Watchdog Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __WATCHDOG_inl -#define __WATCHDOG_inl - -#include - -/*PAGE - * - * _Watchdog_Initialize - * - */ - -#define _Watchdog_Initialize( _the_watchdog, _routine, _id, _user_data ) \ - { \ - (_the_watchdog)->state = WATCHDOG_INACTIVE; \ - (_the_watchdog)->routine = (_routine); \ - (_the_watchdog)->id = (_id); \ - (_the_watchdog)->user_data = (_user_data); \ - } - -/*PAGE - * - * _Watchdog_Is_active - * - */ - -#define _Watchdog_Is_active( _the_watchdog ) \ - ( (_the_watchdog)->state == WATCHDOG_ACTIVE ) - -/*PAGE - * - * _Watchdog_Activate - * - */ - -#define _Watchdog_Activate( _the_watchdog ) \ - (_the_watchdog)->state = WATCHDOG_ACTIVE - -/*PAGE - * - * _Watchdog_Deactivate - * - */ - -#define _Watchdog_Deactivate( _the_watchdog ) \ - (_the_watchdog)->state = WATCHDOG_REMOVE_IT - -/*PAGE - * - * _Watchdog_Tickle_ticks - * - */ - -#define _Watchdog_Tickle_ticks() \ - _Watchdog_Tickle( &_Watchdog_Ticks_chain ) - -/*PAGE - * - * _Watchdog_Tickle_seconds - * - */ - -#define _Watchdog_Tickle_seconds() \ - _Watchdog_Tickle( &_Watchdog_Seconds_chain ) - -/*PAGE - * - * _Watchdog_Insert_ticks - * - */ - -#define _Watchdog_Insert_ticks( _the_watchdog, _units ) \ - do { \ - (_the_watchdog)->initial = (_units); \ - _Watchdog_Insert( &_Watchdog_Ticks_chain, (_the_watchdog) ); \ - } while ( 0 ) - -/*PAGE - * - * _Watchdog_Insert_seconds - * - */ - -#define _Watchdog_Insert_seconds( _the_watchdog, _units ) \ - do { \ - (_the_watchdog)->initial = (_units); \ - _Watchdog_Insert( &_Watchdog_Seconds_chain, (_the_watchdog) ); \ - } while ( 0 ) - -/*PAGE - * - * _Watchdog_Adjust_seconds - * - */ - -#define _Watchdog_Adjust_seconds( _direction, _units ) \ - _Watchdog_Adjust( &_Watchdog_Seconds_chain, (_direction), (_units) ) - -/*PAGE - * - * _Watchdog_Adjust_ticks - * - */ - -#define _Watchdog_Adjust_ticks( _direction, _units ) \ - _Watchdog_Adjust( &_Watchdog_Ticks_chain, (_direction), (_units) ) - -/*PAGE - * - * _Watchdog_Reset - * - */ - -#define _Watchdog_Reset( _the_watchdog ) \ - { \ - (void) _Watchdog_Remove( (_the_watchdog) ); \ - _Watchdog_Insert( &_Watchdog_Ticks_chain, (_the_watchdog) ); \ - } - -/*PAGE - * - * _Watchdog_Next - * - */ - -#define _Watchdog_Next( _watchdog ) \ - ((Watchdog_Control *) (_watchdog)->Node.next) - -/*PAGE - * - * _Watchdog_Previous - * - */ - -#define _Watchdog_Previous( _watchdog ) \ - ((Watchdog_Control *) (_watchdog)->Node.previous) - -/*PAGE - * - * _Watchdog_First - * - */ - -#define _Watchdog_First( _header ) \ - ((Watchdog_Control *) (_header)->first) - -/*PAGE - * - * _Watchdog_Last - * - */ - -#define _Watchdog_Last( _header ) \ - ((Watchdog_Control *) (_header)->last) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/macros/rtems/score/wkspace.inl b/c/src/exec/score/macros/rtems/score/wkspace.inl deleted file mode 100644 index 5efe247fb1..0000000000 --- a/c/src/exec/score/macros/rtems/score/wkspace.inl +++ /dev/null @@ -1,39 +0,0 @@ -/* wkspace.inl - * - * This file contains the macro implementation of the inlined routines - * from the RAM Workspace Handler. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __WORKSPACE_inl -#define __WORKSPACE_inl - -/*PAGE - * - * _Workspace_Allocate - * - */ - -#define _Workspace_Allocate( _size ) \ - _Heap_Allocate( &_Workspace_Area, (_size) ) - -/*PAGE - * - * _Workspace_Free - * - */ - -#define _Workspace_Free( _block ) \ - _Heap_Free( &_Workspace_Area, (_block) ) - -#endif -/* end of include file */ diff --git a/c/src/exec/score/src/coretod.c b/c/src/exec/score/src/coretod.c deleted file mode 100644 index 9da6f11510..0000000000 --- a/c/src/exec/score/src/coretod.c +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Time of Day (TOD) Handler - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include -#include -#include - -/*PAGE - * - * _TOD_Handler_initialization - * - * This routine initializes the time of day handler. - * - * Input parameters: - * microseconds_per_tick - microseconds between clock ticks - * - * Output parameters: NONE - */ - -void _TOD_Handler_initialization( - unsigned32 microseconds_per_tick -) -{ - _TOD_Microseconds_per_tick = microseconds_per_tick; - - _TOD_Seconds_since_epoch = 0; - - _TOD_Current.year = TOD_BASE_YEAR; - _TOD_Current.month = 1; - _TOD_Current.day = 1; - _TOD_Current.hour = 0; - _TOD_Current.minute = 0; - _TOD_Current.second = 0; - _TOD_Current.ticks = 0; - - if ( microseconds_per_tick == 0 ) - _TOD_Ticks_per_second = 0; - else - _TOD_Ticks_per_second = - TOD_MICROSECONDS_PER_SECOND / microseconds_per_tick; - - _Watchdog_Initialize( &_TOD_Seconds_watchdog, _TOD_Tickle, 0, NULL ); - - _TOD_Is_set = FALSE; - _TOD_Activate( _TOD_Ticks_per_second ); -} - -/*PAGE - * - * _TOD_Set - * - * This rountine sets the current date and time with the specified - * new date and time structure. - * - * Input parameters: - * the_tod - pointer to the time and date structure - * seconds_since_epoch - seconds since system epoch - * - * Output parameters: NONE - */ - -void _TOD_Set( - TOD_Control *the_tod, - Watchdog_Interval seconds_since_epoch -) -{ - Watchdog_Interval ticks_until_next_second; - - _Thread_Disable_dispatch(); - _TOD_Deactivate(); - - if ( seconds_since_epoch < _TOD_Seconds_since_epoch ) - _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, - _TOD_Seconds_since_epoch - seconds_since_epoch ); - else - _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, - seconds_since_epoch - _TOD_Seconds_since_epoch ); - - ticks_until_next_second = _TOD_Ticks_per_second; - if ( ticks_until_next_second > _TOD_Current.ticks ) - ticks_until_next_second -= _TOD_Current.ticks; - - _TOD_Current = *the_tod; - _TOD_Seconds_since_epoch = seconds_since_epoch; - _TOD_Is_set = TRUE; - _TOD_Activate( ticks_until_next_second ); - - _Thread_Enable_dispatch(); -} - -/*PAGE - * - * _TOD_Validate - * - * This kernel routine checks the validity of a date and time structure. - * - * Input parameters: - * the_tod - pointer to a time and date structure - * - * Output parameters: - * TRUE - if the date, time, and tick are valid - * FALSE - if the the_tod is invalid - * - * NOTE: This routine only works for leap-years through 2099. - */ - -boolean _TOD_Validate( - TOD_Control *the_tod -) -{ - unsigned32 days_in_month; - - if ((the_tod->ticks >= _TOD_Ticks_per_second) || - (the_tod->second >= TOD_SECONDS_PER_MINUTE) || - (the_tod->minute >= TOD_MINUTES_PER_HOUR) || - (the_tod->hour >= TOD_HOURS_PER_DAY) || - (the_tod->month == 0) || - (the_tod->month > TOD_MONTHS_PER_YEAR) || - (the_tod->year < TOD_BASE_YEAR) || - (the_tod->day == 0) ) - return FALSE; - - if ( (the_tod->year % 4) == 0 ) - days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; - else - days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; - - if ( the_tod->day > days_in_month ) - return FALSE; - - return TRUE; -} - -/*PAGE - * - * _TOD_To_seconds - * - * This routine returns the seconds from the epoch until the - * current date and time. - * - * Input parameters: - * the_tod - pointer to the time and date structure - * - * Output parameters: - * returns - seconds since epoch until the_tod - */ - -unsigned32 _TOD_To_seconds( - TOD_Control *the_tod -) -{ - unsigned32 time; - unsigned32 year_mod_4; - - time = the_tod->day - 1; - year_mod_4 = the_tod->year & 3; - - if ( year_mod_4 == 0 ) - time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; - else - time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; - - time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * - ( (TOD_DAYS_PER_YEAR * 4) + 1); - - time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; - - time *= TOD_SECONDS_PER_DAY; - - time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) - * TOD_SECONDS_PER_MINUTE; - - time += the_tod->second; - - return( time ); -} - -/*PAGE - * - * _TOD_Tickle - * - * This routine updates the calendar time and tickles the - * per second watchdog timer chain. - * - * Input parameters: - * ignored - this parameter is ignored - * - * Output parameters: NONE - * - * NOTE: This routine only works for leap-years through 2099. - */ - -void _TOD_Tickle( - Objects_Id id, - void *ignored -) -{ - unsigned32 leap; - - _TOD_Current.ticks = 0; - ++_TOD_Seconds_since_epoch; - if ( ++_TOD_Current.second >= TOD_SECONDS_PER_MINUTE ) { - _TOD_Current.second = 0; - if ( ++_TOD_Current.minute >= TOD_MINUTES_PER_HOUR ) { - _TOD_Current.minute = 0; - if ( ++_TOD_Current.hour >= TOD_HOURS_PER_DAY ) { - _TOD_Current.hour = 0; - if ( _TOD_Current.year & 0x3 ) leap = 0; - else leap = 1; - if ( ++_TOD_Current.day > - _TOD_Days_per_month[ leap ][ _TOD_Current.month ]) { - _TOD_Current.day = 1; - if ( ++_TOD_Current.month > TOD_MONTHS_PER_YEAR ) { - _TOD_Current.month = 1; - _TOD_Current.year++; - } - } - } - } - } - - _Watchdog_Tickle_seconds(); - _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, _TOD_Ticks_per_second ); -} diff --git a/c/src/exec/score/tools/hppa1.1/genoffsets.c b/c/src/exec/score/tools/hppa1.1/genoffsets.c deleted file mode 100644 index 39f900b48a..0000000000 --- a/c/src/exec/score/tools/hppa1.1/genoffsets.c +++ /dev/null @@ -1,346 +0,0 @@ -/* - * genoffsets.c - * - * This file generates the offsets.h for the HP PA-RISC port of RTEMS. - * - * NOTE: It only prints the offset for structures actually used - * by the assembly code. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include - -#if defined(__hpux__) && defined(__hppa__) -#include -#endif - -void print_information( void ); - -int main( - int argc, - char **argv -) -{ - unsigned int size = 0; - - /* - * Print the file header - */ - -printf( - "/* offsets.h\n" - " *\n" - " * This include file contains the offsets of elements in the\n" - " * C data structures used by the assembly language code for the\n" - " * HP PA-RISC 1.1 port of RTEMS.\n" - " *\n" - " * NOTE: THIS FILE IS AUTOMATICALLY GENERATED!!!!\n" - " * DO NOT EDIT THIS BY HAND!!!!\n" - " *\n" - " * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.\n" - " * On-Line Applications Research Corporation (OAR).\n" - " * All rights assigned to U.S. Government, 1994.\n" - " *\n" - " * This material may be reproduced by or for the U.S. Government pursuant\n" - " * to the copyright license under the clause at DFARS 252.227-7013. This\n" - " * notice must appear in all copies of this file and its derivatives.\n" - " */\n" - "\n" - "#ifndef __OFFSETS_h\n" - "#define __OFFSETS_h\n" - "\n" -); - -#define PRINT_IT( STRING, TYPE, FIELD ) \ - printf( "#define\t%s\t0x%p\t\t/* %d */\n", \ - STRING, \ - &((TYPE)0)->FIELD, \ - (int) &((TYPE)0)->FIELD ); - -#define PRINT_SIZE( STRING, item ) \ - printf( "#ifdef ASM\n#define\t%s\t%d\t\t/* 0x%x */\n#endif\n", \ - STRING, \ - sizeof(item), \ - sizeof(item) ); - -#define PRINT_COMMENT( STRING ) \ - printf( \ - "\n" \ - "/*\n" \ - " * " STRING "\n" \ - " */\n" \ - "\n" \ - ); - -#if defined(__hpux__) && defined(__hppa__) - -/* - * Offsets of elements in the Context_control structure. - */ - - PRINT_COMMENT("Context_Control information"); - - PRINT_IT( "FLAGS_OFFSET", Context_Control *, flags ); - PRINT_IT( "R1_OFFSET", Context_Control *, gr1 ); - PRINT_IT( "R2_OFFSET", Context_Control *, gr2 ); - PRINT_IT( "R3_OFFSET", Context_Control *, gr3 ); - PRINT_IT( "R4_OFFSET", Context_Control *, gr4 ); - PRINT_IT( "R5_OFFSET", Context_Control *, gr5 ); - PRINT_IT( "R6_OFFSET", Context_Control *, gr6 ); - PRINT_IT( "R7_OFFSET", Context_Control *, gr7 ); - PRINT_IT( "R8_OFFSET", Context_Control *, gr8 ); - PRINT_IT( "R9_OFFSET", Context_Control *, gr9 ); - PRINT_IT( "R10_OFFSET", Context_Control *, gr10 ); - PRINT_IT( "R11_OFFSET", Context_Control *, gr11 ); - PRINT_IT( "R12_OFFSET", Context_Control *, gr12 ); - PRINT_IT( "R13_OFFSET", Context_Control *, gr13 ); - PRINT_IT( "R14_OFFSET", Context_Control *, gr14 ); - PRINT_IT( "R15_OFFSET", Context_Control *, gr15 ); - PRINT_IT( "R16_OFFSET", Context_Control *, gr16 ); - PRINT_IT( "R17_OFFSET", Context_Control *, gr17 ); - PRINT_IT( "R18_OFFSET", Context_Control *, gr18 ); - PRINT_IT( "R19_OFFSET", Context_Control *, gr19 ); - PRINT_IT( "R20_OFFSET", Context_Control *, gr20 ); - PRINT_IT( "R21_OFFSET", Context_Control *, gr21 ); - PRINT_IT( "R22_OFFSET", Context_Control *, gr22 ); - PRINT_IT( "R23_OFFSET", Context_Control *, gr23 ); - PRINT_IT( "R24_OFFSET", Context_Control *, gr24 ); - PRINT_IT( "R25_OFFSET", Context_Control *, gr25 ); - PRINT_IT( "R26_OFFSET", Context_Control *, gr26 ); - PRINT_IT( "R27_OFFSET", Context_Control *, gr27 ); - PRINT_IT( "R28_OFFSET", Context_Control *, gr28 ); - PRINT_IT( "R29_OFFSET", Context_Control *, gr29 ); - PRINT_IT( "R30_OFFSET", Context_Control *, sp ); - PRINT_IT( "R31_OFFSET", Context_Control *, gr31 ); - - /* - * And common aliases for the above - */ - - PRINT_COMMENT("Common aliases for above"); - - PRINT_IT( "RP_OFFSET", Context_Control *, gr2 ); - PRINT_IT( "ARG3_OFFSET", Context_Control *, gr23 ); - PRINT_IT( "ARG2_OFFSET", Context_Control *, gr24 ); - PRINT_IT( "ARG1_OFFSET", Context_Control *, gr25 ); - PRINT_IT( "ARG0_OFFSET", Context_Control *, gr26 ); - PRINT_IT( "SP_OFFSET", Context_Control *, sp ); - PRINT_IT( "DP_OFFSET", Context_Control *, gr27 ); - PRINT_IT( "RET0_OFFSET", Context_Control *, gr28 ); - PRINT_IT( "RET1_OFFSET", Context_Control *, gr29 ); - - PRINT_SIZE("CPU_CONTEXT_SIZE", Context_Control); - - PRINT_COMMENT("Context_Control_fp information"); - - PRINT_IT( "FR0_OFFSET", Context_Control_fp *, fr0 ); - PRINT_IT( "FR1_OFFSET", Context_Control_fp *, fr1 ); - PRINT_IT( "FR2_OFFSET", Context_Control_fp *, fr2 ); - PRINT_IT( "FR3_OFFSET", Context_Control_fp *, fr3 ); - PRINT_IT( "FR4_OFFSET", Context_Control_fp *, fr4 ); - PRINT_IT( "FR5_OFFSET", Context_Control_fp *, fr5 ); - PRINT_IT( "FR6_OFFSET", Context_Control_fp *, fr6 ); - PRINT_IT( "FR7_OFFSET", Context_Control_fp *, fr7 ); - PRINT_IT( "FR8_OFFSET", Context_Control_fp *, fr8 ); - PRINT_IT( "FR9_OFFSET", Context_Control_fp *, fr9 ); - PRINT_IT( "FR10_OFFSET", Context_Control_fp *, fr10 ); - PRINT_IT( "FR11_OFFSET", Context_Control_fp *, fr11 ); - PRINT_IT( "FR12_OFFSET", Context_Control_fp *, fr12 ); - PRINT_IT( "FR13_OFFSET", Context_Control_fp *, fr13 ); - PRINT_IT( "FR14_OFFSET", Context_Control_fp *, fr14 ); - PRINT_IT( "FR15_OFFSET", Context_Control_fp *, fr15 ); - PRINT_IT( "FR16_OFFSET", Context_Control_fp *, fr16 ); - PRINT_IT( "FR17_OFFSET", Context_Control_fp *, fr17 ); - PRINT_IT( "FR18_OFFSET", Context_Control_fp *, fr18 ); - PRINT_IT( "FR19_OFFSET", Context_Control_fp *, fr19 ); - PRINT_IT( "FR20_OFFSET", Context_Control_fp *, fr20 ); - PRINT_IT( "FR21_OFFSET", Context_Control_fp *, fr21 ); - PRINT_IT( "FR22_OFFSET", Context_Control_fp *, fr22 ); - PRINT_IT( "FR23_OFFSET", Context_Control_fp *, fr23 ); - PRINT_IT( "FR24_OFFSET", Context_Control_fp *, fr24 ); - PRINT_IT( "FR25_OFFSET", Context_Control_fp *, fr25 ); - PRINT_IT( "FR26_OFFSET", Context_Control_fp *, fr26 ); - PRINT_IT( "FR27_OFFSET", Context_Control_fp *, fr27 ); - PRINT_IT( "FR28_OFFSET", Context_Control_fp *, fr28 ); - PRINT_IT( "FR29_OFFSET", Context_Control_fp *, fr29 ); - PRINT_IT( "FR30_OFFSET", Context_Control_fp *, fr30 ); - PRINT_IT( "FR31_OFFSET", Context_Control_fp *, fr31 ); - - PRINT_SIZE("CPU_CONTEXT_FP_SIZE", Context_Control_fp); - - /* - * And the control registers - */ - - PRINT_COMMENT("Control register portion of context"); - - PRINT_IT( "SAR_OFFSET", Context_Control *, sar ); - PRINT_IT( "IPSW_OFFSET", Context_Control *, ipsw ); - PRINT_IT( "IIR_OFFSET", Context_Control *, iir ); - PRINT_IT( "IOR_OFFSET", Context_Control *, ior ); - PRINT_IT( "ISR_OFFSET", Context_Control *, isr ); - PRINT_IT( "PCOQFRONT_OFFSET", Context_Control *, pcoqfront ); - PRINT_IT( "PCOQBACK_OFFSET", Context_Control *, pcoqback ); - PRINT_IT( "PCSQFRONT_OFFSET", Context_Control *, pcsqfront ); - PRINT_IT( "PCSQBACK_OFFSET", Context_Control *, pcsqback ); - PRINT_IT( "ITIMER_OFFSET", Context_Control *, itimer ); - - /* - * Full interrupt frame (integer + float) - */ - PRINT_COMMENT("Interrupt frame information"); - - PRINT_IT( "INTEGER_CONTEXT_OFFSET", CPU_Interrupt_frame *, Integer ); - PRINT_IT( "FP_CONTEXT_OFFSET", CPU_Interrupt_frame *, Floating_Point ); - size = sizeof( CPU_Interrupt_frame ); - - if ( size % CPU_STACK_ALIGNMENT ) - size += CPU_STACK_ALIGNMENT - (size % CPU_STACK_ALIGNMENT); - - printf( "#define\tCPU_INTERRUPT_FRAME_SIZE\t%d\t\t/* 0x%x */\n", size, size ); - -#else - - print_information(); - -#endif - -#undef PRINT_IT -#undef PRINT_SIZE -#undef PRINT_COMMENT - - /* - * Print the end of file stuff - */ - - printf( - "\n" - "#endif /* __OFFSETS_h */\n" - "\n" - "/* end of include file */\n" - ); - - return 0; -} - -void print_information( void ) -{ - -#define PRINT_IT( STRING, NUMBER ) \ - printf( "#define\t%s\t0x%x\t\t/* %d */\n", \ - STRING, \ - NUMBER, \ - NUMBER ); - -#define PRINT_SIZE( STRING, NUMBER ) \ - printf( "#define\t%s\t0x%x\t\t/* %d */\n", \ - STRING, \ - NUMBER, \ - NUMBER ); - -#define PRINT_COMMENT( STRING ) \ - printf( \ - "\n" \ - "/*\n" \ - " * " STRING "\n" \ - " */\n" \ - "\n" \ - ); - -/* - * Offsets of elements in the Context_control structure. - */ - - PRINT_COMMENT("Context_Control information"); - - PRINT_IT( "FLAGS_OFFSET", 0x00 ); - PRINT_IT( "R1_OFFSET", 0x04 ); - PRINT_IT( "R2_OFFSET", 0x08 ); - PRINT_IT( "R3_OFFSET", 0x0c ); - PRINT_IT( "R4_OFFSET", 0x00 ); - PRINT_IT( "R5_OFFSET", 0x14 ); - PRINT_IT( "R6_OFFSET", 0x18 ); - PRINT_IT( "R7_OFFSET", 0x1c ); - PRINT_IT( "R8_OFFSET", 0x20 ); - PRINT_IT( "R9_OFFSET", 0x24 ); - PRINT_IT( "R10_OFFSET", 0x28 ); - PRINT_IT( "R11_OFFSET", 0x2c ); - PRINT_IT( "R12_OFFSET", 0x30 ); - PRINT_IT( "R13_OFFSET", 0x34 ); - PRINT_IT( "R14_OFFSET", 0x38 ); - PRINT_IT( "R15_OFFSET", 0x3c ); - PRINT_IT( "R16_OFFSET", 0x40 ); - PRINT_IT( "R17_OFFSET", 0x44 ); - PRINT_IT( "R18_OFFSET", 0x48 ); - PRINT_IT( "R19_OFFSET", 0x4c ); - PRINT_IT( "R20_OFFSET", 0x50 ); - PRINT_IT( "R21_OFFSET", 0x54 ); - PRINT_IT( "R22_OFFSET", 0x58 ); - PRINT_IT( "R23_OFFSET", 0x5c ); - PRINT_IT( "R24_OFFSET", 0x60 ); - PRINT_IT( "R25_OFFSET", 0x64 ); - PRINT_IT( "R26_OFFSET", 0x68 ); - PRINT_IT( "R27_OFFSET", 0x6c ); - PRINT_IT( "R28_OFFSET", 0x70 ); - PRINT_IT( "R29_OFFSET", 0x74 ); - PRINT_IT( "R30_OFFSET", 0x78 ); - PRINT_IT( "R31_OFFSET", 0x7c ); - - /* - * And common aliases for the above - */ - - PRINT_COMMENT("Common aliases for above"); - - PRINT_IT( "RP_OFFSET", 0x08 ); - PRINT_IT( "ARG3_OFFSET", 0x5c ); - PRINT_IT( "ARG2_OFFSET", 0x60 ); - PRINT_IT( "ARG1_OFFSET", 0x64 ); - PRINT_IT( "ARG0_OFFSET", 0x68 ); - PRINT_IT( "SP_OFFSET", 0x78 ); - PRINT_IT( "DP_OFFSET", 0x6c ); - PRINT_IT( "RET0_OFFSET", 0x74 ); - PRINT_IT( "RET1_OFFSET", 0x74 ); - - PRINT_SIZE("CPU_CONTEXT_SIZE", 168 ); - - PRINT_COMMENT("Context_Control_fp information"); - - PRINT_SIZE("CPU_CONTEXT_FP_SIZE", 256); - - /* - * And the control registers - */ - - PRINT_COMMENT("Control register portion of context"); - - PRINT_IT( "SAR_OFFSET", 0x80 ); - PRINT_IT( "IPSW_OFFSET", 0x84 ); - PRINT_IT( "IIR_OFFSET", 0x88 ); - PRINT_IT( "IOR_OFFSET", 0x8c ); - PRINT_IT( "ISR_OFFSET", 0x90 ); - PRINT_IT( "PCOQFRONT_OFFSET", 0x94 ); - PRINT_IT( "PCOQBACK_OFFSET", 0x98 ); - PRINT_IT( "PCSQFRONT_OFFSET", 0x9c ); - PRINT_IT( "PCSQBACK_OFFSET", 0xa0 ); - PRINT_IT( "ITIMER_OFFSET", 0xa4 ); - - /* - * Full interrupt frame (integer + float) - */ - - PRINT_COMMENT("Interrupt frame information"); - - PRINT_IT( "INTEGER_CONTEXT_OFFSET", 0x00 ); - PRINT_IT( "FP_CONTEXT_OFFSET", 0xa8 ); - PRINT_SIZE( "CPU_INTERRUPT_FRAME_SIZE", 448 ); - -} diff --git a/c/src/lib/include/rtems/assoc.h b/c/src/lib/include/rtems/assoc.h deleted file mode 100644 index 1982d654ac..0000000000 --- a/c/src/lib/include/rtems/assoc.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Rtems associativity routines. Mainly used to convert a value from - * one space to another (eg: our errno's to host errno's and v.v) - * - * - * $Id$ - */ - -#ifndef _INCLUDE_ASSOC_H -#define _INCLUDE_ASSOC_H - -typedef struct { - const char *name; - unsigned32 local_value; - unsigned32 remote_value; -} rtems_assoc_t; - -/* - * Flag/marker for optional default value in each table - */ - -#define RTEMS_ASSOC_DEFAULT_NAME "(default)" - -const rtems_assoc_t *rtems_assoc_ptr_by_name(const rtems_assoc_t *, const char *); -const rtems_assoc_t *rtems_assoc_ptr_by_value(const rtems_assoc_t *, unsigned32); -const rtems_assoc_t *rtems_assoc_ptr_by_remote(const rtems_assoc_t *, unsigned32); - -unsigned32 rtems_assoc_remote_by_local(const rtems_assoc_t *, unsigned32); -unsigned32 rtems_assoc_local_by_remote(const rtems_assoc_t *, unsigned32); -unsigned32 rtems_assoc_remote_by_name(const rtems_assoc_t *, const char *); -unsigned32 rtems_assoc_local_by_name(const rtems_assoc_t *, const char *); -const char *rtems_assoc_name_by_local(const rtems_assoc_t *, unsigned32); -const char *rtems_assoc_name_by_remote(const rtems_assoc_t *, unsigned32); - -unsigned32 rtems_assoc_remote_by_local_bitfield(const rtems_assoc_t *, unsigned32); -char *rtems_assoc_name_by_local_bitfield(const rtems_assoc_t *, unsigned32, char *); -char *rtems_assoc_name_by_remote_bitfield(const rtems_assoc_t *, unsigned32, char *); -unsigned32 rtems_assoc_local_by_remote_bitfield(const rtems_assoc_t *, unsigned32); - - -#endif /* ! _INCLUDE_ASSOC_H */ diff --git a/c/src/lib/include/rtems/error.h b/c/src/lib/include/rtems/error.h deleted file mode 100644 index e4d8c77200..0000000000 --- a/c/src/lib/include/rtems/error.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Defines and externs for rtems error reporting - * - * $Id$ - */ - -#ifndef __RTEMS_ERROR_h -#define __RTEMS_ERROR_h - -/* - * rtems_error() and rtems_panic() support - */ - -#define RTEMS_ERROR_ERRNO (1<<((sizeof(int) * 8) - 2)) /* hi bit; use 'errno' */ -#define RTEMS_ERROR_PANIC (RTEMS_ERROR_ERRNO / 2) /* err fatal; no return */ -#define RTEMS_ERROR_ABORT (RTEMS_ERROR_ERRNO / 4) /* err is fatal; panic */ - -#define RTEMS_ERROR_MASK (RTEMS_ERROR_ERRNO | RTEMS_ERROR_ABORT | \ - RTEMS_ERROR_PANIC) /* all */ - -const char *rtems_status_text(rtems_status_code); -int rtems_error(int error_code, const char *printf_format, ...); -#ifdef __GNUC__ -void rtems_panic(const char *printf_format, ...) - __attribute__ ((__noreturn__)); -#else -void rtems_panic(const char *printf_format, ...); -#endif - -extern int rtems_panic_in_progress; - -#endif -/* end of include file */ diff --git a/c/src/lib/include/rtems/libcsupport.h b/c/src/lib/include/rtems/libcsupport.h deleted file mode 100644 index e426ec5ef5..0000000000 --- a/c/src/lib/include/rtems/libcsupport.h +++ /dev/null @@ -1,43 +0,0 @@ -/* libcsupport.h - * - * This include file contains the information regarding the - * RTEMS specific support for the standard C library. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __LIBC_SUPPORT_h -#define __LIBC_SUPPORT_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -void RTEMS_Malloc_Initialize( - void *start, - size_t length, - size_t sbrk_amount -); - -extern void malloc_dump(void); -extern void malloc_walk(size_t source, size_t printf_enabled); -extern void libc_init(int reentrant); -extern int host_errno(void); -extern void fix_syscall_errno(void); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/lib/include/rtems/libio.h b/c/src/lib/include/rtems/libio.h deleted file mode 100644 index 07d72620b1..0000000000 --- a/c/src/lib/include/rtems/libio.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * General purpose communication channel for RTEMS to allow UNIX/POSIX - * system call behavior on top of RTEMS IO devices. - * - * TODO - * stat(2) - * unlink(2) - * rename(2) - * - * $Id$ - */ - -#ifndef _RTEMS_LIBIO_H -#define _RTEMS_LIBIO_H - -typedef unsigned32 rtems_libio_offset_t; - -/* - * An open file data structure, indexed by 'fd' - * TODO: - * should really have a separate per/file data structure that this - * points to (eg: size, offset, driver, pathname should be in that) - */ - -typedef struct { - rtems_driver_name_t *driver; - rtems_libio_offset_t size; /* size of file */ - rtems_libio_offset_t offset; /* current offset into the file */ - unsigned32 flags; - char *pathname; /* opened pathname */ - Objects_Id sem; - unsigned32 data0; /* private to "driver" */ - unsigned32 data1; /* ... */ -} rtems_libio_t; - - -/* - * param block for read/write - * Note: it must include 'offset' instead of using iop's offset since - * we can have multiple outstanding i/o's on a device. - */ - -typedef struct { - rtems_libio_t *iop; - rtems_libio_offset_t offset; - unsigned8 *buffer; - unsigned32 count; - unsigned32 flags; - unsigned32 bytes_moved; -} rtems_libio_rw_args_t; - -/* - * param block for open/close - */ - -typedef struct { - rtems_libio_t *iop; - unsigned32 flags; - unsigned32 mode; -} rtems_libio_open_close_args_t; - -/* - * param block for ioctl - */ - -typedef struct { - rtems_libio_t *iop; - unsigned32 command; - void *buffer; - unsigned32 ioctl_return; -} rtems_libio_ioctl_args_t; - - -/* - * Values for 'flag' - */ - -#define LIBIO_FLAGS_NO_DELAY 0x0001 /* return immediately if no data */ -#define LIBIO_FLAGS_READ 0x0002 /* reading */ -#define LIBIO_FLAGS_WRITE 0x0004 /* writing */ -#define LIBIO_FLAGS_LINE_BUFFERED 0x0008 /* line buffered io (^h, ^u, etc) */ -#define LIBIO_FLAGS_OPEN 0x0100 /* device is open */ -#define LIBIO_FLAGS_APPEND 0x0200 /* all writes append */ -#define LIBIO_FLAGS_CREATE 0x0400 /* create file */ - -#define LIBIO_FLAGS_READ_WRITE (LIBIO_FLAGS_READ | LIBIO_FLAGS_WRITE) - -void rtems_libio_config(rtems_configuration_table *config, unsigned32 max_fds); -void rtems_libio_init(void); - -int __open(const char *pathname, unsigned32 flag, unsigned32 mode); -int __close(int fd); -int __read(int fd, void *buffer, unsigned32 count); -int __write(int fd, const void *buffer, unsigned32 count); -int __ioctl(int fd, unsigned32 command, void *buffer); -int __lseek(int fd, rtems_libio_offset_t offset, int whence); - -#endif /* _RTEMS_LIBIO_H */ diff --git a/c/src/lib/include/sys/utsname.h b/c/src/lib/include/sys/utsname.h deleted file mode 100644 index ca15230d40..0000000000 --- a/c/src/lib/include/sys/utsname.h +++ /dev/null @@ -1,49 +0,0 @@ -/* sys/utsname.h - * - * $Id$ - */ - -#ifndef __POSIX_SYS_UTSNAME_h -#define __POSIX_SYS_UTSNAME_h - -#include -#include - -/* - * 4.4.1 Get System Name (Table 4-1), P1003.1b-1993, p. 90 - * - * NOTE: The lengths of the strings in this structure are - * just long enough to reliably contain the RTEMS information. - * For example, the fields are not long enough to support - * Internet hostnames. - */ - -struct utsname { - char sysname[ 32 ]; /* Name of this implementation of the operating system */ - char nodename[ 32 ]; /* Name of this node within an implementation */ - /* specified communication network */ - char release[ 32 ]; /* Current release level of this implementation */ - char version[ 32 ]; /* Current version level of this release */ - char machine[ 32 ]; /* Name of the hardware type on which the system */ - /* is running */ -}; - -/* - * 4.4.1 Get System Name, P1003.1b-1993, p. 90 - */ - -int uname( - struct utsname *name -); - -/* - * 4.5.2 Get Process Times, P1003.1b-1993, p. 92 - */ - -clock_t times( - struct tms *buffer -); - -#endif -/* end of include file */ - diff --git a/c/src/lib/libbsp/hppa1.1/pxfl/README b/c/src/lib/libbsp/hppa1.1/pxfl/README deleted file mode 100644 index df3c872a34..0000000000 --- a/c/src/lib/libbsp/hppa1.1/pxfl/README +++ /dev/null @@ -1,8 +0,0 @@ -# -# $Id$ -# - -This is included just to give rtems users an example of how a Makefile -can "jump" out of the rtems source tree into another one. This was -used by the developer of the pxfl bsp to allow them to keep their bsp -outside the normal rtems tree. diff --git a/c/src/lib/libbsp/hppa1.1/pxfl/floss-bsp.h b/c/src/lib/libbsp/hppa1.1/pxfl/floss-bsp.h deleted file mode 100644 index 52a22d686b..0000000000 --- a/c/src/lib/libbsp/hppa1.1/pxfl/floss-bsp.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - * we need a bsp.h in the rtems tree to keep the src/tests/... - * happy. - * But our bsp.h really lives in floss tree. - * - * Fake it out by installing this one in rtems - * - # $Id$ - */ - -#include diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h b/c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h deleted file mode 100644 index 2dfc2cc8df..0000000000 --- a/c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h +++ /dev/null @@ -1,121 +0,0 @@ -/* bsp.h - * - * This include file contains all HP PA-RISC simulator definitions. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __PXFL_BSP_h -#define __PXFL_BSP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -/* - * Define the time limits for RTEMS Test Suite test durations. - * Long test and short test duration limits are provided. These - * values are in seconds and need to be converted to ticks for the - * application. - * - */ - -#define MAX_LONG_TEST_DURATION 3 /* 3 seconds */ -#define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ - -/* - * Define the interrupt mechanism for Time Test 27 - */ - -#define MUST_WAIT_FOR_INTERRUPT 1 - -#define Install_tm27_vector( handler ) \ - ( void ) set_vector( handler, HPPA_INTERRUPT_EXTERNAL_INTERVAL_TIMER, 1 ); - -#define Cause_tm27_intr() \ - set_itimer( get_itimer() + 20 ) - -#define Clear_tm27_intr() \ - set_eirr( 0x80000000 ) - -#define Lower_tm27_intr() \ - { \ - register unsigned32 ignored; \ - HPPA_ASM_SSM( HPPA_PSW_I, ignored ); \ - } - -/* - * Simple spin delay in microsecond units for device drivers. - * This is very dependent on the clock speed of the target. - */ - -extern void Clock_delay(rtems_unsigned32 microseconds); -#define delay( microseconds ) \ - Clock_delay(microseconds); - -/* - * Todo: this should be put somewhere else - */ - -#undef CLOCK_DRIVER_TABLE_ENTRY -#define CLOCK_DRIVER_TABLE_ENTRY { Clock_initialize, NULL, NULL, NULL, NULL, Clock_control } -rtems_device_driver Clock_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -); - -/* - * We printf() to a buffer if multiprocessing, *or* if this is set. - * ref: src/lib/libbsp/hppa/pxfl/iosupp/consupp.c - */ - -extern int use_print_buffer; - -/* - * When not doing printf to a buffer, we do printf thru RTEMS libio - * and our tty driver. Set it up so that console is right. - */ - -#define CONSOLE_DRIVER_TABLE_ENTRY \ - { tty_initialize, tty_open, tty_close, tty_read, tty_write, tty_control } - -/* - * How many libio files we want - */ -#define BSP_LIBIO_MAX_FDS 20 - -#define HPPA_INTERRUPT_EXTERNAL_MPCI HPPA_INTERRUPT_EXTERNAL_10 - -rtems_isr_entry set_vector(rtems_isr_entry, rtems_vector_number, int); - -void bsp_start( void ); -void bsp_cleanup( void ); - -/* miscellaneous stuff assumed to exist */ - -extern rtems_configuration_table BSP_Configuration; /* owned by BSP */ -extern rtems_cpu_table Cpu_table; /* owned by BSP */ - -extern rtems_unsigned32 bsp_isr_level; - -extern int cpu_number; /* from 0; cpu number in a multi cpu system */ - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/include/coverhd.h b/c/src/lib/libbsp/hppa1.1/simhppa/include/coverhd.h deleted file mode 100644 index 1f5e3a3d5a..0000000000 --- a/c/src/lib/libbsp/hppa1.1/simhppa/include/coverhd.h +++ /dev/null @@ -1,104 +0,0 @@ -/* coverhd.h - * - * This include file has defines to represent the overhead associated - * with calling a particular directive from C for this target. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __COVERHD_h -#define __COVERHD_h - -#ifdef __cplusplus -extern "C" { -#endif - -#define CALLING_OVERHEAD_INITIALIZE_EXECUTIVE 0 -#define CALLING_OVERHEAD_SHUTDOWN_EXECUTIVE 0 -#define CALLING_OVERHEAD_TASK_CREATE 0 -#define CALLING_OVERHEAD_TASK_IDENT 0 -#define CALLING_OVERHEAD_TASK_START 0 -#define CALLING_OVERHEAD_TASK_RESTART 0 -#define CALLING_OVERHEAD_TASK_DELETE 0 -#define CALLING_OVERHEAD_TASK_SUSPEND 0 -#define CALLING_OVERHEAD_TASK_RESUME 0 -#define CALLING_OVERHEAD_TASK_SET_PRIORITY 0 -#define CALLING_OVERHEAD_TASK_MODE 0 -#define CALLING_OVERHEAD_TASK_GET_NOTE 0 -#define CALLING_OVERHEAD_TASK_SET_NOTE 0 -#define CALLING_OVERHEAD_TASK_WAKE_WHEN 0 -#define CALLING_OVERHEAD_TASK_WAKE_AFTER 0 -#define CALLING_OVERHEAD_INTERRUPT_CATCH 0 -#define CALLING_OVERHEAD_CLOCK_GET 0 -#define CALLING_OVERHEAD_CLOCK_SET 0 -#define CALLING_OVERHEAD_CLOCK_TICK 0 - -#define CALLING_OVERHEAD_TIMER_CREATE 0 -#define CALLING_OVERHEAD_TIMER_IDENT 0 -#define CALLING_OVERHEAD_TIMER_DELETE 0 -#define CALLING_OVERHEAD_TIMER_FIRE_AFTER 0 -#define CALLING_OVERHEAD_TIMER_FIRE_WHEN 0 -#define CALLING_OVERHEAD_TIMER_RESET 0 -#define CALLING_OVERHEAD_TIMER_CANCEL 0 -#define CALLING_OVERHEAD_SEMAPHORE_CREATE 0 -#define CALLING_OVERHEAD_SEMAPHORE_IDENT 0 -#define CALLING_OVERHEAD_SEMAPHORE_DELETE 0 -#define CALLING_OVERHEAD_SEMAPHORE_OBTAIN 0 -#define CALLING_OVERHEAD_SEMAPHORE_RELEASE 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_CREATE 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_IDENT 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_DELETE 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_SEND 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_BROADCAST 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_FLUSH 0 - -#define CALLING_OVERHEAD_EVENT_SEND 0 -#define CALLING_OVERHEAD_EVENT_RECEIVE 0 -#define CALLING_OVERHEAD_SIGNAL_CATCH 0 -#define CALLING_OVERHEAD_SIGNAL_SEND 0 -#define CALLING_OVERHEAD_PARTITION_CREATE 0 -#define CALLING_OVERHEAD_PARTITION_IDENT 0 -#define CALLING_OVERHEAD_PARTITION_DELETE 0 -#define CALLING_OVERHEAD_PARTITION_GET_BUFFER 0 -#define CALLING_OVERHEAD_PARTITION_RETURN_BUFFER 0 -#define CALLING_OVERHEAD_REGION_CREATE 0 -#define CALLING_OVERHEAD_REGION_IDENT 0 -#define CALLING_OVERHEAD_REGION_DELETE 0 -#define CALLING_OVERHEAD_REGION_GET_SEGMENT 0 -#define CALLING_OVERHEAD_REGION_RETURN_SEGMENT 0 -#define CALLING_OVERHEAD_PORT_CREATE 0 -#define CALLING_OVERHEAD_PORT_IDENT 0 -#define CALLING_OVERHEAD_PORT_DELETE 0 -#define CALLING_OVERHEAD_PORT_EXTERNAL_TO_INTERNAL 0 -#define CALLING_OVERHEAD_PORT_INTERNAL_TO_EXTERNAL 0 - -#define CALLING_OVERHEAD_IO_INITIALIZE 0 -#define CALLING_OVERHEAD_IO_OPEN 0 -#define CALLING_OVERHEAD_IO_CLOSE 0 -#define CALLING_OVERHEAD_IO_READ 0 -#define CALLING_OVERHEAD_IO_WRITE 0 -#define CALLING_OVERHEAD_IO_CONTROL 0 -#define CALLING_OVERHEAD_FATAL_ERROR_OCCURRED 0 -#define CALLING_OVERHEAD_RATE_MONOTONIC_CREATE 0 -#define CALLING_OVERHEAD_RATE_MONOTONIC_IDENT 0 -#define CALLING_OVERHEAD_RATE_MONOTONIC_DELETE 0 -#define CALLING_OVERHEAD_RATE_MONOTONIC_CANCEL 0 -#define CALLING_OVERHEAD_RATE_MONOTONIC_PERIOD 0 -#define CALLING_OVERHEAD_MULTIPROCESSING_ANNOUNCE 0 - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/include/ttydrv.h b/c/src/lib/libbsp/hppa1.1/simhppa/include/ttydrv.h deleted file mode 100644 index b20878d99c..0000000000 --- a/c/src/lib/libbsp/hppa1.1/simhppa/include/ttydrv.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * $Id$ - */ - -/* - * definitions for the tty driver - */ - -#ifndef _RTEMS_TTYDRV_H -#define _RTEMS_TTYDRV_H - -rtems_device_driver -tty_initialize( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg - ); - -rtems_device_driver -tty_open( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg - ); - -rtems_device_driver -tty_close( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg - ); - -rtems_device_driver -tty_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg - ); - -rtems_device_driver -tty_read( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg - ); - -rtems_device_driver -tty_write( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg - ); - -#endif /* _RTEMS_TTYDRV_H */ diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/README b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/README deleted file mode 100644 index cf60698ca4..0000000000 --- a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/README +++ /dev/null @@ -1,9 +0,0 @@ -# -# $Id$ -# - -This directory contains the SHM driver support files for the -HP PA-RISC simulator for the 72000 processor. - -WARNING: The interrupt support in this directory currently will - only work in a homogeneous system. diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/addrconv.c b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/addrconv.c deleted file mode 100644 index 0d67bba2a6..0000000000 --- a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/addrconv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Shm_Convert_address - * - * No address range conversion is required. - * - * Input parameters: - * address - address to convert - * - * Output parameters: - * returns - converted address - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include - -void *Shm_Convert_address( - void *address -) -{ - return ( address ); -} diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c deleted file mode 100644 index f29eecf093..0000000000 --- a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c +++ /dev/null @@ -1,89 +0,0 @@ -/* void Shm_Get_configuration( localnode, &shmcfg ) - * - * This routine initializes, if necessary, and returns a pointer - * to the Shared Memory Configuration Table for the HP PA-RISC - * simulator. - * - * INPUT PARAMETERS: - * localnode - local node number - * shmcfg - address of pointer to SHM Config Table - * - * OUTPUT PARAMETERS: - * *shmcfg - pointer to SHM Config Table - * - * NOTES: The MP interrupt used is the Runway bus' ability to directly - * address the control registers of up to four CPUs and cause - * interrupts on them. - * - * The following table illustrates the configuration limitations: - * - * BUS MAX - * MODE ENDIAN NODES - * ========= ====== ======= - * POLLED BIG 2+ - * INTERRUPT BIG 2..4 (on Runway) - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include - -#include - -#define INTERRUPT 0 /* can be interrupt or polling */ -#define POLLING 1 - -#define HPPA_RUNWAY_PROC_HPA_BASE ((void *) 0xFFFA0000) - -/* given a processor number, where is its HPA? */ -#define HPPA_RUNWAY_HPA(cpu) \ - ((rtems_unsigned32) (HPPA_RUNWAY_PROC_HPA_BASE + ((cpu) * 0x2000))) - -#define HPPA_RUNWAY_REG_IO_EIR_OFFSET 0x000 - -shm_config_table BSP_shm_cfgtbl; - -extern void Shm_Cause_interrupt_pxfl( rtems_unsigned32 node ); - -void Shm_Get_configuration( - rtems_unsigned32 localnode, - shm_config_table **shmcfg -) -{ - BSP_shm_cfgtbl.base = (vol_u32 *) 0x44000000; - BSP_shm_cfgtbl.length = 16 * KILOBYTE; - BSP_shm_cfgtbl.format = SHM_BIG; - - BSP_shm_cfgtbl.cause_intr = Shm_Cause_interrupt_pxfl; - -#ifdef NEUTRAL_BIG - BSP_shm_cfgtbl.convert = NULL_CONVERT; -#else - BSP_shm_cfgtbl.convert = CPU_swap_u32; -#endif - -#if ( POLLING == 1 ) - BSP_shm_cfgtbl.poll_intr = POLLED_MODE; - BSP_shm_cfgtbl.Intr.address = NO_INTERRUPT; - BSP_shm_cfgtbl.Intr.value = NO_INTERRUPT; - BSP_shm_cfgtbl.Intr.length = NO_INTERRUPT; -#else - BSP_shm_cfgtbl.poll_intr = INTR_MODE; - BSP_shm_cfgtbl.Intr.address = - (vol_u32 *) (HPPA_RUNWAY_HPA( localnode - 1) + - HPPA_RUNWAY_REG_IO_EIR_OFFSET); - BSP_shm_cfgtbl.Intr.value = HPPA_INTERRUPT_EXTERNAL_MPCI; - BSP_shm_cfgtbl.Intr.length = LONG; -#endif - - *shmcfg = &BSP_shm_cfgtbl; -} - diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/intr.c b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/intr.c deleted file mode 100644 index 161ae3f522..0000000000 --- a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/intr.c +++ /dev/null @@ -1,51 +0,0 @@ -/* void Shm_Cause_interrupt_pxfl( node ) - * - * This routine is the shared memory driver routine which - * generates interrupts to other CPUs. - * - * Input parameters: - * node - destination of this packet (0 = broadcast) - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include - -#include -#include - -#include - -void Shm_Cause_interrupt_pxfl( - rtems_unsigned32 node -) -{ - Shm_Interrupt_information *intr; - rtems_unsigned32 *u32; - rtems_unsigned32 value; - - intr = &Shm_Interrupt_table[node]; - value = intr->value; - - switch ( intr->length ) { - case NO_INTERRUPT: - break; - - case LONG: - u32 = (rtems_unsigned32 *)intr->address; - HPPA_ASM_STWAS( value, 0, u32 ); - break; - default: - fprintf( stderr, "Shm_Cause_interrupt_pxfl: Unsupported length!!!\n" ); - } -} diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/lock.c b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/lock.c deleted file mode 100644 index 724758b8b8..0000000000 --- a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/lock.c +++ /dev/null @@ -1,75 +0,0 @@ -/* Shared Memory Lock Routines - * - * This shared memory locked queue support routine need to be - * able to lock the specified locked queue. Interrupts are - * disabled while the queue is locked to prevent preemption - * and deadlock when two tasks poll for the same lock. - * previous level. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include - -/* - * Shm_Initialize_lock - * - * Initialize the lock for the specified locked queue. - */ - -void Shm_Initialize_lock( - Shm_Locked_queue_Control *lq_cb -) -{ - lq_cb->lock = LQ_UNLOCKED; -} - -/* Shm_Lock( &lq_cb ) - * - * This shared memory locked queue support routine locks the - * specified locked queue. It disables interrupts to prevent - * a deadlock condition. - */ - -void Shm_Lock( - Shm_Locked_queue_Control *lq_cb -) -{ - rtems_unsigned32 isr_level; - vol_u32 *lockptr = &lq_cb->lock; - rtems_unsigned32 lock_value; - - rtems_interrupt_disable( isr_level ); - - Shm_isrstat = isr_level; - - do { - HPPA_ASM_LDCWS( 0, 0, lockptr, lock_value ); - } while (lock_value == SHM_LOCK_VALUE); -} - -/* - * Shm_Unlock - * - * Unlock the lock for the specified locked queue. - */ - -void Shm_Unlock( - Shm_Locked_queue_Control *lq_cb -) -{ - rtems_unsigned32 isr_level; - - lq_cb->lock = SHM_UNLOCK_VALUE; - isr_level = Shm_isrstat; - rtems_interrupt_enable( isr_level ); -} diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/mpisr.c b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/mpisr.c deleted file mode 100644 index 29e897d781..0000000000 --- a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/mpisr.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Shm_setvec - * - * This driver routine sets the SHM interrupt vector to point to the - * driver's SHM interrupt service routine. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include - -void Shm_setvec( void ) -{ - set_vector( Shm_isr, HPPA_INTERRUPT_EXTERNAL_MPCI, 1 ); -} diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspclean.c b/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspclean.c deleted file mode 100644 index fe2aa75fc4..0000000000 --- a/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspclean.c +++ /dev/null @@ -1,36 +0,0 @@ -/* bsp_cleanup() - * - * This routine normally is part of start.s and returns - * control to a monitor but on the HP PA-RISC simulator - * we do that directly from main.c. - * - * INPUT: NONE - * - * OUTPUT: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include - -/* - * The app has "exited" (called rtems_shutdown_executive) - */ - -void bsp_cleanup( void ) -{ - /* - * Invoke any fatal error extension and "halt" - * By definition, rtems_fatal_error_occurred does not return. - */ - - rtems_fatal_error_occurred(0); -} diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c b/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c deleted file mode 100644 index 76b73c7222..0000000000 --- a/c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c +++ /dev/null @@ -1,439 +0,0 @@ -/* bsp_start() - * - * This routine starts the application. It includes application, - * board, and monitor specific initialization and configuration. - * The generic CPU dependent initialization has been performed - * before this routine is invoked. - * - * Called by RTEMS::RTEMS constructor in startup-ctor.cc - * - * INPUT: NONE - * - * OUTPUT: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include - -#include - -#include -#include - -#ifdef STACK_CHECKER_ON -#include -#endif - -extern rtems_configuration_table Configuration; - -rtems_configuration_table BSP_Configuration; -rtems_cpu_table Cpu_table; -rtems_unsigned32 bsp_isr_level; - -int cpu_number; - -#define WORKSPACE_SIZE (1024 * 1024) -rtems_unsigned8 MY_WORK_SPACE[ WORKSPACE_SIZE ]; - -/* - * Amount to increment itimer by each pass - * It is a variable instead of a #define to allow the 'looptest' - * script to bump it without recompiling rtems - */ - -rtems_unsigned32 CPU_HPPA_CLICKS_PER_TICK; - -#if SIMHPPA_FAST_IDLE - -/* - * Many of the tests are very slow on the simulator because they have - * have 5 second delays hardwired in. - * Try to speed those tests up by speeding up the clock when in idle - */ - -rtems_extension -fast_idle_switch_hook(rtems_tcb *current_task, - rtems_tcb *heir_task) -{ - static rtems_unsigned32 normal_clock = ~0; - static rtems_unsigned32 fast_clock; - - /* init our params on first call */ - if (normal_clock == ~0) - { - normal_clock = CPU_HPPA_CLICKS_PER_TICK; - fast_clock = CPU_HPPA_CLICKS_PER_TICK / 0x100; - if (fast_clock == 0) /* who? me? pathological? never! */ - fast_clock++; - } - - /* - * Checking for 'name' field of 'IDLE' is not the best/safest, - * but its the best we could think of at the moment. - */ - - if (heir_task == _Thread_Idle) - CPU_HPPA_CLICKS_PER_TICK = fast_clock; - else if (current_task == _Thread_Idle) - CPU_HPPA_CLICKS_PER_TICK = normal_clock; -} - -#endif - -/* - * Function: bsp_libc_init - * Created: 94/12/6 - * - * Description: - * Initialize whatever libc we are using - * called from bsp_postdriver_hook - * - * - * Parameters: - * none - * - * Returns: - * none. - * - * Side Effects: - * - * - * Notes: - * - * Deficiencies/ToDo: - * - * - */ - -void -bsp_libc_init(void) -{ - extern int end; - rtems_unsigned32 heap_start; - - heap_start = (rtems_unsigned32) &end; - if (heap_start & (CPU_ALIGNMENT-1)) - heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1); - - RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0); - - /* - * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) - * Uses malloc() to get area for the iops, so must be after malloc init - */ - - rtems_libio_init(); - - /* - * Set up for the libc handling. - * XXX; this should allow for case of some other non-clock interrupts - */ - - if (BSP_Configuration.ticks_per_timeslice > 0) - libc_init(1); /* reentrant if possible */ - else - libc_init(0); /* non-reentrant */ - - /* - * on MP systems, always use the print buffer - * instead of the (broken) system calls - */ - - if (BSP_Configuration.User_multiprocessing_table) - use_print_buffer = 1; - -#ifdef SIMHPPA_ROM - use_print_buffer = 1; -#endif -} - - -/* - * Function: bsp_pretasking_hook - * Created: 95/03/10 - * - * Description: - * BSP pretasking hook. Called just before drivers are initialized. - * Used to setup libc and install any BSP extensions. - * - * Parameters: - * none - * - * Returns: - * nada - * - * Side Effects: - * installs a few extensions - * - * Notes: - * Must not use libc (to do io) from here, since drivers are - * not yet initialized. - * - * Deficiencies/ToDo: - * - * - */ - -void -bsp_pretasking_hook(void) -{ - bsp_libc_init(); - -#if SIMHPPA_FAST_IDLE - /* - * Install the fast idle task switch extension - * - * on MP systems, might now want to do this; it confuses at least - * one test (mp06) - */ - -#if 0 - if (BSP_Configuration.User_multiprocessing_table == 0) -#endif - { - rtems_extensions_table fast_idle_extension; - rtems_id extension_id; - rtems_status_code rc; - - memset(&fast_idle_extension, 0, sizeof(fast_idle_extension)); - - fast_idle_extension.thread_switch = fast_idle_switch_hook; - - rc = rtems_extension_create(rtems_build_name('F', 'D', 'L', 'E'), - &fast_idle_extension, &extension_id); - if (rc != RTEMS_SUCCESSFUL) - rtems_fatal_error_occurred(rc); - } -#endif - - -#ifdef STACK_CHECKER_ON - /* - * Initialize the stack bounds checker - * We can either turn it on here or from the app. - */ - - Stack_check_Initialize(); -#endif -} - -/* - * After drivers are setup, register some "filenames" - * and open stdin, stdout, stderr files - * - * Newlib will automatically associate the files with these - * (it hardcodes the numbers) - */ - -void -bsp_postdriver_hook(void) -{ - int stdin_fd, stdout_fd, stderr_fd; - int error_code; - - error_code = 'S' << 24 | 'T' << 16; - - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) - rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) - rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) - rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); - - if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) - rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' ); -} - -/* - * Function: bsp_start - * Created: 94/12/6 - * - * Description: - * called by crt0 as our "main" equivalent - * - * - * - * Parameters: - * - * - * Returns: - * - * - * Side Effects: - * - * - * Notes: - * - * - * Deficiencies/ToDo: - * - * - */ - - -void -bsp_start(void) -{ - /* - * Set cpu_number to accurately reflect our cpu number - */ - -#ifdef hppa7200 - /* - * Use HPPA_DR0 if supported - */ - { - int dr0; - HPPA_ASM_MFCPU(HPPA_DR0, dr0); - cpu_number = (dr0 >> 4) & 0x7; - } -#else - if (Configuration.User_multiprocessing_table) - cpu_number = Configuration.User_multiprocessing_table->node - 1; - else - cpu_number = 0; -#endif - - /* - * Copy the table - */ - - BSP_Configuration = Configuration; - - BSP_Configuration.work_space_start = (void *)MY_WORK_SPACE; - if (BSP_Configuration.work_space_size) - BSP_Configuration.work_space_size = WORKSPACE_SIZE; - - /* - * Set up our hooks - * Make sure libc_init is done before drivers init'd so that - * they can use atexit() - */ - - Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */ - - Cpu_table.predriver_hook = NULL; - - Cpu_table.postdriver_hook = bsp_postdriver_hook; /* register drivers */ - - Cpu_table.idle_task = NULL; /* do not override system IDLE task */ - - /* - * Don't zero out the workspace. The simulator did it for us. - */ - - Cpu_table.do_zero_of_workspace = FALSE; - - Cpu_table.interrupt_stack_size = (12 * 1024); - - Cpu_table.extra_mpci_receive_server_stack = 0; - - /* - * Set this artificially low for the simulator - */ - - Cpu_table.itimer_clicks_per_microsecond = 1; - -#ifdef 0 - /* - * Commented by DIVISION INC. External interrupt - * processing is now divorced from RTEMS for HPPA. - */ - - /* - * Determine the external interrupt processing order - * the external interrupt handler walks thru this table, in - * order checking for posted interrupts. - */ - - Cpu_table.external_interrupts = 0; - - Cpu_table.external_interrupt[ Cpu_table.external_interrupts ] = - HPPA_INTERRUPT_EXTERNAL_INTERVAL_TIMER; - Cpu_table.external_interrupts++; - - if ( Configuration.User_multiprocessing_table ) { - Cpu_table.external_interrupt[ Cpu_table.external_interrupts ] = - HPPA_INTERRUPT_EXTERNAL_10; - Cpu_table.external_interrupts++; - } -#endif - - /* - * Add 1 region for RTEMS Malloc - */ - - BSP_Configuration.RTEMS_api_configuration->maximum_regions++; - -#ifdef RTEMS_NEWLIB - /* - * Add 1 extension for newlib libc - */ - - BSP_Configuration.maximum_extensions++; -#endif - -#ifdef STACK_CHECKER_ON - /* - * Add 1 extension for stack checker - */ - - BSP_Configuration.maximum_extensions++; -#endif - -#if SIMHPPA_FAST_IDLE - /* - * Add 1 extension for fast idle - */ - - BSP_Configuration.maximum_extensions++; -#endif - - /* - * Tell libio how many fd's we want and allow it to tweak config - */ - - rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS); - - /* - * Add 1 extension for MPCI_fatal - */ - - if (BSP_Configuration.User_multiprocessing_table) - BSP_Configuration.maximum_extensions++; - - /* - * Set the "clicks per tick" for the simulator - * used by libcpu/hppa/clock/clock.c to schedule interrupts - * - * Set it only if 0 to allow for simulator setting it via script - * on test startup. - */ - - if (CPU_HPPA_CLICKS_PER_TICK == 0) - CPU_HPPA_CLICKS_PER_TICK = 0x4000; - - /* - * Start most of RTEMS - * main() will start the rest - */ - - bsp_isr_level = rtems_initialize_executive_early( - &BSP_Configuration, - &Cpu_table - ); -} diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/startup/setvec.c b/c/src/lib/libbsp/hppa1.1/simhppa/startup/setvec.c deleted file mode 100644 index 9d2aa5de73..0000000000 --- a/c/src/lib/libbsp/hppa1.1/simhppa/startup/setvec.c +++ /dev/null @@ -1,66 +0,0 @@ -/* set_vector - * - * This routine installs an interrupt vector on the HP PA-RISC simulator. - * - * INPUT: - * handler - interrupt handler entry point - * vector - vector number - * type - 0 indicates raw hardware connect - * 1 indicates RTEMS interrupt connect - * - * NOTE 'type' is ignored on hppa; all interrupts are owned by RTEMS - * - * RETURNS: - * address of previous interrupt handler - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include - -/* - * Install an interrupt handler in the right place - * given its vector number from cpu/hppa.h - * There are 2 places an interrupt can be installed - * _ISR_Vector_table - * bsp interrupt XXX: nyi - * - * We decide which based on the vector number - */ - -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; - - /* is it an on chip interrupt? */ - /* XXX this should say CPU_INTERRUPT_NUMBER_OF_VECTORS */ - if (vector < HPPA_INTERRUPT_MAX) - { - rtems_interrupt_catch(handler, vector, &previous_isr); - } -#if 0 /* XXX */ - else if ((vector >= HPPA_INTERRUPT_BSP_BASE) && - (vector < (HPPA_INTERRUPT_BSP_BASE + HPPA_BSP_INTERRUPTS))) - { - pxfl_interrupt_install(handler, - vector - HPPA_INTERRUPT_BSP_BASE, - (rtems_isr_entry *) &previous_isr); - } -#endif - - return previous_isr; -} - diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/times b/c/src/lib/libbsp/hppa1.1/simhppa/times deleted file mode 100644 index 272488a8c0..0000000000 --- a/c/src/lib/libbsp/hppa1.1/simhppa/times +++ /dev/null @@ -1,7 +0,0 @@ -# -# Timing Test Suite Results for the PA-RISC Simulator. -# -# $Id$ -# - -Times are not available for the PA-RISC Simulator. diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/tools/print_dump.c b/c/src/lib/libbsp/hppa1.1/simhppa/tools/print_dump.c deleted file mode 100644 index 8b4313166a..0000000000 --- a/c/src/lib/libbsp/hppa1.1/simhppa/tools/print_dump.c +++ /dev/null @@ -1,332 +0,0 @@ -/* - * print_dump - * - * $Id$ - * - * COPYRIGHT (c) 1994 by Division Incorporated - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of Division Incorporated not be - * used in advertising or publicity pertaining to distribution - * of the software without specific, written prior permission. - * Division Incorporated makes no representations about the - * suitability of this software for any purpose. - */ - -#define GETOPTARGS "v" - -char *USAGE = "\ -usage: print_dump [ -v ] \n\ - -v -- verbose\n\ - Reads HP simulator 'memdump' output of 'print_buffer' structure - on stdin. Dumps it out in vanilla ASCII. -"; - -#include -#include -#include -#include -#include -#include -#include -#include - -#define Failed(x) (((int) (x)) == -1) -#define TRUE 1 -#define FALSE 0 -#define STREQ(a,b) (strcmp(a,b) == 0) -#define NUMELEMS(arr) (sizeof(arr) / sizeof(arr[0])) - -/* - * Definitions for unsigned "ints"; especially for use in data structures - * that will be shared among (potentially) different cpu's (we punt on - * byte ordering problems tho) - */ - -typedef unsigned char u8; -typedef unsigned short u16; -typedef unsigned int u32; - -typedef union uval { - u8 uv_chars[4]; - u16 uv_words[2]; - u32 uv_long; - void *uv_ptr[sizeof(long) / sizeof(void *)]; -} uval_t; - - -/* - * vars controlled by command line options - */ - -int verbose = FALSE; /* be verbose */ - -extern char *optarg; /* getopt(3) control vars */ -extern int optind, opterr; -extern int errno; - -char *progname; /* for error() */ - -void error(int errn, ...); - -#define ERR_ERRNO (1<<((sizeof(int) * 8) - 2)) /* hi bit; use 'errno' */ -#define ERR_FATAL (ERR_ERRNO / 2) /* error is fatal; no return */ -#define ERR_ABORT (ERR_ERRNO / 4) /* error is fatal; abort */ -#define ERR_MASK (ERR_ERRNO | ERR_FATAL | ERR_ABORT) /* all */ - -int process(void); -void prchar(unsigned int ch); - - -int -main(int argc, char **argv, char **env) -{ - register int c; - int showusage = FALSE; /* usage error? */ - - /* - * figure out invocation leaf-name - */ - - if ((progname = strrchr(argv[0], '/')) == (char *) NULL) - progname = argv[0]; - else - progname++; - - argv[0] = progname; /* for getopt err reporting */ - - /* - * Check options and arguments. - */ - - opterr = 0; /* we'll report all errors */ - while ((c = getopt(argc, argv, GETOPTARGS)) != EOF) - switch (c) - { - case 'v': /* toggle verbose */ - verbose = ! verbose; - break; - - case '?': - showusage = TRUE; - } - - if (showusage) - { - (void) fprintf(stderr, "%s", USAGE); - exit(1); - } - - return process(); -} - - -/* - * process(arg) - * - * Input looks like this - * - * Starting address: 00000001.480035a0 - * ----------------------------------- - -+0000 / 0d0a0d0a 2a2a2a20 53454d20 54455354 202d2d20 4e4f4445 2032202a 2a2a0d0a -+0020 / 73703a20 30783433 30303030 31300d0a 30783438 30613161 38383a20 676f7420 - .... -+0b40 / xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx - - * - * The 'xxxxxxxxx' shows up if the page has not been allocated. - */ - -int -process(void) -{ - uval_t b[8]; - u32 ignore; - char *p; - int i; - int failed_once; - - char line[1024]; - -#define PRINT_BUFFER_SIZE (16 * 1024) - struct { - int index; - int size; - u8 buffer[PRINT_BUFFER_SIZE]; - } print_buffer; - - /* we stuff the data into print_buffer using memcpy() */ - p = (char *) &print_buffer; - - failed_once = 0; - - while (gets(line)) - { - char *cp; - - /* hack; deal with the 'xxxxxxxx' problem noted above */ - for (cp=line; *cp; cp++) - if (*cp == 'x') - *cp = '0'; - - if (*line != '+') - continue; - if (sscanf(line, "+%x / %x %x %x %x %x %x %x %x\n", - &ignore, - &b[0].uv_long, - &b[1].uv_long, - &b[2].uv_long, - &b[3].uv_long, - &b[4].uv_long, - &b[5].uv_long, - &b[6].uv_long, - &b[7].uv_long) != 9) - { - if (failed_once) - error(ERR_FATAL, "2nd format problem; giving up"); - error(0, "format problem in line: `%s`", line); - failed_once = 1; - } - - memcpy((void *) p, (void *) b, sizeof(b)); - p += sizeof(b); - } - - if (verbose) - printf("buffer size: %d\n", print_buffer.size); - - if (print_buffer.size < 0) - error(ERR_FATAL, "size is too small"); - - if (print_buffer.size != sizeof(print_buffer.buffer)) - { - error(ERR_FATAL, "buffer size mismatch, expected %d", - sizeof(print_buffer.buffer)); - /* XXX we really should just dynamically allocate the buffer */ - } - - i = print_buffer.index + 1; - while (i != print_buffer.index) - { - unsigned int c; - c = print_buffer.buffer[i++]; - if (c && (c != '\r')) - prchar(c); - i %= print_buffer.size; - } - printf("\n"); - return 0; -} - -/* de-controlify */ -char *de_control[] = { - "^@", "^A", "^B", "^C", "^D", "^E", "^F", "^G", "^H", "^I", "^J", "^K", - "^L", "^M", "^N", "^O", "^P", "^Q", "^R", "^S", "^T", "^U", "^V", "^W", - "^X", "^Y", "^Z", "^[", "^\\", "^]", "^~", "^_", - " ", "!", "\"", "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", - ".", "/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":", ";", - "<", "=", ">", "?", "@", "A", "B", "C", "D", "E", "F", "G", "H", "I", - "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", - "X", "Y", "Z", "[", "\\", "]", "^", "_", "`", "a", "b", "c", "d", "e", - "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", - "t", "u", "v", "w", "x", "y", "z", "{", "|", "}", "~", "^?", - "M-^@", "M-^A", "M-^B", "M-^C", "M-^D", "M-^E", "M-^F", "M-^G", - "M-^H", "M-^I", "M-^J", "M-^K", "M-^L", "M-^M", "M-^N", "M-^O", - "M-^P", "M-^Q", "M-^R", "M-^S", "M-^T", "M-^U", "M-^V", "M-^W", - "M-^X", "M-^Y", "M-^Z", "M-^[", "M-^\\", "M-^]", "M-^~", "M-^_", - "M- ", "M-!", "M-\"", "M-#", "M-$", "M-%", "M-&", "M-'", - "M-(", "M-)", "M-*", "M-+", "M-,", "M--", "M-.", "M-/", - "M-0", "M-1", "M-2", "M-3", "M-4", "M-5", "M-6", "M-7", - "M-8", "M-9", "M-:", "M-;", "M-<", "M-=", "M->", "M-?", - "M-@", "M-A", "M-B", "M-C", "M-D", "M-E", "M-F", "M-G", - "M-H", "M-I", "M-J", "M-K", "M-L", "M-M", "M-N", "M-O", - "M-P", "M-Q", "M-R", "M-S", "M-T", "M-U", "M-V", "M-W", - "M-X", "M-Y", "M-Z", "M-[", "M-\\", "M-]", "M-^", "M-_", - "M-`", "M-a", "M-b", "M-c", "M-d", "M-e", "M-f", "M-g", - "M-h", "M-i", "M-j", "M-k", "M-l", "M-m", "M-n", "M-o", - "M-p", "M-q", "M-r", "M-s", "M-t", "M-u", "M-v", "M-w", - "M-x", "M-y", "M-z", "M-{", "M-|", "M-}", "M-~", "M-^?" -}; - -/* - * prchar(ch); print ch in a readable format, ie ^X or X or ~^X or DEL, etc. - */ - -void -prchar(unsigned int ch) -{ - if (isprint(ch) || isspace(ch)) - putchar(ch); - else - printf("%s", de_control[ch]); -} - - -/* - * error(errn, arglist) - * report an error to stderr using printf(3) conventions. - * Any output is preceded by ': ' - * - * Uses ERR_EXIT bit to request exit(errn) - * ERR_ABORT to request abort() - * ERR_ERRNO to indicate use of errno instead of argument. - * - * If resulting 'errn' is non-zero, it is assumed to be an 'errno' and its - * associated error message is appended to the output. - */ - -/*VARARGS*/ - -void -error(int error_flag, ...) -{ - va_list arglist; - register char *format; - extern char *sys_errlist[]; - extern int sys_nerr; - int local_errno; - - extern int errno; - - (void) fflush(stdout); /* in case stdout/stderr same */ - - local_errno = error_flag & ~ERR_MASK; - if (error_flag & ERR_ERRNO) /* use errno? */ - local_errno = errno; - - va_start(arglist, error_flag); - format = va_arg(arglist, char *); - (void) fprintf(stderr, "%s: ", progname); - (void) vfprintf(stderr, format, arglist); - va_end(arglist); - - if (local_errno) - if ((local_errno > 0) && (local_errno < sys_nerr)) - (void) fprintf(stderr, " (%s)\n", sys_errlist[local_errno]); - else - (void) fprintf(stderr, " (unknown errno=%d)\n", local_errno); - else - (void) fprintf(stderr, "\n"); - - (void) fflush(stderr); - - if (error_flag & (ERR_FATAL | ERR_ABORT)) - { - if (error_flag & ERR_FATAL) - { - error(0, local_errno ? "fatal error, exiting" : "exiting"); - exit(local_errno); - } - else - { - error(0, "fatal error, aborting"); - abort(); - } - } -} - diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/tty/tty.c b/c/src/lib/libbsp/hppa1.1/simhppa/tty/tty.c deleted file mode 100644 index 4a8c2757ec..0000000000 --- a/c/src/lib/libbsp/hppa1.1/simhppa/tty/tty.c +++ /dev/null @@ -1,254 +0,0 @@ -/* - * Tty IO Driver - * This is a "libio" driver based on libc/support/generic/libio interface - * which is on top of the RTEMS IO manager. - * - * These provide UNIX-like read and write calls for the C library. - * - * COPYRIGHT (c) 1994 by Division Incorporated - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of Division Incorporated not be - * used in advertising or publicity pertaining to distribution - * of the software without specific, written prior permission. - * Division Incorporated makes no representations about the - * suitability of this software for any purpose. - * - * $Id$ - */ - -#include -#include - -#include - -#define PRINT_BUFFER_SIZE (16 * 1024) - -/* - * NOTE: this structure is dumplicated in print_dump.c utility - */ - -struct { - int index; - int size; - char buffer[PRINT_BUFFER_SIZE]; -} print_buffer; - -/* always use printf buffer if non-zero */ -int use_print_buffer; - -static int host_read_syscall(int fd, char *buffer, int count); -static int host_write_syscall(int fd, char *buffer, int count); - -rtems_device_driver -tty_initialize( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg - ) -{ - rtems_status_code status; - - status = rtems_io_register_name("/dev/tty00", - major, - (rtems_device_minor_number) 0); - if (status != RTEMS_SUCCESSFUL) - rtems_fatal_error_occurred(status); - - return RTEMS_SUCCESSFUL; -} - -rtems_device_driver -tty_open( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg - ) -{ - return RTEMS_SUCCESSFUL; -} - -rtems_device_driver -tty_close( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg - ) -{ - return RTEMS_SUCCESSFUL; -} - -rtems_device_driver -tty_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg - ) -{ - return RTEMS_SUCCESSFUL; -} - - -rtems_device_driver -tty_read( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg - ) -{ - rtems_libio_rw_args_t *rw_args; - int count = 0; - - rw_args = (rtems_libio_rw_args_t *) arg; - - /* - * If we are printing to a buffer, then just return newline on all - * read's. If we return 0 bytes read, then the pause() calls in - * the RTEMS tests get hosed (pause() does a gets()) - */ - - if ( use_print_buffer ) - { - *rw_args->buffer = '\n'; - count = 1; - } - else - { - count = host_read_syscall(0, rw_args->buffer, rw_args->count); - } - - if (count >= 0) - { - rw_args->bytes_moved = count; - return RTEMS_SUCCESSFUL; - } - return RTEMS_UNSATISFIED; -} - -rtems_device_driver -tty_write( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg - ) -{ - unsigned32 level; - rtems_libio_rw_args_t *rw_args; - int count = 0; - int fd = 1; /* XXX fixme; needs to be saved in iop */ - - rw_args = (rtems_libio_rw_args_t *) arg; - - /* - * HACK alert - * - * Some of the simulators have real problems when multi cpu and - * using the system calls. Until this is fixed, if we are multi - * cpu then we write to a printf buffer - */ - - if ( use_print_buffer ) - { - /* save size in memory for dumper */ - if (print_buffer.size == 0) - print_buffer.size = PRINT_BUFFER_SIZE; - - while (rw_args->count-- > 0) - { - rtems_interrupt_disable(level); - print_buffer.buffer[print_buffer.index] = *rw_args->buffer++; - print_buffer.index++; - print_buffer.index &= (PRINT_BUFFER_SIZE - 1); - print_buffer.buffer[print_buffer.index] = 0; - rtems_interrupt_enable(level); - count++; - } - } - else - { -#if 1 - /* - * if on a multi cpu system and writing to stdout, redirect to stderr - * so we can keep them separate - */ - - if ((cpu_number == 1) && (fd == 1)) - fd = 2; -#endif - count = host_write_syscall(fd, rw_args->buffer, rw_args->count); - } - - if (count >= 0) - { - rw_args->bytes_moved = count; - return RTEMS_SUCCESSFUL; - } - return RTEMS_UNSATISFIED; -} - - -/* - * Host system call hack. - * This little trick gets all the args in the right registers - * for the system call and permits simpler inline asm. - * Since this whole thing (syscalls under simulator) is a hack, - * this little bit more is not going to hurt anything. - */ - - -static int -host_read_syscall( - int fd, - char *buffer, - int count - ) -{ - unsigned32 level; - int rc; - - rtems_interrupt_disable(level); - - /* This is an HPUX system call, with return value copied out */ - asm volatile (" stw %%r19,-28(0,%%r30)\n\ - ldil L%%0xc0000000,%%r1\n\ - ble 4(7,%%r1)\n\ - ldi 3,%%r22\n\ - ldw -28(0,%%r30),%%r19\n\ - copy %%r28, %0" - : "=r" (rc) - : ); - - rtems_interrupt_enable(level); - return rc; -} - -static int -host_write_syscall( - int fd, - char *buffer, - int count - ) -{ - unsigned32 level; - int rc; - - rtems_interrupt_disable(level); - - /* This is an HPUX system call, with return value copied out */ - asm volatile (" stw %%r19,-28(0,%%r30)\n\ - ldil L%%0xc0000000,%%r1\n\ - ble 4(7,%%r1)\n\ - ldi 4,%%r22\n\ - ldw -28(0,%%r30),%%r19\n\ - copy %%r28, %0" - : "=r" (rc) - : ); - - rtems_interrupt_enable(level); - return rc; -} - diff --git a/c/src/lib/libbsp/mips/p4000/README b/c/src/lib/libbsp/mips/p4000/README deleted file mode 100644 index 31152f15ec..0000000000 --- a/c/src/lib/libbsp/mips/p4000/README +++ /dev/null @@ -1,47 +0,0 @@ -# -# README,v 1.2 1995/05/31 16:56:03 joel Exp -# -# @(#)README 08/20/96 1.2 -# - -BSP NAME: p4000 -BOARD: Algorithmics P4000 SBC -BUS: N/A -CPU FAMILY: mips -CPU: IDT 4650 -COPROCESSORS: N/A -MODE: 32 bit mode - -DEBUG MONITOR: IDT/SIM - -PERIPHERALS -=========== -TIMERS: 4650 internal - RESOLUTION: half of internal clock frequency -SERIAL PORTS: IDT/SIM controlled -REAL-TIME CLOCK: none -DMA: none -VIDEO: none -SCSI: none -NETWORKING: none - -DRIVER INFORMATION -================== -CLOCK DRIVER: 4650 internal -IOSUPP DRIVER: N/A -SHMSUPP: N/A -TIMER DRIVER: 4650 internal -TTY DRIVER: uses IDT/SIM - -STDIO -===== -PORT: Console port 0 -ELECTRICAL: RS-232 -BAUD: 9600 -BITS PER CHARACTER: 8 -PARITY: None -STOP BITS: 1 - -NOTES -===== - diff --git a/c/src/lib/libbsp/mips/p4000/console/console.c b/c/src/lib/libbsp/mips/p4000/console/console.c deleted file mode 100644 index d8797b48e0..0000000000 --- a/c/src/lib/libbsp/mips/p4000/console/console.c +++ /dev/null @@ -1,270 +0,0 @@ -/* - * This file contains the IDT 4650 console IO package. - * - * Author: Craig Lebakken - * - * COPYRIGHT (c) 1996 by Transition Networks Inc. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of Transition Networks not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * Transition Networks makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/lib/libbsp/no_cpu/no_bsp/console/console.c: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - - -#ifndef lint -static char _sccsid[] = "@(#)console.c 08/20/96 1.6\n"; -#endif - - -#include -#include -#include - -char idtsim_getchar( void ); -void idtsim_putchar( char c ); -void mips_leddisplay( char a, char b, char c, char d ); - - -/* console_initialize - * - * This routine initializes the console IO driver. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * Return values: - */ - -rtems_device_driver console_initialize( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *arg -) -{ - rtems_status_code status; - - status = rtems_io_register_name( - "/dev/console", - major, - (rtems_device_minor_number) 0 - ); - - if (status != RTEMS_SUCCESSFUL) - rtems_fatal_error_occurred(status); - - return RTEMS_SUCCESSFUL; -} - - -/* is_character_ready - * - * This routine returns TRUE if a character is available. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * Return values: - */ - -rtems_boolean is_character_ready( - char *ch -) -{ - *ch = '\0'; /* return NULL for no particular reason */ - return(TRUE); -} - -/* inbyte - * - * This routine reads a character from the SOURCE. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * Return values: - * character read from SOURCE - */ - -char inbyte( void ) -{ - /* - * If polling, wait until a character is available. - */ - - return idtsim_getchar(); -} - -/* outbyte - * - * This routine transmits a character out the SOURCE. It may support - * XON/XOFF flow control. - * - * Input parameters: - * ch - character to be transmitted - * - * Output parameters: NONE - */ - -void outbyte( - char ch -) -{ -#define NUM_LEDS 4 - static unsigned int cur_led = 0; - static unsigned char led_chars[NUM_LEDS]; - - /* - * If polling, wait for the transmitter to be ready. - * Check for flow control requests and process. - * Then output the character. - */ - - idtsim_putchar( ch ); - - /* print out first four alpha numeric characters in a line */ - if ( ch == '\n' ) - { - mips_leddisplay( led_chars[0], led_chars[1], led_chars[2], led_chars[3] ); - cur_led = 0; - } - else if ( isalnum( ch ) && cur_led < NUM_LEDS ) - { - led_chars[cur_led++] = ch; - } - -} - - -static int console_fd = -1; - -/* - * Open entry point - */ - -rtems_device_driver console_open( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ -#if 0 - int console_fd = open("tty0", 2); /* open for read/write */ -#endif - return RTEMS_SUCCESSFUL; -} - -/* - * Close entry point - */ - -rtems_device_driver console_close( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ -#if 0 - if ( console_fd ) - close( console_fd ); -#endif - return RTEMS_SUCCESSFUL; -} - -/* - * read bytes from the serial port. We only have stdin. - */ - -rtems_device_driver console_read( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - rtems_libio_rw_args_t *rw_args; - char *buffer; - int maximum; - int count = 0; - - rw_args = (rtems_libio_rw_args_t *) arg; - - buffer = rw_args->buffer; - maximum = rw_args->count; - - for (count = 0; count < maximum; count++) { - buffer[ count ] = inbyte(); - if (buffer[ count ] == '\n' || buffer[ count ] == '\r') { - buffer[ count++ ] = '\n'; - buffer[ count ] = 0; - break; - } - } - - rw_args->bytes_moved = count; - return (count >= 0) ? RTEMS_SUCCESSFUL : RTEMS_UNSATISFIED; -} - -/* - * write bytes to the serial port. Stdout and stderr are the same. - */ - -rtems_device_driver console_write( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - int count; - int maximum; - rtems_libio_rw_args_t *rw_args; - char *buffer; - - rw_args = (rtems_libio_rw_args_t *) arg; - - buffer = rw_args->buffer; - maximum = rw_args->count; - - for (count = 0; count < maximum; count++) { - if ( buffer[ count ] == '\n') { - outbyte('\r'); - } - outbyte( buffer[ count ] ); - } - - rw_args->bytes_moved = maximum; - return 0; -} - -/* - * IO Control entry point - */ - -rtems_device_driver console_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - return RTEMS_SUCCESSFUL; -} diff --git a/c/src/lib/libbsp/mips/p4000/console/led.S b/c/src/lib/libbsp/mips/p4000/console/led.S deleted file mode 100644 index e62b82e041..0000000000 --- a/c/src/lib/libbsp/mips/p4000/console/led.S +++ /dev/null @@ -1,23 +0,0 @@ -/* - * $Id$ - */ - -#include -#include -#include - - -FRAME(mips_leddisplay,sp,0,ra) - j ra - nop -ENDFRAME(mips_leddisplay) - -FRAME(sbddisplay,sp,0,ra) - j ra -ENDFRAME(sbddisplay) - - -FRAME(sbdblank,sp,0,ra) - j ra -ENDFRAME(sbdblank) - diff --git a/c/src/lib/libbsp/mips/p4000/include/bsp.h b/c/src/lib/libbsp/mips/p4000/include/bsp.h deleted file mode 100644 index 9b591ae3fd..0000000000 --- a/c/src/lib/libbsp/mips/p4000/include/bsp.h +++ /dev/null @@ -1,126 +0,0 @@ -/* bsp.h - * - * This include file contains all board IO definitions. - * - * XXX : put yours in here - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ -/* @(#)bsp.h 03/15/96 1.1 */ - -#ifndef __NO_BSP_h -#define __NO_BSP_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -extern void WriteDisplay( char * string ); - -/* - * Define the time limits for RTEMS Test Suite test durations. - * Long test and short test duration limits are provided. These - * values are in seconds and need to be converted to ticks for the - * application. - * - */ - -#define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ -#define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ - -/* - * Stuff for Time Test 27 - */ - -#define MUST_WAIT_FOR_INTERRUPT 0 - -#define Install_tm27_vector( handler ) set_vector( (handler), 0, 1 ) - -#define Cause_tm27_intr() - -#define Clear_tm27_intr() - -#define Lower_tm27_intr() - -extern unsigned32 mips_get_timer( void ); - -#define CPU_CLOCK_RATE_MHZ (50) -#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) /* equivalent to CPU clock speed in MHz */ - -/* - * Simple spin delay in microsecond units for device drivers. - * This is very dependent on the clock speed of the target. - * - * NOTE: This macro generates a warning like "integer constant out - * of range" which is safe to ignore. In 64 bit mode, unsigned32 - * types are actually 64 bits long so that comparisons between - * unsigned32 types and pointers are valid. The warning is caused - * by code in the delay macro that is necessary for 64 bit mode. - */ - -#define delay( microseconds ) \ - { \ - unsigned32 _end_clock = mips_get_timer() + microseconds * CLOCKS_PER_MICROSECOND; \ - _end_clock %= 0x100000000; /* make sure result is 32 bits */ \ - \ - /* handle timer overflow, if necessary */ \ - while ( _end_clock < mips_get_timer() ); \ - \ - while ( _end_clock > mips_get_timer() ); \ - } - -/* Constants */ - -#define RAM_START 0 -#define RAM_END 0x100000 - -/* miscellaneous stuff assumed to exist */ - -extern rtems_configuration_table BSP_Configuration; - -/* - * Device Driver Table Entries - */ - -/* - * NOTE: Use the standard Console driver entry - */ - -/* - * NOTE: Use the standard Clock driver entry - */ - -/* - * How many libio files we want - */ - -#define BSP_LIBIO_MAX_FDS 20 - -/* functions */ - -void bsp_cleanup( void ); - -mips_isr_entry set_vector( /* returns old vector */ - rtems_isr_entry handler, /* isr routine */ - rtems_vector_number vector, /* vector number */ - int type /* RTEMS or RAW intr */ -); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/lib/libbsp/mips/p4000/include/coverhd.h b/c/src/lib/libbsp/mips/p4000/include/coverhd.h deleted file mode 100644 index 57019d2870..0000000000 --- a/c/src/lib/libbsp/mips/p4000/include/coverhd.h +++ /dev/null @@ -1,116 +0,0 @@ -/* coverhd.h - * - * This include file has defines to represent the overhead associated - * with calling a particular directive from C. These are used in the - * Timing Test Suite to ignore the overhead required to pass arguments - * to directives. On some CPUs and/or target boards, this overhead - * is significant and makes it difficult to distinguish internal - * RTEMS execution time from that used to call the directive. - * This file should be updated after running the C overhead timing - * test. Once this update has been performed, the RTEMS Time Test - * Suite should be rebuilt to account for these overhead times in the - * timing results. - * - * NOTE: If these are all zero, then the times reported include all - * all calling overhead including passing of arguments. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ -/* @(#)coverhd.h 04/08/96 1.3 */ - -#ifndef __COVERHD_h -#define __COVERHD_h - -#ifdef __cplusplus -extern "C" { -#endif - -#define CALLING_OVERHEAD_INITIALIZE_EXECUTIVE 5 -#define CALLING_OVERHEAD_SHUTDOWN_EXECUTIVE 4 -#define CALLING_OVERHEAD_TASK_CREATE 6 -#define CALLING_OVERHEAD_TASK_IDENT 4 -#define CALLING_OVERHEAD_TASK_START 5 -#define CALLING_OVERHEAD_TASK_RESTART 4 -#define CALLING_OVERHEAD_TASK_DELETE 4 -#define CALLING_OVERHEAD_TASK_SUSPEND 4 -#define CALLING_OVERHEAD_TASK_RESUME 4 -#define CALLING_OVERHEAD_TASK_SET_PRIORITY 5 -#define CALLING_OVERHEAD_TASK_MODE 4 -#define CALLING_OVERHEAD_TASK_GET_NOTE 5 -#define CALLING_OVERHEAD_TASK_SET_NOTE 5 -#define CALLING_OVERHEAD_TASK_WAKE_WHEN 9 -#define CALLING_OVERHEAD_TASK_WAKE_AFTER 4 -#define CALLING_OVERHEAD_INTERRUPT_CATCH 5 -#define CALLING_OVERHEAD_CLOCK_GET 9 -#define CALLING_OVERHEAD_CLOCK_SET 8 -#define CALLING_OVERHEAD_CLOCK_TICK 3 - -#define CALLING_OVERHEAD_TIMER_CREATE 4 -#define CALLING_OVERHEAD_TIMER_IDENT 4 -#define CALLING_OVERHEAD_TIMER_DELETE 4 -#define CALLING_OVERHEAD_TIMER_FIRE_AFTER 6 -#define CALLING_OVERHEAD_TIMER_FIRE_WHEN 10 -#define CALLING_OVERHEAD_TIMER_RESET 4 -#define CALLING_OVERHEAD_TIMER_CANCEL 4 -#define CALLING_OVERHEAD_SEMAPHORE_CREATE 5 -#define CALLING_OVERHEAD_SEMAPHORE_IDENT 4 -#define CALLING_OVERHEAD_SEMAPHORE_DELETE 4 -#define CALLING_OVERHEAD_SEMAPHORE_OBTAIN 5 -#define CALLING_OVERHEAD_SEMAPHORE_RELEASE 4 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_CREATE 5 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_IDENT 4 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_DELETE 4 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_SEND 4 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT 4 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_BROADCAST 5 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE 5 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_FLUSH 4 - -#define CALLING_OVERHEAD_EVENT_SEND 4 -#define CALLING_OVERHEAD_EVENT_RECEIVE 5 -#define CALLING_OVERHEAD_SIGNAL_CATCH 5 -#define CALLING_OVERHEAD_SIGNAL_SEND 4 -#define CALLING_OVERHEAD_PARTITION_CREATE 6 -#define CALLING_OVERHEAD_PARTITION_IDENT 4 -#define CALLING_OVERHEAD_PARTITION_DELETE 4 -#define CALLING_OVERHEAD_PARTITION_GET_BUFFER 4 -#define CALLING_OVERHEAD_PARTITION_RETURN_BUFFER 4 -#define CALLING_OVERHEAD_REGION_CREATE 6 -#define CALLING_OVERHEAD_REGION_IDENT 4 -#define CALLING_OVERHEAD_REGION_DELETE 4 -#define CALLING_OVERHEAD_REGION_GET_SEGMENT 5 -#define CALLING_OVERHEAD_REGION_RETURN_SEGMENT 4 -#define CALLING_OVERHEAD_PORT_CREATE 6 -#define CALLING_OVERHEAD_PORT_IDENT 4 -#define CALLING_OVERHEAD_PORT_DELETE 4 -#define CALLING_OVERHEAD_PORT_EXTERNAL_TO_INTERNAL 4 -#define CALLING_OVERHEAD_PORT_INTERNAL_TO_EXTERNAL 4 - -#define CALLING_OVERHEAD_IO_INITIALIZE 5 -#define CALLING_OVERHEAD_IO_OPEN 5 -#define CALLING_OVERHEAD_IO_CLOSE 5 -#define CALLING_OVERHEAD_IO_READ 5 -#define CALLING_OVERHEAD_IO_WRITE 5 -#define CALLING_OVERHEAD_IO_CONTROL 5 -#define CALLING_OVERHEAD_FATAL_ERROR_OCCURRED 4 -#define CALLING_OVERHEAD_RATE_MONOTONIC_CREATE 4 -#define CALLING_OVERHEAD_RATE_MONOTONIC_IDENT 4 -#define CALLING_OVERHEAD_RATE_MONOTONIC_DELETE 4 -#define CALLING_OVERHEAD_RATE_MONOTONIC_CANCEL 4 -#define CALLING_OVERHEAD_RATE_MONOTONIC_PERIOD 4 -#define CALLING_OVERHEAD_MULTIPROCESSING_ANNOUNCE 3 - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/lib/libbsp/mips/p4000/liblnk/lnklib.S b/c/src/lib/libbsp/mips/p4000/liblnk/lnklib.S deleted file mode 100644 index ae2509ce3c..0000000000 --- a/c/src/lib/libbsp/mips/p4000/liblnk/lnklib.S +++ /dev/null @@ -1,62 +0,0 @@ -/* - * $Id$ - */ - -#include -#include - -#define FRAME(name,frm_reg,offset,ret_reg) \ - .globl name; \ - .ent name; \ -name:; \ - .frame frm_reg,offset,ret_reg - -#define ENDFRAME(name) \ - .end name - -#define PROM_LINK(name,entry) \ - .globl name; \ - .ent name; \ -name: la $2,+entry; \ - j $2; \ - .end name - -#define PROM_ENTRY(x) (0xbfc00000+((x)*8)) - -#define PROM_RESET PROM_ENTRY(0) -#define PROM_NOT_IMP PROM_ENTRY(1) -#define PROM_RESTART PROM_ENTRY(2) -#define PROM_REINIT PROM_ENTRY(3) -#define PROM_GETCHAR PROM_ENTRY(11) -#define PROM_PUTCHAR PROM_ENTRY(12) -#define PROM_SHOWCHAR PROM_ENTRY(13) -#define PROM_PRINTF PROM_ENTRY(16) -#define PROM_RETURN PROM_ENTRY(17) - -#define PROM_RGETS PROM_ENTRY(25) -#define PROM_FLUSHCACHE PROM_ENTRY(28) -#define PROM_CLEARCACHE PROM_ENTRY(29) -#define PROM_SETJMP PROM_ENTRY(30) -#define PROM_LONGJMP PROM_ENTRY(31) - - .text - -PROM_LINK(idtsim_putchar, PROM_PUTCHAR) -PROM_LINK(idtsim_getchar, PROM_GETCHAR) -PROM_LINK(idtsim_showchar, PROM_SHOWCHAR) -PROM_LINK(idtsim__exit, PROM_RETURN) -PROM_LINK(idtsim_reinit, PROM_REINIT) -PROM_LINK(idtsim_restart, PROM_RESTART) -PROM_LINK(idtsim_reset, PROM_RESET) -PROM_LINK(idtsim_promexit, PROM_RETURN) -PROM_LINK(idtsim_setjmp, PROM_SETJMP) -PROM_LINK(idtsim_longjmp, PROM_LONGJMP) - -FRAME(idtsim_init_sbrk,sp,0,ra) - j ra -ENDFRAME(idtsim_init_sbrk) - -FRAME(idtsim_init_file,sp,0,ra) - j ra -ENDFRAME(idtsim_init_file) - diff --git a/c/src/lib/libbsp/mips/p4000/start/start.S b/c/src/lib/libbsp/mips/p4000/start/start.S deleted file mode 100644 index 8dc31c8999..0000000000 --- a/c/src/lib/libbsp/mips/p4000/start/start.S +++ /dev/null @@ -1,299 +0,0 @@ -/* - -Based upon IDT provided code with the following release: - -This source code has been made available to you by IDT on an AS-IS -basis. Anyone receiving this source is licensed under IDT copyrights -to use it in any way he or she deems fit, including copying it, -modifying it, compiling it, and redistributing it either with or -without modifications. No license under IDT patents or patent -applications is to be implied by the copyright license. - -Any user of this software should understand that IDT cannot provide -technical support for this software and will not be responsible for -any consequences resulting from the use of this software. - -Any person who transfers this source code or any derivative work must -include the IDT copyright notice, this paragraph, and the preceeding -two paragraphs in the transferred software. - -COPYRIGHT IDT CORPORATION 1996 -LICENSED MATERIAL - PROGRAM PROPERTY OF IDT - - $Id$ -*/ - -/************************************************************************* -** -** Copyright 1991-95 Integrated Device Technology, Inc. -** All Rights Reserved -** -** idt_csu.S -- IDT stand alone startup code -** -**************************************************************************/ -#include -#include -#include - - -.extern _fbss,4 /* this is defined by the linker */ -.extern end,4 /* this is defined by the linker */ - -.lcomm sim_mem_cfg_struct,12 - - .text - - -#define TMP_STKSIZE 1024 - -/************************************************************************** -** -** start - Typicl standalone start up code required for R3000/R4000 -** -** -** 1) Initialize the STATUS Register -** a) Clear parity error bit -** b) Set co_processor 1 usable bit ON -** c) Clear all IntMask Enables -** d) Set kernel/disabled mode -** 2) Initialize Cause Register -** a) clear software interrupt bits -** 3) Determine FPU installed or not -** if not, clear CoProcessor 1 usable bit -** 4) Clear bss area -** 5) MUST allocate temporary stack until memory size determined -** It MUST be uncached to prevent overwriting when caches are cleared -** 6) Install exception handlers -** 7) Determine memory and cache sizes -** 8) Establish permanent stack (cached or uncached as defined by bss) -** 9) Flush Instruction and Data caches -** 10) If there is a Translation Lookaside Buffer, Clear the TLB -** 11) Execute initialization code if the IDT/c library is to be used -** -** 12) Jump to user's "main()" -** 13) Jump to promexit -** -** IDT/C 5.x defines _R3000, IDT/C 6.x defines _R4000 internally. -** This is used to mark code specific to R3xxx or R4xxx processors. -** IDT/C 6.x defines __mips to be the ISA level for which we're -** generating code. This is used to make sure the stack etc. is -** double word aligned, when using -mips3 (default) or -mips2, -** when compiling with IDT/C6.x -** -***************************************************************************/ - -FRAME(start,sp,0,ra) - - .set noreorder -#ifdef _R3000 - li v0,SR_PE|SR_CU1 /* reset parity error and set */ - /* cp1 usable */ -#endif -#ifdef _R4000 -#if __mips==3 || defined(R4650) - li v0,SR_CU1|SR_DE|SR_FR /* initally clear ERL, enable FPA 64bit regs*/ - /* 4650: Need fr to be set anyway */ -#else - li v0,SR_CU1|SR_DE /* initally clear ERL, enable FPA 32bit regs*/ -#endif mips3 -#endif - - mtc0 v0,C0_SR /* clr IntMsks/ kernel/disabled mode */ - nop - mtc0 zero,C0_CAUSE /* clear software interrupts */ - nop - -#ifdef _R4000 - li v0,CFG_C_NONCOHERENT # initialise default cache mode - mtc0 v0,C0_CONFIG -#endif - -/* -** check to see if an fpu is really plugged in -*/ - li t3,0xaaaa5555 /* put a's and 5's in t3 */ - mtc1 t3,fp0 /* try to write them into fp0 */ - mtc1 zero,fp1 /* try to write zero in fp */ - mfc1 t0,fp0 - mfc1 t1,fp1 - nop - bne t0,t3,1f /* branch if no match */ - nop - bne t1,zero,1f /* double check for positive id */ - nop - /* We have a FPU. clear fcsr */ - ctc1 zero, fcr31 - j 2f /* status register already correct */ - nop -1: -#ifdef _R3000 - li v0, SR_PE /* reset parity error/NO cp1 usable */ -#endif - -#ifdef _R4000 - li v0,SR_DE /* clear ERL and disable FPA */ -#endif - - mtc0 v0, C0_SR /* reset status register */ -2: - la gp, _gp - - la v0,_fbss /* clear bss before using it */ - la v1,end /* end of bss */ -3: sw zero,0(v0) - bltu v0,v1,3b - add v0,4 - - -/************************************************************************ -** -** Temporary Stack - needed to handle stack saves until -** memory size is determined and permanent stack set -** -** MUST be uncached to avoid confusion at cache -** switching during memory sizing -** -*************************************************************************/ -#if __mips==3 - /* For MIPS 3, we need to be sure that the stack is aligned on a - * double word boundary. - */ - andi t0, v0, 0x7 - beqz t0, 11f /* Last three bits Zero, already aligned */ - nop - add v0, 4 -11: -#endif - - or v0, K1BASE /* switch to uncached */ - add v1, v0, TMP_STKSIZE /* end of bss + length of tmp stack */ - sub v1, v1, (4*4) /* overhead */ - move sp, v1 /* set sp to top of stack */ -4: sw zero, 0(v0) - bltu v0, v1, 4b /* clear out temp stack */ - add v0, 4 - - jal init_exc_vecs /* install exception handlers */ - nop /* MUST do before memory probes */ - - la v0, 5f - li v1, K1BASE /* force into uncached space */ - or v0, v1 /* during memory/cache probes */ - j v0 - nop -5: - la a0, sim_mem_cfg_struct - jal sim_mem_cfg /* Make SIM call to get mem size */ - nop - la a0, sim_mem_cfg_struct - lw a0, 0(a0) /* Get memory size from struct */ -#ifdef _R3000 - jal config_Icache - nop - jal config_Dcache /* determine size of D & I caches */ - nop -#endif -#ifdef _R4000 - jal config_cache /* determine size of D & I caches */ - nop -#endif - - move v0, a0 /* mem_size */ - -#if __mips==3 - /* For MIPS 3, we need to be sure that the stack (and hence v0 - * here) is aligned on a double word boundary. - */ - andi t0, v0, 0x7 - beqz t0, 12f /* Last three bits Zero, already aligned */ - nop - subu v0, 4 /* mem_size was not aligned on doubleword bdry????*/ -12: -#endif - - - -/************************************************************************** -** -** Permanent Stack - now know top of memory, put permanent stack there -** -***************************************************************************/ - - la t2, _fbss /* cache mode as linked */ - and t2, 0xF0000000 /* isolate segment */ - la t1, 6f - j t1 /* back to original cache mode */ - nop -6: - or v0, t2 /* stack back to original cache mode */ - addiu v0,v0,-16 /* overhead */ - move sp, v0 /* now replace count w top of memory */ - move v1, v0 - subu v1, P_STACKSIZE /* clear requested stack size */ - -7: sw zero, 0(v1) /* clear P_STACKSIZE stack */ - bltu v1,v0,7b - add v1, 4 - .set reorder - -#ifdef _R3000 - jal flush_Icache - jal flush_Dcache /* flush Data & Instruction caches */ -#endif -#ifdef _R4000 - jal flush_cache_nowrite /* flush Data & Instruction caches */ -#endif - - - -/************************************************************************** -** -** If this chip supports a Translation Lookaside Buffer, clear it -** -***************************************************************************/ - - .set noreorder - mfc0 t1, C0_SR /* look at Status Register */ - nop - .set reorder -#ifdef _R3000 - li t2, SR_TS /* TLB Shutdown bit */ - and t1,t2 /* TLB Shutdown if 1 */ - bnez t1, 8f /* skip clearing if no TLB */ -#endif - -#ifndef R4650 - jal init_tlb /* clear the tlb */ -#endif - - -/************************************************************************ -** -** Initialization required if using IDT/c or libc.a, standard C Lib -** -** can SKIP if not necessary for application -** -************************************************************************/ -8: - - jal idtsim_init_sbrk - jal idtsim_init_file -/*********************** END I/O initialization **********************/ - - - jal main - - jal idtsim_promexit - -ENDFRAME(start) - - - .globl sim_mem_cfg -sim_mem_cfg: - .set noat - .set noreorder - li AT, (0xbfc00000+((55)*8)) - jr AT - nop - .set at - .set reorder diff --git a/c/src/lib/libbsp/mips/p4000/startup/bspclean.c b/c/src/lib/libbsp/mips/p4000/startup/bspclean.c deleted file mode 100644 index 940d219c87..0000000000 --- a/c/src/lib/libbsp/mips/p4000/startup/bspclean.c +++ /dev/null @@ -1,31 +0,0 @@ -/* bsp_cleanup() - * - * This routine normally is part of start.s and usually returns - * control to a monitor. - * - * INPUT: NONE - * - * OUTPUT: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef lint -static char _sccsid[] = "@(#)bspclean.c 03/15/96 1.1\n"; -#endif - - -#include -#include - -void bsp_cleanup( void ) -{ -} diff --git a/c/src/lib/libbsp/mips/p4000/startup/ghlinkcmds b/c/src/lib/libbsp/mips/p4000/startup/ghlinkcmds deleted file mode 100644 index cf2a80bf8d..0000000000 --- a/c/src/lib/libbsp/mips/p4000/startup/ghlinkcmds +++ /dev/null @@ -1,15 +0,0 @@ --map --sec -{ - .text 0x80010000 : - .data align(16) : - .rodata : - .fini : -# .sdata : - .symtab : - .strtab : - .debug : -# .sbss : - .bss align(8) : - .init 0xbfc00000 : -} diff --git a/c/src/lib/libbsp/mips/p4000/startup/idtmem.S b/c/src/lib/libbsp/mips/p4000/startup/idtmem.S deleted file mode 100644 index 70a7096877..0000000000 --- a/c/src/lib/libbsp/mips/p4000/startup/idtmem.S +++ /dev/null @@ -1,938 +0,0 @@ -/* - -Based upon IDT provided code with the following release: - -This source code has been made available to you by IDT on an AS-IS -basis. Anyone receiving this source is licensed under IDT copyrights -to use it in any way he or she deems fit, including copying it, -modifying it, compiling it, and redistributing it either with or -without modifications. No license under IDT patents or patent -applications is to be implied by the copyright license. - -Any user of this software should understand that IDT cannot provide -technical support for this software and will not be responsible for -any consequences resulting from the use of this software. - -Any person who transfers this source code or any derivative work must -include the IDT copyright notice, this paragraph, and the preceeding -two paragraphs in the transferred software. - -COPYRIGHT IDT CORPORATION 1996 -LICENSED MATERIAL - PROGRAM PROPERTY OF IDT - - $Id$ - -*/ - -/************************************************************************ -** -** idtmem.s - memory and cache functions -** -** Copyright 1991 Integrated Device Technology, Inc. -** All Rights Reserved -** -**************************************************************************/ - -/* - * 950313: Ketan fixed bugs in mfc0/mtc0 hazards, and removed hack - * to set mem_size. - */ - -#include -#include -#include - - .data -mem_size: - .word 0 -dcache_size: - .word 0 -icache_size: -#if defined(CPU_R3000) - .word MINCACHE -#endif -#if defined(CPU_R4000) - .word 0 -#endif - -#if defined(CPU_R4000) - .data -scache_size: - .word 0 -icache_linesize: - .word 0 -dcache_linesize: - .word 0 -scache_linesize: - .word 0 -#endif - - - .text - -#if defined (CPU_R3000) -#define CONFIGFRM ((2*4)+4) - -/************************************************************************* -** -** Config_Dcache() -- determine size of Data cache -** -**************************************************************************/ - -FRAME(config_Dcache,sp, CONFIGFRM, ra) - .set noreorder - subu sp,CONFIGFRM - sw ra,CONFIGFRM-4(sp) /* save return address */ - sw s0,4*4(sp) /* save s0 in first regsave slot */ - mfc0 s0,C0_SR /* save SR */ - nop - mtc0 zero,C0_SR /* disable interrupts */ - .set reorder - jal _size_cache /* returns Data cache size in v0 */ - sw v0, dcache_size /* save it */ - and s0, ~SR_PE /* do not clear PE */ - .set noreorder - mtc0 s0,C0_SR /* restore SR */ - nop - .set reorder - lw s0, 4*4(sp) /* restore s0 */ - lw ra,CONFIGFRM-4(sp) /* restore ra */ - addu sp,CONFIGFRM /* pop stack */ - j ra -ENDFRAME(config_Dcache) - - -/************************************************************************* -** -** Config_Icache() -- determine size of Instruction cache -** MUST be run in uncached mode/handled in idt_csu.s -** -**************************************************************************/ - -FRAME(config_Icache,sp, CONFIGFRM, ra) - .set noreorder - subu sp,CONFIGFRM - sw ra,CONFIGFRM-4(sp) /* save return address */ - sw s0,4*4(sp) /* save s0 in first regsave slot */ - mfc0 s0,C0_SR /* save SR */ - nop - mtc0 zero, C0_SR /* disable interrupts */ - li v0,SR_SWC /* swap caches/disable ints */ - mtc0 v0,C0_SR - nop - .set reorder - jal _size_cache /* returns instruction cache size */ - .set noreorder - mtc0 zero,C0_SR /* swap back caches */ - nop - and s0,~SR_PE /* do not inadvertantly clear PE */ - mtc0 s0,C0_SR /* restore SR */ - nop - .set reorder - sw v0, icache_size /* save it AFTER caches back */ - lw s0,4*4(sp) /* restore s0 */ - lw ra,CONFIGFRM-4(sp) /* restore ra */ - addu sp,CONFIGFRM /* pop stack */ - j ra -ENDFRAME(config_Icache) - -/************************************************************************ -** -** _size_cache() -** returns cache size in v0 -** -************************************************************************/ - -FRAME(_size_cache,sp,0,ra) - .set noreorder - mfc0 t0,C0_SR /* save current sr */ - nop - and t0,~SR_PE /* do not inadvertently clear PE */ - or v0,t0,SR_ISC /* isolate cache */ - mtc0 v0,C0_SR - /* - * First check if there is a cache there at all - */ - move v0,zero - li v1,0xa5a5a5a5 /* distinctive pattern */ - sw v1,K0BASE /* try to write into cache */ - lw t1,K0BASE /* try to read from cache */ - nop - mfc0 t2,C0_SR - nop - .set reorder - and t2,SR_CM - bne t2,zero,3f /* cache miss, must be no cache */ - bne v1,t1,3f /* data not equal -> no cache */ - /* - * Clear cache size boundries to known state. - */ - li v0,MINCACHE -1: - sw zero,K0BASE(v0) - sll v0,1 - ble v0,MAXCACHE,1b - - li v0,-1 - sw v0,K0BASE(zero) /* store marker in cache */ - li v0,MINCACHE /* MIN cache size */ - -2: lw v1,K0BASE(v0) /* Look for marker */ - bne v1,zero,3f /* found marker */ - sll v0,1 /* cache size * 2 */ - ble v0,MAXCACHE,2b /* keep looking */ - move v0,zero /* must be no cache */ - .set noreorder -3: mtc0 t0,C0_SR /* restore sr */ - j ra - nop -ENDFRAME(_size_cache) - .set reorder - - -#define FLUSHFRM (2*4) - -/*************************************************************************** -** -** flush_Dcache() - flush entire Data cache -** -****************************************************************************/ -FRAME(flush_Dcache,sp,FLUSHFRM,ra) - lw t2, dcache_size - .set noreorder - mfc0 t3,C0_SR /* save SR */ - nop - and t3,~SR_PE /* dont inadvertently clear PE */ - beq t2,zero,_Dflush_done /* no D cache, get out! */ - nop - li v0, SR_ISC /* isolate cache */ - mtc0 v0, C0_SR - nop - .set reorder - li t0,K0BASE /* set loop registers */ - or t1,t0,t2 - -2: sb zero,0(t0) - sb zero,4(t0) - sb zero,8(t0) - sb zero,12(t0) - sb zero,16(t0) - sb zero,20(t0) - sb zero,24(t0) - addu t0,32 - sb zero,-4(t0) - bne t0,t1,2b - - .set noreorder -_Dflush_done: - mtc0 t3,C0_SR /* restore Status Register */ - .set reorder - j ra -ENDFRAME(flush_Dcache) - - -/*************************************************************************** -** -** flush_Icache() - flush entire Instruction cache -** -** NOTE: Icache can only be flushed/cleared when uncached -** Code forces into uncached memory regardless of calling mode -** -****************************************************************************/ -FRAME(flush_Icache,sp,FLUSHFRM,ra) - lw t1,icache_size - .set noreorder - mfc0 t3,C0_SR /* save SR */ - nop - la v0,1f - li v1,K1BASE - or v0,v1 - j v0 /* force into non-cached space */ - nop -1: - and t3,~SR_PE /* dont inadvertently clear PE */ - beq t1,zero,_Iflush_done /* no i-cache get out */ - nop - li v0,SR_ISC|SR_SWC /* disable intr, isolate and swap */ - mtc0 v0,C0_SR - li t0,K0BASE - .set reorder - or t1,t0,t1 - -1: sb zero,0(t0) - sb zero,4(t0) - sb zero,8(t0) - sb zero,12(t0) - sb zero,16(t0) - sb zero,20(t0) - sb zero,24(t0) - addu t0,32 - sb zero,-4(t0) - bne t0,t1,1b - .set noreorder -_Iflush_done: - mtc0 t3,C0_SR /* un-isolate, enable interrupts */ - .set reorder - j ra -ENDFRAME(flush_Icache) - -/************************************************************************** -** -** clear_Dcache(base_addr, byte_count) - flush portion of Data cache -** -** a0 = base address of portion to be cleared -** a1 = byte count of length -** -***************************************************************************/ -FRAME(clear_Dcache,sp,0,ra) - - lw t2, dcache_size /* Data cache size */ - .set noreorder - mfc0 t3,C0_SR /* save SR */ - nop - and t3,~SR_PE /* dont inadvertently clear PE */ - nop - nop - .set reorder - /* - * flush data cache - */ - - .set noreorder - nop - li v0,SR_ISC /* isolate data cache */ - mtc0 v0,C0_SR - .set reorder - bltu t2,a1,1f /* cache is smaller than region */ - move t2,a1 -1: addu t2,a0 /* ending address + 1 */ - move t0,a0 - -1: sb zero,0(t0) - sb zero,4(t0) - sb zero,8(t0) - sb zero,12(t0) - sb zero,16(t0) - sb zero,20(t0) - sb zero,24(t0) - addu t0,32 - sb zero,-4(t0) - bltu t0,t2,1b - - .set noreorder - mtc0 t3,C0_SR /* un-isolate, enable interrupts */ - nop - .set reorder - j ra -ENDFRAME(clear_Dcache) - - -/************************************************************************** -** -** clear_Icache(base_addr, byte_count) - flush portion of Instruction cache -** -** a0 = base address of portion to be cleared -** a1 = byte count of length -** -** NOTE: Icache can only be flushed/cleared when uncached -** Code forces into uncached memory regardless of calling mode -** -***************************************************************************/ -FRAME(clear_Icache,sp,0,ra) - - lw t1, icache_size /* Instruction cache size */ - /* - * flush text cache - */ - .set noreorder - mfc0 t3,C0_SR /* save SR */ - nop - la v0,1f - li v1,K1BASE - or v0,v1 - j v0 /* force into non-cached space */ - nop -1: - and t3,~SR_PE /* dont inadvertently clear PE */ - nop - nop - li v0,SR_ISC|SR_SWC /* disable intr, isolate and swap */ - mtc0 v0,C0_SR - .set reorder - bltu t1,a1,1f /* cache is smaller than region */ - move t1,a1 -1: addu t1,a0 /* ending address + 1 */ - move t0,a0 - - sb zero,0(t0) - sb zero,4(t0) - sb zero,8(t0) - sb zero,12(t0) - sb zero,16(t0) - sb zero,20(t0) - sb zero,24(t0) - addu t0,32 - sb zero,-4(t0) - bltu t0,t1,1b - .set noreorder - mtc0 t3,C0_SR /* un-isolate, enable interrupts */ - nop - nop - nop /* allow time for caches to swap */ - .set reorder - j ra -ENDFRAME(clear_Icache) - - -/************************************************************************** -** -** get_mem_conf - get memory configuration -** -***************************************************************************/ - - -FRAME(get_mem_conf,sp,0,ra) - - lw t6, mem_size - sw t6, 0(a0) - lw t7, icache_size - sw t7, 4(a0) - lw t8, dcache_size - sw t8, 8(a0) - j ra - -ENDFRAME(get_mem_conf) -#endif /* defined CPU_R3000 */ - -#if defined(CPU_R4000) -#define LEAF(label) FRAME(label,sp,0,ra) -#define XLEAF(label) \ - .globl label ; \ -label: -#define END(label) ENDFRAME(label) - -/* - * cacheop macro to automate cache operations - * first some helpers... - */ -#define _mincache(size, maxsize) \ - bltu size,maxsize,8f ; \ - move size,maxsize ; \ -8: - -#define _align(tmp, minaddr, maxaddr, linesize) \ - subu tmp,linesize,1 ; \ - not tmp ; \ - and minaddr,tmp ; \ - addu maxaddr,-1 ; \ - and maxaddr,tmp - -/* This is a bit of a hack really because it relies on minaddr=a0 */ -#define _doop1(op1) \ - cache op1,0(a0) - -#define _doop2(op1, op2) \ - cache op1,0(a0) ; \ - cache op2,0(a0) - -/* specials for cache initialisation */ -#define _doop1lw1(op1) \ - cache op1,0(a0) ; \ - lw zero,0(a0) ; \ - cache op1,0(a0) - -#define _doop121(op1,op2) \ - cache op1,0(a0) ; \ - nop; \ - cache op2,0(a0) ; \ - nop; \ - cache op1,0(a0) - -#define _oploopn(minaddr, maxaddr, linesize, tag, ops) \ - .set noreorder ; \ -7: _doop##tag##ops ; \ - bne minaddr,maxaddr,7b ; \ - addu minaddr,linesize ; \ - .set reorder - -/* finally the cache operation macros */ -#define icacheopn(kva, n, cache_size, cache_linesize, tag, ops) \ - _mincache(n, cache_size); \ - blez n,9f ; \ - addu n,kva ; \ - _align(t1, kva, n, cache_linesize) ; \ - _oploopn(kva, n, cache_linesize, tag, ops) ; \ -9: - -#define vcacheopn(kva, n, cache_size, cache_linesize, tag, ops) \ - blez n,9f ; \ - addu n,kva ; \ - _align(t1, kva, n, cache_linesize) ; \ - _oploopn(kva, n, cache_linesize, tag, ops) ; \ -9: - -#define icacheop(kva, n, cache_size, cache_linesize, op) \ - icacheopn(kva, n, cache_size, cache_linesize, 1, (op)) - -#define vcacheop(kva, n, cache_size, cache_linesize, op) \ - vcacheopn(kva, n, cache_size, cache_linesize, 1, (op)) - - .text - -/* - * static void _size_cache() R4000 - * - * Internal routine to determine cache sizes by looking at R4000 config - * register. Sizes are returned in registers, as follows: - * t2 icache size - * t3 dcache size - * t6 scache size - * t4 icache line size - * t5 dcache line size - * t7 scache line size - */ -LEAF(_size_cache) - mfc0 t0,C0_CONFIG - - and t1,t0,CFG_ICMASK - srl t1,CFG_ICSHIFT - li t2,0x1000 - sll t2,t1 - - and t1,t0,CFG_DCMASK - srl t1,CFG_DCSHIFT - li t3,0x1000 - sll t3,t1 - - li t4,32 - and t1,t0,CFG_IB - bnez t1,1f - li t4,16 -1: - - li t5,32 - and t1,t0,CFG_DB - bnez t1,1f - li t5,16 -1: - - move t6,zero # default to no scache - move t7,zero # - - and t1,t0,CFG_C_UNCACHED # test config register - bnez t1,1f # no scache if uncached/non-coherent - - li t6,0x100000 # assume 1Mb scache <<-NOTE - and t1,t0,CFG_SBMASK - srl t1,CFG_SBSHIFT - li t7,16 - sll t7,t1 -1: j ra -END(_size_cache) - - -/* - * void config_cache() R4000 - * - * Work out size of I, D & S caches, assuming they are already initialised. - */ -LEAF(config_cache) - lw t0,icache_size - bgtz t0,8f # already known? - move v0,ra - bal _size_cache - move ra,v0 - - sw t2,icache_size - sw t3,dcache_size - sw t6,scache_size - sw t4,icache_linesize - sw t5,dcache_linesize - sw t7,scache_linesize -8: j ra -END(config_cache) - - -/* - * void _init_cache() R4000 - */ -LEAF(_init_cache) - /* - * First work out the sizes - */ - move v0,ra - bal _size_cache - move ra,v0 - - /* - * The caches may be in an indeterminate state, - * so we force good parity into them by doing an - * invalidate, load/fill, invalidate for each line. - */ - - /* disable all i/u and cache exceptions */ - mfc0 v0,C0_SR - and v1,v0,~SR_IE - or v1,SR_DE - mtc0 v1,C0_SR - - mtc0 zero,C0_TAGLO - mtc0 zero,C0_TAGHI - - /* assume bottom of RAM will generate good parity for the cache */ - li a0,PHYS_TO_K0(0) - move a2,t2 # icache_size - move a3,t4 # icache_linesize - move a1,a2 - icacheopn(a0,a1,a2,a3,121,(Index_Store_Tag_I,Fill_I)) - - li a0,PHYS_TO_K0(0) - move a2,t3 # dcache_size - move a3,t5 # dcache_linesize - move a1,a2 - icacheopn(a0,a1,a2,a3,1lw1,(Index_Store_Tag_D)) - - /* assume unified I & D in scache <<-NOTE */ - blez t6,1f - li a0,PHYS_TO_K0(0) - move a2,t6 - move a3,t7 - move a1,a2 - icacheopn(a0,a1,a2,a3,1lw1,(Index_Store_Tag_SD)) - -1: mtc0 v0,C0_SR - j ra -END(_init_cache) - - -/* - * void flush_cache (void) R4000 - * - * Flush and invalidate all caches - */ -LEAF(flush_cache) - /* secondary cacheops do all the work if present */ - lw a2,scache_size - blez a2,1f - lw a3,scache_linesize - li a0,PHYS_TO_K0(0) - move a1,a2 - icacheop(a0,a1,a2,a3,Index_Writeback_Inv_SD) - b 2f - -1: - lw a2,icache_size - blez a2,2f - lw a3,icache_linesize - li a0,PHYS_TO_K0(0) - move a1,a2 - icacheop(a0,a1,a2,a3,Index_Invalidate_I) - - lw a2,dcache_size - lw a3,dcache_linesize - li a0,PHYS_TO_K0(0) - move a1,a2 - icacheop(a0,a1,a2,a3,Index_Writeback_Inv_D) - -2: j ra -END(flush_cache) - -/* - * void flush_cache_nowrite (void) R4000 - * - * Invalidate all caches - */ -LEAF(flush_cache_nowrite) - mfc0 v0,C0_SR - and v1,v0,~SR_IE - mtc0 v1,C0_SR - - mtc0 zero,C0_TAGLO - mtc0 zero,C0_TAGHI - - lw a2,icache_size - blez a2,2f - lw a3,icache_linesize - li a0,PHYS_TO_K0(0) - move a1,a2 - icacheop(a0,a1,a2,a3,Index_Invalidate_I) - - lw a2,dcache_size - lw a3,dcache_linesize - li a0,PHYS_TO_K0(0) - move a1,a2 - icacheop(a0,a1,a2,a3,Index_Store_Tag_D) - - lw a2,scache_size - blez a2,2f - lw a3,scache_linesize - li a0,PHYS_TO_K0(0) - move a1,a2 - icacheop(a0,a1,a2,a3,Index_Store_Tag_SD) - -2: mtc0 v0,C0_SR - j ra -END(flush_cache_nowrite) - -/* - * void clean_cache (unsigned kva, size_t n) R4000 - * - * Writeback and invalidate address range in all caches - */ -LEAF(clean_cache) -XLEAF(clear_cache) - - /* secondary cacheops do all the work (if fitted) */ - lw a2,scache_size - blez a2,1f - lw a3,scache_linesize - vcacheop(a0,a1,a2,a3,Hit_Writeback_Inv_SD) - b 2f - -1: lw a2,icache_size - blez a2,2f - lw a3,icache_linesize - /* save kva & n for subsequent loop */ - move t8,a0 - move t9,a1 - vcacheop(a0,a1,a2,a3,Hit_Invalidate_I) - - lw a2,dcache_size - lw a3,dcache_linesize - /* restore kva & n */ - move a0,t8 - move a1,t9 - vcacheop(a0,a1,a2,a3,Hit_Writeback_Inv_D) - -2: j ra -END(clean_cache) - -/* - * void clean_dcache (unsigned kva, size_t n) R4000 - * - * Writeback and invalidate address range in primary data cache - */ -LEAF(clean_dcache) - lw a2,dcache_size - blez a2,2f - lw a3,dcache_linesize - - vcacheop(a0,a1,a2,a3,Hit_Writeback_Inv_D) - -2: j ra -END(clean_dcache) - -/* - * void clean_dcache_indexed (unsigned kva, size_t n) R4000 - * - * Writeback and invalidate indexed range in primary data cache - */ -LEAF(clean_dcache_indexed) - lw a2,dcache_size - blez a2,2f - lw a3,dcache_linesize - -#ifdef CPU_ORION - srl a2,1 # do one set (half cache) at a time - move t8,a0 # save kva & n - move t9,a1 - icacheop(a0,a1,a2,a3,Index_Writeback_Inv_D) - - addu a0,t8,a2 # do next set - move a1,t9 # restore n -#endif - icacheop(a0,a1,a2,a3,Index_Writeback_Inv_D) - -2: j ra -END(clean_dcache_indexed) - -/* - * void clean_dcache_nowrite (unsigned kva, size_t n) R4000 - * - * Invalidate an address range in primary data cache - */ -LEAF(clean_dcache_nowrite) - lw a2,dcache_size - blez a2,2f - lw a3,dcache_linesize - - vcacheop(a0,a1,a2,a3,Hit_Invalidate_D) - -2: j ra -END(clean_dcache_nowrite) - -/* - * void clean_dcache_nowrite_indexed (unsigned kva, size_t n) R4000 - * - * Invalidate indexed range in primary data cache - */ -LEAF(clean_dcache_nowrite_indexed) - mfc0 v0,C0_SR - and v1,v0,~SR_IE - mtc0 v1,C0_SR - - mtc0 zero,C0_TAGLO - mtc0 zero,C0_TAGHI - - lw a2,dcache_size - blez a2,2f - lw a3,dcache_linesize - -#ifdef CPU_ORION - srl a2,1 # do one set (half cache) at a time - move t8,a0 # save kva & n - move t9,a1 - icacheop(a0,a1,a2,a3,Index_Store_Tag_D) - - addu a0,t8,a2 # do next set - move a1,t9 # restore n -#endif - icacheop(a0,a1,a2,a3,Index_Store_Tag_D) - -2: mtc0 v0,C0_SR - j ra -END(clean_dcache_nowrite_indexed) - -/* - * void clean_icache (unsigned kva, size_t n) R4000 - * - * Invalidate address range in primary instruction cache - */ -LEAF(clean_icache) - lw a2,icache_size - blez a2,2f - lw a3,icache_linesize - - vcacheop(a0,a1,a2,a3,Hit_Invalidate_I) - -2: j ra -END(clean_icache) - -/* - * void clean_icache_indexed (unsigned kva, size_t n) R4000 - * - * Invalidate indexed range in primary instruction cache - */ -LEAF(clean_icache_indexed) - lw a2,icache_size - blez a2,2f - lw a3,icache_linesize - -#ifdef CPU_ORION - srl a2,1 # do one set (half cache) at a time - move t8,a0 # save kva & n - move t9,a1 - icacheop(a0,a1,a2,a3,Index_Invalidate_I) - - addu a0,t8,a2 # do next set - move a1,t9 # restore n -#endif - icacheop(a0,a1,a2,a3,Index_Invalidate_I) - -2: j ra -END(clean_icache_indexed) - - - -/* - * void clean_scache (unsigned kva, size_t n) R4000 - * - * Writeback and invalidate address range in secondary cache - */ -LEAF(clean_scache) - lw a2,scache_size - blez a2,2f - lw a3,scache_linesize - vcacheop(a0,a1,a2,a3,Hit_Writeback_Inv_SD) - -2: j ra -END(clean_scache) - -/* - * void clean_scache_indexed (unsigned kva, size_t n) R4000 - * - * Writeback and invalidate indexed range in secondary cache - */ -LEAF(clean_scache_indexed) - lw a2,scache_size - blez a2,2f - lw a3,scache_linesize - - icacheop(a0,a1,a2,a3,Index_Writeback_Inv_SD) - -2: j ra -END(clean_scache_indexed) - -/* - * void clean_scache_nowrite (unsigned kva, size_t n) R4000 - * - * Invalidate an address range in secondary cache - */ -LEAF(clean_scache_nowrite) - lw a2,scache_size - blez a2,2f - lw a3,scache_linesize - - vcacheop(a0,a1,a2,a3,Hit_Invalidate_SD) - -2: j ra -END(clean_scache_nowrite) - -/* - * void clean_scache_nowrite_indexed (unsigned kva, size_t n) R4000 - * - * Invalidate indexed range in secondary cache - */ -LEAF(clean_scache_nowrite_indexed) - mfc0 v0,C0_SR - and v1,v0,~SR_IE - mtc0 v1,C0_SR - - mtc0 zero,C0_TAGLO - mtc0 zero,C0_TAGHI - - lw a2,scache_size - blez a2,2f - lw a3,scache_linesize - - icacheop(a0,a1,a2,a3,Index_Store_Tag_SD) - -2: mtc0 v0,C0_SR - j ra -END(clean_scache_nowrite_indexed) - -/************************************************************************** -** -** get_mem_conf - get memory configuration R4000 -** -***************************************************************************/ - - -FRAME(get_mem_conf,sp,0,ra) - - lw t6, mem_size - sw t6, 0(a0) - lw t7, icache_size - sw t7, 4(a0) - lw t8, dcache_size - sw t8, 8(a0) - lw t7, scache_size - sw t7, 12(a0) - j ra - -ENDFRAME(get_mem_conf) - -#endif /* defined(CPU_R4000) */ - -/* - * void set_mem_size (mem_size) - * - * config_memory()'s memory size gets written into mem_size here. - * Now we don't need to call config_cache() with memory size - New to IDTC6.0 - */ -FRAME(set_memory_size,sp,0,ra) - sw a0, mem_size - j ra -ENDFRAME(set_memory_size) - - diff --git a/c/src/lib/libbsp/mips/p4000/startup/idttlb.S b/c/src/lib/libbsp/mips/p4000/startup/idttlb.S deleted file mode 100644 index 4aad7b1416..0000000000 --- a/c/src/lib/libbsp/mips/p4000/startup/idttlb.S +++ /dev/null @@ -1,390 +0,0 @@ -/* - -Based upon IDT provided code with the following release: - -This source code has been made available to you by IDT on an AS-IS -basis. Anyone receiving this source is licensed under IDT copyrights -to use it in any way he or she deems fit, including copying it, -modifying it, compiling it, and redistributing it either with or -without modifications. No license under IDT patents or patent -applications is to be implied by the copyright license. - -Any user of this software should understand that IDT cannot provide -technical support for this software and will not be responsible for -any consequences resulting from the use of this software. - -Any person who transfers this source code or any derivative work must -include the IDT copyright notice, this paragraph, and the preceeding -two paragraphs in the transferred software. - -COPYRIGHT IDT CORPORATION 1996 -LICENSED MATERIAL - PROGRAM PROPERTY OF IDT - - $Id$ -*/ - - -/* -** idttlb.s - fetch the registers associated with and the contents -** of the tlb. -** -*/ -/* 950308: Ketan patched a few tlb functions that would not have worked.*/ -#include -#include -#include - - - .text - -#if defined(CPU_R3000) -/* -** ret_tlblo -- returns the 'entrylo' contents for the TLB -** 'c' callable - as ret_tlblo(index) - where index is the -** tlb entry to return the lo value for - if called from assembly -** language then index should be in register a0. -*/ -FRAME(ret_tlblo,sp,0,ra) - .set noreorder - mfc0 t0,C0_SR # save sr - nop - and t0,~SR_PE # dont inadvertantly clear PE - mtc0 zero,C0_SR # clear interrupts - mfc0 t1,C0_TLBHI # save pid - sll a0,TLBINX_INXSHIFT # position index - mtc0 a0,C0_INX # write to index register - nop - tlbr # put tlb entry in entrylo and hi - nop - mfc0 v0,C0_TLBLO # get the requested entry lo - mtc0 t1,C0_TLBHI # restore pid - mtc0 t0,C0_SR # restore status register - j ra - nop - .set reorder -ENDFRAME(ret_tlblo) -#endif -#if defined(CPU_R4000) -/* -** ret_tlblo[01] -- returns the 'entrylo' contents for the TLB -** 'c' callable - as ret_tlblo(index) - where index is the -** tlb entry to return the lo value for - if called from assembly -** language then index should be in register a0. -*/ -FRAME(ret_tlblo0,sp,0,ra) - mfc0 t0,C0_SR # save sr - mtc0 zero,C0_SR # clear interrupts - mfc0 t1,C0_TLBHI # save pid - mtc0 a0,C0_INX # write to index register - .set noreorder - nop; nop; nop; nop; nop; nop; nop; nop - .set reorder - tlbr # put tlb entry in entrylo and hi - .set noreorder - nop; nop; nop; nop; nop; nop; nop; nop - .set reorder - mfc0 v0,C0_TLBLO0 # get the requested entry lo - mtc0 t1,C0_TLBHI # restore pid - mtc0 t0,C0_SR # restore status register - j ra -ENDFRAME(ret_tlblo0) - -FRAME(ret_tlblo1,sp,0,ra) - mfc0 t0,C0_SR # save sr - mtc0 zero,C0_SR # clear interrupts - mfc0 t1,C0_TLBHI # save pid - mtc0 a0,C0_INX # write to index register - .set noreorder - nop; nop; nop; nop; nop; nop; nop; nop - .set reorder - tlbr # put tlb entry in entrylo and hi - .set noreorder - nop; nop; nop; nop; nop; nop; nop; nop - .set reorder - mfc0 v0,C0_TLBLO1 # get the requested entry lo - mtc0 t1,C0_TLBHI # restore pid - mtc0 t0,C0_SR # restore status register - j ra -ENDFRAME(ret_tlblo1) - -/* -** ret_pagemask(index) -- return pagemask contents of tlb entry "index" -*/ -FRAME(ret_pagemask,sp,0,ra) - mfc0 t0,C0_SR # save sr - mtc0 zero,C0_SR # disable interrupts - mfc0 t1,C0_TLBHI # save current pid - mtc0 a0,C0_INX # drop it in C0 register - .set noreorder - nop; nop; nop; nop; nop; nop; nop; nop - .set reorder - tlbr # read entry to entry hi/lo - .set noreorder - nop; nop; nop; nop; nop; nop; nop; nop - .set reorder - mfc0 v0,C0_PAGEMASK # to return value - mtc0 t1,C0_TLBHI # restore current pid - mtc0 t0,C0_SR # restore sr - j ra -ENDFRAME(ret_pagemask) - -/* -** ret_tlbwired(void) -- return wired register -*/ -FRAME(ret_tlbwired,sp,0,ra) - mfc0 v0,C0_WIRED - j ra -ENDFRAME(ret_tlbwired) -#endif - -/* -** ret_tlbhi -- return the tlb entry high content for tlb entry -** index -*/ -FRAME(ret_tlbhi,sp,0,ra) -#if defined(CPU_R3000) - .set noreorder - mfc0 t0,C0_SR # save sr - nop - and t0,~SR_PE - mtc0 zero,C0_SR # disable interrupts - mfc0 t1,C0_TLBHI # save current pid - sll a0,TLBINX_INXSHIFT # position index - mtc0 a0,C0_INX # drop it in C0 register - nop - tlbr # read entry to entry hi/lo - nop - mfc0 v0,C0_TLBHI # to return value - mtc0 t1,C0_TLBHI # restore current pid - mtc0 t0,C0_SR # restore sr - j ra - nop - .set reorder -#endif -#if defined(CPU_R4000) - mfc0 t0,C0_SR # save sr - mtc0 zero,C0_SR # disable interrupts - mfc0 t1,C0_TLBHI # save current pid - mtc0 a0,C0_INX # drop it in C0 register - .set noreorder - nop; nop; nop; nop; nop; nop; nop; nop - .set reorder - tlbr # read entry to entry hi/lo0/lo1/mask - .set noreorder - nop; nop; nop; nop; nop; nop; nop; nop - .set reorder - mfc0 v0,C0_TLBHI # to return value - mtc0 t1,C0_TLBHI # restore current pid - mtc0 t0,C0_SR # restore sr - j ra -#endif -ENDFRAME(ret_tlbhi) - -/* -** ret_tlbpid() -- return tlb pid contained in the current entry hi -*/ -FRAME(ret_tlbpid,sp,0,ra) -#if defined(CPU_R3000) - .set noreorder - mfc0 v0,C0_TLBHI # fetch tlb high - nop - and v0,TLBHI_PIDMASK # isolate and position - srl v0,TLBHI_PIDSHIFT - j ra - nop - .set reorder -#endif -#if defined(CPU_R4000) - mfc0 v0,C0_TLBHI # to return value - nop - and v0,TLBHI_PIDMASK - j ra -#endif -ENDFRAME(ret_tlbpid) - -/* -** tlbprobe(address, pid) -- probe the tlb to see if address is currently -** mapped -** a0 = vpn - virtual page numbers are 0=0 1=0x1000, 2=0x2000... -** virtual page numbers for the r3000 are in -** entry hi bits 31-12 -** a1 = pid - this is a process id ranging from 0 to 63 -** this process id is shifted left 6 bits and or'ed into -** the entry hi register -** returns an index value (0-63) if successful -1 -f not -*/ -FRAME(tlbprobe,sp,0,ra) -#if defined(CPU_R3000) - .set noreorder - mfc0 t0,C0_SR /* fetch status reg */ - and a0,TLBHI_VPNMASK /* isolate just the vpn */ - and t0,~SR_PE /* don't inadvertantly clear pe */ - mtc0 zero,C0_SR - mfc0 t1,C0_TLBHI - sll a1,TLBHI_PIDSHIFT /* possition the pid */ - and a1,TLBHI_PIDMASK - or a0,a1 /* build entry hi value */ - mtc0 a0,C0_TLBHI - nop - tlbp /* do the probe */ - nop - mfc0 v1,C0_INX - li v0,-1 - bltz v1,1f - nop - sra v0,v1,TLBINX_INXSHIFT /* get index positioned for return */ -1: - mtc0 t1,C0_TLBHI /* restore tlb hi */ - mtc0 t0,C0_SR /* restore the status reg */ - j ra - nop - .set reorder -#endif -#if defined(CPU_R4000) - mfc0 t0,C0_SR # save sr - mtc0 zero,C0_SR # disable interrupts - mfc0 t1,C0_TLBHI # save current pid - and a0,TLBHI_VPN2MASK # construct tlbhi for probe - and a1,TLBHI_PIDMASK - or a0,a1 - mtc0 a0,C0_TLBHI - .set noreorder - nop; nop; nop; nop; nop; nop; nop; nop - .set reorder - tlbp # probe entry to entry hi/lo0/lo1/mask - .set noreorder - nop; nop; nop; nop; nop; nop; nop; nop - .set reorder - mfc0 v1,C0_INX - li v0,-1 - bltz v1,1f - move v0,v1 -1: mtc0 t1,C0_TLBHI # restore current pid - mtc0 t0,C0_SR # restore sr - j ra -#endif -ENDFRAME(tlbprobe) - -/* -** resettlb(index) Invalidate the TLB entry specified by index -*/ -FRAME(resettlb,sp,0,ra) -#if defined(CPU_R3000) - .set noreorder - mfc0 t0,C0_TLBHI # fetch the current hi - mfc0 v0,C0_SR # fetch the status reg. - li t2,K0BASE&TLBHI_VPNMASK - and v0,~SR_PE # dont inadvertantly clear PE - mtc0 zero,C0_SR - mtc0 t2,C0_TLBHI # set up tlbhi - mtc0 zero,C0_TLBLO - sll a0,TLBINX_INXSHIFT - mtc0 a0,C0_INX - nop - tlbwi # do actual invalidate - nop - mtc0 t0,C0_TLBHI - mtc0 v0,C0_SR - j ra - nop - .set reorder -#endif -#if defined(CPU_R4000) - li t2,K0BASE&TLBHI_VPN2MASK - mfc0 t0,C0_TLBHI # save current TLBHI - mfc0 v0,C0_SR # save SR and disable interrupts - mtc0 zero,C0_SR - mtc0 t2,C0_TLBHI # invalidate entry - mtc0 zero,C0_TLBLO0 - mtc0 zero,C0_TLBLO1 - mtc0 a0,C0_INX - .set noreorder - nop; nop; nop; nop; nop; nop; nop; nop - .set reorder - tlbwi - .set noreorder - nop; nop; nop; nop; nop; nop; nop; nop - .set reorder - mtc0 t0,C0_TLBHI - mtc0 v0,C0_SR - j ra -#endif -ENDFRAME(resettlb) - -#if defined(CPU_R3000) -/* -** Setup TLB entry -** -** map_tlb(index, tlbhi, phypage) -** a0 = TLB entry index -** a1 = virtual page number and PID -** a2 = physical page -*/ -FRAME(map_tlb,sp,0,ra) - .set noreorder - sll a0,TLBINX_INXSHIFT - mfc0 v0,C0_SR # fetch the current status - mfc0 a3,C0_TLBHI # save the current hi - and v0,~SR_PE # dont inadvertantly clear parity - - mtc0 zero,C0_SR - mtc0 a1,C0_TLBHI # set the hi entry - mtc0 a2,C0_TLBLO # set the lo entry - mtc0 a0,C0_INX # load the index - nop - tlbwi # put the hi/lo in tlb entry indexed - nop - mtc0 a3,C0_TLBHI # put back the tlb hi reg - mtc0 v0,C0_SR # restore the status register - j ra - nop - .set reorder -ENDFRAME(map_tlb) - #endif -#if defined(CPU_R4000) -/* -** Setup R4000 TLB entry -** -** map_tlb4000(mask_index, tlbhi, pte_even, pte_odd) -** a0 = TLB entry index and page mask -** a1 = virtual page number and PID -** a2 = pte -- contents of even pte -** a3 = pte -- contents of odd pte -*/ -FRAME(map_tlb4000,sp,0,ra) - and t2,a0,TLBPGMASK_MASK - and a0,TLBINX_INXMASK - mfc0 t1,C0_TLBHI # save current TLBPID - mfc0 v0,C0_SR # save SR and disable interrupts - mtc0 zero,C0_SR - mtc0 t2,C0_PAGEMASK # set - mtc0 a1,C0_TLBHI # set VPN and TLBPID - mtc0 a2,C0_TLBLO0 # set PPN and access bits - mtc0 a3,C0_TLBLO1 # set PPN and access bits - mtc0 a0,C0_INX # set INDEX to wired entry - .set noreorder - nop; nop; nop; nop; nop; nop; nop; nop - .set reorder - tlbwi # drop it in - .set noreorder - nop; nop; nop; nop; nop; nop; nop; nop - .set reorder - mtc0 t1,C0_TLBHI # restore TLBPID - mtc0 v0,C0_SR # restore SR - j ra -ENDFRAME(map_tlb4000) -#endif - - -/* -** Set current TLBPID. This assumes PID is positioned correctly in reg. -** a0. -*/ -FRAME(set_tlbpid,sp,0,ra) - .set noreorder - mtc0 a0,C0_TLBHI - j ra - nop - .set reorder -ENDFRAME(set_tlbpid) - diff --git a/c/src/lib/libbsp/mips/p4000/startup/inittlb.c b/c/src/lib/libbsp/mips/p4000/startup/inittlb.c deleted file mode 100644 index e61f0043be..0000000000 --- a/c/src/lib/libbsp/mips/p4000/startup/inittlb.c +++ /dev/null @@ -1,16 +0,0 @@ -/* - * $Id$ - */ - -#include - -extern void resettlb( int i ); - -void init_tlb(void) -{ - int i; - - for (i = 0; i < N_TLB_ENTRIES; i++ ) - resettlb(i); -} - diff --git a/c/src/lib/libbsp/mips/p4000/startup/linkcmds b/c/src/lib/libbsp/mips/p4000/startup/linkcmds deleted file mode 100644 index 858317853c..0000000000 --- a/c/src/lib/libbsp/mips/p4000/startup/linkcmds +++ /dev/null @@ -1,72 +0,0 @@ -/* - * $Id$ - */ - -OUTPUT_FORMAT("elf32-bigmips") -OUTPUT_ARCH(mips) -/* Do we need any of these for elf? - __DYNAMIC = 0; */ -_DYNAMIC_LINK = 0; -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - .text 0x80030000 : /* */ -/* .text 0xa0020000 : /* */ -/* .text 0x00020000 : /* */ - { - _ftext = . ; - *(.text) - CREATE_OBJECT_SYMBOLS - _etext = .; - } - .init ALIGN(8) : { *(.init) } =0 - .fini ALIGN(8) : { *(.fini) } =0 - .ctors ALIGN(8) : { *(.ctors) } - .dtors ALIGN(8) : { *(.dtors) } - .rodata ALIGN(8) : { *(.rodata) } - .rodata1 ALIGN(8) : - { - *(.rodata1) - . = ALIGN(8); - } - .reginfo . : { *(.reginfo) } - /* also: .hash .dynsym .dynstr .plt(if r/o) .rel.got */ - /* Read-write section, merged into data segment: */ - .data ALIGN(16) : - { - _fdata = . ; - *(.data) - CONSTRUCTORS - } - .data1 ALIGN(8) : { *(.data1) } - _gp = . + 0x8000; - .lit8 . : { *(.lit8) } - .lit4 . : { *(.lit4) } - /* also (before uninitialized portion): .dynamic .got .plt(if r/w) - (or does .dynamic go into its own segment?) */ - /* 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. */ - .sdata ALIGN(8) : { *(.sdata) } - _edata = .; - __bss_start = ALIGN(8); - _fbss = .; - .sbss ALIGN(8) : { *(.sbss) *(.scommon) } - .bss ALIGN(8) : - { - *(.bss) - *(COMMON) - _end = . ; - end = . ; - } - /* Debug sections. These should never be loadable, but they must have - zero addresses for the debuggers to work correctly. */ - .line 0 : { *(.line) } - .debug 0 : { *(.debug) } - .debug_sfnames 0 : { *(.debug_sfnames) } - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_macinfo 0 : { *(.debug_macinfo) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} - diff --git a/c/src/lib/libbsp/mips/p4000/startup/setvec.c b/c/src/lib/libbsp/mips/p4000/startup/setvec.c deleted file mode 100644 index 0e3c604136..0000000000 --- a/c/src/lib/libbsp/mips/p4000/startup/setvec.c +++ /dev/null @@ -1,49 +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, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef lint -static char _sccsid[] = "@(#)setvec.c 04/25/96 1.2\n"; -#endif - -#include -#include - -mips_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 */ -) -{ - mips_isr_entry previous_isr; - - if ( type ) - rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr ); - else { - /* XXX: install non-RTEMS ISR as "raw" interupt */ - rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr ); - } - return previous_isr; -} - diff --git a/c/src/lib/libbsp/mips/p4000/times b/c/src/lib/libbsp/mips/p4000/times deleted file mode 100644 index 6a3dbfe1fb..0000000000 --- a/c/src/lib/libbsp/mips/p4000/times +++ /dev/null @@ -1,200 +0,0 @@ -# -# Timing Test Suite Results for the NO_BSP -# -# NOTE: This is just a template. The times are irrelevant since this BSP -# can only be compiled -- not executed. -# -# times,v 1.2 1995/12/07 15:44:23 joel Exp -# -# @(#)times 08/01/96 1.4 - -NOTE: To obtain the execution time in microseconds, divide the number of - cycles by the clock speed. For example, if rtems_semaphore create - is reported to be 1164 cycles, then at 66 Mhz it takes 17.64 - microseconds or 8.75 microseconds at 133 Mhz. - -Board: Algorithmics P4000i -CPU: IDT 4650 -Clock Speed: 100MHz -Memory Configuration: SRAM, DRAM, cache, etc -Wait States: - -Times Reported in: cycles -Timer Source: on-CPU cycle counter - -Column A:RTEMS compiled with 64 bit pointers and 64 bit unsigned32 types -Column B:RTEMS compiled with 32 bit pointers and 32 bit unsigned32 types - -# DESCRIPTION A B -== ================================================================= ==== ==== - 1 rtems_semaphore_create 788 759 - rtems_semaphore_delete 903 945 - rtems_semaphore_obtain: available 119 119 - rtems_semaphore_obtain: not available -- NO_WAIT 118 118 - rtems_semaphore_release: no waiting tasks 127 127 - - 2 rtems_semaphore_obtain: not available -- caller blocks 842 840 - - 3 rtems_semaphore_release: task readied -- preempts caller 777 751 - - 4 rtems_task_restart: blocked task -- preempts caller 1611 1595 - rtems_task_restart: ready task -- preempts caller 1253 1395 - rtems_semaphore_release: task readied -- returns to caller 365 345 - rtems_task_create 798 797 - rtems_task_start 464 460 - rtems_task_restart: suspended task -- returns to caller 517 517 - rtems_task_delete: suspended task 529 595 - rtems_task_restart: ready task -- returns to caller 527 525 - rtems_task_restart: blocked task -- returns to caller 707 684 - rtems_task_delete: blocked task 609 675 - - 5 rtems_task_suspend: calling task 549 549 - rtems_task_resume: task readied -- preempts caller 702 699 - - 6 rtems_task_restart: calling task 291 291 - rtems_task_suspend: returns to caller 195 194 - rtems_task_resume: task readied -- returns to caller 198 198 - rtems_task_delete: ready task 734 736 - - 7 rtems_task_restart: suspended task -- preempts caller 1049 990 - - 8 rtems_task_set_priority: obtain current priority 94 94 - rtems_task_set_priority: returns to caller 418 355 - rtems_task_mode: obtain current mode 44 43 - rtems_task_mode: no reschedule 0 49 - rtems_task_mode: reschedule -- returns to caller 0 232 - rtems_task_mode: reschedule -- preempts caller 0 687 - rtems_task_set_note 0 101 - rtems_task_get_note 0 103 - rtems_clock_set 0 237 - rtems_clock_get 0 16 - - 9 rtems_message_queue_create 3583 3432 - rtems_message_queue_send: no waiting tasks 252 252 - rtems_message_queue_urgent: no waiting tasks 252 252 - rtems_message_queue_receive: available 207 207 - rtems_message_queue_flush: no messages flushed 95 96 - rtems_message_queue_flush: messages flushed 110 110 - rtems_message_queue_delete 1044 1111 - -10 rtems_message_queue_receive: not available -- NO_WAIT 132 131 - rtems_message_queue_receive: not available -- caller blocks 884 892 - -11 rtems_message_queue_send: task readied -- preempts caller 397 817 - -12 rtems_message_queue_send: task readied -- returns to caller 397 397 - -13 rtems_message_queue_urgent: task readied -- preempts caller 816 817 - -14 rtems_message_queue_urgent: task readied -- returns to caller 397 398 - -15 rtems_event_receive: obtain current events 5 5 - rtems_event_receive: not available -- NO_WAIT 99 99 - rtems_event_receive: not available -- caller blocks 689 689 - rtems_event_send: no task readied 123 123 - rtems_event_receive: available 326 349 - rtems_event_send: task readied -- returns to caller 333 429 - -16 rtems_event_send: task readied -- preempts caller 843 838 - -17 rtems_task_set_priority: preempts caller 1002 991 - -18 rtems_task_delete: calling task 1171 1157 - -19 rtems_signal_catch 0 1306 - rtems_signal_send: returns to caller 0 1019 - rtems_signal_send: signal to self 0 496 - exit ASR overhead: returns to calling task 0 120 - exit ASR overhead: returns to preempting task 0 73 - -20 rtems_partition_create 1293 1306 - rtems_region_create 1010 1019 - rtems_partition_get_buffer: available 481 496 - rtems_partition_get_buffer: not available 120 120 - rtems_partition_return_buffer 587 460 - rtems_partition_delete 379 320 - rtems_region_get_segment: available 179 179 - rtems_region_get_segment: not available -- NO_WAIT 349 293 - rtems_region_return_segment: no waiting tasks 335 322 - rtems_region_get_segment: not available -- caller blocks 1603 1496 - rtems_region_return_segment: task readied -- preempts caller 1616 1533 - rtems_region_return_segment: task readied -- returns to caller 940 939 - rtems_region_delete 301 348 - rtems_io_initialize 9 10 - rtems_io_open 6 6 - rtems_io_close 6 6 - rtems_io_read 6 6 - rtems_io_write 6 5 - rtems_io_control 6 6 - -21 rtems_task_ident 1057 1058 - rtems_message_queue_ident 963 963 - rtems_semaphore_ident 1137 1136 - rtems_partition_ident 962 961 - rtems_region_ident 923 924 - rtems_port_ident 918 917 - rtems_timer_ident 942 941 - rtems_rate_monotonic_ident 924 925 - -22 rtems_message_queue_broadcast: task readied -- returns to caller 1084 1095 - rtems_message_queue_broadcast: no waiting tasks 147 148 - rtems_message_queue_broadcast: task readied -- preempts caller 1305 1268 - -23 rtems_timer_create 202 201 - rtems_timer_fire_after: inactive 261 261 - rtems_timer_fire_after: active 271 269 - rtems_timer_cancel: active 142 141 - rtems_timer_cancel: inactive 122 124 - rtems_timer_reset: inactive 222 222 - rtems_timer_reset: active 246 245 - rtems_timer_fire_when: inactive 312 311 - rtems_timer_fire_when: active 358 358 - rtems_timer_delete: active 263 263 - rtems_timer_delete: inactive 247 247 - rtems_task_wake_when 833 831 - -24 rtems_task_wake_after: yield -- returns to caller 99 98 - rtems_task_wake_after: yields -- preempts caller 479 478 - -25 rtems_clock_tick 313 318 - -26 _ISR_Disable 64 57 - _ISR_Flash 51 36 - _ISR_Enable 31 18 - _Thread_Disable_dispatch 53 37 - _Thread_Enable_dispatch 260 233 - _Thread_Set_state 446 463 - _Thread_Disptach (NO FP) 839 801 - context switch: no floating point contexts 673 653 - context switch: self 156 162 - context switch: to another task 84 70 - context switch: restore 1st FP task 1030 1013 - fp context switch: save idle, restore idle 969 948 - fp context switch: save idle, restore initialized 275 267 - fp context switch: save initialized, restore initialized 319 292 - _Thread_Resume 512 480 - _Thread_Unblock 121 139 - _Thread_Ready 199 203 - _Thread_Get 27 27 - _Semaphore_Get 20 21 - _Thread_Get: invalid id 5 5 - -27 interrupt entry overhead: returns to interrupted task 0 0 - interrupt exit overhead: returns to interrupted task 27 41 - interrupt entry overhead: returns to nested interrupt 0 0 - interrupt exit overhead: returns to nested interrupt 0 0 - interrupt entry overhead: returns to preempting task 0 0 - interrupt exit overhead: returns to preempting task 0 0 - -28 rtems_port_create 574 560 - rtems_port_external_to_internal 87 87 - rtems_port_internal_to_external 86 86 - rtems_port_delete 395 353 - -29 rtems_rate_monotonic_create 621 633 - rtems_rate_monotonic_period: initiate period -- returns to caller 773 694 - rtems_rate_monotonic_period: obtain status 295 284 - rtems_rate_monotonic_cancel 408 451 - rtems_rate_monotonic_delete: inactive 453 471 - rtems_rate_monotonic_delete: active 332 336 - rtems_rate_monotonic_period: conclude periods -- caller blocks 664 686 diff --git a/c/src/lib/libbsp/powerpc/papyrus/README b/c/src/lib/libbsp/powerpc/papyrus/README deleted file mode 100644 index 9d3e20b592..0000000000 --- a/c/src/lib/libbsp/powerpc/papyrus/README +++ /dev/null @@ -1,50 +0,0 @@ -# -# $Id$ -# - -BSP NAME: papyrus -BOARD: i cubed, papyrus development board -BUS: N/A -CPU FAMILY: ppc -CPU: PowerPC 403GA -COPROCESSORS: N/A -MODE: 32 bit mode - -DEBUG MONITOR: Modified IBM OpenBios - -PERIPHERALS -=========== -TIMERS: 403GA internal - RESOLUTION: .1 microseconds -SERIAL PORTS: 403GA internal with extra lines -REAL-TIME CLOCK: 403GA internal -DMA: 403GA internal -VIDEO: Laser Printer -SCSI: none -NETWORKING: AMD PCNet32 - -DRIVER INFORMATION -================== -CLOCK DRIVER: 403GA internal -IOSUPP DRIVER: N/A -SHMSUPP: N/A -TIMER DRIVER: 403GA internal -TTY DRIVER: 403GA internal - -STDIO -===== -PORT: Console port 0 -ELECTRICAL: RS-232 -BAUD: 9600 -BITS PER CHARACTER: 8 -PARITY: None -STOP BITS: 1 - -Notes -===== - -Papyrus only supports single processor operations. - -The code under c/src/lib/libbsp/ppc/papyrus only really supports -the PowerOpen ABI with an ELF assembler. - diff --git a/c/src/lib/libbsp/powerpc/papyrus/dlentry/dlentry.s b/c/src/lib/libbsp/powerpc/papyrus/dlentry/dlentry.s deleted file mode 100644 index e5df33a114..0000000000 --- a/c/src/lib/libbsp/powerpc/papyrus/dlentry/dlentry.s +++ /dev/null @@ -1,251 +0,0 @@ -/* dlentry.s 1.0 - 95/08/08 - * - * This file contains the entry veneer for RTEMS programs - * downloaded to Papyrus. - * - * Author: Andrew Bray - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - * $Id$ - */ - -#include "asm.h" - -/* - * The Papyrus ELF link scripts support three special sections: - * .entry The actual entry point, this must contain less - * than 256 bytes of code/data to fit below the - * .vectors section. This always preceeds any other - * code or data. - * .vectors The section containing the interrupt entry veneers. - * .entry2 Any code overflowing from .entry - * .descriptors The PowerOpen function indirection blocks. - */ - -/* - * Downloaded code loads the vectors separately to 0x00000100, - * so .entry can be over 256 bytes. - * - * The other sections are linked in the following order: - * .entry - * .entry2 - * .text - * .descriptors - * .data - * .bss - * usually starting from 0x00020000. - * - * The initial stack is set to run BELOW the code base address. - * - * All the entry veneer has to do is to clear the BSS. - */ - -/* - * GDB likes to have debugging information for the entry veneer. - * Here is some DWARF information. - */ - -#if PPC_ASM == PPC_ASM_ELF - .section .entry,"ax",@progbits -.L_text_b: -.L_LC1: - .previous - -.section .debug_sfnames -.L_sfnames_b: - .byte "/home/andy/powerpc/rtems-3.2.0/c/src/lib/libcpu/ppc/ppc403/dlentry/" - .byte 0 -.L_F0: - .byte "dlentry.s" - .byte 0 - .previous - -.section .line -.L_line_b: - .4byte .L_line_e-.L_line_b - .4byte .L_text_b -.L_LE1: -.L_line_last: - .4byte 0x0 - .2byte 0xffff - .4byte .L_text_e-.L_text_b -.L_line_e: - .previous - -.section .debug_srcinfo -.L_srcinfo_b: - .4byte .L_line_b - .4byte .L_sfnames_b - .4byte .L_text_b - .4byte .L_text_e - .4byte 0xffffffff - .4byte .L_LE1-.L_line_b - .4byte .L_F0-.L_sfnames_b - .4byte .L_line_last-.L_line_b - .4byte 0xffffffff - .previous - -.section .debug_pubnames - .4byte .L_debug_b - .4byte .L_P0 - .byte "download_entry" - .byte 0 - .4byte 0x0 - .byte 0 - .previous - -.section .debug_aranges - .4byte .L_debug_b - .4byte .L_text_b - .4byte .L_text_e-.L_text_b - .4byte 0 - .4byte 0 - .4byte 0 - .4byte 0 - .4byte 0 - .4byte 0 - .4byte 0x0 - .4byte 0x0 - .previous - -.section .debug -.L_debug_b: -.L_D1: - .4byte .L_D1_e-.L_D1 - .2byte 0x11 /* TAG_compile_unit */ - .2byte 0x12 /* AT_sibling */ - .4byte .L_D2 - .2byte 0x38 /* AT_name */ - .byte "dlentry.s" - .byte 0 - .2byte 0x258 /* AT_producer */ - .byte "GAS 2.5.2" - .byte 0 - .2byte 0x111 /* AT_low_pc */ - .4byte .L_text_b - .2byte 0x121 /* AT_high_pc */ - .4byte .L_text_e - .2byte 0x106 /* AT_stmt_list */ - .4byte .L_line_b - .2byte 0x1b8 /* AT_comp_dir */ - .byte "/home/andy/powerpc/rtems-3.2.0/c/src/lib/libcpu/ppc/ppc403/dlentry/" - .byte 0 - .2byte 0x8006 /* AT_sf_names */ - .4byte .L_sfnames_b - .2byte 0x8016 /* AT_src_info */ - .4byte .L_srcinfo_b -.L_D1_e: -.L_P0: -.L_D3: - .4byte .L_D3_e-.L_D3 - .2byte 0x6 /* TAG_global_subroutine */ - .2byte 0x12 /* AT_sibling */ - .4byte .L_D4 - .2byte 0x38 /* AT_name */ - .byte "download_entry" - .byte 0 - .2byte 0x278 /* AT_prototyped */ - .byte 0 - .2byte 0x111 /* AT_low_pc */ - .4byte .L_text_b - .2byte 0x121 /* AT_high_pc */ - .4byte .L_text_e - .2byte 0x8041 /* AT_body_begin */ - .4byte .L_text_b - .2byte 0x8051 /* AT_body_end */ - .4byte .L_text_e -.L_D3_e: - -.L_D4: - .4byte .L_D4_e-.L_D4 - .align 2 -.L_D4_e: -.L_D2: - .previous -#endif - -/*------------------------------------------------------------------------------- - * ROM Vector area. - *------------------------------------------------------------------------------*/ -#if PPC_ASM == PPC_ASM_ELF - .section .entry -#else - .csect .text[PR] -#endif - - PUBLIC_VAR (download_entry) -SYM(download_entry): - bl .startup -base_addr: - -/*------------------------------------------------------------------------------- - * Parameters from linker - *------------------------------------------------------------------------------*/ -toc_pointer: -#if PPC_ASM == PPC_ASM_ELF - .long s.got -#else - .long TOC[tc0] -#endif -bss_length: - .long bss.size -bss_addr: - .long bss.start -/*------------------------------------------------------------------------------- - * Reset_entry. - *------------------------------------------------------------------------------*/ -.startup: - /* Get start address, stack grows down from here... */ - mflr r1 - - /* Assume Bank regs set up..., cache etc. */ - bl bssclr - - /*----------------------------------------------------------------------- - * C_setup. - *----------------------------------------------------------------------*/ - lwz r2,toc_pointer-base_addr(r1) /* set r2 to toc */ - addi r1,r1,-56-4 /* start stack at text_addr - 56 */ - addi r3,r0,0x0 /* clear r3 */ - stw r3, 0(r1) /* Clear stack chain */ - stw r3, 4(r1) - stw r3, 8(r1) - stw r3, 12(r1) - .extern SYM (main) - b SYM (main) /* call the first C routine */ - -/*------------------------------------------------------------------------------- - * bssclr. - *------------------------------------------------------------------------------*/ -bssclr: - /*----------------------------------------------------------------------- - * Data move finished, zero out bss. - *----------------------------------------------------------------------*/ - lwz r2,bss_addr-base_addr(r1) /* start of bss set by loader */ - lwz r3,bss_length-base_addr(r1) /* bss length */ - rlwinm. r3,r3,30,0x3FFFFFFF /* form length/4 */ - beqlr /* no bss */ - mtctr r3 /* set ctr reg */ - xor r6,r6,r6 /* r6 = 0 */ -clear_bss: - stswi r6,r2,0x4 /* store r6 */ - addi r3,r2,0x4 /* update r2 */ - bdnz clear_bss /* decrement counter and loop */ - blr /* return */ -.L_text_e: - -#if PPC_ABI == PPC_ABI_POWEROPEN - DESCRIPTOR (startup) -#endif diff --git a/c/src/lib/libbsp/powerpc/papyrus/flashentry/flashentry.s b/c/src/lib/libbsp/powerpc/papyrus/flashentry/flashentry.s deleted file mode 100644 index a6a8f5ff86..0000000000 --- a/c/src/lib/libbsp/powerpc/papyrus/flashentry/flashentry.s +++ /dev/null @@ -1,289 +0,0 @@ -/* dlentry.s 1.0 - 95/08/08 - * - * This file contains the entry veneer for RTEMS programs - * stored in Papyrus' flash ROM. - * - * Author: Andrew Bray - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - * $Id$ - */ - -#include "asm.h" - -/* - * The Papyrus ELF link scripts support three special sections: - * .entry The actual entry point, this must contain less - * than 256 bytes of code/data to fit below the - * .vectors section. This always preceeds any other - * code or data. - * .vectors The section containing the interrupt entry veneers. - * .entry2 Any code overflowing from .entry - * .descriptors The PowerOpen function indirection blocks. - */ - -/* - * Flash sections are linked in the following order: - * .entry - * .vectors - * .entry2 - * .text - * .descriptors - * .data - * .bss - * usually starting from 0xFFF00000. - * - * The initial stack is set to run BELOW the final location of - * the initialised data. - * - * All the entry veneer has to do is to copy the initialised data - * to its final location and clear the BSS. - */ - -/* - * GDB likes to have debugging information for the entry veneer. - * Here is some DWARF information. - */ - -#if PPC_ASM == PPC_ASM_ELF - .section .entry,"ax",@progbits -.L_text_b: -.L_LC1: - .previous - -.section .debug_sfnames -.L_sfnames_b: - .byte "/home/andy/powerpc/rtems-3.2.0/c/src/lib/libcpu/ppc/ppc403/flashentry/" - .byte 0 -.L_F0: - .byte "flashentry.s" - .byte 0 - .previous - -.section .line -.L_line_b: - .4byte .L_line_e-.L_line_b - .4byte .L_text_b -.L_LE1: -.L_line_last: - .4byte 0x0 - .2byte 0xffff - .4byte .L_text_e-.L_text_b -.L_line_e: - .previous - -.section .debug_srcinfo -.L_srcinfo_b: - .4byte .L_line_b - .4byte .L_sfnames_b - .4byte .L_text_b - .4byte .L_text_e - .4byte 0xffffffff - .4byte .L_LE1-.L_line_b - .4byte .L_F0-.L_sfnames_b - .4byte .L_line_last-.L_line_b - .4byte 0xffffffff - .previous - -.section .debug_pubnames - .4byte .L_debug_b - .4byte .L_P0 - .byte "flash_entry" - .byte 0 - .4byte 0x0 - .byte 0 - .previous - -.section .debug_aranges - .4byte .L_debug_b - .4byte .L_text_b - .4byte .L_text_e-.L_text_b - .4byte 0 - .4byte 0 - .4byte 0 - .4byte 0 - .4byte 0 - .4byte 0 - .4byte 0x0 - .4byte 0x0 - .previous - -.section .debug -.L_debug_b: -.L_D1: - .4byte .L_D1_e-.L_D1 - .2byte 0x11 /* TAG_compile_unit */ - .2byte 0x12 /* AT_sibling */ - .4byte .L_D2 - .2byte 0x38 /* AT_name */ - .byte "flashentry.s" - .byte 0 - .2byte 0x258 /* AT_producer */ - .byte "GAS 2.5.2" - .byte 0 - .2byte 0x111 /* AT_low_pc */ - .4byte .L_text_b - .2byte 0x121 /* AT_high_pc */ - .4byte .L_text_e - .2byte 0x106 /* AT_stmt_list */ - .4byte .L_line_b - .2byte 0x1b8 /* AT_comp_dir */ - .byte "/home/andy/powerpc/rtems-3.2.0/c/src/lib/libcpu/ppc/ppc403/dlentry/" - .byte 0 - .2byte 0x8006 /* AT_sf_names */ - .4byte .L_sfnames_b - .2byte 0x8016 /* AT_src_info */ - .4byte .L_srcinfo_b -.L_D1_e: -.L_P0: -.L_D3: - .4byte .L_D3_e-.L_D3 - .2byte 0x6 /* TAG_global_subroutine */ - .2byte 0x12 /* AT_sibling */ - .4byte .L_D4 - .2byte 0x38 /* AT_name */ - .byte "flash_entry" - .byte 0 - .2byte 0x278 /* AT_prototyped */ - .byte 0 - .2byte 0x111 /* AT_low_pc */ - .4byte .L_text_b - .2byte 0x121 /* AT_high_pc */ - .4byte .L_text_e - .2byte 0x8041 /* AT_body_begin */ - .4byte .L_text_b - .2byte 0x8051 /* AT_body_end */ - .4byte .L_text_e -.L_D3_e: - -.L_D4: - .4byte .L_D4_e-.L_D4 - .align 2 -.L_D4_e: -.L_D2: - .previous -#endif - -/*------------------------------------------------------------------------------- - * ROM Vector area. - *------------------------------------------------------------------------------*/ -#if PPC_ASM == PPC_ASM_ELF - .section .entry -#else - .csect .text[PR] -#endif - PUBLIC_VAR (flash_entry) -SYM (flash_entry): - bl .startup -base_addr: - -/*------------------------------------------------------------------------------- - * Parameters from linker - *------------------------------------------------------------------------------*/ -toc_pointer: -#if PPC_ASM == PPC_ASM_ELF - .long s.got -#else - .long TOC[tc0] -#endif -text_length: - .long t.size -text_addr: - .long t.start -data_length: - .long copy.size -data_addr: - .long copy.dest -bss_length: - .long bss.size -bss_addr: - .long bss.start - -/*------------------------------------------------------------------------------- - * Reset_entry. - *------------------------------------------------------------------------------*/ -.startup: - /* Get start address */ - mflr r1 - - /* Assume Bank regs set up..., cache etc. */ - - /*----------------------------------------------------------------------- - * Check the DRAM where STACK+ DATA+ BBS will be placed. If this is OK - * we will return here. - *----------------------------------------------------------------------*/ - bl rom2ram - /*----------------------------------------------------------------------- - * Enable two 128MB cachable regions. - *----------------------------------------------------------------------*/ - addis r2,r0,0x8000 - addi r2,r2,0x0001 - - mtspr 0x3fb, r2 /* ICCR */ - mtspr 0x3fa, r2 /* DCCR */ - - /*----------------------------------------------------------------------- - * C_setup. - *----------------------------------------------------------------------*/ - lwz r2,toc_pointer-base_addr(r1) /* set r2 to toc */ - lwz r1,data_addr-base_addr(r1) /* set r1 to data_addr */ - addi r1,r1,-56 /* start stack at data_addr - 56 */ - addi r3,r0,0x0 /* clear r3 */ - stw r3, 0(r1) /* Clear stack chain */ - stw r3, 4(r1) - stw r3, 8(r1) - stw r3, 12(r1) - .extern SYM (main) - b SYM (main) /* call the first C routine */ - -/*------------------------------------------------------------------------------- - * Rom2ram. - *------------------------------------------------------------------------------*/ -rom2ram: - lwz r2,data_addr-base_addr(r1) /* start of data set by loader */ - lwz r3,data_length-base_addr(r1) /* data length */ - rlwinm r3,r3,30,0x3FFFFFFF /* form length/4 */ - mtctr r3 /* set ctr reg */ - /*----------------------------------------------------------------------- - * Calculate offset of data in image. - *----------------------------------------------------------------------*/ - lwz r5,text_length-base_addr(r1) /* get text length */ - lwz r4,text_addr-base_addr(r1) /* get text length */ - add r4,r4,r5 /* r4 = data pointer */ -move_data: - lswi r6,r4,0x4 /* load r6 */ - stswi r6,r2,0x4 /* store r6 */ - addi r4,r4,0x4 /* update r4 */ - addi r2,r2,0x4 /* update r2 */ - bdnz move_data /* decrement counter and loop */ - /*----------------------------------------------------------------------- - * Data move finished, zero out bss. - *----------------------------------------------------------------------*/ - lwz r2,bss_addr-base_addr(r1) /* start of bss set by loader */ - lwz r3,bss_length-base_addr(r1) /* bss length */ - rlwinm. r3,r3,30,0x3FFFFFFF /* form length/4 */ - beqlr /* no bss */ - mtctr r3 /* set ctr reg */ - xor r6,r6,r6 /* r6 = 0 */ -clear_bss: - stswi r6,r2,0x4 /* store r6 */ - addi r3,r2,0x4 /* update r2 */ - bdnz clear_bss /* decrement counter and loop */ - blr /* return */ -.L_text_e: - -#if PPC_ABI == PPC_ABI_POWEROPEN - DESCRIPTOR (startup) -#endif diff --git a/c/src/lib/libbsp/powerpc/papyrus/include/bsp.h b/c/src/lib/libbsp/powerpc/papyrus/include/bsp.h deleted file mode 100644 index 4025a8796e..0000000000 --- a/c/src/lib/libbsp/powerpc/papyrus/include/bsp.h +++ /dev/null @@ -1,154 +0,0 @@ -/* bsp.h - * - * This include file contains all Papyrus board IO definitions. - * - * Author: Andrew Bray - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __PAPYRUS_h -#define __PAPYRUS_h - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef ASM -/* Definition of where to store registers in alignment handler */ -#define ALIGN_REGS 0x0140 - -#else -#include -#include -#include -#include -#include - -/* - * Define the time limits for RTEMS Test Suite test durations. - * Long test and short test duration limits are provided. These - * values are in seconds and need to be converted to ticks for the - * application. - * - */ - -#define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ -#define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ - - -/* - * Stuff for Time Test 27 - */ - -#define MUST_WAIT_FOR_INTERRUPT 0 - -#define Install_tm27_vector( handler ) set_vector( (handler), PPC_IRQ_SCALL, 1 ) - -#define Cause_tm27_intr() asm volatile ("sc") - -#define Clear_tm27_intr() - -#define Lower_tm27_intr() - -/* - * Simple spin delay in microsecond units for device drivers. - * This is very dependent on the clock speed of the target. - */ - -#define delay( microseconds ) \ - { \ - unsigned32 start, ticks, now; \ - asm volatile ("mfspr %0, 0x3dd" : "=r" (start)); /* TBLO */ \ - ticks = (microseconds) * Cpu_table.clicks_per_usec; \ - do \ - asm volatile ("mfspr %0, 0x3dd" : "=r" (now)); /* TBLO */ \ - while (now - start < ticks); \ - } - - -/* Constants */ - -#define RAM_START 0 -#define RAM_END 0x00200000 - - -/* Some useful LED debugging bits */ -/* LED numbers are from 0-2 */ -#define __led_base ((volatile int *)0x7F200000) - -/* Turn a LED on */ -#define led_on(n) (__led_base[n] = 0) - -/* Turn a LED off */ -#define led_off(n) (__led_base[n] = 1) - -/* miscellaneous stuff assumed to exist */ - -extern rtems_configuration_table BSP_Configuration; /* owned by BSP */ -extern rtems_cpu_table Cpu_table; /* owned by BSP */ - -/* - * Device Driver Table Entries - */ - -/* - * NOTE: Use the standard Console driver entry - */ - -/* - * NOTE: Use the standard Clock driver entry - */ - -/* - * How many libio files we want - */ - -#define BSP_LIBIO_MAX_FDS 20 - -/* functions */ - -int bsp_start( - int argc, - char **argv, - char **environp -); - -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 */ -); -#endif /* ASM */ - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/lib/libbsp/powerpc/papyrus/include/coverhd.h b/c/src/lib/libbsp/powerpc/papyrus/include/coverhd.h deleted file mode 100644 index 71684ad0d5..0000000000 --- a/c/src/lib/libbsp/powerpc/papyrus/include/coverhd.h +++ /dev/null @@ -1,135 +0,0 @@ -/* coverhd.h - * - * This include file has defines to represent the overhead associated - * with calling a particular directive from C. These are used in the - * Timing Test Suite to ignore the overhead required to pass arguments - * to directives. On some CPUs and/or target boards, this overhead - * is significant and makes it difficult to distinguish internal - * RTEMS execution time from that used to call the directive. - * This file should be updated after running the C overhead timing - * test. Once this update has been performed, the RTEMS Time Test - * Suite should be rebuilt to account for these overhead times in the - * timing results. - * - * NOTE: If these are all zero, then the times reported include all - * all calling overhead including passing of arguments. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -/* - * Updated for a 25MHz Papyrus by Andrew Bray - * - * Units are 100ns. - * - * These numbers are of questionable use, as they are developed by calling - * the routine many times, thus getting its entry veneer into the (small) - * cache on the 403GA. This in general is not true of the RTEMS timing - * tests, which usually call a routine only once, thus having no cache loaded - * advantage. - * - * Whether the directive times are useful after deducting the function call - * overhead is also questionable. The user is more interested generally - * in the total cost of a directive, not the cost if the procedure call - * is inlined! (In general this is not true). - * - * Andrew Bray 18/08/1995 - * - */ - -#ifndef __COVERHD_h -#define __COVERHD_h - -#ifdef __cplusplus -extern "C" { -#endif - -#define CALLING_OVERHEAD_INITIALIZE_EXECUTIVE 1 -#define CALLING_OVERHEAD_SHUTDOWN_EXECUTIVE 1 -#define CALLING_OVERHEAD_TASK_CREATE 3 -#define CALLING_OVERHEAD_TASK_IDENT 1 -#define CALLING_OVERHEAD_TASK_START 1 -#define CALLING_OVERHEAD_TASK_RESTART 1 -#define CALLING_OVERHEAD_TASK_DELETE 1 -#define CALLING_OVERHEAD_TASK_SUSPEND 1 -#define CALLING_OVERHEAD_TASK_RESUME 1 -#define CALLING_OVERHEAD_TASK_SET_PRIORITY 1 -#define CALLING_OVERHEAD_TASK_MODE 1 -#define CALLING_OVERHEAD_TASK_GET_NOTE 1 -#define CALLING_OVERHEAD_TASK_SET_NOTE 1 -#define CALLING_OVERHEAD_TASK_WAKE_WHEN 4 -#define CALLING_OVERHEAD_TASK_WAKE_AFTER 1 -#define CALLING_OVERHEAD_INTERRUPT_CATCH 1 -#define CALLING_OVERHEAD_CLOCK_GET 4 -#define CALLING_OVERHEAD_CLOCK_SET 3 -#define CALLING_OVERHEAD_CLOCK_TICK 1 - -#define CALLING_OVERHEAD_TIMER_CREATE 1 -#define CALLING_OVERHEAD_TIMER_IDENT 1 -#define CALLING_OVERHEAD_TIMER_DELETE 1 -#define CALLING_OVERHEAD_TIMER_FIRE_AFTER 2 -#define CALLING_OVERHEAD_TIMER_FIRE_WHEN 5 -#define CALLING_OVERHEAD_TIMER_RESET 1 -#define CALLING_OVERHEAD_TIMER_CANCEL 1 -#define CALLING_OVERHEAD_SEMAPHORE_CREATE 2 -#define CALLING_OVERHEAD_SEMAPHORE_IDENT 1 -#define CALLING_OVERHEAD_SEMAPHORE_DELETE 1 -#define CALLING_OVERHEAD_SEMAPHORE_OBTAIN 1 -#define CALLING_OVERHEAD_SEMAPHORE_RELEASE 1 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_CREATE 2 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_IDENT 1 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_DELETE 1 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_SEND 1 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT 1 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_BROADCAST 1 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE 2 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_FLUSH 1 - -#define CALLING_OVERHEAD_EVENT_SEND 1 -#define CALLING_OVERHEAD_EVENT_RECEIVE 2 -#define CALLING_OVERHEAD_SIGNAL_CATCH 1 -#define CALLING_OVERHEAD_SIGNAL_SEND 1 -#define CALLING_OVERHEAD_PARTITION_CREATE 3 -#define CALLING_OVERHEAD_PARTITION_IDENT 1 -#define CALLING_OVERHEAD_PARTITION_DELETE 1 -#define CALLING_OVERHEAD_PARTITION_GET_BUFFER 1 -#define CALLING_OVERHEAD_PARTITION_RETURN_BUFFER 1 -#define CALLING_OVERHEAD_REGION_CREATE 3 -#define CALLING_OVERHEAD_REGION_IDENT 1 -#define CALLING_OVERHEAD_REGION_DELETE 1 -#define CALLING_OVERHEAD_REGION_GET_SEGMENT 2 -#define CALLING_OVERHEAD_REGION_RETURN_SEGMENT 1 -#define CALLING_OVERHEAD_PORT_CREATE 2 -#define CALLING_OVERHEAD_PORT_IDENT 1 -#define CALLING_OVERHEAD_PORT_DELETE 1 -#define CALLING_OVERHEAD_PORT_EXTERNAL_TO_INTERNAL 1 -#define CALLING_OVERHEAD_PORT_INTERNAL_TO_EXTERNAL 2 - -#define CALLING_OVERHEAD_IO_INITIALIZE 2 -#define CALLING_OVERHEAD_IO_OPEN 2 -#define CALLING_OVERHEAD_IO_CLOSE 2 -#define CALLING_OVERHEAD_IO_READ 2 -#define CALLING_OVERHEAD_IO_WRITE 2 -#define CALLING_OVERHEAD_IO_CONTROL 2 -#define CALLING_OVERHEAD_FATAL_ERROR_OCCURRED 1 -#define CALLING_OVERHEAD_RATE_MONOTONIC_CREATE 1 -#define CALLING_OVERHEAD_RATE_MONOTONIC_IDENT 1 -#define CALLING_OVERHEAD_RATE_MONOTONIC_DELETE 1 -#define CALLING_OVERHEAD_RATE_MONOTONIC_CANCEL 1 -#define CALLING_OVERHEAD_RATE_MONOTONIC_PERIOD 1 -#define CALLING_OVERHEAD_MULTIPROCESSING_ANNOUNCE 1 - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/lib/libbsp/powerpc/papyrus/startup/bspclean.c b/c/src/lib/libbsp/powerpc/papyrus/startup/bspclean.c deleted file mode 100644 index eab849d5e1..0000000000 --- a/c/src/lib/libbsp/powerpc/papyrus/startup/bspclean.c +++ /dev/null @@ -1,44 +0,0 @@ -/* bsp_cleanup() - * - * This routine normally is part of start.s and usually returns - * control to a monitor. - * - * INPUT: NONE - * - * OUTPUT: NONE - * - * Author: Andrew Bray - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/lib/libbsp/no_cpu/no_bsp/startup/bspclean.c: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include - -void bsp_cleanup( void ) -{ - rtems_fatal_error_occurred(0); -} diff --git a/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c b/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c deleted file mode 100644 index e8faaa2904..0000000000 --- a/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c +++ /dev/null @@ -1,276 +0,0 @@ -/* bsp_start() - * - * This routine starts the application. It includes application, - * board, and monitor specific initialization and configuration. - * The generic CPU dependent initialization has been performed - * before this routine is invoked. - * - * INPUT: NONE - * - * OUTPUT: NONE - * - * Author: Andrew Bray - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include - -#include - -#include -#include - -#ifdef STACK_CHECKER_ON -#include -#endif - -/* - * 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; - -char *rtems_progname; - -/* Initialize whatever libc we are using - * called from postdriver hook - */ - -void bsp_libc_init() -{ - extern int _end; - rtems_unsigned32 heap_start; - - heap_start = (rtems_unsigned32) &_end; - if (heap_start & (CPU_ALIGNMENT-1)) - heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1); - - /* - * The last parameter to RTEMS_Malloc_Initialize is the "chunk" - * size which a multiple of will be requested on each sbrk() - * call by malloc(). A value of 0 indicates that sbrk() should - * not be called to extend the heap. - */ - - RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0); - - /* - * Init the RTEMS libio facility to provide UNIX-like system - * calls for use by newlib (ie: provide __open, __close, etc) - * Uses malloc() to get area for the iops, so must be after malloc init - */ - - rtems_libio_init(); - - /* - * Set up for the libc handling. - */ - - if (BSP_Configuration.ticks_per_timeslice > 0) - libc_init(1); /* reentrant if possible */ - else - libc_init(0); /* non-reentrant */ - -} - -/* - * Function: bsp_pretasking_hook - * Created: 95/03/10 - * - * Description: - * BSP pretasking hook. Called just before drivers are initialized. - * Used to setup libc and install any BSP extensions. - * - * NOTES: - * Must not use libc (to do io) from here, since drivers are - * not yet initialized. - * - */ - -void -bsp_pretasking_hook(void) -{ - bsp_libc_init(); - -#ifdef STACK_CHECKER_ON - /* - * Initialize the stack bounds checker - * We can either turn it on here or from the app. - */ - - Stack_check_Initialize(); -#endif - -#ifdef RTEMS_DEBUG - rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); -#endif -} - - -/* - * After drivers are setup, register some "filenames" - * and open stdin, stdout, stderr files - * - * Newlib will automatically associate the files with these - * (it hardcodes the numbers) - */ - -void -bsp_postdriver_hook(void) -{ - int stdin_fd, stdout_fd, stderr_fd; - int error_code; - - error_code = 'S' << 24 | 'T' << 16; - - if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1) - rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' ); - - if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1) - rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' ); - - if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1) - rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' ); - - if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) - rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' ); -} - -int bsp_start( - int argc, - char **argv, - char **environp -) -{ - if ((argc > 0) && argv && argv[0]) - rtems_progname = argv[0]; - else - rtems_progname = "RTEMS"; - - /* - * Allocate the memory for the RTEMS Work Space. This can come from - * a variety of places: hard coded address, malloc'ed from outside - * RTEMS world (e.g. simulator or primitive memory manager), or (as - * typically done by stock BSPs) by subtracting the required amount - * of work space from the last physical address on the CPU board. - */ - - /* - * Copy the Configuration Table .. so we can change it - */ - - BSP_Configuration = Configuration; - - /* - * Add 1 region for the RTEMS Malloc - */ - - BSP_Configuration.RTEMS_api_configuration->maximum_regions++; - - /* - * Add 1 extension for newlib libc - */ - -#ifdef RTEMS_NEWLIB - BSP_Configuration.maximum_extensions++; -#endif - - /* - * Add 1 extension for stack checker - */ - -#ifdef STACK_CHECKER_ON - BSP_Configuration.maximum_extensions++; -#endif - - /* - * Tell libio how many fd's we want and allow it to tweak config - */ - - rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS); - - /* - * 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". - */ - - BSP_Configuration.work_space_start = (void *) - RAM_END - BSP_Configuration.work_space_size; - - /* - * initialize the CPU table for this BSP - */ - - Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */ - - Cpu_table.predriver_hook = NULL; - - Cpu_table.postdriver_hook = bsp_postdriver_hook; - - Cpu_table.idle_task = NULL; /* do not override system IDLE task */ - - Cpu_table.do_zero_of_workspace = TRUE; - - Cpu_table.interrupt_stack_size = 4 * 1024; - - Cpu_table.extra_mpci_receive_server_stack = 0; - - /* - * Don't forget the other CPU Table entries. - */ - - Cpu_table.clicks_per_usec = 10; - - Cpu_table.serial_per_sec = 10000000; - - Cpu_table.serial_external_clock = 1; - - Cpu_table.serial_xon_xoff = 0; - - Cpu_table.serial_cts_rts = 1; - - Cpu_table.serial_rate = 9600; - - Cpu_table.timer_average_overhead = 2; - - Cpu_table.timer_least_valid = 3; - - /* - * Start RTEMS - */ - - rtems_initialize_executive( &BSP_Configuration, &Cpu_table ); - - bsp_cleanup(); -} diff --git a/c/src/lib/libbsp/powerpc/papyrus/startup/linkcmds b/c/src/lib/libbsp/powerpc/papyrus/startup/linkcmds deleted file mode 100644 index df1997639f..0000000000 --- a/c/src/lib/libbsp/powerpc/papyrus/startup/linkcmds +++ /dev/null @@ -1,77 +0,0 @@ -/* - * This file contains directives for the GNU linker which are specific - * to the Papyrus. - * - * $Id$ - */ - -OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", - "elf32-powerpc") -OUTPUT_ARCH(powerpc) - SEARCH_DIR(/usr/local/powerpc-rtems/lib); - -ENTRY(download_entry) - -MEMORY - { - RAM : ORIGIN = 0, LENGTH = 4M - FLASH : ORIGIN = 0xFF000000, LENGTH = 0x80000 - EPROM : ORIGIN = 0xFFFE0000, LENGTH = 0x20000 - } - -/* Do we need any of these for elf? - __DYNAMIC = 0; */ -SECTIONS -{ - .vectors 0x0100 : - { - *(.vectors) - } - - .text 0x20000 : - { - *(.entry) - *(.entry2) - *(.text) - *(.rodata) - *(.rodata1) - *(.descriptors) - *(rom_ver) - } > RAM - - /* R/W Data */ - .data : - { - *(.data) - *(.data1) - } > RAM - - .got : - { - s.got = .; - *(.got.plt) *(.got) - } > RAM - - .bss : - { - bss.start = .; - *(.bss) *(.sbss) *(COMMON) - bss.end = ALIGN(4); - } > RAM - - bss.size = bss.end - bss.start; - PROVIDE(_end = bss.end); - - .line 0 : { *(.line) } - .debug 0 : { *(.debug) } - .debug_sfnames 0 : { *(.debug_sfnames) } - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } - .debug_aregion 0 : { *(.debug_aregion) } - .debug_macinfo 0 : { *(.debug_macinfo) } - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } -} - - diff --git a/c/src/lib/libbsp/powerpc/papyrus/startup/setvec.c b/c/src/lib/libbsp/powerpc/papyrus/startup/setvec.c deleted file mode 100644 index efb3e9d8e0..0000000000 --- a/c/src/lib/libbsp/powerpc/papyrus/startup/setvec.c +++ /dev/null @@ -1,58 +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 - * - * Author: Andrew Bray - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/lib/libbsp/no_cpu/no_bsp/startup/setvec.c: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include - -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_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr ); - - return previous_isr; -} - diff --git a/c/src/lib/libbsp/powerpc/papyrus/times b/c/src/lib/libbsp/powerpc/papyrus/times deleted file mode 100644 index da260853bf..0000000000 --- a/c/src/lib/libbsp/powerpc/papyrus/times +++ /dev/null @@ -1,197 +0,0 @@ -# -# Timing Test Suite Results for the Papyrus BSP -# -# NOTE: The Papyrus is a proprietary PPC403 based board. But it is the -# only BSP currently available for the PowerPC family. -# -# $Id$ -# - -NOTE: This BSP is user submitted and no timing information - is currently avaiable. - -Board: Papyrus -CPU: IBM 403GA -Clock Speed: 33 Mhz -Memory Configuration: SRAM, DRAM, cache, etc -Wait States: - -Times Reported in: cycles, microseconds, etc -Timer Source: Count Down Timer, on-CPU cycle counter, etc - -Column A: unused -Column B: unused - -# DESCRIPTION A B -== ================================================================= ==== ==== - 1 rtems_semaphore_create 20 - rtems_semaphore_delete 21 - rtems_semaphore_obtain: available 15 - rtems_semaphore_obtain: not available -- NO_WAIT 15 - rtems_semaphore_release: no waiting tasks 16 - - 2 rtems_semaphore_obtain: not available -- caller blocks 62 - - 3 rtems_semaphore_release: task readied -- preempts caller 55 - - 4 rtems_task_restart: blocked task -- preempts caller 77 - rtems_task_restart: ready task -- preempts caller 70 - rtems_semaphore_release: task readied -- returns to caller 25 - rtems_task_create 57 - rtems_task_start 31 - rtems_task_restart: suspended task -- returns to caller 36 - rtems_task_delete: suspended task 47 - rtems_task_restart: ready task -- returns to caller 37 - rtems_task_restart: blocked task -- returns to caller 46 - rtems_task_delete: blocked task 50 - - 5 rtems_task_suspend: calling task 51 - rtems_task_resume: task readied -- preempts caller 49 - - 6 rtems_task_restart: calling task 59 - rtems_task_suspend: returns to caller 18 - rtems_task_resume: task readied -- returns to caller 19 - rtems_task_delete: ready task 50 - - 7 rtems_task_restart: suspended task -- preempts caller 70 - - 8 rtems_task_set_priority: obtain current priority 12 - rtems_task_set_priority: returns to caller 27 - rtems_task_mode: obtain current mode 5 - rtems_task_mode: no reschedule 5 - rtems_task_mode: reschedule -- returns to caller 8 - rtems_task_mode: reschedule -- preempts caller 39 - rtems_task_set_note 13 - rtems_task_get_note 13 - rtems_clock_set 33 - rtems_clock_get 3 - - 9 rtems_message_queue_create 110 - rtems_message_queue_send: no waiting tasks 37 - rtems_message_queue_urgent: no waiting tasks 37 - rtems_message_queue_receive: available 31 - rtems_message_queue_flush: no messages flushed 12 - rtems_message_queue_flush: messages flushed 16 - rtems_message_queue_delete 26 - -10 rtems_message_queue_receive: not available -- NO_WAIT 15 - rtems_message_queue_receive: not available -- caller blocks 62 - -11 rtems_message_queue_send: task readied -- preempts caller 72 - -12 rtems_message_queue_send: task readied -- returns to caller 39 - -13 rtems_message_queue_urgent: task readied -- preempts caller 72 - -14 rtems_message_queue_urgent: task readied -- returns to caller 39 - -15 rtems_event_receive: obtain current events 1 - rtems_event_receive: not available -- NO_WAIT 12 - rtems_event_receive: not available -- caller blocks 56 - rtems_event_send: no task readied 12 - rtems_event_receive: available 12 - rtems_event_send: task readied -- returns to caller 24 - -16 rtems_event_send: task readied -- preempts caller 55 - -17 rtems_task_set_priority: preempts caller 62 - -18 rtems_task_delete: calling task 83 - -19 rtems_signal_catch 9 - rtems_signal_send: returns to caller 15 - rtems_signal_send: signal to self 18 - exit ASR overhead: returns to calling task 22 - exit ASR overhead: returns to preempting task 49 - -20 rtems_partition_create 35 - rtems_region_create 23 - rtems_partition_get_buffer: available 15 - rtems_partition_get_buffer: not available 13 - rtems_partition_return_buffer 18 - rtems_partition_delete 16 - rtems_region_get_segment: available 22 - rtems_region_get_segment: not available -- NO_WAIT 21 - rtems_region_return_segment: no waiting tasks 19 - rtems_region_get_segment: not available -- caller blocks 64 - rtems_region_return_segment: task readied -- preempts caller 74 - rtems_region_return_segment: task readied -- returns to caller 44 - rtems_region_delete 16 - rtems_io_initialize 2 - rtems_io_open 1 - rtems_io_close 1 - rtems_io_read 1 - rtems_io_write 1 - rtems_io_control 1 - -21 rtems_task_ident 149 - rtems_message_queue_ident 145 - rtems_semaphore_ident 156 - rtems_partition_ident 145 - rtems_region_ident 148 - rtems_port_ident 145 - rtems_timer_ident 145 - rtems_rate_monotonic_ident 145 - -22 rtems_message_queue_broadcast: task readied -- returns to caller 42 - rtems_message_queue_broadcast: no waiting tasks 17 - rtems_message_queue_broadcast: task readied -- preempts caller 78 - -23 rtems_timer_create 14 - rtems_timer_fire_after: inactive 22 - rtems_timer_fire_after: active 24 - rtems_timer_cancel: active 15 - rtems_timer_cancel: inactive 13 - rtems_timer_reset: inactive 21 - rtems_timer_reset: active 23 - rtems_timer_fire_when: inactive 34 - rtems_timer_fire_when: active 34 - rtems_timer_delete: active 19 - rtems_timer_delete: inactive 17 - rtems_task_wake_when 69 - -24 rtems_task_wake_after: yield -- returns to caller 9 - rtems_task_wake_after: yields -- preempts caller 45 - -25 rtems_clock_tick 4 - -26 _ISR_Disable 0 - _ISR_Flash 1 - _ISR_Enable 1 - _Thread_Disable_dispatch 0 - _Thread_Enable_dispatch 7 - _Thread_Set_state 11 - _Thread_Disptach (NO FP) 31 - context switch: no floating point contexts 21 - context switch: self 10 - context switch: to another task 10 - context switch: restore 1st FP task 25 - fp context switch: save idle, restore idle 31 - fp context switch: save idle, restore initialized 19 - fp context switch: save initialized, restore initialized 20 - _Thread_Resume 7 - _Thread_Unblock 7 - _Thread_Ready 9 - _Thread_Get 4 - _Semaphore_Get 2 - _Thread_Get: invalid id 0 - -27 interrupt entry overhead: returns to interrupted task 6 - interrupt exit overhead: returns to interrupted task 6 - interrupt entry overhead: returns to nested interrupt 6 - interrupt exit overhead: returns to nested interrupt 5 - interrupt entry overhead: returns to preempting task 7 - interrupt exit overhead: returns to preempting task 36 - -28 rtems_port_create 16 - rtems_port_external_to_internal 11 - rtems_port_internal_to_external 11 - rtems_port_delete 16 - -29 rtems_rate_monotonic_create 15 - rtems_rate_monotonic_period: initiate period -- returns to caller 21 - rtems_rate_monotonic_period: obtain status 13 - rtems_rate_monotonic_cancel 16 - rtems_rate_monotonic_delete: inactive 18 - rtems_rate_monotonic_delete: active 20 - rtems_rate_monotonic_period: conclude periods -- caller blocks 53 diff --git a/c/src/lib/libc/utsname.c b/c/src/lib/libc/utsname.c deleted file mode 100644 index 7fba3d610f..0000000000 --- a/c/src/lib/libc/utsname.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * $Id$ - */ - -#include -#include - -#include - -#include -#include -#include - -/*PAGE - * - * 4.4.1 Get System Name, P1003.1b-1993, p. 90 - */ - -int uname( - struct utsname *name -) -{ - /* XXX: Here is what Solaris returns... - sysname = SunOS - nodename = node_name - release = 5.3 - version = Generic_101318-12 - machine = sun4m - */ - - strcpy( name->sysname, "RTEMS" ); - - sprintf( name->nodename, "Node %d\n", _Objects_Local_node ); - - /* XXX release string is in BAD format for this routine!!! */ - strcpy( name->release, "3.2.0" ); - - /* XXX does this have any meaning for RTEMS */ - - strcpy( name->release, "" ); - - sprintf( name->machine, "%s/%s", CPU_NAME, CPU_MODEL_NAME ); - - return 0; -} - -/*PAGE - * - * 4.5.2 Get Process Times, P1003.1b-1993, p. 92 - */ - -clock_t times( - struct tms *buffer -) -{ - return POSIX_NOT_IMPLEMENTED(); -} diff --git a/c/src/lib/libcpu/hppa1.1/clock/clock.c b/c/src/lib/libcpu/hppa1.1/clock/clock.c deleted file mode 100644 index 85ecabd263..0000000000 --- a/c/src/lib/libcpu/hppa1.1/clock/clock.c +++ /dev/null @@ -1,267 +0,0 @@ -/* Clock - * - * This routine initializes the interval timer on the - * PA-RISC CPU. The tick frequency is specified by the bsp. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include - -/* should get this from bsp.h, but it is not installed yet */ -rtems_isr_entry set_vector(rtems_isr_entry, rtems_vector_number, int); -extern rtems_configuration_table BSP_Configuration; - -#include /* for atexit() */ - -extern rtems_cpu_table Cpu_table; /* owned by BSP */ - -typedef unsigned long long hppa_click_count_t; - -/* - * These are set by clock driver during its init - */ - -rtems_device_major_number rtems_clock_major = ~0; -rtems_device_minor_number rtems_clock_minor; - -/* - * CPU_HPPA_CLICKS_PER_TICK is either a #define or an rtems_unsigned32 - * allocated and set by bsp_start() - */ - -#ifndef CPU_HPPA_CLICKS_PER_TICK -extern rtems_unsigned32 CPU_HPPA_CLICKS_PER_TICK; -#endif - -volatile rtems_unsigned32 Clock_driver_ticks; -rtems_unsigned32 Clock_isrs; /* ISRs until next tick */ - -rtems_unsigned32 most_recent_itimer_value; - -rtems_unsigned64 Clock_clicks; /* running total of cycles */ - -rtems_unsigned32 Clock_clicks_interrupt; - -void Clock_exit(void); - -void -ReInstall_clock(rtems_isr_entry new_clock_isr) -{ - rtems_unsigned32 isrlevel = 0; - - rtems_interrupt_disable(isrlevel); - (void) set_vector( - new_clock_isr, - HPPA_INTERRUPT_EXTERNAL_INTERVAL_TIMER, - 1 - ); - rtems_interrupt_enable(isrlevel); -} - -/* - * read itimer and update Clock_clicks as appropriate - */ - -rtems_unsigned32 -Clock_read_itimer() -{ - rtems_unsigned32 isrlevel; - rtems_unsigned32 itimer_value; - rtems_unsigned32 wrap_count; - rtems_unsigned32 recent_count; - - rtems_interrupt_disable(isrlevel); - - wrap_count = (Clock_clicks & 0xFFFFFFFF00000000ULL) >> 32; - recent_count = (rtems_unsigned32) Clock_clicks; - - itimer_value = get_itimer(); - - if (itimer_value < recent_count) - wrap_count++; - Clock_clicks = (((rtems_unsigned64) wrap_count) << 32) + itimer_value; - - rtems_interrupt_enable(isrlevel); - - return itimer_value; -} - - -void Install_clock(rtems_isr_entry clock_isr) -{ - Clock_driver_ticks = 0; - Clock_clicks_interrupt = 0; - Clock_clicks = 0; - - Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000; - - if (BSP_Configuration.ticks_per_timeslice) - { - /* - * initialize the interval here - * First tick is set to right amount of time in the future - * Future ticks will be incremented over last value set - * in order to provide consistent clicks in the face of - * interrupt overhead - */ - - Clock_clicks_interrupt = Clock_read_itimer() + CPU_HPPA_CLICKS_PER_TICK; - set_itimer((rtems_unsigned32) Clock_clicks_interrupt); - - (void) set_vector(clock_isr, HPPA_INTERRUPT_EXTERNAL_INTERVAL_TIMER, 1); - } - atexit(Clock_exit); -} - -rtems_isr -Clock_isr(rtems_vector_number vector) -{ - rtems_unsigned32 clicks_til_next_interrupt; - rtems_unsigned32 itimer_value; - - /* - * setup for next interrupt; making sure the new value is reasonably - * in the future.... in case we lost out on an interrupt somehow - */ - - itimer_value = Clock_read_itimer(); - Clock_clicks_interrupt += CPU_HPPA_CLICKS_PER_TICK; - - /* - * how far away is next interrupt *really* - * It may be a long time; this subtraction works even if - * Clock_clicks_interrupt < Clock_clicks_low_order via - * the miracle of unsigned math. - */ - clicks_til_next_interrupt = Clock_clicks_interrupt - itimer_value; - - /* - * If it is too soon then bump it up. - * This should only happen if CPU_HPPA_CLICKS_PER_TICK is too small. - * But setting it low is useful for debug, so... - */ - - if (clicks_til_next_interrupt < 400) - { - Clock_clicks_interrupt = itimer_value + 1000; - /* XXX: count these! this should be rare */ - } - - /* - * If it is too late, that means we missed the interrupt somehow. - * Rather than wait 35-50s for a wrap, we just fudge it here. - */ - - if (clicks_til_next_interrupt > CPU_HPPA_CLICKS_PER_TICK) - { - Clock_clicks_interrupt = itimer_value + 1000; - /* XXX: count these! this should never happen :-) */ - } - - set_itimer((rtems_unsigned32) Clock_clicks_interrupt); - - Clock_driver_ticks++; - - if (Clock_isrs == 1) - { - rtems_clock_tick(); - Clock_isrs = BSP_Configuration.microseconds_per_tick / 10000; - if (Clock_isrs == 0) - Clock_isrs = 1; - } - else - Clock_isrs--; -} - -/* - * Called via atexit() - * Remove the clock interrupt handler by setting handler to NULL - */ - -void -Clock_exit(void) -{ - if ( BSP_Configuration.ticks_per_timeslice ) - { - (void) set_vector(0, HPPA_INTERRUPT_EXTERNAL_INTERVAL_TIMER, 1); - } -} - -/* - * spin delay for specified number of microseconds - * used by RTEMS delay macro - */ - -void -Clock_delay(rtems_unsigned32 microseconds) -{ - rtems_unsigned64 future_time; - - (void) Clock_read_itimer(); - future_time = Clock_clicks + - ((rtems_unsigned64) microseconds) * - Cpu_table.itimer_clicks_per_microsecond; - - for (;;) - { - (void) Clock_read_itimer(); - if (future_time <= Clock_clicks) - break; - } -} - -rtems_device_driver Clock_initialize( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - Install_clock(Clock_isr); - - /* - * make major/minor avail to others such as shared memory driver - */ - rtems_clock_major = major; - rtems_clock_minor = minor; - - return RTEMS_SUCCESSFUL; -} - -rtems_device_driver Clock_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - 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(HPPA_INTERRUPT_EXTERNAL_INTERVAL_TIMER); - } - else if (args->command == rtems_build_name('N', 'E', 'W', ' ')) - { - ReInstall_clock(args->buffer); - } - -done: - return RTEMS_SUCCESSFUL; -} diff --git a/c/src/lib/libcpu/hppa1.1/runway/runway.h b/c/src/lib/libcpu/hppa1.1/runway/runway.h deleted file mode 100644 index 41aafe26ef..0000000000 --- a/c/src/lib/libcpu/hppa1.1/runway/runway.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * File: $RCSfile$ - * Project: PixelFlow - * Created: 94/11/29 - * RespEngr: tony bennett - * Revision: $Revision$ - * Last Mod: $Date$ - * - * Description: - * definitions specific to the runway bus - * - * TODO: - * Add lots more. - * - * $Id$ - */ - -#ifndef _INCLUDE_RUNWAY_H -#define _INCLUDE_RUNWAY_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define HPPA_RUNWAY_PROC_HPA_BASE ((void *) 0xFFFA0000) - -/* given a processor number, where is its HPA? */ -#define HPPA_RUNWAY_HPA(cpu) \ - ((rtems_unsigned32) (HPPA_RUNWAY_PROC_HPA_BASE + ((cpu) * 0x2000))) - -#define HPPA_RUNWAY_REG_IO_EIR_OFFSET 0x000 - -#ifdef __cplusplus -} -#endif - -#endif /* ! _INCLUDE_RUNWAY_H */ diff --git a/c/src/lib/libcpu/hppa1.1/semaphore/semaphore.c b/c/src/lib/libcpu/hppa1.1/semaphore/semaphore.c deleted file mode 100644 index aa8b768b3a..0000000000 --- a/c/src/lib/libcpu/hppa1.1/semaphore/semaphore.c +++ /dev/null @@ -1,308 +0,0 @@ -/* - * File: $RCSfile$ - * Project: PixelFlow - * Created: 94/11/29 - * RespEngr: tony bennett - * Revision: $Revision$ - * Last Mod: $Date$ - * - * COPYRIGHT (c) 1994 by Division Incorporated - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of Division Incorporated not be - * used in advertising or publicity pertaining to distribution - * of the software without specific, written prior permission. - * Division Incorporated makes no representations about the - * suitability of this software for any purpose. - * - * Description: - * HPPA fast spinlock semaphores based on LDCWX instruction. - * These semaphores are not known to RTEMS. - * - * TODO: - * Put node number in high 16 bits of flag?? - * XXX: Need h_s_deallocate - * - * $Id$ - */ - -#include - -#include "semaphore.h" - -/* - * Report fatal semaphore error - */ - -#define SEM_FATAL_ERROR(sp) rtems_fatal_error_occurred((rtems_unsigned32) sp) - -#define SEM_CHECK(sp) do { \ - if (((sp) == 0) || (int) (sp) & 0xf) \ - { \ - SEM_FATAL_ERROR(sp); \ - } \ - } while (0) - -/* - * Init a semaphore to be free - */ - -#define SEM_FREE_INIT(sp) \ - do { \ - (sp)->lock = 1; \ - (sp)->flags = 0; \ - (sp)->owner_tcb = 0; \ - } while (0) - -/* - * Grab a semaphore recording its owner. - */ - -#define SEM_MARK_GRABBED(sp) \ - do { \ - (sp)->owner_tcb = _Thread_Executing; \ - } while (0) - -/* - * Mark the semaphore busy - */ - -#define SEM_MARK_BUSY(sp) ((sp)->flags |= HPPA_SEM_IN_USE) - -/* - * Is a semaphore available? - */ - -#define SEM_IS_AVAILABLE(sp) ((sp)->owner_tcb == 0) - -/* - * The pool control semaphore is the first in the pool - */ - -#define SEM_CONTROL (&hppa_semaphore_pool[0]) -#define SEM_FIRST (&hppa_semaphore_pool[1]) - -#define SEM_PRIVATE(cookie) rtems_interrupt_disable(cookie) - -#define SEM_PUBLIC(cookie) rtems_interrupt_enable(cookie) - - -/* - * Control variables for the pool - */ - -hppa_semaphore_t *hppa_semaphore_pool; /* ptr to first */ -int hppa_semaphores; -int hppa_semaphores_available; - -void -hppa_semaphore_pool_initialize(void *pool_base, - int pool_size) -{ - hppa_semaphore_t *sp; - int align_factor; - rtems_unsigned32 isr_level; - - /* - * round pool_base up to be a multiple of SEM_ALIGN - */ - - align_factor = SEM_ALIGN - (((int) pool_base) & (SEM_ALIGN-1)); - if (align_factor != SEM_ALIGN) - { - pool_base += align_factor; - pool_size -= align_factor; - } - - /* - * How many can the pool hold? - * Assumes the semaphores are SEM_ALIGN bytes each - */ - - if (sizeof(hppa_semaphore_t) != SEM_ALIGN) - rtems_fatal_error_occurred(RTEMS_INVALID_SIZE); - - pool_size &= ~(SEM_ALIGN - 1); - - SEM_PRIVATE(isr_level); - - hppa_semaphore_pool = pool_base; - hppa_semaphores = pool_size / SEM_ALIGN; - - /* - * If we are node0, then init all in the pool - */ - - if (cpu_number == 0) - { - /* - * Tell other cpus we are not done, jic - */ - SEM_CONTROL->user = rtems_build_name('!', 'D', 'N', 'E'); - - for (sp=SEM_FIRST; sp < &hppa_semaphore_pool[hppa_semaphores]; sp++) - SEM_FREE_INIT(sp); - SEM_FREE_INIT(SEM_CONTROL); - } - - /* - * Tell other cpus we are done, or wait for it to be done if on another cpu - */ - - if (cpu_number == 0) - SEM_CONTROL->user = rtems_build_name('D', 'O', 'N', 'E'); - else - while (SEM_CONTROL->user != rtems_build_name('D', 'O', 'N', 'E')) - ; - - hppa_semaphores_available = hppa_semaphores; - - SEM_PUBLIC(isr_level); -} - -/* - * Function: hppa_semaphore_acquire - * Created: 94/11/29 - * RespEngr: tony bennett - * - * Description: - * Acquire a semaphore. Will spin on the semaphore unless - * 'flag' says not to. - * - * Parameters: - * - * - * Returns: - * 0 -- if did not acquire - * non-zero -- if acquired semaphore - * (actually this is the spin count) - * - * Notes: - * There is no requirement that the semaphore be within the pool - * - * Deficiencies/ToDo: - * - */ - - -rtems_unsigned32 -hppa_semaphore_acquire(hppa_semaphore_t *sp, - int flag) -{ - rtems_unsigned32 lock_value; - rtems_unsigned32 spin_count = 1; - - SEM_CHECK(sp); - - for (;;) - { - HPPA_ASM_LDCWS(0, 0, sp, lock_value); - - if (lock_value) /* we now own the lock */ - { - SEM_MARK_GRABBED(sp); - return spin_count ? spin_count : ~0; /* jic */ - } - - if (flag & HPPA_SEM_NO_SPIN) - return 0; - - spin_count++; - } -} - -void -hppa_semaphore_release(hppa_semaphore_t *sp) -{ - SEM_CHECK(sp); - - if (sp->owner_tcb != _Thread_Executing) - SEM_FATAL_ERROR("owner mismatch"); - - sp->lock = 1; -} - - -/* - * Function: hppa_semaphore_allocate - * Created: 94/11/29 - * RespEngr: tony bennett - * - * Description: - * Get a pointer to a semaphore. - * - * Parameters: - * which -- if 0, then allocate a free semaphore from the pool - * if non-zero, then return pointer to that one, even - * if it is already busy. - * - * Returns: - * successful -- pointer to semaphore - * NULL otherwise - * - * Notes: - * - * - * Deficiencies/ToDo: - * - * - */ - -hppa_semaphore_t * -hppa_semaphore_allocate(rtems_unsigned32 which, - int flag) -{ - hppa_semaphore_t *sp = 0; - - /* - * grab the control semaphore - */ - - if (hppa_semaphore_acquire(SEM_CONTROL, 0) == 0) - SEM_FATAL_ERROR("could not grab control semaphore"); - - /* - * Find a free one and init it - */ - - if (which) - { - if (which >= hppa_semaphores) - SEM_FATAL_ERROR("requested non-existent semaphore"); - sp = &hppa_semaphore_pool[which]; - - /* - * if it is "free", then mark it claimed now. - * If it is not free then we are done. - */ - - if (SEM_IS_AVAILABLE(sp)) - goto allmine; - } - else for (sp = SEM_FIRST; - sp < &hppa_semaphore_pool[hppa_semaphores]; - sp++) - { - if (SEM_IS_AVAILABLE(sp)) - { -allmine: SEM_FREE_INIT(sp); - SEM_MARK_BUSY(sp); - if ( ! (flag & HPPA_SEM_INITIALLY_FREE)) - SEM_MARK_GRABBED(sp); - break; - } - } - - /* - * Free up the control semaphore - */ - - hppa_semaphore_release(SEM_CONTROL); - - return sp; -} - diff --git a/c/src/lib/libcpu/hppa1.1/semaphore/semaphore.h b/c/src/lib/libcpu/hppa1.1/semaphore/semaphore.h deleted file mode 100644 index 04f709cf64..0000000000 --- a/c/src/lib/libcpu/hppa1.1/semaphore/semaphore.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * File: $RCSfile$ - * Project: PixelFlow - * Created: 94/11/29 - * RespEngr: tony e bennett - * Revision: $Revision$ - * Last Mod: $Date$ - * - * COPYRIGHT (c) 1994 by Division Incorporated - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of Division Incorporated not be - * used in advertising or publicity pertaining to distribution - * of the software without specific, written prior permission. - * Division Incorporated makes no representations about the - * suitability of this software for any purpose. - * - * Description: - * HPPA fast spinlock semaphores based on LDCWX instruction. - * These semaphores are not known to RTEMS. - * - * TODO: - * - * $Id$ - */ - -#ifndef _INCLUDE_SEMAPHORE_H -#define _INCLUDE_SEMAPHORE_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This structure has hardware requirements. - * LDCWX opcode requires 16byte alignment for the lock - * 'lock' must be first member of structure. - */ - -#define SEM_ALIGN 16 - -typedef volatile struct { - - rtems_unsigned32 lock __attribute__ ((aligned (SEM_ALIGN))); - - rtems_unsigned32 flags; - - void *owner_tcb; /* for debug/commentary only */ - - rtems_unsigned32 user; /* for use by user */ - -} hppa_semaphore_t; - -/* - * Values for flags - */ - -#define HPPA_SEM_IN_USE 0x0001 /* semaphore owned by somebody */ -#define HPPA_SEM_NO_SPIN 0x0002 /* don't spin if unavailable */ -#define HPPA_SEM_INITIALLY_FREE 0x0004 /* init it to be free */ - -/* - * Caller specifiable flags - */ - -#define HPPA_SEM_CALLER_FLAGS (HPPA_SEM_NO_SPIN | HPPA_SEM_INITIALLY_FREE) - -void hppa_semaphore_pool_initialize(void *pool_base, int pool_size); - -rtems_unsigned32 hppa_semaphore_acquire(hppa_semaphore_t *sp, int flag); - -void hppa_semaphore_release(hppa_semaphore_t *sp); - -hppa_semaphore_t *hppa_semaphore_allocate(rtems_unsigned32 which, int flag); - -#ifdef __cplusplus -} -#endif - -#endif /* ! _INCLUDE_SEMAPHORE_H */ diff --git a/c/src/lib/libcpu/hppa1.1/timer/timer.c b/c/src/lib/libcpu/hppa1.1/timer/timer.c deleted file mode 100644 index 104b108f2a..0000000000 --- a/c/src/lib/libcpu/hppa1.1/timer/timer.c +++ /dev/null @@ -1,63 +0,0 @@ -/* timer.c - * - * This file manages the interval timer on the PA-RISC. - * - * NOTE: It is important that the timer start/stop overhead be - * determined when porting or modifying this code. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include - -volatile rtems_unsigned32 Timer_starting; -rtems_boolean Timer_driver_Find_average_overhead; - -void Timer_initialize() -{ - Timer_starting = get_itimer(); - set_eiem(0x80000000); -} - -#define AVG_OVERHEAD 0 /* It typically takes 3.0 microseconds */ - /* (6 countdowns) to start/stop the timer. */ -#define LEAST_VALID 1 /* Don't trust a value lower than this */ - -int Read_timer() -{ - rtems_unsigned32 clicks; - rtems_unsigned32 total; - - clicks = get_itimer(); - - total = clicks - Timer_starting; - - if ( Timer_driver_Find_average_overhead == 1 ) - return total; /* in XXX microsecond units */ - - else { - if ( total < LEAST_VALID ) - return 0; /* below timer resolution */ - return (total - AVG_OVERHEAD); - } -} - -rtems_status_code Empty_function( void ) -{ - return RTEMS_SUCCESSFUL; -} - -void Set_find_average_overhead( - rtems_boolean find_flag -) -{ - Timer_driver_Find_average_overhead = find_flag; -} diff --git a/c/src/lib/libcpu/mips/clock/ckinit.c b/c/src/lib/libcpu/mips/clock/ckinit.c deleted file mode 100644 index 9d30652376..0000000000 --- a/c/src/lib/libcpu/mips/clock/ckinit.c +++ /dev/null @@ -1,245 +0,0 @@ - -/* ckinit.c - * - * This file contains the clock driver initialization for the IDT 4650. - * - * Author: Craig Lebakken - * - * COPYRIGHT (c) 1996 by Transition Networks Inc. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of Transition Networks not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * Transition Networks makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/lib/libbsp/no_cpu/no_bsp/clock/ckinit.c: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef lint -static char _sccsid[] = "@(#)ckinit.c 08/20/96 1.3\n"; -#endif - -#include - -#include -#include -#include - -#define EXT_INT5 0x8000 /* external interrupt 5 */ - -#include "clock.h" - -#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) /* equivalent to CPU clock speed in MHz */ - -void Clock_exit( void ); -rtems_isr Clock_isr( rtems_vector_number vector ); - - -/* - * The interrupt vector number associated with the clock tick device - * driver. - */ - -#define CLOCK_VECTOR_MASK EXT_INT5 -#define CLOCK_VECTOR 0x7 - -/* - * Clock_driver_ticks is a monotonically increasing counter of the - * number of clock ticks since the driver was initialized. - */ - -volatile rtems_unsigned32 Clock_driver_ticks; - -/* - * Clock_isrs is the number of clock ISRs until the next invocation of - * the RTEMS clock tick routine. The clock tick device driver - * gets an interrupt once a millisecond and counts down until the - * length of time between the user configured microseconds per tick - * has passed. - */ - -rtems_unsigned32 Clock_isrs; /* ISRs until next tick */ - -/* - * These are set by clock driver during its init - */ - -rtems_device_major_number rtems_clock_major = ~0; -rtems_device_minor_number rtems_clock_minor; - -/* - * The previous ISR on this clock tick interrupt vector. - */ - -rtems_isr_entry Old_ticker; - -void Clock_exit( void ); - -static unsigned32 mips_timer_rate = 0; - -/* - * Isr Handler - */ - -rtems_isr Clock_isr( - rtems_vector_number vector -) -{ -/* - * bump the number of clock driver ticks since initialization - * - * determine if it is time to announce the passing of tick as configured - * to RTEMS through the rtems_clock_tick directive - * - * perform any timer dependent tasks - */ - - /* refresh the internal CPU timer */ - mips_set_timer( mips_timer_rate ); - - Clock_driver_ticks += 1; - - rtems_clock_tick(); -} - -/* User callback shell (set from Clock_Control) */ -static void (*user_callback)(void); - -rtems_isr User_Clock_isr( - rtems_vector_number vector -) -{ - /* refresh the internal CPU timer */ - mips_set_timer( mips_timer_rate ); - - if (user_callback) - user_callback(); -} - -/* - * Install_clock - * - * Install a clock tick handleR and reprograms the chip. This - * is used to initially establish the clock tick. - */ - -void Install_clock( - rtems_isr_entry clock_isr -) -{ - /* - * Initialize the clock tick device driver variables - */ - - Clock_driver_ticks = 0; - Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000; - - /* - * If ticks_per_timeslice is configured as non-zero, then the user - * wants a clock tick. - */ - - if ( BSP_Configuration.ticks_per_timeslice ) { - Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 ); - /* - * Hardware specific initialize goes here - */ - - mips_timer_rate = BSP_Configuration.microseconds_per_tick * CLOCKS_PER_MICROSECOND; - mips_set_timer( mips_timer_rate ); - enable_int(CLOCK_VECTOR_MASK); - } - - /* - * Schedule the clock cleanup routine to execute if the application exits. - */ - - atexit( Clock_exit ); -} - -/* - * Clean up before the application exits - */ - -void Clock_exit( void ) -{ - if ( BSP_Configuration.ticks_per_timeslice ) { - - /* mips: turn off the timer interrupts */ - disable_int(CLOCK_VECTOR_MASK); - - } -} - -/* - * Clock_initialize - * - * Device driver entry point for clock tick driver initialization. - */ - -rtems_device_driver Clock_initialize( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - Install_clock( Clock_isr ); - - /* - * make major/minor avail to others such as shared memory driver - */ - - rtems_clock_major = major; - rtems_clock_minor = minor; - - return RTEMS_SUCCESSFUL; -} - -rtems_device_driver Clock_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - rtems_unsigned32 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); - } - else if (args->command == rtems_build_name('N', 'E', 'W', ' ')) - { - rtems_interrupt_disable( isrlevel ); - user_callback = (void (*)(void))args->buffer; - (void) set_vector( User_Clock_isr, CLOCK_VECTOR, 1 ); - rtems_interrupt_enable( isrlevel ); - } - -done: - return RTEMS_SUCCESSFUL; -} diff --git a/c/src/lib/libcpu/mips/clock/clock.S b/c/src/lib/libcpu/mips/clock/clock.S deleted file mode 100644 index ec0280f494..0000000000 --- a/c/src/lib/libcpu/mips/clock/clock.S +++ /dev/null @@ -1,45 +0,0 @@ -/* clock.s - * - * This file contains the assembly code for the IDT 4650 clock driver. - * - * Author: Craig Lebakken - * - * COPYRIGHT (c) 1996 by Transition Networks Inc. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of Transition Networks not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * Transition Networks makes no representations about the suitability - * of this software for any purpose. - * - * $Id$ - */ -/* @(#)clock.S 08/20/96 1.2 */ - -#include -#include -#include - -FRAME(mips_set_timer,sp,0,ra) - .set noreorder - mfc0 t0,C0_COUNT - nop - addu t0,a0,t0 - mtc0 t0,C0_COMPARE - nop - j ra - .set reorder -ENDFRAME(mips_set_timer) - -FRAME(mips_get_timer,sp,0,ra) - .set noreorder - mfc0 v0,C0_COUNT - nop - j ra - .set reorder -ENDFRAME(mips_get_timer) diff --git a/c/src/lib/libcpu/mips/clock/clock.h b/c/src/lib/libcpu/mips/clock/clock.h deleted file mode 100644 index a14304f668..0000000000 --- a/c/src/lib/libcpu/mips/clock/clock.h +++ /dev/null @@ -1,25 +0,0 @@ -/* clock.s - * - * This file contains the assembly code for the IDT 4650 clock driver. - * - * Author: Craig Lebakken - * - * COPYRIGHT (c) 1996 by Transition Networks Inc. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of Transition Networks not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * Transition Networks makes no representations about the suitability - * of this software for any purpose. - * - * $Id$ - */ - -/* @(#)clock.h 08/20/96 1.2 */ - -extern void mips_set_timer( unsigned32 timer_clock_interval ); diff --git a/c/src/lib/libcpu/mips/timer/gettime.S b/c/src/lib/libcpu/mips/timer/gettime.S deleted file mode 100644 index a00f2d5819..0000000000 --- a/c/src/lib/libcpu/mips/timer/gettime.S +++ /dev/null @@ -1,35 +0,0 @@ -/* gettime.s - * - * This file contains the assembly code for the IDT 4650 timer driver. - * - * Author: Craig Lebakken - * - * COPYRIGHT (c) 1996 by Transition Networks Inc. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of Transition Networks not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * Transition Networks makes no representations about the suitability - * of this software for any purpose. - * - * $Id$ - */ - -/* @(#)gettime.S 08/20/96 1.2 */ - -#include -#include -#include - -FRAME(mips_read_timer,sp,0,ra) - .set noreorder - mfc0 v0,C0_COUNT - nop - j ra - .set reorder -ENDFRAME(mips_read_timer) diff --git a/c/src/lib/libcpu/mips/timer/timer.c b/c/src/lib/libcpu/mips/timer/timer.c deleted file mode 100644 index 4e3cfb06b0..0000000000 --- a/c/src/lib/libcpu/mips/timer/timer.c +++ /dev/null @@ -1,136 +0,0 @@ -/* timer.c - * - * This file contains the initialization code for the IDT 4650 timer driver. - * - * Author: Craig Lebakken - * - * COPYRIGHT (c) 1996 by Transition Networks Inc. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of Transition Networks not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * Transition Networks makes no representations about the suitability - * of this software for any purpose. - * - * derived from src/lib/libbsp/no_cpu/no_bsp/timer/timer.c - * - * This file manages the benchmark timer used by the RTEMS Timing Test - * Suite. Each measured time period is demarcated by calls to - * Timer_initialize() and Read_timer(). Read_timer() usually returns - * the number of microseconds since Timer_initialize() exitted. - * - * NOTE: It is important that the timer start/stop overhead be - * determined when porting or modifying this code. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef lint -static char _sccsid[] = "@(#)timer.c 08/20/96 1.5\n"; -#endif - -#include -#include - -#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) -#define TIMER_MAX_VALUE 0xffffffff - -extern unsigned32 mips_read_timer( void ); - -static rtems_boolean Timer_driver_Find_average_overhead; -static unsigned32 Timer_initial_value = 0; - -void Timer_initialize( void ) -{ - Timer_initial_value = mips_read_timer(); - /* - * Somehow start the timer - */ - - /* Timer on 4650 is always running */ -} - -/* - * The following controls the behavior of Read_timer(). - * - * AVG_OVEREHAD is the overhead for starting and stopping the timer. It - * is usually deducted from the number returned. - * - * LEAST_VALID is the lowest number this routine should trust. Numbers - * below this are "noise" and zero is returned. - */ - -#define AVG_OVERHEAD 8 /* It typically takes X.X microseconds */ - /* (Y countdowns) to start/stop the timer. */ - /* This value is in cycles. */ -#define LEAST_VALID 1 /* Don't trust a clicks value lower than this */ - -int Read_timer( void ) -{ - unsigned64 clicks; - unsigned32 total; - - /* - * Read the timer and see how many clicks it has been since we started. - */ - - clicks = mips_read_timer(); /* XXX: read some HW here */ - if (clicks < Timer_initial_value) - { - clicks += TIMER_MAX_VALUE; - } - clicks -= Timer_initial_value; - - /* - * Total is calculated by taking into account the number of timer overflow - * interrupts since the timer was initialized and clicks since the last - * interrupts. - */ -#if 0 /* leave total in number of cycles */ - total = clicks / CLOCKS_PER_MICROSECOND; -#else - total = clicks; -#endif - - if ( Timer_driver_Find_average_overhead == 1 ) - return total; /* in # cycles units */ - else { - if ( total < LEAST_VALID ) - return 0; /* below timer resolution */ - /* - * leave total in cycles - */ - return (total - AVG_OVERHEAD); - } -} - -/* - * Empty function call used in loops to measure basic cost of looping - * in Timing Test Suite. - */ - -rtems_status_code Empty_function( void ) -{ - return RTEMS_SUCCESSFUL; -} - -void Set_find_average_overhead( - rtems_boolean find_flag -) -{ - Timer_driver_Find_average_overhead = find_flag; -} - diff --git a/c/src/lib/libcpu/powerpc/README b/c/src/lib/libcpu/powerpc/README deleted file mode 100644 index 32e4aed60c..0000000000 --- a/c/src/lib/libcpu/powerpc/README +++ /dev/null @@ -1,13 +0,0 @@ -# -# $Id$ -# - -This hierarchy contains support routines for the various -PowerPC processors. - -Since these routines can differ amongst different members -of the PowerPC family, an entry per CPU type is provided. - -Currently only the PPC403 is supported. - -Andrew Bray 4/December/1995 diff --git a/c/src/lib/libcpu/powerpc/ppc403/README b/c/src/lib/libcpu/powerpc/ppc403/README deleted file mode 100644 index 528506d3dd..0000000000 --- a/c/src/lib/libcpu/powerpc/ppc403/README +++ /dev/null @@ -1,22 +0,0 @@ -# -# $Id$ -# - -Various non BSP dependant support routines. - -clock - Uses the 403 PIT (Programmable interval timer) to - generate RTEMS clock ticks. - -console - Uses the 403 Internal serial port to do RTEMS - console I/O. Not ALL members of the 403 family - have this. - -include - Currently empty - -timer - Uses the 403 timebase register for timing - tests. Other PowerPCs have slightly different - timebase register definitions. - -vectors - PowerPC 403 specific vector entry points. - Includes CPU dependant, application independant - handlers: alignment. diff --git a/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c b/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c deleted file mode 100644 index 068cf4f538..0000000000 --- a/c/src/lib/libcpu/powerpc/ppc403/clock/clock.c +++ /dev/null @@ -1,265 +0,0 @@ -/* clock.c - * - * This routine initializes the interval timer on the - * PowerPC 403 CPU. The tick frequency is specified by the bsp. - * - * Author: Andrew Bray - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/lib/libcpu/hppa1_1/clock/clock.c: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include - -#include /* for atexit() */ - -extern rtems_cpu_table Cpu_table; /* owned by BSP */ - -volatile rtems_unsigned32 Clock_driver_ticks; -static rtems_unsigned32 pit_value, tick_time; -static rtems_boolean auto_restart; - -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; - -static INLINE rtems_unsigned32 get_itimer(void) -{ - register rtems_unsigned32 rc; - - asm volatile ("mfspr %0, 0x3dd" : "=r" ((rc))); /* TBLO */ - - return rc; -} - -/* - * ISR Handler - */ - -rtems_isr -Clock_isr(rtems_vector_number vector) -{ - if (!auto_restart) - { - rtems_unsigned32 clicks_til_next_interrupt; - rtems_unsigned32 itimer_value; - - /* - * setup for next interrupt; making sure the new value is reasonably - * in the future.... in case we lost out on an interrupt somehow - */ - - itimer_value = get_itimer(); - tick_time += pit_value; - - /* - * how far away is next interrupt *really* - * It may be a long time; this subtraction works even if - * Clock_clicks_interrupt < Clock_clicks_low_order via - * the miracle of unsigned math. - */ - clicks_til_next_interrupt = tick_time - itimer_value; - - /* - * If it is too soon then bump it up. - * This should only happen if CPU_HPPA_CLICKS_PER_TICK is too small. - * But setting it low is useful for debug, so... - */ - - if (clicks_til_next_interrupt < 400) - { - tick_time = itimer_value + 1000; - clicks_til_next_interrupt = 1000; - /* XXX: count these! this should be rare */ - } - - /* - * If it is too late, that means we missed the interrupt somehow. - * Rather than wait 35-50s for a wrap, we just fudge it here. - */ - - if (clicks_til_next_interrupt > pit_value) - { - tick_time = itimer_value + 1000; - clicks_til_next_interrupt = 1000; - /* XXX: count these! this should never happen :-) */ - } - - asm volatile ("mtspr 0x3db, %0" :: "r" - (clicks_til_next_interrupt)); /* PIT */ - } - - asm volatile ( "mtspr 0x3d8, %0" :: "r" (0x08000000)); /* TSR */ - - Clock_driver_ticks++; - - rtems_clock_tick(); -} - -void Install_clock(rtems_isr_entry clock_isr) -{ - rtems_isr_entry previous_isr; - rtems_unsigned32 pvr, iocr; - - Clock_driver_ticks = 0; - - asm volatile ("mfdcr %0, 0xa0" : "=r" (iocr)); /* IOCR */ - iocr &= ~4; - iocr |= 4; /* Select external timer clock */ - asm volatile ("mtdcr 0xa0, %0" : "=r" (iocr) : "0" (iocr)); /* IOCR */ - - asm volatile ("mfspr %0, 0x11f" : "=r" ((pvr))); /* PVR */ - - if (((pvr & 0xffff0000) >> 16) != 0x0020) - return; /* Not a ppc403 */ - - if ((pvr & 0xff00) == 0x0000) /* 403GA */ - auto_restart = (pvr & 0x00f0) > 0x0000 ? 1 : 0; - else if ((pvr & 0xff00) == 0x0100) /* 403GB */ - auto_restart = 1; - - pit_value = BSP_Configuration.microseconds_per_tick * - Cpu_table.clicks_per_usec; - - if (BSP_Configuration.ticks_per_timeslice) - { - register rtems_unsigned32 tcr; - - /* - * initialize the interval here - * First tick is set to right amount of time in the future - * Future ticks will be incremented over last value set - * in order to provide consistent clicks in the face of - * interrupt overhead - */ - - rtems_interrupt_catch(clock_isr, PPC_IRQ_PIT, &previous_isr); - - asm volatile ("mtspr 0x3db, %0" : : "r" (pit_value)); /* PIT */ - - asm volatile ("mfspr %0, 0x3da" : "=r" ((tcr))); /* TCR */ - - tcr &= ~ 0x04400000; - - tcr |= (auto_restart ? 0x04400000 : 0x04000000); - - tick_time = get_itimer() + pit_value; - - asm volatile ("mtspr 0x3da, %0" : "=r" ((tcr)) : "0" ((tcr))); /* TCR */ - } - atexit(Clock_exit); -} - -void -ReInstall_clock(rtems_isr_entry new_clock_isr) -{ - rtems_isr_entry previous_isr; - rtems_unsigned32 isrlevel = 0; - - rtems_interrupt_disable(isrlevel); - - rtems_interrupt_catch(new_clock_isr, PPC_IRQ_PIT, &previous_isr); - - rtems_interrupt_enable(isrlevel); -} - - -/* - * Called via atexit() - * Remove the clock interrupt handler by setting handler to NULL - */ - -void -Clock_exit(void) -{ - if ( BSP_Configuration.ticks_per_timeslice ) - { - register rtems_unsigned32 tcr; - - asm volatile ("mfspr %0, 0x3da" : "=r" ((tcr))); /* TCR */ - - tcr &= ~ 0x04400000; - - asm volatile ("mtspr 0x3da, %0" : "=r" ((tcr)) : "0" ((tcr))); /* TCR */ - - (void) set_vector(0, PPC_IRQ_PIT, 1); - } - -} - -rtems_device_driver Clock_initialize( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - Install_clock( Clock_isr ); - - /* - * make major/minor avail to others such as shared memory driver - */ - - rtems_clock_major = major; - rtems_clock_minor = minor; - - return RTEMS_SUCCESSFUL; -} - -rtems_device_driver Clock_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - 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(PPC_IRQ_PIT); - } - else if (args->command == rtems_build_name('N', 'E', 'W', ' ')) - { - ReInstall_clock(args->buffer); - } - -done: - return RTEMS_SUCCESSFUL; -} - diff --git a/c/src/lib/libcpu/powerpc/ppc403/console/console.c b/c/src/lib/libcpu/powerpc/ppc403/console/console.c deleted file mode 100644 index 7a3b1b425a..0000000000 --- a/c/src/lib/libcpu/powerpc/ppc403/console/console.c +++ /dev/null @@ -1,387 +0,0 @@ -/* - * This file contains the PowerPC 403GA console IO package. - * - * Author: Andrew Bray - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/lib/libbsp/no_cpu/no_bsp/console/console.c: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#define NO_BSP_INIT - -#include -#include - -extern rtems_cpu_table Cpu_table; /* owned by BSP */ - -struct async { -/*-----------------------------------------------------------------------------+ -| Line Status Register. -+-----------------------------------------------------------------------------*/ - unsigned char SPLS; - unsigned char SPLSset; -#define LSRDataReady 0x80 -#define LSRFramingError 0x40 -#define LSROverrunError 0x20 -#define LSRParityError 0x10 -#define LSRBreakInterrupt 0x08 -#define LSRTxHoldEmpty 0x04 -#define LSRTxShiftEmpty 0x02 - -/*-----------------------------------------------------------------------------+ -| Handshake Status Register. -+-----------------------------------------------------------------------------*/ - unsigned char SPHS; - unsigned char SPHSset; -#define HSRDsr 0x80 -#define HSRCts 0x40 - -/*-----------------------------------------------------------------------------+ -| Baud rate divisor registers -+-----------------------------------------------------------------------------*/ - unsigned char BRDH; - unsigned char BRDL; - -/*-----------------------------------------------------------------------------+ -| Control Register. -+-----------------------------------------------------------------------------*/ - unsigned char SPCTL; -#define CRNormal 0x00 -#define CRLoopback 0x40 -#define CRAutoEcho 0x80 -#define CRDtr 0x20 -#define CRRts 0x10 -#define CRWordLength7 0x00 -#define CRWordLength8 0x08 -#define CRParityDisable 0x00 -#define CRParityEnable 0x04 -#define CREvenParity 0x00 -#define CROddParity 0x02 -#define CRStopBitsOne 0x00 -#define CRStopBitsTwo 0x01 -#define CRDisableDtrRts 0x00 - -/*-----------------------------------------------------------------------------+ -| Receiver Command Register. -+-----------------------------------------------------------------------------*/ - unsigned char SPRC; -#define RCRDisable 0x00 -#define RCREnable 0x80 -#define RCRIntDisable 0x00 -#define RCRIntEnabled 0x20 -#define RCRDMACh2 0x40 -#define RCRDMACh3 0x60 -#define RCRErrorInt 0x10 -#define RCRPauseEnable 0x08 - -/*-----------------------------------------------------------------------------+ -| Transmitter Command Register. -+-----------------------------------------------------------------------------*/ - unsigned char SPTC; -#define TCRDisable 0x00 -#define TCREnable 0x80 -#define TCRIntDisable 0x00 -#define TCRIntEnabled 0x20 -#define TCRDMACh2 0x40 -#define TCRDMACh3 0x60 -#define TCRTxEmpty 0x10 -#define TCRErrorInt 0x08 -#define TCRStopPause 0x04 -#define TCRBreakGen 0x02 - -/*-----------------------------------------------------------------------------+ -| Miscellanies defines. -+-----------------------------------------------------------------------------*/ - unsigned char SPTB; -#define SPRB SPTB -}; - -#define XOFFchar 0x13 -#define XONchar 0x11 - -typedef volatile struct async *pasync; -static const pasync port = (pasync)0x40000000; - -/* console_initialize - * - * This routine initializes the console IO driver. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * Return values: - */ - -rtems_device_driver console_initialize( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *arg -) -{ - rtems_status_code status; - register unsigned tmp; - - /* Initialise the serial port */ - asm volatile ("mfdcr %0, 0xa0" : "=r" (tmp)); /* IOCR */ - tmp &= ~3; - tmp |= (Cpu_table.serial_external_clock ? 2 : 0) | - (Cpu_table.serial_cts_rts ? 1 : 0); - asm volatile ("mtdcr 0xa0, %0" : "=r" (tmp) : "0" (tmp)); /* IOCR */ - port->SPLS = (LSRDataReady | LSRFramingError | LSROverrunError | - LSRParityError | LSRBreakInterrupt); - tmp = Cpu_table.serial_per_sec / Cpu_table.serial_rate; - tmp = ((tmp + 8) >> 4) - 1; - port->BRDL = tmp & 0x255; - port->BRDH = tmp >> 8; - port->SPCTL = (CRNormal | CRDtr | CRRts | CRWordLength8 | CRParityDisable | - CRStopBitsOne); - port->SPRC = (RCREnable | RCRIntDisable | RCRPauseEnable); - port->SPTC = (TCREnable | TCRIntDisable); - port->SPHS = (HSRDsr | HSRCts); - - status = rtems_io_register_name( - "/dev/console", - major, - (rtems_device_minor_number) 0 - ); - - if (status != RTEMS_SUCCESSFUL) - rtems_fatal_error_occurred(status); - - return RTEMS_SUCCESSFUL; -} - - -/* is_character_ready - * - * This routine returns TRUE if a character is available. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * Return values: - */ - -rtems_boolean is_character_ready( - char *ch -) -{ - unsigned char status; - - if ((status = port->SPLS) & LSRDataReady) - { - *ch = port->SPRB; - return(TRUE); - } - - /* Clean any dodgy status */ - if ((status & (LSRFramingError | LSROverrunError | LSRParityError | - LSRBreakInterrupt)) != 0) - { - port->SPLS = (LSRFramingError | LSROverrunError | LSRParityError | - LSRBreakInterrupt); - } - - return FALSE; -} - -/* inbyte - * - * This routine reads a character from the SOURCE. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * Return values: - * character read from SOURCE - */ - -char inbyte( void ) -{ - unsigned char status; - - while (1) - { - if ((status = port->SPLS) & LSRDataReady) - break; - - /* Clean any dodgy status */ - if ((status & (LSRFramingError | LSROverrunError | LSRParityError | - LSRBreakInterrupt)) != 0) - { - port->SPLS = (LSRFramingError | LSROverrunError | LSRParityError | - LSRBreakInterrupt); - } - } - - return port->SPRB; -} - -/* outbyte - * - * This routine transmits a character out the SOURCE. It may support - * XON/XOFF flow control. - * - * Input parameters: - * ch - character to be transmitted - * - * Output parameters: NONE - */ - -void outbyte( - char ch -) -{ - unsigned char status; - - while (port->SPHS) - port->SPHS = (HSRDsr | HSRCts); - - while (1) - { - status = port->SPLS; - - if (port->SPHS) - port->SPHS = (HSRDsr | HSRCts); - else if (status & LSRTxHoldEmpty) - break; - } - - if (Cpu_table.serial_xon_xoff) - while (is_character_ready(&status)) - { - if (status == XOFFchar) - do { - while (!is_character_ready(&status)); - } while (status != XONchar); - } - - port->SPTB = ch; -} - -/* - * Open entry point - */ - -rtems_device_driver console_open( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - return RTEMS_SUCCESSFUL; -} - -/* - * Close entry point - */ - -rtems_device_driver console_close( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - return RTEMS_SUCCESSFUL; -} - -/* - * read bytes from the serial port. We only have stdin. - */ - -rtems_device_driver console_read( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - rtems_libio_rw_args_t *rw_args; - char *buffer; - int maximum; - int count = 0; - - rw_args = (rtems_libio_rw_args_t *) arg; - - buffer = rw_args->buffer; - maximum = rw_args->count; - - for (count = 0; count < maximum; count++) { - buffer[ count ] = inbyte(); - if (buffer[ count ] == '\n' || buffer[ count ] == '\r') { - buffer[ count++ ] = '\n'; - buffer[ count ] = 0; - break; - } - } - - rw_args->bytes_moved = count; - return (count >= 0) ? RTEMS_SUCCESSFUL : RTEMS_UNSATISFIED; -} - -/* - * write bytes to the serial port. Stdout and stderr are the same. - */ - -rtems_device_driver console_write( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - int count; - int maximum; - rtems_libio_rw_args_t *rw_args; - char *buffer; - - rw_args = (rtems_libio_rw_args_t *) arg; - - buffer = rw_args->buffer; - maximum = rw_args->count; - - for (count = 0; count < maximum; count++) { - if ( buffer[ count ] == '\n') { - outbyte('\r'); - } - outbyte( buffer[ count ] ); - } - return maximum; -} - -/* - * IO Control entry point - */ - -rtems_device_driver console_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - return RTEMS_SUCCESSFUL; -} - diff --git a/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c b/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c deleted file mode 100644 index 4d2f4c0fd4..0000000000 --- a/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c +++ /dev/null @@ -1,98 +0,0 @@ -/* timer.c - * - * This file manages the interval timer on the PowerPC 403*. - * We shall use the bottom 32 bits of the timebase register, - * - * NOTE: It is important that the timer start/stop overhead be - * determined when porting or modifying this code. - * - * Author: Andrew Bray - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/lib/libcpu/hppa1_1/timer/timer.c: - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include - -extern rtems_cpu_table Cpu_table; /* owned by BSP */ - -static volatile rtems_unsigned32 Timer_starting; -static rtems_boolean Timer_driver_Find_average_overhead; - -/* - * This is so small that this code will be reproduced where needed. - */ -static INLINE rtems_unsigned32 get_itimer(void) -{ - rtems_unsigned32 ret; - - asm volatile ("mfspr %0, 0x3dd" : "=r" ((ret))); /* TBLO */ - - return ret; -} - -void Timer_initialize() -{ - rtems_unsigned32 iocr; - - asm volatile ("mfdcr %0, 0xa0" : "=r" (iocr)); /* IOCR */ - iocr &= ~4; - iocr |= 4; /* Select external timer clock */ - asm volatile ("mtdcr 0xa0, %0" : "=r" (iocr) : "0" (iocr)); /* IOCR */ - - Timer_starting = get_itimer(); -} - -int Read_timer() -{ - rtems_unsigned32 clicks; - rtems_unsigned32 total; - - clicks = get_itimer(); - - total = clicks - Timer_starting; - - if ( Timer_driver_Find_average_overhead == 1 ) - return total; /* in XXX microsecond units */ - - else { - if ( total < Cpu_table.timer_least_valid ) - return 0; /* below timer resolution */ - return (total - Cpu_table.timer_average_overhead); - } -} - -rtems_status_code Empty_function( void ) -{ - return RTEMS_SUCCESSFUL; -} - -void Set_find_average_overhead( - rtems_boolean find_flag -) -{ - Timer_driver_Find_average_overhead = find_flag; -} diff --git a/c/src/lib/libcpu/powerpc/ppc403/vectors/README b/c/src/lib/libcpu/powerpc/ppc403/vectors/README deleted file mode 100644 index 4081ae2525..0000000000 --- a/c/src/lib/libcpu/powerpc/ppc403/vectors/README +++ /dev/null @@ -1,25 +0,0 @@ -# -# $Id$ -# - -The location of the vectors file object is critical. - -From the comments at the head of vectors.s: - - The issue with this file is getting it loaded at the right place. - The first vector MUST be at address 0x????0100. - How this is achieved is dependant on the tool chain. - - However the basic mechanism for ELF assemblers is to create a - section called ".vectors", which will be loaded to an address - between 0x????0000 and 0x????0100 (inclusive) via a link script. - - The basic mechanism for XCOFF assemblers is to place it in the - normal text section, and arrange for this file to be located - at an appropriate position on the linker command line. - - The variable 'PPC_VECTOR_FILE_BASE' must be defined to be the - offset from 0x????0000 to the first location in the file. This - will usually be 0x0000 or 0x0100. - -Andrew Bray 18/8/1995 diff --git a/c/src/lib/libcpu/powerpc/ppc403/vectors/align_h.s b/c/src/lib/libcpu/powerpc/ppc403/vectors/align_h.s deleted file mode 100644 index 00266b87e9..0000000000 --- a/c/src/lib/libcpu/powerpc/ppc403/vectors/align_h.s +++ /dev/null @@ -1,433 +0,0 @@ -/* align_h.s 1.1 - 95/12/04 - * - * This file contains the assembly code for the PowerPC 403 - * alignment exception handler for RTEMS. - * - * Based upon IBM provided code with the following release: - * - * This source code has been made available to you by IBM on an AS-IS - * basis. Anyone receiving this source is licensed under IBM - * copyrights to use it in any way he or she deems fit, including - * copying it, modifying it, compiling it, and redistributing it either - * with or without modifications. No license under IBM patents or - * patent applications is to be implied by the copyright license. - * - * Any user of this software should understand that IBM cannot provide - * technical support for this software and will not be responsible for - * any consequences resulting from the use of this software. - * - * Any person who transfers this source code or any derivative work - * must include the IBM copyright notice, this paragraph, and the - * preceding two paragraphs in the transferred software. - * - * COPYRIGHT I B M CORPORATION 1995 - * LICENSED MATERIAL - PROGRAM PROPERTY OF I B M - * - * Modifications: - * - * Author: Andrew Bray - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - * $Id$ - */ - -#include "asm.h" -#include "bsp.h" - -.set CACHE_SIZE,16 # cache line size of 32 bytes -.set CACHE_SIZE_L2,4 # cache line size, log 2 - -.set Open_gpr0,0 -.set Open_gpr1,4 -.set Open_gpr2,8 -.set Open_gpr3,12 -.set Open_gpr4,16 -.set Open_gpr5,20 -.set Open_gpr6,24 -.set Open_gpr7,28 -.set Open_gpr8,32 -.set Open_gpr9,36 -.set Open_gpr10,40 -.set Open_gpr11,44 -.set Open_gpr12,48 -.set Open_gpr13,52 -.set Open_gpr14,56 -.set Open_gpr15,60 -.set Open_gpr16,64 -.set Open_gpr17,68 -.set Open_gpr18,72 -.set Open_gpr19,76 -.set Open_gpr20,80 -.set Open_gpr21,84 -.set Open_gpr22,88 -.set Open_gpr23,92 -.set Open_gpr24,96 -.set Open_gpr25,100 -.set Open_gpr26,104 -.set Open_gpr27,108 -.set Open_gpr28,112 -.set Open_gpr29,116 -.set Open_gpr30,120 -.set Open_gpr31,124 -.set Open_xer,128 -.set Open_lr,132 -.set Open_ctr,136 -.set Open_cr,140 -.set Open_srr2,144 -.set Open_srr3,148 -.set Open_srr0,152 -.set Open_srr1,156 - - -/* - * This code makes several assumptions for processing efficiency - * * General purpose registers are continuous in the image, beginning with - * Open_gpr0 - * * Hash table is highly dependent on opcodes - opcode changes *will* - * require rework of the instruction decode mechanism. - */ - - .text - .globl align_h - - .align CACHE_SIZE_L2 -align_h: - /*----------------------------------------------------------------------- - * Store GPRs in Open Reg save area - * Set up r2 as base reg, r1 pointing to Open Reg save area - *----------------------------------------------------------------------*/ - stmw r0,ALIGN_REGS(r0) - li r1,ALIGN_REGS - /*----------------------------------------------------------------------- - * Store special purpose registers in reg save area - *----------------------------------------------------------------------*/ - mfxer r7 - mflr r8 - mfcr r9 - mfctr r10 - stw r7,Open_xer(r1) - stw r8,Open_lr(r1) - stw r9,Open_cr(r1) - stw r10,Open_ctr(r1) - mfspr r7, srr2 /* SRR 2 */ - mfspr r8, srr3 /* SRR 3 */ - mfspr r9, srr0 /* SRR 0 */ - mfspr r10, srr1 /* SRR 1 */ - stw r7,Open_srr2(r1) - stw r8,Open_srr3(r1) - stw r9,Open_srr0(r1) - stw r10,Open_srr1(r1) - -/* Set up common registers */ - mfspr r5, dear /* DEAR: R5 is data exception address */ - lwz r9,Open_srr0(r1) /* get faulting instruction */ - addi r7,r9,4 /* bump instruction */ - stw r7,Open_srr0(r1) /* restore to image */ - lwz r9, 0(r9) /* retrieve actual instruction */ - rlwinm r6,r9,18,25,29 /* r6 is RA * 4 field from instruction */ - rlwinm r7,r9,6,26,31 /* r7 is primary opcode */ - bl ref_point /* establish addressibility */ -ref_point: - mflr r11 /* r11 is the anchor point for ref_point */ - addi r10, r7, -31 /* r10 = r7 - 31 */ - rlwinm r10,r10,2,2,31 /* r10 *= 4 */ - add r10, r10, r11 /* r10 += anchor point */ - lwz r10, primary_jt-ref_point(r10) - mtlr r10 - rlwinm r8,r9,13,25,29 /* r8 is RD * 4 */ - la r7,Open_gpr0(r1) /* r7 is address of GPR 0 in list */ - blr -primary_jt: - .long xform - .long lwz - .long lwzu - .long 0 - .long 0 - .long stw - .long stwu - .long 0 - .long 0 - .long lhz - .long lhzu - .long lha - .long lhau - .long sth - .long sthu - .long lmw - .long stmw -/* - * handlers - */ -/* - * xform instructions require an additional decode. Fortunately, a relatively - * simple hash step breaks the instructions out with no collisions - */ -xform: - rlwinm r7,r9,31,22,31 /* r7 is secondary opcode */ - rlwinm r10,r7,27,5,31 /* r10 = r7 >> 5 */ - add r10,r7,r10 /* r10 = r7 + r10 */ - rlwinm r10,r10,2,25,29 /* r10 = (r10 & 0x1F) * 4 */ - add r10,r10,r11 /* r10 += anchor point */ - lwz r10, secondary_ht-ref_point(r10) - mtlr r10 - la r7,Open_gpr0(r1) /* r7 is address of GPR 0 in list */ - rlwinm r8,r9,13,25,29 /* r8 is RD * 4 */ - blrl - -secondary_ht: - .long lhzux /* b 0 0x137 */ - .long lhax /* b 1 0x157 */ - .long lhaux /* b 2 0x177 */ - .long sthx /* b 3 0x197 */ - .long sthux /* b 4 0x1b7 */ - .long 0 /* b 5 */ - .long lwbrx /* b 6 0x216 */ - .long 0 /* b 7 */ - .long 0 /* b 8 */ - .long 0 /* b 9 */ - .long stwbrx /* b A 0x296 */ - .long 0 /* b B */ - .long 0 /* b C */ - .long 0 /* b D */ - .long lhbrx /* b E 0x316 */ - .long 0 /* b F */ - .long 0 /* b 10 */ - .long 0 /* b 11 */ - .long sthbrx /* b 12 0x396 */ - .long 0 /* b 13 */ - .long lwarx /* b 14 0x014 */ - .long dcbz /* b 15 0x3f6 */ - .long 0 /* b 16 */ - .long lwzx /* b 17 0x017 */ - .long lwzux /* b 18 0x037 */ - .long 0 /* b 19 */ - .long stwcx /* b 1A 0x096 */ - .long stwx /* b 1B 0x097 */ - .long stwux /* b 1C 0x0B7 */ - .long 0 /* b 1D */ - .long 0 /* b 1E */ - .long lhzx /* b 1F 0x117 */ - -/* - * for all handlers - * r4 - Addressability to interrupt context - * r5 - DEAR address (faulting data address) - * r6 - RA field * 4 - * r7 - Address of GPR 0 in image - * r8 - RD field * 4 - * r9 - Failing instruction - */ - -/* Load halfword algebraic with update */ -lhau: -/* Load halfword algebraic with update indexed */ -lhaux: - stwx r5,r7,r6 /* update RA with effective addr */ - -/* Load halfword algebraic */ -lha: -/* Load halfword algebraic indexed */ -lhax: - lswi r10,r5,2 /* load two bytes into r10 */ - srawi r10,r10,16 /* shift right 2 bytes, extending sign */ - stwx r10,r7,r8 /* update reg image */ - b align_complete /* return */ - -/* Load Half Word Byte-Reversed Indexed */ -lhbrx: - lswi r10,r5,2 /* load two bytes from DEAR into r10 */ - rlwinm r10,r10,0,0,15 /* mask off lower 2 bytes */ - stwbrx r10,r7,r8 /* store reversed in reg image */ - b align_complete /* return */ - -/* Load Half Word and Zero with Update */ -lhzu: -/* Load Half Word and Zero with Update Indexed */ -lhzux: - stwx r5,r7,r6 /* update RA with effective addr */ - -/* Load Half Word and Zero */ -lhz: -/* Load Half Word and Zero Indexed */ -lhzx: - lswi r10,r5,2 /* load two bytes from DEAR into r10 */ - rlwinm r10,r10,16,16,31 /* shift right 2 bytes, with zero fill */ - stwx r10,r7,r8 /* update reg image */ - b align_complete /* return */ - -/* - * Load Multiple Word - */ -lmw: - lwzx r9,r6,r7 /* R9 contains saved value of RA */ - addi r10,r7,32*4 /* r10 points to r31 in image + 4 */ - rlwinm r8,r8,30,2,31 /* r8 >>= 2 (recovers RT) */ - subfic r8,r8,32 /* r8 is reg count to load */ - mtctr r8 /* load counter */ - addi r8,r8,-1 /* r8-- */ - rlwinm r8,r8,2,2,31 /* r8 *= 4 */ - add r5,r5,r8 /* update DEAR to point to last reg */ -lwmloop: - lswi r11,r5,4 /* load r11 with 4 bytes from DEAR */ - stwu r11,-4(r10) /* load image and decrement pointer */ - addi r5,r5,-4 /* decrement effective address */ - bdnz lwmloop - stwx r9,r6,r7 /* restore RA (in case it was trashed) */ - b align_complete /* return */ - -/* - * Load Word and Reserve Indexed - */ -lwarx: - lswi r10,r5,4 /* load four bytes from DEAR into r10 */ - stwx r10,r7,r8 /* update reg image */ - rlwinm r5,r5,0,0,29 /* Word align address */ - lwarx r10,0,r5 /* Set reservation */ - b align_complete /* return */ - -/* - * Load Word Byte-Reversed Indexed - */ -lwbrx: - lswi r10,r5,4 /* load four bytes from DEAR into r10 */ - stwbrx r10,r7,r8 /* store reversed in reg image */ - b align_complete /* return */ - -/* Load Word and Zero with Update */ -lwzu: -/* Load Word and Zero with Update Indexed */ -lwzux: - stwx r5,r7,r6 /* update RA with effective addr */ - -/* Load Word and Zero */ -lwz: -/* Load Word and Zero Indexed */ -lwzx: - lswi r10,r5,4 /* load four bytes from DEAR into r10 */ - stwx r10,r7,r8 /* update reg image */ - b align_complete /* return */ - -/* Store instructions */ - -/* */ -/* Store Half Word and Update */ -sthu: -/* Store Half Word and Update Indexed */ -sthux: - stwx r5,r7,r6 /* Update RA with effective address */ - -/* Store Half Word */ -sth: -/* Store Half Word Indexed */ -sthx: - lwzx r10,r8,r7 /* retrieve source register value */ - rlwinm r10,r10,16,0,15 /* move two bytes to high end of reg */ - stswi r10,r5,2 /* store bytes to DEAR address */ - b align_complete /* return */ - -/* */ -/* Store Half Word Byte-Reversed Indexed */ -sthbrx: - lwbrx r10,r8,r7 /* retrieve src reg value byte reversed */ - stswi r10,r5,2 /* move two bytes to DEAR address */ - b align_complete /* return */ - -/* */ -/* Store Multiple Word */ -stmw: - addi r10,r7,32*4 /* r10 points to r31 in image + 4 */ - rlwinm r8,r8,30,2,31 /* r8 >>= 2 (recovers RT) */ - subfic r8,r8,32 /* r8 is reg count to load */ - mtctr r8 /* load counter */ - addi r8,r8,-1 /* r8-- */ - rlwinm r8,r8,2,2,31 /* r8 *= 4 */ - add r5,r5,r8 /* update DEAR to point to last reg */ -stmloop: - lwzu r11,-4(r10) /* get register value */ - stswi r11,r5,4 /* output to DEAR address */ - addi r5,r5,-4 /* decrement effective address */ - bdnz stmloop - b align_complete /* return */ - -/* */ -/* Store Word and Update */ -stwu: -/* Store Word and Update Indexed */ -stwux: - stwx r5,r7,r6 /* Update RA with effective address */ - -/* Store Word */ -stw: -/* Store Word Indexed */ -stwx: - lwzx r10,r8,r7 /* retrieve source register value */ - stswi r10,r5,4 /* store bytes to DEAR address */ - b align_complete /* return */ - -/* */ -/* Store Word Byte-Reversed Indexed */ -stwbrx: - lwbrx r10,r8,r7 /* retrieve src reg value byte reversed */ - stswi r10,r5,4 /* move two bytes to DEAR address */ - b align_complete /* return */ - -/* */ -/* Store Word Conditional Indexed */ -stwcx: - rlwinm r10,r5,0,0,29 /* r10 = word aligned DEAR */ - lwz r11,0(r10) /* save original value of store */ - stwcx. r11,r0,r10 /* attempt store to address */ - bne stwcx_moveon /* store failed, move on */ - stw r11,0(r10) /* repair damage */ - lwzx r9,r7,r8 /* get register value */ - stswi r10,r5,4 /* store bytes to DEAR address */ -stwcx_moveon: - mfcr r11 /* get condition reg */ - lwz r9,Open_cr(r1) /* get condition reg image */ - rlwimi r9,r11,0,0,2 /* insert 3 CR bits into cr image */ - lwz r11,Open_xer(r1) /* get XER reg */ - rlwimi r9,r11,29,2,2 /* insert XER SO bit into cr image */ - stw r9,Open_cr(r1) /* store cr image */ - b align_complete /* return */ - -/* */ -/* Data Cache Block Zero */ -dcbz: - rlwinm r5,r5,0,0,31-CACHE_SIZE_L2 - /* get address to nearest Cache line */ - addi r5,r5,-4 /* adjust by a word */ - addi r10,r0,CACHE_SIZE/4 /* set counter value */ - mtctr r10 - addi r11,r0,0 /* r11 = 0 */ -dcbz_loop: - stwu r11,4(r5) /* store a word and update EA */ - bdnz dcbz_loop - b align_complete /* return */ - -align_complete: - /*----------------------------------------------------------------------- - * Restore regs and return from the interrupt - *----------------------------------------------------------------------*/ - lmw r24,Open_xer+ALIGN_REGS(r0) - mtxer r24 - mtlr r25 - mtctr r26 - mtcrf 0xFF, r27 - mtspr srr2, r28 /* SRR 2 */ - mtspr srr3, r29 /* SRR 3 */ - mtspr srr0, r30 /* SRR 0 */ - mtspr srr1, r31 /* SRR 1 */ - lmw r0,Open_gpr0+ALIGN_REGS(r0) - rfi diff --git a/c/src/lib/libcpu/powerpc/ppc403/vectors/vectors.s b/c/src/lib/libcpu/powerpc/ppc403/vectors/vectors.s deleted file mode 100644 index b764207648..0000000000 --- a/c/src/lib/libcpu/powerpc/ppc403/vectors/vectors.s +++ /dev/null @@ -1,282 +0,0 @@ -/* vectors.s 1.1 - 95/12/04 - * - * This file contains the assembly code for the PowerPC 403 - * interrupt veneers for RTEMS. - * - * Author: Andrew Bray - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - */ - -/* - * The issue with this file is getting it loaded at the right place. - * The first vector MUST be at address 0x????0100. - * How this is achieved is dependant on the tool chain. - * - * However the basic mechanism for ELF assemblers is to create a - * section called ".vectors", which will be loaded to an address - * between 0x????0000 and 0x????0100 (inclusive) via a link script. - * - * The basic mechanism for XCOFF assemblers is to place it in the - * normal text section, and arrange for this file to be located - * at an appropriate position on the linker command line. - * - * The variable 'PPC_VECTOR_FILE_BASE' must be defined to be the - * offset from 0x????0000 to the first location in the file. This - * will usually be 0x0000 or 0x0100. - * - * $Id$ - */ - -#include "asm.h" - -#ifndef PPC_VECTOR_FILE_BASE -#error "PPC_VECTOR_FILE_BASE is not defined." -#endif - - /* Where this file will be loaded */ - .set file_base, PPC_VECTOR_FILE_BASE - - /* Offset to store reg 0 */ - - .set IP_LINK, 0 -#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27) - .set IP_0, (IP_LINK + 56) -#else - .set IP_0, (IP_LINK + 8) -#endif - .set IP_2, (IP_0 + 4) - - .set IP_3, (IP_2 + 4) - .set IP_4, (IP_3 + 4) - .set IP_5, (IP_4 + 4) - .set IP_6, (IP_5 + 4) - - .set IP_7, (IP_6 + 4) - .set IP_8, (IP_7 + 4) - .set IP_9, (IP_8 + 4) - .set IP_10, (IP_9 + 4) - - .set IP_11, (IP_10 + 4) - .set IP_12, (IP_11 + 4) - .set IP_13, (IP_12 + 4) - .set IP_28, (IP_13 + 4) - - .set IP_29, (IP_28 + 4) - .set IP_30, (IP_29 + 4) - .set IP_31, (IP_30 + 4) - .set IP_CR, (IP_31 + 4) - - .set IP_CTR, (IP_CR + 4) - .set IP_XER, (IP_CTR + 4) - .set IP_LR, (IP_XER + 4) - .set IP_PC, (IP_LR + 4) - - .set IP_MSR, (IP_PC + 4) - - .set IP_END, (IP_MSR + 16) - - /* Vector offsets */ - .set begin_vector,0x0000 - .set crit_vector,0x0100 - .set mach_vector,0x0200 - .set prot_vector,0x0300 - .set ext_vector,0x0500 - .set align_vector,0x0600 - .set prog_vector,0x0700 - .set sys_vector,0x0C00 - .set pit_vector,0x1000 - .set fit_vector,0x1010 - .set wadt_vector,0x1020 - .set debug_vector,0x2000 - -/* Go to the right section */ -#if PPC_ASM == PPC_ASM_ELF - .section .vectors,"awx",@progbits -#elif PPC_ASM == PPC_ASM_XCOFF - .csect .text[PR] -#endif - - PUBLIC_VAR (__vectors) -SYM (__vectors): - -/* Critical error handling */ - .org crit_vector - file_base -#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27) -#if (PPC_HAS_FPU) - stwu r1, -(20*4 + 18*8 + IP_END)(r1) -#else - stwu r1, -(20*4 + IP_END)(r1) -#endif -#else - stwu r1, -(IP_END)(r1) -#endif - stw r0, IP_0(r1) - - li r0, PPC_IRQ_CRIT - b PROC (_ISR_HandlerC) - -/* Machine check exception */ - .org mach_vector - file_base -#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27) -#if (PPC_HAS_FPU) - stwu r1, -(20*4 + 18*8 + IP_END)(r1) -#else - stwu r1, -(20*4 + IP_END)(r1) -#endif -#else - stwu r1, -(IP_END)(r1) -#endif - stw r0, IP_0(r1) - - li r0, PPC_IRQ_MCHECK - b PROC (_ISR_HandlerC) - -/* Protection exception */ - .org prot_vector - file_base -#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27) -#if (PPC_HAS_FPU) - stwu r1, -(20*4 + 18*8 + IP_END)(r1) -#else - stwu r1, -(20*4 + IP_END)(r1) -#endif -#else - stwu r1, -(IP_END)(r1) -#endif - stw r0, IP_0(r1) - - li r0, PPC_IRQ_PROTECT - b PROC (_ISR_Handler) - -/* External interrupt */ - .org ext_vector - file_base -#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27) -#if (PPC_HAS_FPU) - stwu r1, -(20*4 + 18*8 + IP_END)(r1) -#else - stwu r1, -(20*4 + IP_END)(r1) -#endif -#else - stwu r1, -(IP_END)(r1) -#endif - stw r0, IP_0(r1) - - li r0, PPC_IRQ_EXTERNAL - b PROC (_ISR_Handler) - -/* Align exception */ - .org align_vector - file_base - .extern align_h - b align_h - -/* Program exception */ - .org prog_vector - file_base -#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27) -#if (PPC_HAS_FPU) - stwu r1, -(20*4 + 18*8 + IP_END)(r1) -#else - stwu r1, -(20*4 + IP_END)(r1) -#endif -#else - stwu r1, -(IP_END)(r1) -#endif - stw r0, IP_0(r1) - - li r0, PPC_IRQ_PROGRAM - b PROC (_ISR_Handler) - -/* System call */ - .org sys_vector - file_base -#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27) -#if (PPC_HAS_FPU) - stwu r1, -(20*4 + 18*8 + IP_END)(r1) -#else - stwu r1, -(20*4 + IP_END)(r1) -#endif -#else - stwu r1, -(IP_END)(r1) -#endif - stw r0, IP_0(r1) - - li r0, PPC_IRQ_SCALL - b PROC (_ISR_Handler) - -/* PIT interrupt */ - .org pit_vector - file_base -#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27) -#if (PPC_HAS_FPU) - stwu r1, -(20*4 + 18*8 + IP_END)(r1) -#else - stwu r1, -(20*4 + IP_END)(r1) -#endif -#else - stwu r1, -(IP_END)(r1) -#endif - stw r0, IP_0(r1) - - li r0, PPC_IRQ_PIT - b PROC (_ISR_Handler) - -/* FIT interrupt */ - .org fit_vector - file_base -#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27) -#if (PPC_HAS_FPU) - stwu r1, -(20*4 + 18*8 + IP_END)(r1) -#else - stwu r1, -(20*4 + IP_END)(r1) -#endif -#else - stwu r1, -(IP_END)(r1) -#endif - stw r0, IP_0(r1) - - li r0, PPC_IRQ_FIT - b PROC (_ISR_Handler) - -/* Watchdog interrupt */ - .org wadt_vector - file_base -#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27) -#if (PPC_HAS_FPU) - stwu r1, -(20*4 + 18*8 + IP_END)(r1) -#else - stwu r1, -(20*4 + IP_END)(r1) -#endif -#else - stwu r1, -(IP_END)(r1) -#endif - stw r0, IP_0(r1) - - li r0, PPC_IRQ_WATCHDOG - b PROC (_ISR_HandlerC) - -/* Debug exception */ -debug: -#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27) -#if (PPC_HAS_FPU) - stwu r1, -(20*4 + 18*8 + IP_END)(r1) -#else - stwu r1, -(20*4 + IP_END)(r1) -#endif -#else - stwu r1, -(IP_END)(r1) -#endif - stw r0, IP_0(r1) - - li r0, PPC_IRQ_DEBUG - b PROC (_ISR_HandlerC) - -/* Debug exception */ - .org debug_vector - file_base - b debug diff --git a/c/src/lib/libcpu/sparc/include/erc32.h b/c/src/lib/libcpu/sparc/include/erc32.h deleted file mode 100644 index 12ec1d4230..0000000000 --- a/c/src/lib/libcpu/sparc/include/erc32.h +++ /dev/null @@ -1,523 +0,0 @@ -/* erc32.h - * - * This include file contains information pertaining to the ERC32. - * The ERC32 is a custom SPARC V7 implementation based on the Cypress - * 601/602 chipset. This CPU has a number of on-board peripherals and - * was developed by the European Space Agency to target space applications. - * - * 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 - * + General Purpose Timer - * + Real Time Clock - * + Watchdog Timer (so it can be disabled) - * + Control Register (so powerdown mode can be enabled) - * + Memory Control Register - * + Interrupt Control - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * Ported to ERC32 implementation of the SPARC by On-Line Applications - * Research Corporation (OAR) under contract to the European Space - * Agency (ESA). - * - * ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995. - * European Space Agency. - * - * $Id$ - */ - -#ifndef _INCLUDE_ERC32_h -#define _INCLUDE_ERC32_h - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Interrupt Sources - * - * The interrupt source numbers directly map to the trap type and to - * the bits used in the Interrupt Clear, Interrupt Force, Interrupt Mask, - * and the Interrupt Pending Registers. - */ - -#define ERC32_INTERRUPT_MASKED_ERRORS 1 -#define ERC32_INTERRUPT_EXTERNAL_1 2 -#define ERC32_INTERRUPT_EXTERNAL_2 3 -#define ERC32_INTERRUPT_UART_A_RX_TX 4 -#define ERC32_INTERRUPT_UART_B_RX_TX 5 -#define ERC32_INTERRUPT_CORRECTABLE_MEMORY_ERROR 6 -#define ERC32_INTERRUPT_UART_ERROR 7 -#define ERC32_INTERRUPT_DMA_ACCESS_ERROR 8 -#define ERC32_INTERRUPT_DMA_TIMEOUT 9 -#define ERC32_INTERRUPT_EXTERNAL_3 10 -#define ERC32_INTERRUPT_EXTERNAL_4 11 -#define ERC32_INTERRUPT_GENERAL_PURPOSE_TIMER 12 -#define ERC32_INTERRUPT_REAL_TIME_CLOCK 13 -#define ERC32_INTERRUPT_EXTERNAL_5 14 -#define ERC32_INTERRUPT_WATCHDOG_TIMEOUT 15 - -#ifndef ASM - -/* - * Trap Types for on-chip peripherals - * - * Source: Table 8 - Interrupt Trap Type and Default Priority Assignments - * - * NOTE: The priority level for each source corresponds to the least - * significant nibble of the trap type. - */ - -#define ERC32_TRAP_TYPE( _source ) SPARC_ASYNCHRONOUS_TRAP((_source) + 0x10) - -#define ERC32_TRAP_SOURCE( _trap ) ((_trap) - 0x10) - -#define ERC32_Is_MEC_Trap( _trap ) \ - ( (_trap) >= ERC32_TRAP_TYPE( ERC32_INTERRUPT_MASKED_ERRORS ) && \ - (_trap) <= ERC32_TRAP_TYPE( ERC32_INTERRUPT_WATCHDOG_TIMEOUT ) ) - -/* - * Structure for ERC32 memory mapped registers. - * - * Source: Section 3.25.2 - Register Address Map - * - * NOTE: There is only one of these structures per CPU, its base address - * is 0x01f80000, and the variable MEC is placed there by the - * linkcmds file. - */ - -typedef struct { - volatile unsigned32 Control; /* offset 0x00 */ - volatile unsigned32 Software_Reset; /* offset 0x04 */ - volatile unsigned32 Power_Down; /* offset 0x08 */ - volatile unsigned32 Unimplemented_0; /* offset 0x0c */ - volatile unsigned32 Memory_Configuration; /* offset 0x10 */ - volatile unsigned32 IO_Configuration; /* offset 0x14 */ - volatile unsigned32 Wait_State_Configuration; /* offset 0x18 */ - volatile unsigned32 Unimplemented_1; /* offset 0x1c */ - volatile unsigned32 Memory_Access_0; /* offset 0x20 */ - volatile unsigned32 Memory_Access_1; /* offset 0x24 */ - volatile unsigned32 Unimplemented_2[ 7 ]; /* offset 0x28 */ - volatile unsigned32 Interrupt_Shape; /* offset 0x44 */ - volatile unsigned32 Interrupt_Pending; /* offset 0x48 */ - volatile unsigned32 Interrupt_Mask; /* offset 0x4c */ - volatile unsigned32 Interrupt_Clear; /* offset 0x50 */ - volatile unsigned32 Interrupt_Force; /* offset 0x54 */ - volatile unsigned32 Unimplemented_3[ 2 ]; /* offset 0x58 */ - /* offset 0x60 */ - volatile unsigned32 Watchdog_Program_and_Timeout_Acknowledge; - volatile unsigned32 Watchdog_Trap_Door_Set; /* offset 0x64 */ - volatile unsigned32 Unimplemented_4[ 6 ]; /* offset 0x68 */ - volatile unsigned32 Real_Time_Clock_Counter; /* offset 0x80 */ - volatile unsigned32 Real_Time_Clock_Scalar; /* offset 0x84 */ - volatile unsigned32 General_Purpose_Timer_Counter; /* offset 0x88 */ - volatile unsigned32 General_Purpose_Timer_Scalar; /* offset 0x8c */ - volatile unsigned32 Unimplemented_5[ 2 ]; /* offset 0x90 */ - volatile unsigned32 Timer_Control; /* offset 0x98 */ - volatile unsigned32 Unimplemented_6; /* offset 0x9c */ - volatile unsigned32 System_Fault_Status; /* offset 0xa0 */ - volatile unsigned32 First_Failing_Address; /* offset 0xa4 */ - volatile unsigned32 First_Failing_Data; /* offset 0xa8 */ - volatile unsigned32 First_Failing_Syndrome_and_Check_Bits;/* offset 0xac */ - volatile unsigned32 Error_and_Reset_Status; /* offset 0xb0 */ - volatile unsigned32 Error_Mask; /* offset 0xb4 */ - volatile unsigned32 Unimplemented_7[ 2 ]; /* offset 0xb8 */ - volatile unsigned32 Debug_Control; /* offset 0xc0 */ - volatile unsigned32 Breakpoint; /* offset 0xc4 */ - volatile unsigned32 Watchpoint; /* offset 0xc8 */ - volatile unsigned32 Unimplemented_8; /* offset 0xcc */ - volatile unsigned32 Test_Control; /* offset 0xd0 */ - volatile unsigned32 Test_Data; /* offset 0xd4 */ - volatile unsigned32 Unimplemented_9[ 2 ]; /* offset 0xd8 */ - volatile unsigned32 UART_Channel_A; /* offset 0xe0 */ - volatile unsigned32 UART_Channel_B; /* offset 0xe4 */ - volatile unsigned32 UART_Status; /* offset 0xe8 */ -} ERC32_Register_Map; - -#endif - -/* - * The following constants are intended to be used ONLY in assembly - * language files. - * - * NOTE: The intended style of usage is to load the address of MEC - * into a register and then use these as displacements from - * that register. - */ - -#ifdef ASM - -#define ERC32_MEC_CONTROL_OFFSET 0x00 -#define ERC32_MEC_SOFTWARE_RESET_OFFSET 0x04 -#define ERC32_MEC_POWER_DOWN_OFFSET 0x08 -#define ERC32_MEC_UNIMPLEMENTED_0_OFFSET 0x0C -#define ERC32_MEC_MEMORY_CONFIGURATION_OFFSET 0x10 -#define ERC32_MEC_IO_CONFIGURATION_OFFSET 0x14 -#define ERC32_MEC_WAIT_STATE_CONFIGURATION_OFFSET 0x18 -#define ERC32_MEC_UNIMPLEMENTED_1_OFFSET 0x1C -#define ERC32_MEC_MEMORY_ACCESS_0_OFFSET 0x20 -#define ERC32_MEC_MEMORY_ACCESS_1_OFFSET 0x24 -#define ERC32_MEC_UNIMPLEMENTED_2_OFFSET 0x28 -#define ERC32_MEC_INTERRUPT_SHAPE_OFFSET 0x44 -#define ERC32_MEC_INTERRUPT_PENDING_OFFSET 0x48 -#define ERC32_MEC_INTERRUPT_MASK_OFFSET 0x4C -#define ERC32_MEC_INTERRUPT_CLEAR_OFFSET 0x50 -#define ERC32_MEC_INTERRUPT_FORCE_OFFSET 0x54 -#define ERC32_MEC_UNIMPLEMENTED_3_OFFSET 0x58 -#define ERC32_MEC_WATCHDOG_PROGRAM_AND_TIMEOUT_ACKNOWLEDGE_OFFSET 0x60 -#define ERC32_MEC_WATCHDOG_TRAP_DOOR_SET_OFFSET 0x64 -#define ERC32_MEC_UNIMPLEMENTED_4_OFFSET 0x6C -#define ERC32_MEC_REAL_TIME_CLOCK_COUNTER_OFFSET 0x80 -#define ERC32_MEC_REAL_TIME_CLOCK_SCALAR_OFFSET 0x84 -#define ERC32_MEC_GENERAL_PURPOSE_TIMER_COUNTER_OFFSET 0x88 -#define ERC32_MEC_GENERAL_PURPOSE_TIMER_SCALAR_OFFSET 0x8C -#define ERC32_MEC_UNIMPLEMENTED_5_OFFSET 0x90 -#define ERC32_MEC_TIMER_CONTROL_OFFSET 0x98 -#define ERC32_MEC_UNIMPLEMENTED_6_OFFSET 0x9C -#define ERC32_MEC_SYSTEM_FAULT_STATUS_OFFSET 0xA0 -#define ERC32_MEC_FIRST_FAILING_ADDRESS_OFFSET 0xA4 -#define ERC32_MEC_FIRST_FAILING_DATA_OFFSET 0xA8 -#define ERC32_MEC_FIRST_FAILING_SYNDROME_AND_CHECK_BITS_OFFSET 0xAC -#define ERC32_MEC_ERROR_AND_RESET_STATUS_OFFSET 0xB0 -#define ERC32_MEC_ERROR_MASK_OFFSET 0xB4 -#define ERC32_MEC_UNIMPLEMENTED_7_OFFSET 0xB8 -#define ERC32_MEC_DEBUG_CONTROL_OFFSET 0xC0 -#define ERC32_MEC_BREAKPOINT_OFFSET 0xC4 -#define ERC32_MEC_WATCHPOINT_OFFSET 0xC8 -#define ERC32_MEC_UNIMPLEMENTED_8_OFFSET 0xCC -#define ERC32_MEC_TEST_CONTROL_OFFSET 0xD0 -#define ERC32_MEC_TEST_DATA_OFFSET 0xD4 -#define ERC32_MEC_UNIMPLEMENTED_9_OFFSET 0xD8 -#define ERC32_MEC_UART_CHANNEL_A_OFFSET 0xE0 -#define ERC32_MEC_UART_CHANNEL_B_OFFSET 0xE4 -#define ERC32_MEC_UART_STATUS_OFFSET 0xE8 - -#endif - -/* - * The following defines the bits in the Configuration Register. - */ - -#define ERC32_CONFIGURATION_POWER_DOWN_MASK 0x00000001 -#define ERC32_CONFIGURATION_POWER_DOWN_ALLOWED 0x00000001 -#define ERC32_CONFIGURATION_POWER_DOWN_DISABLED 0x00000000 - -#define ERC32_CONFIGURATION_SOFTWARE_RESET_MASK 0x00000002 -#define ERC32_CONFIGURATION_SOFTWARE_RESET_ALLOWED 0x00000002 -#define ERC32_CONFIGURATION_SOFTWARE_RESET_DISABLED 0x00000000 - -#define ERC32_CONFIGURATION_BUS_TIMEOUT_MASK 0x00000004 -#define ERC32_CONFIGURATION_BUS_TIMEOUT_ENABLED 0x00000004 -#define ERC32_CONFIGURATION_BUS_TIMEOUT_DISABLED 0x00000000 - -#define ERC32_CONFIGURATION_ACCESS_PROTECTION_MASK 0x00000008 -#define ERC32_CONFIGURATION_ACCESS_PROTECTION_ENABLED 0x00000008 -#define ERC32_CONFIGURATION_ACCESS_PROTECTION_DISABLED 0x00000000 - - -/* - * The following defines the bits in the Memory Configuration Register. - */ - -#define ERC32_MEMORY_CONFIGURATION_RAM_SIZE_MASK 0x00001C00 -#define ERC32_MEMORY_CONFIGURATION_RAM_SIZE_256K ( 0 << 10 ) -#define ERC32_MEMORY_CONFIGURATION_RAM_SIZE_512K ( 1 << 10 ) -#define ERC32_MEMORY_CONFIGURATION_RAM_SIZE_1MB ( 2 << 10 ) -#define ERC32_MEMORY_CONFIGURATION_RAM_SIZE_2MB ( 3 << 10 ) -#define ERC32_MEMORY_CONFIGURATION_RAM_SIZE_4MB ( 4 << 10 ) -#define ERC32_MEMORY_CONFIGURATION_RAM_SIZE_8MB ( 5 << 10 ) -#define ERC32_MEMORY_CONFIGURATION_RAM_SIZE_16MB ( 6 << 10 ) -#define ERC32_MEMORY_CONFIGURATION_RAM_SIZE_32MB ( 7 << 10 ) - -#define ERC32_MEMORY_CONFIGURATION_PROM_SIZE_MASK 0x001C0000 -#define ERC32_MEMORY_CONFIGURATION_PROM_SIZE_4K ( 0 << 18 ) -#define ERC32_MEMORY_CONFIGURATION_PROM_SIZE_8K ( 1 << 18 ) -#define ERC32_MEMORY_CONFIGURATION_PROM_SIZE_16K ( 2 << 18 ) -#define ERC32_MEMORY_CONFIGURATION_PROM_SIZE_32K ( 3 << 18 ) -#define ERC32_MEMORY_CONFIGURATION_PROM_SIZE_64K ( 4 << 18 ) -#define ERC32_MEMORY_CONFIGURATION_PROM_SIZE_128K ( 5 << 18 ) -#define ERC32_MEMORY_CONFIGURATION_PROM_SIZE_256K ( 6 << 18 ) -#define ERC32_MEMORY_CONFIGURATION_PROM_SIZE_512K ( 7 << 18 ) - -/* - * The following defines the bits in the Timer Control Register. - */ - -#define ERC32_MEC_TIMER_CONTROL_GCR 0x00000001 /* 1 = reload at 0 */ - /* 0 = stop at 0 */ -#define ERC32_MEC_TIMER_CONTROL_GCL 0x00000002 /* 1 = load and start */ - /* 0 = no function */ -#define ERC32_MEC_TIMER_CONTROL_GSE 0x00000004 /* 1 = enable counting */ - /* 0 = hold scalar and counter */ -#define ERC32_MEC_TIMER_CONTROL_GSL 0x00000008 /* 1 = load scalar and start */ - /* 0 = no function */ - -#define ERC32_MEC_TIMER_CONTROL_RTCCR 0x00000100 /* 1 = reload at 0 */ - /* 0 = stop at 0 */ -#define ERC32_MEC_TIMER_CONTROL_RTCCL 0x00000200 /* 1 = load and start */ - /* 0 = no function */ -#define ERC32_MEC_TIMER_CONTROL_RTCSE 0x00000400 /* 1 = enable counting */ - /* 0 = hold scalar and counter */ -#define ERC32_MEC_TIMER_CONTROL_RTCSL 0x00000800 /* 1 = load scalar and start */ - /* 0 = no function */ - -/* - * The following defines the bits in the UART Control Registers. - * - * NOTE: Same bits in UART channels A and B. - */ - -#define ERC32_MEC_UART_CONTROL_RTD 0x000000FF /* RX/TX data */ -#define ERC32_MEC_UART_CONTROL_DR 0x00000100 /* RX Data Ready */ -#define ERC32_MEC_UART_CONTROL_TSE 0x00000200 /* TX Send Empty */ - /* (i.e. no data to send) */ -#define ERC32_MEC_UART_CONTROL_THE 0x00000400 /* TX Hold Empty */ - /* (i.e. ready to load) */ - -/* - * The following defines the bits in the MEC UART Control Registers. - */ - -#define ERC32_MEC_UART_STATUS_DR 0x00000001 /* Data Ready */ -#define ERC32_MEC_UART_STATUS_TSE 0x00000002 /* TX Send Register Empty */ -#define ERC32_MEC_UART_STATUS_THE 0x00000004 /* TX Hold Register Empty */ -#define ERC32_MEC_UART_STATUS_FE 0x00000010 /* RX Framing Error */ -#define ERC32_MEC_UART_STATUS_PE 0x00000020 /* RX Parity Error */ -#define ERC32_MEC_UART_STATUS_OE 0x00000040 /* RX Overrun Error */ -#define ERC32_MEC_UART_STATUS_CU 0x00000080 /* Clear Errors */ -#define ERC32_MEC_UART_STATUS_TXE 0x00000006 /* TX Empty */ - -#define ERC32_MEC_UART_STATUS_DRA (ERC32_MEC_UART_STATUS_DR << 0) -#define ERC32_MEC_UART_STATUS_TSEA (ERC32_MEC_UART_STATUS_TSE << 0) -#define ERC32_MEC_UART_STATUS_THEA (ERC32_MEC_UART_STATUS_THE << 0) -#define ERC32_MEC_UART_STATUS_FEA (ERC32_MEC_UART_STATUS_FE << 0) -#define ERC32_MEC_UART_STATUS_PEA (ERC32_MEC_UART_STATUS_PE << 0) -#define ERC32_MEC_UART_STATUS_OEA (ERC32_MEC_UART_STATUS_OE << 0) -#define ERC32_MEC_UART_STATUS_CUA (ERC32_MEC_UART_STATUS_CU << 0) -#define ERC32_MEC_UART_STATUS_TXEA (ERC32_MEC_UART_STATUS_TXE << 0) - -#define ERC32_MEC_UART_STATUS_DRB (ERC32_MEC_UART_STATUS_DR << 16) -#define ERC32_MEC_UART_STATUS_TSEB (ERC32_MEC_UART_STATUS_TSE << 16) -#define ERC32_MEC_UART_STATUS_THEB (ERC32_MEC_UART_STATUS_THE << 16) -#define ERC32_MEC_UART_STATUS_FEB (ERC32_MEC_UART_STATUS_FE << 16) -#define ERC32_MEC_UART_STATUS_PEB (ERC32_MEC_UART_STATUS_PE << 16) -#define ERC32_MEC_UART_STATUS_OEB (ERC32_MEC_UART_STATUS_OE << 16) -#define ERC32_MEC_UART_STATUS_CUB (ERC32_MEC_UART_STATUS_CU << 16) -#define ERC32_MEC_UART_STATUS_TXEB (ERC32_MEC_UART_STATUS_TXE << 16) - -#ifndef ASM - -/* - * This is used to manipulate the on-chip registers. - * - * The following symbol must be defined in the linkcmds file and point - * to the correct location. - */ - -extern ERC32_Register_Map ERC32_MEC; - -/* - * Macros to manipulate the Interrupt Clear, Interrupt Force, Interrupt Mask, - * and the Interrupt Pending Registers. - * - * NOTE: For operations which are not atomic, this code disables interrupts - * to guarantee there are no intervening accesses to the same register. - * The operations which read the register, modify the value and then - * store the result back are vulnerable. - */ - -#define ERC32_Clear_interrupt( _source ) \ - do { \ - ERC32_MEC.Interrupt_Clear = (1 << (_source)); \ - } while (0) - -#define ERC32_Force_interrupt( _source ) \ - do { \ - unsigned32 _level; \ - \ - sparc_disable_interrupts( _level ); \ - ERC32_MEC.Test_Control = ERC32_MEC.Test_Control | 0x80000; \ - sparc_enable_interrupts( _level ); \ - ERC32_MEC.Interrupt_Force = (1 << (_source)); \ - } while (0) - -#define ERC32_Is_interrupt_pending( _source ) \ - (ERC32_MEC.Interrupt_Pending & (1 << (_source))) - -#define ERC32_Is_interrupt_masked( _source ) \ - (ERC32_MEC.Interrupt_Masked & (1 << (_source))) - -#define ERC32_Mask_interrupt( _source ) \ - do { \ - unsigned32 _level; \ - \ - sparc_disable_interrupts( _level ); \ - ERC32_MEC.Interrupt_Mask |= (1 << (_source)); \ - sparc_enable_interrupts( _level ); \ - } while (0) - -#define ERC32_Unmask_interrupt( _source ) \ - do { \ - unsigned32 _level; \ - \ - sparc_disable_interrupts( _level ); \ - ERC32_MEC.Interrupt_Mask &= ~(1 << (_source)); \ - sparc_enable_interrupts( _level ); \ - } while (0) - -#define ERC32_Disable_interrupt( _source, _previous ) \ - do { \ - unsigned32 _level; \ - unsigned32 _mask = 1 << (_source); \ - \ - sparc_disable_interrupts( _level ); \ - (_previous) = ERC32_MEC.Interrupt_Mask; \ - ERC32_MEC.Interrupt_Mask = _previous | _mask; \ - sparc_enable_interrupts( _level ); \ - (_previous) &= ~_mask; \ - } while (0) - -#define ERC32_Restore_interrupt( _source, _previous ) \ - do { \ - unsigned32 _level; \ - unsigned32 _mask = 1 << (_source); \ - \ - sparc_disable_interrupts( _level ); \ - ERC32_MEC.Interrupt_Mask = \ - (ERC32_MEC.Interrupt_Mask & ~_mask) | (_previous); \ - sparc_enable_interrupts( _level ); \ - } while (0) - -/* - * The following macros attempt to hide the fact that the General Purpose - * Timer and Real Time Clock Timer share the Timer Control Register. Because - * the Timer Control Register is write only, we must mirror it in software - * and insure that writes to one timer do not alter the current settings - * and status of the other timer. - * - * This code promotes the view that the two timers are completely independent. - * By exclusively using the routines below to access the Timer Control - * Register, the application can view the system as having a General Purpose - * Timer Control Register and a Real Time Clock Timer Control Register - * rather than the single shared value. - * - * Each logical timer control register is organized as follows: - * - * D0 - Counter Reload - * 1 = reload counter at zero and restart - * 0 = stop counter at zero - * - * D1 - Counter Load - * 1 = load counter with preset value and restart - * 0 = no function - * - * D2 - Enable - * 1 = enable counting - * 0 = hold scaler and counter - * - * D2 - Scaler Load - * 1 = load scalar with preset value and restart - * 0 = no function - * - * To insure the management of the mirror is atomic, we disable interrupts - * around updates. - */ - -#define ERC32_MEC_TIMER_COUNTER_RELOAD_AT_ZERO 0x00000001 -#define ERC32_MEC_TIMER_COUNTER_STOP_AT_ZERO 0x00000000 - -#define ERC32_MEC_TIMER_COUNTER_LOAD_COUNTER 0x00000002 - -#define ERC32_MEC_TIMER_COUNTER_ENABLE_COUNTING 0x00000004 -#define ERC32_MEC_TIMER_COUNTER_DISABLE_COUNTING 0x00000000 - -#define ERC32_MEC_TIMER_COUNTER_LOAD_SCALER 0x00000008 - -#define ERC32_MEC_TIMER_COUNTER_RELOAD_MASK 0x00000001 -#define ERC32_MEC_TIMER_COUNTER_ENABLE_MASK 0x00000004 - -#define ERC32_MEC_TIMER_COUNTER_DEFINED_MASK 0x0000000F -#define ERC32_MEC_TIMER_COUNTER_CURRENT_MODE_MASK 0x00000005 - -extern unsigned32 _ERC32_MEC_Timer_Control_Mirror; - -/* - * This macros manipulate the General Purpose Timer portion of the - * Timer Control register and promote the view that there are actually - * two independent Timer Control Registers. - */ - -#define ERC32_MEC_Set_General_Purpose_Timer_Control( _value ) \ - do { \ - unsigned32 _level; \ - unsigned32 _control; \ - unsigned32 __value; \ - \ - __value = ((_value) & 0x0f); \ - sparc_disable_interrupts( _level ); \ - _control = _ERC32_MEC_Timer_Control_Mirror; \ - _control &= ERC32_MEC_TIMER_COUNTER_DEFINED_MASK << 8; \ - _ERC32_MEC_Timer_Control_Mirror = _control | _value; \ - _control &= (ERC32_MEC_TIMER_COUNTER_CURRENT_MODE_MASK << 8); \ - _control |= __value; \ - /* printf( "GPT 0x%x 0x%x 0x%x\n", _value, __value, _control ); */ \ - ERC32_MEC.Timer_Control = _control; \ - sparc_enable_interrupts( _level ); \ - } while ( 0 ) - -#define ERC32_MEC_Get_General_Purpose_Timer_Control( _value ) \ - do { \ - (_value) = _ERC32_MEC_Timer_Control_Mirror & 0xf; \ - } while ( 0 ) - -/* - * This macros manipulate the Real Timer Clock Timer portion of the - * Timer Control register and promote the view that there are actually - * two independent Timer Control Registers. - */ - -#define ERC32_MEC_Set_Real_Time_Clock_Timer_Control( _value ) \ - do { \ - unsigned32 _level; \ - unsigned32 _control; \ - unsigned32 __value; \ - \ - __value = ((_value) & 0x0f) << 8; \ - sparc_disable_interrupts( _level ); \ - _control = _ERC32_MEC_Timer_Control_Mirror; \ - _control &= ERC32_MEC_TIMER_COUNTER_DEFINED_MASK; \ - _ERC32_MEC_Timer_Control_Mirror = _control | _value; \ - _control &= ERC32_MEC_TIMER_COUNTER_CURRENT_MODE_MASK; \ - _control |= __value; \ - /* printf( "RTC 0x%x 0x%x 0x%x\n", _value, __value, _control ); */ \ - ERC32_MEC.Timer_Control = _control; \ - sparc_enable_interrupts( _level ); \ - } while ( 0 ) - -#define ERC32_MEC_Get_Real_Time_Clock_Timer_Control( _value ) \ - do { \ - (_value) = _ERC32_MEC_Timer_Control_Mirror & 0xf; \ - } while ( 0 ) - - -#endif /* !ASM */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_INCLUDE_ERC32_h */ -/* end of include file */ - diff --git a/c/src/libchip/shmdr/README b/c/src/libchip/shmdr/README deleted file mode 100644 index 5ed9e861b0..0000000000 --- a/c/src/libchip/shmdr/README +++ /dev/null @@ -1,9 +0,0 @@ -# -# $Id$ -# - -The mpci.h file provided in here is too simple for an MPCI with -multiple ways to get to a node. - -This version of the shm driver needs to be reorganized to follow -the better model of the Ada version. diff --git a/c/src/libchip/shmdr/addlq.c b/c/src/libchip/shmdr/addlq.c deleted file mode 100644 index 2c2529c834..0000000000 --- a/c/src/libchip/shmdr/addlq.c +++ /dev/null @@ -1,43 +0,0 @@ -/* void Shm_Locked_queue_Add( lq_cb, ecb ) - * - * This routine adds an envelope control block to a shared memory queue. - * - * Input parameters: - * lq_cb - pointer to a locked queue control block - * ecb - pointer to an envelope control block - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include "shm.h" - -void Shm_Locked_queue_Add( - Shm_Locked_queue_Control *lq_cb, - Shm_Envelope_control *ecb -) -{ - rtems_unsigned32 index; - - ecb->next = Shm_Locked_queue_End_of_list; - ecb->queue = lq_cb->owner; - index = ecb->index; - - Shm_Lock( lq_cb ); - if ( Shm_Convert(lq_cb->front) != Shm_Locked_queue_End_of_list ) - Shm_Envelopes[ Shm_Convert(lq_cb->rear) ].next = index; - else - lq_cb->front = index; - lq_cb->rear = index; - Shm_Unlock( lq_cb ); -} diff --git a/c/src/libchip/shmdr/cnvpkt.c b/c/src/libchip/shmdr/cnvpkt.c deleted file mode 100644 index 2c3a144167..0000000000 --- a/c/src/libchip/shmdr/cnvpkt.c +++ /dev/null @@ -1,42 +0,0 @@ -/* void Shm_Convert_packet( &packet ) - * - * This routine is the shared memory locked queue MPCI driver routine - * used to convert the RTEMS's information in a packet from non-native - * format to processor native format. - * - * Input parameters: - * packet - pointer to a packet - * - * Output parameters: - * *packet - packet in native format - * - * NOTE: Message buffers are not manipulated. - * Endian conversion is currently the only conversion. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include "shm.h" - -void Shm_Convert_packet( - rtems_packet_prefix *packet -) -{ - rtems_unsigned32 *pkt, i; - - pkt = (rtems_unsigned32 *) packet; - for ( i=RTEMS_MINIMUN_HETERO_CONVERSION ; i ; i--, pkt++ ) - *pkt = CPU_swap_u32( *pkt ); - - for ( i=packet->to_convert ; i ; i--, pkt++ ) - *pkt = CPU_swap_u32( *pkt ); -} diff --git a/c/src/libchip/shmdr/dump.c b/c/src/libchip/shmdr/dump.c deleted file mode 100644 index ca232025f2..0000000000 --- a/c/src/libchip/shmdr/dump.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This routine is invoked following a reset to report the statistics - * gathered during the previous execution. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include - -#include "shm.h" - -void -Shm_Print_statistics(void) -{ - rtems_unsigned32 ticks; - rtems_unsigned32 ticks_per_second; - rtems_unsigned32 seconds; - int packets_per_second; - - (void) rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &ticks ); - (void) rtems_clock_get( RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second ); - - seconds = ticks / ticks_per_second; - if ( seconds == 0 ) - seconds = 1; - - packets_per_second = Shm_Receive_message_count / seconds; - if ( (Shm_Receive_message_count % seconds) >= (seconds / 2) ) - packets_per_second++; - - printf( "\n\nSHMDR STATISTICS (NODE %d)\n", Shm_Local_node ); - printf( "TICKS SINCE BOOT = %d\n", ticks ); - printf( "TICKS PER SECOND = %d\n", ticks_per_second ); - printf( "ISRs=%d\n", Shm_Interrupt_count ); - printf( "RECV=%d\n", Shm_Receive_message_count ); - printf( "NULL=%d\n", Shm_Null_message_count ); - printf( "PKTS/SEC=%d\n", packets_per_second ); -} diff --git a/c/src/libchip/shmdr/fatal.c b/c/src/libchip/shmdr/fatal.c deleted file mode 100644 index b36ff8da41..0000000000 --- a/c/src/libchip/shmdr/fatal.c +++ /dev/null @@ -1,39 +0,0 @@ -/* void MPCI_Fatal( error ) - * - * This routine is the shared memory driver fatal error handler. - * - * Input parameters: - * error - fatal error code - * - * Output parameters: NEVER RETURNS - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include "shm.h" - -void MPCI_Fatal( - Internal_errors_Source source, - boolean is_internal, - rtems_unsigned32 error -) -{ - /* Eventually need to attempt to broadcast a K_FATAL message - * without checking for all possible errors (do not want to - * recurse). - * - * Also need to avoid using Shm_Node_statuses if the driver has not been - * initialized. - */ - - Shm_Local_node_status->error = Shm_Convert(error); -} diff --git a/c/src/libchip/shmdr/getlq.c b/c/src/libchip/shmdr/getlq.c deleted file mode 100644 index efc7b0996c..0000000000 --- a/c/src/libchip/shmdr/getlq.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Shm_Envelope_control *Shm_Locked_queue_Get( lq_cb ) - * - * This routine returns an envelope control block from a shared - * memory queue. - * - * Input parameters: - * lq_cb - pointer to a locked queue control block - * - * Output parameters: - * returns - pointer to an envelope control block - * - NULL if no envelopes on specified queue - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include - -Shm_Envelope_control *Shm_Locked_queue_Get( - Shm_Locked_queue_Control *lq_cb -) -{ - Shm_Envelope_control *tmp_ecb; - rtems_unsigned32 tmpfront; - - tmp_ecb = NULL; - Shm_Lock( lq_cb ); - - tmpfront = Shm_Convert(lq_cb->front); - if ( tmpfront != Shm_Locked_queue_End_of_list ) { - tmp_ecb = &Shm_Envelopes[ tmpfront ]; - lq_cb->front = tmp_ecb->next; - if ( tmp_ecb->next == Shm_Locked_queue_End_of_list ) - lq_cb->rear = Shm_Locked_queue_End_of_list; - tmp_ecb->next = Shm_Locked_queue_Not_on_list; - } - - Shm_Unlock( lq_cb ); - return( tmp_ecb ); -} diff --git a/c/src/libchip/shmdr/getpkt.c b/c/src/libchip/shmdr/getpkt.c deleted file mode 100644 index c80b3ed282..0000000000 --- a/c/src/libchip/shmdr/getpkt.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Shm_Get_packet - * - * This routine is the shared memory locked queue MPCI driver - * routine used to obtain an empty message packet. - * - * Input parameters: - * packet - address of pointer to packet - * - * Output parameters: - * *(cpb->get_packet) - address of allocated packet - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include "shm.h" - -rtems_mpci_entry Shm_Get_packet( - rtems_packet_prefix **packet -) -{ - Shm_Envelope_control *ecb; - - ecb = Shm_Allocate_envelope(); - if ( !ecb ) - rtems_fatal_error_occurred ( SHM_NO_FREE_PKTS ); - *packet = Shm_Envelope_control_to_packet_prefix_pointer( ecb ); -} diff --git a/c/src/libchip/shmdr/init.c b/c/src/libchip/shmdr/init.c deleted file mode 100644 index a553e4ff9b..0000000000 --- a/c/src/libchip/shmdr/init.c +++ /dev/null @@ -1,254 +0,0 @@ -/* Shm_Initialization - * - * This routine is the shared memory communications initerface - * driver initialization routine. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#define _SHM_INIT - -#include -#include - -#include /* memset() */ -#include /* malloc() */ -#include - -/* - * User extension to install MPCI_Fatal as a fatal error - * handler extension - */ - -rtems_extensions_table MPCI_Shm_extensions; - -rtems_mpci_entry Shm_Initialization( void ) - -{ - rtems_unsigned32 i, all_initialized; - rtems_unsigned32 interrupt_cause, interrupt_value; - void *interrupt_address; - Shm_Node_status_control *nscb; - rtems_unsigned32 extension_id; /* for installation of MPCI_Fatal */ - rtems_unsigned32 remaining_memory; -/* XXX these should use "public" methods to set their values.... */ - rtems_configuration_table *configuration = _Configuration_Table; - rtems_multiprocessing_table *mp_configuration = _Configuration_MP_table; - - Shm_RTEMS_Configuration = configuration; - Shm_RTEMS_MP_Configuration = mp_configuration; - - Shm_Local_node = Shm_RTEMS_MP_Configuration->node; - Shm_Maximum_nodes = Shm_RTEMS_MP_Configuration->maximum_nodes; - - Shm_Get_configuration( Shm_Local_node, &Shm_Configuration ); - - Shm_Interrupt_table = (Shm_Interrupt_information *) malloc( - sizeof(Shm_Interrupt_information) * (Shm_Maximum_nodes + 1) - ); - - assert( Shm_Interrupt_table ); - - - Shm_Receive_message_count = 0; - Shm_Null_message_count = 0; - Shm_Interrupt_count = 0; - - /* - * Set the Node Status indicators - */ - - Shm_Pending_initialization = - Shm_Convert(rtems_build_name( 'P', 'E', 'N', 'D' )); - Shm_Initialization_complete = - Shm_Convert(rtems_build_name( 'C', 'O', 'M', 'P' )); - Shm_Active_node = - Shm_Convert(rtems_build_name( 'A', 'C', 'T', 'V' )); - - /* - * Initialize the constants used by the Locked Queue code. - */ - - Shm_Locked_queue_End_of_list = Shm_Convert( 0xffffffff ); - Shm_Locked_queue_Not_on_list = Shm_Convert( 0xfffffffe ); - - /* - * Set the base addresses for the: - * + Node Status Table - * + Free Pool and Receive Queues - * + Envelopes - */ - - Shm_Node_statuses = (Shm_Node_status_control *) START_NS_CBS; - Shm_Locked_queues = (Shm_Locked_queue_Control *) START_LQ_CBS; - Shm_Envelopes = (Shm_Envelope_control *) START_ENVELOPES; - - /* - * Calculate the maximum number of envelopes which can be - * placed the remaining shared memory. - */ - - remaining_memory = - ((void *)Shm_Configuration->base + Shm_Configuration->length) - - ((void *)Shm_Envelopes); - - Shm_Maximum_envelopes = remaining_memory / sizeof( Shm_Envelope_control ); - Shm_Maximum_envelopes -= 1; - - /* - * Set the pointer to the receive queue for the local node. - * When we receive a node, we will get it from here before - * processing it. - */ - - Shm_Local_receive_queue = &Shm_Locked_queues[ Shm_Local_node ]; - Shm_Local_node_status = &Shm_Node_statuses[ Shm_Local_node ]; - - /* - * Convert local interrupt cause information into the - * neutral format so other nodes will be able to - * understand it. - */ - - interrupt_address = - (void *) Shm_Convert( (rtems_unsigned32)Shm_Configuration->Intr.address ); - interrupt_value = Shm_Convert( Shm_Configuration->Intr.value ); - interrupt_cause = Shm_Convert( Shm_Configuration->Intr.length ); - - if ( Shm_Configuration->poll_intr == POLLED_MODE ) Shm_setclockvec(); - else Shm_setvec(); - - if ( Shm_Is_master_node() ) { - - /* - * Zero out the shared memory area. - */ - - (void) memset( - (void *) Shm_Configuration->base, - 0, - Shm_Configuration->length - ); - - /* - * Initialize all of the locked queues (the free envelope - * pool and a receive queue per node) and set all of the - * node's status so they will be waiting to initialization - * to complete. - */ - - Shm_Locked_queue_Initialize( FREE_ENV_CB, FREE_ENV_POOL ); - - for ( i=SHM_FIRST_NODE ; i<=Shm_Maximum_nodes ; i++ ) { - Shm_Initialize_receive_queue( i ); - - Shm_Node_statuses[ i ].status = Shm_Pending_initialization; - Shm_Node_statuses[ i ].error = 0; - } - - /* - * Initialize all of the envelopes and place them in the - * free pool. - */ - - for ( i=0 ; iint_address = (rtems_unsigned32) interrupt_address; - Shm_Local_node_status->int_value = interrupt_value; - Shm_Local_node_status->int_length = interrupt_cause; - - Shm_Local_node_status->status = Shm_Initialization_complete; - - /* - * Loop until all nodes have completed initialization. - */ - - do { - all_initialized = 1; - - for ( i = SHM_FIRST_NODE ; i <= Shm_Maximum_nodes ; i++ ) - if ( Shm_Node_statuses[ i ].status != Shm_Initialization_complete ) - all_initialized = 0; - - } while ( all_initialized == 0 ); - - /* - * Tell the other nodes we think that the system is up. - */ - - for ( i = SHM_FIRST_NODE ; i <= Shm_Maximum_nodes ; i++ ) - Shm_Node_statuses[ i ].status = Shm_Active_node; - - } else { /* is not MASTER node */ - - /* - * Initialize the node status for the non-master nodes. - * Because the master node zeroes out memory, it is - * necessary for them to keep putting their values in - * the node status area until the master says they - * should become active. - */ - - Shm_Local_node_status->status = Shm_Pending_initialization; - - do { - - if ( Shm_Local_node_status->status == Shm_Pending_initialization ) { - - /* - * Initialize this node's interrupt information in the - * shared area so other nodes can interrupt us. - */ - - Shm_Local_node_status->int_address = - (rtems_unsigned32) interrupt_address; - Shm_Local_node_status->int_value = interrupt_value; - Shm_Local_node_status->int_length = interrupt_cause; - - Shm_Local_node_status->status = Shm_Initialization_complete; - } - } while ( Shm_Local_node_status->status != Shm_Active_node ) ; - } - - /* - * Initialize the Interrupt Information Table - */ - - for ( i = SHM_FIRST_NODE ; i <= Shm_Maximum_nodes ; i++ ) { - nscb = &Shm_Node_statuses[ i ]; - - Shm_Interrupt_table[i].address = Shm_Convert_address( - (void *)Shm_Convert(((vol_u32) nscb->int_address)) - ); - Shm_Interrupt_table[i].value = Shm_Convert( nscb->int_value ); - Shm_Interrupt_table[i].length = Shm_Convert( nscb->int_length ); - } - - MPCI_Shm_extensions.fatal = MPCI_Fatal; - - (void) rtems_extension_create( - rtems_build_name( 'M', 'P', 'E', 'X' ), - &MPCI_Shm_extensions, - &extension_id - ); -} diff --git a/c/src/libchip/shmdr/initlq.c b/c/src/libchip/shmdr/initlq.c deleted file mode 100644 index 3f44cf577d..0000000000 --- a/c/src/libchip/shmdr/initlq.c +++ /dev/null @@ -1,35 +0,0 @@ -/* void Shm_Locked_queue_Initialize( lq_cb, owner ) - * - * This routine initializes a shared memory locked queue. - * - * Input parameters: - * lq_cb - pointer to the control block of the queue - * to be initialized - * owner - unique idenitifier of who owns this queue. - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include "shm.h" - -void Shm_Locked_queue_Initialize( - Shm_Locked_queue_Control *lq_cb, - rtems_unsigned32 owner -) -{ - Shm_Initialize_lock( lq_cb ); - lq_cb->front = Shm_Locked_queue_End_of_list; - lq_cb->rear = Shm_Locked_queue_End_of_list; - lq_cb->owner = Shm_Convert(owner); -} diff --git a/c/src/libchip/shmdr/intr.c b/c/src/libchip/shmdr/intr.c deleted file mode 100644 index 8982103227..0000000000 --- a/c/src/libchip/shmdr/intr.c +++ /dev/null @@ -1,58 +0,0 @@ -/* void Shm_Cause_interrupt( node ) - * - * This routine is the shared memory driver routine which - * generates interrupts to other CPUs. - * - * It uses the information placed in the node status control - * block by each node. For example, when used with the Motorola - * MVME136 board, the MPCSR is used. - * - * Input parameters: - * node - destination of this packet (0 = broadcast) - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include "shm.h" - -void Shm_Cause_interrupt( - rtems_unsigned32 node -) -{ - Shm_Interrupt_information *intr; - rtems_unsigned8 *u8; - rtems_unsigned16 *u16; - rtems_unsigned32 *u32; - rtems_unsigned32 value; - - intr = &Shm_Interrupt_table[node]; - value = intr->value; - - switch ( intr->length ) { - case NO_INTERRUPT: - break; - case BYTE: - u8 = (rtems_unsigned8 *)intr->address; - *u8 = (rtems_unsigned8) value; - break; - case WORD: - u16 = (rtems_unsigned16 *)intr->address; - *u16 = (rtems_unsigned16) value; - break; - case LONG: - u32 = (rtems_unsigned32 *)intr->address; - *u32 = (rtems_unsigned32) value; - break; - } -} diff --git a/c/src/libchip/shmdr/mpci.h b/c/src/libchip/shmdr/mpci.h deleted file mode 100644 index c5646a61d7..0000000000 --- a/c/src/libchip/shmdr/mpci.h +++ /dev/null @@ -1,59 +0,0 @@ -/* mpci.h - * - * This include file contains all the renaming necessary to - * have an application use the Shared Memory Driver as its - * sole mechanism for MPCI. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __SHM_MPCI_h -#define __SHM_MPCI_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#define MPCI_Initialization( _configuration ) \ - Shm_Initialization( _configuration ) - -#define MPCI_Get_packet( _the_packet ) \ - Shm_Get_packet( _the_packet ) - -#define MPCI_Return_packet( _the_packet ) \ - Shm_Return_packet( _the_packet ) - -#define MPCI_Receive_packet( _the_packet ) \ - Shm_Receive_packet( _the_packet ) - -#define MPCI_Send_packet( _destination, _the_packet ) \ - Shm_Send_packet( _destination, _the_packet ) - -/* Unnecessary... mapped in shm.h -#define MPCI_Fatal( _the_error ) \ - Shm_Fatal( _the_error ) -*/ - -#define MPCI_Enable_statistics() - -#define MPCI_Print_statistics() \ - Shm_Print_statistics() - -/* no need to rename the MPCI_Table either */ - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/libchip/shmdr/mpisr.c b/c/src/libchip/shmdr/mpisr.c deleted file mode 100644 index 93ced3d351..0000000000 --- a/c/src/libchip/shmdr/mpisr.c +++ /dev/null @@ -1,23 +0,0 @@ -/* _Shm_isr() - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include "shm.h" - -rtems_isr Shm_isr( - rtems_vector_number vector -) -{ - Shm_Interrupt_count += 1; - rtems_multiprocessing_announce(); -} diff --git a/c/src/libchip/shmdr/poll.c b/c/src/libchip/shmdr/poll.c deleted file mode 100644 index 27361f08eb..0000000000 --- a/c/src/libchip/shmdr/poll.c +++ /dev/null @@ -1,53 +0,0 @@ -/* void Shm_Poll() - * - * This routine polls to see if a packet has arrived. If one - * has it informs the executive. It is typically called from - * the clock tick interrupt service routine. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include - -#include "shm.h" - -void Shm_Poll() -{ - rtems_unsigned32 tmpfront; - rtems_libio_ioctl_args_t args; - - /* invoke clock isr */ - args.iop = 0; - args.command = rtems_build_name('I', 'S', 'R', ' '); - (void) rtems_io_control(rtems_clock_major, rtems_clock_minor, &args); - - /* - * Check for msgs only if we are "up" - * This avoids a race condition where we may get a clock - * interrupt before MPCI has completed its init - */ - - if (_System_state_Is_up(_System_state_Get())) - { - tmpfront = Shm_Local_receive_queue->front; - if ( Shm_Convert(tmpfront) != Shm_Locked_queue_End_of_list ) - { - rtems_multiprocessing_announce(); - Shm_Interrupt_count++; - } - } -} diff --git a/c/src/libchip/shmdr/receive.c b/c/src/libchip/shmdr/receive.c deleted file mode 100644 index e094a2df6b..0000000000 --- a/c/src/libchip/shmdr/receive.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Shm_Receive_packet - * - * This routine is the shared memory locked queue MPCI driver routine - * used to obtain a packet containing a message from this node's - * receive queue. - * - * Input parameters: - * packet - address of a pointer to a packet - * - * Output parameters: - * *(rpb->packet) - pointer to packet - * NULL if no packet currently available - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include "shm.h" - -rtems_mpci_entry Shm_Receive_packet( - rtems_packet_prefix **packet -) -{ - Shm_Envelope_control *ecb; - - ecb = Shm_Locked_queue_Get( Shm_Local_receive_queue ); - if ( ecb ) { - *(packet) = Shm_Envelope_control_to_packet_prefix_pointer( ecb ); - if ( ecb->Preamble.endian != Shm_Configuration->format ) - Shm_Convert_packet( *packet ); - Shm_Receive_message_count++; - } else { - *(packet) = NULL; - Shm_Null_message_count++; - } -} diff --git a/c/src/libchip/shmdr/retpkt.c b/c/src/libchip/shmdr/retpkt.c deleted file mode 100644 index 973b84ab0d..0000000000 --- a/c/src/libchip/shmdr/retpkt.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Shm_Return_packet - * - * This routine is the shared memory locked queue MPCI driver - * routine used to return a message packet to a free envelope - * pool accessible by this node. - * - * Input parameters: - * packet - address of pointer to packet - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include "shm.h" - -rtems_mpci_entry Shm_Return_packet( - rtems_packet_prefix *packet -) -{ - Shm_Free_envelope( Shm_Packet_prefix_to_envelope_control_pointer(packet) ); -} - diff --git a/c/src/libchip/shmdr/send.c b/c/src/libchip/shmdr/send.c deleted file mode 100644 index 58a5bb93b9..0000000000 --- a/c/src/libchip/shmdr/send.c +++ /dev/null @@ -1,61 +0,0 @@ -/* Shm_Send_packet - * - * This routine is the shared memory driver locked queue write - * MPCI driver routine. This routine sends the specified packet - * to the destination specified by "node". A "node" value of - * zero designates that this packet is to be broadcasted. - * - * Input parameters: - * node - destination of this packet (0 = broadcast) - * packet - address of packet - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include "shm.h" - -struct pkt_cpy { - rtems_unsigned32 packet[MAX_PACKET_SIZE/4]; -}; - -rtems_mpci_entry Shm_Send_packet( - rtems_unsigned32 node, - rtems_packet_prefix *packet -) -{ - Shm_Envelope_control *ecb, *tmp_ecb; - rtems_unsigned32 nnum; - - ecb = Shm_Packet_prefix_to_envelope_control_pointer( packet ); - if ( node ) { - Shm_Build_preamble( ecb, node ); - Shm_Build_postamble( ecb ); - Shm_Append_to_receive_queue( node, ecb ); - (*Shm_Configuration->cause_intr)( node ); - } - else { - for( nnum = SHM_FIRST_NODE ; nnum <= Shm_Maximum_nodes ; nnum++ ) - if ( Shm_Local_node != nnum ) { - tmp_ecb = Shm_Allocate_envelope(); - if ( !tmp_ecb ) - rtems_fatal_error_occurred( SHM_NO_FREE_PKTS ); - Shm_Build_preamble( tmp_ecb, nnum ); - *((struct pkt_cpy *)tmp_ecb->packet) = *((struct pkt_cpy *)packet); - Shm_Build_postamble( tmp_ecb ); - Shm_Append_to_receive_queue( nnum, tmp_ecb ); - (*Shm_Configuration->cause_intr)( nnum ); - } - Shm_Free_envelope( ecb ); - } -} diff --git a/c/src/libchip/shmdr/setckvec.c b/c/src/libchip/shmdr/setckvec.c deleted file mode 100644 index bb3a19e1c8..0000000000 --- a/c/src/libchip/shmdr/setckvec.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Shm_setclockvec - * - * This routines installs the shared memory clock interrupt handler - * used when the driver is used in polling mode. - * - * INPUT PARAMETERS: NONE - * - * OUTPUT PARAMETERS: NONE - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include - -#include "shm.h" - -rtems_isr Shm_setclockvec() -{ - rtems_libio_ioctl_args_t args; - args.iop = 0; - args.command = rtems_build_name('N', 'E', 'W', ' '); - args.buffer = (void *) Shm_Poll; - - (void) rtems_io_control(rtems_clock_major, rtems_clock_minor, &args); -} diff --git a/c/src/libchip/shmdr/shm_driver.h b/c/src/libchip/shmdr/shm_driver.h deleted file mode 100644 index b110b1e8c1..0000000000 --- a/c/src/libchip/shmdr/shm_driver.h +++ /dev/null @@ -1,539 +0,0 @@ -/* shm.h - * - * This include file contains all the constants, structures, - * and global variables for this RTEMS based shared memory - * communications interface driver. - * - * Processor board dependencies are in other files. - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#ifndef __SHM_h -#define __SHM_h - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* The information contained in the Node Status, Locked Queue, and - * Envelope Control Blocks must be maintained in a NEUTRAL format. - * Currently the neutral format may be selected as big or little - * endian by simply defining either NEUTRAL_BIG or NEUTRAL_LITTLE. - * - * It is CRITICAL to note that the neutral format can ONLY be - * changed by modifying this file and recompiling the ENTIRE - * SHM driver including ALL target specific support files. - * - * The following table details the memory contents for the endian - * field of the Node Status Control Block in the various - * data format configurations (data is in hexadecimal): - * - * NEUTRAL NATIVE BYTE 0 BYTE 1 BYTE 2 BYTE 3 - * ======= ====== ====== ====== ====== ====== - * BIG BIG 00 00 00 01 - * BIG LITTLE 10 00 00 00 - * LITTLE BIG 01 00 00 00 - * LITTLE LITTLE 00 00 00 10 - * - * - * NOTE: XXX - * PORTABILITY OF LOCKING INSTRUCTIONS - * =================================== - * The locking mechanism described below is not - * general enough. Where the hardware supports - * it we should use "atomic swap" instructions - * so the values in the lock can be tailored to - * support a CPU with only weak atomic memory - * instructions. There are combinations of - * CPUs with inflexible atomic memory instructions - * which appear to be incompatible. For example, - * the SPARClite instruction uses a byte which is - * 0xFF when locked. The PA-RISC uses 1 to indicate - * locked and 0 when unlocked. These CPUs appear to - * have incompatible lock instructions. But - * they could be used in a heterogenous system - * with does not mix SPARCs and PA-RISCs. For - * example, the i386 and SPARC or i386 and SPARC - * could work together. The bottom line is that - * not every CPU will work together using this - * locking scheme. There are supposed to be - * algorithms to do this without hardware assist - * and one of these should be incorporated into - * the shared memory driver. - * - * The most flexible scheme using the instructions - * of the various CPUs for efficiency would be to use - * "atomic swaps" wherever possible. Make the lock - * and unlock configurable much like BIG vs LITTLE - * endian use of shared memory is now. The values - * of the lock could then reflect the "worst" - * CPU in a system. This still results in mixes - * of CPUs which are incompatible. - * - * The current locking mechanism is based upon the MC68020 - * "tas" instruction which is atomic. All ports to other CPUs - * comply with the restrictive placement of lock bit by this - * instruction. The lock bit is the most significant bit in a - * big-endian rtems_unsigned32. On other processors, the lock is - * typically implemented via an atomic swap or atomic modify - * bits type instruction. - */ - -#define NEUTRAL_BIG - -#ifdef NEUTRAL_BIG -#define SHM_BIG 0x00000001 -#define SHM_LITTLE 0x10000000 -#endif - -#ifdef NEUTRAL_LITTLE -#define SHM_BIG 0x01000000 -#define SHM_LITTLE 0x00000010 -#endif - -/* - * The following are the values used to fill in the lock field. Some CPUs - * are able to write only a single value into field. By making the - * lock and unlock values configurable, CPUs which support "atomic swap" - * instructions can generally be made to work in any heterogeneous - * configuration. However, it is possible for two CPUs to be incompatible - * in regards to the lock field values. This occurs when two CPUs - * which write only a single value to the field are used in a system - * but the two CPUs write different incompatible values. - * - * NOTE: The following is a first attempt at defining values which - * have a chance at working together. The m68k should use - * chk2 instead of tas to be less restrictive. Target endian - * problems (like the Force CPU386 which has (broken) big endian - * view of the VMEbus address space) are not addressed yet. - */ - -#if defined(i960) -#define SHM_LOCK_VALUE 0x00000080 -#define SHM_UNLOCK_VALUE 0 -#elif defined(m68k) -#define SHM_LOCK_VALUE 0x80000000 -#define SHM_UNLOCK_VALUE 0 -#define SHM_LOCK_VALUE 0x80000000 -#define SHM_UNLOCK_VALUE 0 -#elif defined(i386) -#define SHM_LOCK_VALUE 0x80000000 -#define SHM_UNLOCK_VALUE 0 -#elif defined(mips64orion) -#define SHM_LOCK_VALUE 0x80000000 -#define SHM_UNLOCK_VALUE 0 -#elif defined(hppa1_1) -#define SHM_LOCK_VALUE 0 -#define SHM_UNLOCK_VALUE 1 -#elif defined(unix) -#define SHM_LOCK_VALUE 0 -#define SHM_UNLOCK_VALUE 1 -#elif defined(no_cpu) /* for this values are irrelevant */ -#define SHM_LOCK_VALUE 1 -#define SHM_UNLOCK_VALUE 0 -#else -#error "shm.h - no SHM_LOCK_VALUE defined for this CPU architecture" -#endif - -#define Shm_Convert( value ) \ - ((Shm_Configuration->convert) ? \ - (*Shm_Configuration->convert)(value) : (value)) - -/* constants */ - -#define SHM_MASTER 1 /* master initialization node */ -#define SHM_FIRST_NODE 1 - -/* size constants */ - -#define KILOBYTE (1024) -#define MEGABYTE (1024*1024) - -/* inter-node interrupt values */ - -#define NO_INTERRUPT 0 /* used for polled nodes */ -#define BYTE 1 -#define WORD 2 -#define LONG 4 - -/* operational mode constants -- used in SHM Configuration Table */ -#define POLLED_MODE 0 -#define INTR_MODE 1 - -/* error codes */ - -#define NO_ERROR 0 -#define SHM_NO_FREE_PKTS 0xf0000 - -/* null pointers of different types */ - -#define NULL_ENV_CB ((Shm_Envelope_control *) 0) -#define NULL_CONVERT 0 - -/* - * size of stuff before preamble in envelope. - * It must be a constant since we will use it to generate MAX_PACKET_SIZE - */ - -#define SHM_ENVELOPE_PREFIX_OVERHEAD (4 * sizeof(vol_u32)) - -/* - * The following is adjusted so envelopes are MAX_ENVELOPE_SIZE bytes long. - * It must be >= RTEMS_MINIMUM_PACKET_SIZE in mppkt.h. - */ - -#ifndef MAX_ENVELOPE_SIZE -#define MAX_ENVELOPE_SIZE 0x180 -#endif - -#define MAX_PACKET_SIZE (MAX_ENVELOPE_SIZE - \ - SHM_ENVELOPE_PREFIX_OVERHEAD + \ - sizeof(Shm_Envelope_preamble) + \ - sizeof(Shm_Envelope_postamble)) - - -/* constants pertinent to Locked Queue routines */ - -#define LQ_UNLOCKED SHM_UNLOCK_VALUE -#define LQ_LOCKED SHM_LOCK_VALUE - -/* constants related to the Free Envelope Pool */ - -#define FREE_ENV_POOL 0 -#define FREE_ENV_CB (&Shm_Locked_queues[ FREE_ENV_POOL ]) - -/* The following are important when dealing with - * the shared memory communications interface area. - * - * NOTE: The starting address and length of the shared memory - * is defined in a system dependent file. - */ - -#define START_NS_CBS ((void *)Shm_Configuration->base) -#define START_LQ_CBS ((START_NS_CBS) + \ - ( (sizeof (Shm_Node_status_control)) * (Shm_Maximum_nodes + 1) ) ) -#define START_ENVELOPES ( ((void *) START_LQ_CBS) + \ - ( (sizeof (Shm_Locked_queue_Control)) * (Shm_Maximum_nodes + 1) ) ) -#define END_SHMCI_AREA ( (void *) START_ENVELOPES + \ - ( (sizeof (Shm_Envelope_control)) * Shm_Maximum_envelopes ) ) -#define END_SHARED_MEM (START_NS_CBS+Shm_Configuration->length) - -/* macros */ - -#define Shm_Is_master_node() \ - ( SHM_MASTER == Shm_Local_node ) - -#define Shm_Free_envelope( ecb ) \ - Shm_Locked_queue_Add( FREE_ENV_CB, (ecb) ) -#define Shm_Allocate_envelope() \ - Shm_Locked_queue_Get(FREE_ENV_CB) - -#define Shm_Initialize_receive_queue(node) \ - Shm_Locked_queue_Initialize( &Shm_Locked_queues[node], node ) - -#define Shm_Append_to_receive_queue(node, ecb) \ - Shm_Locked_queue_Add( &Shm_Locked_queues[node], (ecb) ) - -#define Shm_Envelope_control_to_packet_prefix_pointer(ecb) \ - ((void *)(ecb)->packet) - -#define Shm_Packet_prefix_to_envelope_control_pointer( pkt ) \ - ((Shm_Envelope_control *)((rtems_unsigned8 *)(pkt) - \ - (sizeof(Shm_Envelope_preamble) + SHM_ENVELOPE_PREFIX_OVERHEAD))) - -#define Shm_Build_preamble(ecb, node) \ - (ecb)->Preamble.endian = Shm_Configuration->format - -#define Shm_Build_postamble( ecb ) - -/* volatile types */ - -typedef volatile rtems_unsigned8 vol_u8; -typedef volatile rtems_unsigned32 vol_u32; - -/* shm control information */ - -struct shm_info { - vol_u32 not_currently_used_0; - vol_u32 not_currently_used_1; - vol_u32 not_currently_used_2; - vol_u32 not_currently_used_3; -}; - -typedef struct { - /*byte start_of_text;*/ - vol_u32 endian; - vol_u32 not_currently_used_0; - vol_u32 not_currently_used_1; - vol_u32 not_currently_used_2; -} Shm_Envelope_preamble; - -typedef struct { -} Shm_Envelope_postamble; - -/* WARNING! If you change this structure, don't forget to change - * SHM_ENVELOPE_PREFIX_OVERHEAD and - * Shm_Packet_prefix_to_envelope_control_pointer() above. - */ - -/* This comment block describes the contents of each field - * of the Envelope Control Block: - * - * next - The index of the next envelope on this queue. - * queue - The index of the queue this envelope is on. - * index - The index of this envelope. - * Preamble - Generic packet preamble. One day this structure - * could be enhanced to contain routing information. - * packet - RTEMS MPCI packet. Untouched by SHM Driver - * other than copying and format conversion as - * documented in the RTEMS User's Guide. - * Postamble - Generic packet postamble. One day this structure - * could be enhanced to contain checksum information. - */ - -typedef struct { - vol_u32 next; /* next envelope on queue */ - vol_u32 queue; /* queue on which this resides */ - vol_u32 index; /* index into array of envelopes*/ - vol_u32 pad0; /* insure the next one is aligned */ - Shm_Envelope_preamble Preamble; /* header information */ - vol_u8 packet[MAX_PACKET_SIZE]; /* RTEMS INFO */ - Shm_Envelope_postamble Postamble;/* trailer information */ -} Shm_Envelope_control; - -/* This comment block describes the contents of each field - * of the Locked Queue Control Block: - * - * lock - Lock used to insure mutually exclusive access. - * front - Index of first envelope on queue. This field - * is used to remove head of queue (receive). - * rear - Index of last envelope on queue. This field - * is used to add evelope to queue (send). - * owner - The node number of the recipient (owning) node. - * RTEMS does not use the node number zero (0). - * The zero node is used by the SHM Driver for the - * Free Envelope Queue shared by all nodes. - */ - -typedef struct { - vol_u32 lock; /* lock field for this queue */ - vol_u32 front; /* first envelope on queue */ - vol_u32 rear; /* last envelope on queue */ - vol_u32 owner; /* receiving (i.e. owning) node */ -} Shm_Locked_queue_Control; - -/* This comment block describes the contents of each field - * of the Node Status Control Block: - * - * status - Node status. Current values are Pending Initialization, - * Initialization Complete, and Active Node. Other values - * could be added to enhance fault tolerance. - * error - Zero if the node has not failed. Otherwise, - * this field contains a status indicating the - * failure reason. - * int_address, int_value, and int_length - * - These field are the Interrupt Information table - * for this node in neutral format. This is how - * each node knows how to generate interrupts. - */ - -typedef struct { - vol_u32 status; /* node status information */ - vol_u32 error; /* fatal error code */ - vol_u32 int_address; /* write here for interrupt */ - vol_u32 int_value; /* this value causes interrupt */ - vol_u32 int_length; /* for this length (0,1,2,4) */ - vol_u32 not_currently_used_0; - vol_u32 not_currently_used_1; - vol_u32 not_currently_used_2; -} Shm_Node_status_control; - -/* This comment block describes the contents of each field - * of the Interrupt Information Table. This table describes - * how another node can generate an interrupt to this node. - * This information is target board dependent. If the - * SHM Driver is in POLLED_MODE, then all fields should - * be initialized to NO_INTERRUPT. - * - * address - The address to which another node should - * write to cause an interrupt. - * value - The value which must be written - * length - The size of the value to write. Valid - * values are BYTE, WORD, and LONG. - * - * NOTE: The Node Status Control Block contains this - * information in neutral format and not in a - * structure to avoid potential alignment problems. - */ - -typedef struct { - vol_u32 *address; /* write here for interrupt */ - vol_u32 value; /* this value causes interrupt */ - vol_u32 length; /* for this length (0,1,2,4) */ -} Shm_Interrupt_information; - -/* SHM Configuration Table - * - * This comment block describes the contents of each field - * of the SHM Configuration Table. - * - * base - The base address of the shared memory. This - * address may be specific to this node. - * length - The length of the shared memory in bytes. - * format - The natural format for rtems_unsigned32's in the - * shared memory. Valid values are currently - * only SHM_LITTLE and SHM_BIG. - * convert - The address of the routine which converts - * between neutral and local format. - * poll_intr - The operational mode of the driver. Some - * target boards may not provide hardware for - * an interprocessor interrupt. If POLLED_MODE - * is selected, the SHM driver will install a - * wrapper around the Clock_isr() to poll for - * incoming packets. Throughput is dependent - * on the time between clock interrupts. - * Valid values are POLLED_MODE and INTR_MODE. - * cause_intr - This is the address of the routine used to - * write to a particular address and cause an - * interrupt on another node. This routine - * may need to be target dependent if something - * other than a normal write from C does not work. - * Intr - This structure describes the operation required - * to cause an interrupt to this node. The actual - * contents of this structure are described above. - */ - -struct shm_config_info { - vol_u32 *base; /* base address of SHM */ - vol_u32 length; /* length (in bytes) of SHM */ - vol_u32 format; /* SHM is big or little endian */ - vol_u32 (*convert)();/* neutral conversion routine */ - vol_u32 poll_intr;/* POLLED or INTR driven mode */ - void (*cause_intr)( rtems_unsigned32 ); - Shm_Interrupt_information Intr; /* cause intr information */ -}; - -typedef struct shm_config_info shm_config_table; - -/* global variables */ - -#ifdef _SHM_INIT -#define SHM_EXTERN -#else -#define SHM_EXTERN extern -#endif - -SHM_EXTERN shm_config_table *Shm_Configuration; -SHM_EXTERN Shm_Interrupt_information *Shm_Interrupt_table; -SHM_EXTERN Shm_Node_status_control *Shm_Node_statuses; -SHM_EXTERN Shm_Locked_queue_Control *Shm_Locked_queues; -SHM_EXTERN Shm_Envelope_control *Shm_Envelopes; -SHM_EXTERN rtems_configuration_table *Shm_RTEMS_Configuration; -SHM_EXTERN rtems_multiprocessing_table *Shm_RTEMS_MP_Configuration; -SHM_EXTERN rtems_unsigned32 Shm_Receive_message_count; -SHM_EXTERN rtems_unsigned32 Shm_Null_message_count; -SHM_EXTERN rtems_unsigned32 Shm_Interrupt_count; -SHM_EXTERN rtems_unsigned32 Shm_Local_node; -SHM_EXTERN Shm_Locked_queue_Control *Shm_Local_receive_queue; -SHM_EXTERN Shm_Node_status_control *Shm_Local_node_status; -SHM_EXTERN rtems_unsigned32 Shm_isrstat; - /* reported by shmdr */ - -SHM_EXTERN rtems_unsigned32 Shm_Pending_initialization; -SHM_EXTERN rtems_unsigned32 Shm_Initialization_complete; -SHM_EXTERN rtems_unsigned32 Shm_Active_node; - -SHM_EXTERN rtems_unsigned32 Shm_Maximum_nodes; -SHM_EXTERN rtems_unsigned32 Shm_Maximum_envelopes; - -SHM_EXTERN rtems_unsigned32 Shm_Locked_queue_End_of_list; -SHM_EXTERN rtems_unsigned32 Shm_Locked_queue_Not_on_list; - -/* functions */ - -/* locked queue routines */ -void Shm_Locked_queue_Add( - Shm_Locked_queue_Control *, Shm_Envelope_control * ); -Shm_Envelope_control *Shm_Locked_queue_Get( Shm_Locked_queue_Control * ); -void Shm_Locked_queue_Initialize( - Shm_Locked_queue_Control *, rtems_unsigned32 ); - /* Shm_Initialize_lock is CPU dependent */ - /* Shm_Lock is CPU dependent */ - /* Shm_Unlock is CPU dependent */ - -/* portable routines */ -void Init_env_pool(); -void Shm_Print_statistics( void ); -void MPCI_Fatal( Internal_errors_Source, boolean, rtems_unsigned32 ); -rtems_task Shm_Cause_interrupt( rtems_unsigned32 ); -void Shm_Poll(); -void Shm_setclockvec(); -void Shm_Convert_packet( rtems_packet_prefix * ); - -/* CPU specific routines are inlined in shmcpu.h */ - -/* target specific routines */ -void *Shm_Convert_address( void * ); -void Shm_Get_configuration( rtems_unsigned32, shm_config_table ** ); -void Shm_isr(); -void Shm_setvec( void ); - -void Shm_Initialize_lock( Shm_Locked_queue_Control * ); -void Shm_Lock( Shm_Locked_queue_Control * ); -void Shm_Unlock( Shm_Locked_queue_Control * ); - -/* MPCI entry points */ -rtems_mpci_entry Shm_Get_packet( - rtems_packet_prefix ** -); - -rtems_mpci_entry Shm_Initialization( void ); - -rtems_mpci_entry Shm_Receive_packet( - rtems_packet_prefix ** -); - -rtems_mpci_entry Shm_Return_packet( - rtems_packet_prefix * -); - -rtems_mpci_entry Shm_Send_packet( - rtems_unsigned32, - rtems_packet_prefix * -); - -extern rtems_mpci_table MPCI_table; - -#ifdef _SHM_INIT - -/* multiprocessor communications interface (MPCI) table */ - -rtems_mpci_table MPCI_table = { - 100000, /* default timeout value in ticks */ - MAX_PACKET_SIZE, /* maximum packet size */ - Shm_Initialization, /* initialization procedure */ - Shm_Get_packet, /* get packet procedure */ - Shm_Return_packet, /* return packet procedure */ - Shm_Send_packet, /* packet send procedure */ - Shm_Receive_packet /* packet receive procedure */ -}; - -#endif - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/optman/rtems/no-dpmem.c b/c/src/optman/rtems/no-dpmem.c deleted file mode 100644 index 11f2641feb..0000000000 --- a/c/src/optman/rtems/no-dpmem.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Dual Port Memory Manager - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include -#include -#include - -#include -#include -#include - -void _Dual_ported_memory_Manager_initialization( - unsigned32 maximum_ports -) -{ -} - -rtems_status_code rtems_port_create( - rtems_name name, - void *internal_start, - void *external_start, - unsigned32 length, - Objects_Id *id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_port_ident( - rtems_name name, - Objects_Id *id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_port_delete( - Objects_Id id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_port_internal_to_external( - Objects_Id id, - void *internal, - void **external -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_port_external_to_internal( - Objects_Id id, - void *external, - void **internal -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} diff --git a/c/src/optman/rtems/no-event.c b/c/src/optman/rtems/no-event.c deleted file mode 100644 index 4eb984c011..0000000000 --- a/c/src/optman/rtems/no-event.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Event Manager - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void _Event_Manager_initialization( void ) -{ -} - -rtems_status_code rtems_event_send( - Objects_Id id, - rtems_event_set event_in -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_event_receive( - rtems_event_set event_in, - rtems_option option_set, - rtems_interval ticks, - rtems_event_set *event_out -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - diff --git a/c/src/optman/rtems/no-mp.c b/c/src/optman/rtems/no-mp.c deleted file mode 100644 index e2de70e72c..0000000000 --- a/c/src/optman/rtems/no-mp.c +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Multiprocessing Manager - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void _Multiprocessing_Manager_initialization ( void ) -{ -} - -void rtems_multiprocessing_announce ( void ) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); -} - -void _MPCI_Handler_initialization( - MPCI_Control *users_mpci_table, - unsigned32 timeout_status -) -{ -} - -void _MPCI_Create_server( void ) -{ -} - -void _MPCI_Initialization ( void ) -{ -} - -void _MPCI_Register_packet_processor( - MP_packet_Classes the_class, - MPCI_Packet_processor the_packet_processor - -) -{ -} - -MP_packet_Prefix *_MPCI_Get_packet ( void ) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return NULL; -} - -void _MPCI_Return_packet ( - MP_packet_Prefix *the_packet -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); -} - -void _MPCI_Send_process_packet ( - unsigned32 destination, - MP_packet_Prefix *the_packet -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); -} - -unsigned32 _MPCI_Send_request_packet ( - unsigned32 destination, - MP_packet_Prefix *the_packet, - States_Control extra_state -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return 0; -} - -void _MPCI_Send_response_packet ( - unsigned32 destination, - MP_packet_Prefix *the_packet -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); -} - -MP_packet_Prefix *_MPCI_Receive_packet ( void ) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return NULL; -} - -Thread_Control *_MPCI_Process_response ( - MP_packet_Prefix *the_packet -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return NULL; -} - -Thread _MPCI_Receive_server( - unsigned32 ignore -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); -} - -void _MPCI_Announce ( void ) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); -} - - -void _MPCI_Internal_packets_Send_process_packet ( - MPCI_Internal_Remote_operations operation -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); -} - -void _MPCI_Internal_packets_Process_packet ( - MP_packet_Prefix *the_packet_prefix -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); -} - -MPCI_Internal_packet *_MPCI_Internal_packets_Get_packet ( void ) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return NULL; -} - -/* end of file */ diff --git a/c/src/optman/rtems/no-msg.c b/c/src/optman/rtems/no-msg.c deleted file mode 100644 index 6a5b84652a..0000000000 --- a/c/src/optman/rtems/no-msg.c +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Message Queue Manager - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void _Message_queue_Manager_initialization( - unsigned32 maximum_message_queues -) -{ -} - -rtems_status_code rtems_message_queue_create( - rtems_name name, - unsigned32 count, - unsigned32 max_message_size, - rtems_attribute attribute_set, - Objects_Id *id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_message_queue_ident( - rtems_name name, - unsigned32 node, - Objects_Id *id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_message_queue_delete( - Objects_Id id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_message_queue_send( - Objects_Id id, - void *buffer, - unsigned32 size -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_message_queue_urgent( - Objects_Id id, - void *buffer, - unsigned32 size -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_message_queue_broadcast( - Objects_Id id, - void *buffer, - unsigned32 size, - unsigned32 *count -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_message_queue_receive( - Objects_Id id, - void *buffer, - unsigned32 *size_p, - unsigned32 option_set, - rtems_interval timeout -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_message_queue_flush( - Objects_Id id, - unsigned32 *count -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -unsigned32 _Message_queue_Flush_support( - Message_queue_Control *the_message_queue -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; - return 0; -} - -boolean _Message_queue_Seize( - Message_queue_Control *the_message_queue, - rtems_option option_set, - void *buffer, - unsigned32 *size_p -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; - _Thread_Executing->Wait.return_code = RTEMS_UNSATISFIED; - return TRUE; -} - -rtems_status_code _Message_queue_Submit( - Objects_Id id, - void *buffer, - unsigned32 size, - Message_queue_Submit_types submit_type -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} diff --git a/c/src/optman/rtems/no-part.c b/c/src/optman/rtems/no-part.c deleted file mode 100644 index 36eb4aee12..0000000000 --- a/c/src/optman/rtems/no-part.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Partition Manager - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include -#include - -void _Partition_Manager_initialization( - unsigned32 maximum_partitions -) -{ -} - -rtems_status_code rtems_partition_create( - rtems_name name, - void *starting_address, - unsigned32 length, - unsigned32 buffer_size, - rtems_attribute attribute_set, - Objects_Id *id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_partition_ident( - rtems_name name, - unsigned32 node, - Objects_Id *id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_partition_delete( - Objects_Id id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_partition_get_buffer( - Objects_Id id, - void **buffer -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_partition_return_buffer( - Objects_Id id, - void *buffer -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} diff --git a/c/src/optman/rtems/no-region.c b/c/src/optman/rtems/no-region.c deleted file mode 100644 index 6a779fb785..0000000000 --- a/c/src/optman/rtems/no-region.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Region Manager - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -void _Region_Manager_initialization( - unsigned32 maximum_regions -) -{ -} - -rtems_status_code rtems_region_create( - rtems_name name, - void *starting_address, - unsigned32 length, - unsigned32 page_size, - rtems_attribute attribute_set, - Objects_Id *id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_region_ident( - rtems_name name, - Objects_Id *id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_region_delete( - Objects_Id id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_region_get_segment( - Objects_Id id, - unsigned32 size, - rtems_option option_set, - rtems_interval timeout, - void **segment -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_region_get_segment_size( - Objects_Id id, - void *segment, - unsigned32 *size -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_region_return_segment( - Objects_Id id, - void *segment -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} diff --git a/c/src/optman/rtems/no-rtmon.c b/c/src/optman/rtems/no-rtmon.c deleted file mode 100644 index fb064dafc5..0000000000 --- a/c/src/optman/rtems/no-rtmon.c +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Rate Monotonic Manager - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include - -#include -#include - -void _Rate_monotonic_Manager_initialization( - unsigned32 maximum_periods -) -{ -} - -rtems_status_code rtems_rate_monotonic_create( - rtems_name name, - Objects_Id *id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_rate_monotonic_ident( - rtems_name name, - Objects_Id *id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_rate_monotonic_cancel( - Objects_Id id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_rate_monotonic_delete( - Objects_Id id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_rate_monotonic_period( - Objects_Id id, - rtems_interval length -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -void _Rate_monotonic_Timeout( - Objects_Id id, - void *ignored -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); -} - -boolean _Rate_monotonic_Set_state( -Rate_monotonic_Control *the_period -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return FALSE; -} diff --git a/c/src/optman/rtems/no-sem.c b/c/src/optman/rtems/no-sem.c deleted file mode 100644 index 3f79491075..0000000000 --- a/c/src/optman/rtems/no-sem.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Semaphore Manager - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void _Semaphore_Manager_initialization( - unsigned32 maximum_semaphores -) -{ -} - -rtems_status_code rtems_semaphore_create( - rtems_name name, - unsigned32 count, - rtems_attribute attribute_set, - rtems_task_priority priority_ceiling, - Objects_Id *id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_semaphore_ident( - rtems_name name, - unsigned32 node, - Objects_Id *id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_semaphore_delete( - Objects_Id id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_semaphore_obtain( - Objects_Id id, - unsigned32 option_set, - rtems_interval timeout -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_semaphore_release( - Objects_Id id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -boolean _Semaphore_Seize( - Semaphore_Control *the_semaphore, - rtems_option option_set -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - _Thread_Executing->Wait.return_code = RTEMS_UNSATISFIED; - return TRUE; -} diff --git a/c/src/optman/rtems/no-signal.c b/c/src/optman/rtems/no-signal.c deleted file mode 100644 index fdd90efb38..0000000000 --- a/c/src/optman/rtems/no-signal.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Signal Manager - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include -#include -#include - -#include -#include -#include - -void _Signal_Manager_initialization( void ) -{ -} - -rtems_status_code rtems_signal_catch( - rtems_asr_entry handler, - rtems_mode mode_set -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_signal_send( - rtems_id id, - rtems_signal_set signal_set -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -/* end of file */ diff --git a/c/src/optman/rtems/no-timer.c b/c/src/optman/rtems/no-timer.c deleted file mode 100644 index c133a48328..0000000000 --- a/c/src/optman/rtems/no-timer.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Timer Manager - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -void _Timer_Manager_initialization( - unsigned32 maximum_timers -) -{ -} - -rtems_status_code rtems_timer_create( - rtems_name name, - Objects_Id *id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_timer_ident( - rtems_name name, - Objects_Id *id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_timer_cancel( - Objects_Id id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_timer_delete( - Objects_Id id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_timer_fire_after( - Objects_Id id, - rtems_interval ticks, - rtems_timer_service_routine_entry routine, - void *user_data -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_timer_fire_when( - Objects_Id id, - rtems_time_of_day *wall_time, - rtems_timer_service_routine_entry routine, - void *user_data -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_timer_reset( - Objects_Id id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} diff --git a/c/src/optman/sapi/no-ext.c b/c/src/optman/sapi/no-ext.c deleted file mode 100644 index bd7b91039b..0000000000 --- a/c/src/optman/sapi/no-ext.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Extension Manager - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include -#include - -void _Extension_Manager_initialization( - unsigned32 maximum_extensions -) -{ -} - -rtems_status_code rtems_extension_create( - rtems_name name, - rtems_extensions_table *extension_table, - Objects_Id *id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_extension_ident( - rtems_name name, - Objects_Id *id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_extension_delete( - Objects_Id id -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} diff --git a/c/src/optman/sapi/no-io.c b/c/src/optman/sapi/no-io.c deleted file mode 100644 index ed75a3df87..0000000000 --- a/c/src/optman/sapi/no-io.c +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Input/Output Manager - * - * - * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. - * On-Line Applications Research Corporation (OAR). - * All rights assigned to U.S. Government, 1994. - * - * This material may be reproduced by or for the U.S. Government pursuant - * to the copyright license under the clause at DFARS 252.227-7013. This - * notice must appear in all copies of this file and its derivatives. - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include -#include - -void _IO_Manager_initialization( - rtems_driver_address_table *driver_table, - unsigned32 number_of_drivers, - unsigned32 number_of_devices -) -{ -} - -void _IO_Initialize_all_drivers( void ) -{ -} - -rtems_status_code rtems_io_register_name( - char *device_name, - rtems_device_major_number major, - rtems_device_minor_number minor -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_io_lookup_name( - const char *pathname, - rtems_driver_name_t **rnp -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_io_initialize( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *argument -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_io_open( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *argument -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_io_close( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *argument -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_io_read( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *argument -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_io_write( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *argument -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} - -rtems_status_code rtems_io_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *argument -) -{ - _Internal_error_Occurred( - INTERNAL_ERROR_RTEMS_API, - FALSE, - RTEMS_NOT_CONFIGURED - ); - return RTEMS_NOT_CONFIGURED; -} -- cgit v1.2.3