From df49c60c9671e4a28e636964d744c1f59fb6cb68 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 12 Jun 2000 15:00:15 +0000 Subject: Merged from 4.5.0-beta3a --- c/src/exec/score/cpu/a29k/Makefile.am | 7 +- c/src/exec/score/cpu/a29k/rtems/Makefile.am | 4 +- c/src/exec/score/cpu/a29k/rtems/score/Makefile.am | 9 +- c/src/exec/score/cpu/a29k/rtems/score/a29k.h | 11 +- c/src/exec/score/cpu/hppa1.1/Makefile.am | 7 +- c/src/exec/score/cpu/hppa1.1/rtems/Makefile.am | 4 +- .../exec/score/cpu/hppa1.1/rtems/score/Makefile.am | 9 +- c/src/exec/score/cpu/hppa1.1/rtems/score/hppa.h | 10 +- c/src/exec/score/cpu/i386/Makefile.am | 7 +- c/src/exec/score/cpu/i386/rtems/Makefile.am | 4 +- c/src/exec/score/cpu/i386/rtems/score/Makefile.am | 9 +- c/src/exec/score/cpu/i386/rtems/score/i386.h | 12 +- c/src/exec/score/cpu/i960/Makefile.am | 7 +- c/src/exec/score/cpu/i960/rtems/Makefile.am | 4 +- c/src/exec/score/cpu/i960/rtems/score/Makefile.am | 9 +- c/src/exec/score/cpu/i960/rtems/score/i960.h | 13 +- c/src/exec/score/cpu/m68k/Makefile.am | 7 +- c/src/exec/score/cpu/m68k/qsm.h | 4 - c/src/exec/score/cpu/m68k/rtems/Makefile.am | 4 +- c/src/exec/score/cpu/m68k/rtems/score/Makefile.am | 9 +- c/src/exec/score/cpu/m68k/rtems/score/m68k.h | 9 + c/src/exec/score/cpu/m68k/sim.h | 7 - c/src/exec/score/cpu/mips/Makefile.am | 7 +- c/src/exec/score/cpu/mips/rtems/Makefile.am | 4 +- c/src/exec/score/cpu/mips/rtems/score/Makefile.am | 9 +- c/src/exec/score/cpu/mips/rtems/score/mips.h | 11 +- .../exec/score/cpu/mips/rtems/score/mips64orion.h | 11 +- c/src/exec/score/cpu/mips64orion/Makefile.am | 7 +- c/src/exec/score/cpu/mips64orion/rtems/Makefile.am | 4 +- .../score/cpu/mips64orion/rtems/score/Makefile.am | 9 +- .../cpu/mips64orion/rtems/score/mips64orion.h | 11 +- c/src/exec/score/cpu/no_cpu/Makefile.am | 7 +- c/src/exec/score/cpu/no_cpu/cpu.c | 24 +++ c/src/exec/score/cpu/no_cpu/cpu_asm.c | 19 ++ c/src/exec/score/cpu/no_cpu/rtems.c | 4 + c/src/exec/score/cpu/no_cpu/rtems/Makefile.am | 4 +- .../exec/score/cpu/no_cpu/rtems/score/Makefile.am | 9 +- c/src/exec/score/cpu/no_cpu/rtems/score/cpu.h | 235 ++++++++++++++++++++- c/src/exec/score/cpu/no_cpu/rtems/score/no_cpu.h | 28 ++- c/src/exec/score/cpu/powerpc/Makefile.am | 4 +- .../powerpc/new_exception_processing/Makefile.am | 16 +- .../powerpc/old_exception_processing/Makefile.am | 23 +- .../powerpc/old_exception_processing/irq_stub.S | 2 + c/src/exec/score/cpu/powerpc/rtems/score/ppc.h | 50 ++++- c/src/exec/score/cpu/powerpc/shared/Makefile.am | 8 +- c/src/exec/score/cpu/powerpc/shared/ppc.h | 50 ++++- c/src/exec/score/cpu/sh/Makefile.am | 7 +- c/src/exec/score/cpu/sh/rtems/Makefile.am | 4 +- c/src/exec/score/cpu/sh/rtems/score/Makefile.am | 13 +- c/src/exec/score/cpu/sh/rtems/score/sh.h | 12 +- c/src/exec/score/cpu/sparc/Makefile.am | 7 +- c/src/exec/score/cpu/sparc/rtems/Makefile.am | 4 +- c/src/exec/score/cpu/sparc/rtems/score/Makefile.am | 9 +- c/src/exec/score/cpu/sparc/rtems/score/sparc.h | 14 +- c/src/exec/score/cpu/unix/Makefile.am | 4 +- c/src/exec/score/cpu/unix/cpu.c | 27 ++- c/src/exec/score/cpu/unix/rtems/Makefile.am | 4 +- c/src/exec/score/cpu/unix/rtems/score/Makefile.am | 11 +- c/src/exec/score/cpu/unix/rtems/score/cpu.h | 13 +- c/src/exec/score/cpu/unix/rtems/score/unix.h | 16 +- c/src/exec/score/include/rtems/Makefile.am | 9 +- c/src/exec/score/include/rtems/score/Makefile.am | 17 +- c/src/exec/score/include/rtems/score/thread.h | 3 +- c/src/exec/score/include/rtems/system.h | 4 +- c/src/exec/score/inline/rtems/score/Makefile.am | 9 +- c/src/exec/score/macros/rtems/score/Makefile.am | 16 +- c/src/exec/score/macros/rtems/score/address.inl | 2 +- c/src/exec/score/src/Makefile.am | 3 +- c/src/exec/score/src/objectcopynamestring.c | 9 +- 69 files changed, 707 insertions(+), 232 deletions(-) (limited to 'c/src/exec/score') diff --git a/c/src/exec/score/cpu/a29k/Makefile.am b/c/src/exec/score/cpu/a29k/Makefile.am index a740e396a3..92cdcbd384 100644 --- a/c/src/exec/score/cpu/a29k/Makefile.am +++ b/c/src/exec/score/cpu/a29k/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal @@ -41,7 +41,8 @@ PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%) TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o -all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES) +all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) \ + $(TMPINSTALL_FILES) .PRECIOUS: $(REL) diff --git a/c/src/exec/score/cpu/a29k/rtems/Makefile.am b/c/src/exec/score/cpu/a29k/rtems/Makefile.am index 900930a502..ef7df82af7 100644 --- a/c/src/exec/score/cpu/a29k/rtems/Makefile.am +++ b/c/src/exec/score/cpu/a29k/rtems/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/exec/score/cpu/a29k/rtems/score/Makefile.am b/c/src/exec/score/cpu/a29k/rtems/score/Makefile.am index 5ec1ac9f61..6f47d2e20b 100644 --- a/c/src/exec/score/cpu/a29k/rtems/score/Makefile.am +++ b/c/src/exec/score/cpu/a29k/rtems/score/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -11,9 +11,8 @@ noinst_HEADERS = $(H_FILES) # (OPTIONAL) Add local stuff here using += # -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE)/rtems/score \ -$(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \ + $(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) $(PROJECT_INCLUDE)/rtems/score: $(mkinstalldirs) $@ diff --git a/c/src/exec/score/cpu/a29k/rtems/score/a29k.h b/c/src/exec/score/cpu/a29k/rtems/score/a29k.h index 7dd9030609..e1e359d075 100644 --- a/c/src/exec/score/cpu/a29k/rtems/score/a29k.h +++ b/c/src/exec/score/cpu/a29k/rtems/score/a29k.h @@ -28,7 +28,16 @@ extern "C" { * of the family. */ -#if defined(a29205) +#if defined(rtems_multilib) +/* + * Figure out all CPU Model Feature Flags based upon compiler + * predefines. + */ + +#define CPU_MODEL_NAME "rtems_multilib" +#define A29K_HAS_FPU 0 + +#elif defined(a29205) #define CPU_MODEL_NAME "a29205" #define A29K_HAS_FPU 0 diff --git a/c/src/exec/score/cpu/hppa1.1/Makefile.am b/c/src/exec/score/cpu/hppa1.1/Makefile.am index 882f9ca597..f26f2ca8fa 100644 --- a/c/src/exec/score/cpu/hppa1.1/Makefile.am +++ b/c/src/exec/score/cpu/hppa1.1/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal @@ -36,7 +36,8 @@ PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%) TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o -all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES) +all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) \ + $(TMPINSTALL_FILES) .PRECIOUS: $(REL) diff --git a/c/src/exec/score/cpu/hppa1.1/rtems/Makefile.am b/c/src/exec/score/cpu/hppa1.1/rtems/Makefile.am index 900930a502..ef7df82af7 100644 --- a/c/src/exec/score/cpu/hppa1.1/rtems/Makefile.am +++ b/c/src/exec/score/cpu/hppa1.1/rtems/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/exec/score/cpu/hppa1.1/rtems/score/Makefile.am b/c/src/exec/score/cpu/hppa1.1/rtems/score/Makefile.am index 5fa8d31b1d..f578ebdda9 100644 --- a/c/src/exec/score/cpu/hppa1.1/rtems/score/Makefile.am +++ b/c/src/exec/score/cpu/hppa1.1/rtems/score/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -11,9 +11,8 @@ noinst_HEADERS = $(H_FILES) # (OPTIONAL) Add local stuff here using += # -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE)/rtems/score \ -$(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \ + $(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) $(PROJECT_INCLUDE)/rtems/score: $(mkinstalldirs) $@ diff --git a/c/src/exec/score/cpu/hppa1.1/rtems/score/hppa.h b/c/src/exec/score/cpu/hppa1.1/rtems/score/hppa.h index 049981ea84..1e1e3284df 100644 --- a/c/src/exec/score/cpu/hppa1.1/rtems/score/hppa.h +++ b/c/src/exec/score/cpu/hppa1.1/rtems/score/hppa.h @@ -35,7 +35,15 @@ extern "C" { * present in a particular member of the family. */ -#if defined(hppa7100) +#if defined(rtems_multilib) +/* + * Figure out all CPU Model Feature Flags based upon compiler + * predefines. + */ + +#define CPU_MODEL_NAME "rtems_multilib" + +#elif defined(hppa7100) #define CPU_MODEL_NAME "hppa 7100" diff --git a/c/src/exec/score/cpu/i386/Makefile.am b/c/src/exec/score/cpu/i386/Makefile.am index ff1f7dd610..2801a9fc88 100644 --- a/c/src/exec/score/cpu/i386/Makefile.am +++ b/c/src/exec/score/cpu/i386/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal @@ -38,7 +38,8 @@ PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%) TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o -all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES) +all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) \ + $(TMPINSTALL_FILES) .PRECIOUS: $(REL) diff --git a/c/src/exec/score/cpu/i386/rtems/Makefile.am b/c/src/exec/score/cpu/i386/rtems/Makefile.am index 900930a502..ef7df82af7 100644 --- a/c/src/exec/score/cpu/i386/rtems/Makefile.am +++ b/c/src/exec/score/cpu/i386/rtems/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/exec/score/cpu/i386/rtems/score/Makefile.am b/c/src/exec/score/cpu/i386/rtems/score/Makefile.am index a3bdd523b1..9d7ca37423 100644 --- a/c/src/exec/score/cpu/i386/rtems/score/Makefile.am +++ b/c/src/exec/score/cpu/i386/rtems/score/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -11,9 +11,8 @@ noinst_HEADERS = $(H_FILES) # (OPTIONAL) Add local stuff here using += # -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE)/rtems/score \ -$(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \ + $(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) $(PROJECT_INCLUDE)/rtems/score: $(mkinstalldirs) $@ diff --git a/c/src/exec/score/cpu/i386/rtems/score/i386.h b/c/src/exec/score/cpu/i386/rtems/score/i386.h index 977670a75b..f113ebee4e 100644 --- a/c/src/exec/score/cpu/i386/rtems/score/i386.h +++ b/c/src/exec/score/cpu/i386/rtems/score/i386.h @@ -46,7 +46,17 @@ extern "C" { * */ -#if defined(i386_fp) +#if defined(rtems_multilib) +/* + * Figure out all CPU Model Feature Flags based upon compiler + * predefines. + */ + +#define CPU_MODEL_NAME "rtems_multilib" +#define I386_HAS_FPU 0 +#define I386_HAS_BSWAP 0 + +#elif defined(i386_fp) #define CPU_MODEL_NAME "i386 with i387" #define I386_HAS_BSWAP 0 diff --git a/c/src/exec/score/cpu/i960/Makefile.am b/c/src/exec/score/cpu/i960/Makefile.am index 9e45e1dcd4..f26a4e9382 100644 --- a/c/src/exec/score/cpu/i960/Makefile.am +++ b/c/src/exec/score/cpu/i960/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal @@ -38,7 +38,8 @@ PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%) TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o -all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES) +all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) \ + $(TMPINSTALL_FILES) .PRECIOUS: $(REL) diff --git a/c/src/exec/score/cpu/i960/rtems/Makefile.am b/c/src/exec/score/cpu/i960/rtems/Makefile.am index 900930a502..ef7df82af7 100644 --- a/c/src/exec/score/cpu/i960/rtems/Makefile.am +++ b/c/src/exec/score/cpu/i960/rtems/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/exec/score/cpu/i960/rtems/score/Makefile.am b/c/src/exec/score/cpu/i960/rtems/score/Makefile.am index 9614ab9e49..c7c8212303 100644 --- a/c/src/exec/score/cpu/i960/rtems/score/Makefile.am +++ b/c/src/exec/score/cpu/i960/rtems/score/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -11,9 +11,8 @@ noinst_HEADERS = $(H_FILES) # (OPTIONAL) Add local stuff here using += # -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE)/rtems/score \ -$(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \ + $(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) $(PROJECT_INCLUDE)/rtems/score: $(mkinstalldirs) $@ diff --git a/c/src/exec/score/cpu/i960/rtems/score/i960.h b/c/src/exec/score/cpu/i960/rtems/score/i960.h index ae9a073aff..644bd18a0b 100644 --- a/c/src/exec/score/cpu/i960/rtems/score/i960.h +++ b/c/src/exec/score/cpu/i960/rtems/score/i960.h @@ -33,7 +33,18 @@ extern "C" { * NOTE: RTEMS defines a canonical name for each cpu model. */ -#if defined(__i960CA__) || defined(__i960_CA__) || defined(__i960CA) +#if defined(rtems_multilib) +/* + * Figure out all CPU Model Feature Flags based upon compiler + * predefines. + */ + +#define CPU_MODEL_NAME "rtems_multilib" +#define I960_HAS_FPU 0 +#define I960_CPU_ALIGNMENT 4 +#define I960_SOFT_RESET_COMMAND 0x30000 + +#elif defined(__i960CA__) || defined(__i960_CA__) || defined(__i960CA) #define CPU_MODEL_NAME "i960ca" #define __RTEMS_I960CA__ diff --git a/c/src/exec/score/cpu/m68k/Makefile.am b/c/src/exec/score/cpu/m68k/Makefile.am index 4ff7a91ff7..cffdcf4fc4 100644 --- a/c/src/exec/score/cpu/m68k/Makefile.am +++ b/c/src/exec/score/cpu/m68k/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal @@ -38,7 +38,8 @@ PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%) TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o -all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES) +all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) \ + $(TMPINSTALL_FILES) .PRECIOUS: $(REL) diff --git a/c/src/exec/score/cpu/m68k/qsm.h b/c/src/exec/score/cpu/m68k/qsm.h index e1bf33bc12..9853978115 100644 --- a/c/src/exec/score/cpu/m68k/qsm.h +++ b/c/src/exec/score/cpu/m68k/qsm.h @@ -41,10 +41,6 @@ #ifndef _QSM_H_ #define _QSM_H_ - -#include - - /* SAM-- shift and mask */ #undef SAM #define SAM(a,b,c) ((a << b) & c) diff --git a/c/src/exec/score/cpu/m68k/rtems/Makefile.am b/c/src/exec/score/cpu/m68k/rtems/Makefile.am index 900930a502..ef7df82af7 100644 --- a/c/src/exec/score/cpu/m68k/rtems/Makefile.am +++ b/c/src/exec/score/cpu/m68k/rtems/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/exec/score/cpu/m68k/rtems/score/Makefile.am b/c/src/exec/score/cpu/m68k/rtems/score/Makefile.am index 5be89730ec..fa38bea692 100644 --- a/c/src/exec/score/cpu/m68k/rtems/score/Makefile.am +++ b/c/src/exec/score/cpu/m68k/rtems/score/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -11,9 +11,8 @@ noinst_HEADERS = $(H_FILES) # (OPTIONAL) Add local stuff here using += # -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE)/rtems/score \ -$(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \ + $(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) $(PROJECT_INCLUDE)/rtems/score: $(mkinstalldirs) $@ diff --git a/c/src/exec/score/cpu/m68k/rtems/score/m68k.h b/c/src/exec/score/cpu/m68k/rtems/score/m68k.h index 7408aae231..64639220dd 100644 --- a/c/src/exec/score/cpu/m68k/rtems/score/m68k.h +++ b/c/src/exec/score/cpu/m68k/rtems/score/m68k.h @@ -79,6 +79,15 @@ extern "C" { * by having each model specify which core it uses and then go from there. */ +/* + * Figure out all CPU Model Feature Flags based upon compiler + * predefines. Notice the only exception to this is that + * gcc does not distinguish between CPU32 and CPU32+. This + * feature selection logic is setup such that if RTEMS__mcpu32p__ + * is defined, then CPU32+ rules are used. Otherwise, the safe + * but less efficient CPU32 rules are used for the CPU32+. + */ + #if defined(__mc68020__) #define CPU_MODEL_NAME "m68020" diff --git a/c/src/exec/score/cpu/m68k/sim.h b/c/src/exec/score/cpu/m68k/sim.h index e1c637f9bd..9354412390 100644 --- a/c/src/exec/score/cpu/m68k/sim.h +++ b/c/src/exec/score/cpu/m68k/sim.h @@ -50,13 +50,6 @@ #define _SIM_H_ -/* - * XXX Why is a generic file like this including a bsp specific file? - -#include - */ - - /* SAM-- shift and mask */ #undef SAM #define SAM(a,b,c) ((a << b) & c) diff --git a/c/src/exec/score/cpu/mips/Makefile.am b/c/src/exec/score/cpu/mips/Makefile.am index b54cb49ded..5c13d378e9 100644 --- a/c/src/exec/score/cpu/mips/Makefile.am +++ b/c/src/exec/score/cpu/mips/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal @@ -38,7 +38,8 @@ PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%) TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o -all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES) +all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) \ + $(TMPINSTALL_FILES) .PRECIOUS: $(REL) diff --git a/c/src/exec/score/cpu/mips/rtems/Makefile.am b/c/src/exec/score/cpu/mips/rtems/Makefile.am index 900930a502..ef7df82af7 100644 --- a/c/src/exec/score/cpu/mips/rtems/Makefile.am +++ b/c/src/exec/score/cpu/mips/rtems/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/exec/score/cpu/mips/rtems/score/Makefile.am b/c/src/exec/score/cpu/mips/rtems/score/Makefile.am index 728899f945..be1e4fd6b7 100644 --- a/c/src/exec/score/cpu/mips/rtems/score/Makefile.am +++ b/c/src/exec/score/cpu/mips/rtems/score/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -11,9 +11,8 @@ noinst_HEADERS = $(H_FILES) # (OPTIONAL) Add local stuff here using += # -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE)/rtems/score \ -$(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \ + $(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) $(PROJECT_INCLUDE)/rtems/score: $(mkinstalldirs) $@ diff --git a/c/src/exec/score/cpu/mips/rtems/score/mips.h b/c/src/exec/score/cpu/mips/rtems/score/mips.h index 1ff139f604..425d0cc5fd 100644 --- a/c/src/exec/score/cpu/mips/rtems/score/mips.h +++ b/c/src/exec/score/cpu/mips/rtems/score/mips.h @@ -44,7 +44,16 @@ extern "C" { * of the family. */ -#if defined(R4650) +#if defined(rtems_multilib) +/* + * Figure out all CPU Model Feature Flags based upon compiler + * predefines. + */ + +#define CPU_MODEL_NAME "rtems_multilib" +#define MIPS64ORION_HAS_FPU 1 + +#elif defined(R4650) #define CPU_MODEL_NAME "R4650" #define MIPS64ORION_HAS_FPU 1 diff --git a/c/src/exec/score/cpu/mips/rtems/score/mips64orion.h b/c/src/exec/score/cpu/mips/rtems/score/mips64orion.h index 1ff139f604..425d0cc5fd 100644 --- a/c/src/exec/score/cpu/mips/rtems/score/mips64orion.h +++ b/c/src/exec/score/cpu/mips/rtems/score/mips64orion.h @@ -44,7 +44,16 @@ extern "C" { * of the family. */ -#if defined(R4650) +#if defined(rtems_multilib) +/* + * Figure out all CPU Model Feature Flags based upon compiler + * predefines. + */ + +#define CPU_MODEL_NAME "rtems_multilib" +#define MIPS64ORION_HAS_FPU 1 + +#elif defined(R4650) #define CPU_MODEL_NAME "R4650" #define MIPS64ORION_HAS_FPU 1 diff --git a/c/src/exec/score/cpu/mips64orion/Makefile.am b/c/src/exec/score/cpu/mips64orion/Makefile.am index b54cb49ded..5c13d378e9 100644 --- a/c/src/exec/score/cpu/mips64orion/Makefile.am +++ b/c/src/exec/score/cpu/mips64orion/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal @@ -38,7 +38,8 @@ PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%) TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o -all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES) +all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) \ + $(TMPINSTALL_FILES) .PRECIOUS: $(REL) diff --git a/c/src/exec/score/cpu/mips64orion/rtems/Makefile.am b/c/src/exec/score/cpu/mips64orion/rtems/Makefile.am index 900930a502..ef7df82af7 100644 --- a/c/src/exec/score/cpu/mips64orion/rtems/Makefile.am +++ b/c/src/exec/score/cpu/mips64orion/rtems/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/exec/score/cpu/mips64orion/rtems/score/Makefile.am b/c/src/exec/score/cpu/mips64orion/rtems/score/Makefile.am index 728899f945..be1e4fd6b7 100644 --- a/c/src/exec/score/cpu/mips64orion/rtems/score/Makefile.am +++ b/c/src/exec/score/cpu/mips64orion/rtems/score/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -11,9 +11,8 @@ noinst_HEADERS = $(H_FILES) # (OPTIONAL) Add local stuff here using += # -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE)/rtems/score \ -$(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \ + $(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) $(PROJECT_INCLUDE)/rtems/score: $(mkinstalldirs) $@ diff --git a/c/src/exec/score/cpu/mips64orion/rtems/score/mips64orion.h b/c/src/exec/score/cpu/mips64orion/rtems/score/mips64orion.h index 1ff139f604..425d0cc5fd 100644 --- a/c/src/exec/score/cpu/mips64orion/rtems/score/mips64orion.h +++ b/c/src/exec/score/cpu/mips64orion/rtems/score/mips64orion.h @@ -44,7 +44,16 @@ extern "C" { * of the family. */ -#if defined(R4650) +#if defined(rtems_multilib) +/* + * Figure out all CPU Model Feature Flags based upon compiler + * predefines. + */ + +#define CPU_MODEL_NAME "rtems_multilib" +#define MIPS64ORION_HAS_FPU 1 + +#elif defined(R4650) #define CPU_MODEL_NAME "R4650" #define MIPS64ORION_HAS_FPU 1 diff --git a/c/src/exec/score/cpu/no_cpu/Makefile.am b/c/src/exec/score/cpu/no_cpu/Makefile.am index 29ff8e77ff..b055a2d202 100644 --- a/c/src/exec/score/cpu/no_cpu/Makefile.am +++ b/c/src/exec/score/cpu/no_cpu/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal @@ -35,7 +35,8 @@ PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%) TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o -all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES) +all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) \ + $(TMPINSTALL_FILES) .PRECIOUS: $(REL) diff --git a/c/src/exec/score/cpu/no_cpu/cpu.c b/c/src/exec/score/cpu/no_cpu/cpu.c index 4711eb6703..9df97623ba 100644 --- a/c/src/exec/score/cpu/no_cpu/cpu.c +++ b/c/src/exec/score/cpu/no_cpu/cpu.c @@ -23,6 +23,10 @@ * INPUT PARAMETERS: * cpu_table - CPU table to initialize * thread_dispatch - address of disptaching routine + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ @@ -59,6 +63,10 @@ void _CPU_Initialize( /*PAGE * * _CPU_ISR_Get_level + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ unsigned32 _CPU_ISR_Get_level( void ) @@ -73,6 +81,10 @@ unsigned32 _CPU_ISR_Get_level( void ) /*PAGE * * _CPU_ISR_install_raw_handler + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void _CPU_ISR_install_raw_handler( @@ -101,6 +113,10 @@ void _CPU_ISR_install_raw_handler( * * Output parameters: NONE * + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void _CPU_ISR_install_vector( @@ -130,6 +146,10 @@ void _CPU_ISR_install_vector( /*PAGE * * _CPU_Install_interrupt_stack + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void _CPU_Install_interrupt_stack( void ) @@ -151,6 +171,10 @@ void _CPU_Install_interrupt_stack( void ) * to stop the DMA if the CPU were put in IDLE mode. This might * also be a problem with other on-chip peripherals. So use this * hook with caution. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void _CPU_Thread_Idle_body( void ) diff --git a/c/src/exec/score/cpu/no_cpu/cpu_asm.c b/c/src/exec/score/cpu/no_cpu/cpu_asm.c index 5a5728a2f8..2ee4067f6c 100644 --- a/c/src/exec/score/cpu/no_cpu/cpu_asm.c +++ b/c/src/exec/score/cpu/no_cpu/cpu_asm.c @@ -37,6 +37,10 @@ * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void _CPU_Context_save_fp( @@ -56,6 +60,10 @@ void _CPU_Context_save_fp( * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void _CPU_Context_restore_fp( @@ -67,6 +75,10 @@ void _CPU_Context_restore_fp( /* _CPU_Context_switch * * This routine performs a normal non-FP context switch. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void _CPU_Context_switch( @@ -83,6 +95,10 @@ void _CPU_Context_switch( * efficient manner. It may simply be a label in _CPU_Context_switch. * * NOTE: May be unnecessary to reload some registers. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void _CPU_Context_restore( @@ -95,6 +111,9 @@ void _CPU_Context_restore( * * This routine provides the RTEMS interrupt management. * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void _ISR_Handler() diff --git a/c/src/exec/score/cpu/no_cpu/rtems.c b/c/src/exec/score/cpu/no_cpu/rtems.c index 9e7e0b66d7..4310d55fed 100644 --- a/c/src/exec/score/cpu/no_cpu/rtems.c +++ b/c/src/exec/score/cpu/no_cpu/rtems.c @@ -36,6 +36,10 @@ * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void RTEMS() diff --git a/c/src/exec/score/cpu/no_cpu/rtems/Makefile.am b/c/src/exec/score/cpu/no_cpu/rtems/Makefile.am index 900930a502..ef7df82af7 100644 --- a/c/src/exec/score/cpu/no_cpu/rtems/Makefile.am +++ b/c/src/exec/score/cpu/no_cpu/rtems/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/exec/score/cpu/no_cpu/rtems/score/Makefile.am b/c/src/exec/score/cpu/no_cpu/rtems/score/Makefile.am index 61e7148453..972d50d860 100644 --- a/c/src/exec/score/cpu/no_cpu/rtems/score/Makefile.am +++ b/c/src/exec/score/cpu/no_cpu/rtems/score/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -11,9 +11,8 @@ noinst_HEADERS = $(H_FILES) # (OPTIONAL) Add local stuff here using += # -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE)/rtems/score \ -$(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \ + $(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) $(PROJECT_INCLUDE)/rtems/score: $(mkinstalldirs) $@ diff --git a/c/src/exec/score/cpu/no_cpu/rtems/score/cpu.h b/c/src/exec/score/cpu/no_cpu/rtems/score/cpu.h index da99e163cc..b2eeaa84ce 100644 --- a/c/src/exec/score/cpu/no_cpu/rtems/score/cpu.h +++ b/c/src/exec/score/cpu/no_cpu/rtems/score/cpu.h @@ -42,6 +42,10 @@ extern "C" { * something calls _Thread_Enable_dispatch which in turns calls * _Thread_Dispatch. If the enable dispatch is inlined, then * one subroutine call is avoided entirely.] + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_INLINE_ENABLE_DISPATCH FALSE @@ -62,6 +66,10 @@ extern "C" { * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_UNROLL_ENQUEUE_PRIORITY TRUE @@ -88,6 +96,10 @@ extern "C" { * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_HAS_SOFTWARE_INTERRUPT_STACK FALSE @@ -105,6 +117,10 @@ extern "C" { * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_HAS_HARDWARE_INTERRUPT_STACK TRUE @@ -117,6 +133,10 @@ extern "C" { * * This should be TRUE is CPU_HAS_SOFTWARE_INTERRUPT_STACK is TRUE * or CPU_INSTALL_HARDWARE_INTERRUPT_STACK is TRUE. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_ALLOCATE_INTERRUPT_STACK TRUE @@ -125,6 +145,10 @@ extern "C" { * Does the RTEMS invoke the user's ISR with the vector number and * a pointer to the saved interrupt frame (1) or just the vector * number (0)? + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_ISR_PASSES_FRAME_POINTER 0 @@ -143,6 +167,16 @@ extern "C" { * 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. + * + * The CPU_SOFTWARE_FP is used to indicate whether or not there + * is software implemented floating point that must be context + * switched. The determination of whether or not this applies + * is very tool specific and the state saved/restored is also + * compiler specific. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #if ( NO_CPU_HAS_FPU == 1 ) @@ -150,6 +184,7 @@ extern "C" { #else #define CPU_HARDWARE_FP FALSE #endif +#define CPU_SOFTWARE_FP FALSE /* * Are all tasks RTEMS_FLOATING_POINT tasks implicitly? @@ -165,6 +200,10 @@ extern "C" { * In this case, this option should be TRUE. * * If CPU_HARDWARE_FP is FALSE, then this should be FALSE as well. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_ALL_TASKS_ARE_FP TRUE @@ -179,6 +218,10 @@ extern "C" { * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_IDLE_TASK_IS_FP FALSE @@ -207,6 +250,10 @@ extern "C" { * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_USE_DEFERRED_FP_SWITCH TRUE @@ -230,6 +277,10 @@ extern "C" { * 1. BSP provided * 2. CPU dependent (if provided) * 3. generic (if no BSP and no CPU dependent) + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_PROVIDES_IDLE_THREAD_BODY TRUE @@ -240,6 +291,10 @@ extern "C" { * * If TRUE, then the grows upward. * If FALSE, then the grows toward smaller addresses. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_STACK_GROWS_UP TRUE @@ -262,6 +317,10 @@ extern "C" { * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_STRUCTURE_ALIGNMENT @@ -269,6 +328,10 @@ extern "C" { /* * Define what is required to specify how the network to host conversion * routines are handled. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE @@ -279,6 +342,10 @@ extern "C" { * 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(). + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_MODES_INTERRUPT_MASK 0x00000001 @@ -288,6 +355,10 @@ extern "C" { * * Examples structures include the descriptor tables from the i386 * and the processor control structure on the i960ca. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ /* may need to put some structures here. */ @@ -325,6 +396,10 @@ extern "C" { * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ typedef struct { @@ -344,6 +419,10 @@ typedef struct { /* * The following table contains the information required to configure * the XXX processor specific parameters. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ typedef struct { @@ -364,10 +443,18 @@ typedef struct { /* * Macros to access required entires in the CPU Table are in * the file rtems/system.h. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ /* * Macros to access NO_CPU specific additions to the CPU Table + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ /* There are no CPU specific additions to the CPU Table for this port. */ @@ -377,6 +464,10 @@ typedef struct { * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; @@ -392,6 +483,10 @@ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; * * NOTE: These two variables are required if the macro * CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ SCORE_EXTERN void *_CPU_Interrupt_stack_low; @@ -405,12 +500,20 @@ SCORE_EXTERN void *_CPU_Interrupt_stack_high; * 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). + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)(); /* * Nothing prevents the porter from declaring more CPU specific variables. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ /* XXX: if needed, put more variables here */ @@ -420,6 +523,10 @@ SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)(); * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp ) @@ -428,6 +535,10 @@ SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)(); * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0 @@ -435,6 +546,10 @@ SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)(); /* * This defines the number of entries in the ISR_Vector_table managed * by RTEMS. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_INTERRUPT_NUMBER_OF_VECTORS 32 @@ -443,6 +558,10 @@ SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)(); /* * Should be large enough to run all RTEMS tests. This insures * that a "reasonable" small application should not have any problems. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_STACK_MINIMUM_SIZE (1024*4) @@ -450,6 +569,10 @@ SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)(); /* * CPU's worst alignment requirement for data types on a byte boundary. This * alignment does not take into account the requirements for the stack. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_ALIGNMENT 8 @@ -462,8 +585,20 @@ SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)(); * 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. + * NOTE: This does not have to be a power of 2 although it should be + * a multiple of 2 greater than or equal to 2. The requirement + * to be a multiple of 2 is because the heap uses the least + * significant field of the front and back flags to indicate + * that a block is in use or free. So you do not want any odd + * length blocks really putting length data in that bit. + * + * On byte oriented architectures, CPU_HEAP_ALIGNMENT normally will + * have to be greater or equal to than CPU_ALIGNMENT to ensure that + * elements allocated from the heap meet all restrictions. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT @@ -478,6 +613,10 @@ SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)(); * * NOTE: This does not have to be a power of 2. It does have to * be greater or equal to than CPU_ALIGNMENT. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT @@ -489,6 +628,10 @@ SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)(); * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_STACK_ALIGNMENT 0 @@ -498,6 +641,10 @@ SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)(); /* * Disable all interrupts for an RTEMS critical section. The previous * level is returned in _level. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define _CPU_ISR_Disable( _isr_cookie ) \ @@ -509,6 +656,10 @@ SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)(); * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define _CPU_ISR_Enable( _isr_cookie ) \ @@ -520,6 +671,10 @@ SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)(); * disabling them again. This is used to divide long RTEMS critical * sections into two or more parts. The parameter _level is not * modified. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define _CPU_ISR_Flash( _isr_cookie ) \ @@ -537,6 +692,10 @@ SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)(); * via the rtems_task_mode directive. * * The get routine usually must be implemented as a subroutine. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define _CPU_ISR_Set_level( new_level ) \ @@ -568,6 +727,10 @@ unsigned32 _CPU_ISR_Get_level( void ); * point thread. This is typically only used on CPUs where the * FPU may be easily disabled by software such as on the SPARC * where the PSR contains an enable FPU bit. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define _CPU_Context_Initialize( _the_context, _stack_base, _size, \ @@ -583,6 +746,10 @@ unsigned32 _CPU_ISR_Get_level( void ); * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define _CPU_Context_Restart_self( _the_context ) \ @@ -600,6 +767,10 @@ unsigned32 _CPU_ISR_Get_level( void ); * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define _CPU_Context_Fp_start( _base, _offset ) \ @@ -615,6 +786,10 @@ unsigned32 _CPU_ISR_Get_level( void ); * * Other models include (1) not doing anything, and (2) putting * a "null FP status word" in the correct place in the FP context. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define _CPU_Context_Initialize_fp( _destination ) \ @@ -630,6 +805,10 @@ unsigned32 _CPU_ISR_Get_level( void ); * This routine copies _error into a known place -- typically a stack * location or a register, optionally disables interrupts, and * halts/stops the CPU. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define _CPU_Fatal_halt( _error ) \ @@ -693,6 +872,10 @@ unsigned32 _CPU_ISR_Get_level( void ); * * where bit_set_table[ 16 ] has values which indicate the first * bit set + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #define CPU_USE_GENERIC_BITFIELD_CODE TRUE @@ -713,6 +896,10 @@ unsigned32 _CPU_ISR_Get_level( void ); * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE) @@ -727,6 +914,10 @@ unsigned32 _CPU_ISR_Get_level( void ); * _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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ #if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE) @@ -744,6 +935,10 @@ unsigned32 _CPU_ISR_Get_level( void ); * _CPU_Initialize * * This routine performs CPU dependent initialization. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void _CPU_Initialize( @@ -756,6 +951,10 @@ void _CPU_Initialize( * * This routine installs a "raw" interrupt handler directly into the * processor's vector table. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void _CPU_ISR_install_raw_handler( @@ -768,6 +967,10 @@ void _CPU_ISR_install_raw_handler( * _CPU_ISR_install_vector * * This routine installs an interrupt vector. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void _CPU_ISR_install_vector( @@ -783,6 +986,10 @@ void _CPU_ISR_install_vector( * * NOTE: It need only be provided if CPU_HAS_HARDWARE_INTERRUPT_STACK * is TRUE. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void _CPU_Install_interrupt_stack( void ); @@ -794,6 +1001,10 @@ void _CPU_Install_interrupt_stack( void ); * * NOTE: It need only be provided if CPU_PROVIDES_IDLE_THREAD_BODY * is TRUE. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void _CPU_Thread_Idle_body( void ); @@ -802,6 +1013,10 @@ void _CPU_Thread_Idle_body( void ); * _CPU_Context_switch * * This routine switches from the run context to the heir context. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void _CPU_Context_switch( @@ -816,6 +1031,10 @@ void _CPU_Context_switch( * efficient manner. It may simply be a label in _CPU_Context_switch. * * NOTE: May be unnecessary to reload some registers. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void _CPU_Context_restore( @@ -826,6 +1045,10 @@ void _CPU_Context_restore( * _CPU_Context_save_fp * * This routine saves the floating point context passed to it. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void _CPU_Context_save_fp( @@ -836,6 +1059,10 @@ void _CPU_Context_save_fp( * _CPU_Context_restore_fp * * This routine restores the floating point context passed to it. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ void _CPU_Context_restore_fp( @@ -860,6 +1087,10 @@ void _CPU_Context_restore_fp( * 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. + * + * NO_CPU Specific Information: + * + * XXX document implementation including references if appropriate */ static inline unsigned int CPU_swap_u32( diff --git a/c/src/exec/score/cpu/no_cpu/rtems/score/no_cpu.h b/c/src/exec/score/cpu/no_cpu/rtems/score/no_cpu.h index 3f374d5500..6708a7abbd 100644 --- a/c/src/exec/score/cpu/no_cpu/rtems/score/no_cpu.h +++ b/c/src/exec/score/cpu/no_cpu/rtems/score/no_cpu.h @@ -1,6 +1,6 @@ /* no_cpu.h * - * This file is an example (i.e. "no CPU") of the file which is + * This file is an example (i.e. no CPU) of the file which is * created for each CPU family port of RTEMS. * * @@ -24,16 +24,28 @@ extern "C" { /* * 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. + * RTEMS for a particular member of the no CPU family. + * It does this by setting variables to indicate which + * implementation dependent features are present in a particular + * member of the family. + * + * This is a good place to list all the known CPU models + * that this port supports and which RTEMS CPU model they correspond + * to. */ -#if defined(no_cpu) +#if defined(rtems_multilib) +/* + * Figure out all CPU Model Feature Flags based upon compiler + * predefines. + */ + +#define CPU_MODEL_NAME "rtems_multilib" +#define NOCPU_HAS_FPU 1 + +#elif defined(no_cpu) -#define CPU_MODEL_NAME "no_cpu" +#define CPU_MODEL_NAME "no_cpu_model" #define NOCPU_HAS_FPU 1 #else diff --git a/c/src/exec/score/cpu/powerpc/Makefile.am b/c/src/exec/score/cpu/powerpc/Makefile.am index db1cf0888a..cbddc2bca7 100644 --- a/c/src/exec/score/cpu/powerpc/Makefile.am +++ b/c/src/exec/score/cpu/powerpc/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal diff --git a/c/src/exec/score/cpu/powerpc/new_exception_processing/Makefile.am b/c/src/exec/score/cpu/powerpc/new_exception_processing/Makefile.am index c3195b159d..1f4affe8f4 100644 --- a/c/src/exec/score/cpu/powerpc/new_exception_processing/Makefile.am +++ b/c/src/exec/score/cpu/powerpc/new_exception_processing/Makefile.am @@ -9,7 +9,7 @@ C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o) ROOT_H_FILES = RTEMS_SCORE_H_FILES = cpu.h c_isr.inl -noinst_HEADERS = $(ROOT_H_FILES) $(RTEMS_SCORE_H_FILES) +noinst_HEADERS = $(ROOT_H_FILES) $(RTEMS_SCORE_H_FILES) S_FILES = cpu_asm.S S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o) @@ -21,11 +21,9 @@ include $(top_srcdir)/../../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE) \ -$(PROJECT_INCLUDE)/rtems/score \ -$(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \ -$(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%) +PREINSTALL_FILES += $(PROJECT_INCLUDE) $(PROJECT_INCLUDE)/rtems/score \ + $(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \ + $(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%) ##TMPINSTALL_FILES += \ ##$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o @@ -55,10 +53,8 @@ all-local: $(ARCH) $(PREINSTALL_FILES) $(REL) ## all-local: $(ARCH)/rtems.o all-local: $(TMPINSTALL_FILES) -clean-local: - $(RM) -r ../o-optimize ../o-debug ../o-profile +CLEANDIRS = ../o-optimize ../o-debug ../o-profile -EXTRA_DIST = \ -$(C_FILES) $(S_FILES) +EXTRA_DIST = $(C_FILES) $(S_FILES) include $(top_srcdir)/../../../../../../automake/local.am diff --git a/c/src/exec/score/cpu/powerpc/old_exception_processing/Makefile.am b/c/src/exec/score/cpu/powerpc/old_exception_processing/Makefile.am index afd66502eb..9629808140 100644 --- a/c/src/exec/score/cpu/powerpc/old_exception_processing/Makefile.am +++ b/c/src/exec/score/cpu/powerpc/old_exception_processing/Makefile.am @@ -19,14 +19,11 @@ S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o) include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg include $(top_srcdir)/../../../../../../automake/lib.am -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE) \ -$(PROJECT_INCLUDE)/rtems/score \ -$(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \ -$(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%) +PREINSTALL_FILES += $(PROJECT_INCLUDE) $(PROJECT_INCLUDE)/rtems/score \ + $(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \ + $(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%) -TMPINSTALL_FILES += \ -$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o +TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o $(INSTALL_DATA) $< $@ @@ -49,18 +46,12 @@ $(REL): $(C_O_FILES) $(S_O_FILES) test -d ../$(ARCH) || mkdir ../$(ARCH) $(make-rel) -all-local: $(ARCH) $(PREINSTALL_FILES) $(REL) -all-local: $(ARCH)/rtems.o -all-local: $(TMPINSTALL_FILES) +all-local: $(ARCH) $(PREINSTALL_FILES) $(REL) $(ARCH)/rtems.o $(TMPINSTALL_FILES) -clean-local: - $(RM) -r ../o-optimize ../o-debug ../o-profile +CLEANDIRS = ../o-optimize ../o-debug ../o-profile UNUSED_FILES = irq_stub.S -EXTRA_DIST = \ -TODO \ -rtems.S \ -$(C_FILES) $(S_FILES) $(UNUSED_FILES) +EXTRA_DIST = TODO rtems.S $(C_FILES) $(S_FILES) $(UNUSED_FILES) include $(top_srcdir)/../../../../../../automake/local.am diff --git a/c/src/exec/score/cpu/powerpc/old_exception_processing/irq_stub.S b/c/src/exec/score/cpu/powerpc/old_exception_processing/irq_stub.S index 76c8927305..400cccdf73 100644 --- a/c/src/exec/score/cpu/powerpc/old_exception_processing/irq_stub.S +++ b/c/src/exec/score/cpu/powerpc/old_exception_processing/irq_stub.S @@ -55,7 +55,9 @@ lis r11,_CPU_IRQ_info@ha addi r11,r11,_CPU_IRQ_info@l #endif +#if ( PPC_USE_DATA_CACHE ) dcbt r0, r11 +#endif stw r5, IP_CR(r1) stw r6, IP_CTR(r1) stw r7, IP_XER(r1) diff --git a/c/src/exec/score/cpu/powerpc/rtems/score/ppc.h b/c/src/exec/score/cpu/powerpc/rtems/score/ppc.h index ff93f9b1b3..83a54bfa25 100644 --- a/c/src/exec/score/cpu/powerpc/rtems/score/ppc.h +++ b/c/src/exec/score/cpu/powerpc/rtems/score/ppc.h @@ -94,7 +94,28 @@ extern "C" { #define PPC_LOW_POWER_MODE_NONE 0 #define PPC_LOW_POWER_MODE_STANDARD 1 -#if defined(ppc403) +#if defined(rtems_multilib) +/* + * Figure out all CPU Model Feature Flags based upon compiler + * predefines. + */ + +#define CPU_MODEL_NAME "rtems_multilib" +#define PPC_ALIGNMENT 4 +#define PPC_CACHE_ALIGNMENT 16 +#define PPC_HAS_RFCI 1 +#define PPC_HAS_FPU 0 +#define PPC_USE_MULTIPLE 1 +#define PPC_I_CACHE 2048 +#define PPC_D_CACHE 1024 +#define PPC_DEBUG_MODEL PPC_DEBUG_MODEL_STANDARD +#define PPC_HAS_EXCEPTION_PREFIX 0 +#define PPC_HAS_EVPR 0 +#define PPC_INTERRUPT_MAX 16 +#define PPC_LOW_POWER_MODE PPC_LOW_POWER_MODE_STANDARD +#define PPC_HAS_DOUBLE 0 + +#elif defined(ppc403) /* * IBM 403 * @@ -129,7 +150,7 @@ extern "C" { #define PPC_ALIGNMENT 4 #define PPC_CACHE_ALIGNMENT 16 #define PPC_I_CACHE 4096 -#define PPC_I_CACHE 0 +#define PPC_D_CACHE 0 #elif defined(ppc601) @@ -281,6 +302,14 @@ extern "C" { */ #define PPC_ABI_EABI 3 +/* + * Default to the EABI used by current GNU tools + */ + +#ifndef PPC_ABI +#define PPC_ABI PPC_ABI_EABI +#endif + #if (PPC_ABI == PPC_ABI_POWEROPEN) #define PPC_STACK_ALIGNMENT 8 #elif (PPC_ABI == PPC_ABI_GCC27) @@ -309,6 +338,14 @@ extern "C" { #define PPC_ASM_ELF 0 #define PPC_ASM_XCOFF 1 +/* + * Default to the assembler format used by the current GNU tools. + */ + +#ifndef PPC_ASM +#define PPC_ASM PPC_ASM_ELF +#endif + /* * Use the default debug scheme defined in the architectural specification * if another model has not been specified. @@ -449,7 +486,14 @@ extern "C" { #define PPC_IRQ_FIT (PPC_STD_IRQ_LAST+2) /*0x01010- Fixed int. timer */ #define PPC_IRQ_WATCHDOG (PPC_STD_IRQ_LAST+3) /*0x01020- Watchdog timer */ #define PPC_IRQ_DEBUG (PPC_STD_IRQ_LAST+4) /*0x02000- Debug exceptions */ -#define PPC_IRQ_LAST PPC_IRQ_DEBUG +#define PPC_IRQ_LAST PPC_IRQ_DEBUG + +#elif defined(mpc505) || defined(mpc509) +#define PPC_IRQ_SOFTEMU (PPC_STD_IRQ_LAST+1) /* Software emulation. */ +#define PPC_IRQ_DATA_BP (PPC_STD_IRQ_LAST+ 2) +#define PPC_IRQ_INST_BP (PPC_STD_IRQ_LAST+ 3) +#define PPC_IRQ_MEXT_BP (PPC_STD_IRQ_LAST+ 4) +#define PPC_IRQ_NMEXT_BP (PPC_STD_IRQ_LAST+ 5) #elif defined(ppc601) #define PPC_IRQ_TRACE (PPC_STD_IRQ_LAST+1) /*0x02000-Run/Trace Exception*/ diff --git a/c/src/exec/score/cpu/powerpc/shared/Makefile.am b/c/src/exec/score/cpu/powerpc/shared/Makefile.am index a2d0fb5f96..7aae87d8d3 100644 --- a/c/src/exec/score/cpu/powerpc/shared/Makefile.am +++ b/c/src/exec/score/cpu/powerpc/shared/Makefile.am @@ -12,11 +12,9 @@ noinst_HEADERS = $(ROOT_H_FILES) $(RTEMS_SCORE_H_FILES) # (OPTIONAL) Add local stuff here using += # -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE) \ -$(PROJECT_INCLUDE)/rtems/score \ -$(ROOT_H_FILES:%.h=$(PROJECT_INCLUDE)/%.h) \ -$(RTEMS_SCORE_H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) +PREINSTALL_FILES += $(PROJECT_INCLUDE) $(PROJECT_INCLUDE)/rtems/score \ + $(ROOT_H_FILES:%.h=$(PROJECT_INCLUDE)/%.h) \ + $(RTEMS_SCORE_H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) $(PROJECT_INCLUDE): $(mkinstalldirs) $@ diff --git a/c/src/exec/score/cpu/powerpc/shared/ppc.h b/c/src/exec/score/cpu/powerpc/shared/ppc.h index ff93f9b1b3..83a54bfa25 100644 --- a/c/src/exec/score/cpu/powerpc/shared/ppc.h +++ b/c/src/exec/score/cpu/powerpc/shared/ppc.h @@ -94,7 +94,28 @@ extern "C" { #define PPC_LOW_POWER_MODE_NONE 0 #define PPC_LOW_POWER_MODE_STANDARD 1 -#if defined(ppc403) +#if defined(rtems_multilib) +/* + * Figure out all CPU Model Feature Flags based upon compiler + * predefines. + */ + +#define CPU_MODEL_NAME "rtems_multilib" +#define PPC_ALIGNMENT 4 +#define PPC_CACHE_ALIGNMENT 16 +#define PPC_HAS_RFCI 1 +#define PPC_HAS_FPU 0 +#define PPC_USE_MULTIPLE 1 +#define PPC_I_CACHE 2048 +#define PPC_D_CACHE 1024 +#define PPC_DEBUG_MODEL PPC_DEBUG_MODEL_STANDARD +#define PPC_HAS_EXCEPTION_PREFIX 0 +#define PPC_HAS_EVPR 0 +#define PPC_INTERRUPT_MAX 16 +#define PPC_LOW_POWER_MODE PPC_LOW_POWER_MODE_STANDARD +#define PPC_HAS_DOUBLE 0 + +#elif defined(ppc403) /* * IBM 403 * @@ -129,7 +150,7 @@ extern "C" { #define PPC_ALIGNMENT 4 #define PPC_CACHE_ALIGNMENT 16 #define PPC_I_CACHE 4096 -#define PPC_I_CACHE 0 +#define PPC_D_CACHE 0 #elif defined(ppc601) @@ -281,6 +302,14 @@ extern "C" { */ #define PPC_ABI_EABI 3 +/* + * Default to the EABI used by current GNU tools + */ + +#ifndef PPC_ABI +#define PPC_ABI PPC_ABI_EABI +#endif + #if (PPC_ABI == PPC_ABI_POWEROPEN) #define PPC_STACK_ALIGNMENT 8 #elif (PPC_ABI == PPC_ABI_GCC27) @@ -309,6 +338,14 @@ extern "C" { #define PPC_ASM_ELF 0 #define PPC_ASM_XCOFF 1 +/* + * Default to the assembler format used by the current GNU tools. + */ + +#ifndef PPC_ASM +#define PPC_ASM PPC_ASM_ELF +#endif + /* * Use the default debug scheme defined in the architectural specification * if another model has not been specified. @@ -449,7 +486,14 @@ extern "C" { #define PPC_IRQ_FIT (PPC_STD_IRQ_LAST+2) /*0x01010- Fixed int. timer */ #define PPC_IRQ_WATCHDOG (PPC_STD_IRQ_LAST+3) /*0x01020- Watchdog timer */ #define PPC_IRQ_DEBUG (PPC_STD_IRQ_LAST+4) /*0x02000- Debug exceptions */ -#define PPC_IRQ_LAST PPC_IRQ_DEBUG +#define PPC_IRQ_LAST PPC_IRQ_DEBUG + +#elif defined(mpc505) || defined(mpc509) +#define PPC_IRQ_SOFTEMU (PPC_STD_IRQ_LAST+1) /* Software emulation. */ +#define PPC_IRQ_DATA_BP (PPC_STD_IRQ_LAST+ 2) +#define PPC_IRQ_INST_BP (PPC_STD_IRQ_LAST+ 3) +#define PPC_IRQ_MEXT_BP (PPC_STD_IRQ_LAST+ 4) +#define PPC_IRQ_NMEXT_BP (PPC_STD_IRQ_LAST+ 5) #elif defined(ppc601) #define PPC_IRQ_TRACE (PPC_STD_IRQ_LAST+1) /*0x02000-Run/Trace Exception*/ diff --git a/c/src/exec/score/cpu/sh/Makefile.am b/c/src/exec/score/cpu/sh/Makefile.am index 680b7151dc..d6c8f3ae05 100644 --- a/c/src/exec/score/cpu/sh/Makefile.am +++ b/c/src/exec/score/cpu/sh/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal @@ -35,7 +35,8 @@ PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%) TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o -all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES) +all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) \ + $(TMPINSTALL_FILES) .PRECIOUS: $(REL) diff --git a/c/src/exec/score/cpu/sh/rtems/Makefile.am b/c/src/exec/score/cpu/sh/rtems/Makefile.am index 900930a502..ef7df82af7 100644 --- a/c/src/exec/score/cpu/sh/rtems/Makefile.am +++ b/c/src/exec/score/cpu/sh/rtems/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/exec/score/cpu/sh/rtems/score/Makefile.am b/c/src/exec/score/cpu/sh/rtems/score/Makefile.am index 3008d9cef9..f650704221 100644 --- a/c/src/exec/score/cpu/sh/rtems/score/Makefile.am +++ b/c/src/exec/score/cpu/sh/rtems/score/Makefile.am @@ -1,23 +1,20 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 H_FILES = cpu.h shtypes.h sh.h sh_io.h isp$(RTEMS_CPU_MODEL).h \ io$(RTEMS_CPU_MODEL).h -noinst_HEADERS = \ - cpu.h shtypes.h sh.h sh_io.h \ - iosh7032.h ispsh7032.h \ +noinst_HEADERS = cpu.h shtypes.h sh.h sh_io.h iosh7032.h ispsh7032.h \ iosh7045.h ispsh7045.h # # (OPTIONAL) Add local stuff here using += # -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE)/rtems/score \ -$(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \ + $(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) $(PROJECT_INCLUDE)/rtems/score: $(mkinstalldirs) $@ diff --git a/c/src/exec/score/cpu/sh/rtems/score/sh.h b/c/src/exec/score/cpu/sh/rtems/score/sh.h index 4417e6a99d..26c633c190 100644 --- a/c/src/exec/score/cpu/sh/rtems/score/sh.h +++ b/c/src/exec/score/cpu/sh/rtems/score/sh.h @@ -39,7 +39,17 @@ extern "C" { * dependent features are present in a particular member of the family. */ -#if defined(sh7032) +#if defined(rtems_multilib) +/* + * Figure out all CPU Model Feature Flags based upon compiler + * predefines. + */ + +#define CPU_MODEL_NAME "rtems_multilib" +#define SH_HAS_FPU 0 +#define SH_HAS_SEPARATE_STACKS 1 + +#elif defined(sh7032) #define CPU_MODEL_NAME "SH7032" #define SH_HAS_FPU 0 diff --git a/c/src/exec/score/cpu/sparc/Makefile.am b/c/src/exec/score/cpu/sparc/Makefile.am index 6ae4472920..493f2c8e76 100644 --- a/c/src/exec/score/cpu/sparc/Makefile.am +++ b/c/src/exec/score/cpu/sparc/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal @@ -38,7 +38,8 @@ PREINSTALL_FILES += $(PROJECT_INCLUDE) $(H_FILES:%=$(PROJECT_INCLUDE)/%) TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o -all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) $(TMPINSTALL_FILES) +all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) \ + $(TMPINSTALL_FILES) .PRECIOUS: $(REL) diff --git a/c/src/exec/score/cpu/sparc/rtems/Makefile.am b/c/src/exec/score/cpu/sparc/rtems/Makefile.am index 900930a502..ef7df82af7 100644 --- a/c/src/exec/score/cpu/sparc/rtems/Makefile.am +++ b/c/src/exec/score/cpu/sparc/rtems/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/exec/score/cpu/sparc/rtems/score/Makefile.am b/c/src/exec/score/cpu/sparc/rtems/score/Makefile.am index 602dce7cd5..f73fc35933 100644 --- a/c/src/exec/score/cpu/sparc/rtems/score/Makefile.am +++ b/c/src/exec/score/cpu/sparc/rtems/score/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -11,9 +11,8 @@ noinst_HEADERS = $(H_FILES) # (OPTIONAL) Add local stuff here using += # -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE)/rtems/score \ -$(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \ + $(H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) $(PROJECT_INCLUDE)/rtems/score: $(mkinstalldirs) $@ diff --git a/c/src/exec/score/cpu/sparc/rtems/score/sparc.h b/c/src/exec/score/cpu/sparc/rtems/score/sparc.h index 0cb44c2df9..9fa52533cd 100644 --- a/c/src/exec/score/cpu/sparc/rtems/score/sparc.h +++ b/c/src/exec/score/cpu/sparc/rtems/score/sparc.h @@ -54,7 +54,19 @@ extern "C" { * */ -#if defined(erc32) +#if defined(rtems_multilib) +/* + * Figure out all CPU Model Feature Flags based upon compiler + * predefines. + */ + +#define CPU_MODEL_NAME "rtems_multilib" +#define SPARC_HAS_FPU 1 +#define SPARC_HAS_BITSCAN 0 +#define SPARC_NUMBER_OF_REGISTER_WINDOWS 8 +#define SPARC_HAS_LOW_POWER_MODE 1 + +#elif defined(erc32) #define CPU_MODEL_NAME "erc32" #define SPARC_HAS_FPU 1 diff --git a/c/src/exec/score/cpu/unix/Makefile.am b/c/src/exec/score/cpu/unix/Makefile.am index e619852a38..3aadc93da0 100644 --- a/c/src/exec/score/cpu/unix/Makefile.am +++ b/c/src/exec/score/cpu/unix/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal diff --git a/c/src/exec/score/cpu/unix/cpu.c b/c/src/exec/score/cpu/unix/cpu.c index 7f9f9c8047..96c706451d 100644 --- a/c/src/exec/score/cpu/unix/cpu.c +++ b/c/src/exec/score/cpu/unix/cpu.c @@ -42,7 +42,7 @@ typedef struct { jmp_buf regs; - int isr_level; + int isr_level; } Context_Control_overlay; void _CPU_Signal_initialize(void); @@ -99,7 +99,9 @@ void _CPU_ISR_From_CPU_Init() (void) sigfillset(&_CPU_Signal_mask); (void) sigdelset(&_CPU_Signal_mask, SIGTRAP); (void) sigdelset(&_CPU_Signal_mask, SIGABRT); +#if !defined(__CYGWIN__) (void) sigdelset(&_CPU_Signal_mask, SIGIOT); +#endif (void) sigdelset(&_CPU_Signal_mask, SIGCONT); (void) sigdelset(&_CPU_Signal_mask, SIGSEGV); (void) sigdelset(&_CPU_Signal_mask, SIGBUS); @@ -198,7 +200,9 @@ void _CPU_Context_From_CPU_Init() * get default values to use in _CPU_Context_Initialize() */ - + if ( sizeof(Context_Control_overlay) < sizeof(Context_Control) ) + _CPU_Fatal_halt( 0xdeadfood ); + (void) memset( &_CPU_Context_Default_with_ISRs_enabled, 0, @@ -274,6 +278,15 @@ void _CPU_Initialize( void (*thread_dispatch) /* ignored on this CPU */ ) { + /* + * If something happened where the public Context_Control is not + * at least as large as the private Context_Control_overlay, then + * we are in trouble. + */ + + if ( sizeof(Context_Control_overlay) > sizeof(Context_Control) ) + _CPU_Fatal_error(0x100 + 1); + /* * 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 @@ -482,11 +495,11 @@ void _CPU_Context_Initialize( */ if ( _new_level == 0 ) - *_the_context = *(Context_Control *) - &_CPU_Context_Default_with_ISRs_enabled; + *(Context_Control_overlay *)_the_context = + _CPU_Context_Default_with_ISRs_enabled; else - *_the_context = *(Context_Control *) - &_CPU_Context_Default_with_ISRs_disabled; + *(Context_Control_overlay *)_the_context = + _CPU_Context_Default_with_ISRs_disabled; addr = (unsigned32 *)_the_context; @@ -806,7 +819,9 @@ void _CPU_Stray_signal(int sig_num) case SIGBUS: case SIGSEGV: case SIGTERM: +#if !defined(__CYGWIN__) case SIGIOT: +#endif _CPU_Fatal_error(0x100 + sig_num); } } diff --git a/c/src/exec/score/cpu/unix/rtems/Makefile.am b/c/src/exec/score/cpu/unix/rtems/Makefile.am index 900930a502..ef7df82af7 100644 --- a/c/src/exec/score/cpu/unix/rtems/Makefile.am +++ b/c/src/exec/score/cpu/unix/rtems/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/exec/score/cpu/unix/rtems/score/Makefile.am b/c/src/exec/score/cpu/unix/rtems/score/Makefile.am index 06c1e6e614..52d5d046ef 100644 --- a/c/src/exec/score/cpu/unix/rtems/score/Makefile.am +++ b/c/src/exec/score/cpu/unix/rtems/score/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -20,10 +20,9 @@ unixsize.h: $(GENSIZE) cpu.h CLEANFILES = unixsize.h -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE)/rtems/score \ -$(STATIC_H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) \ -$(GENERIC_H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \ + $(STATIC_H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) \ + $(GENERIC_H_FILES:%.h=$(PROJECT_INCLUDE)/rtems/score/%.h) $(PROJECT_INCLUDE)/rtems/score: $(mkinstalldirs) $@ diff --git a/c/src/exec/score/cpu/unix/rtems/score/cpu.h b/c/src/exec/score/cpu/unix/rtems/score/cpu.h index 75eb07af74..698d900515 100644 --- a/c/src/exec/score/cpu/unix/rtems/score/cpu.h +++ b/c/src/exec/score/cpu/unix/rtems/score/cpu.h @@ -378,7 +378,7 @@ extern "C" { #endif /* - * For Linux 1.1 + * For i386 targets */ #ifdef RTEMS_UNIXLIB @@ -389,7 +389,18 @@ extern "C" { #define ESP_OFF 3 #define ESI_OFF 4 #define EDI_OFF 5 +#elif defined(__CYGWIN__) +#define EAX_OFF 0 +#define EBX_OFF 1 +#define ECX_OFF 2 +#define EDX_OFF 3 +#define ESI_OFF 4 +#define EDI_OFF 5 +#define EBP_OFF 6 +#define ESP_OFF 7 +#define RET_OFF 8 #else +/* Linux */ #define EBX_OFF 0 #define ESI_OFF 1 #define EDI_OFF 2 diff --git a/c/src/exec/score/cpu/unix/rtems/score/unix.h b/c/src/exec/score/cpu/unix/rtems/score/unix.h index 26ef8ca4e4..e8a0c7bdd6 100644 --- a/c/src/exec/score/cpu/unix/rtems/score/unix.h +++ b/c/src/exec/score/cpu/unix/rtems/score/unix.h @@ -29,7 +29,15 @@ extern "C" { * of the family. */ -#if defined(hpux) +#if defined(rtems_multilib) +/* + * Figure out all CPU Model Feature Flags based upon compiler + * predefines. + */ + +#define CPU_MODEL_NAME "rtems_multilib" + +#elif defined(hpux) #define CPU_MODEL_NAME "HP-UX" @@ -37,13 +45,13 @@ extern "C" { #define CPU_MODEL_NAME "Solaris" -#elif defined(__linux__) +#elif defined(__linux__) || defined(linux) #define CPU_MODEL_NAME "Linux" -#elif defined(linux) +#elif defined(__CYGWIN__) -#define CPU_MODEL_NAME "Linux" +#define CPU_MODEL_NAME "Cygwin" #elif defined(__FreeBSD__) diff --git a/c/src/exec/score/include/rtems/Makefile.am b/c/src/exec/score/include/rtems/Makefile.am index f09b99a313..f4ac2b1717 100644 --- a/c/src/exec/score/include/rtems/Makefile.am +++ b/c/src/exec/score/include/rtems/Makefile.am @@ -8,18 +8,15 @@ H_FILES = debug.h system.h noinst_HEADERS = $(H_FILES) -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE)/rtems \ -$(noinst_HEADERS:%=$(PROJECT_INCLUDE)/rtems/%) +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems \ + $(noinst_HEADERS:%=$(PROJECT_INCLUDE)/rtems/%) $(PROJECT_INCLUDE)/rtems: @$(mkinstalldirs) $@ $(PROJECT_INCLUDE)/rtems/%.h: %.h $(INSTALL_DATA) $< $@ -all-am: $(PREINSTALL_FILES) -debug-am: $(PREINSTALL_FILES) -profile-am: $(PREINSTALL_FILES) +all-local: $(PREINSTALL_FILES) SUBDIRS = score diff --git a/c/src/exec/score/include/rtems/score/Makefile.am b/c/src/exec/score/include/rtems/score/Makefile.am index 4507d51b33..01468381c6 100644 --- a/c/src/exec/score/include/rtems/score/Makefile.am +++ b/c/src/exec/score/include/rtems/score/Makefile.am @@ -11,10 +11,10 @@ include $(RTEMS_ROOT)/make/leaf.cfg MP_H_FILES = mpci.h mppkt.h objectmp.h threadmp.h # H_FILES that get installed in the rtems/score subdirectoy -STD_H_FILES = address.h apiext.h bitfield.h chain.h context.h copyrt.h coremsg.h \ - coremutex.h coresem.h heap.h interr.h isr.h object.h priority.h stack.h \ - states.h sysstate.h thread.h threadq.h tod.h tqdata.h userext.h \ - watchdog.h wkspace.h +STD_H_FILES = address.h apiext.h bitfield.h chain.h context.h copyrt.h \ + coremsg.h coremutex.h coresem.h heap.h interr.h isr.h object.h \ + priority.h stack.h states.h sysstate.h thread.h threadq.h tod.h tqdata.h \ + userext.h watchdog.h wkspace.h TARGOPTS = targopts.h if HAS_MP @@ -23,9 +23,8 @@ else H_FILES = $(STD_H_FILES) $(TARGOPTS) endif -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE)/rtems/score \ -$(H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%) +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \ + $(H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%) $(PROJECT_INCLUDE)/rtems/score: @$(mkinstalldirs) $@ @@ -45,7 +44,7 @@ CLEANFILES += $(TARGOPTS) RTEMS_CPU_DEFINED = $(subst .,_,$(RTEMS_CPU)) # make the target dependent options file -$(TARGOPTS): +$(TARGOPTS): @echo "/* target board dependent options file */" >$@ @echo "/* automatically generated -- DO NOT EDIT!! */" >>$@ @echo >>$@ @@ -89,7 +88,7 @@ $(TARGOPTS): @echo >>$@ @echo "#endif" >>$@ -all: $(PREINSTALL_FILES) +all-local: $(PREINSTALL_FILES) EXTRA_DIST = $(STD_H_FILES) $(MP_H_FILES) diff --git a/c/src/exec/score/include/rtems/score/thread.h b/c/src/exec/score/include/rtems/score/thread.h index ec48864a9f..4c8032f558 100644 --- a/c/src/exec/score/include/rtems/score/thread.h +++ b/c/src/exec/score/include/rtems/score/thread.h @@ -94,7 +94,8 @@ struct rtems_task_variable_tt; struct rtems_task_variable_tt { struct rtems_task_variable_tt *next; void **ptr; - void *var; + void *gval; + void *tval; void (*dtor)(void *); }; diff --git a/c/src/exec/score/include/rtems/system.h b/c/src/exec/score/include/rtems/system.h index 6db19e8c62..b1a2382ea4 100644 --- a/c/src/exec/score/include/rtems/system.h +++ b/c/src/exec/score/include/rtems/system.h @@ -187,10 +187,10 @@ SCORE_EXTERN rtems_cpu_table _CPU_Table; /* CPU dependent info */ (_CPU_Table.stack_free_hook) /* - * XXX weird RTEMS stuff + * XXX weird RTEMS stuff that probably should be somewhere else. */ -#define RTEMS_MAXIMUM_NAME_LENGTH 4 +#define RTEMS_MAXIMUM_NAME_LENGTH sizeof(rtems_name) #ifdef __cplusplus } diff --git a/c/src/exec/score/inline/rtems/score/Makefile.am b/c/src/exec/score/inline/rtems/score/Makefile.am index e7dc3a2cde..6b6083f625 100644 --- a/c/src/exec/score/inline/rtems/score/Makefile.am +++ b/c/src/exec/score/inline/rtems/score/Makefile.am @@ -21,9 +21,8 @@ endif noinst_HEADERS = $(STD_I_FILES) $(MP_I_FILES) if INLINE -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE)/rtems/score \ -$(I_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%) +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \ + $(I_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%) $(PROJECT_INCLUDE)/rtems/score: @$(mkinstalldirs) $@ @@ -31,8 +30,6 @@ $(PROJECT_INCLUDE)/rtems/score/%.inl: %.inl $(INSTALL_DATA) $< $@ endif -all-am: $(PREINSTALL_FILES) -debug-am: $(PREINSTALL_FILES) -profile-am: $(PREINSTALL_FILES) +all-local: $(PREINSTALL_FILES) include $(top_srcdir)/../../../automake/local.am diff --git a/c/src/exec/score/macros/rtems/score/Makefile.am b/c/src/exec/score/macros/rtems/score/Makefile.am index 0ac48e0386..4260e15c08 100644 --- a/c/src/exec/score/macros/rtems/score/Makefile.am +++ b/c/src/exec/score/macros/rtems/score/Makefile.am @@ -7,9 +7,10 @@ AUTOMAKE_OPTIONS = foreign 1.4 ## We only build multiprocessing related files if HAS_MP was defined MP_I_FILES = mppkt.inl objectmp.inl threadmp.inl -STD_I_FILES = address.inl chain.inl coremsg.inl coremutex.inl coresem.inl heap.inl \ - isr.inl object.inl priority.inl stack.inl states.inl sysstate.inl \ - thread.inl tod.inl tqdata.inl userext.inl watchdog.inl wkspace.inl +STD_I_FILES = address.inl chain.inl coremsg.inl coremutex.inl coresem.inl \ + heap.inl isr.inl object.inl priority.inl stack.inl states.inl \ + sysstate.inl thread.inl tod.inl tqdata.inl userext.inl watchdog.inl \ + wkspace.inl noinst_HEADERS = $(STD_I_FILES) $(MP_I_FILES) @@ -20,9 +21,8 @@ else I_FILES = $(STD_I_FILES endif -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE)/rtems/score \ -$(I_FILES:%=$(PROJECT_INCLUDE)/rtems/score%) +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \ + $(I_FILES:%=$(PROJECT_INCLUDE)/rtems/score%) $(PROJECT_INCLUDE)/rtems/score: @$(mkinstalldirs) $@ @@ -30,8 +30,6 @@ $(PROJECT_INCLUDE)/rtems/score/%.inl: %.inl $(INSTALL_DATA) $< $@ endif -all-am: $(PREINSTALL_FILES) -debug-am: $(PREINSTALL_FILES) -profile-am: $(PREINSTALL_FILES) +all-local: $(PREINSTALL_FILES) include $(top_srcdir)/../../../automake/local.am diff --git a/c/src/exec/score/macros/rtems/score/address.inl b/c/src/exec/score/macros/rtems/score/address.inl index 379aaca6cc..2f14aa633a 100644 --- a/c/src/exec/score/macros/rtems/score/address.inl +++ b/c/src/exec/score/macros/rtems/score/address.inl @@ -52,7 +52,7 @@ */ #define _Addresses_Is_aligned( _address ) \ - ( ( (unsigned32)(_address) % 4 ) == 0 ) + ( ( (unsigned32)(_address) % CPU_ALIGNMENT ) == 0 ) /*PAGE * diff --git a/c/src/exec/score/src/Makefile.am b/c/src/exec/score/src/Makefile.am index f5914fdb37..c348a606f1 100644 --- a/c/src/exec/score/src/Makefile.am +++ b/c/src/exec/score/src/Makefile.am @@ -71,9 +71,8 @@ OBJS = $(C_O_FILES) # AM_CPPFLAGS += -D__RTEMS_INSIDE__ -AM_CFLAGS += $(CFLAGS_OS_V) -all: ${ARCH} ${OBJS} +all-local: ${ARCH} ${OBJS} EXTRA_DIST = $(STD_C_FILES) $(MP_C_FILES) Unlimited.txt diff --git a/c/src/exec/score/src/objectcopynamestring.c b/c/src/exec/score/src/objectcopynamestring.c index cd0779d546..eb196f3d25 100644 --- a/c/src/exec/score/src/objectcopynamestring.c +++ b/c/src/exec/score/src/objectcopynamestring.c @@ -39,7 +39,10 @@ void _Objects_Copy_name_string( unsigned8 *source_p = (unsigned8 *) source; unsigned8 *destination_p = (unsigned8 *) destination; - do { - *destination_p++ = *source_p; - } while ( *source_p++ ); + *destination_p = '\0'; + if ( source_p ) { + do { + *destination_p++ = *source_p; + } while ( *source_p++ ); + } } -- cgit v1.2.3