From 9af31a6e92b51e5dbaa3d6212b607828e506ef85 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 9 Nov 1999 02:32:37 +0000 Subject: Moved include files to hppa1.1 subdirectory and put their sources in the include directory. --- c/src/lib/libcpu/hppa1.1/Makefile.in | 2 +- c/src/lib/libcpu/hppa1.1/include/Makefile.in | 25 +++++++-- c/src/lib/libcpu/hppa1.1/include/runway.h | 37 ++++++++++++++ c/src/lib/libcpu/hppa1.1/include/semaphore.h | 70 ++++++++++++++++++++++++++ c/src/lib/libcpu/hppa1.1/semaphore/Makefile.in | 5 +- c/src/lib/libcpu/hppa1.1/semaphore/semaphore.c | 2 +- c/src/lib/libcpu/hppa1.1/semaphore/semaphore.h | 70 -------------------------- 7 files changed, 133 insertions(+), 78 deletions(-) create mode 100644 c/src/lib/libcpu/hppa1.1/include/runway.h create mode 100644 c/src/lib/libcpu/hppa1.1/include/semaphore.h delete mode 100644 c/src/lib/libcpu/hppa1.1/semaphore/semaphore.h (limited to 'c/src/lib') diff --git a/c/src/lib/libcpu/hppa1.1/Makefile.in b/c/src/lib/libcpu/hppa1.1/Makefile.in index 2b2a477bad..eb644522f5 100644 --- a/c/src/lib/libcpu/hppa1.1/Makefile.in +++ b/c/src/lib/libcpu/hppa1.1/Makefile.in @@ -18,7 +18,7 @@ include $(RTEMS_ROOT)/make/directory.cfg INSTALL_CHANGE = @INSTALL_CHANGE@ -SUB_DIRS = include milli runway clock timer semaphore +SUB_DIRS = include milli clock timer semaphore Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ diff --git a/c/src/lib/libcpu/hppa1.1/include/Makefile.in b/c/src/lib/libcpu/hppa1.1/include/Makefile.in index a6bbbdafc0..69962db1af 100644 --- a/c/src/lib/libcpu/hppa1.1/include/Makefile.in +++ b/c/src/lib/libcpu/hppa1.1/include/Makefile.in @@ -1,5 +1,5 @@ # -# $Id$ +# $Id$ # @SET_MAKE@ @@ -13,13 +13,32 @@ PROJECT_ROOT = @PROJECT_ROOT@ VPATH = @srcdir@ +H_FILES = $(srcdir)/runway.h $(srcdir)/semaphore.h + +SRCS = $(H_FILES) + include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg include $(RTEMS_ROOT)/make/leaf.cfg INSTALL_CHANGE = @INSTALL_CHANGE@ +mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs + +INSTALLDIRS = $(PROJECT_INCLUDE)/hppa1.1 + +$(INSTALLDIRS): + @$(mkinstalldirs) $(INSTALLDIRS) + +CLEAN_ADDITIONS += +CLOBBER_ADDITIONS += + +all: install + +# NOTE: Unlike other CPUS, we install into a subdirectory to avoid +# file name conflicts -all: FORCEIT - cd ../../../libbsp/$(RTEMS_CPU)/@RTEMS_BSP@/include; $(MAKE) all +install: + $(mkinstalldirs) $(PROJECT_INCLUDE)/hppa1.1 + @$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE)/hppa1.1 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ diff --git a/c/src/lib/libcpu/hppa1.1/include/runway.h b/c/src/lib/libcpu/hppa1.1/include/runway.h new file mode 100644 index 0000000000..41aafe26ef --- /dev/null +++ b/c/src/lib/libcpu/hppa1.1/include/runway.h @@ -0,0 +1,37 @@ +/* + * 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/include/semaphore.h b/c/src/lib/libcpu/hppa1.1/include/semaphore.h new file mode 100644 index 0000000000..a1ef1f6ebe --- /dev/null +++ b/c/src/lib/libcpu/hppa1.1/include/semaphore.h @@ -0,0 +1,70 @@ +/* + * Description: + * HPPA fast spinlock semaphores based on LDCWX instruction. + * These semaphores are not known to RTEMS. + * + * TODO: + * + * COPYRIGHT (c) 1994,95 by Division Incorporated + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.OARcorp.com/rtems/license.html. + * + * $Id$ + */ + +#ifndef _INCLUDE_HPPA1_1_SEMAPHORE_H +#define _INCLUDE_HPPA1_1_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/semaphore/Makefile.in b/c/src/lib/libcpu/hppa1.1/semaphore/Makefile.in index dd2c2f22b1..794de08314 100644 --- a/c/src/lib/libcpu/hppa1.1/semaphore/Makefile.in +++ b/c/src/lib/libcpu/hppa1.1/semaphore/Makefile.in @@ -20,7 +20,7 @@ C_PIECES = semaphore C_FILES = $(C_PIECES:%=%.c) C_O_FILES = $(C_PIECES:%=${ARCH}/%.o) -H_PIECES = semaphore +H_PIECES = H_FILES = $(H_PIECES:%=$(srcdir)/%.h) # Assembly source names, if any, go here -- minus the .S @@ -37,7 +37,7 @@ include $(RTEMS_ROOT)/make/leaf.cfg INSTALL_CHANGE = @INSTALL_CHANGE@ mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs -INSTALLDIRS = $(PROJECT_INCLUDE) +INSTALLDIRS = $(PROJECT_INCLUDE)/hppa1.1 $(INSTALLDIRS): @$(mkinstalldirs) $(INSTALLDIRS) @@ -63,7 +63,6 @@ ${PGM}: ${SRCS} ${OBJS} $(make-rel) all: ${ARCH} $(SRCS) $(PGM) - @$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE) Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ diff --git a/c/src/lib/libcpu/hppa1.1/semaphore/semaphore.c b/c/src/lib/libcpu/hppa1.1/semaphore/semaphore.c index 011827dc75..d2d577a180 100644 --- a/c/src/lib/libcpu/hppa1.1/semaphore/semaphore.c +++ b/c/src/lib/libcpu/hppa1.1/semaphore/semaphore.c @@ -18,7 +18,7 @@ #include -#include "semaphore.h" +#include /* * Report fatal semaphore error 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 0ff4d13767..0000000000 --- a/c/src/lib/libcpu/hppa1.1/semaphore/semaphore.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Description: - * HPPA fast spinlock semaphores based on LDCWX instruction. - * These semaphores are not known to RTEMS. - * - * TODO: - * - * COPYRIGHT (c) 1994,95 by Division Incorporated - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef _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 */ -- cgit v1.2.3