changes remerged after lost in disk crash -- recovered from snapshot, partially recovered working tree, etc

This commit is contained in:
Joel Sherrill
1995-12-20 15:39:19 +00:00
parent 4442d21c43
commit 5c491aef41
94 changed files with 868 additions and 371 deletions

View File

@@ -8,21 +8,9 @@ There are various issues regarding this port:
1) Legal
This port is written by Andrew Bray <andy@i-cubed.demon.co.uk>, and
This port is written by Andrew Bray <andy@i-cubed.co.uk>, and
is copyright 1995 i-cubed ltd.
Due to the current lack of a formal release note, this is a limited
release to OAR, and other specific parties designated by OAR who
are involved in porting RTEMS to the PowerPC architecture.
This set of release files SHOULD (IMHO) include a cpu specific
alignment exception handler. Ours is derived from IBM sample
code. I am seeking a release from IBM for this file. In the
mean time this file is excluded (but still included in the Makefile
as a place-holder).
NOTE: IBM released the alignment exception handler under generous enough
terms where it could be included in this distribution.
2) CPU support.
@@ -74,10 +62,10 @@ 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 incoplete
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 18/8/1995
Andrew Bray 4/December/1995

View File

@@ -1,7 +1,7 @@
/*
* PowerPC CPU Dependent Source
*
* Author: Andrew Bray <andy@i-cubed.demon.co.uk>
* Author: Andrew Bray <andy@i-cubed.co.uk>
*
* COPYRIGHT (c) 1995 by i-cubed ltd.
*
@@ -33,14 +33,11 @@
#include <rtems/score/isr.h>
#include <rtems/score/context.h>
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
/*
* These are for testing purposes.
*/
/*
#define Testing
*/
#undef Testing
#ifdef Testing
static unsigned32 msr;
@@ -100,10 +97,10 @@ void _CPU_Initialize(
_CPU_IRQ_info.Signal = &_ISR_Signals_to_thread_executing;
i = (int)&_CPU_IRQ_info;
asm volatile("mtsprg3 %0" : "=r" (i) : "0" (i));
asm volatile("mtspr 0x113, %0" : "=r" (i) : "0" (i)); /* SPRG 3 */
i = PPC_MSR_INITIAL & ~PPC_MSR_DISABLE_MASK;
asm volatile("mtsprg2 %0" : "=r" (i) : "0" (i));
asm volatile("mtspr 0x112, %0" : "=r" (i) : "0" (i)); /* SPRG 2 */
#ifdef Testing
{
@@ -112,11 +109,11 @@ void _CPU_Initialize(
asm volatile ("mfmsr %0" : "=r" (tmp));
msr = tmp;
#ifdef ppc403
asm volatile ("mfevpr %0" : "=r" (tmp));
asm volatile ("mfspr %0, 0x3d6" : "=r" (tmp)); /* EVPR */
evpr = tmp;
asm volatile ("mfexier %0" : "=r" (tmp));
asm volatile ("mfdcr %0, 0x42" : "=r" (tmp)); /* EXIER */
exier = tmp;
asm volatile ("mtevpr %0" :: "r" (0));
asm volatile ("mtspr 0x3d6, %0" :: "r" (0)); /* EVPR */
#endif
}
#endif
@@ -130,6 +127,40 @@ void _CPU_Initialize(
_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
@@ -163,11 +194,10 @@ void _CPU_ISR_install_vector(
* 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);
_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
@@ -196,19 +226,19 @@ static void ppc_spurious(int v, CPU_Interrupt_frame *i)
{
register int r = 0;
asm volatile("mtexier %0" : "=r" ((r)) : "0" ((r)));
asm volatile("mtdcr 0x42, %0" : "=r" ((r)) : "0" ((r))); /* EXIER */
}
else if (v == PPC_IRQ_PIT)
{
register int r = 0x08000000;
asm volatile("mttsr %0" : "=r" ((r)) : "0" ((r)));
asm volatile("mtspr 0x3d8, %0" : "=r" ((r)) : "0" ((r))); /* TSR */
}
else if (v == PPC_IRQ_FIT)
{
register int r = 0x04000000;
asm volatile("mttsr %0" : "=r" ((r)) : "0" ((r)));
asm volatile("mtspr 0x3d8, %0" : "=r" ((r)) : "0" ((r))); /* TSR */
}
#endif
}
@@ -222,9 +252,9 @@ void _CPU_Fatal_error(unsigned32 _error)
asm volatile ("mtmsr %0" :: "r" (tmp));
#ifdef ppc403
tmp = evpr;
asm volatile ("mtevpr %0" :: "r" (tmp));
asm volatile ("mtspr 0x3d6, %0" :: "r" (tmp)); /* EVPR */
tmp = exier;
asm volatile ("mtexier %0" :: "r" (tmp));
asm volatile ("mtdcr 0x42, %0" :: "r" (tmp)); /* EXIER */
#endif
#endif
asm volatile ("mr 3, %0" : : "r" ((_error)));

View File

@@ -3,7 +3,7 @@
* This include file contains information pertaining to the PowerPC
* processor.
*
* Author: Andrew Bray <andy@i-cubed.demon.co.uk>
* Author: Andrew Bray <andy@i-cubed.co.uk>
*
* COPYRIGHT (c) 1995 by i-cubed ltd.
*
@@ -495,6 +495,10 @@ EXTERN void *_CPU_Interrupt_stack_high;
*/
EXTERN struct {
unsigned32 *Nest_level;
unsigned32 *Disable_level;
void *Vector_table;
void *Stack;
#if (PPC_ABI == PPC_ABI_POWEROPEN)
unsigned32 Dispatch_r2;
#else
@@ -503,10 +507,6 @@ EXTERN struct {
unsigned32 Default_r13;
#endif
#endif
unsigned32 *Nest_level;
unsigned32 *Disable_level;
void *Vector_table;
void *Stack;
boolean *Switch_necessary;
boolean *Signal;
} _CPU_IRQ_info CPU_STRUCTURE_ALIGNMENT;
@@ -541,7 +541,7 @@ EXTERN struct {
* by RTEMS.
*/
#define CPU_INTERRUPT_NUMBER_OF_VECTORS (PPC_INTERRUPT_MAX)
#define CPU_INTERRUPT_NUMBER_OF_VECTORS (PPC_INTERRUPT_MAX)
#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
/*
@@ -570,7 +570,7 @@ EXTERN struct {
* be greater or equal to than CPU_ALIGNMENT.
*/
#define CPU_HEAP_ALIGNMENT (PPC_CACHE_ALIGNMENT)
#define CPU_HEAP_ALIGNMENT (PPC_ALIGNMENT)
/*
* This number corresponds to the byte alignment requirement for memory
@@ -584,7 +584,7 @@ EXTERN struct {
* be greater or equal to than CPU_ALIGNMENT.
*/
#define CPU_PARTITION_ALIGNMENT (PPC_CACHE_ALIGNMENT)
#define CPU_PARTITION_ALIGNMENT (PPC_ALIGNMENT)
/*
* This number corresponds to the byte alignment requirement for the
@@ -604,6 +604,8 @@ EXTERN struct {
* level is returned in _level.
*/
#define loc_string(a,b) a " (" #b ")\n"
#define _CPU_ISR_Disable( _isr_cookie ) \
{ \
asm volatile ( \
@@ -661,6 +663,8 @@ EXTERN struct {
); \
}
unsigned32 _CPU_ISR_Get_level( void );
/* end of ISR handler macros */
/* Context handler macros */
@@ -817,11 +821,11 @@ EXTERN struct {
*
* 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
* _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()
* 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.
@@ -856,9 +860,6 @@ EXTERN struct {
* bit set
*/
#define CPU_USE_GENERIC_BITFIELD_CODE FALSE
#define CPU_USE_GENERIC_BITFIELD_DATA FALSE
#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
{ \
asm volatile ("cntlzw %0, %1" : "=r" ((_output)), "=r" ((_value)) : \

View File

@@ -1,9 +1,10 @@
/* cpu_asm.s 1.0 - 95/08/08
/* 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.demon.co.uk>
* Author: Andrew Bray <andy@i-cubed.co.uk>
*
* COPYRIGHT (c) 1995 by i-cubed ltd.
*
@@ -671,9 +672,6 @@ PROC (_CPU_Context_restore):
blr
/* Individual interrupt prologues look like this:
* mtsprg{0,1} r0
* mfsprg2 r0
* mtmsr r0
* #if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
* #if (PPC_HAS_FPU)
* stwu r1, -(20*4 + 18*8 + IP_END)(r1)
@@ -683,7 +681,6 @@ PROC (_CPU_Context_restore):
* #else
* stwu r1, -(IP_END)(r1)
* #endif
* mfsprg{0,1} r0
* stw r0, IP_0(r1)
*
* li r0, vectornum
@@ -700,8 +697,12 @@ PROC (_CPU_Context_restore):
PUBLIC_PROC (_ISR_Handler)
PROC (_ISR_Handler):
#define LABEL(x) x
#define MTSAVE(x) mtsprg0 x
#define MFSAVE(x) mfsprg0 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
@@ -718,9 +719,17 @@ 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) mtsprg1 x
#define MFSAVE(x) mfsprg1 x
#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

View File

@@ -1,9 +1,9 @@
/* irq_stub.s 1.0 - 95/08/08
/* 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.demon.co.uk>
* Author: Andrew Bray <andy@i-cubed.co.uk>
*
* COPYRIGHT (c) 1995 by i-cubed ltd.
*
@@ -45,10 +45,10 @@
mfctr r6
mfxer r7
mflr r8
mfsrr0 r9
mfsrr1 r10
MFPC (r9)
MFMSR (r10)
/* Establish addressing */
mfsprg3 r11
mfspr r11, sprg3
dcbt r0, r11
stw r5, IP_CR(r1)
stw r6, IP_CTR(r1)
@@ -72,6 +72,9 @@
* #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
@@ -93,6 +96,7 @@ LABEL (nested):
*/
addi r31,r31,1
stw r31, 0(r29)
mtmsr r5
/*
* (*_ISR_Vector_table[ vector ])( vector );
*/
@@ -120,9 +124,11 @@ LABEL (nested):
or r6,r6,r6
/* We must re-disable the interrupts */
mfsprg3 r11
mfsprg2 r0
mfspr r11, sprg3
mfspr r0, sprg2
mtmsr r0
lwz r30, 0(r28)
lwz r31, 0(r29)
/*
* if (--Thread_Dispatch_disable,--_ISR_Nest_level)
@@ -134,6 +140,7 @@ LABEL (nested):
stw r30, 0(r28)
stw r31, 0(r29)
bne LABEL (easy_exit)
cmpwi r31, 0
lwz r30, Switch_necessary(r11)
@@ -143,6 +150,7 @@ LABEL (nested):
* #endif
*/
lwz r1,0(r1)
bne LABEL (easy_exit)
lwz r30, 0(r30)
lwz r31, Signal(r11)
@@ -152,6 +160,7 @@ LABEL (nested):
*/
cmpwi r30, 0
lwz r28, 0(r31)
li r6,0
bne LABEL (switch)
/*
* if ( !_ISR_Signals_to_thread_executing )
@@ -159,28 +168,30 @@ LABEL (nested):
* _ISR_Signals_to_thread_executing = 0;
*/
cmpwi r28, 0
li r6,0
beq LABEL (easy_exit)
stw r6, 0(r31)
/*
* 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
bl PROC (_Thread_Dispatch)
mtmsr r0
bl SYM (_Thread_Dispatch)
/* NOP marker for debuggers */
or r6,r6,r6
/*
* prepare to get out of interrupt
*/
/* Re-disable IRQs */
mfsprg2 r0
mfspr r0, sprg2
mtmsr r0
/*
* easy_exit:
@@ -198,8 +209,8 @@ LABEL (easy_exit):
mtctr r6
mtxer r7
mtlr r8
mtsrr0 r9
mtsrr1 r10
MTPC (r9)
MTMSR (r10)
lwz r0, IP_0(r1)
lwz r2, IP_2(r1)
lwz r3, IP_3(r1)

View File

@@ -3,7 +3,7 @@
* This file contains definitions for the IBM/Motorola PowerPC
* family members.
*
* Author: Andrew Bray <andy@i-cubed.demon.co.uk>
* Author: Andrew Bray <andy@i-cubed.co.uk>
*
* COPYRIGHT (c) 1995 by i-cubed ltd.
*
@@ -92,7 +92,7 @@ extern "C" {
#define PPC_MSR_0 0x00029200
#define PPC_MSR_1 0x00021200
#define PPC_MSR_2 0x00001000
#define PPC_MSR_2 0x00021000
#define PPC_MSR_3 0x00000000
#elif defined(ppc601)

View File

@@ -3,7 +3,7 @@
* This include file contains type definitions pertaining to the PowerPC
* processor family.
*
* Author: Andrew Bray <andy@i-cubed.demon.co.uk>
* Author: Andrew Bray <andy@i-cubed.co.uk>
*
* COPYRIGHT (c) 1995 by i-cubed ltd.
*

View File

@@ -3,7 +3,7 @@
* This file contains the single entry point code for
* the PowerPC implementation of RTEMS.
*
* Author: Andrew Bray <andy@i-cubed.demon.co.uk>
* Author: Andrew Bray <andy@i-cubed.co.uk>
*
* COPYRIGHT (c) 1995 by i-cubed ltd.
*

View File

@@ -51,9 +51,8 @@
*
*/
#define _TOD_Activate( ticks ) \
_Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, \
(ticks), WATCHDOG_ACTIVATE_NOW )
#define _TOD_Activate( _ticks ) \
_Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, (_ticks) )
#endif
/* end of include file */

View File

@@ -44,5 +44,17 @@
#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 */

View File

@@ -84,12 +84,11 @@
*
*/
#define _Watchdog_Insert_ticks( _the_watchdog, _units, _insert_mode ) \
{ \
#define _Watchdog_Insert_ticks( _the_watchdog, _units ) \
do { \
(_the_watchdog)->initial = (_units); \
_Watchdog_Insert( &_Watchdog_Ticks_chain, \
(_the_watchdog), (_insert_mode) ); \
}
_Watchdog_Insert( &_Watchdog_Ticks_chain, (_the_watchdog) ); \
} while ( 0 )
/*PAGE
*
@@ -97,12 +96,11 @@
*
*/
#define _Watchdog_Insert_seconds( _the_watchdog, _units, _insert_mode ) \
{ \
#define _Watchdog_Insert_seconds( _the_watchdog, _units ) \
do { \
(_the_watchdog)->initial = (_units); \
_Watchdog_Insert( &_Watchdog_Seconds_chain, \
(_the_watchdog), (_insert_mode) ); \
}
_Watchdog_Insert( &_Watchdog_Seconds_chain, (_the_watchdog) ); \
} while ( 0 )
/*PAGE
*
@@ -131,8 +129,7 @@
#define _Watchdog_Reset( _the_watchdog ) \
{ \
(void) _Watchdog_Remove( (_the_watchdog) ); \
_Watchdog_Insert( &_Watchdog_Ticks_chain, \
(_the_watchdog), WATCHDOG_ACTIVATE_NOW ); \
_Watchdog_Insert( &_Watchdog_Ticks_chain, (_the_watchdog) ); \
}
/*PAGE

View File

@@ -51,9 +51,8 @@
*
*/
#define _TOD_Activate( ticks ) \
_Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, \
(ticks), WATCHDOG_ACTIVATE_NOW )
#define _TOD_Activate( _ticks ) \
_Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, (_ticks) )
#endif
/* end of include file */

View File

@@ -44,5 +44,17 @@
#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 */

View File

@@ -84,12 +84,11 @@
*
*/
#define _Watchdog_Insert_ticks( _the_watchdog, _units, _insert_mode ) \
{ \
#define _Watchdog_Insert_ticks( _the_watchdog, _units ) \
do { \
(_the_watchdog)->initial = (_units); \
_Watchdog_Insert( &_Watchdog_Ticks_chain, \
(_the_watchdog), (_insert_mode) ); \
}
_Watchdog_Insert( &_Watchdog_Ticks_chain, (_the_watchdog) ); \
} while ( 0 )
/*PAGE
*
@@ -97,12 +96,11 @@
*
*/
#define _Watchdog_Insert_seconds( _the_watchdog, _units, _insert_mode ) \
{ \
#define _Watchdog_Insert_seconds( _the_watchdog, _units ) \
do { \
(_the_watchdog)->initial = (_units); \
_Watchdog_Insert( &_Watchdog_Seconds_chain, \
(_the_watchdog), (_insert_mode) ); \
}
_Watchdog_Insert( &_Watchdog_Seconds_chain, (_the_watchdog) ); \
} while ( 0 )
/*PAGE
*
@@ -131,8 +129,7 @@
#define _Watchdog_Reset( _the_watchdog ) \
{ \
(void) _Watchdog_Remove( (_the_watchdog) ); \
_Watchdog_Insert( &_Watchdog_Ticks_chain, \
(_the_watchdog), WATCHDOG_ACTIVATE_NOW ); \
_Watchdog_Insert( &_Watchdog_Ticks_chain, (_the_watchdog) ); \
}
/*PAGE

View File

@@ -1,4 +1,3 @@
#define STACK_CHECKER_ON
/* bsp_start()
*
* This routine starts the application. It includes application,

View File

@@ -1,4 +1,3 @@
#define STACK_CHECKER_ON
/* bsp_start()
*
* This routine starts the application. It includes application,

View File

@@ -28,6 +28,25 @@ any case I am ready to answer questions regarding the port and intend
to follow the future RTEMS versions. I will do my best to provide
whatever support I can afford time-wise.
MVME162FX and DMA on the IP bus
-------------------------------
From Eric Vaitl <eric@viasat.com>:
If you have any customers that will be using the 162FX, tell them to
be careful. The main difference between the 162 and the 162FX is DMA
on the IP bus. I spent over a month trying to write a DMA HDLC driver
for GreenSprings IP-MP and couldn't get it to work. I talked to some
people at GreenSprings, and they agreed that there really is no way to
get DMA to work unless you know the size of the packets in advance.
Once the IP2 chip DMA controller is given the character count and
enabled, it doesn't accept further commands until all of the
characters have arrived. The only way to terminate a DMA transfer
prematurely is by raising DMAEND* during the last read. None of the IP
modules that I know of are currently able to do that. GreenSprings is
working on the problem, but nothing is going to available for a few
months.
Installation
------------
Nothing unique to the MVME162. It has been incorporated into the

View File

@@ -1,6 +1,6 @@
/* bsp.h
*
* This include file contains all MVME162 board IO definitions.
* This include file contains all MVME162fx board IO definitions.
*
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
* On-Line Applications Research Corporation (OAR).
@@ -165,6 +165,13 @@ typedef volatile struct mcchip_regs {
* Prototypes for the low-level serial io are also included here,
* because such stuff is bsp-specific (yet). The function bodies
* are in console.c
*
* NOTE from Eric Vaitl <evaitl@viasat.com>:
*
* I dropped RTEMS into a 162FX today (the MVME162-513). The 162FX has a
* bug in the MC2 chip (revision 1) such that the SCC data register is
* not accessible, it has to be accessed indirectly through the SCC
* control register.
*/
enum {portB, portA};
@@ -190,10 +197,11 @@ typedef volatile struct scc_regs {
#define ZREAD0(port) (scc[port].csr)
#define ZREAD(port, n) (ZWRITE0(port, n), (scc[port].csr))
#define ZREADD(port) (scc[port].buf)
#define ZREADD(port) (scc[port].csr=0x08, scc[port].csr )
#define ZWRITE(port, n, v) (ZWRITE0(port, n), ZWRITE0(port, v))
#define ZWRITED(port, v) (scc[port].buf = (unsigned char)(v))
#define ZWRITED(port, v) (scc[port].csr = 0x08, \
scc[port].csr = (unsigned char)(v))
/*----------------------------------------------------------------*/
/*

View File

@@ -28,6 +28,8 @@ void bsp_return_to_monitor_trap()
{
extern void start( void );
page_table_teardown();
lcsr->intr_ena = 0; /* disable interrupts */
m68k_set_vbr(0xFFE00000); /* restore 162Bug vectors */
asm volatile( "trap #15" ); /* trap to 162Bug */

View File

@@ -188,7 +188,7 @@ int main(
lcsr->vector_base = (VBR0 << 28) | (VBR1 << 24);
m68k_enable_caching();
page_table_init();
/*
* we only use a hook to get the C library initialized.

View File

@@ -3,7 +3,7 @@
* This file contains the entry veneer for RTEMS programs
* downloaded to Papyrus.
*
* Author: Andrew Bray <andy@i-cubed.demon.co.uk>
* Author: Andrew Bray <andy@i-cubed.co.uk>
*
* COPYRIGHT (c) 1995 by i-cubed ltd.
*
@@ -223,8 +223,8 @@ bss_addr:
stw r3, 4(r1)
stw r3, 8(r1)
stw r3, 12(r1)
.extern .main
b .main /* call the first C routine */
.extern SYM (main)
b SYM (main) /* call the first C routine */
/*-------------------------------------------------------------------------------
* bssclr.

View File

@@ -3,7 +3,7 @@
* This file contains the entry veneer for RTEMS programs
* stored in Papyrus' flash ROM.
*
* Author: Andrew Bray <andy@i-cubed.demon.co.uk>
* Author: Andrew Bray <andy@i-cubed.co.uk>
*
* COPYRIGHT (c) 1995 by i-cubed ltd.
*
@@ -230,8 +230,10 @@ bss_addr:
*----------------------------------------------------------------------*/
addis r2,r0,0x8000
addi r2,r2,0x0001
mticcr r2
mtdccr r2
mtspr 0x3fb, r2 /* ICCR */
mtspr 0x3fa, r2 /* DCCR */
/*-----------------------------------------------------------------------
* C_setup.
*----------------------------------------------------------------------*/
@@ -243,8 +245,8 @@ bss_addr:
stw r3, 4(r1)
stw r3, 8(r1)
stw r3, 12(r1)
.extern .main
b .main /* call the first C routine */
.extern SYM (main)
b SYM (main) /* call the first C routine */
/*-------------------------------------------------------------------------------
* Rom2ram.

View File

@@ -2,7 +2,7 @@
*
* This include file contains all Papyrus board IO definitions.
*
* Author: Andrew Bray <andy@i-cubed.demon.co.uk>
* Author: Andrew Bray <andy@i-cubed.co.uk>
*
* COPYRIGHT (c) 1995 by i-cubed ltd.
*
@@ -44,6 +44,9 @@ extern "C" {
#else
#include <rtems.h>
#include <console.h>
#include <clockdrv.h>
#include <console.h>
#include <iosupp.h>
/*
* Define the time limits for RTEMS Test Suite test durations.
@@ -56,6 +59,7 @@ extern "C" {
#define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */
#define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */
/*
* Stuff for Time Test 27
*/
@@ -78,18 +82,30 @@ extern "C" {
#define delay( microseconds ) \
{ \
unsigned32 start, ticks, now; \
asm volatile ("mftblo %0" : "=r" (start)); \
asm volatile ("mfspr %0, 0x3dd" : "=r" (start)); /* TBLO */ \
ticks = (microseconds) * Cpu_table.clicks_per_usec; \
do \
asm volatile ("mftblo %0" : "=r" (now)); \
asm volatile ("mfspr %0, 0x3dd" : "=r" (now)); /* TBLO */ \
while (now - start < ticks); \
}
/* Constants */
#define RAM_START 0
#define RAM_END 0x00200000
/* Some useful LED debugging bits */
/* LED numbers are from 0-2 */
#define __led_base ((volatile int *)0x7F200000)
/* Turn a LED on */
#define led_on(n) (__led_base[n] = 0)
/* Turn a LED off */
#define led_off(n) (__led_base[n] = 1)
/* miscellaneous stuff assumed to exist */
extern rtems_configuration_table BSP_Configuration; /* owned by BSP */
@@ -98,7 +114,7 @@ extern rtems_cpu_table Cpu_table; /* owned by BSP */
/*
* Device Driver Table Entries
*/
/*
* NOTE: Use the standard Console driver entry
*/
@@ -106,16 +122,21 @@ extern rtems_cpu_table Cpu_table; /* owned by BSP */
/*
* NOTE: Use the standard Clock driver entry
*/
/*
* How many libio files we want
*/
#define BSP_LIBIO_MAX_FDS 20
/* functions */
void bsp_start( void );
int bsp_start(
int argc,
char **argv,
char **environp
);
void bsp_cleanup( void );
rtems_isr_entry set_vector( /* returns old vector */

View File

@@ -26,7 +26,7 @@
*/
/*
* Updated for a 25MHz Papyrus by Andrew Bray <andy@i-cubed.demon.co.uk>
* Updated for a 25MHz Papyrus by Andrew Bray <andy@i-cubed.co.uk>
*
* Units are 100ns.
*

View File

@@ -7,7 +7,7 @@
*
* OUTPUT: NONE
*
* Author: Andrew Bray <andy@i-cubed.demon.co.uk>
* Author: Andrew Bray <andy@i-cubed.co.uk>
*
* COPYRIGHT (c) 1995 by i-cubed ltd.
*

View File

@@ -9,7 +9,7 @@
*
* OUTPUT: NONE
*
* Author: Andrew Bray <andy@i-cubed.demon.co.uk>
* Author: Andrew Bray <andy@i-cubed.co.uk>
*
* COPYRIGHT (c) 1995 by i-cubed ltd.
*
@@ -166,7 +166,7 @@ bsp_postdriver_hook(void)
rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
}
int main(
int bsp_start(
int argc,
char **argv,
char **environp
@@ -225,8 +225,6 @@ int main(
* not malloc'ed. It is just "pulled from the air".
*/
/*BSP_Configuration.work_space_size *= 4;*/
BSP_Configuration.work_space_start = (void *)
RAM_END - BSP_Configuration.work_space_size;

View File

@@ -12,7 +12,7 @@
* RETURNS:
* address of previous interrupt handler
*
* Author: Andrew Bray <andy@i-cubed.demon.co.uk>
* Author: Andrew Bray <andy@i-cubed.co.uk>
*
* COPYRIGHT (c) 1995 by i-cubed ltd.
*

View File

@@ -0,0 +1,9 @@
#
# $Id$
#
This directory contains the SHM driver support files for
System V/POSIX derived UNIX flavors.
WARNING: The interrupt support in this directory currently will
only work in a homogeneous system.

View File

@@ -0,0 +1,30 @@
/* addrconv.v
*
* No address range conversion is required.
*
* Input parameters:
* addr - address to convert
*
* Output parameters:
* returns - converted address
*
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
* On-Line Applications Research Corporation (OAR).
* All rights assigned to U.S. Government, 1994.
*
* This material may be reproduced by or for the U.S. Government pursuant
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
*
* $Id$
*/
#include <bsp.h>
#include <shm.h>
void *Shm_Convert_address(
void *addr
)
{
return ( addr );
}

View File

@@ -0,0 +1,74 @@
/* void Shm_get_config( localnode, &shmcfg )
*
* This routine initializes, if necessary, and returns a pointer
* to the Shared Memory Configuration Table for the UNIX
* simulator.
*
* INPUT PARAMETERS:
* localnode - local node number
* shmcfg - address of pointer to SHM Config Table
*
* OUTPUT PARAMETERS:
* *shmcfg - pointer to SHM Config Table
*
* NOTES: This driver is capable of supporting a practically unlimited
* number of nodes.
*
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
* On-Line Applications Research Corporation (OAR).
* All rights assigned to U.S. Government, 1994.
*
* This material may be reproduced by or for the U.S. Government pursuant
* to the 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 <bsp.h>
#include <shm.h>
shm_config_table BSP_shm_cfgtbl;
int semid;
void Shm_Cause_interrupt_unix(
rtems_unsigned32 node
);
void Shm_Get_configuration(
rtems_unsigned32 localnode,
shm_config_table **shmcfg
)
{
_CPU_SHM_Init(
Shm_Maximum_nodes,
Shm_Is_master_node(),
(void **)&BSP_shm_cfgtbl.base,
(unsigned32 *)&BSP_shm_cfgtbl.length
);
BSP_shm_cfgtbl.format = SHM_BIG;
BSP_shm_cfgtbl.cause_intr = Shm_Cause_interrupt_unix;
#ifdef NEUTRAL_BIG
BSP_shm_cfgtbl.convert = NULL_CONVERT;
#else
BSP_shm_cfgtbl.convert = CPU_swap_u32;
#endif
if ( _CPU_SHM_Get_vector() ) {
BSP_shm_cfgtbl.poll_intr = INTR_MODE;
BSP_shm_cfgtbl.Intr.address = (vol_u32 *) _CPU_Get_pid(); /* process id */
BSP_shm_cfgtbl.Intr.value = _CPU_SHM_Get_vector(); /* signal to send */
BSP_shm_cfgtbl.Intr.length = LONG;
} else {
BSP_shm_cfgtbl.poll_intr = POLLED_MODE;
BSP_shm_cfgtbl.Intr.address = NO_INTERRUPT;
BSP_shm_cfgtbl.Intr.value = NO_INTERRUPT;
BSP_shm_cfgtbl.Intr.length = NO_INTERRUPT;
}
*shmcfg = &BSP_shm_cfgtbl;
}

View File

@@ -0,0 +1,33 @@
/* void Shm_interrupt_unix( node )
*
* This routine is the shared memory driver routine which
* generates interrupts to other CPUs.
*
* Input parameters:
* node - destination of this packet (0 = broadcast)
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
* On-Line Applications Research Corporation (OAR).
* All rights assigned to U.S. Government, 1994.
*
* This material may be reproduced by or for the U.S. Government pursuant
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
*
* $Id$
*/
#include <bsp.h>
#include <shm.h>
void Shm_Cause_interrupt_unix(
rtems_unsigned32 node
)
{
Shm_Interrupt_information *intr;
intr = &Shm_Interrupt_table[node];
_CPU_SHM_Send_interrupt( (int) intr->address, (int) intr->value );
}

View File

@@ -0,0 +1,74 @@
/* Shared Memory Lock Routines
*
* This shared memory locked queue support routine need to be
* able to lock the specified locked queue. Interrupts are
* disabled while the queue is locked to prevent preemption
* and deadlock when two tasks poll for the same lock.
* previous level.
*
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
* On-Line Applications Research Corporation (OAR).
* All rights assigned to U.S. Government, 1994.
*
* This material may be reproduced by or for the U.S. Government pursuant
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
*
* $Id$
*/
#include <bsp.h>
#include <shm.h>
extern int semid;
/*
* Shm_Initialize_lock
*
* Initialize the lock for the specified locked queue.
*/
void Shm_Initialize_lock(
Shm_Locked_queue_Control *lq_cb
)
{
lq_cb->lock = lq_cb - Shm_Locked_queues;
}
/* Shm_Lock( &lq_cb )
*
* This shared memory locked queue support routine locks the
* specified locked queue. It disables interrupts to prevent
* a deadlock condition.
*/
void Shm_Lock(
Shm_Locked_queue_Control *lq_cb
)
{
rtems_unsigned32 isr_level;
rtems_interrupt_disable( isr_level );
Shm_isrstat = isr_level;
_CPU_SHM_Lock( lq_cb->lock );
}
/*
* Shm_Unlock
*
* Unlock the lock for the specified locked queue.
*/
void Shm_Unlock(
Shm_Locked_queue_Control *lq_cb
)
{
rtems_unsigned32 isr_level;
_CPU_SHM_Unlock( lq_cb->lock );
isr_level = Shm_isrstat;
rtems_interrupt_enable( isr_level );
}

View File

@@ -0,0 +1,53 @@
/* system.h
*
* This include file contains information that is included in every
* function in the test set.
*
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
* On-Line Applications Research Corporation (OAR).
* All rights assigned to U.S. Government, 1994.
*
* This material may be reproduced by or for the U.S. Government pursuant
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
*
* $Id$
*/
#include <tmacros.h>
#define PT_NAME rtems_build_name( 'P', 'A', 'R', '\0' )
/* functions */
rtems_task Init(
rtems_task_argument argument
);
/* configuration information */
#define CONFIGURE_MPTEST
#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
#define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 1
#define CONFIGURE_MP_MAXIMUM_PROXIES 0
#if ( NODE_NUMBER == 1 )
#define CONFIGURE_MAXIMUM_PARTITIONS 1
#elif ( NODE_NUMBER == 2 )
#define CONFIGURE_MAXIMUM_PARTITIONS 2
#endif
#include <confdefs.h>
/* variables */
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
TEST_EXTERN rtems_id Partition_id[ 2 ]; /* array of partition ids */
TEST_EXTERN rtems_name Partition_name[ 2 ]; /* array of partition names */
/* end of include file */

View File

@@ -166,7 +166,7 @@ rtems_task Init(
status = rtems_task_create(
Partition_task_name[ Multiprocessing_configuration.node ],
2,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_MINIMUM_STACK_SIZE * 2,
RTEMS_TIMESLICE,
RTEMS_GLOBAL,
&Partition_task_id[ 1 ]

View File

@@ -0,0 +1,34 @@
/* Stub_close
*
* This routine is the terminal driver close routine.
*
* Input parameters:
* major - device major number
* minor - device minor number
* pargb - pointer to close parameter block
*
* Output parameters:
* rval - STUB_SUCCESSFUL
*
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
* On-Line Applications Research Corporation (OAR).
* All rights assigned to U.S. Government, 1994.
*
* This material may be reproduced by or for the U.S. Government pursuant
* to the 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.h>
#include "stubdrv.h"
rtems_device_driver Stub_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *pargp
)
{
return STUB_SUCCESSFUL;
}

View File

@@ -0,0 +1,34 @@
/* Stub_control
*
* This routine is the terminal driver control routine.
*
* Input parameters:
* major - device major number
* minor - device minor number
* pargp - pointer to cntrl parameter block
*
* Output parameters:
* rval - STUB_SUCCESSFUL
*
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
* On-Line Applications Research Corporation (OAR).
* All rights assigned to U.S. Government, 1994.
*
* This material may be reproduced by or for the U.S. Government pursuant
* to the 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.h>
#include "stubdrv.h"
rtems_device_driver Stub_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *pargp
)
{
return STUB_SUCCESSFUL;
}

View File

@@ -161,7 +161,7 @@ rtems_task Test_task(
}
put_time(
"rtems_semaphore_obtain",
"rtems_semaphore_obtain: available",
semaphore_obtain_time,
OPERATION_COUNT * OPERATION_COUNT,
semaphore_obtain_loop_time,
@@ -169,7 +169,7 @@ rtems_task Test_task(
);
put_time(
"rtems_semaphore_obtain (RTEMS_NO_WAIT)",
"rtems_semaphore_obtain: not available -- NO_WAIT",
semaphore_obtain_no_wait_time,
OPERATION_COUNT * OPERATION_COUNT,
semaphore_obtain_loop_time,
@@ -177,7 +177,7 @@ rtems_task Test_task(
);
put_time(
"rtems_semaphore_release",
"rtems_semaphore_release: no waiting tasks",
semaphore_release_time,
OPERATION_COUNT * OPERATION_COUNT * 2,
semaphore_release_loop_time * 2,

View File

@@ -146,7 +146,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_semaphore_obtain (blocking)",
"rtems_semaphore_obtain: not available -- caller blocks",
end_time,
OPERATION_COUNT,
0,

View File

@@ -139,7 +139,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_semaphore_release (preemptive)",
"rtems_semaphore_release: task readied -- preempts caller",
end_time,
OPERATION_COUNT,
0,

View File

@@ -94,7 +94,7 @@ rtems_task Highest_task(
end_time = Read_timer();
put_time(
"rtems_task_restart (blocked, preempt)",
"rtems_task_restart: blocked task -- preempts caller",
end_time,
1,
0,
@@ -113,7 +113,7 @@ rtems_task Highest_task(
end_time = Read_timer();
put_time(
"rtems_task_restart (ready, preempt)",
"rtems_task_restart: ready task -- preempts caller",
end_time,
1,
0,
@@ -160,7 +160,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_semaphore_release (readying)",
"rtems_semaphore_release: task readied -- returns to caller",
end_time,
OPERATION_COUNT,
0,
@@ -237,7 +237,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_task_restart (suspended)",
"rtems_task_restart: suspended task -- returns to caller",
end_time,
OPERATION_COUNT,
overhead,
@@ -253,7 +253,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_task_delete (suspended)",
"rtems_task_delete: suspended task",
end_time,
OPERATION_COUNT,
overhead,
@@ -281,7 +281,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_task_restart (ready)",
"rtems_task_restart: ready task -- returns to caller",
end_time,
OPERATION_COUNT,
overhead,
@@ -303,7 +303,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_task_restart (blocked, no preempt)",
"rtems_task_restart: blocked task -- returns to caller",
end_time,
OPERATION_COUNT,
overhead,
@@ -320,7 +320,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_task_delete (blocked)",
"rtems_task_delete: blocked task",
end_time,
OPERATION_COUNT,
overhead,

View File

@@ -90,7 +90,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_task_resume (causing preempt)",
"rtems_task_resume: task readied -- preempts caller",
end_time,
OPERATION_COUNT,
0,
@@ -119,7 +119,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_task_suspend self",
"rtems_task_suspend: calling task",
end_time,
OPERATION_COUNT,
0,

View File

@@ -88,7 +88,7 @@ rtems_task Task_1(
overhead = Read_timer();
put_time(
"rtems_task_restart self",
"rtems_task_restart: calling task",
end_time,
OPERATION_COUNT,
overhead,
@@ -116,7 +116,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_task_suspend (no preempt)",
"rtems_task_suspend: returns to caller",
end_time,
OPERATION_COUNT,
0,
@@ -129,7 +129,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_task_resume (no preempt)",
"rtems_task_resume: task readied -- returns to caller",
end_time,
OPERATION_COUNT,
0,
@@ -142,7 +142,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_task_delete (others)",
"rtems_task_delete: ready task",
end_time,
OPERATION_COUNT,
0,

View File

@@ -14,7 +14,7 @@
#define TEST_INIT
#include "system.h"
rtems_id Task_id[OPERATION_COUNT+1], task_index;
rtems_id Task_id[ OPERATION_COUNT+1 ], task_index;
rtems_task High_task(
rtems_task_argument argument
@@ -84,7 +84,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_task_restart suspended/preempt",
"rtems_task_restart: suspended task -- preempts caller",
end_time,
OPERATION_COUNT,
0,

View File

@@ -97,7 +97,7 @@ rtems_task test_task(
end_time = Read_timer();
put_time(
"rtems_task_set_priority current priority",
"rtems_task_set_priority: obtain current priority",
end_time,
OPERATION_COUNT,
overhead,
@@ -110,7 +110,7 @@ rtems_task test_task(
end_time = Read_timer();
put_time(
"rtems_task_set_priority no preempt",
"rtems_task_set_priority: returns to caller",
end_time,
OPERATION_COUNT,
overhead,
@@ -127,7 +127,7 @@ rtems_task test_task(
end_time = Read_timer();
put_time(
"rtems_task_mode (current)",
"rtems_task_mode: obtain current mode",
end_time,
OPERATION_COUNT,
overhead,
@@ -150,7 +150,7 @@ rtems_task test_task(
end_time = Read_timer();
put_time(
"rtems_task_mode (no reschedule)",
"rtems_task_mode: no reschedule",
end_time,
OPERATION_COUNT * 2,
overhead,
@@ -162,7 +162,7 @@ rtems_task test_task(
end_time = Read_timer();
put_time(
"rtems_task_mode (reschedule)",
"rtems_task_mode: reschedule -- returns to caller",
end_time,
1,
0,
@@ -244,7 +244,7 @@ rtems_task test_task1(
end_time = Read_timer();
put_time(
"rtems_task_mode (preemptive)",
"rtems_task_mode: reschedule -- preempts caller",
end_time,
1,
0,

View File

@@ -184,7 +184,7 @@ void queue_test()
}
put_time(
"rtems_message_queue_send (no tasks waiting)",
"rtems_message_queue_send: no waiting tasks",
send_time,
OPERATION_COUNT * OPERATION_COUNT,
send_loop_time,
@@ -192,7 +192,7 @@ void queue_test()
);
put_time(
"rtems_message_queue_urgent (no tasks waiting)",
"rtems_message_queue_urgent: no waiting tasks",
urgent_time,
OPERATION_COUNT * OPERATION_COUNT,
urgent_loop_time,
@@ -200,7 +200,7 @@ void queue_test()
);
put_time(
"rtems_message_queue_receive (messages available)",
"rtems_message_queue_receive: available",
receive_time,
OPERATION_COUNT * OPERATION_COUNT * 2,
receive_loop_time * 2,
@@ -208,7 +208,7 @@ void queue_test()
);
put_time(
"rtems_message_queue_flush (empty queue)",
"rtems_message_queue_flush: no messages flushed",
empty_flush_time,
OPERATION_COUNT,
0,
@@ -216,7 +216,7 @@ void queue_test()
);
put_time(
"rtems_message_queue_flush (messages flushed)",
"rtems_message_queue_flush: messages flushed",
flush_time,
OPERATION_COUNT,
0,

View File

@@ -105,7 +105,7 @@ void test_init()
end_time = Read_timer();
put_time(
"rtems_message_queue_receive (RTEMS_NO_WAIT)",
"rtems_message_queue_receive: not available -- NO_WAIT",
end_time,
OPERATION_COUNT,
overhead,
@@ -153,7 +153,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_message_queue_receive (blocking)",
"rtems_message_queue_receive: not available -- caller blocks",
end_time,
OPERATION_COUNT,
0,

View File

@@ -143,7 +143,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_message_queue_send (preemptive)",
"rtems_message_queue_send: task readied -- preempts caller",
end_time,
OPERATION_COUNT,
0,

View File

@@ -119,7 +119,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_message_queue_send (readying)",
"rtems_message_queue_send: task readied -- returns to caller",
end_time,
OPERATION_COUNT,
overhead,

View File

@@ -142,7 +142,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_message_queue_urgent (preemptive)",
"rtems_message_queue_urgent: task readied -- preempts caller",
end_time,
OPERATION_COUNT,
0,

View File

@@ -119,7 +119,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_message_queue_urgent (readying)",
"rtems_message_queue_urgent: task readied -- returns to caller",
end_time,
OPERATION_COUNT,
overhead,

View File

@@ -98,7 +98,7 @@ void test_init()
end_time = Read_timer();
put_time(
"rtems_event_receive (current)",
"rtems_event_receive: obtain current events",
end_time,
OPERATION_COUNT,
overhead,
@@ -119,7 +119,7 @@ void test_init()
end_time = Read_timer();
put_time(
"rtems_event_receive (RTEMS_NO_WAIT)",
"rtems_event_receive: not available -- NO_WAIT",
end_time,
OPERATION_COUNT,
overhead,
@@ -137,7 +137,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_event_receive (blocking)",
"rtems_event_receive: not available -- caller blocks",
end_time,
OPERATION_COUNT,
0,
@@ -155,7 +155,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_event_send (non-blocking)",
"rtems_event_send: no task readied",
end_time,
OPERATION_COUNT,
overhead,
@@ -172,7 +172,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_event_receive (available)",
"rtems_event_receive: available",
end_time,
1,
0,
@@ -185,7 +185,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_event_send (readying)",
"rtems_event_send: task readied -- returns to caller",
end_time,
OPERATION_COUNT,
overhead,

View File

@@ -136,7 +136,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_event_send (preemptive)",
"rtems_event_send: task readied -- preempts caller",
end_time,
OPERATION_COUNT,
0,

View File

@@ -115,7 +115,7 @@ rtems_task Last_task(
overhead = Read_timer();
put_time(
"rtems_task_set_priority (preemptive)",
"rtems_task_set_priority: preempts caller",
end_time,
OPERATION_COUNT,
overhead,

View File

@@ -100,7 +100,7 @@ rtems_task Last_task(
end_time = Read_timer();
put_time(
"rtems_task_delete self",
"rtems_task_delete: calling task",
end_time,
OPERATION_COUNT,
0,

View File

@@ -94,15 +94,13 @@ rtems_asr Process_asr_for_pass_1(
end_time = Read_timer();
put_time(
"rtems_signal_send (self)",
"rtems_signal_send: signal to self",
end_time,
1,
0,
CALLING_OVERHEAD_SIGNAL_SEND
);
puts( "SIGNAL_ENTER (non-preemptive) na" );
Timer_initialize();
}
@@ -112,8 +110,6 @@ rtems_asr Process_asr_for_pass_2(
{
rtems_status_code status;
puts( "SIGNAL_ENTER (preemptive) na" );
status = rtems_task_resume( Task_id[ 3 ] );
directive_failed( status, "rtems_task_resume" );
@@ -143,7 +139,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_signal_send (non-preemptive)",
"rtems_signal_send: returns to caller",
end_time,
1,
0,
@@ -158,7 +154,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"SIGNAL_RETURN (non-preemptive)",
"exit ASR overhead: returns to calling task",
end_time,
1,
0,
@@ -200,7 +196,7 @@ rtems_task Task_3(
end_time = Read_timer();
put_time(
"SIGNAL_RETURN (preemptive)",
"exit ASR overhead: returns to preempting task",
end_time,
1,
0,

View File

@@ -137,7 +137,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_partition_get_buffer (available)",
"rtems_partition_get_buffer: available",
end_time,
1,
0,
@@ -162,7 +162,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_partition_get_buffer (not available)",
"rtems_partition_get_buffer: not available",
end_time,
1,
0,
@@ -223,7 +223,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_region_get_segment (available)",
"rtems_region_get_segment: available",
end_time,
1,
0,
@@ -241,7 +241,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_region_get_segment (RTEMS_NO_WAIT)",
"rtems_region_get_segment: not available -- NO_WAIT",
end_time,
1,
0,
@@ -256,7 +256,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_region_return_segment (no tasks waiting)",
"rtems_region_return_segment: no waiting tasks",
end_time,
1,
0,
@@ -286,7 +286,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_region_return_segment (preempt)",
"rtems_region_return_segment: task readied -- preempts caller",
end_time,
1,
0,
@@ -437,7 +437,7 @@ rtems_task Task_2(
end_time = Read_timer();
put_time(
"rtems_region_get_segment (blocking)",
"rtems_region_get_segment: not available -- caller blocks",
end_time,
1,
0,
@@ -454,7 +454,7 @@ rtems_task Task_2(
end_time = Read_timer();
put_time(
"rtems_region_return_segment (ready -- return)",
"rtems_region_return_segment: task readied -- returns to caller",
end_time,
1,
0,

View File

@@ -97,7 +97,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_message_queue_broadcast (readying)",
"rtems_message_queue_broadcast: task readied -- returns to caller",
end_time,
1,
0,
@@ -151,7 +151,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_message_queue_broadcast (no waiting tasks)",
"rtems_message_queue_broadcast: no waiting tasks",
end_time,
OPERATION_COUNT,
1,
@@ -171,7 +171,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_message_queue_broadcast (preempt)",
"rtems_message_queue_broadcast: task readied -- preempts caller",
end_time,
1,
0,

View File

@@ -122,7 +122,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_fire_after (inactive)",
"rtems_timer_fire_after: inactive",
end_time,
OPERATION_COUNT,
overhead,
@@ -135,7 +135,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_fire_after (active)",
"rtems_timer_fire_after: active",
end_time,
OPERATION_COUNT,
overhead,
@@ -148,7 +148,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_cancel (active)",
"rtems_timer_cancel: active",
end_time,
OPERATION_COUNT,
overhead,
@@ -162,7 +162,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_cancel (inactive)",
"rtems_timer_cancel: inactive",
end_time,
OPERATION_COUNT,
overhead,
@@ -176,7 +176,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_reset (inactive)",
"rtems_timer_reset: inactive",
end_time,
OPERATION_COUNT,
overhead,
@@ -189,7 +189,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_reset (active)",
"rtems_timer_reset: active",
end_time,
OPERATION_COUNT,
overhead,
@@ -213,7 +213,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_fire_when (inactive)",
"rtems_timer_fire_when: inactive",
end_time,
OPERATION_COUNT,
overhead,
@@ -227,7 +227,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_fire_when (active)",
"rtems_timer_fire_when: active",
end_time,
OPERATION_COUNT,
overhead,
@@ -240,7 +240,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_delete (active)",
"rtems_timer_delete: active",
end_time,
OPERATION_COUNT,
overhead,
@@ -265,7 +265,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_delete (inactive)",
"rtems_timer_delete: inactive",
end_time,
OPERATION_COUNT,
overhead,

View File

@@ -85,7 +85,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_task_wake_after (no context switch)",
"rtems_task_wake_after: yield -- returns to caller",
end_time,
OPERATION_COUNT,
overhead,
@@ -110,7 +110,7 @@ rtems_task Tasks(
end_time = Read_timer();
put_time(
"rtems_task_wake_after (context switch)",
"rtems_task_wake_after: yields -- preempts caller",
end_time,
OPERATION_COUNT,
overhead,

View File

@@ -173,7 +173,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"INTERRUPT DISABLE",
"_ISR_Disable",
end_time,
1,
0,
@@ -185,7 +185,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"INTERRUPT FLASH",
"_ISR_Flash",
end_time,
1,
0,
@@ -197,7 +197,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"INTERRUPT ENABLE",
"_ISR_Enable",
end_time,
1,
0,
@@ -209,7 +209,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"THREAD_DISABLE_DISPATCH",
"_Thread_Disable_dispatch",
end_time,
1,
0,
@@ -221,7 +221,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"THREAD_ENABLE_DISPATCH",
"_Thread_Enable_dispatch",
end_time,
1,
0,
@@ -233,7 +233,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"THREAD_SET_STATE",
"_Thread_Set_state",
end_time,
1,
0,
@@ -253,7 +253,7 @@ rtems_task Middle_task(
end_time = Read_timer();
put_time(
"THREAD_DISPATCH (NO FP)",
"_Thread_Disptach (NO FP)",
end_time,
1,
0,
@@ -289,7 +289,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"CONTEXT_SWITCH (NO FP)",
"context switch: no floating point contexts",
end_time,
1,
0,
@@ -306,7 +306,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"CONTEXT_SWITCH (SELF)",
"context switch: self",
end_time,
1,
0,
@@ -318,7 +318,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"CONTEXT_SWITCH (Initialised)",
"context switch: to another task",
end_time,
1,
0,
@@ -349,7 +349,7 @@ rtems_task Floating_point_task_1(
end_time = Read_timer();
put_time(
"CONTEXT_SWITCH (restore 1st FP)",
"fp context switch: restore 1st FP task",
end_time,
1,
0,
@@ -376,7 +376,7 @@ rtems_task Floating_point_task_1(
end_time = Read_timer();
put_time(
"CONTEXT_SWITCH (used->init FP)",
"fp context switch: save idle, restore initialized",
end_time,
1,
0,
@@ -413,7 +413,7 @@ rtems_task Floating_point_task_2(
end_time = Read_timer();
put_time(
"CONTEXT_SWITCH (init->init FP)",
"fp context switch: save idle, restore idle",
end_time,
1,
0,
@@ -442,7 +442,7 @@ rtems_task Floating_point_task_2(
end_time = Read_timer();
put_time(
"CONTEXT_SWITCH (used->used FP)",
"fp context switch: save initialized, restore initialized",
end_time,
1,
0,
@@ -462,7 +462,7 @@ void complete_test( void )
end_time = Read_timer();
put_time(
"THREAD_RESUME",
"_Thread_Resume",
end_time,
1,
0,
@@ -476,7 +476,7 @@ void complete_test( void )
end_time = Read_timer();
put_time(
"THREAD_UNBLOCK",
"_Thread_Unblock",
end_time,
1,
0,
@@ -490,7 +490,7 @@ void complete_test( void )
end_time = Read_timer();
put_time(
"THREAD_READY",
"_Thread_Ready",
end_time,
1,
0,
@@ -510,7 +510,7 @@ void complete_test( void )
end_time = Read_timer();
put_time(
"THREAD_GET",
"_Thread_Get",
end_time,
OPERATION_COUNT,
0,
@@ -523,7 +523,7 @@ void complete_test( void )
end_time = Read_timer();
put_time(
"SEMAPHORE_GET",
"_Semaphore_Get",
end_time,
OPERATION_COUNT,
0,
@@ -536,7 +536,7 @@ void complete_test( void )
end_time = Read_timer();
put_time(
"THREAD_GET invalid id",
"_Thread_Get: invalid id",
end_time,
OPERATION_COUNT,
0,

View File

@@ -104,7 +104,7 @@ rtems_task Task_1(
Interrupt_return_time = Read_timer();
put_time(
"INTERRUPT_ENTER (no preempt)",
"interrupt entry overhead: returns to interrupted task",
Interrupt_enter_time,
1,
0,
@@ -112,7 +112,7 @@ rtems_task Task_1(
);
put_time(
"INTERRUPT_RETURN (no preempt)",
"interrupt exit overhead: returns to interrupted task",
Interrupt_return_time,
1,
0,
@@ -138,7 +138,7 @@ rtems_task Task_1(
Interrupt_return_time = Read_timer();
put_time(
"INTERRUPT_ENTER (nested interrupt)",
"interrupt entry overhead: returns to nested interrupt",
Interrupt_enter_nested_time,
1,
0,
@@ -146,7 +146,7 @@ rtems_task Task_1(
);
put_time(
"INTERRUPT_RETURN (nested interrupt)",
"interrupt exit overhead: returns to nested interrupt",
Interrupt_return_nested_time,
1,
0,
@@ -193,7 +193,7 @@ rtems_task Task_2(
end_time = Read_timer();
put_time(
"INTERRUPT_ENTER (preempt)",
"interrupt entry overhead: returns to preempting task",
Interrupt_enter_time,
1,
0,
@@ -201,7 +201,7 @@ rtems_task Task_2(
);
put_time(
"INTERRUPT_RETURN (preempt)",
"interrupt exit overhead: returns to preempting task",
end_time,
1,
0,

View File

@@ -57,7 +57,7 @@ rtems_task Init(
end_time = Read_timer();
put_time(
"rtems_rate_monotonic_period (initial)",
"rtems_rate_monotonic_period: initiate period -- returns to caller",
end_time,
1,
0,
@@ -69,7 +69,7 @@ rtems_task Init(
end_time = Read_timer();
put_time(
"rtems_rate_monotonic_period (STATUS)",
"rtems_rate_monotonic_period: obtain status",
end_time,
1,
0,
@@ -93,7 +93,7 @@ rtems_task Init(
end_time = Read_timer();
put_time(
"rtems_rate_monotonic_delete (cancelled)",
"rtems_rate_monotonic_delete: inactive",
end_time,
1,
0,
@@ -111,7 +111,7 @@ rtems_task Init(
end_time = Read_timer();
put_time(
"rtems_rate_monotonic_delete (active)",
"rtems_rate_monotonic_delete: active",
end_time,
1,
0,
@@ -195,7 +195,7 @@ rtems_task Low_task(
overhead = Read_timer();
put_time(
"rtems_rate_monotonic_period (blocking)",
"rtems_rate_monotonic_period: conclude periods -- caller blocks",
end_time,
OPERATION_COUNT,
overhead,

View File

@@ -1,7 +1,7 @@
#!/bin/ksh -p
#!KSHELL -p
#
# Check test results against official output in the src tree
# $Id$
# Check test results against official output in the src tree
# $Id$
#
# XXX: do not run size.exe with this; it asks questions we don't answer

View File

@@ -51,9 +51,8 @@
*
*/
#define _TOD_Activate( ticks ) \
_Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, \
(ticks), WATCHDOG_ACTIVATE_NOW )
#define _TOD_Activate( _ticks ) \
_Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, (_ticks) )
#endif
/* end of include file */

View File

@@ -44,5 +44,17 @@
#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 */

View File

@@ -84,12 +84,11 @@
*
*/
#define _Watchdog_Insert_ticks( _the_watchdog, _units, _insert_mode ) \
{ \
#define _Watchdog_Insert_ticks( _the_watchdog, _units ) \
do { \
(_the_watchdog)->initial = (_units); \
_Watchdog_Insert( &_Watchdog_Ticks_chain, \
(_the_watchdog), (_insert_mode) ); \
}
_Watchdog_Insert( &_Watchdog_Ticks_chain, (_the_watchdog) ); \
} while ( 0 )
/*PAGE
*
@@ -97,12 +96,11 @@
*
*/
#define _Watchdog_Insert_seconds( _the_watchdog, _units, _insert_mode ) \
{ \
#define _Watchdog_Insert_seconds( _the_watchdog, _units ) \
do { \
(_the_watchdog)->initial = (_units); \
_Watchdog_Insert( &_Watchdog_Seconds_chain, \
(_the_watchdog), (_insert_mode) ); \
}
_Watchdog_Insert( &_Watchdog_Seconds_chain, (_the_watchdog) ); \
} while ( 0 )
/*PAGE
*
@@ -131,8 +129,7 @@
#define _Watchdog_Reset( _the_watchdog ) \
{ \
(void) _Watchdog_Remove( (_the_watchdog) ); \
_Watchdog_Insert( &_Watchdog_Ticks_chain, \
(_the_watchdog), WATCHDOG_ACTIVATE_NOW ); \
_Watchdog_Insert( &_Watchdog_Ticks_chain, (_the_watchdog) ); \
}
/*PAGE

View File

@@ -0,0 +1,53 @@
/* system.h
*
* This include file contains information that is included in every
* function in the test set.
*
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
* On-Line Applications Research Corporation (OAR).
* All rights assigned to U.S. Government, 1994.
*
* This material may be reproduced by or for the U.S. Government pursuant
* to the copyright license under the clause at DFARS 252.227-7013. This
* notice must appear in all copies of this file and its derivatives.
*
* $Id$
*/
#include <tmacros.h>
#define PT_NAME rtems_build_name( 'P', 'A', 'R', '\0' )
/* functions */
rtems_task Init(
rtems_task_argument argument
);
/* configuration information */
#define CONFIGURE_MPTEST
#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
#define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 1
#define CONFIGURE_MP_MAXIMUM_PROXIES 0
#if ( NODE_NUMBER == 1 )
#define CONFIGURE_MAXIMUM_PARTITIONS 1
#elif ( NODE_NUMBER == 2 )
#define CONFIGURE_MAXIMUM_PARTITIONS 2
#endif
#include <confdefs.h>
/* variables */
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
TEST_EXTERN rtems_id Partition_id[ 2 ]; /* array of partition ids */
TEST_EXTERN rtems_name Partition_name[ 2 ]; /* array of partition names */
/* end of include file */

View File

@@ -166,7 +166,7 @@ rtems_task Init(
status = rtems_task_create(
Partition_task_name[ Multiprocessing_configuration.node ],
2,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_MINIMUM_STACK_SIZE * 2,
RTEMS_TIMESLICE,
RTEMS_GLOBAL,
&Partition_task_id[ 1 ]

View File

@@ -161,7 +161,7 @@ rtems_task Test_task(
}
put_time(
"rtems_semaphore_obtain",
"rtems_semaphore_obtain: available",
semaphore_obtain_time,
OPERATION_COUNT * OPERATION_COUNT,
semaphore_obtain_loop_time,
@@ -169,7 +169,7 @@ rtems_task Test_task(
);
put_time(
"rtems_semaphore_obtain (RTEMS_NO_WAIT)",
"rtems_semaphore_obtain: not available -- NO_WAIT",
semaphore_obtain_no_wait_time,
OPERATION_COUNT * OPERATION_COUNT,
semaphore_obtain_loop_time,
@@ -177,7 +177,7 @@ rtems_task Test_task(
);
put_time(
"rtems_semaphore_release",
"rtems_semaphore_release: no waiting tasks",
semaphore_release_time,
OPERATION_COUNT * OPERATION_COUNT * 2,
semaphore_release_loop_time * 2,

View File

@@ -146,7 +146,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_semaphore_obtain (blocking)",
"rtems_semaphore_obtain: not available -- caller blocks",
end_time,
OPERATION_COUNT,
0,

View File

@@ -139,7 +139,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_semaphore_release (preemptive)",
"rtems_semaphore_release: task readied -- preempts caller",
end_time,
OPERATION_COUNT,
0,

View File

@@ -94,7 +94,7 @@ rtems_task Highest_task(
end_time = Read_timer();
put_time(
"rtems_task_restart (blocked, preempt)",
"rtems_task_restart: blocked task -- preempts caller",
end_time,
1,
0,
@@ -113,7 +113,7 @@ rtems_task Highest_task(
end_time = Read_timer();
put_time(
"rtems_task_restart (ready, preempt)",
"rtems_task_restart: ready task -- preempts caller",
end_time,
1,
0,
@@ -160,7 +160,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_semaphore_release (readying)",
"rtems_semaphore_release: task readied -- returns to caller",
end_time,
OPERATION_COUNT,
0,
@@ -237,7 +237,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_task_restart (suspended)",
"rtems_task_restart: suspended task -- returns to caller",
end_time,
OPERATION_COUNT,
overhead,
@@ -253,7 +253,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_task_delete (suspended)",
"rtems_task_delete: suspended task",
end_time,
OPERATION_COUNT,
overhead,
@@ -281,7 +281,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_task_restart (ready)",
"rtems_task_restart: ready task -- returns to caller",
end_time,
OPERATION_COUNT,
overhead,
@@ -303,7 +303,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_task_restart (blocked, no preempt)",
"rtems_task_restart: blocked task -- returns to caller",
end_time,
OPERATION_COUNT,
overhead,
@@ -320,7 +320,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_task_delete (blocked)",
"rtems_task_delete: blocked task",
end_time,
OPERATION_COUNT,
overhead,

View File

@@ -90,7 +90,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_task_resume (causing preempt)",
"rtems_task_resume: task readied -- preempts caller",
end_time,
OPERATION_COUNT,
0,
@@ -119,7 +119,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_task_suspend self",
"rtems_task_suspend: calling task",
end_time,
OPERATION_COUNT,
0,

View File

@@ -88,7 +88,7 @@ rtems_task Task_1(
overhead = Read_timer();
put_time(
"rtems_task_restart self",
"rtems_task_restart: calling task",
end_time,
OPERATION_COUNT,
overhead,
@@ -116,7 +116,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_task_suspend (no preempt)",
"rtems_task_suspend: returns to caller",
end_time,
OPERATION_COUNT,
0,
@@ -129,7 +129,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_task_resume (no preempt)",
"rtems_task_resume: task readied -- returns to caller",
end_time,
OPERATION_COUNT,
0,
@@ -142,7 +142,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_task_delete (others)",
"rtems_task_delete: ready task",
end_time,
OPERATION_COUNT,
0,

View File

@@ -14,7 +14,7 @@
#define TEST_INIT
#include "system.h"
rtems_id Task_id[OPERATION_COUNT+1], task_index;
rtems_id Task_id[ OPERATION_COUNT+1 ], task_index;
rtems_task High_task(
rtems_task_argument argument
@@ -84,7 +84,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_task_restart suspended/preempt",
"rtems_task_restart: suspended task -- preempts caller",
end_time,
OPERATION_COUNT,
0,

View File

@@ -97,7 +97,7 @@ rtems_task test_task(
end_time = Read_timer();
put_time(
"rtems_task_set_priority current priority",
"rtems_task_set_priority: obtain current priority",
end_time,
OPERATION_COUNT,
overhead,
@@ -110,7 +110,7 @@ rtems_task test_task(
end_time = Read_timer();
put_time(
"rtems_task_set_priority no preempt",
"rtems_task_set_priority: returns to caller",
end_time,
OPERATION_COUNT,
overhead,
@@ -127,7 +127,7 @@ rtems_task test_task(
end_time = Read_timer();
put_time(
"rtems_task_mode (current)",
"rtems_task_mode: obtain current mode",
end_time,
OPERATION_COUNT,
overhead,
@@ -150,7 +150,7 @@ rtems_task test_task(
end_time = Read_timer();
put_time(
"rtems_task_mode (no reschedule)",
"rtems_task_mode: no reschedule",
end_time,
OPERATION_COUNT * 2,
overhead,
@@ -162,7 +162,7 @@ rtems_task test_task(
end_time = Read_timer();
put_time(
"rtems_task_mode (reschedule)",
"rtems_task_mode: reschedule -- returns to caller",
end_time,
1,
0,
@@ -244,7 +244,7 @@ rtems_task test_task1(
end_time = Read_timer();
put_time(
"rtems_task_mode (preemptive)",
"rtems_task_mode: reschedule -- preempts caller",
end_time,
1,
0,

View File

@@ -184,7 +184,7 @@ void queue_test()
}
put_time(
"rtems_message_queue_send (no tasks waiting)",
"rtems_message_queue_send: no waiting tasks",
send_time,
OPERATION_COUNT * OPERATION_COUNT,
send_loop_time,
@@ -192,7 +192,7 @@ void queue_test()
);
put_time(
"rtems_message_queue_urgent (no tasks waiting)",
"rtems_message_queue_urgent: no waiting tasks",
urgent_time,
OPERATION_COUNT * OPERATION_COUNT,
urgent_loop_time,
@@ -200,7 +200,7 @@ void queue_test()
);
put_time(
"rtems_message_queue_receive (messages available)",
"rtems_message_queue_receive: available",
receive_time,
OPERATION_COUNT * OPERATION_COUNT * 2,
receive_loop_time * 2,
@@ -208,7 +208,7 @@ void queue_test()
);
put_time(
"rtems_message_queue_flush (empty queue)",
"rtems_message_queue_flush: no messages flushed",
empty_flush_time,
OPERATION_COUNT,
0,
@@ -216,7 +216,7 @@ void queue_test()
);
put_time(
"rtems_message_queue_flush (messages flushed)",
"rtems_message_queue_flush: messages flushed",
flush_time,
OPERATION_COUNT,
0,

View File

@@ -105,7 +105,7 @@ void test_init()
end_time = Read_timer();
put_time(
"rtems_message_queue_receive (RTEMS_NO_WAIT)",
"rtems_message_queue_receive: not available -- NO_WAIT",
end_time,
OPERATION_COUNT,
overhead,
@@ -153,7 +153,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_message_queue_receive (blocking)",
"rtems_message_queue_receive: not available -- caller blocks",
end_time,
OPERATION_COUNT,
0,

View File

@@ -143,7 +143,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_message_queue_send (preemptive)",
"rtems_message_queue_send: task readied -- preempts caller",
end_time,
OPERATION_COUNT,
0,

View File

@@ -119,7 +119,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_message_queue_send (readying)",
"rtems_message_queue_send: task readied -- returns to caller",
end_time,
OPERATION_COUNT,
overhead,

View File

@@ -142,7 +142,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_message_queue_urgent (preemptive)",
"rtems_message_queue_urgent: task readied -- preempts caller",
end_time,
OPERATION_COUNT,
0,

View File

@@ -119,7 +119,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_message_queue_urgent (readying)",
"rtems_message_queue_urgent: task readied -- returns to caller",
end_time,
OPERATION_COUNT,
overhead,

View File

@@ -98,7 +98,7 @@ void test_init()
end_time = Read_timer();
put_time(
"rtems_event_receive (current)",
"rtems_event_receive: obtain current events",
end_time,
OPERATION_COUNT,
overhead,
@@ -119,7 +119,7 @@ void test_init()
end_time = Read_timer();
put_time(
"rtems_event_receive (RTEMS_NO_WAIT)",
"rtems_event_receive: not available -- NO_WAIT",
end_time,
OPERATION_COUNT,
overhead,
@@ -137,7 +137,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_event_receive (blocking)",
"rtems_event_receive: not available -- caller blocks",
end_time,
OPERATION_COUNT,
0,
@@ -155,7 +155,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_event_send (non-blocking)",
"rtems_event_send: no task readied",
end_time,
OPERATION_COUNT,
overhead,
@@ -172,7 +172,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_event_receive (available)",
"rtems_event_receive: available",
end_time,
1,
0,
@@ -185,7 +185,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_event_send (readying)",
"rtems_event_send: task readied -- returns to caller",
end_time,
OPERATION_COUNT,
overhead,

View File

@@ -136,7 +136,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_event_send (preemptive)",
"rtems_event_send: task readied -- preempts caller",
end_time,
OPERATION_COUNT,
0,

View File

@@ -115,7 +115,7 @@ rtems_task Last_task(
overhead = Read_timer();
put_time(
"rtems_task_set_priority (preemptive)",
"rtems_task_set_priority: preempts caller",
end_time,
OPERATION_COUNT,
overhead,

View File

@@ -100,7 +100,7 @@ rtems_task Last_task(
end_time = Read_timer();
put_time(
"rtems_task_delete self",
"rtems_task_delete: calling task",
end_time,
OPERATION_COUNT,
0,

View File

@@ -94,15 +94,13 @@ rtems_asr Process_asr_for_pass_1(
end_time = Read_timer();
put_time(
"rtems_signal_send (self)",
"rtems_signal_send: signal to self",
end_time,
1,
0,
CALLING_OVERHEAD_SIGNAL_SEND
);
puts( "SIGNAL_ENTER (non-preemptive) na" );
Timer_initialize();
}
@@ -112,8 +110,6 @@ rtems_asr Process_asr_for_pass_2(
{
rtems_status_code status;
puts( "SIGNAL_ENTER (preemptive) na" );
status = rtems_task_resume( Task_id[ 3 ] );
directive_failed( status, "rtems_task_resume" );
@@ -143,7 +139,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_signal_send (non-preemptive)",
"rtems_signal_send: returns to caller",
end_time,
1,
0,
@@ -158,7 +154,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"SIGNAL_RETURN (non-preemptive)",
"exit ASR overhead: returns to calling task",
end_time,
1,
0,
@@ -200,7 +196,7 @@ rtems_task Task_3(
end_time = Read_timer();
put_time(
"SIGNAL_RETURN (preemptive)",
"exit ASR overhead: returns to preempting task",
end_time,
1,
0,

View File

@@ -137,7 +137,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_partition_get_buffer (available)",
"rtems_partition_get_buffer: available",
end_time,
1,
0,
@@ -162,7 +162,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_partition_get_buffer (not available)",
"rtems_partition_get_buffer: not available",
end_time,
1,
0,
@@ -223,7 +223,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_region_get_segment (available)",
"rtems_region_get_segment: available",
end_time,
1,
0,
@@ -241,7 +241,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_region_get_segment (RTEMS_NO_WAIT)",
"rtems_region_get_segment: not available -- NO_WAIT",
end_time,
1,
0,
@@ -256,7 +256,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_region_return_segment (no tasks waiting)",
"rtems_region_return_segment: no waiting tasks",
end_time,
1,
0,
@@ -286,7 +286,7 @@ rtems_task Task_1(
end_time = Read_timer();
put_time(
"rtems_region_return_segment (preempt)",
"rtems_region_return_segment: task readied -- preempts caller",
end_time,
1,
0,
@@ -437,7 +437,7 @@ rtems_task Task_2(
end_time = Read_timer();
put_time(
"rtems_region_get_segment (blocking)",
"rtems_region_get_segment: not available -- caller blocks",
end_time,
1,
0,
@@ -454,7 +454,7 @@ rtems_task Task_2(
end_time = Read_timer();
put_time(
"rtems_region_return_segment (ready -- return)",
"rtems_region_return_segment: task readied -- returns to caller",
end_time,
1,
0,

View File

@@ -97,7 +97,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_message_queue_broadcast (readying)",
"rtems_message_queue_broadcast: task readied -- returns to caller",
end_time,
1,
0,
@@ -151,7 +151,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_message_queue_broadcast (no waiting tasks)",
"rtems_message_queue_broadcast: no waiting tasks",
end_time,
OPERATION_COUNT,
1,
@@ -171,7 +171,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_message_queue_broadcast (preempt)",
"rtems_message_queue_broadcast: task readied -- preempts caller",
end_time,
1,
0,

View File

@@ -122,7 +122,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_fire_after (inactive)",
"rtems_timer_fire_after: inactive",
end_time,
OPERATION_COUNT,
overhead,
@@ -135,7 +135,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_fire_after (active)",
"rtems_timer_fire_after: active",
end_time,
OPERATION_COUNT,
overhead,
@@ -148,7 +148,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_cancel (active)",
"rtems_timer_cancel: active",
end_time,
OPERATION_COUNT,
overhead,
@@ -162,7 +162,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_cancel (inactive)",
"rtems_timer_cancel: inactive",
end_time,
OPERATION_COUNT,
overhead,
@@ -176,7 +176,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_reset (inactive)",
"rtems_timer_reset: inactive",
end_time,
OPERATION_COUNT,
overhead,
@@ -189,7 +189,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_reset (active)",
"rtems_timer_reset: active",
end_time,
OPERATION_COUNT,
overhead,
@@ -213,7 +213,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_fire_when (inactive)",
"rtems_timer_fire_when: inactive",
end_time,
OPERATION_COUNT,
overhead,
@@ -227,7 +227,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_fire_when (active)",
"rtems_timer_fire_when: active",
end_time,
OPERATION_COUNT,
overhead,
@@ -240,7 +240,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_delete (active)",
"rtems_timer_delete: active",
end_time,
OPERATION_COUNT,
overhead,
@@ -265,7 +265,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_timer_delete (inactive)",
"rtems_timer_delete: inactive",
end_time,
OPERATION_COUNT,
overhead,

View File

@@ -85,7 +85,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"rtems_task_wake_after (no context switch)",
"rtems_task_wake_after: yield -- returns to caller",
end_time,
OPERATION_COUNT,
overhead,
@@ -110,7 +110,7 @@ rtems_task Tasks(
end_time = Read_timer();
put_time(
"rtems_task_wake_after (context switch)",
"rtems_task_wake_after: yields -- preempts caller",
end_time,
OPERATION_COUNT,
overhead,

View File

@@ -173,7 +173,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"INTERRUPT DISABLE",
"_ISR_Disable",
end_time,
1,
0,
@@ -185,7 +185,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"INTERRUPT FLASH",
"_ISR_Flash",
end_time,
1,
0,
@@ -197,7 +197,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"INTERRUPT ENABLE",
"_ISR_Enable",
end_time,
1,
0,
@@ -209,7 +209,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"THREAD_DISABLE_DISPATCH",
"_Thread_Disable_dispatch",
end_time,
1,
0,
@@ -221,7 +221,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"THREAD_ENABLE_DISPATCH",
"_Thread_Enable_dispatch",
end_time,
1,
0,
@@ -233,7 +233,7 @@ rtems_task High_task(
end_time = Read_timer();
put_time(
"THREAD_SET_STATE",
"_Thread_Set_state",
end_time,
1,
0,
@@ -253,7 +253,7 @@ rtems_task Middle_task(
end_time = Read_timer();
put_time(
"THREAD_DISPATCH (NO FP)",
"_Thread_Disptach (NO FP)",
end_time,
1,
0,
@@ -289,7 +289,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"CONTEXT_SWITCH (NO FP)",
"context switch: no floating point contexts",
end_time,
1,
0,
@@ -306,7 +306,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"CONTEXT_SWITCH (SELF)",
"context switch: self",
end_time,
1,
0,
@@ -318,7 +318,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"CONTEXT_SWITCH (Initialised)",
"context switch: to another task",
end_time,
1,
0,
@@ -349,7 +349,7 @@ rtems_task Floating_point_task_1(
end_time = Read_timer();
put_time(
"CONTEXT_SWITCH (restore 1st FP)",
"fp context switch: restore 1st FP task",
end_time,
1,
0,
@@ -376,7 +376,7 @@ rtems_task Floating_point_task_1(
end_time = Read_timer();
put_time(
"CONTEXT_SWITCH (used->init FP)",
"fp context switch: save idle, restore initialized",
end_time,
1,
0,
@@ -413,7 +413,7 @@ rtems_task Floating_point_task_2(
end_time = Read_timer();
put_time(
"CONTEXT_SWITCH (init->init FP)",
"fp context switch: save idle, restore idle",
end_time,
1,
0,
@@ -442,7 +442,7 @@ rtems_task Floating_point_task_2(
end_time = Read_timer();
put_time(
"CONTEXT_SWITCH (used->used FP)",
"fp context switch: save initialized, restore initialized",
end_time,
1,
0,
@@ -462,7 +462,7 @@ void complete_test( void )
end_time = Read_timer();
put_time(
"THREAD_RESUME",
"_Thread_Resume",
end_time,
1,
0,
@@ -476,7 +476,7 @@ void complete_test( void )
end_time = Read_timer();
put_time(
"THREAD_UNBLOCK",
"_Thread_Unblock",
end_time,
1,
0,
@@ -490,7 +490,7 @@ void complete_test( void )
end_time = Read_timer();
put_time(
"THREAD_READY",
"_Thread_Ready",
end_time,
1,
0,
@@ -510,7 +510,7 @@ void complete_test( void )
end_time = Read_timer();
put_time(
"THREAD_GET",
"_Thread_Get",
end_time,
OPERATION_COUNT,
0,
@@ -523,7 +523,7 @@ void complete_test( void )
end_time = Read_timer();
put_time(
"SEMAPHORE_GET",
"_Semaphore_Get",
end_time,
OPERATION_COUNT,
0,
@@ -536,7 +536,7 @@ void complete_test( void )
end_time = Read_timer();
put_time(
"THREAD_GET invalid id",
"_Thread_Get: invalid id",
end_time,
OPERATION_COUNT,
0,

View File

@@ -104,7 +104,7 @@ rtems_task Task_1(
Interrupt_return_time = Read_timer();
put_time(
"INTERRUPT_ENTER (no preempt)",
"interrupt entry overhead: returns to interrupted task",
Interrupt_enter_time,
1,
0,
@@ -112,7 +112,7 @@ rtems_task Task_1(
);
put_time(
"INTERRUPT_RETURN (no preempt)",
"interrupt exit overhead: returns to interrupted task",
Interrupt_return_time,
1,
0,
@@ -138,7 +138,7 @@ rtems_task Task_1(
Interrupt_return_time = Read_timer();
put_time(
"INTERRUPT_ENTER (nested interrupt)",
"interrupt entry overhead: returns to nested interrupt",
Interrupt_enter_nested_time,
1,
0,
@@ -146,7 +146,7 @@ rtems_task Task_1(
);
put_time(
"INTERRUPT_RETURN (nested interrupt)",
"interrupt exit overhead: returns to nested interrupt",
Interrupt_return_nested_time,
1,
0,
@@ -193,7 +193,7 @@ rtems_task Task_2(
end_time = Read_timer();
put_time(
"INTERRUPT_ENTER (preempt)",
"interrupt entry overhead: returns to preempting task",
Interrupt_enter_time,
1,
0,
@@ -201,7 +201,7 @@ rtems_task Task_2(
);
put_time(
"INTERRUPT_RETURN (preempt)",
"interrupt exit overhead: returns to preempting task",
end_time,
1,
0,

View File

@@ -57,7 +57,7 @@ rtems_task Init(
end_time = Read_timer();
put_time(
"rtems_rate_monotonic_period (initial)",
"rtems_rate_monotonic_period: initiate period -- returns to caller",
end_time,
1,
0,
@@ -69,7 +69,7 @@ rtems_task Init(
end_time = Read_timer();
put_time(
"rtems_rate_monotonic_period (STATUS)",
"rtems_rate_monotonic_period: obtain status",
end_time,
1,
0,
@@ -93,7 +93,7 @@ rtems_task Init(
end_time = Read_timer();
put_time(
"rtems_rate_monotonic_delete (cancelled)",
"rtems_rate_monotonic_delete: inactive",
end_time,
1,
0,
@@ -111,7 +111,7 @@ rtems_task Init(
end_time = Read_timer();
put_time(
"rtems_rate_monotonic_delete (active)",
"rtems_rate_monotonic_delete: active",
end_time,
1,
0,
@@ -195,7 +195,7 @@ rtems_task Low_task(
overhead = Read_timer();
put_time(
"rtems_rate_monotonic_period (blocking)",
"rtems_rate_monotonic_period: conclude periods -- caller blocks",
end_time,
OPERATION_COUNT,
overhead,