summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/exec/score')
-rw-r--r--c/src/exec/score/cpu/hppa1.1/cpu.c365
-rw-r--r--c/src/exec/score/cpu/hppa1.1/cpu.h619
-rw-r--r--c/src/exec/score/cpu/hppa1.1/cpu_asm.h73
-rw-r--r--c/src/exec/score/cpu/hppa1.1/cpu_asm.s794
-rw-r--r--c/src/exec/score/cpu/hppa1.1/hppa.h722
-rw-r--r--c/src/exec/score/cpu/hppa1.1/hppatypes.h46
-rw-r--r--c/src/exec/score/cpu/hppa1.1/rtems.s53
-rw-r--r--c/src/exec/score/cpu/powerpc/README71
-rw-r--r--c/src/exec/score/cpu/powerpc/TODO7
-rw-r--r--c/src/exec/score/cpu/powerpc/cpu.c264
-rw-r--r--c/src/exec/score/cpu/powerpc/cpu.h1019
-rw-r--r--c/src/exec/score/cpu/powerpc/cpu_asm.s749
-rw-r--r--c/src/exec/score/cpu/powerpc/irq_stub.s228
-rw-r--r--c/src/exec/score/cpu/powerpc/ppc.h318
-rw-r--r--c/src/exec/score/cpu/powerpc/ppctypes.h74
-rw-r--r--c/src/exec/score/cpu/powerpc/rtems.s132
-rw-r--r--c/src/exec/score/cpu/sparc/README110
-rw-r--r--c/src/exec/score/cpu/sparc/asm.h111
-rw-r--r--c/src/exec/score/cpu/sparc/cpu.c404
-rw-r--r--c/src/exec/score/cpu/sparc/cpu.h993
-rw-r--r--c/src/exec/score/cpu/sparc/cpu_asm.s704
-rw-r--r--c/src/exec/score/cpu/sparc/erc32.h518
-rw-r--r--c/src/exec/score/cpu/sparc/rtems.s58
-rw-r--r--c/src/exec/score/cpu/sparc/sparc.h275
-rw-r--r--c/src/exec/score/cpu/sparc/sparctypes.h64
-rw-r--r--c/src/exec/score/include/rtems/debug.h98
-rw-r--r--c/src/exec/score/include/rtems/score/address.h107
-rw-r--r--c/src/exec/score/include/rtems/score/apiext.h86
-rw-r--r--c/src/exec/score/include/rtems/score/bitfield.h98
-rw-r--r--c/src/exec/score/include/rtems/score/chain.h432
-rw-r--r--c/src/exec/score/include/rtems/score/context.h134
-rw-r--r--c/src/exec/score/include/rtems/score/copyrt.h42
-rw-r--r--c/src/exec/score/include/rtems/score/coremsg.h444
-rw-r--r--c/src/exec/score/include/rtems/score/coremutex.h247
-rw-r--r--c/src/exec/score/include/rtems/score/coresem.h179
-rw-r--r--c/src/exec/score/include/rtems/score/heap.h406
-rw-r--r--c/src/exec/score/include/rtems/score/interr.h93
-rw-r--r--c/src/exec/score/include/rtems/score/isr.h263
-rw-r--r--c/src/exec/score/include/rtems/score/mpci.h280
-rw-r--r--c/src/exec/score/include/rtems/score/mppkt.h124
-rw-r--r--c/src/exec/score/include/rtems/score/object.h564
-rw-r--r--c/src/exec/score/include/rtems/score/objectmp.h186
-rw-r--r--c/src/exec/score/include/rtems/score/priority.h234
-rw-r--r--c/src/exec/score/include/rtems/score/stack.h95
-rw-r--r--c/src/exec/score/include/rtems/score/states.h354
-rw-r--r--c/src/exec/score/include/rtems/score/sysstate.h162
-rw-r--r--c/src/exec/score/include/rtems/score/thread.h769
-rw-r--r--c/src/exec/score/include/rtems/score/threadmp.h114
-rw-r--r--c/src/exec/score/include/rtems/score/threadq.h301
-rw-r--r--c/src/exec/score/include/rtems/score/tod.h302
-rw-r--r--c/src/exec/score/include/rtems/score/tqdata.h117
-rw-r--r--c/src/exec/score/include/rtems/score/userext.h295
-rw-r--r--c/src/exec/score/include/rtems/score/watchdog.h403
-rw-r--r--c/src/exec/score/include/rtems/score/wkspace.h97
-rw-r--r--c/src/exec/score/include/rtems/system.h134
-rw-r--r--c/src/exec/score/inline/rtems/score/address.inl93
-rw-r--r--c/src/exec/score/inline/rtems/score/chain.inl292
-rw-r--r--c/src/exec/score/inline/rtems/score/coremsg.inl216
-rw-r--r--c/src/exec/score/inline/rtems/score/coremutex.inl104
-rw-r--r--c/src/exec/score/inline/rtems/score/coresem.inl47
-rw-r--r--c/src/exec/score/inline/rtems/score/heap.inl219
-rw-r--r--c/src/exec/score/inline/rtems/score/isr.inl58
-rw-r--r--c/src/exec/score/inline/rtems/score/mppkt.inl49
-rw-r--r--c/src/exec/score/inline/rtems/score/object.inl199
-rw-r--r--c/src/exec/score/inline/rtems/score/objectmp.inl62
-rw-r--r--c/src/exec/score/inline/rtems/score/priority.inl203
-rw-r--r--c/src/exec/score/inline/rtems/score/stack.inl63
-rw-r--r--c/src/exec/score/inline/rtems/score/states.inl298
-rw-r--r--c/src/exec/score/inline/rtems/score/sysstate.inl116
-rw-r--r--c/src/exec/score/inline/rtems/score/thread.inl287
-rw-r--r--c/src/exec/score/inline/rtems/score/threadmp.inl53
-rw-r--r--c/src/exec/score/inline/rtems/score/tod.inl68
-rw-r--r--c/src/exec/score/inline/rtems/score/tqdata.inl74
-rw-r--r--c/src/exec/score/inline/rtems/score/userext.inl127
-rw-r--r--c/src/exec/score/inline/rtems/score/watchdog.inl255
-rw-r--r--c/src/exec/score/inline/rtems/score/wkspace.inl91
-rw-r--r--c/src/exec/score/macros/rtems/score/README18
-rw-r--r--c/src/exec/score/macros/rtems/score/address.inl68
-rw-r--r--c/src/exec/score/macros/rtems/score/chain.inl200
-rw-r--r--c/src/exec/score/macros/rtems/score/coremsg.inl143
-rw-r--r--c/src/exec/score/macros/rtems/score/coremutex.inl77
-rw-r--r--c/src/exec/score/macros/rtems/score/coresem.inl40
-rw-r--r--c/src/exec/score/macros/rtems/score/heap.inl150
-rw-r--r--c/src/exec/score/macros/rtems/score/isr.inl48
-rw-r--r--c/src/exec/score/macros/rtems/score/mppkt.inl41
-rw-r--r--c/src/exec/score/macros/rtems/score/object.inl148
-rw-r--r--c/src/exec/score/macros/rtems/score/objectmp.inl50
-rw-r--r--c/src/exec/score/macros/rtems/score/priority.inl170
-rw-r--r--c/src/exec/score/macros/rtems/score/stack.inl50
-rw-r--r--c/src/exec/score/macros/rtems/score/states.inl210
-rw-r--r--c/src/exec/score/macros/rtems/score/sysstate.inl90
-rw-r--r--c/src/exec/score/macros/rtems/score/thread.inl201
-rw-r--r--c/src/exec/score/macros/rtems/score/threadmp.inl50
-rw-r--r--c/src/exec/score/macros/rtems/score/tod.inl58
-rw-r--r--c/src/exec/score/macros/rtems/score/tqdata.inl60
-rw-r--r--c/src/exec/score/macros/rtems/score/userext.inl135
-rw-r--r--c/src/exec/score/macros/rtems/score/watchdog.inl172
-rw-r--r--c/src/exec/score/macros/rtems/score/wkspace.inl80
-rw-r--r--c/src/exec/score/src/coretod.c235
-rw-r--r--c/src/exec/score/tools/hppa1.1/genoffsets.c317
100 files changed, 0 insertions, 21716 deletions
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 48e09b908a..0000000000
--- a/c/src/exec/score/cpu/hppa1.1/cpu.c
+++ /dev/null
@@ -1,365 +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 <rtems/system.h>
-#include <rtems/score/isr.h>
-
-void hppa_external_interrupt_initialize(void);
-void hppa_external_interrupt_enable(unsigned32);
-void hppa_external_interrupt_disable(unsigned32);
-void hppa_external_interrupt(unsigned32, CPU_Interrupt_frame *);
-void hppa_cpu_halt(unsigned32);
-
-/*
- * The first level interrupt handler for first 32 interrupts/traps.
- * Indexed by vector; generally each entry is _Generic_ISR_Handler.
- * Some TLB traps may have their own first level handler.
- */
-
-extern void _Generic_ISR_Handler(void);
-unsigned32 HPPA_first_level_interrupt_handler[HPPA_INTERNAL_INTERRUPTS];
-
-/* _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;
- unsigned32 iva;
- unsigned32 iva_table;
- int i;
-
- extern void IVA_Table(void);
-
- /*
- * XXX; need to setup fpsr smarter perhaps
- */
-
- fp_context = (unsigned8*) &_CPU_Null_fp_context;
- for (i=0 ; i<sizeof(Context_Control_fp); i++)
- *fp_context++ = 0;
-
- /*
- * Set _CPU_Default_gr27 here so it will hopefully be the correct
- * global data pointer for the entire system.
- */
-
- asm volatile( "stw %%r27,%0" : "=m" (_CPU_Default_gr27): );
-
- /*
- * Init the first level interrupt handlers
- */
-
- for (i=0; i <= HPPA_INTERNAL_INTERRUPTS; i++)
- HPPA_first_level_interrupt_handler[i] = (unsigned32) _Generic_ISR_Handler;
-
- /*
- * Init the 2nd level interrupt handlers
- */
-
- for (i=0; i <= CPU_INTERRUPT_NUMBER_OF_VECTORS; i++)
- _ISR_Vector_table[i] = (ISR_Handler_entry) hppa_cpu_halt;
-
- /*
- * Stabilize the interrupt stuff
- */
-
- (void) hppa_external_interrupt_initialize();
-
- /*
- * Set the IVA to point to physical address of the IVA_Table
- */
-
- iva_table = (unsigned32) IVA_Table;
-#if defined(hppa1_1)
- /*
- * HACK: (from PA72000 TRM, page 4-19)
- * "The hardware TLB miss handler will never attempt to service
- * a non-access TLB miss or a TLB protection violation. It
- * will only attempt to service TLB accesses that would cause
- * Trap Numbers 6 (Instruction TLB miss) and 15 (Data TLB miss)."
- *
- * The LPA instruction is used to translate a virtual address to
- * a physical address, however, if the requested virtual address
- * is not currently resident in the TLB, the hardware TLB miss
- * handler will NOT insert it. In this situation Trap Number
- * #17 is invoked (Non-access Data TLB miss fault).
- *
- * To work around this, a dummy data access is first performed
- * to the virtual address prior to the LPA. The dummy access
- * causes the TLB entry to be inserted (if not already present)
- * and then the following LPA instruction will not generate
- * a non-access data TLB miss fault.
- *
- * It is unclear whether or not this behaves the same way for
- * the PA8000.
- *
- */
- iva = *(volatile unsigned32 *)iva_table; /* dummy access */
-#endif
-
- HPPA_ASM_LPA(0, iva_table, iva);
- set_iva(iva);
-
- _CPU_Table = *cpu_table;
-}
-
-/*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_raw_handler
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- /*
- * This is unsupported.
- */
-
- _CPU_Fatal_halt( 0xdeaddead );
-}
-
-/*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
- *
- */
-
-/*
- * HPPA has 8w for each vector instead of an address to jump to.
- * We put the actual ISR address in '_ISR_vector_table'. This will
- * be pulled by the code in the vector.
- */
-
-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;
-
- if (vector >= HPPA_INTERRUPT_EXTERNAL_BASE)
- {
- unsigned32 external_vector;
-
- external_vector = vector - HPPA_INTERRUPT_EXTERNAL_BASE;
- if (new_handler)
- hppa_external_interrupt_enable(external_vector);
- else
- /* XXX this can never happen due to _ISR_Is_valid_user_handler */
- hppa_external_interrupt_disable(external_vector);
- }
-}
-
-
-/*
- * Support for external and spurious interrupts on HPPA
- *
- * TODO:
- * Count interrupts
- * make sure interrupts disabled properly
- */
-
-#define DISMISS(mask) set_eirr(mask)
-#define DISABLE(mask) set_eiem(get_eiem() & ~(mask))
-#define ENABLE(mask) set_eiem(get_eiem() | (mask))
-#define VECTOR_TO_MASK(v) (1 << (31 - (v)))
-
-/*
- * Init the external interrupt scheme
- * called by bsp_start()
- */
-
-void
-hppa_external_interrupt_initialize(void)
-{
- proc_ptr ignore;
-
- /* mark them all unused */
- DISABLE(~0);
- DISMISS(~0);
-
- /* install the external interrupt handler */
- _CPU_ISR_install_vector(
- HPPA_INTERRUPT_EXTERNAL_INTERRUPT,
- (proc_ptr)hppa_external_interrupt, &ignore
-);
-}
-
-/*
- * Enable a specific external interrupt
- */
-
-void
-hppa_external_interrupt_enable(unsigned32 v)
-{
- unsigned32 isrlevel;
-
- _CPU_ISR_Disable(isrlevel);
- ENABLE(VECTOR_TO_MASK(v));
- _CPU_ISR_Enable(isrlevel);
-}
-
-/*
- * Does not clear or otherwise affect any pending requests
- */
-
-void
-hppa_external_interrupt_disable(unsigned32 v)
-{
- unsigned32 isrlevel;
-
- _CPU_ISR_Disable(isrlevel);
- DISABLE(VECTOR_TO_MASK(v));
- _CPU_ISR_Enable(isrlevel);
-}
-
-void
-hppa_external_interrupt_spurious_handler(unsigned32 vector,
- CPU_Interrupt_frame *iframe)
-{
-/* XXX should not be printing :)
- printf("spurious external interrupt: %d at pc 0x%x; disabling\n",
- vector, iframe->Interrupt.pcoqfront);
-*/
-}
-
-void
-hppa_external_interrupt_report_spurious(unsigned32 spurious_mask,
- CPU_Interrupt_frame *iframe)
-{
- int v;
- for (v=0; v < HPPA_EXTERNAL_INTERRUPTS; v++)
- if (VECTOR_TO_MASK(v) & spurious_mask)
- {
- DISMISS(VECTOR_TO_MASK(v));
- DISABLE(VECTOR_TO_MASK(v));
- hppa_external_interrupt_spurious_handler(v, iframe);
- }
- DISMISS(spurious_mask);
-}
-
-
-/*
- * External interrupt handler.
- * This is installed as cpu interrupt handler for
- * HPPA_INTERRUPT_EXTERNAL_INTERRUPT. It vectors out to
- * specific external interrupt handlers.
- */
-
-void
-hppa_external_interrupt(unsigned32 vector,
- CPU_Interrupt_frame *iframe)
-{
- unsigned32 mask;
- unsigned32 *vp, *max_vp;
- unsigned32 external_vector;
- unsigned32 global_vector;
- hppa_rtems_isr_entry handler;
-
- max_vp = &_CPU_Table.external_interrupt[_CPU_Table.external_interrupts];
- while ( (mask = (get_eirr() & get_eiem())) )
- {
- for (vp = _CPU_Table.external_interrupt; (vp < max_vp) && mask; vp++)
- {
- unsigned32 m;
-
- external_vector = *vp;
- global_vector = external_vector + HPPA_INTERRUPT_EXTERNAL_BASE;
- m = VECTOR_TO_MASK(external_vector);
- handler = (hppa_rtems_isr_entry) _ISR_Vector_table[global_vector];
- if ((m & mask) && handler)
- {
- DISMISS(m);
- mask &= ~m;
- handler(global_vector, iframe);
- }
- }
-
- if (mask != 0) {
- if ( _CPU_Table.spurious_handler )
- {
- handler = (hppa_rtems_isr_entry) _CPU_Table.spurious_handler;
- handler(mask, iframe);
- }
- else
- hppa_external_interrupt_report_spurious(mask, iframe);
- }
- }
-}
-
-/*
- * Halt the system.
- * Called by the _CPU_Fatal_halt macro
- *
- * XXX
- * Later on, this will allow us to return to the prom.
- * For now, we just ignore 'type_of_halt'
- */
-
-void
-hppa_cpu_halt(unsigned32 the_error)
-{
- unsigned32 isrlevel;
-
- _CPU_ISR_Disable(isrlevel);
-
- HPPA_ASM_LABEL("_hppa_cpu_halt");
- HPPA_ASM_BREAK(1, 0);
-}
diff --git a/c/src/exec/score/cpu/hppa1.1/cpu.h b/c/src/exec/score/cpu/hppa1.1/cpu.h
deleted file mode 100644
index a2b430ca28..0000000000
--- a/c/src/exec/score/cpu/hppa1.1/cpu.h
+++ /dev/null
@@ -1,619 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the HP
- * PA-RISC processor (Level 1.1).
- *
- * 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 __CPU_h
-#define __CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/hppa.h> /* pick up machine definitions */
-#ifndef ASM
-#include <rtems/score/hppatypes.h>
-#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 );
-
- /* HPPA simulator is slow enough; don't waste time
- * zeroing memory that is already zero
- */
- boolean do_zero_of_workspace;
-
- unsigned32 interrupt_stack_size;
- unsigned32 extra_system_initialization_stack;
-
- /*
- * Control of external interrupts.
- * We keep a table of external vector numbers (0 - 31)
- * The table is sorted by priority, that is: the first entry
- * in the table indicates the vector that is highest priorty.
- * The handler function is stored in _ISR_Vector_Table[] and
- * is set by rtems_interrupt_catch()
- */
-
- unsigned32 external_interrupts; /* # of external interrupts we use */
- unsigned32 external_interrupt[HPPA_EXTERNAL_INTERRUPTS];
-
- hppa_rtems_isr_entry spurious_handler;
-
- unsigned32 itimer_clicks_per_microsecond; /* for use by Clock driver */
-} rtems_cpu_table;
-
-/* variables */
-
-EXTERN Context_Control_fp _CPU_Null_fp_context;
-EXTERN unsigned32 _CPU_Default_gr27;
-EXTERN void *_CPU_Interrupt_stack_low;
-EXTERN void *_CPU_Interrupt_stack_high;
-
-/* entry points */
-void hppa_external_interrupt_spurious_handler(unsigned32, CPU_Interrupt_frame *);
-
-#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 system initialization thread
- */
-
-#define CPU_SYSTEM_INITIALIZATION_THREAD_EXTRA_STACK 0
-
-/*
- * HPPA has 32 interrupts, then 32 external interrupts
- * Rtems (_ISR_Vector_Table) is aware of the first 64
- * A BSP may reserve more.
- *
- * External interrupts all come thru the same vector (4)
- * The external handler is the only person aware of the other
- * interrupts (genie, rhino, etc)
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS (HPPA_INTERRUPT_MAX)
-#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 level in _level */
-#define _CPU_ISR_Disable( _isr_cookie ) \
- do { \
- HPPA_ASM_RSM(HPPA_PSW_I, _isr_cookie); \
- } while(0)
-
-/* Enable interrupts to previous level from _CPU_ISR_Disable
- * does not change 'level' */
-#define _CPU_ISR_Enable( _isr_cookie ) \
- { \
- HPPA_ASM_MTSM( _isr_cookie ); \
- }
-
-/* restore, then disable interrupts; does not change level */
-#define _CPU_ISR_Flash( _isr_cookie ) \
- { \
- register int _ignore; \
- _CPU_ISR_Enable( _isr_cookie ); \
- _CPU_ISR_Disable( _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 *) (_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 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 );
-}
-
-/*
- * Unused; I think it should go away
- */
-
-#if 0
-#define enable_tracing()
-#endif
-
-#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 36650e7733..0000000000
--- a/c/src/exec/score/cpu/hppa1.1/cpu_asm.s
+++ /dev/null
@@ -1,794 +0,0 @@
-# @(#)cpu_asm.S 1.7 - 95/09/21
-#
-#
-# 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 <rtems/score/hppa.h>
-#include <rtems/score/cpu_asm.h>
-#include <rtems/score/cpu.h>
-
-#include <rtems/score/offsets.h>
-
- .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.
-#
-# NOTE:
-# Upon entry, the stack will contain a stack frame back to the
-# interrupted task. If dispatching is enabled, this is the
-# outer most interrupt, (and a context switch is necessary or
-# the current task has signals), then set up the stack to
-# transfer control to the interrupt dispatcher.
-#
-#
-# We jump here from the interrupt vector.
-# The 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 did the following
-# placed vector number is in r1
-#
-# stub
-# r1 <- vector number
-# save ipsw under rock
-# ipsw = ipsw & ~1 -- disable ints
-# save qregs under rock
-# qra = _Generic_ISR_handler
-# rfi
-#
-################################################
-
-# Distinct Interrupt Entry Points
-#
-# The following macro and the 32 instantiations of the macro
-# are necessary to determine which interrupt vector occurred.
-#
-# r9 is loaded with the vector number and then we jump to
-# the first level interrupt handler. In most cases this
-# is _Generic_ISR_Handler. In a few cases (such as TLB misc)
-# it may be to some other entry point.
-#
-
-# table for first level interrupt handlers
- .import HPPA_first_level_interrupt_handler, data
-
-#define THANDLER(vector) \
- mtctl %r9, isr_r9 ! \
- mtctl %r8, isr_r8 ! \
- ldi vector, %r9 ! \
- ldil L%HPPA_first_level_interrupt_handler,%r8 ! \
- ldo R%HPPA_first_level_interrupt_handler(%r8),%r8 ! \
- ldwx,s %r9(%r8),%r8 ! \
- bv 0(%r8) ! \
- mfctl isr_r8, %r8
-
- .align 4096
- .EXPORT IVA_Table,ENTRY,PRIV_LEV=0
-IVA_Table:
- .PROC
- .CALLINFO FRAME=0,NO_CALLS
- .ENTRY
-
- THANDLER(0) /* unused */
-
- THANDLER(HPPA_INTERRUPT_HIGH_PRIORITY_MACHINE_CHECK)
-
- THANDLER(HPPA_INTERRUPT_POWER_FAIL)
-
- THANDLER(HPPA_INTERRUPT_RECOVERY_COUNTER)
-
- THANDLER(HPPA_INTERRUPT_EXTERNAL_INTERRUPT)
-
- THANDLER(HPPA_INTERRUPT_LOW_PRIORITY_MACHINE_CHECK)
-
- THANDLER(HPPA_INTERRUPT_INSTRUCTION_TLB_MISS)
-
- THANDLER(HPPA_INTERRUPT_INSTRUCTION_MEMORY_PROTECTION)
-
- THANDLER(HPPA_INTERRUPT_ILLEGAL_INSTRUCTION)
-
- THANDLER(HPPA_INTERRUPT_BREAK_INSTRUCTION)
-
- THANDLER(HPPA_INTERRUPT_PRIVILEGED_OPERATION)
-
- THANDLER(HPPA_INTERRUPT_PRIVILEGED_REGISTER)
-
- THANDLER(HPPA_INTERRUPT_OVERFLOW)
-
- THANDLER(HPPA_INTERRUPT_CONDITIONAL)
-
- THANDLER(HPPA_INTERRUPT_ASSIST_EXCEPTION)
-
- THANDLER(HPPA_INTERRUPT_DATA_TLB_MISS)
-
- THANDLER(HPPA_INTERRUPT_NON_ACCESS_INSTRUCTION_TLB_MISS)
-
- THANDLER(HPPA_INTERRUPT_NON_ACCESS_DATA_TLB_MISS)
-
- THANDLER(HPPA_INTERRUPT_DATA_MEMORY_PROTECTION)
-
- THANDLER(HPPA_INTERRUPT_DATA_MEMORY_BREAK)
-
- THANDLER(HPPA_INTERRUPT_TLB_DIRTY_BIT)
-
- THANDLER(HPPA_INTERRUPT_PAGE_REFERENCE)
-
- THANDLER(HPPA_INTERRUPT_ASSIST_EMULATION)
-
- THANDLER(HPPA_INTERRUPT_HIGHER_PRIVILEGE_TRANSFER)
-
- THANDLER(HPPA_INTERRUPT_LOWER_PRIVILEGE_TRANSFER)
-
- THANDLER(HPPA_INTERRUPT_TAKEN_BRANCH)
-
- THANDLER(HPPA_INTERRUPT_DATA_MEMORY_ACCESS_RIGHTS)
-
- THANDLER(HPPA_INTERRUPT_DATA_MEMORY_PROTECTION_ID)
-
- THANDLER(HPPA_INTERRUPT_UNALIGNED_DATA_REFERENCE)
-
- THANDLER(HPPA_INTERRUPT_PERFORMANCE_MONITOR)
-
- THANDLER(HPPA_INTERRUPT_INSTRUCTION_DEBUG)
-
- THANDLER(HPPA_INTERRUPT_DATA_DEBUG)
-
- .EXIT
- .PROCEND
-
- .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 (ctl)
-# r9 vector number isr_r9 (ctl)
-#
-# 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 (ctl)
-# r9 vector number isr_r9 (ctl)
-#
-# 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
- .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)
-#
- 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 -- &_ISR_Nest_level
-# r5 -- value _ISR_Nest_level
-# r4 -- &_Thread_Dispatch_disable_level
-# r6 -- value _Thread_Dispatch_disable_level
-
- .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
-
-# decrement isr nest level
- addi -1, %r5, %r5
- stw %r5, 0(%r3)
-
-# decrement dispatch disable level counter and, if not 0, go on
- addi -1,%r6,%r6
- comibf,= 0,%r6,isr_restore
- stw %r6, 0(%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
- .import _ISR_Signals_to_thread_executing,data
- ldil L%_ISR_Signals_to_thread_executing,%r8
- ldw R%_ISR_Signals_to_thread_executing(%r8),%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:
- 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
- ldw R30_OFFSET(arg0),%r30
- ldw R31_OFFSET(arg0),%r31
-
-# Turn off Q & R & I so we can write interrupt control registers
- rsm HPPA_PSW_Q + HPPA_PSW_R + HPPA_PSW_I, %r0
-
- 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 55c2a63aee..0000000000
--- a/c/src/exec/score/cpu/hppa1.1/hppa.h
+++ /dev/null
@@ -1,722 +0,0 @@
-/*
- * @(#)hppa.h 1.17 - 95/12/13
- *
- *
- * 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
- * 32-63 32 external interrupts
- * 64-... bsp defined
- */
-
-#define HPPA_INTERRUPT_NON_EXISTENT 0
-/* group 1 */
-#define HPPA_INTERRUPT_HIGH_PRIORITY_MACHINE_CHECK 1
-/* group 2 */
-#define HPPA_INTERRUPT_POWER_FAIL 2
-#define HPPA_INTERRUPT_RECOVERY_COUNTER 3
-#define HPPA_INTERRUPT_EXTERNAL_INTERRUPT 4
-#define HPPA_INTERRUPT_LOW_PRIORITY_MACHINE_CHECK 5
-#define HPPA_INTERRUPT_PERFORMANCE_MONITOR 29
-/* group 3 */
-#define HPPA_INTERRUPT_INSTRUCTION_TLB_MISS 6
-#define HPPA_INTERRUPT_INSTRUCTION_MEMORY_PROTECTION 7
-#define HPPA_INTERRUPT_INSTRUCTION_DEBUG 30
-#define HPPA_INTERRUPT_ILLEGAL_INSTRUCTION 8
-#define HPPA_INTERRUPT_BREAK_INSTRUCTION 9
-#define HPPA_INTERRUPT_PRIVILEGED_OPERATION 10
-#define HPPA_INTERRUPT_PRIVILEGED_REGISTER 11
-#define HPPA_INTERRUPT_OVERFLOW 12
-#define HPPA_INTERRUPT_CONDITIONAL 13
-#define HPPA_INTERRUPT_ASSIST_EXCEPTION 14
-#define HPPA_INTERRUPT_DATA_TLB_MISS 15
-#define HPPA_INTERRUPT_NON_ACCESS_INSTRUCTION_TLB_MISS 16
-#define HPPA_INTERRUPT_NON_ACCESS_DATA_TLB_MISS 17
-#define HPPA_INTERRUPT_DATA_MEMORY_ACCESS_RIGHTS 26
-#define HPPA_INTERRUPT_DATA_MEMORY_PROTECTION_ID 27
-#define HPPA_INTERRUPT_UNALIGNED_DATA_REFERENCE 28
-#define HPPA_INTERRUPT_DATA_MEMORY_PROTECTION 18
-#define HPPA_INTERRUPT_DATA_MEMORY_BREAK 19
-#define HPPA_INTERRUPT_TLB_DIRTY_BIT 20
-#define HPPA_INTERRUPT_PAGE_REFERENCE 21
-#define HPPA_INTERRUPT_DATA_DEBUG 31
-#define HPPA_INTERRUPT_ASSIST_EMULATION 22
-/* group 4 */
-#define HPPA_INTERRUPT_HIGHER_PRIVILEGE_TRANSFER 23
-#define HPPA_INTERRUPT_LOWER_PRIVILEGE_TRANSFER 24
-#define HPPA_INTERRUPT_TAKEN_BRANCH 25
-
-#define HPPA_INTERRUPT_ON_CHIP_MAX 31
-
-/* External Interrupts via interrupt 4 */
-
-#define HPPA_INTERRUPT_EXTERNAL_BASE 32
-
-#define HPPA_INTERRUPT_EXTERNAL_0 32
-#define HPPA_INTERRUPT_EXTERNAL_1 33
-#define HPPA_INTERRUPT_EXTERNAL_2 34
-#define HPPA_INTERRUPT_EXTERNAL_3 35
-#define HPPA_INTERRUPT_EXTERNAL_4 36
-#define HPPA_INTERRUPT_EXTERNAL_5 37
-#define HPPA_INTERRUPT_EXTERNAL_6 38
-#define HPPA_INTERRUPT_EXTERNAL_7 39
-#define HPPA_INTERRUPT_EXTERNAL_8 40
-#define HPPA_INTERRUPT_EXTERNAL_9 41
-#define HPPA_INTERRUPT_EXTERNAL_10 42
-#define HPPA_INTERRUPT_EXTERNAL_11 43
-#define HPPA_INTERRUPT_EXTERNAL_12 44
-#define HPPA_INTERRUPT_EXTERNAL_13 45
-#define HPPA_INTERRUPT_EXTERNAL_14 46
-#define HPPA_INTERRUPT_EXTERNAL_15 47
-#define HPPA_INTERRUPT_EXTERNAL_16 48
-#define HPPA_INTERRUPT_EXTERNAL_17 49
-#define HPPA_INTERRUPT_EXTERNAL_18 50
-#define HPPA_INTERRUPT_EXTERNAL_19 51
-#define HPPA_INTERRUPT_EXTERNAL_20 52
-#define HPPA_INTERRUPT_EXTERNAL_21 53
-#define HPPA_INTERRUPT_EXTERNAL_22 54
-#define HPPA_INTERRUPT_EXTERNAL_23 55
-#define HPPA_INTERRUPT_EXTERNAL_24 56
-#define HPPA_INTERRUPT_EXTERNAL_25 57
-#define HPPA_INTERRUPT_EXTERNAL_26 58
-#define HPPA_INTERRUPT_EXTERNAL_27 59
-#define HPPA_INTERRUPT_EXTERNAL_28 60
-#define HPPA_INTERRUPT_EXTERNAL_29 61
-#define HPPA_INTERRUPT_EXTERNAL_30 62
-#define HPPA_INTERRUPT_EXTERNAL_31 63
-
-#define HPPA_INTERRUPT_EXTERNAL_INTERVAL_TIMER HPPA_INTERRUPT_EXTERNAL_0
-#define HPPA_EXTERNAL_INTERRUPTS 32
-#define HPPA_INTERNAL_INTERRUPTS 32
-
-/* BSP defined interrupts begin here */
-
-#define HPPA_INTERRUPT_MAX 64
-
-/*
- * Cache characteristics
- */
-
-#define HPPA_CACHELINE_SIZE 32
-#define HPPA_CACHELINE_MASK (HPPA_CACHELINE_SIZE - 1)
-
-
-/*
- * 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 */
-
-
-/*
- * 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 <rtems/score/hppa.h>
-#include <rtems/score/cpu_asm.h>
-
- .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/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 <andy@i-cubed.co.uk>, 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 <andy@i-cubed.co.uk>
- *
- * 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 <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/context.h>
-#include <rtems/score/thread.h>
-
-/*
- * 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 <andy@i-cubed.co.uk>:
- *
- * 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 fc2868cccf..0000000000
--- a/c/src/exec/score/cpu/powerpc/cpu.h
+++ /dev/null
@@ -1,1019 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the PowerPC
- * processor.
- *
- * Author: Andrew Bray <andy@i-cubed.co.uk>
- *
- * 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 <rtems/score/ppc.h> /* pick up machine definitions */
-#ifndef ASM
-struct CPU_Interrupt_frame;
-
-#include <rtems/score/ppctypes.h>
-#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_Internal_threads_Idle_thread_body
- * must be provided and is the default IDLE thread body instead of
- * _Internal_threads_Idle_thread_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.
- *
- * NOTE: The interrupt_stack_size field is required if
- * CPU_ALLOCATE_INTERRUPT_STACK is defined as TRUE.
- *
- * The pretasking_hook, predriver_hook, and postdriver_hook,
- * and the do_zero_of_workspace fields are required on ALL CPUs.
- */
-
-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_system_initialization_stack;
- 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.
- */
-
-EXTERN void *_CPU_Interrupt_stack_low;
-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.
- */
-
-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
- * system initialization thread. Remember that in a multiprocessor
- * system the system intialization thread becomes the MP server thread.
- */
-
-#define CPU_SYSTEM_INITIALIZATION_THREAD_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 *) (_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 <andy@i-cubed.co.uk>
- *
- * 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 <andy@i-cubed.co.uk>
- *
- * 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 <andy@i-cubed.co.uk>
- *
- * 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 <andy@i-cubed.co.uk>
- *
- * 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 <andy@i-cubed.co.uk>
- *
- * 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/cpu/sparc/README b/c/src/exec/score/cpu/sparc/README
deleted file mode 100644
index c4c2200075..0000000000
--- a/c/src/exec/score/cpu/sparc/README
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# $Id$
-#
-
-This file discusses SPARC specific issues which are important to
-this port. The primary topics in this file are:
-
- + Global Register Usage
- + Stack Frame
- + EF bit in the PSR
-
-
-Global Register Usage
-=====================
-
-This information on register usage is based heavily on a comment in the
-file gcc-2.7.0/config/sparc/sparc.h in the the gcc 2.7.0 source.
-
- + g0 is hardwired to 0
- + On non-v9 systems:
- - g1 is free to use as temporary.
- - g2-g4 are reserved for applications. Gcc normally uses them as
- temporaries, but this can be disabled via the -mno-app-regs option.
- - g5 through g7 are reserved for the operating system.
- + On v9 systems:
- - g1 and g5 are free to use as temporaries.
- - g2-g4 are reserved for applications (the compiler will not normally use
- them, but they can be used as temporaries with -mapp-regs).
- - g6-g7 are reserved for the operating system.
-
- NOTE: As of gcc 2.7.0 register g1 was used in the following scenarios:
-
- + as a temporary by the 64 bit sethi pattern
- + when restoring call-preserved registers in large stack frames
-
-RTEMS places no constraints on the usage of the global registers. Although
-gcc assumes that either g5-g7 (non-V9) or g6-g7 (V9) are reserved for the
-operating system, RTEMS does not assume any special use for them.
-
-
-
-Stack Frame
-===========
-
-The stack grows downward (i.e. to lower addresses) on the SPARC architecture.
-
-The following is the organization of the stack frame:
-
-
-
- | ............... |
- fp | |
- +-------------------------------+
- | |
- | Local registers, temporaries, |
- | and saved floats | x bytes
- | |
- sp + x +-------------------------------+
- | |
- | outgoing parameters past |
- | the sixth one | x bytes
- | |
- sp + 92 +-------------------------------+ *
- | | *
- | area for callee to save | *
- | register arguments | * 24 bytes
- | | *
- sp + 68 +-------------------------------+ *
- | | *
- | structure return pointer | * 4 bytes
- | | *
- sp + 64 +-------------------------------+ *
- | | *
- | local register set | * 32 bytes
- | | *
- sp + 32 +-------------------------------+ *
- | | *
- | input register set | * 32 bytes
- | | *
- sp +-------------------------------+ *
-
-
-* = minimal stack frame
-
-x = optional components
-
-EF bit in the PSR
-=================
-
-The EF (enable floating point unit) in the PSR is utilized in this port to
-prevent non-floating point tasks from performing floating point
-operations. This bit is maintained as part of the integer context.
-However, the floating point context is switched BEFORE the integer
-context. Thus the EF bit in place at the time of the FP switch may
-indicate that FP operations are disabled. This occurs on certain task
-switches, when the EF bit will be 0 for the outgoing task and thus a fault
-will be generated on the first FP operation of the FP context save.
-
-The remedy for this is to enable FP access as the first step in both the
-save and restore of the FP context area. This bit will be subsequently
-reloaded by the integer context switch.
-
-Two of the scenarios which demonstrate this problem are outlined below:
-
-1. When the first FP task is switched to. The system tasks are not FP and
-thus would be unable to restore the FP context of the incoming task.
-
-2. On a deferred FP context switch. In this case, the system might switch
-from FP Task A to non-FP Task B and then to FP Task C. In this scenario,
-the floating point state must technically be saved by a non-FP task.
diff --git a/c/src/exec/score/cpu/sparc/asm.h b/c/src/exec/score/cpu/sparc/asm.h
deleted file mode 100644
index a3d62416b8..0000000000
--- a/c/src/exec/score/cpu/sparc/asm.h
+++ /dev/null
@@ -1,111 +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.
- *
- * $Id$
- */
-
-#ifndef __SPARC_ASM_h
-#define __SPARC_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#define ASM
-
-#include <rtems/score/sparc.h>
-#include <rtems/score/cpu.h>
-
-/*
- * 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.
- */
-
-/* XXX __USER_LABEL_PREFIX__ and __REGISTER_PREFIX__ do not work on gcc 2.7.0 */
-/* XXX The following ifdef magic fixes the problem but results in a warning */
-/* XXX when compiling assembly code. */
-#undef __USER_LABEL_PREFIX__
-#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)
-
-/*
- * Entry for traps which jump to a programmer-specified trap handler.
- */
-
-#define TRAP(_vector, _handler) \
- mov %psr, %l0 ; \
- sethi %hi(_handler), %l4 ; \
- jmp %l4+%lo(_handler); \
- mov _vector, %l3
-
-#endif
-/* end of include file */
-
-
diff --git a/c/src/exec/score/cpu/sparc/cpu.c b/c/src/exec/score/cpu/sparc/cpu.c
deleted file mode 100644
index 9f242d4a8f..0000000000
--- a/c/src/exec/score/cpu/sparc/cpu.c
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * SPARC Dependent Source
- *
- * 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$
- */
-
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-
-#if defined(erc32)
-#include <erc32.h>
-#endif
-
-/*
- * This initializes the set of opcodes placed in each trap
- * table entry. The routine which installs a handler is responsible
- * for filling in the fields for the _handler address and the _vector
- * trap type.
- *
- * The constants following this structure are masks for the fields which
- * must be filled in when the handler is installed.
- */
-
-const CPU_Trap_table_entry _CPU_Trap_slot_template = {
- 0xa1480000, /* mov %psr, %l0 */
- 0x29000000, /* sethi %hi(_handler), %l4 */
- 0x81c52000, /* jmp %l4 + %lo(_handler) */
- 0xa6102000 /* mov _vector, %l3 */
-};
-
-/*PAGE
- *
- * _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * Input Parameters:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- *
- * Output Parameters: NONE
- *
- * NOTE: There is no need to save the pointer to the thread dispatch routine.
- * The SPARC's assembly code can reference it directly with no problems.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
- void *pointer;
- unsigned32 trap_table_start;
- unsigned32 tbr_value;
- CPU_Trap_table_entry *old_tbr;
- CPU_Trap_table_entry *trap_table;
-
- /*
- * Install the executive's trap table. All entries from the original
- * trap table are copied into the executive's trap table. This is essential
- * since this preserves critical trap handlers such as the window underflow
- * and overflow handlers. It is the responsibility of the BSP to provide
- * install these in the initial trap table.
- */
-
- trap_table_start = (unsigned32) &_CPU_Trap_Table_area;
- if (trap_table_start & (SPARC_TRAP_TABLE_ALIGNMENT-1))
- trap_table_start = (trap_table_start + SPARC_TRAP_TABLE_ALIGNMENT) &
- ~(SPARC_TRAP_TABLE_ALIGNMENT-1);
-
- trap_table = (CPU_Trap_table_entry *) trap_table_start;
-
- sparc_get_tbr( tbr_value );
-
- old_tbr = (CPU_Trap_table_entry *) (tbr_value & 0xfffff000);
-
- memcpy( trap_table, (void *) old_tbr, 256 * sizeof( CPU_Trap_table_entry ) );
-
- sparc_set_tbr( trap_table_start );
-
- /*
- * This seems to be the most appropriate way to obtain an initial
- * FP context on the SPARC. The NULL fp context is copied it to
- * the task's FP context during Context_Initialize.
- */
-
- pointer = &_CPU_Null_fp_context;
- _CPU_Context_save_fp( &pointer );
-
- /*
- * Grab our own copy of the user's CPU table.
- */
-
- _CPU_Table = *cpu_table;
-
-#if defined(erc32)
-
- /*
- * ERC32 specific initialization
- */
-
- _ERC32_MEC_Timer_Control_Mirror = 0;
- ERC32_MEC.Timer_Control = 0;
-
- ERC32_MEC.Control |= ERC32_CONFIGURATION_POWER_DOWN_ALLOWED;
-
-#endif
-
-}
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- *
- * Input Parameters: NONE
- *
- * Output Parameters:
- * returns the current interrupt level (PIL field of the PSR)
- */
-
-unsigned32 _CPU_ISR_Get_level( void )
-{
- unsigned32 level;
-
- sparc_get_interrupt_level( level );
-
- return level;
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_raw_handler
- *
- * This routine installs the specified handler as a "raw" non-executive
- * supported trap handler (a.k.a. interrupt service routine).
- *
- * Input Parameters:
- * vector - trap table entry number plus synchronous
- * vs. asynchronous information
- * new_handler - address of the handler to be installed
- * old_handler - pointer to an address of the handler previously installed
- *
- * Output Parameters: NONE
- * *new_handler - address of the handler previously installed
- *
- * NOTE:
- *
- * On the SPARC, there are really only 256 vectors. However, the executive
- * has no easy, fast, reliable way to determine which traps are synchronous
- * and which are asynchronous. By default, synchronous traps return to the
- * instruction which caused the interrupt. So if you install a software
- * trap handler as an executive interrupt handler (which is desirable since
- * RTEMS takes care of window and register issues), then the executive needs
- * to know that the return address is to the trap rather than the instruction
- * following the trap.
- *
- * So vectors 0 through 255 are treated as regular asynchronous traps which
- * provide the "correct" return address. Vectors 256 through 512 are assumed
- * by the executive to be synchronous and to require that the return address
- * be fudged.
- *
- * If you use this mechanism to install a trap handler which must reexecute
- * the instruction which caused the trap, then it should be installed as
- * an asynchronous trap. This will avoid the executive changing the return
- * address.
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- unsigned32 real_vector;
- CPU_Trap_table_entry *tbr;
- CPU_Trap_table_entry *slot;
- unsigned32 u32_tbr;
- unsigned32 u32_handler;
-
- /*
- * Get the "real" trap number for this vector ignoring the synchronous
- * versus asynchronous indicator included with our vector numbers.
- */
-
- real_vector = SPARC_REAL_TRAP_NUMBER( vector );
-
- /*
- * Get the current base address of the trap table and calculate a pointer
- * to the slot we are interested in.
- */
-
- sparc_get_tbr( u32_tbr );
-
- u32_tbr &= 0xfffff000;
-
- tbr = (CPU_Trap_table_entry *) u32_tbr;
-
- slot = &tbr[ real_vector ];
-
- /*
- * Get the address of the old_handler from the trap table.
- *
- * NOTE: The old_handler returned will be bogus if it does not follow
- * the RTEMS model.
- */
-
-#define HIGH_BITS_MASK 0xFFFFFC00
-#define HIGH_BITS_SHIFT 10
-#define LOW_BITS_MASK 0x000003FF
-
- if ( slot->mov_psr_l0 == _CPU_Trap_slot_template.mov_psr_l0 ) {
- u32_handler =
- ((slot->sethi_of_handler_to_l4 & HIGH_BITS_MASK) << HIGH_BITS_SHIFT) |
- (slot->jmp_to_low_of_handler_plus_l4 & LOW_BITS_MASK);
- *old_handler = (proc_ptr) u32_handler;
- } else
- *old_handler = 0;
-
- /*
- * Copy the template to the slot and then fix it.
- */
-
- *slot = _CPU_Trap_slot_template;
-
- u32_handler = (unsigned32) new_handler;
-
- slot->mov_vector_l3 |= vector;
- slot->sethi_of_handler_to_l4 |=
- (u32_handler & HIGH_BITS_MASK) >> HIGH_BITS_SHIFT;
- slot->jmp_to_low_of_handler_plus_l4 |= (u32_handler & LOW_BITS_MASK);
-}
-
-/*PAGE
- *
- * _CPU_ISR_install_vector
- *
- * This kernel routine installs the RTEMS handler for the
- * specified vector.
- *
- * Input parameters:
- * vector - interrupt vector number
- * new_handler - replacement ISR for this vector number
- * old_handler - pointer to former ISR for this vector number
- *
- * Output parameters:
- * *old_handler - former ISR for this vector number
- *
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-)
-{
- unsigned32 real_vector;
- proc_ptr ignored;
-
- /*
- * Get the "real" trap number for this vector ignoring the synchronous
- * versus asynchronous indicator included with our vector numbers.
- */
-
- real_vector = SPARC_REAL_TRAP_NUMBER( vector );
-
- /*
- * Return the previous ISR handler.
- */
-
- *old_handler = _ISR_Vector_table[ real_vector ];
-
- /*
- * Install the wrapper so this ISR can be invoked properly.
- */
-
- _CPU_ISR_install_raw_handler( vector, _ISR_Handler, &ignored );
-
- /*
- * 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[ real_vector ] = new_handler;
-}
-
-/*PAGE
- *
- * _CPU_Context_Initialize
- *
- * This kernel routine initializes the basic non-FP context area associated
- * with each thread.
- *
- * Input parameters:
- * the_context - pointer to the context area
- * stack_base - address of memory for the SPARC
- * size - size in bytes of the stack area
- * new_level - interrupt level for this context area
- * entry_point - the starting execution point for this this context
- * is_fp - TRUE if this context is associated with an FP thread
- *
- * Output parameters: NONE
- */
-
-void _CPU_Context_Initialize(
- Context_Control *the_context,
- unsigned32 *stack_base,
- unsigned32 size,
- unsigned32 new_level,
- void *entry_point,
- boolean is_fp
-)
-{
- unsigned32 stack_high; /* highest "stack aligned" address */
- unsigned32 the_size;
- unsigned32 tmp_psr;
-
- /*
- * On CPUs with stacks which grow down (i.e. SPARC), we build the stack
- * based on the stack_high address.
- */
-
- stack_high = ((unsigned32)(stack_base) + size);
- stack_high &= ~(CPU_STACK_ALIGNMENT - 1);
-
- the_size = size & ~(CPU_STACK_ALIGNMENT - 1);
-
- /*
- * See the README in this directory for a diagram of the stack.
- */
-
- the_context->o7 = ((unsigned32) entry_point) - 8;
- the_context->o6_sp = stack_high - CPU_MINIMUM_STACK_FRAME_SIZE;
- the_context->i6_fp = stack_high;
-
- /*
- * Build the PSR for the task. Most everything can be 0 and the
- * CWP is corrected during the context switch.
- *
- * The EF bit determines if the floating point unit is available.
- * The FPU is ONLY enabled if the context is associated with an FP task
- * and this SPARC model has an FPU.
- */
-
- sparc_get_psr( tmp_psr );
- tmp_psr &= ~SPARC_PSR_PIL_MASK;
- tmp_psr |= (new_level << 8) & SPARC_PSR_PIL_MASK;
- tmp_psr &= ~SPARC_PSR_EF_MASK; /* disabled by default */
-
-#if (SPARC_HAS_FPU == 1)
- /*
- * If this bit is not set, then a task gets a fault when it accesses
- * a floating point register. This is a nice way to detect floating
- * point tasks which are not currently declared as such.
- */
-
- if ( is_fp )
- tmp_psr |= SPARC_PSR_EF_MASK;
-#endif
- the_context->psr = tmp_psr;
-}
-
-/*PAGE
- *
- * _CPU_Internal_threads_Idle_thread_body
- *
- * Some SPARC implementations have low power, sleep, or idle modes. This
- * tries to take advantage of those models.
- */
-
-#if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
-
-/*
- * This is the implementation for the erc32.
- *
- * NOTE: Low power mode was enabled at initialization time.
- */
-
-#if defined(erc32)
-
-void _CPU_Internal_threads_Idle_thread_body( void )
-{
- while (1) {
- ERC32_MEC.Power_Down = 0; /* value is irrelevant */
- }
-}
-
-#endif
-
-#endif /* CPU_PROVIDES_IDLE_THREAD_BODY */
diff --git a/c/src/exec/score/cpu/sparc/cpu.h b/c/src/exec/score/cpu/sparc/cpu.h
deleted file mode 100644
index b6bcb91738..0000000000
--- a/c/src/exec/score/cpu/sparc/cpu.h
+++ /dev/null
@@ -1,993 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the port of
- * the executive to the SPARC 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.
- *
- * 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 __CPU_h
-#define __CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/sparc.h> /* pick up machine definitions */
-#ifndef ASM
-#include <rtems/score/sparctypes.h>
-#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.
- */
-
-#define CPU_INLINE_ENABLE_DISPATCH TRUE
-
-/*
- * 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.
- *
- * This parameter could go either way on the SPARC. The interrupt flash
- * code is relatively lengthy given the requirements for nops following
- * writes to the psr. But if the clock speed were high enough, this would
- * not represent a great deal of time.
- */
-
-#define CPU_UNROLL_ENQUEUE_PRIORITY TRUE
-
-/*
- * Does the executive manage a dedicated interrupt stack in software?
- *
- * If TRUE, then a stack is allocated in _Interrupt_Manager_initialization.
- * If FALSE, nothing is done.
- *
- * The SPARC does not have a dedicated HW interrupt stack and one has
- * been implemented in SW.
- */
-
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK TRUE
-
-/*
- * 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.
- *
- * The SPARC does not have a dedicated HW interrupt stack.
- */
-
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK FALSE
-
-/*
- * Do we 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.
- */
-
-#define CPU_ALLOCATE_INTERRUPT_STACK TRUE
-
-/*
- * Does the CPU have hardware floating point?
- *
- * If TRUE, then the FLOATING_POINT task attribute is supported.
- * If FALSE, then the FLOATING_POINT task attribute is ignored.
- */
-
-#if ( SPARC_HAS_FPU == 1 )
-#define CPU_HARDWARE_FP TRUE
-#else
-#define CPU_HARDWARE_FP FALSE
-#endif
-
-/*
- * Are all tasks FLOATING_POINT tasks implicitly?
- *
- * If TRUE, then the FLOATING_POINT task attribute is assumed.
- * If FALSE, then the FLOATING_POINT task attribute is followed.
- */
-
-#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 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.
- */
-
-#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.
- */
-
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-
-/*
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine _CPU_Internal_threads_Idle_thread_body
- * must be provided and is the default IDLE thread body instead of
- * _Internal_threads_Idle_thread_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- */
-
-#if (SPARC_HAS_LOW_POWER_MODE == 1)
-#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
-#else
-#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
-#endif
-
-/*
- * 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.
- *
- * The stack grows to lower addresses on the SPARC.
- */
-
-#define CPU_STACK_GROWS_UP FALSE
-
-/*
- * The following is the variable attribute used to force alignment
- * of critical data 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 SPARC does not appear to have particularly strict alignment
- * requirements. This value was chosen to take advantages of caches.
- */
-
-#define CPU_STRUCTURE_ALIGNMENT __attribute__ ((aligned (16)))
-
-/*
- * 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().
- *
- * The SPARC has 16 interrupt levels in the PIL field of the PSR.
- */
-
-#define CPU_MODES_INTERRUPT_MASK 0x0000000F
-
-/*
- * This structure represents the organization of the minimum stack frame
- * for the SPARC. More framing information is required in certain situaions
- * such as when there are a large number of out parameters or when the callee
- * must save floating point registers.
- */
-
-#ifndef ASM
-
-typedef struct {
- unsigned32 l0;
- unsigned32 l1;
- unsigned32 l2;
- unsigned32 l3;
- unsigned32 l4;
- unsigned32 l5;
- unsigned32 l6;
- unsigned32 l7;
- unsigned32 i0;
- unsigned32 i1;
- unsigned32 i2;
- unsigned32 i3;
- unsigned32 i4;
- unsigned32 i5;
- unsigned32 i6_fp;
- unsigned32 i7;
- void *structure_return_address;
- /*
- * The following are for the callee to save the register arguments in
- * should this be necessary.
- */
- unsigned32 saved_arg0;
- unsigned32 saved_arg1;
- unsigned32 saved_arg2;
- unsigned32 saved_arg3;
- unsigned32 saved_arg4;
- unsigned32 saved_arg5;
- unsigned32 pad0;
-} CPU_Minimum_stack_frame;
-
-#endif /* ASM */
-
-#define CPU_STACK_FRAME_L0_OFFSET 0x00
-#define CPU_STACK_FRAME_L1_OFFSET 0x04
-#define CPU_STACK_FRAME_L2_OFFSET 0x08
-#define CPU_STACK_FRAME_L3_OFFSET 0x0c
-#define CPU_STACK_FRAME_L4_OFFSET 0x10
-#define CPU_STACK_FRAME_L5_OFFSET 0x14
-#define CPU_STACK_FRAME_L6_OFFSET 0x18
-#define CPU_STACK_FRAME_L7_OFFSET 0x1c
-#define CPU_STACK_FRAME_I0_OFFSET 0x20
-#define CPU_STACK_FRAME_I1_OFFSET 0x24
-#define CPU_STACK_FRAME_I2_OFFSET 0x28
-#define CPU_STACK_FRAME_I3_OFFSET 0x2c
-#define CPU_STACK_FRAME_I4_OFFSET 0x30
-#define CPU_STACK_FRAME_I5_OFFSET 0x34
-#define CPU_STACK_FRAME_I6_FP_OFFSET 0x38
-#define CPU_STACK_FRAME_I7_OFFSET 0x3c
-#define CPU_STRUCTURE_RETURN_ADDRESS_OFFSET 0x40
-#define CPU_STACK_FRAME_SAVED_ARG0_OFFSET 0x44
-#define CPU_STACK_FRAME_SAVED_ARG1_OFFSET 0x48
-#define CPU_STACK_FRAME_SAVED_ARG2_OFFSET 0x4c
-#define CPU_STACK_FRAME_SAVED_ARG3_OFFSET 0x50
-#define CPU_STACK_FRAME_SAVED_ARG4_OFFSET 0x54
-#define CPU_STACK_FRAME_SAVED_ARG5_OFFSET 0x58
-#define CPU_STACK_FRAME_PAD0_OFFSET 0x5c
-
-#define CPU_MINIMUM_STACK_FRAME_SIZE 0x60
-
-/*
- * 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 the SPARC, we are relatively conservative in that we save most
- * of the CPU state in the context area. The ET (enable trap) bit and
- * the CWP (current window pointer) fields of the PSR are considered
- * system wide resources and are not maintained on a per-thread basis.
- */
-
-#ifndef ASM
-
-typedef struct {
- /*
- * Using a double g0_g1 will put everything in this structure on a
- * double word boundary which allows us to use double word loads
- * and stores safely in the context switch.
- */
- double g0_g1;
- unsigned32 g2;
- unsigned32 g3;
- unsigned32 g4;
- unsigned32 g5;
- unsigned32 g6;
- unsigned32 g7;
-
- unsigned32 l0;
- unsigned32 l1;
- unsigned32 l2;
- unsigned32 l3;
- unsigned32 l4;
- unsigned32 l5;
- unsigned32 l6;
- unsigned32 l7;
-
- unsigned32 i0;
- unsigned32 i1;
- unsigned32 i2;
- unsigned32 i3;
- unsigned32 i4;
- unsigned32 i5;
- unsigned32 i6_fp;
- unsigned32 i7;
-
- unsigned32 o0;
- unsigned32 o1;
- unsigned32 o2;
- unsigned32 o3;
- unsigned32 o4;
- unsigned32 o5;
- unsigned32 o6_sp;
- unsigned32 o7;
-
- unsigned32 psr;
-} Context_Control;
-
-#endif /* ASM */
-
-/*
- * Offsets of fields with Context_Control for assembly routines.
- */
-
-#define G0_OFFSET 0x00
-#define G1_OFFSET 0x04
-#define G2_OFFSET 0x08
-#define G3_OFFSET 0x0C
-#define G4_OFFSET 0x10
-#define G5_OFFSET 0x14
-#define G6_OFFSET 0x18
-#define G7_OFFSET 0x1C
-
-#define L0_OFFSET 0x20
-#define L1_OFFSET 0x24
-#define L2_OFFSET 0x28
-#define L3_OFFSET 0x2C
-#define L4_OFFSET 0x30
-#define L5_OFFSET 0x34
-#define L6_OFFSET 0x38
-#define L7_OFFSET 0x3C
-
-#define I0_OFFSET 0x40
-#define I1_OFFSET 0x44
-#define I2_OFFSET 0x48
-#define I3_OFFSET 0x4C
-#define I4_OFFSET 0x50
-#define I5_OFFSET 0x54
-#define I6_FP_OFFSET 0x58
-#define I7_OFFSET 0x5C
-
-#define O0_OFFSET 0x60
-#define O1_OFFSET 0x64
-#define O2_OFFSET 0x68
-#define O3_OFFSET 0x6C
-#define O4_OFFSET 0x70
-#define O5_OFFSET 0x74
-#define O6_SP_OFFSET 0x78
-#define O7_OFFSET 0x7C
-
-#define PSR_OFFSET 0x80
-
-#define CONTEXT_CONTROL_SIZE 0x84
-
-/*
- * The floating point context area.
- */
-
-#ifndef ASM
-
-typedef struct {
- double f0_f1;
- double f2_f3;
- double f4_f5;
- double f6_f7;
- double f8_f9;
- double f10_f11;
- double f12_f13;
- double f14_f15;
- double f16_f17;
- double f18_f19;
- double f20_f21;
- double f22_f23;
- double f24_f25;
- double f26_f27;
- double f28_f29;
- double f30_f31;
- unsigned32 fsr;
-} Context_Control_fp;
-
-#endif /* ASM */
-
-/*
- * Offsets of fields with Context_Control_fp for assembly routines.
- */
-
-#define FO_F1_OFFSET 0x00
-#define F2_F3_OFFSET 0x08
-#define F4_F5_OFFSET 0x10
-#define F6_F7_OFFSET 0x18
-#define F8_F9_OFFSET 0x20
-#define F1O_F11_OFFSET 0x28
-#define F12_F13_OFFSET 0x30
-#define F14_F15_OFFSET 0x38
-#define F16_F17_OFFSET 0x40
-#define F18_F19_OFFSET 0x48
-#define F2O_F21_OFFSET 0x50
-#define F22_F23_OFFSET 0x58
-#define F24_F25_OFFSET 0x60
-#define F26_F27_OFFSET 0x68
-#define F28_F29_OFFSET 0x70
-#define F3O_F31_OFFSET 0x78
-#define FSR_OFFSET 0x80
-
-#define CONTEXT_CONTROL_FP_SIZE 0x84
-
-#ifndef ASM
-
-/*
- * Context saved on stack for an interrupt.
- *
- * NOTE: The PSR, PC, and NPC are only saved in this structure for the
- * benefit of the user's handler.
- */
-
-typedef struct {
- CPU_Minimum_stack_frame Stack_frame;
- unsigned32 psr;
- unsigned32 pc;
- unsigned32 npc;
- unsigned32 g1;
- unsigned32 g2;
- unsigned32 g3;
- unsigned32 g4;
- unsigned32 g5;
- unsigned32 g6;
- unsigned32 g7;
- unsigned32 i0;
- unsigned32 i1;
- unsigned32 i2;
- unsigned32 i3;
- unsigned32 i4;
- unsigned32 i5;
- unsigned32 i6_fp;
- unsigned32 i7;
- unsigned32 y;
- unsigned32 pad0_offset;
-} CPU_Interrupt_frame;
-
-#endif /* ASM */
-
-/*
- * Offsets of fields with CPU_Interrupt_frame for assembly routines.
- */
-
-#define ISF_STACK_FRAME_OFFSET 0x00
-#define ISF_PSR_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x00
-#define ISF_PC_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x04
-#define ISF_NPC_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x08
-#define ISF_G1_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x0c
-#define ISF_G2_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x10
-#define ISF_G3_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x14
-#define ISF_G4_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x18
-#define ISF_G5_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x1c
-#define ISF_G6_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x20
-#define ISF_G7_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x24
-#define ISF_I0_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x28
-#define ISF_I1_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x2c
-#define ISF_I2_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x30
-#define ISF_I3_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x34
-#define ISF_I4_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x38
-#define ISF_I5_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x3c
-#define ISF_I6_FP_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x40
-#define ISF_I7_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x44
-#define ISF_Y_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x48
-#define ISF_PAD0_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x4c
-
-#define CONTEXT_CONTROL_INTERRUPT_FRAME_SIZE CPU_MINIMUM_STACK_FRAME_SIZE + 0x50
-#ifndef ASM
-
-/*
- * The following table contains the information required to configure
- * the processor specific parameters.
- *
- * NOTE: The interrupt_stack_size field is required if
- * CPU_ALLOCATE_INTERRUPT_STACK is defined as TRUE.
- *
- * The pretasking_hook, predriver_hook, and postdriver_hook,
- * and the do_zero_of_workspace fields are required on ALL CPUs.
- */
-
-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_system_initialization_stack;
-} rtems_cpu_table;
-
-/*
- * This variable is contains the initialize context for the FP unit.
- * 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 CPU_STRUCTURE_ALIGNMENT;
-
-/*
- * 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. Thus
- * both must be present if either is.
- *
- * The SPARC supports a software based interrupt stack and these
- * are required.
- */
-
-EXTERN void *_CPU_Interrupt_stack_low;
-EXTERN void *_CPU_Interrupt_stack_high;
-
-#if defined(erc32)
-
-/*
- * ERC32 Specific Variables
- */
-
-EXTERN unsigned32 _ERC32_MEC_Timer_Control_Mirror;
-
-#endif
-
-/*
- * The following type defines an entry in the SPARC's trap table.
- *
- * NOTE: The instructions chosen are RTEMS dependent although one is
- * obligated to use two of the four instructions to perform a
- * long jump. The other instructions load one register with the
- * trap type (a.k.a. vector) and another with the psr.
- */
-
-typedef struct {
- unsigned32 mov_psr_l0; /* mov %psr, %l0 */
- unsigned32 sethi_of_handler_to_l4; /* sethi %hi(_handler), %l4 */
- unsigned32 jmp_to_low_of_handler_plus_l4; /* jmp %l4 + %lo(_handler) */
- unsigned32 mov_vector_l3; /* mov _vector, %l3 */
-} CPU_Trap_table_entry;
-
-/*
- * This is the set of opcodes for the instructions loaded into a trap
- * table entry. The routine which installs a handler is responsible
- * for filling in the fields for the _handler address and the _vector
- * trap type.
- *
- * The constants following this structure are masks for the fields which
- * must be filled in when the handler is installed.
- */
-
-extern const CPU_Trap_table_entry _CPU_Trap_slot_template;
-
-/*
- * This is the executive's trap table which is installed into the TBR
- * register.
- *
- * NOTE: Unfortunately, this must be aligned on a 4096 byte boundary.
- * The GNU tools as of binutils 2.5.2 and gcc 2.7.0 would not
- * align an entity to anything greater than a 512 byte boundary.
- *
- * Because of this, we pull a little bit of a trick. We allocate
- * enough memory so we can grab an address on a 4096 byte boundary
- * from this area.
- */
-
-#define SPARC_TRAP_TABLE_ALIGNMENT 4096
-
-EXTERN unsigned8 _CPU_Trap_Table_area[ 8192 ]
- __attribute__ ((aligned (SPARC_TRAP_TABLE_ALIGNMENT)));
-
-
-/*
- * The size of the floating point context area.
- */
-
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-
-#endif
-
-/*
- * Amount of extra stack (above minimum stack size) required by
- * system initialization thread. Remember that in a multiprocessor
- * system the system intialization thread becomes the MP server thread.
- */
-
-#define CPU_SYSTEM_INITIALIZATION_THREAD_EXTRA_STACK 1024
-
-/*
- * This defines the number of entries in the ISR_Vector_table managed
- * by the executive.
- *
- * On the SPARC, there are really only 256 vectors. However, the executive
- * has no easy, fast, reliable way to determine which traps are synchronous
- * and which are asynchronous. By default, synchronous traps return to the
- * instruction which caused the interrupt. So if you install a software
- * trap handler as an executive interrupt handler (which is desirable since
- * RTEMS takes care of window and register issues), then the executive needs
- * to know that the return address is to the trap rather than the instruction
- * following the trap.
- *
- * So vectors 0 through 255 are treated as regular asynchronous traps which
- * provide the "correct" return address. Vectors 256 through 512 are assumed
- * by the executive to be synchronous and to require that the return address
- * be fudged.
- *
- * If you use this mechanism to install a trap handler which must reexecute
- * the instruction which caused the trap, then it should be installed as
- * an asynchronous trap. This will avoid the executive changing the return
- * address.
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS 256
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER 511
-
-#define SPARC_SYNCHRONOUS_TRAP_BIT_MASK 0x100
-#define SPARC_ASYNCHRONOUS_TRAP( _trap ) (_trap)
-#define SPARC_SYNCHRONOUS_TRAP( _trap ) ((_trap) + 256 )
-
-#define SPARC_REAL_TRAP_NUMBER( _trap ) ((_trap) % 256)
-
-/*
- * Should be large enough to run all tests. This insures
- * that a "reasonable" small application should not have any problems.
- *
- * This appears to be a fairly generous number for the SPARC since
- * represents a call depth of about 20 routines based on the minimum
- * stack frame.
- */
-
-#define CPU_STACK_MINIMUM_SIZE (1024*2 + 512)
-
-/*
- * CPU's worst alignment requirement for data types on a byte boundary. This
- * alignment does not take into account the requirements for the stack.
- *
- * On the SPARC, this is required for double word loads and stores.
- */
-
-#define CPU_ALIGNMENT 8
-
-/*
- * 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 CPU_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 CPU_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.
- *
- * The alignment restrictions for the SPARC are not that strict but this
- * should unsure that the stack is always sufficiently alignment that the
- * window overflow, underflow, and flush routines can use double word loads
- * and stores.
- */
-
-#define CPU_STACK_ALIGNMENT 16
-
-#ifndef ASM
-
-/* ISR handler macros */
-
-/*
- * Disable all interrupts for a critical section. The previous
- * level is returned in _level.
- */
-
-#define _CPU_ISR_Disable( _level ) \
- sparc_disable_interrupts( _level )
-
-/*
- * Enable interrupts to the previous level (returned by _CPU_ISR_Disable).
- * This indicates the end of a critical section. The parameter
- * _level is not modified.
- */
-
-#define _CPU_ISR_Enable( _level ) \
- sparc_enable_interrupts( _level )
-
-/*
- * This temporarily restores the interrupt to _level before immediately
- * disabling them again. This is used to divide long critical
- * sections into two or more parts. The parameter _level is not
- * modified.
- */
-
-#define _CPU_ISR_Flash( _level ) \
- sparc_flash_interrupts( _level )
-
-/*
- * 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 straight fashion are undefined.
- */
-
-#define _CPU_ISR_Set_level( _newlevel ) \
- sparc_set_interrupt_level( _newlevel )
-
-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
- *
- * NOTE: Implemented as a subroutine for the SPARC port.
- */
-
-void _CPU_Context_Initialize(
- Context_Control *the_context,
- unsigned32 *stack_base,
- unsigned32 size,
- unsigned32 new_level,
- void *entry_point,
- boolean is_fp
-);
-
-/*
- * This routine is responsible for somehow restarting the currently
- * executing task.
- *
- * On the SPARC, this is is relatively painless but requires a small
- * amount of wrapper code before using the regular restore code in
- * of the context switch.
- */
-
-#define _CPU_Context_Restart_self( _the_context ) \
- _CPU_Context_restore( (_the_context) );
-
-/*
- * The FP context area for the SPARC is a simple structure and nothing
- * special is required to find the "starting load point"
- */
-
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ( (void *) (_base) + (_offset) )
-
-/*
- * This routine initializes the FP context area passed to it to.
- *
- * The SPARC allows us to use the simple initialization model
- * in which an "initial" FP context was saved into _CPU_Null_fp_context
- * at CPU initialization and it is simply copied into the destination
- * context.
- */
-
-#define _CPU_Context_Initialize_fp( _destination ) \
- do { \
- *((Context_Control_fp *) *((void **) _destination)) = _CPU_Null_fp_context; \
- } while (0)
-
-/* 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 ) \
- do { \
- unsigned32 level; \
- \
- sparc_disable_interrupts( level ); \
- asm volatile ( "mov %0, %%g1 " : "=r" (level) : "0" (level) ); \
- while (1); /* loop forever */ \
- } while (0)
-
-/* end of Fatal Error manager macros */
-
-/* Bitfield handler macros */
-
-/*
- * The SPARC port uses the generic C algorithm for bitfield scan if the
- * CPU model does not have a scan instruction.
- */
-
-#if ( SPARC_HAS_BITSCAN == 0 )
-#define CPU_USE_GENERIC_BITFIELD_CODE TRUE
-#define CPU_USE_GENERIC_BITFIELD_DATA TRUE
-#else
-#error "scan instruction not currently supported by RTEMS!!"
-#endif
-
-/* end of Bitfield handler macros */
-
-/* Priority handler handler macros */
-
-/*
- * The SPARC port uses the generic C algorithm for bitfield scan if the
- * CPU model does not have a scan instruction.
- */
-
-#if ( SPARC_HAS_BITSCAN == 1 )
-#error "scan instruction not currently supported by RTEMS!!"
-#endif
-
-/* 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 new_handler to be directly called from the trap
- * 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
-);
-
-#if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
-
-/*
- * _CPU_Internal_threads_Idle_thread_body
- *
- * Some SPARC implementations have low power, sleep, or idle modes. This
- * tries to take advantage of those models.
- */
-
-void _CPU_Internal_threads_Idle_thread_body( void );
-
-#endif /* CPU_PROVIDES_IDLE_THREAD_BODY */
-
-/*
- * _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.
- */
-
-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
-);
-
-/*
- * CPU_swap_u32
- *
- * 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 you come across a better
- * way for the SPARC PLEASE use it. The most common way to swap a 32-bit
- * entity as shown below is not any more efficient on the SPARC.
- *
- * swap least significant two bytes with 16-bit rotate
- * swap upper and lower 16-bits
- * swap most significant two bytes with 16-bit rotate
- *
- * It is not obvious how the SPARC can do significantly better than the
- * generic code. gcc 2.7.0 only generates about 12 instructions for the
- * following code at optimization level four (i.e. -O4).
- */
-
-static inline unsigned int CPU_swap_u32(
- unsigned int value
-)
-{
- unsigned32 byte1, byte2, byte3, byte4, swapped;
-
- byte4 = (value >> 24) & 0xff;
- byte3 = (value >> 16) & 0xff;
- byte2 = (value >> 8) & 0xff;
- byte1 = value & 0xff;
-
- swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
- return( swapped );
-}
-
-#endif ASM
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/c/src/exec/score/cpu/sparc/cpu_asm.s b/c/src/exec/score/cpu/sparc/cpu_asm.s
deleted file mode 100644
index 5fe49f3e1d..0000000000
--- a/c/src/exec/score/cpu/sparc/cpu_asm.s
+++ /dev/null
@@ -1,704 +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.
- *
- * 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$
- */
-
-#include <asm.h>
-#include <rtems/score/cpu.h>
-
-#if (SPARC_HAS_FPU == 1)
-
-/*
- * void _CPU_Context_save_fp(
- * void **fp_context_ptr
- * )
- *
- * 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.
- *
- * NOTE: See the README in this directory for information on the
- * management of the "EF" bit in the PSR.
- */
-
- .align 4
- PUBLIC(_CPU_Context_save_fp)
-SYM(_CPU_Context_save_fp):
- save %sp, -CPU_MINIMUM_STACK_FRAME_SIZE, %sp
-
- /*
- * The following enables the floating point unit.
- */
-
- mov %psr, %l0
- sethi %hi(SPARC_PSR_EF_MASK), %l1
- or %l1, %lo(SPARC_PSR_EF_MASK), %l1
- or %l0, %l1, %l0
- mov %l0, %psr ! **** ENABLE FLOAT ACCESS ****
-
- ld [%i0], %l0
- std %f0, [%l0 + FO_F1_OFFSET]
- std %f2, [%l0 + F2_F3_OFFSET]
- std %f4, [%l0 + F4_F5_OFFSET]
- std %f6, [%l0 + F6_F7_OFFSET]
- std %f8, [%l0 + F8_F9_OFFSET]
- std %f10, [%l0 + F1O_F11_OFFSET]
- std %f12, [%l0 + F12_F13_OFFSET]
- std %f14, [%l0 + F14_F15_OFFSET]
- std %f16, [%l0 + F16_F17_OFFSET]
- std %f18, [%l0 + F18_F19_OFFSET]
- std %f20, [%l0 + F2O_F21_OFFSET]
- std %f22, [%l0 + F22_F23_OFFSET]
- std %f24, [%l0 + F24_F25_OFFSET]
- std %f26, [%l0 + F26_F27_OFFSET]
- std %f28, [%l0 + F28_F29_OFFSET]
- std %f30, [%l0 + F3O_F31_OFFSET]
- st %fsr, [%l0 + FSR_OFFSET]
- ret
- restore
-
-/*
- * void _CPU_Context_restore_fp(
- * void **fp_context_ptr
- * )
- *
- * 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.
- *
- * NOTE: See the README in this directory for information on the
- * management of the "EF" bit in the PSR.
- */
-
- .align 4
- PUBLIC(_CPU_Context_restore_fp)
-SYM(_CPU_Context_restore_fp):
- save %sp, -CPU_MINIMUM_STACK_FRAME_SIZE , %sp
-
- /*
- * The following enables the floating point unit.
- */
-
- mov %psr, %l0
- sethi %hi(SPARC_PSR_EF_MASK), %l1
- or %l1, %lo(SPARC_PSR_EF_MASK), %l1
- or %l0, %l1, %l0
- mov %l0, %psr ! **** ENABLE FLOAT ACCESS ****
-
- ld [%i0], %l0
- ldd [%l0 + FO_F1_OFFSET], %f0
- ldd [%l0 + F2_F3_OFFSET], %f2
- ldd [%l0 + F4_F5_OFFSET], %f4
- ldd [%l0 + F6_F7_OFFSET], %f6
- ldd [%l0 + F8_F9_OFFSET], %f8
- ldd [%l0 + F1O_F11_OFFSET], %f10
- ldd [%l0 + F12_F13_OFFSET], %f12
- ldd [%l0 + F14_F15_OFFSET], %f14
- ldd [%l0 + F16_F17_OFFSET], %f16
- ldd [%l0 + F18_F19_OFFSET], %f18
- ldd [%l0 + F2O_F21_OFFSET], %f20
- ldd [%l0 + F22_F23_OFFSET], %f22
- ldd [%l0 + F24_F25_OFFSET], %f24
- ldd [%l0 + F26_F27_OFFSET], %f26
- ldd [%l0 + F28_F29_OFFSET], %f28
- ldd [%l0 + F3O_F31_OFFSET], %f30
- ld [%l0 + FSR_OFFSET], %fsr
- ret
- restore
-
-#endif /* SPARC_HAS_FPU */
-
-/*
- * void _CPU_Context_switch(
- * Context_Control *run,
- * Context_Control *heir
- * )
- *
- * This routine performs a normal non-FP context switch.
- */
-
- .align 4
- PUBLIC(_CPU_Context_switch)
-SYM(_CPU_Context_switch):
- ! skip g0
- st %g1, [%o0 + G1_OFFSET] ! save the global registers
- std %g2, [%o0 + G2_OFFSET]
- std %g4, [%o0 + G4_OFFSET]
- std %g6, [%o0 + G6_OFFSET]
-
- std %l0, [%o0 + L0_OFFSET] ! save the local registers
- std %l2, [%o0 + L2_OFFSET]
- std %l4, [%o0 + L4_OFFSET]
- std %l6, [%o0 + L6_OFFSET]
-
- std %i0, [%o0 + I0_OFFSET] ! save the input registers
- std %i2, [%o0 + I2_OFFSET]
- std %i4, [%o0 + I4_OFFSET]
- std %i6, [%o0 + I6_FP_OFFSET]
-
- std %o0, [%o0 + O0_OFFSET] ! save the output registers
- std %o2, [%o0 + O2_OFFSET]
- std %o4, [%o0 + O4_OFFSET]
- std %o6, [%o0 + O6_SP_OFFSET]
-
- rd %psr, %o2
- st %o2, [%o0 + PSR_OFFSET] ! save status register
-
- /*
- * This is entered from _CPU_Context_restore with:
- * o1 = context to restore
- * o2 = psr
- */
-
- PUBLIC(_CPU_Context_restore_heir)
-SYM(_CPU_Context_restore_heir):
- /*
- * Flush all windows with valid contents except the current one.
- * In examining the set register windows, one may logically divide
- * the windows into sets (some of which may be empty) based on their
- * current status:
- *
- * + current (i.e. in use),
- * + used (i.e. a restore would not trap)
- * + invalid (i.e. 1 in corresponding bit in WIM)
- * + unused
- *
- * Either the used or unused set of windows may be empty.
- *
- * NOTE: We assume only one bit is set in the WIM at a time.
- *
- * Given a CWP of 5 and a WIM of 0x1, the registers are divided
- * into sets as follows:
- *
- * + 0 - invalid
- * + 1-4 - unused
- * + 5 - current
- * + 6-7 - used
- *
- * In this case, we only would save the used windows -- 6 and 7.
- *
- * Traps are disabled for the same logical period as in a
- * flush all windows trap handler.
- *
- * Register Usage while saving the windows:
- * g1 = current PSR
- * g2 = current wim
- * g3 = CWP
- * g4 = wim scratch
- * g5 = scratch
- */
-
- ld [%o1 + PSR_OFFSET], %g1 ! g1 = saved psr
-
- and %o2, SPARC_PSR_CWP_MASK, %g3 ! g3 = CWP
- ! g1 = psr w/o cwp
- andn %g1, SPARC_PSR_ET_MASK | SPARC_PSR_CWP_MASK, %g1
- or %g1, %g3, %g1 ! g1 = heirs psr
- mov %g1, %psr ! restore status register and
- ! **** DISABLE TRAPS ****
- mov %wim, %g2 ! g2 = wim
- mov 1, %g4
- sll %g4, %g3, %g4 ! g4 = WIM mask for CW invalid
-
-save_frame_loop:
- sll %g4, 1, %g5 ! rotate the "wim" left 1
- srl %g4, SPARC_NUMBER_OF_REGISTER_WINDOWS - 1, %g4
- or %g4, %g5, %g4 ! g4 = wim if we do one restore
-
- /*
- * If a restore would not underflow, then continue.
- */
-
- andcc %g4, %g2, %g0 ! Any windows to flush?
- bnz done_flushing ! No, then continue
- nop
-
- restore ! back one window
-
- /*
- * Now save the window just as if we overflowed to it.
- */
-
- std %l0, [%sp + CPU_STACK_FRAME_L0_OFFSET]
- std %l2, [%sp + CPU_STACK_FRAME_L2_OFFSET]
- std %l4, [%sp + CPU_STACK_FRAME_L4_OFFSET]
- std %l6, [%sp + CPU_STACK_FRAME_L6_OFFSET]
-
- std %i0, [%sp + CPU_STACK_FRAME_I0_OFFSET]
- std %i2, [%sp + CPU_STACK_FRAME_I2_OFFSET]
- std %i4, [%sp + CPU_STACK_FRAME_I4_OFFSET]
- std %i6, [%sp + CPU_STACK_FRAME_I6_FP_OFFSET]
-
- ba save_frame_loop
- nop
-
-done_flushing:
-
- add %g3, 1, %g3 ! calculate desired WIM
- and %g3, SPARC_NUMBER_OF_REGISTER_WINDOWS - 1, %g3
- mov 1, %g4
- sll %g4, %g3, %g4 ! g4 = new WIM
- mov %g4, %wim
-
- or %g1, SPARC_PSR_ET_MASK, %g1
- mov %g1, %psr ! **** ENABLE TRAPS ****
- ! and restore CWP
- nop
- nop
- nop
-
- ! skip g0
- ld [%o1 + G1_OFFSET], %g1 ! restore the global registers
- ldd [%o1 + G2_OFFSET], %g2
- ldd [%o1 + G4_OFFSET], %g4
- ldd [%o1 + G6_OFFSET], %g6
-
- ldd [%o1 + L0_OFFSET], %l0 ! restore the local registers
- ldd [%o1 + L2_OFFSET], %l2
- ldd [%o1 + L4_OFFSET], %l4
- ldd [%o1 + L6_OFFSET], %l6
-
- ldd [%o1 + I0_OFFSET], %i0 ! restore the output registers
- ldd [%o1 + I2_OFFSET], %i2
- ldd [%o1 + I4_OFFSET], %i4
- ldd [%o1 + I6_FP_OFFSET], %i6
-
- ldd [%o1 + O2_OFFSET], %o2 ! restore the output registers
- ldd [%o1 + O4_OFFSET], %o4
- ldd [%o1 + O6_SP_OFFSET], %o6
- ! do o0/o1 last to avoid destroying heir context pointer
- ldd [%o1 + O0_OFFSET], %o0 ! overwrite heir pointer
-
- jmp %o7 + 8 ! return
- nop ! delay slot
-
-/*
- * void _CPU_Context_restore(
- * Context_Control *new_context
- * )
- *
- * This routine is generally used only to perform restart self.
- *
- * NOTE: It is unnecessary to reload some registers.
- */
-
- .align 4
- PUBLIC(_CPU_Context_restore)
-SYM(_CPU_Context_restore):
- save %sp, -CPU_MINIMUM_STACK_FRAME_SIZE, %sp
- rd %psr, %o2
- ba SYM(_CPU_Context_restore_heir)
- mov %i0, %o1 ! in the delay slot
-
-/*
- * void _ISR_Handler()
- *
- * This routine provides the RTEMS interrupt management.
- *
- * We enter this handler from the 4 instructions in the trap table with
- * the following registers assumed to be set as shown:
- *
- * l0 = PSR
- * l1 = PC
- * l2 = nPC
- * l3 = trap type
- *
- * NOTE: By an executive defined convention, trap type is between 0 and 255 if
- * it is an asynchonous trap and 256 and 511 if it is synchronous.
- */
-
- .align 4
- PUBLIC(_ISR_Handler)
-SYM(_ISR_Handler):
- /*
- * Fix the return address for synchronous traps.
- */
-
- andcc %l3, SPARC_SYNCHRONOUS_TRAP_BIT_MASK, %g0
- ! Is this a synchronous trap?
- be,a win_ovflow ! No, then skip the adjustment
- nop ! DELAY
- mov %l2, %l1 ! do not return to the instruction
- add %l2, 4, %l2 ! indicated
-
-win_ovflow:
- /*
- * Save the globals this block uses.
- *
- * These registers are not restored from the locals. Their contents
- * are saved directly from the locals into the ISF below.
- */
-
- mov %g4, %l4 ! save the globals this block uses
- mov %g5, %l5
-
- /*
- * When at a "window overflow" trap, (wim == (1 << cwp)).
- * If we get here like that, then process a window overflow.
- */
-
- rd %wim, %g4
- srl %g4, %l0, %g5 ! g5 = win >> cwp ; shift count and CWP
- ! are LS 5 bits ; how convenient :)
- cmp %g5, 1 ! Is this an invalid window?
- bne dont_do_the_window ! No, then skip all this stuff
- ! we are using the delay slot
-
- /*
- * The following is same as a 1 position right rotate of WIM
- */
-
- srl %g4, 1, %g5 ! g5 = WIM >> 1
- sll %g4, SPARC_NUMBER_OF_REGISTER_WINDOWS-1 , %g4
- ! g4 = WIM << (Number Windows - 1)
- or %g4, %g5, %g4 ! g4 = (WIM >> 1) |
- ! (WIM << (Number Windows - 1))
-
- /*
- * At this point:
- *
- * g4 = the new WIM
- * g5 is free
- */
-
- /*
- * Since we are tinkering with the register windows, we need to
- * make sure that all the required information is in global registers.
- */
-
- save ! Save into the window
- wr %g4, 0, %wim ! WIM = new WIM
- nop ! delay slots
- nop
- nop
-
- /*
- * Now save the window just as if we overflowed to it.
- */
-
- std %l0, [%sp + CPU_STACK_FRAME_L0_OFFSET]
- std %l2, [%sp + CPU_STACK_FRAME_L2_OFFSET]
- std %l4, [%sp + CPU_STACK_FRAME_L4_OFFSET]
- std %l6, [%sp + CPU_STACK_FRAME_L6_OFFSET]
-
- std %i0, [%sp + CPU_STACK_FRAME_I0_OFFSET]
- std %i2, [%sp + CPU_STACK_FRAME_I2_OFFSET]
- std %i4, [%sp + CPU_STACK_FRAME_I4_OFFSET]
- std %i6, [%sp + CPU_STACK_FRAME_I6_FP_OFFSET]
-
- restore
- nop
-
-dont_do_the_window:
- /*
- * Global registers %g4 and %g5 are saved directly from %l4 and
- * %l5 directly into the ISF below.
- */
-
-save_isf:
-
- /*
- * Save the state of the interrupted task -- especially the global
- * registers -- in the Interrupt Stack Frame. Note that the ISF
- * includes a regular minimum stack frame which will be used if
- * needed by register window overflow and underflow handlers.
- *
- * REGISTERS SAME AS AT _ISR_Handler
- */
-
- sub %fp, CONTEXT_CONTROL_INTERRUPT_FRAME_SIZE, %sp
- ! make space for ISF
-
- std %l0, [%sp + ISF_PSR_OFFSET] ! save psr, PC
- st %l2, [%sp + ISF_NPC_OFFSET] ! save nPC
- st %g1, [%sp + ISF_G1_OFFSET] ! save g1
- std %g2, [%sp + ISF_G2_OFFSET] ! save g2, g3
- std %l4, [%sp + ISF_G4_OFFSET] ! save g4, g5 -- see above
- std %g6, [%sp + ISF_G6_OFFSET] ! save g6, g7
-
- std %i0, [%sp + ISF_I0_OFFSET] ! save i0, i1
- std %i2, [%sp + ISF_I2_OFFSET] ! save i2, i3
- std %i4, [%sp + ISF_I4_OFFSET] ! save i4, i5
- std %i6, [%sp + ISF_I6_FP_OFFSET] ! save i6/fp, i7
-
- rd %y, %g1
- st %g1, [%sp + ISF_Y_OFFSET] ! save y
-
- mov %sp, %o1 ! 2nd arg to ISR Handler
-
- /*
- * Increment ISR nest level and Thread dispatch disable level.
- *
- * Register usage for this section:
- *
- * l4 = _Thread_Dispatch_disable_level pointer
- * l5 = _ISR_Nest_level pointer
- * l6 = _Thread_Dispatch_disable_level value
- * l7 = _ISR_Nest_level value
- *
- * NOTE: It is assumed that l4 - l7 will be preserved until the ISR
- * nest and thread dispatch disable levels are unnested.
- */
-
- sethi %hi(SYM(_Thread_Dispatch_disable_level)), %l4
- ld [%l4 + %lo(SYM(_Thread_Dispatch_disable_level))], %l6
- sethi %hi(SYM(_ISR_Nest_level)), %l5
- ld [%l5 + %lo(SYM(_ISR_Nest_level))], %l7
-
- add %l6, 1, %l6
- st %l6, [%l4 + %lo(SYM(_Thread_Dispatch_disable_level))]
-
- add %l7, 1, %l7
- st %l7, [%l5 + %lo(SYM(_ISR_Nest_level))]
-
- /*
- * If ISR nest level was zero (now 1), then switch stack.
- */
-
- mov %sp, %fp
- subcc %l7, 1, %l7 ! outermost interrupt handler?
- bnz dont_switch_stacks ! No, then do not switch stacks
-
- sethi %hi(SYM(_CPU_Interrupt_stack_high)), %g4
- ld [%g4 + %lo(SYM(_CPU_Interrupt_stack_high))], %sp
-
-dont_switch_stacks:
- /*
- * Make sure we have a place on the stack for the window overflow
- * trap handler to write into. At this point it is safe to
- * enable traps again.
- */
-
- sub %sp, CPU_MINIMUM_STACK_FRAME_SIZE, %sp
-
- wr %l0, SPARC_PSR_ET_MASK, %psr ! **** ENABLE TRAPS ****
-
- /*
- * Vector to user's handler.
- *
- * NOTE: TBR may no longer have vector number in it since
- * we just enabled traps. It is definitely in l3.
- */
-
- sethi %hi(SYM(_ISR_Vector_table)), %g4
- or %g4, %lo(SYM(_ISR_Vector_table)), %g4
- and %l3, 0xFF, %g5 ! remove synchronous trap indicator
- sll %g5, 2, %g5 ! g5 = offset into table
- ld [%g4 + %g5], %g4 ! g4 = _ISR_Vector_table[ vector ]
-
-
- ! o1 = 2nd arg = address of the ISF
- ! WAS LOADED WHEN ISF WAS SAVED!!!
- mov %l3, %o0 ! o0 = 1st arg = vector number
- call %g4, 0
- nop ! delay slot
-
- /*
- * Redisable traps so we can finish up the interrupt processing.
- * This is a VERY conservative place to do this.
- *
- * NOTE: %l0 has the PSR which was in place when we took the trap.
- */
-
- mov %l0, %psr ! **** DISABLE TRAPS ****
-
- /*
- * Decrement ISR nest level and Thread dispatch disable level.
- *
- * Register usage for this section:
- *
- * l4 = _Thread_Dispatch_disable_level pointer
- * l5 = _ISR_Nest_level pointer
- * l6 = _Thread_Dispatch_disable_level value
- * l7 = _ISR_Nest_level value
- */
-
- sub %l6, 1, %l6
- st %l6, [%l4 + %lo(SYM(_Thread_Dispatch_disable_level))]
-
- st %l7, [%l5 + %lo(SYM(_ISR_Nest_level))]
-
- /*
- * If dispatching is disabled (includes nested interrupt case),
- * then do a "simple" exit.
- */
-
- orcc %l6, %g0, %g0 ! Is dispatching disabled?
- bnz simple_return ! Yes, then do a "simple" exit
- nop ! delay slot
-
- /*
- * If a context switch is necessary, then do fudge stack to
- * return to the interrupt dispatcher.
- */
-
- sethi %hi(SYM(_Context_Switch_necessary)), %l4
- ld [%l4 + %lo(SYM(_Context_Switch_necessary))], %l5
-
- orcc %l5, %g0, %g0 ! Is thread switch necessary?
- bnz SYM(_ISR_Dispatch) ! yes, then invoke the dispatcher
- nop ! delay slot
-
- /*
- * Finally, check to see if signals were sent to the currently
- * executing task. If so, we need to invoke the interrupt dispatcher.
- */
-
- sethi %hi(SYM(_ISR_Signals_to_thread_executing)), %l6
- ld [%l6 + %lo(SYM(_ISR_Signals_to_thread_executing))], %l7
-
- orcc %l7, %g0, %g0 ! Were signals sent to the currently
- ! executing thread?
- bz simple_return ! yes, then invoke the dispatcher
- nop ! delay slot
-
- /*
- * Invoke interrupt dispatcher.
- */
-
- PUBLIC(_ISR_Dispatch)
-SYM(_ISR_Dispatch):
-
- /*
- * The following subtract should get us back on the interrupted
- * tasks stack and add enough room to invoke the dispatcher.
- * When we enable traps, we are mostly back in the context
- * of the task and subsequent interrupts can operate normally.
- */
-
- sub %fp, CPU_MINIMUM_STACK_FRAME_SIZE, %sp
-
- or %l0, SPARC_PSR_ET_MASK, %l7 ! l7 = PSR with ET=1
- mov %l7, %psr ! **** ENABLE TRAPS ****
- nop
- nop
- nop
-
- call SYM(_Thread_Dispatch), 0
- nop
-
- /*
- * The CWP in place at this point may be different from
- * that which was in effect at the beginning of the ISR if we
- * have been context switched between the beginning of this invocation
- * of _ISR_Handler and this point. Thus the CWP and WIM should
- * not be changed back to their values at ISR entry time. Any
- * changes to the PSR must preserve the CWP.
- */
-
-simple_return:
- ld [%fp + ISF_Y_OFFSET], %l5 ! restore y
- wr %l5, 0, %y
-
- ldd [%fp + ISF_PSR_OFFSET], %l0 ! restore psr, PC
- ld [%fp + ISF_NPC_OFFSET], %l2 ! restore nPC
- rd %psr, %l3
- and %l3, SPARC_PSR_CWP_MASK, %l3 ! want "current" CWP
- andn %l0, SPARC_PSR_CWP_MASK, %l0 ! want rest from task
- or %l3, %l0, %l0 ! install it later...
- andn %l0, SPARC_PSR_ET_MASK, %l0
-
- /*
- * Restore tasks global and out registers
- */
-
- mov %fp, %g1
-
- ! g1 is restored later
- ldd [%fp + ISF_G2_OFFSET], %g2 ! restore g2, g3
- ldd [%fp + ISF_G4_OFFSET], %g4 ! restore g4, g5
- ldd [%fp + ISF_G6_OFFSET], %g6 ! restore g6, g7
-
- ldd [%fp + ISF_I0_OFFSET], %i0 ! restore i0, i1
- ldd [%fp + ISF_I2_OFFSET], %i2 ! restore i2, i3
- ldd [%fp + ISF_I4_OFFSET], %i4 ! restore i4, i5
- ldd [%fp + ISF_I6_FP_OFFSET], %i6 ! restore i6/fp, i7
-
- /*
- * Registers:
- *
- * ALL global registers EXCEPT G1 and the input registers have
- * already been restored and thuse off limits.
- *
- * The following is the contents of the local registers:
- *
- * l0 = original psr
- * l1 = return address (i.e. PC)
- * l2 = nPC
- * l3 = CWP
- */
-
- /*
- * if (CWP + 1) is an invalid window then we need to reload it.
- *
- * WARNING: Traps should now be disabled
- */
-
- mov %l0, %psr ! **** DISABLE TRAPS ****
- nop
- nop
- nop
- rd %wim, %l4
- add %l0, 1, %l6 ! l6 = cwp + 1
- and %l6, SPARC_PSR_CWP_MASK, %l6 ! do the modulo on it
- srl %l4, %l6, %l5 ! l5 = win >> cwp + 1 ; shift count
- ! and CWP are conveniently LS 5 bits
- cmp %l5, 1 ! Is tasks window invalid?
- bne good_task_window
-
- /*
- * The following code is the same as a 1 position left rotate of WIM.
- */
-
- sll %l4, 1, %l5 ! l5 = WIM << 1
- srl %l4, SPARC_NUMBER_OF_REGISTER_WINDOWS-1 , %l4
- ! l4 = WIM >> (Number Windows - 1)
- or %l4, %l5, %l4 ! l4 = (WIM << 1) |
- ! (WIM >> (Number Windows - 1))
-
- /*
- * Now restore the window just as if we underflowed to it.
- */
-
- wr %l4, 0, %wim ! WIM = new WIM
- restore ! now into the tasks window
-
- ldd [%g1 + CPU_STACK_FRAME_L0_OFFSET], %l0
- ldd [%g1 + CPU_STACK_FRAME_L2_OFFSET], %l2
- ldd [%g1 + CPU_STACK_FRAME_L4_OFFSET], %l4
- ldd [%g1 + CPU_STACK_FRAME_L6_OFFSET], %l6
- ldd [%g1 + CPU_STACK_FRAME_I0_OFFSET], %i0
- ldd [%g1 + CPU_STACK_FRAME_I2_OFFSET], %i2
- ldd [%g1 + CPU_STACK_FRAME_I4_OFFSET], %i4
- ldd [%g1 + CPU_STACK_FRAME_I6_FP_OFFSET], %i6
- ! reload of sp clobbers ISF
- save ! Back to ISR dispatch window
-
-good_task_window:
-
- mov %l0, %psr ! **** DISABLE TRAPS ****
- ! and restore condition codes.
- ld [%g1 + ISF_G1_OFFSET], %g1 ! restore g1
- jmp %l1 ! transfer control and
- rett %l2 ! go back to tasks window
-
-/* end of file */
diff --git a/c/src/exec/score/cpu/sparc/erc32.h b/c/src/exec/score/cpu/sparc/erc32.h
deleted file mode 100644
index 8dd5162cea..0000000000
--- a/c/src/exec/score/cpu/sparc/erc32.h
+++ /dev/null
@@ -1,518 +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 <rtems/score/sparc.h>
-
-#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 { \
- 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/exec/score/cpu/sparc/rtems.s b/c/src/exec/score/cpu/sparc/rtems.s
deleted file mode 100644
index e4dfd83fd6..0000000000
--- a/c/src/exec/score/cpu/sparc/rtems.s
+++ /dev/null
@@ -1,58 +0,0 @@
-/* rtems.s
- *
- * This file contains the single entry point code for
- * the SPARC port 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.
- *
- * 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$
- */
-
-#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()
- */
-
- .align 4
- PUBLIC(RTEMS)
-SYM(RTEMS):
- /*
- * g2 was chosen because gcc uses it as a scratch register in
- * similar code scenarios and the other locals, ins, and outs
- * are off limits to this routine unless it does a "save" and
- * copies its in registers to the outs which only works up until
- * 6 parameters. Best to take the simple approach in this case.
- */
- sethi SYM(_Entry_points), %g2
- or %g2, %lo(SYM(_Entry_points)), %g2
- sll %g1, 2, %g1
- add %g1, %g2, %g2
- jmp %g2
- nop
-
diff --git a/c/src/exec/score/cpu/sparc/sparc.h b/c/src/exec/score/cpu/sparc/sparc.h
deleted file mode 100644
index b282aa0189..0000000000
--- a/c/src/exec/score/cpu/sparc/sparc.h
+++ /dev/null
@@ -1,275 +0,0 @@
-/* sparc.h
- *
- * This include file contains information pertaining to the SPARC
- * processor family.
- *
- * 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_SPARC_h
-#define _INCLUDE_SPARC_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 sparc
-#undef sparc
-#endif
-#define sparc
-
-#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 "sparc" family. It does
- * this by setting variables to indicate which implementation
- * dependent features are present in a particular member
- * of the family.
- *
- * Currently recognized feature flags:
- *
- * + SPARC_HAS_FPU
- * 0 - no HW FPU
- * 1 - has HW FPU (assumed to be compatible w/90C602)
- *
- * + SPARC_HAS_BITSCAN
- * 0 - does not have scan instructions
- * 1 - has scan instruction (not currently implemented)
- *
- * + SPARC_NUMBER_OF_REGISTER_WINDOWS
- * 8 is the most common number supported by SPARC implementations.
- * SPARC_PSR_CWP_MASK is derived from this value.
- *
- * + SPARC_HAS_LOW_POWER_MODE
- * 0 - does not have low power mode support (or not supported)
- * 1 - has low power mode and thus a CPU model dependent idle task.
- *
- */
-
-#if defined(erc32)
-
-#define CPU_MODEL_NAME "erc32"
-#define SPARC_HAS_FPU 1
-#define SPARC_HAS_BITSCAN 0
-#define SPARC_NUMBER_OF_REGISTER_WINDOWS 8
-#define SPARC_HAS_LOW_POWER_MODE 1
-
-#else
-
-#error "Unsupported CPU Model"
-
-#endif
-
-/*
- * Define the name of the CPU family.
- */
-
-#define CPU_NAME "SPARC"
-
-/*
- * Miscellaneous constants
- */
-
-/*
- * PSR masks and starting bit positions
- *
- * NOTE: Reserved bits are ignored.
- */
-
-#if (SPARC_NUMBER_OF_REGISTER_WINDOWS == 8)
-#define SPARC_PSR_CWP_MASK 0x07 /* bits 0 - 4 */
-#elif (SPARC_NUMBER_OF_REGISTER_WINDOWS == 16)
-#define SPARC_PSR_CWP_MASK 0x0F /* bits 0 - 4 */
-#elif (SPARC_NUMBER_OF_REGISTER_WINDOWS == 32)
-#define SPARC_PSR_CWP_MASK 0x1F /* bits 0 - 4 */
-#else
-#error "Unsupported number of register windows for this cpu"
-#endif
-
-#define SPARC_PSR_ET_MASK 0x00000020 /* bit 5 */
-#define SPARC_PSR_PS_MASK 0x00000040 /* bit 6 */
-#define SPARC_PSR_S_MASK 0x00000080 /* bit 7 */
-#define SPARC_PSR_PIL_MASK 0x00000F00 /* bits 8 - 11 */
-#define SPARC_PSR_EF_MASK 0x00001000 /* bit 12 */
-#define SPARC_PSR_EC_MASK 0x00002000 /* bit 13 */
-#define SPARC_PSR_ICC_MASK 0x00F00000 /* bits 20 - 23 */
-#define SPARC_PSR_VER_MASK 0x0F000000 /* bits 24 - 27 */
-#define SPARC_PSR_IMPL_MASK 0xF0000000 /* bits 28 - 31 */
-
-#define SPARC_PSR_CWP_BIT_POSITION 0 /* bits 0 - 4 */
-#define SPARC_PSR_ET_BIT_POSITION 5 /* bit 5 */
-#define SPARC_PSR_PS_BIT_POSITION 6 /* bit 6 */
-#define SPARC_PSR_S_BIT_POSITION 7 /* bit 7 */
-#define SPARC_PSR_PIL_BIT_POSITION 8 /* bits 8 - 11 */
-#define SPARC_PSR_EF_BIT_POSITION 12 /* bit 12 */
-#define SPARC_PSR_EC_BIT_POSITION 13 /* bit 13 */
-#define SPARC_PSR_ICC_BIT_POSITION 20 /* bits 20 - 23 */
-#define SPARC_PSR_VER_BIT_POSITION 24 /* bits 24 - 27 */
-#define SPARC_PSR_IMPL_BIT_POSITION 28 /* bits 28 - 31 */
-
-#ifndef ASM
-
-/*
- * Standard nop
- */
-
-#define nop() \
- do { \
- asm volatile ( "nop" ); \
- } while ( 0 )
-
-/*
- * Get and set the PSR
- */
-
-#define sparc_get_psr( _psr ) \
- do { \
- (_psr) = 0; \
- asm volatile( "rd %%psr, %0" : "=r" (_psr) : "0" (_psr) ); \
- } while ( 0 )
-
-#define sparc_set_psr( _psr ) \
- do { \
- asm volatile ( "mov %0, %%psr " : "=r" ((_psr)) : "0" ((_psr)) ); \
- nop(); \
- nop(); \
- nop(); \
- } while ( 0 )
-
-/*
- * Get and set the TBR
- */
-
-#define sparc_get_tbr( _tbr ) \
- do { \
- (_tbr) = 0; /* to avoid unitialized warnings */ \
- asm volatile( "rd %%tbr, %0" : "=r" (_tbr) : "0" (_tbr) ); \
- } while ( 0 )
-
-#define sparc_set_tbr( _tbr ) \
- do { \
- asm volatile( "wr %0, 0, %%tbr" : "=r" (_tbr) : "0" (_tbr) ); \
- } while ( 0 )
-
-/*
- * Get and set the WIM
- */
-
-#define sparc_get_wim( _wim ) \
- do { \
- asm volatile( "rd %%wim, %0" : "=r" (_wim) : "0" (_wim) ); \
- } while ( 0 )
-
-#define sparc_set_wim( _wim ) \
- do { \
- asm volatile( "wr %0, %%wim" : "=r" (_wim) : "0" (_wim) ); \
- nop(); \
- nop(); \
- nop(); \
- } while ( 0 )
-
-/*
- * Get and set the Y
- */
-
-#define sparc_get_y( _y ) \
- do { \
- asm volatile( "rd %%y, %0" : "=r" (_y) : "0" (_y) ); \
- } while ( 0 )
-
-#define sparc_set_y( _y ) \
- do { \
- asm volatile( "wr %0, %%y" : "=r" (_y) : "0" (_y) ); \
- } while ( 0 )
-
-/*
- * Manipulate the interrupt level in the psr
- *
- */
-
-#define sparc_disable_interrupts( _level ) \
- do { \
- register unsigned int _newlevel; \
- \
- sparc_get_psr( _level ); \
- (_newlevel) = (_level) | SPARC_PSR_PIL_MASK; \
- sparc_set_psr( _newlevel ); \
- } while ( 0 )
-
-#define sparc_enable_interrupts( _level ) \
- do { \
- unsigned int _tmp; \
- \
- sparc_get_psr( _tmp ); \
- _tmp &= ~SPARC_PSR_PIL_MASK; \
- _tmp |= (_level) & SPARC_PSR_PIL_MASK; \
- sparc_set_psr( _tmp ); \
- } while ( 0 )
-
-#define sparc_flash_interrupts( _level ) \
- do { \
- register unsigned32 _ignored = 0; \
- \
- sparc_enable_interrupts( (_level) ); \
- sparc_disable_interrupts( _ignored ); \
- } while ( 0 )
-
-#define sparc_set_interrupt_level( _new_level ) \
- do { \
- register unsigned32 _new_psr_level = 0; \
- \
- sparc_get_psr( _new_psr_level ); \
- _new_psr_level &= ~SPARC_PSR_PIL_MASK; \
- _new_psr_level |= \
- (((_new_level) << SPARC_PSR_PIL_BIT_POSITION) & SPARC_PSR_PIL_MASK); \
- sparc_set_psr( _new_psr_level ); \
- } while ( 0 )
-
-#define sparc_get_interrupt_level( _level ) \
- do { \
- register unsigned32 _psr_level = 0; \
- \
- sparc_get_psr( _psr_level ); \
- (_level) = \
- (_psr_level & SPARC_PSR_PIL_MASK) >> SPARC_PSR_PIL_BIT_POSITION; \
- } while ( 0 )
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! _INCLUDE_SPARC_h */
-/* end of include file */
diff --git a/c/src/exec/score/cpu/sparc/sparctypes.h b/c/src/exec/score/cpu/sparc/sparctypes.h
deleted file mode 100644
index 1d23f8fea0..0000000000
--- a/c/src/exec/score/cpu/sparc/sparctypes.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* sparctypes.h
- *
- * This include file contains type definitions pertaining to the
- * SPARC processor family.
- *
- * 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 __SPARC_TYPES_h
-#define __SPARC_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 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 */
-
-typedef void sparc_isr;
-typedef void ( *sparc_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
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 afe6251bbe..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.
- */
-
-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 be056f220a..0000000000
--- a/c/src/exec/score/include/rtems/score/address.h
+++ /dev/null
@@ -1,107 +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
-
-/*
- * _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.
- */
-
-STATIC INLINE void *_Addresses_Add_offset (
- void *base,
- unsigned32 offset
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE void *_Addresses_Subtract_offset(
- void *base,
- unsigned32 offset
-);
-
-/*
- * _Addresses_Subtract
- *
- * DESCRIPTION:
- *
- * This function is used to subtract two addresses. It returns the
- * resulting offset.
- */
-
-STATIC INLINE unsigned32 _Addresses_Subtract (
- void *left,
- void *right
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE boolean _Addresses_Is_aligned (
- void *address
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE boolean _Addresses_Is_in_range (
- void *address,
- void *base,
- void *limit
-);
-
-#include <rtems/score/address.inl>
-
-#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 594c71d25c..0000000000
--- a/c/src/exec/score/include/rtems/score/apiext.h
+++ /dev/null
@@ -1,86 +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 <rtems/score/chain.h>
-
-/*
- * 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 struct {
- Chain_Node Node;
- API_extensions_Predriver_hook predriver_hook;
- API_extensions_Postdriver_hook postdriver_hook;
-} API_extensions_Control;
-
-/*
- * This is the list of API extensions to the system initialization.
- */
-
-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 );
-
-#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 6dbf1e0ba0..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 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 1d6c8f1db4..0000000000
--- a/c/src/exec/score/include/rtems/score/chain.h
+++ /dev/null
@@ -1,432 +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 <rtems/score/address.h>
-
-/*
- * 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_Initialize_empty
- *
- * DESCRIPTION:
- *
- * This routine initializes the specified chain to contain zero nodes.
- *
- */
-
-STATIC INLINE void _Chain_Initialize_empty(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Are_nodes_equal
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if LEFT and RIGHT are equal,
- * and FALSE otherwise.
- *
- */
-
-STATIC INLINE boolean _Chain_Are_nodes_equal(
- Chain_Node *left,
- Chain_Node *right
-);
-
-/*
- * _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.
- *
- */
-
-STATIC INLINE void _Chain_Extract_unprotected(
- Chain_Node *the_node
-);
-
-/*
- * _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_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.
- *
- */
-
-STATIC INLINE Chain_Node *_Chain_Get_unprotected(
- Chain_Control *the_chain
-);
-
-/*
- * _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_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.
- *
- */
-
-STATIC INLINE Chain_Node *_Chain_Get_first_unprotected(
- Chain_Control *the_chain
-);
-
-/*
- * _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.
- *
- */
-
-STATIC INLINE void _Chain_Insert_unprotected(
- Chain_Node *after_node,
- Chain_Node *the_node
-);
-
-/*
- * _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_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.
- *
- */
-
-STATIC INLINE void _Chain_Append_unprotected(
- Chain_Control *the_chain,
- 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
-);
-
-/*
- * _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.
- *
- */
-
-STATIC INLINE void _Chain_Prepend_unprotected(
- Chain_Control *the_chain,
- Chain_Node *the_node
-);
-
-/*
- * _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.
- *
- */
-
-STATIC INLINE void _Chain_Prepend(
- Chain_Control *the_chain,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Head
- *
- * DESCRIPTION:
- *
- * This function returns a pointer to the first node on the chain.
- *
- */
-
-STATIC INLINE Chain_Node *_Chain_Head(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Tail
- *
- * DESCRIPTION:
- *
- * This function returns a pointer to the last node on the chain.
- *
- */
-
-STATIC INLINE Chain_Node *_Chain_Tail(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Is_head
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_node is the head of the_chain and
- * FALSE otherwise.
- *
- */
-
-STATIC INLINE boolean _Chain_Is_head(
- Chain_Control *the_chain,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Is_tail
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_node is the tail of the_chain and
- * FALSE otherwise.
- *
- */
-
-STATIC INLINE boolean _Chain_Is_tail(
- Chain_Control *the_chain,
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Is_first
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_node is the first node on a chain and
- * FALSE otherwise.
- *
- */
-
-STATIC INLINE boolean _Chain_Is_first(
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Is_last
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_node is the last node on a chain and
- * FALSE otherwise.
- *
- */
-
-STATIC INLINE boolean _Chain_Is_last(
- Chain_Node *the_node
-);
-
-/*
- * _Chain_Is_empty
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if there a no nodes on the_chain and
- * FALSE otherwise.
- *
- */
-
-STATIC INLINE boolean _Chain_Is_empty(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Has_only_one_node
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if there is only one node on the_chain and
- * FALSE otherwise.
- *
- */
-
-STATIC INLINE boolean _Chain_Has_only_one_node(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_chain is NULL and FALSE otherwise.
- *
- */
-
-STATIC INLINE boolean _Chain_Is_null(
- Chain_Control *the_chain
-);
-
-/*
- * _Chain_Is_null_node
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_node is NULL and FALSE otherwise.
- *
- */
-
-STATIC INLINE boolean _Chain_Is_null_node(
- Chain_Node *the_node
-);
-
-#include <rtems/score/chain.inl>
-
-#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 4cd1f1e4c5..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 <rtems/score/cpu.h>
-
-/*
- * 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.
- */
-
-EXTERN 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 c711ba09b3..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 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 737004aeb8..0000000000
--- a/c/src/exec/score/include/rtems/score/coremsg.h
+++ /dev/null
@@ -1,444 +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 <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * 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.
- * Since msgs are variable length we just make a ptr to 1.
- */
-
-typedef struct {
- unsigned32 size;
-
-#ifndef __cplusplus
- /* NOTE: [0] is gcc specific,
- * but specifically disallowed by ANSI STD C++
- * g++ warns about it, so we #ifdef it out to
- * get rid of warnings when compiled by g++.
- */
- unsigned32 buffer[0];
-#endif
-
-} 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_send
- *
- * DESCRIPTION:
- *
- * This routine sends a message to the end of the specified message queue.
- *
- */
-
-STATIC INLINE 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
-);
-
-/*
- *
- * _CORE_message_queue_Urgent
- *
- * DESCRIPTION:
- *
- * This routine sends a message to the front of the specified message queue.
- *
- */
-
-STATIC INLINE 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
-);
-
-/*
- *
- * _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
-);
-
-/*
- * _CORE_message_queue_Allocate_message_buffer
- *
- * DESCRIPTION:
- *
- * This function allocates a message buffer from the inactive
- * message buffer chain.
- */
-
-STATIC INLINE CORE_message_queue_Buffer_control *
- _CORE_message_queue_Allocate_message_buffer (
- CORE_message_queue_Control *the_message_queue
-);
-
-/*
- * _CORE_message_queue_Free_message_buffer
- *
- * DESCRIPTION:
- *
- * This routine frees a message buffer to the inactive
- * message buffer chain.
- */
-
-STATIC INLINE void _CORE_message_queue_Free_message_buffer (
- CORE_message_queue_Control *the_message_queue,
- CORE_message_queue_Buffer_control *the_message
-);
-
-/*
- * _CORE_message_queue_Copy_buffer
- *
- * DESCRIPTION:
- *
- * This routine copies the contents of the source message buffer
- * to the destination message buffer.
- */
-
-STATIC INLINE void _CORE_message_queue_Copy_buffer (
- void *source,
- void *destination,
- unsigned32 size
-);
-
-/*
- * _CORE_message_queue_Get_pending_message
- *
- * DESCRIPTION:
- *
- * This function removes the first message from the_message_queue
- * and returns a pointer to it.
- */
-
-STATIC INLINE
- CORE_message_queue_Buffer_control *_CORE_message_queue_Get_pending_message (
- CORE_message_queue_Control *the_message_queue
-);
-
-/*
- * _CORE_message_queue_Is_priority
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the priority attribute is
- * enabled in the attribute_set and FALSE otherwise.
- */
-
-STATIC INLINE boolean _CORE_message_queue_Is_priority(
- CORE_message_queue_Attributes *the_attribute
-);
-
-/*
- * _CORE_message_queue_Append
- *
- * DESCRIPTION:
- *
- * This routine places the_message at the rear of the outstanding
- * messages on the_message_queue.
- */
-
-STATIC INLINE void _CORE_message_queue_Append (
- CORE_message_queue_Control *the_message_queue,
- CORE_message_queue_Buffer_control *the_message
-);
-
-/*
- * _CORE_message_queue_Prepend
- *
- * DESCRIPTION:
- *
- * This routine places the_message at the rear of the outstanding
- * messages on the_message_queue.
- */
-
-STATIC INLINE void _CORE_message_queue_Prepend (
- CORE_message_queue_Control *the_message_queue,
- CORE_message_queue_Buffer_control *the_message
-);
-
-/*
- * _CORE_message_queue_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_message_queue is TRUE and FALSE otherwise.
- */
-
-STATIC INLINE boolean _CORE_message_queue_Is_null (
- CORE_message_queue_Control *the_message_queue
-);
-
-/*
- * _CORE_message_queue_Is_notify_enabled
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if notification is enabled on this message
- * queue and FALSE otherwise.
- */
-
-STATIC INLINE boolean _CORE_message_queue_Is_notify_enabled (
- CORE_message_queue_Control *the_message_queue
-);
-
-/*
- * _CORE_message_queue_Set_notify
- *
- * DESCRIPTION:
- *
- * This routine initializes the notification information for the_message_queue.
- */
-
-STATIC INLINE void _CORE_message_queue_Set_notify (
- CORE_message_queue_Control *the_message_queue,
- CORE_message_queue_Notify_Handler the_handler,
- void *the_argument
-);
-
-#include <rtems/score/coremsg.inl>
-
-#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 2e8d16a0c1..0000000000
--- a/c/src/exec/score/include/rtems/score/coremutex.h
+++ /dev/null
@@ -1,247 +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 <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * 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;
-
-/*
- * 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
-);
-
-/*
- * _CORE_mutex_Is_locked
- *
- * DESCRIPTION:
- *
- * This routine returns TRUE if the mutex specified is locked and FALSE
- * otherwise.
- */
-
-STATIC INLINE boolean _CORE_mutex_Is_locked(
- CORE_mutex_Control *the_mutex
-);
-
-/*
- * _CORE_mutex_Is_fifo
- *
- * DESCRIPTION:
- *
- * This routine returns TRUE if the mutex's wait discipline is FIFO and FALSE
- * otherwise.
- */
-
-STATIC INLINE boolean _CORE_mutex_Is_fifo(
- CORE_mutex_Attributes *the_attribute
-);
-
-/*
- * _CORE_mutex_Is_priority
- *
- * DESCRIPTION:
- *
- * This routine returns TRUE if the mutex's wait discipline is PRIORITY and
- * FALSE otherwise.
- */
-
-STATIC INLINE boolean _CORE_mutex_Is_priority(
- CORE_mutex_Attributes *the_attribute
-);
-
-/*
- * _CORE_mutex_Is_inherit_priority
- *
- * DESCRIPTION:
- *
- * This routine returns TRUE if the mutex's wait discipline is
- * INHERIT_PRIORITY and FALSE otherwise.
- */
-
-STATIC INLINE boolean _CORE_mutex_Is_inherit_priority(
- CORE_mutex_Attributes *the_attribute
-);
-
-/*
- * _CORE_mutex_Is_priority_ceiling
- *
- * DESCRIPTION:
- *
- * This routine returns TRUE if the mutex's wait discipline is
- * PRIORITY_CEILING and FALSE otherwise.
- */
-
-STATIC INLINE boolean _CORE_mutex_Is_priority_ceiling(
- CORE_mutex_Attributes *the_attribute
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE boolean _CORE_mutex_Is_nesting_allowed(
- CORE_mutex_Attributes *the_attribute
-);
-
-#include <rtems/score/coremutex.inl>
-
-#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 cf40da4783..0000000000
--- a/c/src/exec/score/include/rtems/score/coresem.h
+++ /dev/null
@@ -1,179 +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 <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * 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
-);
-
-/*
- * _CORE_semaphore_Get_count
- *
- * DESCRIPTION:
- *
- * This routine returns the current count associated with the semaphore.
- */
-
-STATIC INLINE unsigned32 _CORE_semaphore_Get_count(
- CORE_semaphore_Control *the_semaphore
-);
-
-/*
- * _CORE_semaphore_Is_priority
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the priority attribute is
- * enabled in the attribute_set and FALSE otherwise.
- */
-
-STATIC INLINE boolean _CORE_semaphore_Is_priority(
- CORE_semaphore_Attributes *the_attribute
-);
-
-#include <rtems/score/coresem.inl>
-
-#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 dd50a0de8a..0000000000
--- a/c/src/exec/score/include/rtems/score/heap.h
+++ /dev/null
@@ -1,406 +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
-);
-
-/*
- * _Heap_Head
- *
- * DESCRIPTION:
- *
- * This function returns the head of the specified heap.
- */
-
-STATIC INLINE Heap_Block *_Heap_Head (
- Heap_Control *the_heap
-);
-
-/*
- * _Heap_Tail
- *
- * DESCRIPTION:
- *
- * This function returns the tail of the specified heap.
- */
-
-STATIC INLINE Heap_Block *_Heap_Tail (
- Heap_Control *the_heap
-);
-
-/*
- * _Heap_Previous_block
- *
- * DESCRIPTION:
- *
- * This function returns the address of the block which physically
- * precedes the_block in memory.
- */
-
-STATIC INLINE Heap_Block *_Heap_Previous_block (
- Heap_Block *the_block
-);
-
-/*
- * _Heap_Next_block
- *
- * DESCRIPTION:
- *
- * This function returns the address of the block which physically
- * follows the_block in memory.
- */
-
-STATIC INLINE Heap_Block *_Heap_Next_block (
- Heap_Block *the_block
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE Heap_Block *_Heap_Block_at(
- void *base,
- unsigned32 offset
-);
-
-/*PAGE
- *
- * _Heap_User_block_at
- *
- */
-
-STATIC INLINE Heap_Block *_Heap_User_block_at(
- void *base
-);
-
-/*
- * _Heap_Is_previous_block_free
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the previous block of the_block
- * is free, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _Heap_Is_previous_block_free (
- Heap_Block *the_block
-);
-
-/*
- * _Heap_Is_block_free
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the block is free, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _Heap_Is_block_free (
- Heap_Block *the_block
-);
-
-/*
- * _Heap_Is_block_used
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the block is currently allocated,
- * and FALSE otherwise.
- */
-
-STATIC INLINE boolean _Heap_Is_block_used (
- Heap_Block *the_block
-);
-
-/*
- * _Heap_Block_size
- *
- * DESCRIPTION:
- *
- * This function returns the size of the_block in bytes.
- */
-
-STATIC INLINE unsigned32 _Heap_Block_size (
- Heap_Block *the_block
-);
-
-/*
- * _Heap_Start_of_user_area
- *
- * DESCRIPTION:
- *
- * This function returns the starting address of the portion of the block
- * which the user may access.
- */
-
-STATIC INLINE void *_Heap_Start_of_user_area (
- Heap_Block *the_block
-);
-
-/*
- * _Heap_Is_block_in
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_block is within the memory area
- * managed by the_heap, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _Heap_Is_block_in (
- Heap_Control *the_heap,
- Heap_Block *the_block
-);
-
-
-/*
- * _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.
- */
-
-STATIC INLINE boolean _Heap_Is_page_size_valid(
- unsigned32 page_size
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE unsigned32 _Heap_Build_flag (
- unsigned32 size,
- unsigned32 in_use_flag
-);
-
-#include <rtems/score/heap.inl>
-
-#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 655656acc7..0000000000
--- a/c/src/exec/score/include/rtems/score/interr.h
+++ /dev/null
@@ -1,93 +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_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_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.
- */
-
-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 bb80823cfb..0000000000
--- a/c/src/exec/score/include/rtems/score/isr.h
+++ /dev/null
@@ -1,263 +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.
- */
-
-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.
- */
-
-EXTERN unsigned32 _ISR_Nest_level;
-
-/*
- * The following declares the Vector Table. Application
- * interrupt service routines are vectored by the ISR Handler via this table.
- */
-
-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_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.
- */
-
-STATIC INLINE boolean _ISR_Is_in_progress( void );
-
-/*
- * _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_Is_vector_number_valid
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the vector is a valid vector number
- * for this processor and FALSE otherwise.
- */
-
-STATIC INLINE boolean _ISR_Is_vector_number_valid (
- ISR_Vector_number vector
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE boolean _ISR_Is_valid_user_handler (
- void *handler
-);
-
-/*
- * _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 <rtems/score/isr.inl>
-
-#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 8f115e8fba..0000000000
--- a/c/src/exec/score/include/rtems/score/mpci.h
+++ /dev/null
@@ -1,280 +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 <rtems/score/mppkt.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/score/coresem.h>
-
-/*
- * 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 * );
-
-/*
- * This is the core semaphore which the MPCI Receive Server blocks on.
- */
-
-EXTERN CORE_semaphore_Control _MPCI_Semaphore;
-/*
- * The following thread queue is used to maintain a list of tasks
- * which currently have outstanding remote requests.
- */
-
-EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads;
-
-/*
- * The following define the internal pointers to the user's
- * configuration information.
- */
-
-EXTERN MPCI_Control *_MPCI_table;
-
-/*
- * The following points to the MPCI Receive Server.
- */
-
-EXTERN Thread_Control *_MPCI_Receive_server_tcb;
-
-/*
- * The following table contains the process packet routines provided
- * by each object that supports MP operations.
- */
-
-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_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_object,
- 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
- *
- */
-
-void _MPCI_Receive_server( void );
-
-/*PAGE
- *
- * _MPCI_Announce
- *
- * DESCRIPTION:
- *
- * XXX
- */
-
-void _MPCI_Announce ( 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 8ed1ab1fab..0000000000
--- a/c/src/exec/score/include/rtems/score/mppkt.h
+++ /dev/null
@@ -1,124 +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 <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * 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_INTERNAL_THREADS = 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_INTERNAL_THREADS
-#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 ) / 4 )
-
-/*
- * _Mp_packet_Is_valid_packet_class
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the the_packet_class is valid,
- * and FALSE otherwise.
- */
-
-STATIC INLINE boolean _Mp_packet_Is_valid_packet_class (
- MP_packet_Classes the_packet_class
-);
-
-/*
- * _Mp_packet_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the the_packet_class is null,
- * and FALSE otherwise.
- */
-
-STATIC INLINE boolean _Mp_packet_Is_null (
- MP_packet_Prefix *the_packet
-);
-
-#include <rtems/score/mppkt.inl>
-
-#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 2337a8e13a..0000000000
--- a/c/src/exec/score/include/rtems/score/object.h
+++ /dev/null
@@ -1,564 +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 <rtems/score/chain.h>
-
-/*
- * 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 4
-
-/*
- * 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.
- */
-
-EXTERN unsigned32 _Objects_Local_node;
-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.
- */
-
-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,
- unsigned32 *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
-);
-
-/*
- * _Objects_Build_id
- *
- * DESCRIPTION:
- *
- * This function builds an object's id from the processor node and index
- * values specified.
- *
- */
-
-STATIC INLINE Objects_Id _Objects_Build_id(
- Objects_Classes the_class,
- unsigned32 node,
- unsigned32 index
-);
-
-/*
- * _Objects_Get_class
- *
- * DESCRIPTION:
- *
- * This function returns the class portion of the ID.
- *
- */
-
-STATIC INLINE Objects_Classes _Objects_Get_class(
- Objects_Id id
-);
-
-/*
- * _Objects_Get_node
- *
- * DESCRIPTION:
- *
- * This function returns the node portion of the ID.
- *
- */
-
-STATIC INLINE unsigned32 _Objects_Get_node(
- Objects_Id id
-);
-
-/*
- * _Objects_Get_index
- *
- * DESCRIPTION:
- *
- * This function returns the index portion of the ID.
- *
- */
-
-STATIC INLINE unsigned32 _Objects_Get_index(
- Objects_Id id
-);
-
-/*
- * _Objects_Is_class_valid
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the class is valid.
- *
- */
-
-STATIC INLINE boolean _Objects_Is_class_valid(
- Objects_Classes the_class
-);
-
-/*
- * _Objects_Is_local_node
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the node is of the local object, and
- * FALSE otherwise.
- *
- */
-
-STATIC INLINE boolean _Objects_Is_local_node(
- unsigned32 node
-);
-
-/*
- * _Objects_Is_local_id
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the id is of a local object, and
- * FALSE otherwise.
- *
- */
-
-STATIC INLINE boolean _Objects_Is_local_id(
- Objects_Id id
-);
-
-/*
- * _Objects_Are_ids_equal
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if left and right are equal,
- * and FALSE otherwise.
- *
- */
-
-STATIC INLINE boolean _Objects_Are_ids_equal(
- Objects_Id left,
- Objects_Id right
-);
-
-/*
- * _Objects_Allocate
- *
- * DESCRIPTION:
- *
- * This function allocates a object control block from
- * the inactive chain of free object control blocks.
- *
- */
-
-STATIC INLINE Objects_Control *_Objects_Allocate(
- Objects_Information *information
-);
-
-/*
- * _Objects_Free
- *
- * DESCRIPTION:
- *
- * This function frees a object control block to the
- * inactive chain of free object control blocks.
- *
- */
-
-STATIC INLINE void _Objects_Free(
- Objects_Information *information,
- Objects_Control *the_object
-);
-
-/*
- * _Objects_Open
- *
- * DESCRIPTION:
- *
- * This function places the_object control pointer and object name
- * in the Local Pointer and Local Name Tables, respectively.
- *
- */
-
-STATIC INLINE void _Objects_Open(
- Objects_Information *information,
- Objects_Control *the_object,
- Objects_Name name
-);
-
-/*
- * _Objects_Close
- *
- * DESCRIPTION:
- *
- * This function removes the_object control pointer and object name
- * in the Local Pointer and Local Name Tables.
- *
- */
-
-STATIC INLINE void _Objects_Close(
- Objects_Information *information,
- Objects_Control *the_object
-);
-
-#include <rtems/score/object.inl>
-#include <rtems/score/objectmp.h>
-
-#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 dbd468e169..0000000000
--- a/c/src/exec/score/include/rtems/score/objectmp.h
+++ /dev/null
@@ -1,186 +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
-);
-
-/*
- * _Objects_MP_Allocate_global_object
- *
- * DESCRIPTION:
- *
- * This function allocates a Global Object control block.
- */
-
-STATIC INLINE Objects_MP_Control *_Objects_MP_Allocate_global_object (
- void
-);
-
-/*
- * _Objects_MP_Free_global_object
- *
- * DESCRIPTION:
- *
- * This routine deallocates a Global Object control block.
- */
-
-STATIC INLINE void _Objects_MP_Free_global_object (
- Objects_MP_Control *the_object
-);
-
-/*
- * _Objects_MP_Is_null_global_object
- *
- * DESCRIPTION:
- *
- * This function returns whether the global object is NULL or not.
- */
-
-STATIC INLINE boolean _Objects_MP_Is_null_global_object (
- Objects_MP_Control *the_object
-);
-
-/*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.
- */
-
-EXTERN unsigned32 _Objects_MP_Maximum_global_objects;
-EXTERN Chain_Control _Objects_MP_Inactive_global_objects;
-
-#include <rtems/score/objectmp.inl>
-
-#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 a4a96045d5..0000000000
--- a/c/src/exec/score/include/rtems/score/priority.h
+++ /dev/null
@@ -1,234 +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.
- */
-
-EXTERN volatile Priority_Bit_map_control _Priority_Major_bit_map;
-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_Handler_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this handler.
- */
-
-STATIC INLINE void _Priority_Handler_initialization( void );
-
-/*
- * _Priority_Is_valid
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_priority if valid for a
- * user task, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _Priority_Is_valid (
- Priority_Control the_priority
-);
-
-/*
- * _Priority_Major
- *
- * DESCRIPTION:
- *
- * This function returns the major portion of the_priority.
- */
-
-STATIC INLINE unsigned32 _Priority_Major (
- Priority_Control the_priority
-);
-
-/*
- * _Priority_Minor
- *
- * DESCRIPTION:
- *
- * This function returns the minor portion of the_priority.
- */
-
-STATIC INLINE unsigned32 _Priority_Minor (
- Priority_Control the_priority
-);
-
-/*
- * _Priority_Mask
- *
- * DESCRIPTION:
- *
- * This function returns the mask associated with the major or minor
- * number passed to it.
- */
-
-#if ( CPU_USE_GENERIC_BITFIELD_CODE == TRUE )
-
-STATIC INLINE unsigned32 _Priority_Mask (
- unsigned32 bit_number
-);
-
-#else
-
-#define _Priority_Mask( _bit_number ) \
- _CPU_Priority_Mask( _bit_number )
-
-#endif
-
-/*
- * _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.
- */
-
-#if ( CPU_USE_GENERIC_BITFIELD_CODE == TRUE )
-
-STATIC INLINE unsigned32 _Priority_Bits_index (
- unsigned32 bit_number
-);
-
-#else
-
-#define _Priority_Bits_index( _priority ) \
- _CPU_Priority_bits_index( _priority )
-
-#endif
-
-/*
- * _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.
- */
-
-STATIC INLINE void _Priority_Add_to_bit_map (
- Priority_Information *the_priority_map
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE void _Priority_Remove_from_bit_map (
- Priority_Information *the_priority_map
-);
-
-/*
- * _Priority_Get_highest
- *
- * DESCRIPTION:
- *
- * This function returns the priority of the highest priority
- * ready thread.
- */
-
-STATIC INLINE Priority_Control _Priority_Get_highest( void );
-
-/*
- * _Priority_Initialize_information
- *
- * DESCRIPTION:
- *
- * This routine initializes the_priority_map so that it
- * contains the information necessary to manage a thread
- * at new_priority.
- */
-
-STATIC INLINE void _Priority_Initialize_information(
- Priority_Information *the_priority_map,
- Priority_Control new_priority
-);
-
-/*
- * _Priority_Is_group_empty
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the priority GROUP is empty, and
- * FALSE otherwise.
- */
-
-STATIC INLINE boolean _Priority_Is_group_empty (
- Priority_Control the_priority
-);
-
-#include <rtems/score/priority.inl>
-
-#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 a054dae3df..0000000000
--- a/c/src/exec/score/include/rtems/score/stack.h
+++ /dev/null
@@ -1,95 +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;
-
-/*
- * _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.
- */
-
-STATIC INLINE void _Stack_Initialize (
- Stack_Control *the_stack,
- void *starting_address,
- unsigned32 size
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE boolean _Stack_Is_enough (
- unsigned32 size
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE unsigned32 _Stack_Adjust_size (
- unsigned32 size
-);
-
-#include <rtems/score/stack.inl>
-
-#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 a120cadae3..0000000000
--- a/c/src/exec/score/include/rtems/score/states.h
+++ /dev/null
@@ -1,354 +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 0xffff /* all states */
-#define STATES_READY 0x0000 /* ready to run */
-#define STATES_DORMANT 0x0001 /* created not started */
-#define STATES_SUSPENDED 0x0002 /* waiting for resume */
-#define STATES_TRANSIENT 0x0004 /* thread in transition */
-#define STATES_DELAYING 0x0008 /* wait for timeout */
-#define STATES_WAITING_FOR_TIME 0x0010 /* wait for TOD */
-#define STATES_WAITING_FOR_BUFFER 0x0020
-#define STATES_WAITING_FOR_SEGMENT 0x0040
-#define STATES_WAITING_FOR_MESSAGE 0x0080
-#define STATES_WAITING_FOR_EVENT 0x0100
-#define STATES_WAITING_FOR_SEMAPHORE 0x0200
-#define STATES_WAITING_FOR_MUTEX 0x0400
-#define STATES_WAITING_FOR_CONDITION_VARIABLE 0x0800
-#define STATES_WAITING_FOR_RPC_REPLY 0x1000
-#define STATES_WAITING_FOR_PERIOD 0x2000
-
-#define STATES_LOCALLY_BLOCKED ( STATES_WAITING_FOR_BUFFER | \
- STATES_WAITING_FOR_SEGMENT | \
- STATES_WAITING_FOR_MESSAGE | \
- STATES_WAITING_FOR_MUTEX | \
- STATES_WAITING_FOR_CONDITION_VARIABLE | \
- STATES_WAITING_FOR_SEMAPHORE )
-
-#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_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.
- */
-
-STATIC INLINE States_Control _States_Set (
- States_Control states_to_set,
- States_Control current_state
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE States_Control _States_Clear (
- States_Control states_to_clear,
- States_Control current_state
-);
-
-/*
- * _States_Is_ready
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_states indicates that the
- * state is READY, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _States_Is_ready (
- States_Control the_states
-);
-
-/*
- * _States_Is_only_dormant
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the DORMANT state is the ONLY state
- * set in the_states, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _States_Is_only_dormant (
- States_Control the_states
-);
-
-/*
- * _States_Is_dormant
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the DORMANT state is set in
- * the_states, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _States_Is_dormant (
- States_Control the_states
-);
-
-/*
- * _States_Is_suspended
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the SUSPENDED state is set in
- * the_states, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _States_Is_suspended (
- States_Control the_states
-);
-
-/*
- * _States_Is_Transient
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the TRANSIENT state is set in
- * the_states, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _States_Is_transient (
- States_Control the_states
-);
-
-/*
- * _States_Is_delaying
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the DELAYING state is set in
- * the_states, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _States_Is_delaying (
- States_Control the_states
-);
-
-/*
- * _States_Is_waiting_for_buffer
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the WAITING_FOR_BUFFER state is set in
- * the_states, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _States_Is_waiting_for_buffer (
- States_Control the_states
-);
-
-/*
- * _States_Is_waiting_for_segment
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the WAITING_FOR_SEGMENT state is set in
- * the_states, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _States_Is_waiting_for_segment (
- States_Control the_states
-);
-
-/*
- * _States_Is_waiting_for_message
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the WAITING_FOR_MESSAGE state is set in
- * the_states, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _States_Is_waiting_for_message (
- States_Control the_states
-);
-
-/*
- * _States_Is_waiting_for_event
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the WAITING_FOR_EVENT state is set in
- * the_states, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _States_Is_waiting_for_event (
- States_Control the_states
-);
-
-/*
- * _States_Is_waiting_for_mutex
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the WAITING_FOR_MUTEX state
- * is set in the_states, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _States_Is_waiting_for_mutex (
- States_Control the_states
-);
-
-/*
- * _States_Is_waiting_for_semaphore
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the WAITING_FOR_SEMAPHORE state
- * is set in the_states, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _States_Is_waiting_for_semaphore (
- States_Control the_states
-);
-
-/*
- * _States_Is_waiting_for_time
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the WAITING_FOR_TIME state is set in
- * the_states, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _States_Is_waiting_for_time (
- States_Control the_states
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE boolean _States_Is_waiting_for_rpc_reply (
- States_Control the_states
-);
-
-/*
- * _States_Is_waiting_for_period
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the WAITING_FOR_PERIOD state is set in
- * the_states, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _States_Is_waiting_for_period (
- States_Control the_states
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE boolean _States_Is_locally_blocked (
- States_Control the_states
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE boolean _States_Is_waiting_on_thread_queue (
- States_Control the_states
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE boolean _States_Is_blocked (
- States_Control the_states
-);
-
-/*
- * _States_Are_set
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if any of the states in the mask
- * are set in the_states, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _States_Are_set (
- States_Control the_states,
- States_Control mask
-);
-
-#include <rtems/score/states.inl>
-
-#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 11b5018705..0000000000
--- a/c/src/exec/score/include/rtems/score/sysstate.h
+++ /dev/null
@@ -1,162 +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, /* beginning of 2nd -> end of SYSI */
- 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.
- */
-
-EXTERN boolean _System_state_Is_multiprocessing;
-
-/*
- * The following variable contains the current system state.
- */
-
-EXTERN System_state_Codes _System_state_Current;
-
-/*
- * _System_state_Handler_initialization
- *
- * DESCRIPTION:
- *
- * This routine initializes the system state handler.
- */
-
-STATIC INLINE void _System_state_Handler_initialization (
- boolean is_multiprocessing
-);
-
-/*
- * _System_state_Set
- *
- * DESCRIPTION:
- *
- * This routine sets the current system state to that specified by
- * the called.
- */
-
-STATIC INLINE void _System_state_Set (
- System_state_Codes state
-);
-
-/*
- * _System_state_Get
- *
- * DESCRIPTION:
- *
- * This function returns the current system state.
- */
-
-STATIC INLINE System_state_Codes _System_state_Get ( void );
-
-/*
- * _System_state_Is_before_initialization
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the state is equal to the
- * "before initialization" state, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _System_state_Is_before_initialization (
- System_state_Codes state
-);
-
-/*
- * _System_state_Is_before_multitasking
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the state is equal to the
- * "before multitasking" state, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _System_state_Is_before_multitasking (
- System_state_Codes state
-);
-
-/*
- * _System_state_Is_begin_multitasking
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the state is equal to the
- * "begin multitasking" state, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _System_state_Is_begin_multitasking (
- System_state_Codes state
-);
-
-/*
- * _System_state_Is_up
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the state is equal to the
- * "up" state, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _System_state_Is_up (
- System_state_Codes state
-);
-
-/*
- * _System_state_Is_failed
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the state is equal to the
- * "failed" state, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _System_state_Is_failed (
- System_state_Codes state
-);
-
-#include <rtems/score/sysstate.inl>
-
-#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 c485671e75..0000000000
--- a/c/src/exec/score/include/rtems/score/thread.h
+++ /dev/null
@@ -1,769 +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 <rtems/score/context.h>
-#include <rtems/score/cpu.h>
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/stack.h>
-#include <rtems/score/states.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/tqdata.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * 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 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;
- boolean is_timeslice;
- unsigned32 isr_level;
- Priority_Control initial_priority; /* initial priority */
- 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
-
-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 ********************/
- boolean is_global;
- Chain_Control *ready;
- Priority_Information Priority_map;
- Thread_Start_information Start;
- boolean is_preemptible;
- boolean is_timeslice;
- Context_Control Registers;
- void *fp_context;
- void *API_Extensions[ THREAD_API_LAST + 1 ];
- void **extensions;
-} Thread_Control;
-
-/*
- * 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.
- */
-
-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.
- */
-
-EXTERN unsigned32 _Thread_Dispatch_disable_level;
-
-/*
- * 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.
- */
-
-EXTERN unsigned32 _Thread_Maximum_extensions;
-
-/*
- * The following data items are used to manage timeslicing.
- */
-
-EXTERN unsigned32 _Thread_Ticks_remaining_in_timeslice;
-EXTERN unsigned32 _Thread_Ticks_per_timeslice;
-
-/*
- * The following points to the array of FIFOs used to manage the
- * set of ready threads.
- */
-
-EXTERN Chain_Control *_Thread_Ready_chain;
-
-/*
- * The following points to the thread which is currently executing.
- * This thread is implicitly manipulated by numerous directives.
- */
-
-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.
- */
-
-EXTERN Thread_Control *_Thread_Heir;
-
-/*
- * The following points to the thread whose floating point
- * context is currently loaded.
- */
-
-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_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 (
- Thread_Control *system_thread,
- Thread_Control *idle_thread
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE void _Thread_Stop_multitasking( void );
-
-/*
- * _Thread_Dispatch_initialization
- *
- * DESCRIPTION:
- *
- * This routine initializes the thread dispatching subsystem.
- */
-
-STATIC INLINE void _Thread_Dispatch_initialization( 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
- */
-
-boolean _Thread_Initialize(
- Objects_Information *information,
- Thread_Control *the_thread,
- void *stack_area, /* NULL if to be allocated */
- unsigned32 stack_size, /* insure it is >= min */
- boolean is_fp, /* TRUE if thread uses FP */
- Priority_Control priority,
- boolean is_preemptible,
- boolean is_timeslice,
- 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_Is_executing
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_thread is the currently executing
- * thread, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _Thread_Is_executing (
- Thread_Control *the_thread
-);
-
-/*
- * _Thread_Is_heir
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_thread is the heir
- * thread, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _Thread_Is_executing (
- Thread_Control *the_thread
-);
-
-/*
- * _Thread_Is_executing_also_the_heir
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the currently executing thread
- * is also the heir thread, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _Thread_Is_executing_also_the_heir( 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_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.
- */
-
-STATIC INLINE void _Thread_Resume (
- Thread_Control *the_thread
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE void _Thread_Unblock (
- Thread_Control *the_thread
-);
-
-/*
- * _Thread_Restart_self
- *
- * DESCRIPTION:
- *
- * This routine resets the current context of the calling thread
- * to that of its initial state.
- */
-
-STATIC INLINE void _Thread_Restart_self( void );
-
-/*
- * _Thread_Calculate_heir
- *
- * DESCRIPTION:
- *
- * This function returns a pointer to the highest priority
- * ready thread.
- */
-
-STATIC INLINE void _Thread_Calculate_heir( void );
-
-/*
- * _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.
- */
-
-STATIC INLINE boolean _Thread_Is_allocated_fp (
- Thread_Control *the_thread
-);
-
-/*
- * _Thread_Deallocate_fp
- *
- * DESCRIPTION:
- *
- * This routine is invoked when the currently loaded floating
- * point context is now longer associated with an active thread.
- */
-
-STATIC INLINE void _Thread_Deallocate_fp( void );
-
-/*
- * _Thread_Disable_dispatch
- *
- * DESCRIPTION:
- *
- * This routine prevents dispatching.
- */
-
-STATIC INLINE void _Thread_Disable_dispatch( void );
-
-/*
- * _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 )
-
-STATIC INLINE void _Thread_Enable_dispatch();
-
-#endif
-
-#if ( CPU_INLINE_ENABLE_DISPATCH == FALSE )
-
-void _Thread_Enable_dispatch( void );
-
-#endif
-
-/*
- * _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.
- */
-
-STATIC INLINE void _Thread_Unnest_dispatch( void );
-
-/*
- * _Thread_Is_dispatching_enabled
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if dispatching is disabled, and FALSE
- * otherwise.
- */
-
-STATIC INLINE boolean _Thread_Is_dispatching_enabled( void );
-
-/*
- * _Thread_Is_context_switch_necessary
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if dispatching is disabled, and FALSE
- * otherwise.
- */
-
-STATIC INLINE boolean _Thread_Is_context_switch_necessary( void );
-
-/*
- * _Thread_Is_null
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the_thread is NULL and FALSE otherwise.
- */
-
-STATIC INLINE boolean _Thread_Is_null (
- Thread_Control *the_thread
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE Thread_Control *_Thread_Get (
- Objects_Id id,
- Objects_Locations *location
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE boolean _Thread_Is_proxy_blocking (
- unsigned32 code
-);
-
-#include <rtems/score/thread.inl>
-#include <rtems/score/threadmp.h>
-
-#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 4afc965381..0000000000
--- a/c/src/exec/score/include/rtems/score/threadmp.h
+++ /dev/null
@@ -1,114 +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 package is the specification for the Thread Handler's
- * multiprocessing specific support routines.
- */
-
-void _Thread_MP_Handler_initialization (
- unsigned32 maximum_proxies
-);
-
-/*
- * _Thread_MP_Is_receive
- *
- * DESCRIPTION:
- *
- * This function returns true if the thread in question is the
- * multiprocessing receive thread.
- */
-
-STATIC INLINE boolean _Thread_MP_Is_receive (
- Thread_Control *the_thread
-);
-
-/*
- * _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_Free_proxy
- *
- * DESCRIPTION:
- *
- * This routine frees a proxy control block to the
- * inactive chain of free proxy control blocks.
- */
-
-STATIC INLINE void _Thread_MP_Free_proxy (
- Thread_Control *the_thread
-);
-
-/*
- * _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.
- */
-
-EXTERN Thread_Control *_Thread_MP_Receive;
-
-/*
- * The following chains are used to manage proxies.
- */
-
-EXTERN Chain_Control _Thread_MP_Active_proxies;
-EXTERN Chain_Control _Thread_MP_Inactive_proxies;
-
-#include <rtems/score/threadmp.inl>
-
-#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 6a074daf16..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 <rtems/score/tqdata.h>
-
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * 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 *
- );
-
-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 89ff118c33..0000000000
--- a/c/src/exec/score/include/rtems/score/tod.h
+++ /dev/null
@@ -1,302 +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 <rtems/score/object.h>
-#include <rtems/score/watchdog.h>
-
-/*
- * 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_MICROSECONDS_PER_SECOND 1000000
-#define TOD_MILLISECONDS_PER_SECOND 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 contains the current time of day.
- */
-
-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.
- */
-
-EXTERN Watchdog_Interval _TOD_Seconds_since_epoch;
-
-/*
- * The following contains the number of ticks since the
- * system was booted.
- */
-
-EXTERN Watchdog_Interval _TOD_Ticks_since_boot;
-
-/*
- * The following contains the number of microseconds per tick.
- */
-
-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.
- */
-
-EXTERN unsigned32 _TOD_Ticks_per_second;
-
-/*
- * This is the control structure for the watchdog timer which
- * fires to service the seconds chain.
- */
-
-EXTERN Watchdog_Control _TOD_Seconds_watchdog;
-
-#ifdef 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_Is_set
- *
- * DESCRIPTION:
- *
- * This function returns TRUE if the application has set the current
- * time of day, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _TOD_Is_set( void );
-
-/*
- * _TOD_Tickle_ticks
- *
- * DESCRIPTION:
- *
- * This routine increments the ticks field of the current time of
- * day at each clock tick.
- */
-
-STATIC INLINE void _TOD_Tickle_ticks( void );
-
-/*
- * _TOD_Deactivate
- *
- * DESCRIPTION:
- *
- * This routine deactivates updating of the current time of day.
- */
-
-STATIC INLINE void _TOD_Deactivate( void );
-
-/*
- * _TOD_Activate
- *
- * DESCRIPTION:
- *
- * This routine deactivates updating of the current time of day.
- */
-
-STATIC INLINE void _TOD_Activate(
- Watchdog_Interval ticks
-);
-
-/*
- * _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)
-
-#include <rtems/score/tod.inl>
-
-#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 872a29beb0..0000000000
--- a/c/src/exec/score/include/rtems/score/tqdata.h
+++ /dev/null
@@ -1,117 +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 <rtems/score/chain.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-
-/*
- * 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_NOTHING_HAPPENED,
- THREAD_QUEUE_TIMEOUT,
- THREAD_QUEUE_SATISFIED
-} Thread_queue_states;
-
-/*
- * The following record defines the control block used
- * to manage each thread.
- */
-
-#define TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS 4 /* # of pri groups */
-
-typedef struct {
- union {
- Chain_Control Fifo; /* FIFO discipline list */
- Chain_Control Priority[TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS];
- /* priority discipline list */
- } Queues;
- boolean sync; /* alloc/dealloc critical section */
- Thread_queue_states sync_state; /* what happened while in sync */
- Thread_queue_Disciplines discipline; /* queue discipline */
- States_Control state; /* state of threads on Thread_q */
- unsigned32 timeout_status;
- unsigned32 count;
-} Thread_queue_Control;
-
-/*
- * _Thread_queue_Header_number
- *
- * DESCRIPTION:
- *
- * This function returns the index of the priority chain on which
- * a thread of the_priority should be placed.
- */
-
-STATIC INLINE unsigned32 _Thread_queue_Header_number (
- Priority_Control the_priority
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE boolean _Thread_queue_Is_reverse_search (
- Priority_Control the_priority
-);
-
-/*
- * _Thread_queue_Enter_critical_section
- *
- * DESCRIPTION:
- *
- * This routine is invoked to indicate that the specified thread queue is
- * entering a critical section.
- */
-
-STATIC INLINE void _Thread_queue_Enter_critical_section (
- Thread_queue_Control *the_thread_queue
-);
-
-#include <rtems/score/tqdata.inl>
-
-#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 424871e895..0000000000
--- a/c/src/exec/score/include/rtems/score/userext.h
+++ /dev/null
@@ -1,295 +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 <rtems/score/interr.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/thread.h>
-
-/*
- * 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_post_switch_extension)(
- 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_post_switch_extension thread_post_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.
- */
-
-EXTERN User_extensions_Control _User_extensions_Initial;
-
-/*
- * The following is used to manage the list of active extensions.
- */
-
-EXTERN Chain_Control _User_extensions_List;
-
-
-/*
- * _User_extensions_Handler_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this handler.
- */
-
-STATIC INLINE void _User_extensions_Handler_initialization (
- User_extensions_Table *initial_extensions
-);
-
-/*
- * _User_extensions_Add_set
- *
- * DESCRIPTION:
- *
- * This routine is used to add a user extension set to the active list.
- */
-
-STATIC INLINE void _User_extensions_Add_set (
- User_extensions_Control *the_extension,
- User_extensions_Table *extension_table
-);
-
-/*
- * _User_extensions_Add_API_set
- *
- * DESCRIPTION:
- *
- * This routine is used to add an API extension set to the active list.
- */
-
-STATIC INLINE void _User_extensions_Add_API_set (
- User_extensions_Control *the_extension
-);
-
-/*
- * _User_extensions_Remove_set
- *
- * DESCRIPTION:
- *
- * This routine is used to remove a user extension set from the active list.
- */
-
-STATIC INLINE void _User_extensions_Remove_set (
- User_extensions_Control *the_extension
-);
-
-/*
- * _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_switch
- *
- * DESCRIPTION:
- *
- * This routine is used to invoke the user extension which
- * is invoked when a context switch occurs.
- */
-
-STATIC INLINE void _User_extensions_Thread_switch (
- Thread_Control *executing,
- Thread_Control *heir
-);
-
-/*
- * _User_extensions_Thread_post_switch
- *
- * DESCRIPTION:
- *
- * This routine is used to invoke the user extension which is invoked
- * after a context switch occurs (i.e. we are running in the context
- * of the new thread).
- */
-
-STATIC INLINE void _User_extensions_Thread_post_switch (
- Thread_Control *executing
-);
-
-
-/*
- * _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
-);
-
-#include <rtems/score/userext.inl>
-
-#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 5ac7eee641..0000000000
--- a/c/src/exec/score/include/rtems/score/watchdog.h
+++ /dev/null
@@ -1,403 +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 <rtems/score/object.h>
-
-/*
- * 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_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.
- */
-
-EXTERN volatile unsigned32 _Watchdog_Sync_level;
-EXTERN volatile unsigned32 _Watchdog_Sync_count;
-
-/*
- * The following defines the watchdog chains which are managed
- * on ticks and second boundaries.
- */
-
-EXTERN Chain_Control _Watchdog_Ticks_chain;
-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_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.
- */
-
-STATIC INLINE void _Watchdog_Initialize(
- Watchdog_Control *the_watchdog,
- Watchdog_Service_routine_entry routine,
- Objects_Id id,
- void *user_data
-);
-
-/*
- * _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_Is_active
- *
- * DESCRIPTION:
- *
- * This routine returns TRUE if the watchdog timer is in the ACTIVE
- * state, and FALSE otherwise.
- */
-
-STATIC INLINE boolean _Watchdog_Is_active(
- Watchdog_Control *the_watchdog
-);
-
-/*
- *
- * _Watchdog_Activate
- *
- * DESCRIPTION:
- *
- * This routine activates THE_WATCHDOG timer which is already
- * on a watchdog chain.
- */
-
-STATIC INLINE void _Watchdog_Activate(
- Watchdog_Control *the_watchdog
-);
-
-/*
- *
- * _Watchdog_Deactivate
- *
- * DESCRIPTION:
- *
- * This routine deactivates THE_WATCHDOG timer which will remain
- * on a watchdog chain.
- */
-
-STATIC INLINE void _Watchdog_Deactivate(
- Watchdog_Control *the_watchdog
-);
-
-/*
- *
- * _Watchdog_Tickle_ticks
- *
- * DESCRIPTION:
- *
- * This routine is invoked at each clock tick to update the ticks
- * watchdog chain.
- */
-
-STATIC INLINE void _Watchdog_Tickle_ticks( void );
-
-/*
- *
- * _Watchdog_Tickle_seconds
- *
- * DESCRIPTION:
- *
- * This routine is invoked at each clock tick to update the seconds
- * watchdog chain.
- */
-
-STATIC INLINE void _Watchdog_Tickle_seconds( void );
-
-/*
- *
- * _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.
- */
-
-STATIC INLINE void _Watchdog_Insert_ticks(
- Watchdog_Control *the_watchdog,
- Watchdog_Interval units
-);
-
-/*
- *
- * _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.
- */
-
-STATIC INLINE void _Watchdog_Insert_seconds(
- Watchdog_Control *the_watchdog,
- Watchdog_Interval units
-);
-
-/*
- *
- * _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.
- */
-
-STATIC INLINE void _Watchdog_Adjust_seconds(
- Watchdog_Adjust_directions direction,
- Watchdog_Interval units
-);
-
-/*
- *
- * _Watchdog_Adjust_ticks
- *
- * DESCRIPTION:
- *
- * This routine adjusts the ticks watchdog chain in the forward
- * or backward DIRECTION for UNITS ticks.
- */
-
-STATIC INLINE void _Watchdog_Adjust_ticks(
- Watchdog_Adjust_directions direction,
- Watchdog_Interval units
-);
-
-/*
- *
- * _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.
- */
-
-STATIC INLINE void _Watchdog_Reset(
- Watchdog_Control *the_watchdog
-);
-
-/*
- *
- * _Watchdog_Next
- *
- * DESCRIPTION:
- *
- * This routine returns a pointer to the watchdog timer following
- * THE_WATCHDOG on the watchdog chain.
- */
-
-STATIC INLINE Watchdog_Control *_Watchdog_Next(
- Watchdog_Control *the_watchdog
-);
-
-/*
- *
- * _Watchdog_Previous
- *
- * DESCRIPTION:
- *
- * This routine returns a pointer to the watchdog timer preceding
- * THE_WATCHDOG on the watchdog chain.
- */
-
-STATIC INLINE Watchdog_Control *_Watchdog_Previous(
- Watchdog_Control *the_watchdog
-);
-
-/*
- *
- * _Watchdog_First
- *
- * DESCRIPTION:
- *
- * This routine returns a pointer to the first watchdog timer
- * on the watchdog chain HEADER.
- */
-
-STATIC INLINE Watchdog_Control *_Watchdog_First(
- Chain_Control *header
-);
-
-/*
- *
- * _Watchdog_Last
- *
- * DESCRIPTION:
- *
- * This routine returns a pointer to the last watchdog timer
- * on the watchdog chain HEADER.
- */
-STATIC INLINE Watchdog_Control *_Watchdog_Last(
- Chain_Control *header
-);
-
-/*
- * _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
-);
-
-#include <rtems/score/watchdog.inl>
-
-#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 ee2eb2d04f..0000000000
--- a/c/src/exec/score/include/rtems/score/wkspace.h
+++ /dev/null
@@ -1,97 +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 <rtems/score/heap.h>
-#include <rtems/score/interr.h>
-
-/*
- * The following is used to manage the Workspace.
- *
- */
-
-EXTERN Heap_Control _Workspace_Area; /* executive heap header */
-
-/*
- * _Workspace_Handler_initialization
- *
- * DESCRIPTION:
- *
- * This routine performs the initialization necessary for this handler.
- */
-
-STATIC INLINE void _Workspace_Handler_initialization(
- void *starting_address,
- unsigned32 size
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE void *_Workspace_Allocate(
- 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
-);
-
-/*
- * _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.
- */
-
-STATIC INLINE boolean _Workspace_Free(
- void *block
-);
-
-#include <rtems/score/wkspace.inl>
-
-#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 9b50159c81..0000000000
--- a/c/src/exec/score/include/rtems/system.h
+++ /dev/null
@@ -1,134 +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 Manager. It is referenced as "external"
- * in every other file.
- */
-
-#ifdef INIT
-#undef EXTERN
-#define EXTERN
-#else
-#undef EXTERN
-#define 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
-# define STATIC static
-# ifdef __GNUC__
-# define INLINE __inline__
-# else
-# define INLINE inline
-# endif
-#else
-# define STATIC
-# define INLINE
-#endif
-
-/*
- * Include a base set of files.
- */
-
-/*
- * XXX: Eventually proc_ptr needs to disappear!!!
- */
-
-typedef void * proc_ptr;
-
-#include <rtems/score/cpu.h> /* 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.
- */
-
-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 c1bb098577..0000000000
--- a/c/src/exec/score/inline/rtems/score/address.inl
+++ /dev/null
@@ -1,93 +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
- *
- */
-
-STATIC INLINE void *_Addresses_Add_offset (
- void *base,
- unsigned32 offset
-)
-{
- return (void *)((char *)base + offset);
-}
-
-/*PAGE
- *
- * _Addresses_Subtract_offset
- *
- */
-
-STATIC INLINE void *_Addresses_Subtract_offset (
- void *base,
- unsigned32 offset
-)
-{
- return (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.
- */
-
-STATIC INLINE unsigned32 _Addresses_Subtract (
- void *left,
- void *right
-)
-{
- return ((char *) left - (char *) right);
-}
-
-/*PAGE
- *
- * _Addresses_Is_aligned
- *
- */
-
-STATIC INLINE boolean _Addresses_Is_aligned (
- void *address
-)
-{
- return ( ( (unsigned32)address % CPU_ALIGNMENT ) == 0 );
-}
-
-/*PAGE
- *
- * _Addresses_Is_in_range
- *
- */
-
-STATIC INLINE 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 63706544e4..0000000000
--- a/c/src/exec/score/inline/rtems/score/chain.inl
+++ /dev/null
@@ -1,292 +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
- */
-
-STATIC INLINE boolean _Chain_Are_nodes_equal(
- Chain_Node *left,
- Chain_Node *right
-)
-{
- return left == right;
-}
-
-/*PAGE
- *
- * _Chain_Is_null
- */
-
-STATIC INLINE boolean _Chain_Is_null(
- Chain_Control *the_chain
-)
-{
- return ( the_chain == NULL );
-}
-
-/*PAGE
- *
- * _Chain_Is_null_node
- */
-
-STATIC INLINE boolean _Chain_Is_null_node(
- Chain_Node *the_node
-)
-{
- return ( the_node == NULL );
-}
-
-/*PAGE
- *
- * _Chain_Head
- */
-
-STATIC INLINE Chain_Node *_Chain_Head(
- Chain_Control *the_chain
-)
-{
- return (Chain_Node *) the_chain;
-}
-
-/*PAGE
- *
- * _Chain_Tail
- */
-
-STATIC INLINE Chain_Node *_Chain_Tail(
- Chain_Control *the_chain
-)
-{
- return (Chain_Node *) &the_chain->permanent_null;
-}
-
-/*PAGE
- *
- * _Chain_Is_empty
- */
-
-STATIC INLINE boolean _Chain_Is_empty(
- Chain_Control *the_chain
-)
-{
- return ( the_chain->first == _Chain_Tail( the_chain ) );
-}
-
-/*PAGE
- *
- * _Chain_Is_first
- */
-
-STATIC INLINE boolean _Chain_Is_first(
- Chain_Node *the_node
-)
-{
- return ( the_node->previous == NULL );
-}
-
-/*PAGE
- *
- * _Chain_Is_last
- */
-
-STATIC INLINE boolean _Chain_Is_last(
- Chain_Node *the_node
-)
-{
- return ( the_node->next == NULL );
-}
-
-/*PAGE
- *
- * _Chain_Has_only_one_node
- */
-
-STATIC INLINE boolean _Chain_Has_only_one_node(
- Chain_Control *the_chain
-)
-{
- return ( the_chain->first == the_chain->last );
-}
-
-/*PAGE
- *
- * _Chain_Is_head
- */
-
-STATIC INLINE boolean _Chain_Is_head(
- Chain_Control *the_chain,
- Chain_Node *the_node
-)
-{
- return ( the_node == _Chain_Head( the_chain ) );
-}
-
-/*PAGE
- *
- * _Chain_Is_tail
- */
-
-STATIC INLINE boolean _Chain_Is_tail(
- Chain_Control *the_chain,
- Chain_Node *the_node
-)
-{
- return ( the_node == _Chain_Tail( the_chain ) );
-}
-
-/*PAGE
- *
- * Chain_Initialize_empty
- */
-
-STATIC INLINE 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
- */
-
-STATIC INLINE 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
- */
-
-STATIC INLINE 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
- */
-
-STATIC INLINE 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
- */
-
-STATIC INLINE 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
- */
-
-STATIC INLINE 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
- */
-
-STATIC INLINE void _Chain_Prepend_unprotected(
- Chain_Control *the_chain,
- Chain_Node *the_node
-)
-{
- _Chain_Insert_unprotected( _Chain_Head( the_chain ), the_node );
-
-}
-
-/*PAGE
- *
- * _Chain_Prepend
- */
-
-STATIC INLINE 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 5a1b5d4a10..0000000000
--- a/c/src/exec/score/inline/rtems/score/coremsg.inl
+++ /dev/null
@@ -1,216 +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 <string.h> /* needed for memcpy */
-
-/*PAGE
- *
- * _CORE_message_queue_Send
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE void _CORE_message_queue_Copy_buffer (
- void *source,
- void *destination,
- unsigned32 size
-)
-{
- memcpy(destination, source, size);
-}
-
-/*PAGE
- *
- * _CORE_message_queue_Allocate_message_buffer
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE
- 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
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE 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 8681795085..0000000000
--- a/c/src/exec/score/inline/rtems/score/coremutex.inl
+++ /dev/null
@@ -1,104 +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
- *
- */
-
-STATIC INLINE boolean _CORE_mutex_Is_locked(
- CORE_mutex_Control *the_mutex
-)
-{
- return the_mutex->lock == CORE_MUTEX_LOCKED;
-}
-
-/*PAGE
- *
- * _CORE_mutex_Is_fifo
- *
- */
-
-STATIC INLINE boolean _CORE_mutex_Is_fifo(
- CORE_mutex_Attributes *the_attribute
-)
-{
- return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_FIFO;
-}
-
-/*PAGE
- *
- * _CORE_mutex_Is_priority
- *
- */
-
-STATIC INLINE boolean _CORE_mutex_Is_priority(
- CORE_mutex_Attributes *the_attribute
-)
-{
- return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY;
-}
-
-/*PAGE
- *
- * _CORE_mutex_Is_inherit_priority
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE 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.
- */
-
-STATIC INLINE 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 53f7d68595..0000000000
--- a/c/src/exec/score/inline/rtems/score/coresem.inl
+++ /dev/null
@@ -1,47 +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
- *
- */
-
-STATIC INLINE boolean _CORE_semaphore_Is_priority(
- CORE_semaphore_Attributes *the_attribute
-)
-{
- return ( the_attribute->discipline == CORE_SEMAPHORE_DISCIPLINES_PRIORITY );
-}
-
-/*PAGE
- *
- * _CORE_semaphore_Get_count
- *
- */
-
-STATIC INLINE 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 0d1b1231a7..0000000000
--- a/c/src/exec/score/inline/rtems/score/heap.inl
+++ /dev/null
@@ -1,219 +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 <rtems/score/address.h>
-
-/*PAGE
- *
- * _Heap_Head
- *
- */
-
-STATIC INLINE Heap_Block *_Heap_Head (
- Heap_Control *the_heap
-)
-{
- return (Heap_Block *)&the_heap->start;
-}
-
-/*PAGE
- *
- * _Heap_Tail
- *
- */
-
-STATIC INLINE Heap_Block *_Heap_Tail (
- Heap_Control *the_heap
-)
-{
- return (Heap_Block *)&the_heap->final;
-}
-
-/*PAGE
- *
- * _Heap_Previous_block
- *
- */
-
-STATIC INLINE 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
- *
- * NOTE: Next_block assumes that the block is free.
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE Heap_Block *_Heap_Block_at(
- void *base,
- unsigned32 offset
-)
-{
- return (Heap_Block *) _Addresses_Add_offset( (void *)base, offset );
-}
-
-/*PAGE
- *
- * _Heap_User_block_at
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE boolean _Heap_Is_previous_block_free (
- Heap_Block *the_block
-)
-{
- return !(the_block->back_flag & HEAP_BLOCK_USED);
-}
-
-/*PAGE
- *
- * _Heap_Is_block_free
- *
- */
-
-STATIC INLINE boolean _Heap_Is_block_free (
- Heap_Block *the_block
-)
-{
- return !(the_block->front_flag & HEAP_BLOCK_USED);
-}
-
-/*PAGE
- *
- * _Heap_Is_block_used
- *
- */
-
-STATIC INLINE boolean _Heap_Is_block_used (
- Heap_Block *the_block
-)
-{
- return (the_block->front_flag & HEAP_BLOCK_USED);
-}
-
-/*PAGE
- *
- * _Heap_Block_size
- *
- */
-
-STATIC INLINE unsigned32 _Heap_Block_size (
- Heap_Block *the_block
-)
-{
- return (the_block->front_flag & ~HEAP_BLOCK_USED);
-}
-
-/*PAGE
- *
- * _Heap_Start_of_user_area
- *
- */
-
-STATIC INLINE void *_Heap_Start_of_user_area (
- Heap_Block *the_block
-)
-{
- return (void *) &the_block->next;
-}
-
-/*PAGE
- *
- * _Heap_Is_block_in
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE boolean _Heap_Is_page_size_valid(
- unsigned32 page_size
-)
-{
- return ((page_size != 0) &&
- ((page_size % CPU_HEAP_ALIGNMENT) == 0));
-}
-
-/*PAGE
- *
- * _Heap_Build_flag
- *
- */
-
-STATIC INLINE 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 2b4969a5db..0000000000
--- a/c/src/exec/score/inline/rtems/score/isr.inl
+++ /dev/null
@@ -1,58 +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
- *
- */
-
-STATIC INLINE boolean _ISR_Is_in_progress( void )
-{
- return (_ISR_Nest_level != 0);
-}
-
-/*PAGE
- *
- * _ISR_Is_vector_number_valid
- *
- */
-
-STATIC INLINE boolean _ISR_Is_vector_number_valid (
- unsigned32 vector
-)
-{
- return ( vector <= CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER );
-}
-
-/*PAGE
- *
- * _ISR_Is_valid_user_handler
- *
- */
-
-STATIC INLINE 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 c23d756ec9..0000000000
--- a/c/src/exec/score/inline/rtems/score/mppkt.inl
+++ /dev/null
@@ -1,49 +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
- *
- * NOTE: Check for lower bounds (MP_PACKET_CLASSES_FIRST ) is unnecessary
- * because this enum starts at lower bound of zero.
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE 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 eb07a24890..0000000000
--- a/c/src/exec/score/inline/rtems/score/object.inl
+++ /dev/null
@@ -1,199 +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
- *
- */
-
-STATIC INLINE 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
- */
-
-STATIC INLINE Objects_Classes _Objects_Get_class(
- Objects_Id id
-)
-{
- return (Objects_Classes)
- ((id >> OBJECTS_CLASS_START_BIT) & OBJECTS_CLASS_VALID_BITS);
-}
-
-
-/*PAGE
- *
- * _Objects_Get_node
- *
- */
-
-STATIC INLINE unsigned32 _Objects_Get_node(
- Objects_Id id
-)
-{
- return (id >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS;
-}
-
-/*PAGE
- *
- * _Objects_Get_index
- *
- */
-
-STATIC INLINE unsigned32 _Objects_Get_index(
- Objects_Id id
-)
-{
- return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS;
-}
-
-/*PAGE
- *
- * _Objects_Is_class_valid
- *
- */
-
-STATIC INLINE boolean _Objects_Is_class_valid(
- Objects_Classes the_class
-)
-{
- return the_class <= OBJECTS_CLASSES_LAST;
-}
-
-/*PAGE
- *
- * _Objects_Is_local_node
- *
- */
-
-STATIC INLINE boolean _Objects_Is_local_node(
- unsigned32 node
-)
-{
- return ( node == _Objects_Local_node );
-}
-
-/*PAGE
- *
- * _Objects_Is_local_id
- *
- */
-
-STATIC INLINE boolean _Objects_Is_local_id(
- Objects_Id id
-)
-{
- return _Objects_Is_local_node( _Objects_Get_node(id) );
-}
-
-/*PAGE
- *
- * _Objects_Are_ids_equal
- *
- */
-
-STATIC INLINE boolean _Objects_Are_ids_equal(
- Objects_Id left,
- Objects_Id right
-)
-{
- return ( left == right );
-}
-
-/*PAGE
- *
- * _Objects_Allocate
- *
- */
-
-STATIC INLINE Objects_Control *_Objects_Allocate(
- Objects_Information *information
-)
-{
- return (Objects_Control *) _Chain_Get( &information->Inactive );
-}
-
-/*PAGE
- *
- * _Objects_Free
- *
- */
-
-STATIC INLINE void _Objects_Free(
- Objects_Information *information,
- Objects_Control *the_object
-)
-{
- _Chain_Append( &information->Inactive, &the_object->Node );
-}
-
-/*PAGE
- *
- * _Objects_Open
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE 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 e09a3df528..0000000000
--- a/c/src/exec/score/inline/rtems/score/objectmp.inl
+++ /dev/null
@@ -1,62 +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
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE 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 413e3b6724..0000000000
--- a/c/src/exec/score/inline/rtems/score/priority.inl
+++ /dev/null
@@ -1,203 +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 <rtems/score/bitfield.h>
-
-/*PAGE
- *
- * _Priority_Handler_initialization
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE unsigned32 _Priority_Major (
- Priority_Control the_priority
-)
-{
- return ( the_priority / 16 );
-}
-
-/*PAGE
- *
- * _Priority_Minor
- *
- */
-
-STATIC INLINE unsigned32 _Priority_Minor (
- Priority_Control the_priority
-)
-{
- return ( the_priority % 16 );
-}
-
-#if ( CPU_USE_GENERIC_BITFIELD_CODE == TRUE )
-
-/*PAGE
- *
- * _Priority_Mask
- *
- */
-
-STATIC INLINE unsigned32 _Priority_Mask (
- unsigned32 bit_number
-)
-{
- return (0x8000 >> bit_number);
-}
-
-
-/*PAGE
- *
- * _Priority_Bits_index
- *
- */
-
-STATIC INLINE unsigned32 _Priority_Bits_index (
- unsigned32 bit_number
-)
-{
- return bit_number;
-}
-
-#endif
-
-/*PAGE
- *
- * _Priority_Add_to_bit_map
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE 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 7c6acf7cb3..0000000000
--- a/c/src/exec/score/inline/rtems/score/stack.inl
+++ /dev/null
@@ -1,63 +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
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE boolean _Stack_Is_enough (
- unsigned32 size
-)
-{
- return ( size >= STACK_MINIMUM_SIZE );
-}
-
-/*PAGE
- *
- * _Stack_Adjust_size
- *
- */
-
-STATIC INLINE 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 23ee8cacbc..0000000000
--- a/c/src/exec/score/inline/rtems/score/states.inl
+++ /dev/null
@@ -1,298 +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
- *
- */
-
-STATIC INLINE States_Control _States_Set (
- States_Control states_to_set,
- States_Control current_state
-)
-{
- return (current_state | states_to_set);
-}
-
-/*PAGE
- *
- * _States_Clear
- *
- */
-
-STATIC INLINE States_Control _States_Clear (
- States_Control states_to_clear,
- States_Control current_state
-)
-{
- return (current_state & ~states_to_clear);
-}
-
-/*PAGE
- *
- * _States_Is_ready
- *
- */
-
-STATIC INLINE boolean _States_Is_ready (
- States_Control the_states
-)
-{
- return (the_states == STATES_READY);
-}
-
-/*PAGE
- *
- * _States_Is_only_dormant
- *
- */
-
-STATIC INLINE boolean _States_Is_only_dormant (
- States_Control the_states
-)
-{
- return (the_states == STATES_DORMANT);
-}
-
-/*PAGE
- *
- * _States_Is_dormant
- *
- */
-
-STATIC INLINE boolean _States_Is_dormant (
- States_Control the_states
-)
-{
- return (the_states & STATES_DORMANT);
-}
-
-/*PAGE
- *
- * _States_Is_suspended
- *
- */
-
-STATIC INLINE boolean _States_Is_suspended (
- States_Control the_states
-)
-{
- return (the_states & STATES_SUSPENDED);
-}
-
-/*PAGE
- *
- * _States_Is_Transient
- *
- */
-
-STATIC INLINE boolean _States_Is_transient (
- States_Control the_states
-)
-{
- return (the_states & STATES_TRANSIENT);
-}
-
-/*PAGE
- *
- * _States_Is_delaying
- *
- */
-
-STATIC INLINE boolean _States_Is_delaying (
- States_Control the_states
-)
-{
- return (the_states & STATES_DELAYING);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_for_buffer
- *
- */
-
-STATIC INLINE boolean _States_Is_waiting_for_buffer (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_FOR_BUFFER);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_for_segment
- *
- */
-
-STATIC INLINE boolean _States_Is_waiting_for_segment (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_FOR_SEGMENT);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_for_message
- *
- */
-
-STATIC INLINE boolean _States_Is_waiting_for_message (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_FOR_MESSAGE);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_for_event
- *
- */
-
-STATIC INLINE boolean _States_Is_waiting_for_event (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_FOR_EVENT);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_for_mutex
- *
- */
-
-STATIC INLINE boolean _States_Is_waiting_for_mutex (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_FOR_MUTEX);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_for_semaphore
- *
- */
-
-STATIC INLINE boolean _States_Is_waiting_for_semaphore (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_FOR_SEMAPHORE);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_for_time
- *
- */
-
-STATIC INLINE boolean _States_Is_waiting_for_time (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_FOR_TIME);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_for_rpc_reply
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE boolean _States_Is_waiting_for_period (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_FOR_PERIOD);
-}
-
-/*PAGE
- *
- * _States_Is_locally_blocked
- *
- */
-
-STATIC INLINE boolean _States_Is_locally_blocked (
- States_Control the_states
-)
-{
- return (the_states & STATES_LOCALLY_BLOCKED);
-}
-
-/*PAGE
- *
- * _States_Is_waiting_on_thread_queue
- *
- */
-
-STATIC INLINE boolean _States_Is_waiting_on_thread_queue (
- States_Control the_states
-)
-{
- return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
-}
-
-/*PAGE
- *
- * _States_Is_blocked
- *
- */
-
-STATIC INLINE boolean _States_Is_blocked (
- States_Control the_states
-)
-{
- return (the_states & STATES_BLOCKED);
-}
-
-/*PAGEPAGE
- *
- *
- * _States_Are_set
- *
- */
-
-STATIC INLINE 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 180e6abe54..0000000000
--- a/c/src/exec/score/inline/rtems/score/sysstate.inl
+++ /dev/null
@@ -1,116 +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
- */
-
-STATIC INLINE 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
- */
-
-STATIC INLINE void _System_state_Set (
- System_state_Codes state
-)
-{
- _System_state_Current = state;
-}
-
-/*PAGE
- *
- * _System_state_Get
- */
-
-STATIC INLINE System_state_Codes _System_state_Get ( void )
-{
- return _System_state_Current;
-}
-
-/*PAGE
- *
- * _System_state_Is_before_initialization
- */
-
-STATIC INLINE boolean _System_state_Is_before_initialization (
- System_state_Codes state
-)
-{
- return (state == SYSTEM_STATE_BEFORE_INITIALIZATION);
-}
-
-/*PAGE
- *
- * _System_state_Is_before_multitasking
- */
-
-STATIC INLINE boolean _System_state_Is_before_multitasking (
- System_state_Codes state
-)
-{
- return (state == SYSTEM_STATE_BEFORE_MULTITASKING);
-}
-
-/*PAGE
- *
- * _System_state_Is_begin_multitasking
- */
-
-STATIC INLINE boolean _System_state_Is_begin_multitasking (
- System_state_Codes state
-)
-{
- return (state == SYSTEM_STATE_BEGIN_MULTITASKING);
-}
-
-/*PAGE
- *
- * _System_state_Is_up
- */
-
-STATIC INLINE boolean _System_state_Is_up (
- System_state_Codes state
-)
-{
- return (state == SYSTEM_STATE_UP);
-}
-
-/*PAGE
- *
- * _System_state_Is_failed
- */
-
-STATIC INLINE 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 3a96acf4ea..0000000000
--- a/c/src/exec/score/inline/rtems/score/thread.inl
+++ /dev/null
@@ -1,287 +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
- *
- */
-
-STATIC INLINE void _Thread_Stop_multitasking( void )
-{
- _Context_Switch( &_Thread_Executing->Registers, &_Thread_BSP_context );
-}
-
-/*PAGE
- *
- * _Thread_Is_executing
- *
- */
-
-STATIC INLINE boolean _Thread_Is_executing (
- Thread_Control *the_thread
-)
-{
- return ( the_thread == _Thread_Executing );
-}
-
-/*PAGE
- *
- * _Thread_Is_heir
- *
- */
-
-STATIC INLINE boolean _Thread_Is_heir (
- Thread_Control *the_thread
-)
-{
- return ( the_thread == _Thread_Heir );
-}
-
-/*PAGE
- *
- * _Thread_Is_executing_also_the_heir
- *
- */
-
-STATIC INLINE boolean _Thread_Is_executing_also_the_heir( void )
-{
- return ( _Thread_Executing == _Thread_Heir );
-}
-
-/*PAGE
- *
- * _Thread_Resume
- *
- */
-
-STATIC INLINE void _Thread_Resume (
- Thread_Control *the_thread
-)
-{
- _Thread_Clear_state( the_thread, STATES_SUSPENDED );
-}
-
-/*PAGE
- *
- * _Thread_Unblock
- *
- */
-
-STATIC INLINE void _Thread_Unblock (
- Thread_Control *the_thread
-)
-{
- _Thread_Clear_state( the_thread, STATES_BLOCKED );
-}
-
-/*PAGE
- *
- * _Thread_Restart_self
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE void _Thread_Calculate_heir( void )
-{
- _Thread_Heir = (Thread_Control *)
- _Thread_Ready_chain[ _Priority_Get_highest() ].first;
-}
-
-/*PAGE
- *
- * _Thread_Is_allocated_fp
- *
- */
-
-STATIC INLINE boolean _Thread_Is_allocated_fp (
- Thread_Control *the_thread
-)
-{
- return ( the_thread == _Thread_Allocated_fp );
-}
-
-/*PAGE
- *
- * _Thread_Deallocate_fp
- *
- */
-
-STATIC INLINE void _Thread_Deallocate_fp( void )
-{
- _Thread_Allocated_fp = NULL;
-}
-
-/*PAGE
- *
- * _Thread_Disable_dispatch
- *
- */
-
-STATIC INLINE void _Thread_Disable_dispatch( void )
-{
- _Thread_Dispatch_disable_level += 1;
-}
-
-/*PAGE
- *
- * _Thread_Enable_dispatch
- *
- */
-
-#if ( CPU_INLINE_ENABLE_DISPATCH == TRUE )
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE void _Thread_Unnest_dispatch( void )
-{
- _Thread_Dispatch_disable_level -= 1;
-}
-
-/*PAGE
- *
- * _Thread_Is_dispatching_enabled
- *
- */
-
-STATIC INLINE boolean _Thread_Is_dispatching_enabled( void )
-{
- return ( _Thread_Dispatch_disable_level == 0 );
-}
-
-/*PAGE
- *
- * _Thread_Is_context_switch_necessary
- *
- */
-
-STATIC INLINE boolean _Thread_Is_context_switch_necessary( void )
-{
- return ( _Context_Switch_necessary );
-}
-
-/*PAGE
- *
- * _Thread_Dispatch_initialization
- *
- */
-
-STATIC INLINE void _Thread_Dispatch_initialization( void )
-{
- _Thread_Dispatch_disable_level = 1;
-}
-
-/*PAGE
- *
- * _Thread_Is_null
- *
- */
-
-STATIC INLINE boolean _Thread_Is_null (
- Thread_Control *the_thread
-)
-{
- return ( the_thread == NULL );
-}
-
-/*PAGE
- *
- * _Thread_Get
- *
- * NOTE: XXX... This routine may be able to be optimized.
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE boolean _Thread_Is_proxy_blocking (
- unsigned32 code
-)
-{
- return (code == THREAD_STATUS_PROXY_BLOCKING);
-}
-
-#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 f4beba59ed..0000000000
--- a/c/src/exec/score/inline/rtems/score/threadmp.inl
+++ /dev/null
@@ -1,53 +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
- *
- */
-
-STATIC INLINE boolean _Thread_MP_Is_receive (
- Thread_Control *the_thread
-)
-{
- return the_thread == _Thread_MP_Receive;
-}
-
-/*PAGE
- *
- * _Thread_MP_Free_proxy
- *
- */
-
-STATIC INLINE 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 dce8aca426..0000000000
--- a/c/src/exec/score/inline/rtems/score/tod.inl
+++ /dev/null
@@ -1,68 +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_Is_set
- *
- */
-
-STATIC INLINE boolean _TOD_Is_set( void )
-{
- return _Watchdog_Is_active( &_TOD_Seconds_watchdog );
-}
-
-/*PAGE
- *
- * _TOD_Tickle_ticks
- *
- */
-
-STATIC INLINE void _TOD_Tickle_ticks( void )
-{
- _TOD_Current.ticks += 1;
- _TOD_Ticks_since_boot += 1;
-}
-
-/*PAGE
- *
- * _TOD_Deactivate
- *
- */
-
-STATIC INLINE void _TOD_Deactivate( void )
-{
- _Watchdog_Remove( &_TOD_Seconds_watchdog );
-}
-
-/*PAGE
- *
- * _TOD_Activate
- *
- */
-
-STATIC INLINE 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 3cf9c51ef6..0000000000
--- a/c/src/exec/score/inline/rtems/score/tqdata.inl
+++ /dev/null
@@ -1,74 +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
- *
- */
-
-STATIC INLINE unsigned32 _Thread_queue_Header_number (
- Priority_Control the_priority
-)
-{
- return ( the_priority >> 6 );
-}
-
-/*PAGE
- *
- * _Thread_queue_Is_reverse_search
- *
- */
-
-STATIC INLINE boolean _Thread_queue_Is_reverse_search (
- Priority_Control the_priority
-)
-{
- return ( the_priority & 0x20 );
-}
-
-/*PAGE
- *
- * _Thread_queue_Get_number_waiting
- *
- */
-
-STATIC INLINE unsigned32 _Thread_queue_Get_number_waiting (
- Thread_queue_Control *the_thread_queue
-)
-{
- return ( the_thread_queue->count );
-}
-
-/*PAGE
- *
- * _Thread_queue_Enter_critical_section
- *
- */
-
-STATIC INLINE void _Thread_queue_Enter_critical_section (
- Thread_queue_Control *the_thread_queue
-)
-{
- the_thread_queue->sync = TRUE;
- 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 697a7eddd0..0000000000
--- a/c/src/exec/score/inline/rtems/score/userext.inl
+++ /dev/null
@@ -1,127 +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
- *
- */
-
-STATIC INLINE 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
- */
-
-STATIC INLINE 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
- */
-
-STATIC INLINE void _User_extensions_Add_API_set (
- User_extensions_Control *the_extension
-)
-{
- _Chain_Prepend( &_User_extensions_List, &the_extension->Node );
-}
-
-/*PAGE
- *
- * _User_extensions_Remove_set
- */
-
-STATIC INLINE void _User_extensions_Remove_set (
- User_extensions_Control *the_extension
-)
-{
- _Chain_Extract( &the_extension->Node );
-}
-
-/*PAGE
- *
- * _User_extensions_Thread_switch
- *
- */
-
-STATIC INLINE 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 );
- }
-}
-
-/*PAGE
- *
- * _User_extensions_Thread_post_switch
- *
- */
-
-STATIC INLINE void _User_extensions_Thread_post_switch (
- Thread_Control *executing
-)
-{
- 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_post_switch != NULL )
- (*the_extension->Callouts.thread_post_switch)( executing );
- }
-}
-
-#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 ae3717e102..0000000000
--- a/c/src/exec/score/inline/rtems/score/watchdog.inl
+++ /dev/null
@@ -1,255 +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
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE boolean _Watchdog_Is_active(
- Watchdog_Control *the_watchdog
-)
-{
-
- return ( the_watchdog->state == WATCHDOG_ACTIVE );
-
-}
-
-/*PAGE
- *
- * _Watchdog_Activate
- *
- */
-
-STATIC INLINE void _Watchdog_Activate(
- Watchdog_Control *the_watchdog
-)
-{
-
- the_watchdog->state = WATCHDOG_ACTIVE;
-
-}
-
-/*PAGE
- *
- * _Watchdog_Deactivate
- *
- */
-
-STATIC INLINE void _Watchdog_Deactivate(
- Watchdog_Control *the_watchdog
-)
-{
-
- the_watchdog->state = WATCHDOG_REMOVE_IT;
-
-}
-
-/*PAGE
- *
- * _Watchdog_Tickle_ticks
- *
- */
-
-STATIC INLINE void _Watchdog_Tickle_ticks( void )
-{
-
- _Watchdog_Tickle( &_Watchdog_Ticks_chain );
-
-}
-
-/*PAGE
- *
- * _Watchdog_Tickle_seconds
- *
- */
-
-STATIC INLINE void _Watchdog_Tickle_seconds( void )
-{
-
- _Watchdog_Tickle( &_Watchdog_Seconds_chain );
-
-}
-
-/*PAGE
- *
- * _Watchdog_Insert_ticks
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE 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
- *
- */
-
-STATIC INLINE void _Watchdog_Adjust_seconds(
- Watchdog_Adjust_directions direction,
- Watchdog_Interval units
-)
-{
-
- _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
-
-}
-
-/*PAGE
- *
- * _Watchdog_Adjust_ticks
- *
- */
-
-STATIC INLINE void _Watchdog_Adjust_ticks(
- Watchdog_Adjust_directions direction,
- Watchdog_Interval units
-)
-{
-
- _Watchdog_Adjust( &_Watchdog_Ticks_chain, direction, units );
-
-}
-
-/*PAGE
- *
- * _Watchdog_Reset
- *
- */
-
-STATIC INLINE void _Watchdog_Reset(
- Watchdog_Control *the_watchdog
-)
-{
-
- (void) _Watchdog_Remove( the_watchdog );
-
- _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
-
-}
-
-/*PAGE
- *
- * _Watchdog_Next
- *
- */
-
-STATIC INLINE Watchdog_Control *_Watchdog_Next(
- Watchdog_Control *the_watchdog
-)
-{
-
- return ( (Watchdog_Control *) the_watchdog->Node.next );
-
-}
-
-/*PAGE
- *
- * _Watchdog_Previous
- *
- */
-
-STATIC INLINE Watchdog_Control *_Watchdog_Previous(
- Watchdog_Control *the_watchdog
-)
-{
-
- return ( (Watchdog_Control *) the_watchdog->Node.previous );
-
-}
-
-/*PAGE
- *
- * _Watchdog_First
- *
- */
-
-STATIC INLINE Watchdog_Control *_Watchdog_First(
- Chain_Control *header
-)
-{
-
- return ( (Watchdog_Control *) header->first );
-
-}
-
-/*PAGE
- *
- * _Watchdog_Last
- *
- */
-STATIC INLINE 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 36ed61d565..0000000000
--- a/c/src/exec/score/inline/rtems/score/wkspace.inl
+++ /dev/null
@@ -1,91 +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_Handler_initialization
- *
- */
-
-STATIC INLINE void _Workspace_Handler_initialization(
- void *starting_address,
- unsigned32 size
-)
-{
- unsigned32 *zero_out_array;
- unsigned32 index;
- unsigned32 memory_available;
-
- if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
- );
-
- if ( _CPU_Table.do_zero_of_workspace ) {
- for( zero_out_array = (unsigned32 *) starting_address, index = 0 ;
- index < size / 4 ;
- index++ )
- zero_out_array[ index ] = 0;
- }
-
- memory_available = _Heap_Initialize(
- &_Workspace_Area,
- starting_address,
- size,
- CPU_HEAP_ALIGNMENT
- );
-
- if ( memory_available == 0 )
- _Internal_error_Occurred(
- INTERNAL_ERROR_CORE,
- TRUE,
- INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
- );
-}
-
-/*PAGE
- *
- * _Workspace_Allocate
- *
- */
-
-STATIC INLINE void *_Workspace_Allocate(
- unsigned32 size
-)
-{
- return _Heap_Allocate( &_Workspace_Area, size );
-}
-
-/*PAGE
- *
- * _Workspace_Free
- *
- */
-
-STATIC INLINE 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 <rtems/score/address.h>
-
-/*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 <rtems/score/bitfield.h>
-
-/*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 3f7afb054b..0000000000
--- a/c/src/exec/score/macros/rtems/score/thread.inl
+++ /dev/null
@@ -1,201 +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 )
-
-#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 ecab4e6eae..0000000000
--- a/c/src/exec/score/macros/rtems/score/tod.inl
+++ /dev/null
@@ -1,58 +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_Is_set
- *
- */
-
-#define _TOD_Is_set() \
- _Watchdog_Is_active( &_TOD_Seconds_watchdog )
-
-/*PAGE
- *
- * _TOD_Tickle_ticks
- *
- */
-
-#define _TOD_Tickle_ticks() \
- _TOD_Current.ticks++; \
- _TOD_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 1df3cd5270..0000000000
--- a/c/src/exec/score/macros/rtems/score/tqdata.inl
+++ /dev/null
@@ -1,60 +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) >> 6 )
-
-/*PAGE
- *
- * _Thread_queue_Is_reverse_search
- *
- */
-
-#define _Thread_queue_Is_reverse_search( _the_priority ) \
- ( (_the_priority) & 0x20 )
-
-/*PAGE
- *
- * _Thread_queue_Get_number_waiting
- *
- */
-
-#define _Thread_queue_Get_number_waiting( _the_thread_queue ) \
- ( (_the_thread_queue)->count )
-
-/*PAGE
- *
- * _Thread_queue_Enter_critical_section
- *
- */
-
-#define _Thread_queue_Enter_critical_section( _the_thread_queue ) \
- do { \
- (_the_thread_queue)->sync = TRUE; \
- (_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 2daa37494d..0000000000
--- a/c/src/exec/score/macros/rtems/score/userext.inl
+++ /dev/null
@@ -1,135 +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) )
-
-/*PAGE
- *
- * _User_extensions_Thread_post_switch
- *
- */
-
-#define _User_extensions_Thread_post_switch( _executing ) \
- _User_extensions_Run_list_forward(thread_post_switch, (_executing) )
-
-#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 <rtems/score/object.h>
-
-/*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 aa6ccc0440..0000000000
--- a/c/src/exec/score/macros/rtems/score/wkspace.inl
+++ /dev/null
@@ -1,80 +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_Handler_initialization
- *
- */
-
-#define _Workspace_Handler_initialization( _starting_address, _size ) \
-{ \
- unsigned32 *zero_out_array; \
- unsigned32 index; \
- unsigned32 memory_available; \
- \
- if ( !(_starting_address) || !_Addresses_Is_aligned( (_starting_address) ) ) \
- _Internal_error_Occurred( \
- INTERNAL_ERROR_CORE, \
- TRUE, \
- INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS \
- ); \
- \
- if ( _CPU_Table.do_zero_of_workspace ) { \
- for( zero_out_array = (unsigned32 *) (_starting_address), index = 0 ; \
- index < (_size) / 4 ; \
- index++ ) \
- zero_out_array[ index ] = 0; \
- } \
- \
- memory_available = _Heap_Initialize( \
- &_Workspace_Area, \
- (_starting_address), \
- (_size), \
- CPU_ALIGNMENT \
- ); \
- \
- if ( memory_available == 0 ) \
- _Internal_error_Occurred( \
- INTERNAL_ERROR_CORE, \
- TRUE, \
- INTERNAL_ERROR_TOO_LITTLE_WORKSPACE \
- ); \
-}
-
-/*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 1a11034ceb..0000000000
--- a/c/src/exec/score/src/coretod.c
+++ /dev/null
@@ -1,235 +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 <rtems/system.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/tod.h>
-#include <rtems/score/watchdog.h>
-
-/*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_Ticks_since_boot = 0;
- _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 );
-}
-
-/*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_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 578259e83d..0000000000
--- a/c/src/exec/score/tools/hppa1.1/genoffsets.c
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * @(#)genoffsets.c 1.7 - 95/09/25
- *
- *
- * 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 <stdio.h>
-
-#if defined(__hpux__) && defined(__hppa__)
-#include <rtems/system.h>
-#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( "#define\t%s\t%d\t\t/* 0x%x */\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_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 );
-
-}