forked from Imagelibrary/rtems
Fully tested on all in-house targets
This commit is contained in:
@@ -2,16 +2,51 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
|
|
||||||
In the directory "update_tools", there are a set of tools to aid in
|
Between RTEMS 3.1.0 and 3.2.0, every RTEMS defined symbol made visible
|
||||||
making the application source changes necessary to address some
|
was renamed. This document describes the change and the tools provided
|
||||||
of the changes in the RTEMS API between release 3.1.0 and 3.2.0.
|
to assist you in updating your RTEMS 3.1.0 application.
|
||||||
|
|
||||||
The primary change addressed by these tools is the addition of
|
[NOTE: This change was not included in snapshots prior to 3.1.15.]
|
||||||
"rtems_" or "RTEMS_" as a prefix on EVERY user visible RTEMS
|
|
||||||
provided constant and routine. The primary factor in the decision
|
DESCRIPTION OF NAME CHANGES:
|
||||||
to make such a sweeping change was conflicts between the
|
============================
|
||||||
the RTEMS and POSIX API's.
|
|
||||||
|
The primary change was the addition of the prefix "rtems_" or "RTEMS_" to
|
||||||
|
EVERY user visible RTEMS provided constant and routine. The primary
|
||||||
|
factor in the decision to make such a sweeping change was conflicts
|
||||||
|
between the the RTEMS and POSIX API's.
|
||||||
|
|
||||||
|
|
||||||
|
TO UPDATE YOUR APPLICATION:
|
||||||
|
===========================
|
||||||
|
|
||||||
|
The update script requires that Perl be installed on your computer.
|
||||||
|
It has only been tested with Perl 5.x.
|
||||||
|
|
||||||
|
After RTEMS has been built, in the directory "$r/<BSP>/update_tools", will
|
||||||
|
be a set of tools to aid in making the application source changes necessary
|
||||||
|
to address (hopefully) all of the name changes in the RTEMS API between
|
||||||
|
releases 3.1.0 and 3.2.0.
|
||||||
|
|
||||||
|
The update shell script is the only executable which is invoked by the
|
||||||
|
user directly. The word-replace Perl script is invoked by the update
|
||||||
|
shell script.
|
||||||
|
|
||||||
WARNING: These tools modify the files IN PLACE!!! Backup your
|
WARNING: These tools modify the files IN PLACE!!! Backup your
|
||||||
source before using these tools.
|
source before using these tools.
|
||||||
|
|
||||||
|
To udpate your application, change directories to the top of your application
|
||||||
|
source tree and execute the update script. It should be something similar
|
||||||
|
to the following:
|
||||||
|
|
||||||
|
cd MY_APP
|
||||||
|
$r/<BSP>/update-tools/update
|
||||||
|
|
||||||
|
The update script will ask if you have backed up your source code before
|
||||||
|
beginning the update process. While operating on files, it will print
|
||||||
|
the name of each file and a dot for each change made to the source file.
|
||||||
|
|
||||||
|
NOTE: These scripts do not attempt to address changes in calling
|
||||||
|
sequences. After the script has run, you will need to update
|
||||||
|
calls to rtems_clock_get(), rtems_timer_fire_after(), and
|
||||||
|
rtems_timer_fire_when() by hand.
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#if !defined(RTEMS_UNIX)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* RTEMS "Broken" __brk/__sbrk Implementation
|
* RTEMS "Broken" __brk/__sbrk Implementation
|
||||||
*
|
*
|
||||||
@@ -12,7 +14,7 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* __brk.c,v 1.2 1995/05/09 20:24:28 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
@@ -38,3 +40,5 @@ int __brk( const void *endds )
|
|||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* __gettod.c,v 1.2 1995/05/09 20:24:31 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
@@ -19,8 +19,10 @@
|
|||||||
#ifdef RTEMS_NEWLIB
|
#ifdef RTEMS_NEWLIB
|
||||||
#include <sys/reent.h>
|
#include <sys/reent.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
@@ -29,14 +31,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int gettimeofday(
|
int gettimeofday(
|
||||||
struct timeval *tp,
|
struct timeval *tp,
|
||||||
struct timezone *tzp
|
struct timezone *tzp
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
rtems_clock_time_value time;
|
rtems_clock_time_value time;
|
||||||
|
|
||||||
if ( !tp || !tzp ) {
|
if ( !tp ) {
|
||||||
errno = EFAULT;
|
errno = EFAULT;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -51,34 +53,51 @@ int gettimeofday(
|
|||||||
tp->tv_sec = time.seconds;
|
tp->tv_sec = time.seconds;
|
||||||
tp->tv_usec = time.microseconds;
|
tp->tv_usec = time.microseconds;
|
||||||
|
|
||||||
#if 0
|
|
||||||
tzp->minuteswest = timezone / 60; /* from seconds to minutes */
|
|
||||||
tzp->dsttime = daylight;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* newlib does not have timezone and daylight savings time
|
* newlib does not have timezone and daylight savings time
|
||||||
* yet. When it does this needs to be fixed.
|
* yet. When it does this needs to be fixed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
tzp->tz_minuteswest = 0; /* at UTC */
|
if ( tzp ) {
|
||||||
tzp->tz_dsttime = 0; /* no daylight savings */
|
tzp->tz_minuteswest = 0; /* at UTC */
|
||||||
|
tzp->tz_dsttime = 0; /* no daylight savings */
|
||||||
|
#if 0
|
||||||
|
tzp->minuteswest = timezone / 60; /* from seconds to minutes */
|
||||||
|
tzp->dsttime = daylight;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
#if defined(RTEMS_NEWLIB)
|
||||||
* "Reentrant" versions of the above routines implemented above.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
/*
|
||||||
|
* "Reentrant" version
|
||||||
|
*/
|
||||||
|
|
||||||
int _gettimeofday_r(
|
int _gettimeofday_r(
|
||||||
struct _reent *ignored_reentrancy_stuff,
|
struct _reent *ignored_reentrancy_stuff,
|
||||||
struct timeval *tp,
|
struct timeval *tp,
|
||||||
struct timezone *tzp
|
struct timezone *tzp
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return gettimeofday( tp, tzp );
|
return gettimeofday( tp, tzp );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* "System call" version
|
||||||
|
*/
|
||||||
|
|
||||||
|
int _gettimeofday(
|
||||||
|
struct timeval *tp,
|
||||||
|
struct timezone *tzp
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return gettimeofday( tp, tzp );
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* defined(RTEMS_NEWLIB) */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* @(#)newlibc.c 1.8 - 95/04/25
|
* @(#)newlibc.c 1.9 - 95/05/16
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(RTEMS_NEWLIB)
|
#if defined(RTEMS_NEWLIB)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* File: $RCSfile$
|
* File: newlibc.c,v
|
||||||
* Project: PixelFlow
|
* Project: PixelFlow
|
||||||
* Created: 94/12/7
|
* Created: 94/12/7
|
||||||
* Revision: $Revision$
|
* Revision: 1.2
|
||||||
* Last Mod: $Date$
|
* Last Mod: 1995/05/09 20:24:37
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1994 by Division Incorporated
|
* COPYRIGHT (c) 1994 by Division Incorporated
|
||||||
*
|
*
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
*
|
*
|
||||||
* NOTE:
|
* NOTE:
|
||||||
*
|
*
|
||||||
* $Id$
|
* newlibc.c,v 1.2 1995/05/09 20:24:37 joel Exp
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -146,13 +146,10 @@ rtems_status_code rtems_timer_cancel(
|
|||||||
case OBJECTS_REMOTE: /* should never return this */
|
case OBJECTS_REMOTE: /* should never return this */
|
||||||
return( RTEMS_INTERNAL_ERROR );
|
return( RTEMS_INTERNAL_ERROR );
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) {
|
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
|
||||||
(void) _Watchdog_Remove( &the_timer->Ticker );
|
(void) _Watchdog_Remove( &the_timer->Ticker );
|
||||||
_Thread_Enable_dispatch();
|
|
||||||
return( RTEMS_SUCCESSFUL );
|
|
||||||
}
|
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return( RTEMS_INCORRECT_STATE );
|
return( RTEMS_SUCCESSFUL );
|
||||||
}
|
}
|
||||||
|
|
||||||
return( RTEMS_INTERNAL_ERROR ); /* unreached - only to remove warnings */
|
return( RTEMS_INTERNAL_ERROR ); /* unreached - only to remove warnings */
|
||||||
|
|||||||
@@ -146,13 +146,10 @@ rtems_status_code rtems_timer_cancel(
|
|||||||
case OBJECTS_REMOTE: /* should never return this */
|
case OBJECTS_REMOTE: /* should never return this */
|
||||||
return( RTEMS_INTERNAL_ERROR );
|
return( RTEMS_INTERNAL_ERROR );
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) {
|
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
|
||||||
(void) _Watchdog_Remove( &the_timer->Ticker );
|
(void) _Watchdog_Remove( &the_timer->Ticker );
|
||||||
_Thread_Enable_dispatch();
|
|
||||||
return( RTEMS_SUCCESSFUL );
|
|
||||||
}
|
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return( RTEMS_INCORRECT_STATE );
|
return( RTEMS_SUCCESSFUL );
|
||||||
}
|
}
|
||||||
|
|
||||||
return( RTEMS_INTERNAL_ERROR ); /* unreached - only to remove warnings */
|
return( RTEMS_INTERNAL_ERROR ); /* unreached - only to remove warnings */
|
||||||
|
|||||||
@@ -187,11 +187,11 @@ void _IO_Initialize_all_drivers( void );
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
rtems_status_code _IO_Handler_routine(
|
rtems_status_code _IO_Handler_routine(
|
||||||
IO_operations operation,
|
IO_operations operation,
|
||||||
rtems_device_major_number major,
|
rtems_device_major_number major,
|
||||||
rtems_device_minor_number minor,
|
rtems_device_minor_number minor,
|
||||||
void *argument,
|
void *argument,
|
||||||
unsigned32 *return_value
|
unsigned32 *return_value
|
||||||
);
|
);
|
||||||
|
|
||||||
#include <rtems/io.inl>
|
#include <rtems/io.inl>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ const rtems_multiprocessing_table
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const char _RTEMS_version[] =
|
const char _RTEMS_version[] =
|
||||||
"RTEMS RELEASE V3.1.15 (" CPU_NAME "/" RTEMS_MODEL_NAME ")";
|
"RTEMS RELEASE V3.1.16 (" CPU_NAME "/" RTEMS_MODEL_NAME ")";
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -187,11 +187,11 @@ void _IO_Initialize_all_drivers( void );
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
rtems_status_code _IO_Handler_routine(
|
rtems_status_code _IO_Handler_routine(
|
||||||
IO_operations operation,
|
IO_operations operation,
|
||||||
rtems_device_major_number major,
|
rtems_device_major_number major,
|
||||||
rtems_device_minor_number minor,
|
rtems_device_minor_number minor,
|
||||||
void *argument,
|
void *argument,
|
||||||
unsigned32 *return_value
|
unsigned32 *return_value
|
||||||
);
|
);
|
||||||
|
|
||||||
#include <rtems/io.inl>
|
#include <rtems/io.inl>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ const rtems_multiprocessing_table
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const char _RTEMS_version[] =
|
const char _RTEMS_version[] =
|
||||||
"RTEMS RELEASE V3.1.15 (" CPU_NAME "/" RTEMS_MODEL_NAME ")";
|
"RTEMS RELEASE V3.1.16 (" CPU_NAME "/" RTEMS_MODEL_NAME ")";
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -107,6 +107,13 @@ rtems_interrupt_level rtems_initialize_executive_early(
|
|||||||
|
|
||||||
_CPU_Initialize( cpu_table, _Thread_Dispatch );
|
_CPU_Initialize( cpu_table, _Thread_Dispatch );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Do this as early as possible to insure no debugging output
|
||||||
|
* is even attempted to be printed.
|
||||||
|
*/
|
||||||
|
|
||||||
|
_Debug_Manager_initialization();
|
||||||
|
|
||||||
multiprocessing_table = configuration_table->User_multiprocessing_table;
|
multiprocessing_table = configuration_table->User_multiprocessing_table;
|
||||||
if ( multiprocessing_table == NULL )
|
if ( multiprocessing_table == NULL )
|
||||||
multiprocessing_table =
|
multiprocessing_table =
|
||||||
|
|||||||
@@ -256,11 +256,11 @@ rtems_status_code rtems_io_control(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
rtems_status_code _IO_Handler_routine(
|
rtems_status_code _IO_Handler_routine(
|
||||||
IO_operations operation,
|
IO_operations operation,
|
||||||
rtems_device_major_number major,
|
rtems_device_major_number major,
|
||||||
rtems_device_minor_number minor,
|
rtems_device_minor_number minor,
|
||||||
void *argument,
|
void *argument,
|
||||||
unsigned32 *return_value
|
unsigned32 *return_value
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
rtems_device_driver_entry io_callout;
|
rtems_device_driver_entry io_callout;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* Division Incorporated makes no representations about the
|
* Division Incorporated makes no representations about the
|
||||||
* suitability of this software for any purpose.
|
* suitability of this software for any purpose.
|
||||||
*
|
*
|
||||||
* $Id$
|
* cpu.c,v 1.2 1995/05/09 20:11:35 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems/system.h>
|
#include <rtems/system.h>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
* Note:
|
* Note:
|
||||||
* This file is included by both C and assembler code ( -DASM )
|
* This file is included by both C and assembler code ( -DASM )
|
||||||
*
|
*
|
||||||
* $Id$
|
* cpu.h,v 1.2 1995/05/09 20:11:36 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CPU_h
|
#ifndef __CPU_h
|
||||||
@@ -30,7 +30,10 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <hppa.h> /* pick up machine definitions */
|
#include <rtems/hppa.h> /* pick up machine definitions */
|
||||||
|
#ifndef ASM
|
||||||
|
#include <rtems/hppatypes.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* conditional compilation parameters */
|
/* conditional compilation parameters */
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
*
|
*
|
||||||
* Utah $Hdr: asm.h 1.6 91/12/03$
|
* Utah $Hdr: asm.h 1.6 91/12/03$
|
||||||
*
|
*
|
||||||
* RTEMS: $Id$
|
* RTEMS: cpu_asm.h,v 1.2 1995/05/09 20:11:39 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# @(#)cpu_asm.S 1.5 - 95/04/24
|
# @(#)cpu_asm.S 1.6 - 95/05/16
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# TODO:
|
# TODO:
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
# Division Incorporated makes no representations about the
|
# Division Incorporated makes no representations about the
|
||||||
# suitability of this software for any purpose.
|
# suitability of this software for any purpose.
|
||||||
#
|
#
|
||||||
# $Id$
|
# cpu_asm.S,v 1.2 1995/05/09 20:11:37 joel Exp
|
||||||
#
|
#
|
||||||
|
|
||||||
#include <rtems/hppa.h>
|
#include <rtems/hppa.h>
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @(#)hppa.h 1.5 - 95/04/25
|
* @(#)hppa.h 1.7 - 95/05/16
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* File: $RCSfile$
|
|
||||||
* Project: PixelFlow
|
|
||||||
* Created: 94/10/4
|
|
||||||
* RespEngr: tony bennett
|
|
||||||
* Revision: $Revision$
|
|
||||||
* Last Mod: $Date$
|
|
||||||
*
|
|
||||||
* Description:
|
* Description:
|
||||||
*
|
*
|
||||||
* Definitions for HP PA Risc
|
* Definitions for HP PA Risc
|
||||||
@@ -31,7 +24,7 @@
|
|||||||
* Note:
|
* Note:
|
||||||
* This file is included by both C and assembler code ( -DASM )
|
* This file is included by both C and assembler code ( -DASM )
|
||||||
*
|
*
|
||||||
* $Id$
|
* hppa.h,v 1.2 1995/05/09 20:11:40 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _INCLUDE_HPPA_H
|
#ifndef _INCLUDE_HPPA_H
|
||||||
@@ -48,8 +41,19 @@ extern "C" {
|
|||||||
* with the name of the appropriate macro for this target CPU.
|
* with the name of the appropriate macro for this target CPU.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef hppa1_1
|
||||||
|
#undef hppa1_1
|
||||||
|
#endif
|
||||||
#define hppa1_1
|
#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
|
#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
|
#define REPLACE_THIS_WITH_THE_BSP
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -80,30 +84,6 @@ extern "C" {
|
|||||||
|
|
||||||
#define CPU_NAME "HP PA-RISC 1.1"
|
#define CPU_NAME "HP PA-RISC 1.1"
|
||||||
|
|
||||||
#ifndef ASM
|
|
||||||
/*
|
|
||||||
* 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 char signed8; /* 8-bit signed integer */
|
|
||||||
typedef short signed16; /* 16-bit signed integer */
|
|
||||||
typedef int signed32; /* 32-bit signed integer */
|
|
||||||
typedef 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 */
|
|
||||||
|
|
||||||
#endif /* !ASM */
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Processor Status Word (PSW) Masks
|
* Processor Status Word (PSW) Masks
|
||||||
@@ -229,6 +209,14 @@ typedef double double_precision; /* double precision float */
|
|||||||
|
|
||||||
#define HPPA_INTERRUPT_MAX 64
|
#define HPPA_INTERRUPT_MAX 64
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Cache characteristics
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define HPPA_CACHELINE_SIZE 32
|
||||||
|
#define HPPA_CACHELINE_MASK (HPPA_CACHELINE_SIZE - 1)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Inline macros for misc. interesting opcodes
|
* Inline macros for misc. interesting opcodes
|
||||||
*/
|
*/
|
||||||
@@ -520,102 +508,102 @@ typedef double double_precision; /* double precision float */
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Hardware Space Registers */
|
/* Hardware Space Registers */
|
||||||
#define SR0 0
|
#define HPPA_SR0 0
|
||||||
#define SR1 1
|
#define HPPA_SR1 1
|
||||||
#define SR2 2
|
#define HPPA_SR2 2
|
||||||
#define SR3 3
|
#define HPPA_SR3 3
|
||||||
#define SR4 4
|
#define HPPA_SR4 4
|
||||||
#define SR5 5
|
#define HPPA_SR5 5
|
||||||
#define SR6 6
|
#define HPPA_SR6 6
|
||||||
#define SR7 7
|
#define HPPA_SR7 7
|
||||||
|
|
||||||
/* Hardware Control Registers */
|
/* Hardware Control Registers */
|
||||||
#define CR0 0
|
#define HPPA_CR0 0
|
||||||
#define RCTR 0 /* Recovery Counter Register */
|
#define HPPA_RCTR 0 /* Recovery Counter Register */
|
||||||
|
|
||||||
#define CR8 8 /* Protection ID 1 */
|
#define HPPA_CR8 8 /* Protection ID 1 */
|
||||||
#define PIDR1 8
|
#define HPPA_PIDR1 8
|
||||||
|
|
||||||
#define CR9 9 /* Protection ID 2 */
|
#define HPPA_CR9 9 /* Protection ID 2 */
|
||||||
#define PIDR2 9
|
#define HPPA_PIDR2 9
|
||||||
|
|
||||||
#define CR10 10
|
#define HPPA_CR10 10
|
||||||
#define CCR 10 /* Coprocessor Confiquration Register */
|
#define HPPA_CCR 10 /* Coprocessor Confiquration Register */
|
||||||
|
|
||||||
#define CR11 11
|
#define HPPA_CR11 11
|
||||||
#define SAR 11 /* Shift Amount Register */
|
#define HPPA_SAR 11 /* Shift Amount Register */
|
||||||
|
|
||||||
#define CR12 12
|
#define HPPA_CR12 12
|
||||||
#define PIDR3 12 /* Protection ID 3 */
|
#define HPPA_PIDR3 12 /* Protection ID 3 */
|
||||||
|
|
||||||
#define CR13 13
|
#define HPPA_CR13 13
|
||||||
#define PIDR4 13 /* Protection ID 4 */
|
#define HPPA_PIDR4 13 /* Protection ID 4 */
|
||||||
|
|
||||||
#define CR14 14
|
#define HPPA_CR14 14
|
||||||
#define IVA 14 /* Interrupt Vector Address */
|
#define HPPA_IVA 14 /* Interrupt Vector Address */
|
||||||
|
|
||||||
#define CR15 15
|
#define HPPA_CR15 15
|
||||||
#define EIEM 15 /* External Interrupt Enable Mask */
|
#define HPPA_EIEM 15 /* External Interrupt Enable Mask */
|
||||||
|
|
||||||
#define CR16 16
|
#define HPPA_CR16 16
|
||||||
#define ITMR 16 /* Interval Timer */
|
#define HPPA_ITMR 16 /* Interval Timer */
|
||||||
|
|
||||||
#define CR17 17
|
#define HPPA_CR17 17
|
||||||
#define PCSQ 17 /* Program Counter Space queue */
|
#define HPPA_PCSQ 17 /* Program Counter Space queue */
|
||||||
|
|
||||||
#define CR18 18
|
#define HPPA_CR18 18
|
||||||
#define PCOQ 18 /* Program Counter Offset queue */
|
#define HPPA_PCOQ 18 /* Program Counter Offset queue */
|
||||||
|
|
||||||
#define CR19 19
|
#define HPPA_CR19 19
|
||||||
#define IIR 19 /* Interruption Instruction Register */
|
#define HPPA_IIR 19 /* Interruption Instruction Register */
|
||||||
|
|
||||||
#define CR20 20
|
#define HPPA_CR20 20
|
||||||
#define ISR 20 /* Interruption Space Register */
|
#define HPPA_ISR 20 /* Interruption Space Register */
|
||||||
|
|
||||||
#define CR21 21
|
#define HPPA_CR21 21
|
||||||
#define IOR 21 /* Interruption Offset Register */
|
#define HPPA_IOR 21 /* Interruption Offset Register */
|
||||||
|
|
||||||
#define CR22 22
|
#define HPPA_CR22 22
|
||||||
#define IPSW 22 /* Interrpution Processor Status Word */
|
#define HPPA_IPSW 22 /* Interrpution Processor Status Word */
|
||||||
|
|
||||||
#define CR23 23
|
#define HPPA_CR23 23
|
||||||
#define EIRR 23 /* External Interrupt Request */
|
#define HPPA_EIRR 23 /* External Interrupt Request */
|
||||||
|
|
||||||
#define CR24 24
|
#define HPPA_CR24 24
|
||||||
#define PPDA 24 /* Physcial Page Directory Address */
|
#define HPPA_PPDA 24 /* Physcial Page Directory Address */
|
||||||
#define TR0 24 /* Temporary register 0 */
|
#define HPPA_TR0 24 /* Temporary register 0 */
|
||||||
|
|
||||||
#define CR25 25
|
#define HPPA_CR25 25
|
||||||
#define HTA 25 /* Hash Table Address */
|
#define HPPA_HTA 25 /* Hash Table Address */
|
||||||
#define TR1 25 /* Temporary register 1 */
|
#define HPPA_TR1 25 /* Temporary register 1 */
|
||||||
|
|
||||||
#define CR26 26
|
#define HPPA_CR26 26
|
||||||
#define TR2 26 /* Temporary register 2 */
|
#define HPPA_TR2 26 /* Temporary register 2 */
|
||||||
|
|
||||||
#define CR27 27
|
#define HPPA_CR27 27
|
||||||
#define TR3 27 /* Temporary register 3 */
|
#define HPPA_TR3 27 /* Temporary register 3 */
|
||||||
|
|
||||||
#define CR28 28
|
#define HPPA_CR28 28
|
||||||
#define TR4 28 /* Temporary register 4 */
|
#define HPPA_TR4 28 /* Temporary register 4 */
|
||||||
|
|
||||||
#define CR29 29
|
#define HPPA_CR29 29
|
||||||
#define TR5 29 /* Temporary register 5 */
|
#define HPPA_TR5 29 /* Temporary register 5 */
|
||||||
|
|
||||||
#define CR30 30
|
#define HPPA_CR30 30
|
||||||
#define TR6 30 /* Temporary register 6 */
|
#define HPPA_TR6 30 /* Temporary register 6 */
|
||||||
|
|
||||||
#define CR31 31
|
#define HPPA_CR31 31
|
||||||
#define CPUID 31 /* MP identifier */
|
#define HPPA_CPUID 31 /* MP identifier */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Diagnose registers
|
* Diagnose registers
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DR0 0
|
#define HPPA_DR0 0
|
||||||
#define DR1 1
|
#define HPPA_DR1 1
|
||||||
#define DR8 8
|
#define HPPA_DR8 8
|
||||||
#define DR24 24
|
#define HPPA_DR24 24
|
||||||
#define DR25 25
|
#define HPPA_DR25 25
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Tear apart a break instruction to find its type.
|
* Tear apart a break instruction to find its type.
|
||||||
@@ -653,32 +641,32 @@ set_ ## name (unsigned int new_value) \
|
|||||||
EMIT_GET_CONTROL(name, reg) \
|
EMIT_GET_CONTROL(name, reg) \
|
||||||
EMIT_SET_CONTROL(name, reg)
|
EMIT_SET_CONTROL(name, reg)
|
||||||
|
|
||||||
EMIT_CONTROLS(recovery, RCTR); /* CR0 */
|
EMIT_CONTROLS(recovery, HPPA_RCTR); /* CR0 */
|
||||||
EMIT_CONTROLS(pid1, PIDR1); /* CR8 */
|
EMIT_CONTROLS(pid1, HPPA_PIDR1); /* CR8 */
|
||||||
EMIT_CONTROLS(pid2, PIDR2); /* CR9 */
|
EMIT_CONTROLS(pid2, HPPA_PIDR2); /* CR9 */
|
||||||
EMIT_CONTROLS(ccr, CCR); /* CR10; CCR and SCR share CR10 */
|
EMIT_CONTROLS(ccr, HPPA_CCR); /* CR10; CCR and SCR share CR10 */
|
||||||
EMIT_CONTROLS(scr, CCR); /* CR10; CCR and SCR share CR10 */
|
EMIT_CONTROLS(scr, HPPA_CCR); /* CR10; CCR and SCR share CR10 */
|
||||||
EMIT_CONTROLS(sar, SAR); /* CR11 */
|
EMIT_CONTROLS(sar, HPPA_SAR); /* CR11 */
|
||||||
EMIT_CONTROLS(pid3, PIDR3); /* CR12 */
|
EMIT_CONTROLS(pid3, HPPA_PIDR3); /* CR12 */
|
||||||
EMIT_CONTROLS(pid4, PIDR4); /* CR13 */
|
EMIT_CONTROLS(pid4, HPPA_PIDR4); /* CR13 */
|
||||||
EMIT_CONTROLS(iva, IVA); /* CR14 */
|
EMIT_CONTROLS(iva, HPPA_IVA); /* CR14 */
|
||||||
EMIT_CONTROLS(eiem, EIEM); /* CR15 */
|
EMIT_CONTROLS(eiem, HPPA_EIEM); /* CR15 */
|
||||||
EMIT_CONTROLS(itimer, ITMR); /* CR16 */
|
EMIT_CONTROLS(itimer, HPPA_ITMR); /* CR16 */
|
||||||
EMIT_CONTROLS(pcsq, PCSQ); /* CR17 */
|
EMIT_CONTROLS(pcsq, HPPA_PCSQ); /* CR17 */
|
||||||
EMIT_CONTROLS(pcoq, PCOQ); /* CR18 */
|
EMIT_CONTROLS(pcoq, HPPA_PCOQ); /* CR18 */
|
||||||
EMIT_CONTROLS(iir, IIR); /* CR19 */
|
EMIT_CONTROLS(iir, HPPA_IIR); /* CR19 */
|
||||||
EMIT_CONTROLS(isr, ISR); /* CR20 */
|
EMIT_CONTROLS(isr, HPPA_ISR); /* CR20 */
|
||||||
EMIT_CONTROLS(ior, IOR); /* CR21 */
|
EMIT_CONTROLS(ior, HPPA_IOR); /* CR21 */
|
||||||
EMIT_CONTROLS(ipsw, IPSW); /* CR22 */
|
EMIT_CONTROLS(ipsw, HPPA_IPSW); /* CR22 */
|
||||||
EMIT_CONTROLS(eirr, EIRR); /* CR23 */
|
EMIT_CONTROLS(eirr, HPPA_EIRR); /* CR23 */
|
||||||
EMIT_CONTROLS(tr0, TR0); /* CR24 */
|
EMIT_CONTROLS(tr0, HPPA_TR0); /* CR24 */
|
||||||
EMIT_CONTROLS(tr1, TR1); /* CR25 */
|
EMIT_CONTROLS(tr1, HPPA_TR1); /* CR25 */
|
||||||
EMIT_CONTROLS(tr2, TR2); /* CR26 */
|
EMIT_CONTROLS(tr2, HPPA_TR2); /* CR26 */
|
||||||
EMIT_CONTROLS(tr3, TR3); /* CR27 */
|
EMIT_CONTROLS(tr3, HPPA_TR3); /* CR27 */
|
||||||
EMIT_CONTROLS(tr4, TR4); /* CR28 */
|
EMIT_CONTROLS(tr4, HPPA_TR4); /* CR28 */
|
||||||
EMIT_CONTROLS(tr5, TR5); /* CR29 */
|
EMIT_CONTROLS(tr5, HPPA_TR5); /* CR29 */
|
||||||
EMIT_CONTROLS(tr6, TR6); /* CR30 */
|
EMIT_CONTROLS(tr6, HPPA_TR6); /* CR30 */
|
||||||
EMIT_CONTROLS(tr7, CR31); /* CR31 */
|
EMIT_CONTROLS(tr7, HPPA_CR31); /* CR31 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If and How to invoke the debugger (a ROM debugger generally)
|
* If and How to invoke the debugger (a ROM debugger generally)
|
||||||
|
|||||||
@@ -11,10 +11,10 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* rtems.S,v 1.2 1995/05/09 20:11:41 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <hppa.h>
|
#include <rtems/hppa.h>
|
||||||
#include <rtems/cpu_asm.h>
|
#include <rtems/cpu_asm.h>
|
||||||
|
|
||||||
.SPACE $PRIVATE$
|
.SPACE $PRIVATE$
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define ASM
|
#define ASM
|
||||||
#include <i386.h>
|
#include <rtems/i386.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recent versions of GNU cpp define variables which indicate the
|
* Recent versions of GNU cpp define variables which indicate the
|
||||||
|
|||||||
@@ -21,7 +21,10 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <i386.h>
|
#ifndef ASM
|
||||||
|
#include <rtems/i386types.h>
|
||||||
|
#endif
|
||||||
|
#include <rtems/i386.h>
|
||||||
|
|
||||||
/* conditional compilation parameters */
|
/* conditional compilation parameters */
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,19 @@ extern "C" {
|
|||||||
* with the name of the appropriate macro for this target CPU.
|
* with the name of the appropriate macro for this target CPU.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef i386
|
||||||
|
#undef i386
|
||||||
|
#endif
|
||||||
#define i386
|
#define i386
|
||||||
|
|
||||||
|
#ifdef REPLACE_THIS_WITH_THE_CPU_MODEL
|
||||||
|
#undef REPLACE_THIS_WITH_THE_CPU_MODEL
|
||||||
|
#endif
|
||||||
#define REPLACE_THIS_WITH_THE_CPU_MODEL
|
#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
|
#define REPLACE_THIS_WITH_THE_BSP
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -91,38 +102,17 @@ extern "C" {
|
|||||||
|
|
||||||
#ifndef ASM
|
#ifndef ASM
|
||||||
|
|
||||||
/*
|
|
||||||
* 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 unsigned char signed8; /* 8-bit signed integer */
|
|
||||||
typedef unsigned short signed16; /* 16-bit signed integer */
|
|
||||||
typedef unsigned int signed32; /* 32-bit signed integer */
|
|
||||||
typedef 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 */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Structure which makes it easier to deal with LxDT and SxDT instructions.
|
* Structure which makes it easier to deal with LxDT and SxDT instructions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned short limit;
|
unsigned short limit;
|
||||||
unsigned short physical_address[ 2 ];
|
unsigned short physical_address[ 2 ];
|
||||||
} i386_DTR_load_save_format;
|
} i386_DTR_load_save_format;
|
||||||
|
|
||||||
/* See Chapter 5 - Memory Management in i386 manual */
|
/* See Chapter 5 - Memory Management in i386 manual */
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned short limit_0_15;
|
unsigned short limit_0_15;
|
||||||
unsigned short base_0_15;
|
unsigned short base_0_15;
|
||||||
@@ -131,12 +121,12 @@ typedef struct {
|
|||||||
unsigned char limit_16_19_granularity;
|
unsigned char limit_16_19_granularity;
|
||||||
unsigned char base_24_31;
|
unsigned char base_24_31;
|
||||||
} i386_GDT_slot;
|
} i386_GDT_slot;
|
||||||
|
|
||||||
/* See Chapter 9 - Exceptions and Interrupts in i386 manual
|
/* See Chapter 9 - Exceptions and Interrupts in i386 manual
|
||||||
*
|
*
|
||||||
* NOTE: This is the IDT entry for interrupt gates ONLY.
|
* NOTE: This is the IDT entry for interrupt gates ONLY.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned short offset_0_15;
|
unsigned short offset_0_15;
|
||||||
unsigned short segment_selector;
|
unsigned short segment_selector;
|
||||||
@@ -145,7 +135,9 @@ typedef struct {
|
|||||||
unsigned short offset_16_31;
|
unsigned short offset_16_31;
|
||||||
} i386_IDT_slot;
|
} i386_IDT_slot;
|
||||||
|
|
||||||
typedef void ( *i386_isr )( void );
|
/*
|
||||||
|
* Interrupt Level Macros
|
||||||
|
*/
|
||||||
|
|
||||||
#define i386_disable_interrupts( _level ) \
|
#define i386_disable_interrupts( _level ) \
|
||||||
{ \
|
{ \
|
||||||
@@ -186,7 +178,6 @@ static inline unsigned int i386_swap_U32(
|
|||||||
asm volatile( "rorw $8,%%ax;"
|
asm volatile( "rorw $8,%%ax;"
|
||||||
"rorl $16,%0;"
|
"rorl $16,%0;"
|
||||||
"rorw $8,%%ax" : "=a" (value) : "0" (value) );
|
"rorw $8,%%ax" : "=a" (value) : "0" (value) );
|
||||||
|
|
||||||
return( value );
|
return( value );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define ASM
|
#define ASM
|
||||||
#include <i960.h>
|
#include <rtems/i960.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recent versions of GNU cpp define variables which indicate the
|
* Recent versions of GNU cpp define variables which indicate the
|
||||||
|
|||||||
@@ -23,7 +23,10 @@ extern "C" {
|
|||||||
|
|
||||||
#pragma align 4 /* for GNU C structure alignment */
|
#pragma align 4 /* for GNU C structure alignment */
|
||||||
|
|
||||||
#include <i960.h>
|
#include <rtems/i960.h>
|
||||||
|
#ifndef ASM
|
||||||
|
#include <rtems/i960types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CPU_INLINE_ENABLE_DISPATCH FALSE
|
#define CPU_INLINE_ENABLE_DISPATCH FALSE
|
||||||
#define CPU_UNROLL_ENQUEUE_PRIORITY FALSE
|
#define CPU_UNROLL_ENQUEUE_PRIORITY FALSE
|
||||||
|
|||||||
@@ -28,8 +28,19 @@ extern "C" {
|
|||||||
* with the name of the appropriate macro for this target CPU.
|
* with the name of the appropriate macro for this target CPU.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef i960
|
||||||
|
#undef i960
|
||||||
|
#endif
|
||||||
#define i960
|
#define i960
|
||||||
|
|
||||||
|
#ifdef REPLACE_THIS_WITH_THE_CPU_MODEL
|
||||||
|
#undef REPLACE_THIS_WITH_THE_CPU_MODEL
|
||||||
|
#endif
|
||||||
#define REPLACE_THIS_WITH_THE_CPU_MODEL
|
#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
|
#define REPLACE_THIS_WITH_THE_BSP
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -62,38 +73,17 @@ extern "C" {
|
|||||||
|
|
||||||
#ifndef ASM
|
#ifndef ASM
|
||||||
|
|
||||||
/*
|
|
||||||
* 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 unsigned32 Priority_Bit_map_control;
|
|
||||||
|
|
||||||
typedef char signed8; /* 8-bit signed integer */
|
|
||||||
typedef short signed16; /* 16-bit signed integer */
|
|
||||||
typedef int signed32; /* 32-bit signed integer */
|
|
||||||
typedef 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 */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX should have an ifdef here and have stuff for the other
|
* XXX should have an ifdef here and have stuff for the other
|
||||||
* XXX family members...
|
* XXX family members...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__i960CA__) || defined(__i960_CA__) || defined(__i960CA)
|
#if defined(__i960CA__) || defined(__i960_CA__) || defined(__i960CA)
|
||||||
|
|
||||||
/* i960CA control structures */
|
/* i960CA control structures */
|
||||||
|
|
||||||
/* Intel i960CA Control Table */
|
/* Intel i960CA Control Table */
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* Control Group 0 */
|
/* Control Group 0 */
|
||||||
unsigned int ipb0; /* IP breakpoint 0 */
|
unsigned int ipb0; /* IP breakpoint 0 */
|
||||||
@@ -131,9 +121,9 @@ typedef struct {
|
|||||||
unsigned int bcon; /* bus configuration control */
|
unsigned int bcon; /* bus configuration control */
|
||||||
unsigned int reserved; /* reserved */
|
unsigned int reserved; /* reserved */
|
||||||
} i960ca_control_table;
|
} i960ca_control_table;
|
||||||
|
|
||||||
/* Intel i960CA Processor Control Block */
|
/* Intel i960CA Processor Control Block */
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned int *fault_tbl; /* fault table base address */
|
unsigned int *fault_tbl; /* fault table base address */
|
||||||
i960ca_control_table
|
i960ca_control_table
|
||||||
@@ -149,10 +139,12 @@ typedef struct {
|
|||||||
configuration word */
|
configuration word */
|
||||||
unsigned int reg_cache_cfg; /* register cache configuration word */
|
unsigned int reg_cache_cfg; /* register cache configuration word */
|
||||||
} i960ca_PRCB;
|
} i960ca_PRCB;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef void ( *i960_isr )( void );
|
/*
|
||||||
|
* Interrupt Level Routines
|
||||||
|
*/
|
||||||
|
|
||||||
#define i960_disable_interrupts( oldlevel ) \
|
#define i960_disable_interrupts( oldlevel ) \
|
||||||
{ (oldlevel) = 0x1f0000; \
|
{ (oldlevel) = 0x1f0000; \
|
||||||
@@ -191,22 +183,22 @@ typedef void ( *i960_isr )( void );
|
|||||||
i960_atomic_modify( _mask, _address, _previous )
|
i960_atomic_modify( _mask, _address, _previous )
|
||||||
|
|
||||||
#define i960_enable_tracing() \
|
#define i960_enable_tracing() \
|
||||||
{ register unsigned32 _pc = 0x1; \
|
{ register unsigned int _pc = 0x1; \
|
||||||
asm volatile( "modpc 0,%0,%0" : "=d" (_pc) : "0" (_pc) ); \
|
asm volatile( "modpc 0,%0,%0" : "=d" (_pc) : "0" (_pc) ); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define i960_unmask_intr( xint ) \
|
#define i960_unmask_intr( xint ) \
|
||||||
{ register unsigned32 _mask= (1<<(xint)); \
|
{ register unsigned int _mask= (1<<(xint)); \
|
||||||
asm volatile( "or sf1,%0,sf1" : "=d" (_mask) : "0" (_mask) ); \
|
asm volatile( "or sf1,%0,sf1" : "=d" (_mask) : "0" (_mask) ); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define i960_mask_intr( xint ) \
|
#define i960_mask_intr( xint ) \
|
||||||
{ register unsigned32 _mask= (1<<(xint)); \
|
{ register unsigned int _mask= (1<<(xint)); \
|
||||||
asm volatile( "andnot %0,sf1,sf1" : "=d" (_mask) : "0" (_mask) ); \
|
asm volatile( "andnot %0,sf1,sf1" : "=d" (_mask) : "0" (_mask) ); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define i960_clear_intr( xint ) \
|
#define i960_clear_intr( xint ) \
|
||||||
{ register unsigned32 _xint=(xint); \
|
{ register unsigned int _xint=(xint); \
|
||||||
asm volatile( "loop_til_cleared:
|
asm volatile( "loop_til_cleared:
|
||||||
clrbit %0,sf0,sf0 ; \
|
clrbit %0,sf0,sf0 ; \
|
||||||
bbs %0,sf0,loop_til_cleared" \
|
bbs %0,sf0,loop_til_cleared" \
|
||||||
@@ -225,8 +217,8 @@ typedef void ( *i960_isr )( void );
|
|||||||
|
|
||||||
#define i960_soft_reset( prcb ) \
|
#define i960_soft_reset( prcb ) \
|
||||||
{ register i960ca_PRCB *_prcb = (prcb); \
|
{ register i960ca_PRCB *_prcb = (prcb); \
|
||||||
register unsigned32 *_next=0; \
|
register unsigned int *_next=0; \
|
||||||
register unsigned32 _cmd = 0x30000; \
|
register unsigned int _cmd = 0x30000; \
|
||||||
asm volatile( "lda next,%1; \
|
asm volatile( "lda next,%1; \
|
||||||
sysctl %0,%1,%2; \
|
sysctl %0,%1,%2; \
|
||||||
next: mov g0,g0" \
|
next: mov g0,g0" \
|
||||||
@@ -234,20 +226,20 @@ typedef void ( *i960_isr )( void );
|
|||||||
: "0" (_cmd), "1" (_next), "2" (_prcb) ); \
|
: "0" (_cmd), "1" (_next), "2" (_prcb) ); \
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned32 i960_pend_intrs()
|
static inline unsigned int i960_pend_intrs()
|
||||||
{ register unsigned32 _intr=0;
|
{ register unsigned int _intr=0;
|
||||||
asm volatile( "mov sf0,%0" : "=d" (_intr) : "0" (_intr) );
|
asm volatile( "mov sf0,%0" : "=d" (_intr) : "0" (_intr) );
|
||||||
return ( _intr );
|
return ( _intr );
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned32 i960_mask_intrs()
|
static inline unsigned int i960_mask_intrs()
|
||||||
{ register unsigned32 _intr=0;
|
{ register unsigned int _intr=0;
|
||||||
asm volatile( "mov sf1,%0" : "=d" (_intr) : "0" (_intr) );
|
asm volatile( "mov sf1,%0" : "=d" (_intr) : "0" (_intr) );
|
||||||
return( _intr );
|
return( _intr );
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned32 i960_get_fp()
|
static inline unsigned int i960_get_fp()
|
||||||
{ register unsigned32 _fp=0;
|
{ register unsigned int _fp=0;
|
||||||
asm volatile( "mov fp,%0" : "=d" (_fp) : "0" (_fp) );
|
asm volatile( "mov fp,%0" : "=d" (_fp) : "0" (_fp) );
|
||||||
return ( _fp );
|
return ( _fp );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define ASM
|
#define ASM
|
||||||
#include <m68k.h>
|
#include <rtems/m68k.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recent versions of GNU cpp define variables which indicate the
|
* Recent versions of GNU cpp define variables which indicate the
|
||||||
|
|||||||
@@ -30,7 +30,10 @@ extern "C" {
|
|||||||
|
|
||||||
#define NO_UNINITIALIZED_WARNINGS
|
#define NO_UNINITIALIZED_WARNINGS
|
||||||
|
|
||||||
#include <m68k.h>
|
#include <rtems/m68k.h>
|
||||||
|
#ifndef ASM
|
||||||
|
#include <rtems/m68ktypes.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* conditional compilation parameters */
|
/* conditional compilation parameters */
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,19 @@ extern "C" {
|
|||||||
* with the name of the appropriate macro for this target CPU.
|
* with the name of the appropriate macro for this target CPU.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef m68k
|
||||||
|
#undef m68k
|
||||||
|
#endif
|
||||||
#define m68k
|
#define m68k
|
||||||
|
|
||||||
|
#ifdef REPLACE_THIS_WITH_THE_CPU_MODEL
|
||||||
|
#undef REPLACE_THIS_WITH_THE_CPU_MODEL
|
||||||
|
#endif
|
||||||
#define REPLACE_THIS_WITH_THE_CPU_MODEL
|
#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
|
#define REPLACE_THIS_WITH_THE_BSP
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -151,33 +162,6 @@ extern "C" {
|
|||||||
|
|
||||||
#ifndef ASM
|
#ifndef ASM
|
||||||
|
|
||||||
/*
|
|
||||||
* 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 char signed8; /* signed 8-bit integer */
|
|
||||||
typedef short signed16; /* signed 16-bit integer */
|
|
||||||
typedef int signed32; /* signed 32-bit integer */
|
|
||||||
typedef long long signed64; /* signed 64-bit integer */
|
|
||||||
|
|
||||||
typedef unsigned32 boolean; /* Boolean value */
|
|
||||||
|
|
||||||
typedef float single_precision; /* single precision float */
|
|
||||||
typedef double double_precision; /* double precision float */
|
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef void ( *m68k_isr )( void );
|
|
||||||
|
|
||||||
#ifdef NO_UNINITIALIZED_WARNINGS
|
#ifdef NO_UNINITIALIZED_WARNINGS
|
||||||
#define m68k_disable_interrupts( _level ) \
|
#define m68k_disable_interrupts( _level ) \
|
||||||
{ \
|
{ \
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define ASM
|
#define ASM
|
||||||
#include <no_cpu.h>
|
#include <rtems/no_cpu.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recent versions of GNU cpp define variables which indicate the
|
* Recent versions of GNU cpp define variables which indicate the
|
||||||
|
|||||||
@@ -21,7 +21,10 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <no_cpu.h> /* pick up machine definitions */
|
#include <rtems/no_cpu.h> /* pick up machine definitions */
|
||||||
|
#ifndef ASM
|
||||||
|
#include <rtems/no_cputypes.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* conditional compilation parameters */
|
/* conditional compilation parameters */
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
/*
|
/* no_cpu.h
|
||||||
|
*
|
||||||
|
* This file is an example (i.e. "no CPU") of the file which is
|
||||||
|
* created for each CPU family port of RTEMS.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||||
@@ -26,9 +29,21 @@ extern "C" {
|
|||||||
* with the name of the appropriate macro for this target CPU.
|
* with the name of the appropriate macro for this target CPU.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef no_cpu
|
||||||
|
#undef no_cpu
|
||||||
|
#endif
|
||||||
#define no_cpu
|
#define no_cpu
|
||||||
|
|
||||||
|
#ifdef REPLACE_THIS_WITH_THE_CPU_MODEL
|
||||||
|
#undef REPLACE_THIS_WITH_THE_CPU_MODEL
|
||||||
|
#endif
|
||||||
#define REPLACE_THIS_WITH_THE_CPU_MODEL
|
#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
|
* This file contains the information required to build
|
||||||
* RTEMS for a particular member of the "no cpu"
|
* RTEMS for a particular member of the "no cpu"
|
||||||
@@ -55,29 +70,6 @@ extern "C" {
|
|||||||
|
|
||||||
#define CPU_NAME "NO CPU"
|
#define CPU_NAME "NO CPU"
|
||||||
|
|
||||||
/*
|
|
||||||
* 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 char signed8; /* 8-bit signed integer */
|
|
||||||
typedef short signed16; /* 16-bit signed integer */
|
|
||||||
typedef int signed32; /* 32-bit signed integer */
|
|
||||||
typedef 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 ( *no_cpu_isr_entry )( void );
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
@@ -225,18 +224,28 @@ void _CPU_Context_Initialize(
|
|||||||
unsigned32 *_stack_base,
|
unsigned32 *_stack_base,
|
||||||
unsigned32 _size,
|
unsigned32 _size,
|
||||||
unsigned32 _new_level,
|
unsigned32 _new_level,
|
||||||
proc_ptr *_entry_point
|
void *_entry_point
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
unsigned32 *addr;
|
unsigned32 *addr;
|
||||||
unsigned32 jmp_addr;
|
unsigned32 jmp_addr;
|
||||||
unsigned32 _stack;
|
unsigned32 _stack_low; /* lowest "stack aligned" address */
|
||||||
|
unsigned32 _stack_high; /* highest "stack aligned" address */
|
||||||
unsigned32 _the_size;
|
unsigned32 _the_size;
|
||||||
|
|
||||||
jmp_addr = (unsigned32) _entry_point;
|
jmp_addr = (unsigned32) _entry_point;
|
||||||
|
|
||||||
_stack = ((unsigned32)(_stack_base) + CPU_STACK_ALIGNMENT);
|
/*
|
||||||
_stack &= ~(CPU_STACK_ALIGNMENT - 1);
|
* On CPUs with stacks which grow down, we build the stack
|
||||||
|
* based on the _stack_high address. On CPUs with stacks which
|
||||||
|
* grow up, we build the stack based on the _stack_low address.
|
||||||
|
*/
|
||||||
|
|
||||||
|
_stack_low = ((unsigned32)(_stack_base) + CPU_STACK_ALIGNMENT);
|
||||||
|
_stack_low &= ~(CPU_STACK_ALIGNMENT - 1);
|
||||||
|
|
||||||
|
_stack_high = ((unsigned32)(_stack_base) + _size);
|
||||||
|
_stack_high &= ~(CPU_STACK_ALIGNMENT - 1);
|
||||||
|
|
||||||
_the_size = _size & ~(CPU_STACK_ALIGNMENT - 1);
|
_the_size = _size & ~(CPU_STACK_ALIGNMENT - 1);
|
||||||
|
|
||||||
@@ -250,7 +259,7 @@ void _CPU_Context_Initialize(
|
|||||||
|
|
||||||
#if defined(hppa1_1)
|
#if defined(hppa1_1)
|
||||||
*(addr + RP_OFF) = jmp_addr;
|
*(addr + RP_OFF) = jmp_addr;
|
||||||
*(addr + SP_OFF) = (unsigned32)(_stack + CPU_FRAME_SIZE);
|
*(addr + SP_OFF) = (unsigned32)(_stack_low + CPU_FRAME_SIZE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See if we are using shared libraries by checking
|
* See if we are using shared libraries by checking
|
||||||
@@ -274,8 +283,8 @@ void _CPU_Context_Initialize(
|
|||||||
asm ("ta 0x03"); /* flush registers */
|
asm ("ta 0x03"); /* flush registers */
|
||||||
|
|
||||||
*(addr + RP_OFF) = jmp_addr + ADDR_ADJ_OFFSET;
|
*(addr + RP_OFF) = jmp_addr + ADDR_ADJ_OFFSET;
|
||||||
*(addr + SP_OFF) = (unsigned32)(_stack +_the_size - CPU_FRAME_SIZE);
|
*(addr + SP_OFF) = (unsigned32)(_stack_high - CPU_FRAME_SIZE);
|
||||||
*(addr + FP_OFF) = (unsigned32)(_stack +_the_size);
|
*(addr + FP_OFF) = (unsigned32)(_stack_high);
|
||||||
#else
|
#else
|
||||||
#error "UNKNOWN CPU!!!"
|
#error "UNKNOWN CPU!!!"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -27,8 +27,10 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include <string.h>
|
#include <rtems/unix.h>
|
||||||
#include <unix.h>
|
#ifndef ASM
|
||||||
|
#include <rtems/unixtypes.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* conditional compilation parameters */
|
/* conditional compilation parameters */
|
||||||
|
|
||||||
@@ -676,7 +678,7 @@ extern void _CPU_Context_Initialize(
|
|||||||
unsigned32 *_stack_base,
|
unsigned32 *_stack_base,
|
||||||
unsigned32 _size,
|
unsigned32 _size,
|
||||||
unsigned32 _new_level,
|
unsigned32 _new_level,
|
||||||
proc_ptr *_entry_point
|
void *_entry_point
|
||||||
);
|
);
|
||||||
|
|
||||||
/* end of Context handler macros */
|
/* end of Context handler macros */
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* unix.h
|
/* unix.h
|
||||||
*
|
*
|
||||||
* This include file contains the basic type definitions required by RTEMS
|
* This include file contains the definitions required by RTEMS
|
||||||
* which are typical for a modern UNIX computer using GCC.
|
* which are typical for a modern UNIX computer using GCC.
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* unix.h,v 1.2 1995/05/09 20:12:28 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __UNIX_h
|
#ifndef __UNIX_h
|
||||||
@@ -28,12 +28,31 @@ extern "C" {
|
|||||||
* with the name of the appropriate macro for this target CPU.
|
* with the name of the appropriate macro for this target CPU.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef unix
|
||||||
|
#undef unix
|
||||||
|
#endif
|
||||||
#define unix
|
#define unix
|
||||||
|
|
||||||
|
#ifdef REPLACE_THIS_WITH_THE_CPU_FAMILY
|
||||||
|
#undef REPLACE_THIS_WITH_THE_CPU_FAMILY
|
||||||
|
#endif
|
||||||
#define REPLACE_THIS_WITH_THE_CPU_FAMILY
|
#define REPLACE_THIS_WITH_THE_CPU_FAMILY
|
||||||
|
|
||||||
|
#ifdef REPLACE_THIS_WITH_THE_BSP
|
||||||
|
#undef REPLACE_THIS_WITH_THE_BSP
|
||||||
|
#endif
|
||||||
#define REPLACE_THIS_WITH_THE_BSP
|
#define REPLACE_THIS_WITH_THE_BSP
|
||||||
|
|
||||||
|
#ifdef REPLACE_THIS_WITH_THE_CPU_MODEL
|
||||||
|
#undef REPLACE_THIS_WITH_THE_CPU_MODEL
|
||||||
|
#endif
|
||||||
#define REPLACE_THIS_WITH_THE_CPU_MODEL
|
#define REPLACE_THIS_WITH_THE_CPU_MODEL
|
||||||
|
|
||||||
|
#ifdef REPLACE_THIS_WITH_THE_UNIX_FLAVOR
|
||||||
|
#undef REPLACE_THIS_WITH_THE_UNIX_FLAVOR
|
||||||
|
#endif
|
||||||
#define REPLACE_THIS_WITH_THE_UNIX_FLAVOR
|
#define REPLACE_THIS_WITH_THE_UNIX_FLAVOR
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file contains the information required to build
|
* This file contains the information required to build
|
||||||
* RTEMS for a particular member of the "unix"
|
* RTEMS for a particular member of the "unix"
|
||||||
@@ -57,34 +76,10 @@ extern "C" {
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ASM
|
|
||||||
|
|
||||||
/* type definitions */
|
|
||||||
|
|
||||||
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 char signed8; /* 8-bit signed integer */
|
|
||||||
typedef short signed16; /* 16-bit signed integer */
|
|
||||||
typedef int signed32; /* 32-bit signed integer */
|
|
||||||
typedef 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 ( *unix_isr_entry )( void );
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* !ASM */
|
|
||||||
#endif
|
#endif
|
||||||
/* end of include file */
|
/* end of include file */
|
||||||
|
|
||||||
|
|||||||
@@ -100,17 +100,12 @@ typedef struct {
|
|||||||
} Watchdog_Control;
|
} Watchdog_Control;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following type is used for synchronization purposes
|
* The following are used for synchronization purposes
|
||||||
* during an insert on a watchdog delta chain.
|
* during an insert on a watchdog delta chain.
|
||||||
*
|
|
||||||
* NOTE: Watchdog_Pointer is only used to insure that
|
|
||||||
* Watchdog_Synchronization_pointer is a pointer
|
|
||||||
* which is volatile rather than a pointer to a
|
|
||||||
* volatile block of memory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef Watchdog_Control *Watchdog_Pointer;
|
volatile unsigned32 _Watchdog_Sync_level;
|
||||||
typedef volatile Watchdog_Pointer Watchdog_Synchronization_pointer;
|
volatile unsigned32 _Watchdog_Sync_count;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following defines the watchdog chains which are managed
|
* The following defines the watchdog chains which are managed
|
||||||
@@ -120,14 +115,6 @@ typedef volatile Watchdog_Pointer Watchdog_Synchronization_pointer;
|
|||||||
EXTERN Chain_Control _Watchdog_Ticks_chain;
|
EXTERN Chain_Control _Watchdog_Ticks_chain;
|
||||||
EXTERN Chain_Control _Watchdog_Seconds_chain;
|
EXTERN Chain_Control _Watchdog_Seconds_chain;
|
||||||
|
|
||||||
/*
|
|
||||||
* The following defines the synchronization variable used to
|
|
||||||
* allow interrupts to be enabled while inserting a watchdog
|
|
||||||
* on a watchdog chain.
|
|
||||||
*/
|
|
||||||
|
|
||||||
EXTERN Watchdog_Synchronization_pointer _Watchdog_Sync;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _Watchdog_Handler_initialization
|
* _Watchdog_Handler_initialization
|
||||||
*
|
*
|
||||||
@@ -375,46 +362,6 @@ STATIC INLINE Watchdog_Control *_Watchdog_Last(
|
|||||||
Chain_Control *header
|
Chain_Control *header
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
* _Watchdog_Get_sync
|
|
||||||
*
|
|
||||||
* DESCRIPTION:
|
|
||||||
*
|
|
||||||
* This routine returns the current synchronization timer. This
|
|
||||||
* routine is used so that interrupts can be enabled while a
|
|
||||||
* watchdog timer is being inserted into a watchdog chain.
|
|
||||||
*/
|
|
||||||
|
|
||||||
STATIC INLINE Watchdog_Control *_Watchdog_Get_sync( void );
|
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
* _Watchdog_Set_sync
|
|
||||||
*
|
|
||||||
* DESCRIPTION:
|
|
||||||
*
|
|
||||||
* This routine sets the current synchronization timer. This
|
|
||||||
* routine is used so that interrupts can be enabled while a
|
|
||||||
* watchdog timer is being inserted into a watchdog chain.
|
|
||||||
*/
|
|
||||||
|
|
||||||
STATIC INLINE void _Watchdog_Set_sync(
|
|
||||||
Watchdog_Control *the_watchdog
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
* _Watchdog_Clear_sync
|
|
||||||
*
|
|
||||||
* DESCRIPTION:
|
|
||||||
*
|
|
||||||
* This routine will set the watchdog synchronization flag to a
|
|
||||||
* NULL address indicating synchronization is unnecessary.
|
|
||||||
*/
|
|
||||||
|
|
||||||
STATIC INLINE void _Watchdog_Clear_sync( void );
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _Watchdog_Adjust
|
* _Watchdog_Adjust
|
||||||
*
|
*
|
||||||
@@ -427,7 +374,7 @@ STATIC INLINE void _Watchdog_Clear_sync( void );
|
|||||||
void _Watchdog_Adjust (
|
void _Watchdog_Adjust (
|
||||||
Chain_Control *header,
|
Chain_Control *header,
|
||||||
Watchdog_Adjust_directions direction,
|
Watchdog_Adjust_directions direction,
|
||||||
rtems_interval units
|
rtems_interval units
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -100,17 +100,12 @@ typedef struct {
|
|||||||
} Watchdog_Control;
|
} Watchdog_Control;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following type is used for synchronization purposes
|
* The following are used for synchronization purposes
|
||||||
* during an insert on a watchdog delta chain.
|
* during an insert on a watchdog delta chain.
|
||||||
*
|
|
||||||
* NOTE: Watchdog_Pointer is only used to insure that
|
|
||||||
* Watchdog_Synchronization_pointer is a pointer
|
|
||||||
* which is volatile rather than a pointer to a
|
|
||||||
* volatile block of memory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef Watchdog_Control *Watchdog_Pointer;
|
volatile unsigned32 _Watchdog_Sync_level;
|
||||||
typedef volatile Watchdog_Pointer Watchdog_Synchronization_pointer;
|
volatile unsigned32 _Watchdog_Sync_count;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following defines the watchdog chains which are managed
|
* The following defines the watchdog chains which are managed
|
||||||
@@ -120,14 +115,6 @@ typedef volatile Watchdog_Pointer Watchdog_Synchronization_pointer;
|
|||||||
EXTERN Chain_Control _Watchdog_Ticks_chain;
|
EXTERN Chain_Control _Watchdog_Ticks_chain;
|
||||||
EXTERN Chain_Control _Watchdog_Seconds_chain;
|
EXTERN Chain_Control _Watchdog_Seconds_chain;
|
||||||
|
|
||||||
/*
|
|
||||||
* The following defines the synchronization variable used to
|
|
||||||
* allow interrupts to be enabled while inserting a watchdog
|
|
||||||
* on a watchdog chain.
|
|
||||||
*/
|
|
||||||
|
|
||||||
EXTERN Watchdog_Synchronization_pointer _Watchdog_Sync;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _Watchdog_Handler_initialization
|
* _Watchdog_Handler_initialization
|
||||||
*
|
*
|
||||||
@@ -375,46 +362,6 @@ STATIC INLINE Watchdog_Control *_Watchdog_Last(
|
|||||||
Chain_Control *header
|
Chain_Control *header
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
* _Watchdog_Get_sync
|
|
||||||
*
|
|
||||||
* DESCRIPTION:
|
|
||||||
*
|
|
||||||
* This routine returns the current synchronization timer. This
|
|
||||||
* routine is used so that interrupts can be enabled while a
|
|
||||||
* watchdog timer is being inserted into a watchdog chain.
|
|
||||||
*/
|
|
||||||
|
|
||||||
STATIC INLINE Watchdog_Control *_Watchdog_Get_sync( void );
|
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
* _Watchdog_Set_sync
|
|
||||||
*
|
|
||||||
* DESCRIPTION:
|
|
||||||
*
|
|
||||||
* This routine sets the current synchronization timer. This
|
|
||||||
* routine is used so that interrupts can be enabled while a
|
|
||||||
* watchdog timer is being inserted into a watchdog chain.
|
|
||||||
*/
|
|
||||||
|
|
||||||
STATIC INLINE void _Watchdog_Set_sync(
|
|
||||||
Watchdog_Control *the_watchdog
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
* _Watchdog_Clear_sync
|
|
||||||
*
|
|
||||||
* DESCRIPTION:
|
|
||||||
*
|
|
||||||
* This routine will set the watchdog synchronization flag to a
|
|
||||||
* NULL address indicating synchronization is unnecessary.
|
|
||||||
*/
|
|
||||||
|
|
||||||
STATIC INLINE void _Watchdog_Clear_sync( void );
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _Watchdog_Adjust
|
* _Watchdog_Adjust
|
||||||
*
|
*
|
||||||
@@ -427,7 +374,7 @@ STATIC INLINE void _Watchdog_Clear_sync( void );
|
|||||||
void _Watchdog_Adjust (
|
void _Watchdog_Adjust (
|
||||||
Chain_Control *header,
|
Chain_Control *header,
|
||||||
Watchdog_Adjust_directions direction,
|
Watchdog_Adjust_directions direction,
|
||||||
rtems_interval units
|
rtems_interval units
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -257,40 +257,5 @@ STATIC INLINE Watchdog_Control *_Watchdog_Last(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* _Watchdog_Get_sync
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
STATIC INLINE Watchdog_Control *_Watchdog_Get_sync( void )
|
|
||||||
{
|
|
||||||
return (Watchdog_Control *) _Watchdog_Sync;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* _Watchdog_Set_sync
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
STATIC INLINE void _Watchdog_Set_sync(
|
|
||||||
Watchdog_Control *the_watchdog
|
|
||||||
)
|
|
||||||
{
|
|
||||||
_Watchdog_Sync = (Watchdog_Synchronization_pointer) the_watchdog;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* _Watchdog_Clear_sync
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
STATIC INLINE void _Watchdog_Clear_sync( void )
|
|
||||||
{
|
|
||||||
_Watchdog_Sync = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/* end of include file */
|
/* end of include file */
|
||||||
|
|||||||
@@ -257,40 +257,5 @@ STATIC INLINE Watchdog_Control *_Watchdog_Last(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* _Watchdog_Get_sync
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
STATIC INLINE Watchdog_Control *_Watchdog_Get_sync( void )
|
|
||||||
{
|
|
||||||
return (Watchdog_Control *) _Watchdog_Sync;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* _Watchdog_Set_sync
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
STATIC INLINE void _Watchdog_Set_sync(
|
|
||||||
Watchdog_Control *the_watchdog
|
|
||||||
)
|
|
||||||
{
|
|
||||||
_Watchdog_Sync = (Watchdog_Synchronization_pointer) the_watchdog;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* _Watchdog_Clear_sync
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
STATIC INLINE void _Watchdog_Clear_sync( void )
|
|
||||||
{
|
|
||||||
_Watchdog_Sync = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/* end of include file */
|
/* end of include file */
|
||||||
|
|||||||
@@ -171,32 +171,5 @@
|
|||||||
#define _Watchdog_Last( _header ) \
|
#define _Watchdog_Last( _header ) \
|
||||||
((Watchdog_Control *) (_header)->last)
|
((Watchdog_Control *) (_header)->last)
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* _Watchdog_Get_sync
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define _Watchdog_Get_sync() \
|
|
||||||
((Watchdog_Control *) _Watchdog_Sync)
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* _Watchdog_Set_sync
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define _Watchdog_Set_sync( _the_watchdog ) \
|
|
||||||
_Watchdog_Sync = (Watchdog_Synchronization_pointer) (_the_watchdog)
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* _Watchdog_Clear_sync
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define _Watchdog_Clear_sync() \
|
|
||||||
_Watchdog_Sync = NULL;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/* end of include file */
|
/* end of include file */
|
||||||
|
|||||||
@@ -171,32 +171,5 @@
|
|||||||
#define _Watchdog_Last( _header ) \
|
#define _Watchdog_Last( _header ) \
|
||||||
((Watchdog_Control *) (_header)->last)
|
((Watchdog_Control *) (_header)->last)
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* _Watchdog_Get_sync
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define _Watchdog_Get_sync() \
|
|
||||||
((Watchdog_Control *) _Watchdog_Sync)
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* _Watchdog_Set_sync
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define _Watchdog_Set_sync( _the_watchdog ) \
|
|
||||||
_Watchdog_Sync = (Watchdog_Synchronization_pointer) (_the_watchdog)
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* _Watchdog_Clear_sync
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define _Watchdog_Clear_sync() \
|
|
||||||
_Watchdog_Sync = NULL;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/* end of include file */
|
/* end of include file */
|
||||||
|
|||||||
@@ -116,8 +116,13 @@ Heap_Extend_status _Heap_Extend(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
Heap_Block *the_block;
|
Heap_Block *the_block;
|
||||||
Heap_Block *next_block;
|
|
||||||
Heap_Block *previous_block;
|
/*
|
||||||
|
* The overhead was taken from the original heap memory.
|
||||||
|
*/
|
||||||
|
|
||||||
|
Heap_Block *old_final;
|
||||||
|
Heap_Block *new_final;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* There are five possibilities for the location of starting
|
* There are five possibilities for the location of starting
|
||||||
@@ -150,24 +155,27 @@ Heap_Extend_status _Heap_Extend(
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Currently only case 4 should make it to this point.
|
* Currently only case 4 should make it to this point.
|
||||||
|
* The basic trick is to make the extend area look like a used
|
||||||
|
* block and free it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
*amount_extended = size - HEAP_BLOCK_USED_OVERHEAD;
|
*amount_extended = size;
|
||||||
|
|
||||||
previous_block = the_heap->last;
|
old_final = the_heap->final;
|
||||||
|
new_final = _Addresses_Add_offset( old_final, size );
|
||||||
|
/* SAME AS: _Addresses_Add_offset( starting_address, size-HEAP_OVERHEAD ); */
|
||||||
|
|
||||||
the_block = (Heap_Block *) starting_address;
|
the_heap->final = new_final;
|
||||||
the_block->front_flag = size;
|
|
||||||
the_block->next = previous_block->next;
|
|
||||||
the_block->previous = previous_block;
|
|
||||||
|
|
||||||
previous_block->next = the_block;
|
old_final->front_flag =
|
||||||
the_heap->last = the_block;
|
new_final->back_flag = _Heap_Build_flag( size, HEAP_BLOCK_USED );
|
||||||
|
new_final->front_flag = HEAP_DUMMY_FLAG;
|
||||||
|
|
||||||
next_block = _Heap_Next_block( the_block );
|
/*
|
||||||
next_block->back_flag = size;
|
* Must pass in address of "user" area
|
||||||
next_block->front_flag = HEAP_DUMMY_FLAG;
|
*/
|
||||||
the_heap->final = next_block;
|
|
||||||
|
_Heap_Free( the_heap, &old_final->next );
|
||||||
|
|
||||||
return HEAP_EXTEND_SUCCESSFUL;
|
return HEAP_EXTEND_SUCCESSFUL;
|
||||||
}
|
}
|
||||||
@@ -392,8 +400,8 @@ void _Heap_Walk(
|
|||||||
boolean do_dump
|
boolean do_dump
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Heap_Block *the_block;
|
Heap_Block *the_block = 0; /* avoid warnings */
|
||||||
Heap_Block *next_block;
|
Heap_Block *next_block = 0; /* avoid warnings */
|
||||||
int notdone = 1;
|
int notdone = 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -30,7 +30,8 @@
|
|||||||
|
|
||||||
void _Watchdog_Handler_initialization( void )
|
void _Watchdog_Handler_initialization( void )
|
||||||
{
|
{
|
||||||
_Watchdog_Clear_sync();
|
_Watchdog_Sync_count = 0;
|
||||||
|
_Watchdog_Sync_level = 0;
|
||||||
_Chain_Initialize_empty( &_Watchdog_Ticks_chain );
|
_Chain_Initialize_empty( &_Watchdog_Ticks_chain );
|
||||||
_Chain_Initialize_empty( &_Watchdog_Seconds_chain );
|
_Chain_Initialize_empty( &_Watchdog_Seconds_chain );
|
||||||
}
|
}
|
||||||
@@ -56,8 +57,17 @@ Watchdog_States _Watchdog_Remove(
|
|||||||
switch ( previous_state ) {
|
switch ( previous_state ) {
|
||||||
case WATCHDOG_INACTIVE:
|
case WATCHDOG_INACTIVE:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WATCHDOG_REINSERT:
|
||||||
|
|
||||||
|
/*
|
||||||
|
* It is not actually on the chain so just change the state and
|
||||||
|
* the Insert operation we interrupted will be aborted.
|
||||||
|
*/
|
||||||
|
the_watchdog->state = WATCHDOG_INACTIVE;
|
||||||
|
break;
|
||||||
|
|
||||||
case WATCHDOG_ACTIVE:
|
case WATCHDOG_ACTIVE:
|
||||||
case WATCHDOG_REINSERT:
|
|
||||||
case WATCHDOG_REMOVE_IT:
|
case WATCHDOG_REMOVE_IT:
|
||||||
|
|
||||||
the_watchdog->state = WATCHDOG_INACTIVE;
|
the_watchdog->state = WATCHDOG_INACTIVE;
|
||||||
@@ -66,8 +76,8 @@ Watchdog_States _Watchdog_Remove(
|
|||||||
if ( _Watchdog_Next(next_watchdog) )
|
if ( _Watchdog_Next(next_watchdog) )
|
||||||
next_watchdog->delta_interval += the_watchdog->delta_interval;
|
next_watchdog->delta_interval += the_watchdog->delta_interval;
|
||||||
|
|
||||||
if ( the_watchdog == _Watchdog_Sync )
|
if ( _Watchdog_Sync_count )
|
||||||
_Watchdog_Sync = _Watchdog_Previous( the_watchdog );
|
_Watchdog_Sync_level = _ISR_Nest_level;
|
||||||
|
|
||||||
_Chain_Extract_unprotected( &the_watchdog->Node );
|
_Chain_Extract_unprotected( &the_watchdog->Node );
|
||||||
break;
|
break;
|
||||||
@@ -94,7 +104,7 @@ Watchdog_States _Watchdog_Remove(
|
|||||||
void _Watchdog_Adjust(
|
void _Watchdog_Adjust(
|
||||||
Chain_Control *header,
|
Chain_Control *header,
|
||||||
Watchdog_Adjust_directions direction,
|
Watchdog_Adjust_directions direction,
|
||||||
rtems_interval units
|
rtems_interval units
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !_Chain_Is_empty( header ) ) {
|
if ( !_Chain_Is_empty( header ) ) {
|
||||||
@@ -136,45 +146,66 @@ void _Watchdog_Insert(
|
|||||||
{
|
{
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
Watchdog_Control *after;
|
Watchdog_Control *after;
|
||||||
|
unsigned32 insert_isr_nest_level;
|
||||||
|
rtems_interval delta_interval;
|
||||||
|
|
||||||
|
|
||||||
the_watchdog->state = WATCHDOG_REINSERT;
|
insert_isr_nest_level = _ISR_Nest_level;
|
||||||
the_watchdog->delta_interval = the_watchdog->initial;
|
the_watchdog->state = WATCHDOG_REINSERT;
|
||||||
|
|
||||||
|
_Watchdog_Sync_count++;
|
||||||
|
restart:
|
||||||
|
delta_interval = the_watchdog->initial;
|
||||||
|
|
||||||
_ISR_Disable( level );
|
_ISR_Disable( level );
|
||||||
|
|
||||||
for ( after = _Watchdog_First( header ) ;
|
for ( after = _Watchdog_First( header ) ;
|
||||||
;
|
;
|
||||||
after = _Watchdog_Next( _Watchdog_Get_sync() ) ) {
|
after = _Watchdog_Next( after ) ) {
|
||||||
|
|
||||||
if ( the_watchdog->delta_interval == 0 || !_Watchdog_Next( after ) )
|
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if ( the_watchdog->delta_interval < after->delta_interval ) {
|
if ( delta_interval < after->delta_interval ) {
|
||||||
after->delta_interval -= the_watchdog->delta_interval;
|
after->delta_interval -= delta_interval;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
the_watchdog->delta_interval -= after->delta_interval;
|
delta_interval -= after->delta_interval;
|
||||||
_Watchdog_Set_sync( after );
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If you experience problems comment out the _ISR_Flash line. Under
|
* If you experience problems comment out the _ISR_Flash line. This
|
||||||
* certain circumstances, this flash allows interrupts to execute
|
* (3.2.0) is the first release with this critical section redesigned.
|
||||||
* which violate the design assumptions. The critical section
|
* Under certain circumstances, the PREVIOUS critical section algorithm
|
||||||
* mechanism used here must be redesigned to address this.
|
* used around this flash point allows interrupts to execute
|
||||||
|
* which violated the design assumptions. The critical section
|
||||||
|
* mechanism used here WAS redesigned to address this.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_ISR_Flash( level );
|
_ISR_Flash( level );
|
||||||
|
|
||||||
|
if ( the_watchdog->state != WATCHDOG_REINSERT ) {
|
||||||
|
goto exit_insert;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
|
||||||
|
_Watchdog_Sync_level = insert_isr_nest_level;
|
||||||
|
_ISR_Enable( level );
|
||||||
|
goto restart;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( insert_mode == WATCHDOG_ACTIVATE_NOW )
|
if ( insert_mode == WATCHDOG_ACTIVATE_NOW )
|
||||||
_Watchdog_Activate( the_watchdog );
|
_Watchdog_Activate( the_watchdog );
|
||||||
|
|
||||||
|
the_watchdog->delta_interval = delta_interval;
|
||||||
|
|
||||||
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
|
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
|
||||||
|
|
||||||
_Watchdog_Clear_sync();
|
exit_insert:
|
||||||
|
_Watchdog_Sync_level = insert_isr_nest_level;
|
||||||
_ISR_Enable( level );
|
_Watchdog_Sync_count--;
|
||||||
|
_ISR_Enable( level );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* @(#)genoffsets.c 1.3 - 95/03/15
|
* @(#)genoffsets.c 1.5 - 95/05/16
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* genoffsets.c
|
* genoffsets.c
|
||||||
*
|
*
|
||||||
* This file generates the offsets.h for the HP PA-RISC port of RTEMS.
|
* This file generates the offsets.h for the HP PA-RISC port of RTEMS.
|
||||||
*
|
*
|
||||||
* NOTE: It only prints the offset for structures actually used
|
* NOTE: It only prints the offset for structures actually used
|
||||||
* by the assembly code.
|
* by the assembly code.
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* genoffsets.c,v 1.2 1995/05/09 20:16:48 joel Exp
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* @(#)bspstart.c 1.13 - 95/04/25
|
* @(#)bspstart.c 1.14 - 95/05/16
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* bspstart.c,v 1.2 1995/05/09 20:17:33 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
@@ -255,11 +255,11 @@ bsp_start(void)
|
|||||||
|
|
||||||
#ifdef hppa7200
|
#ifdef hppa7200
|
||||||
/*
|
/*
|
||||||
* Use DR0 if supported
|
* Use HPPA_DR0 if supported
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
int dr0;
|
int dr0;
|
||||||
HPPA_ASM_MFCPU(DR0, dr0);
|
HPPA_ASM_MFCPU(HPPA_DR0, dr0);
|
||||||
cpu_number = (dr0 >> 4) & 0x7;
|
cpu_number = (dr0 >> 4) & 0x7;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -18,9 +18,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
#include "cpu.h"
|
#include <bsp.h>
|
||||||
#include "bsp.h"
|
#include <shm.h>
|
||||||
#include "shm.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Shm_Initialize_lock
|
* Shm_Initialize_lock
|
||||||
|
|||||||
@@ -26,10 +26,9 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "rtems.h"
|
#include <rtems.h>
|
||||||
#include "clockdrv.h"
|
#include <clockdrv.h>
|
||||||
#include "bsp.h"
|
#include <bsp.h>
|
||||||
#include "cpu.h"
|
|
||||||
|
|
||||||
rtems_unsigned32 Clock_isrs; /* ISRs until next tick */
|
rtems_unsigned32 Clock_isrs; /* ISRs until next tick */
|
||||||
volatile rtems_unsigned32 Clock_driver_ticks;
|
volatile rtems_unsigned32 Clock_driver_ticks;
|
||||||
|
|||||||
@@ -8,11 +8,10 @@
|
|||||||
#ifndef __IDP_BSP_H
|
#ifndef __IDP_BSP_H
|
||||||
#define __IDP_BSP_H
|
#define __IDP_BSP_H
|
||||||
|
|
||||||
#include "rtems.h"
|
#include <rtems.h>
|
||||||
#include "cpu.h"
|
#include <console.h>
|
||||||
#include "console.h"
|
#include <mc68230.h>
|
||||||
#include "mc68230.h"
|
#include <mc68681.h>
|
||||||
#include "mc68681.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Define the time limits for RTEMS Test Suite test durations.
|
* Define the time limits for RTEMS Test Suite test durations.
|
||||||
|
|||||||
@@ -20,10 +20,9 @@
|
|||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "rtems.h"
|
#include <rtems.h>
|
||||||
#include "bsp.h"
|
#include <bsp.h>
|
||||||
#include "cpu.h"
|
#include <libcsupport.h>
|
||||||
#include "libcsupport.h"
|
|
||||||
|
|
||||||
unsigned char *duart_base;
|
unsigned char *duart_base;
|
||||||
extern struct duart_regs duart_info;
|
extern struct duart_regs duart_info;
|
||||||
|
|||||||
@@ -27,10 +27,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "rtems.h"
|
#include <rtems.h>
|
||||||
#include "cpu.h"
|
#include <bsp.h>
|
||||||
#include "bsp.h"
|
#include <mc68230.h>
|
||||||
#include "mc68230.h"
|
|
||||||
|
|
||||||
#define TIMER_VECTOR 0x4D
|
#define TIMER_VECTOR 0x4D
|
||||||
|
|
||||||
|
|||||||
@@ -16,10 +16,11 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* poll.c,v 1.2 1995/05/09 20:22:57 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
|
#include <rtems/sysstate.h>
|
||||||
#include "shm.h"
|
#include "shm.h"
|
||||||
#include "clockdrv.h"
|
#include "clockdrv.h"
|
||||||
|
|
||||||
@@ -29,12 +30,22 @@ void Shm_Poll()
|
|||||||
|
|
||||||
Clock_isr( 0 ); /* invoke standard clock ISR */
|
Clock_isr( 0 ); /* invoke standard clock ISR */
|
||||||
|
|
||||||
/* enable_tracing(); */
|
|
||||||
/* ticks += 1; */
|
/*
|
||||||
Shm_Lock( Shm_Local_receive_queue );
|
* Check for msgs only if we are "up"
|
||||||
tmpfront = Shm_Local_receive_queue->front;
|
* This avoids a race condition where we may get a clock
|
||||||
Shm_Unlock( Shm_Local_receive_queue );
|
* interrupt before MPCI has completed its init
|
||||||
if ( Shm_Convert(tmpfront) == Shm_Locked_queue_End_of_list ) return;
|
*/
|
||||||
rtems_multiprocessing_announce();
|
|
||||||
Shm_Interrupt_count++;
|
if (_System_state_Is_up(_System_state_Get()))
|
||||||
|
{
|
||||||
|
/* enable_tracing(); */
|
||||||
|
/* ticks += 1; */
|
||||||
|
Shm_Lock( Shm_Local_receive_queue );
|
||||||
|
tmpfront = Shm_Local_receive_queue->front;
|
||||||
|
Shm_Unlock( Shm_Local_receive_queue );
|
||||||
|
if ( Shm_Convert(tmpfront) == Shm_Locked_queue_End_of_list ) return;
|
||||||
|
rtems_multiprocessing_announce();
|
||||||
|
Shm_Interrupt_count++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* shm.h,v 1.2 1995/05/09 20:23:03 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __SHM_h
|
#ifndef __SHM_h
|
||||||
@@ -24,8 +24,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cpu.h>
|
|
||||||
|
|
||||||
/* The information contained in the Node Status, Locked Queue, and
|
/* The information contained in the Node Status, Locked Queue, and
|
||||||
* Envelope Control Blocks must be maintained in a NEUTRAL format.
|
* Envelope Control Blocks must be maintained in a NEUTRAL format.
|
||||||
* Currently the neutral format may be selected as big or little
|
* Currently the neutral format may be selected as big or little
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* shm.h,v 1.2 1995/05/09 20:23:03 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __SHM_h
|
#ifndef __SHM_h
|
||||||
@@ -24,8 +24,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cpu.h>
|
|
||||||
|
|
||||||
/* The information contained in the Node Status, Locked Queue, and
|
/* The information contained in the Node Status, Locked Queue, and
|
||||||
* Envelope Control Blocks must be maintained in a NEUTRAL format.
|
* Envelope Control Blocks must be maintained in a NEUTRAL format.
|
||||||
* Currently the neutral format may be selected as big or little
|
* Currently the neutral format may be selected as big or little
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#if !defined(RTEMS_UNIX)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* RTEMS "Broken" __brk/__sbrk Implementation
|
* RTEMS "Broken" __brk/__sbrk Implementation
|
||||||
*
|
*
|
||||||
@@ -12,7 +14,7 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* __brk.c,v 1.2 1995/05/09 20:24:28 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
@@ -38,3 +40,5 @@ int __brk( const void *endds )
|
|||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* __gettod.c,v 1.2 1995/05/09 20:24:31 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
@@ -19,8 +19,10 @@
|
|||||||
#ifdef RTEMS_NEWLIB
|
#ifdef RTEMS_NEWLIB
|
||||||
#include <sys/reent.h>
|
#include <sys/reent.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
@@ -29,14 +31,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int gettimeofday(
|
int gettimeofday(
|
||||||
struct timeval *tp,
|
struct timeval *tp,
|
||||||
struct timezone *tzp
|
struct timezone *tzp
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
rtems_clock_time_value time;
|
rtems_clock_time_value time;
|
||||||
|
|
||||||
if ( !tp || !tzp ) {
|
if ( !tp ) {
|
||||||
errno = EFAULT;
|
errno = EFAULT;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -51,34 +53,51 @@ int gettimeofday(
|
|||||||
tp->tv_sec = time.seconds;
|
tp->tv_sec = time.seconds;
|
||||||
tp->tv_usec = time.microseconds;
|
tp->tv_usec = time.microseconds;
|
||||||
|
|
||||||
#if 0
|
|
||||||
tzp->minuteswest = timezone / 60; /* from seconds to minutes */
|
|
||||||
tzp->dsttime = daylight;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* newlib does not have timezone and daylight savings time
|
* newlib does not have timezone and daylight savings time
|
||||||
* yet. When it does this needs to be fixed.
|
* yet. When it does this needs to be fixed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
tzp->tz_minuteswest = 0; /* at UTC */
|
if ( tzp ) {
|
||||||
tzp->tz_dsttime = 0; /* no daylight savings */
|
tzp->tz_minuteswest = 0; /* at UTC */
|
||||||
|
tzp->tz_dsttime = 0; /* no daylight savings */
|
||||||
|
#if 0
|
||||||
|
tzp->minuteswest = timezone / 60; /* from seconds to minutes */
|
||||||
|
tzp->dsttime = daylight;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
#if defined(RTEMS_NEWLIB)
|
||||||
* "Reentrant" versions of the above routines implemented above.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
/*
|
||||||
|
* "Reentrant" version
|
||||||
|
*/
|
||||||
|
|
||||||
int _gettimeofday_r(
|
int _gettimeofday_r(
|
||||||
struct _reent *ignored_reentrancy_stuff,
|
struct _reent *ignored_reentrancy_stuff,
|
||||||
struct timeval *tp,
|
struct timeval *tp,
|
||||||
struct timezone *tzp
|
struct timezone *tzp
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return gettimeofday( tp, tzp );
|
return gettimeofday( tp, tzp );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* "System call" version
|
||||||
|
*/
|
||||||
|
|
||||||
|
int _gettimeofday(
|
||||||
|
struct timeval *tp,
|
||||||
|
struct timezone *tzp
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return gettimeofday( tp, tzp );
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* defined(RTEMS_NEWLIB) */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* @(#)newlibc.c 1.8 - 95/04/25
|
* @(#)newlibc.c 1.9 - 95/05/16
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(RTEMS_NEWLIB)
|
#if defined(RTEMS_NEWLIB)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* File: $RCSfile$
|
* File: newlibc.c,v
|
||||||
* Project: PixelFlow
|
* Project: PixelFlow
|
||||||
* Created: 94/12/7
|
* Created: 94/12/7
|
||||||
* Revision: $Revision$
|
* Revision: 1.2
|
||||||
* Last Mod: $Date$
|
* Last Mod: 1995/05/09 20:24:37
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1994 by Division Incorporated
|
* COPYRIGHT (c) 1994 by Division Incorporated
|
||||||
*
|
*
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
*
|
*
|
||||||
* NOTE:
|
* NOTE:
|
||||||
*
|
*
|
||||||
* $Id$
|
* newlibc.c,v 1.2 1995/05/09 20:24:37 joel Exp
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -329,6 +329,7 @@ void *Stack_check_find_high_water_mark(
|
|||||||
* match pattern
|
* match pattern
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
base += 4;
|
||||||
for (ebase = base + length; base < ebase; base++)
|
for (ebase = base + length; base < ebase; base++)
|
||||||
if (*base != U32_PATTERN)
|
if (*base != U32_PATTERN)
|
||||||
return (void *) base;
|
return (void *) base;
|
||||||
|
|||||||
@@ -16,10 +16,11 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* poll.c,v 1.2 1995/05/09 20:22:57 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
|
#include <rtems/sysstate.h>
|
||||||
#include "shm.h"
|
#include "shm.h"
|
||||||
#include "clockdrv.h"
|
#include "clockdrv.h"
|
||||||
|
|
||||||
@@ -29,12 +30,22 @@ void Shm_Poll()
|
|||||||
|
|
||||||
Clock_isr( 0 ); /* invoke standard clock ISR */
|
Clock_isr( 0 ); /* invoke standard clock ISR */
|
||||||
|
|
||||||
/* enable_tracing(); */
|
|
||||||
/* ticks += 1; */
|
/*
|
||||||
Shm_Lock( Shm_Local_receive_queue );
|
* Check for msgs only if we are "up"
|
||||||
tmpfront = Shm_Local_receive_queue->front;
|
* This avoids a race condition where we may get a clock
|
||||||
Shm_Unlock( Shm_Local_receive_queue );
|
* interrupt before MPCI has completed its init
|
||||||
if ( Shm_Convert(tmpfront) == Shm_Locked_queue_End_of_list ) return;
|
*/
|
||||||
rtems_multiprocessing_announce();
|
|
||||||
Shm_Interrupt_count++;
|
if (_System_state_Is_up(_System_state_Get()))
|
||||||
|
{
|
||||||
|
/* enable_tracing(); */
|
||||||
|
/* ticks += 1; */
|
||||||
|
Shm_Lock( Shm_Local_receive_queue );
|
||||||
|
tmpfront = Shm_Local_receive_queue->front;
|
||||||
|
Shm_Unlock( Shm_Local_receive_queue );
|
||||||
|
if ( Shm_Convert(tmpfront) == Shm_Locked_queue_End_of_list ) return;
|
||||||
|
rtems_multiprocessing_announce();
|
||||||
|
Shm_Interrupt_count++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* shm.h,v 1.2 1995/05/09 20:23:03 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __SHM_h
|
#ifndef __SHM_h
|
||||||
@@ -24,8 +24,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cpu.h>
|
|
||||||
|
|
||||||
/* The information contained in the Node Status, Locked Queue, and
|
/* The information contained in the Node Status, Locked Queue, and
|
||||||
* Envelope Control Blocks must be maintained in a NEUTRAL format.
|
* Envelope Control Blocks must be maintained in a NEUTRAL format.
|
||||||
* Currently the neutral format may be selected as big or little
|
* Currently the neutral format may be selected as big or little
|
||||||
|
|||||||
@@ -329,6 +329,7 @@ void *Stack_check_find_high_water_mark(
|
|||||||
* match pattern
|
* match pattern
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
base += 4;
|
||||||
for (ebase = base + length; base < ebase; base++)
|
for (ebase = base + length; base < ebase; base++)
|
||||||
if (*base != U32_PATTERN)
|
if (*base != U32_PATTERN)
|
||||||
return (void *) base;
|
return (void *) base;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* task1.c,v 1.2 1995/05/09 20:26:24 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
@@ -43,7 +43,7 @@ rtems_task Test_task(
|
|||||||
put_name( Task_name[ task_number( tid ) ], FALSE );
|
put_name( Task_name[ task_number( tid ) ], FALSE );
|
||||||
print_time( " - rtems_clock_get - ", &time, "\n" );
|
print_time( " - rtems_clock_get - ", &time, "\n" );
|
||||||
|
|
||||||
status = rtems_task_wake_after( task_number( tid ) * 5 * TICKS_PER_SECOND );
|
status = rtems_task_wake_after( task_number( tid ) * 1 * TICKS_PER_SECOND );
|
||||||
directive_failed( status, "rtems_task_wake_after" );
|
directive_failed( status, "rtems_task_wake_after" );
|
||||||
|
|
||||||
status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
|
status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* tswitch.c,v 1.2 1995/05/09 20:32:43 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
@@ -44,7 +44,7 @@ rtems_extension Task_switch(
|
|||||||
directive_failed( status, "rtems_clock_get" );
|
directive_failed( status, "rtems_clock_get" );
|
||||||
|
|
||||||
put_name( Task_name[ index ], FALSE );
|
put_name( Task_name[ index ], FALSE );
|
||||||
print_time( " - ", &time, "\n" );
|
print_time( "- ", &time, "\n" );
|
||||||
|
|
||||||
if ( time.second >= 16 ) {
|
if ( time.second >= 16 ) {
|
||||||
puts( "*** END OF TEST 4 ***" );
|
puts( "*** END OF TEST 4 ***" );
|
||||||
|
|||||||
@@ -76,14 +76,6 @@ void Screen14()
|
|||||||
);
|
);
|
||||||
puts( "TA1 - rtems_timer_cancel - RTEMS_INVALID_ID" );
|
puts( "TA1 - rtems_timer_cancel - RTEMS_INVALID_ID" );
|
||||||
|
|
||||||
status = rtems_timer_cancel( Timer_id[ 1 ] );
|
|
||||||
fatal_directive_status(
|
|
||||||
status,
|
|
||||||
RTEMS_INCORRECT_STATE,
|
|
||||||
"rtems_timer_cancel before initiated"
|
|
||||||
);
|
|
||||||
puts( "TA1 - rtems_timer_cancel - RTEMS_INCORRECT_STATE" );
|
|
||||||
|
|
||||||
status = rtems_timer_reset( 0x010100 );
|
status = rtems_timer_reset( 0x010100 );
|
||||||
fatal_directive_status(
|
fatal_directive_status(
|
||||||
status,
|
status,
|
||||||
|
|||||||
@@ -237,7 +237,6 @@ TA1 - rtems_timer_delete - local RTEMS_INVALID_ID
|
|||||||
TA1 - rtems_timer_delete - global RTEMS_INVALID_ID
|
TA1 - rtems_timer_delete - global RTEMS_INVALID_ID
|
||||||
TA1 - rtems_timer_ident - RTEMS_INVALID_NAME
|
TA1 - rtems_timer_ident - RTEMS_INVALID_NAME
|
||||||
TA1 - rtems_timer_cancel - RTEMS_INVALID_ID
|
TA1 - rtems_timer_cancel - RTEMS_INVALID_ID
|
||||||
TA1 - rtems_timer_cancel - RTEMS_INCORRECT_STATE
|
|
||||||
TA1 - rtems_timer_reset - RTEMS_INVALID_ID
|
TA1 - rtems_timer_reset - RTEMS_INVALID_ID
|
||||||
TA1 - rtems_timer_reset - RTEMS_NOT_DEFINED
|
TA1 - rtems_timer_reset - RTEMS_NOT_DEFINED
|
||||||
TA1 - rtems_timer_fire_after - RTEMS_INVALID_ID
|
TA1 - rtems_timer_fire_after - RTEMS_INVALID_ID
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ TA4 - rtems_rate_monotonic_ident id = 0x00010004
|
|||||||
TA4 - (0x00010004) period 2
|
TA4 - (0x00010004) period 2
|
||||||
TA5 - rtems_rate_monotonic_create id = 0x00010005
|
TA5 - rtems_rate_monotonic_create id = 0x00010005
|
||||||
TA5 - rtems_rate_monotonic_ident id = 0x00010005
|
TA5 - rtems_rate_monotonic_ident id = 0x00010005
|
||||||
TA5 - (0x00010005) period 50
|
TA5 - (0x00010005) period 100
|
||||||
TA5 - PERIODS CHECK OK (1)
|
TA5 - PERIODS CHECK OK (1)
|
||||||
TA5 - PERIODS CHECK OK (2)
|
TA5 - PERIODS CHECK OK (2)
|
||||||
TA5 - PERIODS CHECK OK (3)
|
TA5 - PERIODS CHECK OK (3)
|
||||||
|
|||||||
@@ -332,7 +332,8 @@ uninitialized =
|
|||||||
|
|
||||||
/*watchdog.h*/ (sizeof _Watchdog_Ticks_chain) +
|
/*watchdog.h*/ (sizeof _Watchdog_Ticks_chain) +
|
||||||
(sizeof _Watchdog_Seconds_chain) +
|
(sizeof _Watchdog_Seconds_chain) +
|
||||||
(sizeof _Watchdog_Sync) +
|
(sizeof _Watchdog_Sync_count) +
|
||||||
|
(sizeof _Watchdog_Sync_level) +
|
||||||
|
|
||||||
/*wkspace.h*/ (sizeof _Workspace_Area);
|
/*wkspace.h*/ (sizeof _Workspace_Area);
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#if !defined(RTEMS_UNIX)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* RTEMS "Broken" __brk/__sbrk Implementation
|
* RTEMS "Broken" __brk/__sbrk Implementation
|
||||||
*
|
*
|
||||||
@@ -12,7 +14,7 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* __brk.c,v 1.2 1995/05/09 20:24:28 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
@@ -38,3 +40,5 @@ int __brk( const void *endds )
|
|||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* __gettod.c,v 1.2 1995/05/09 20:24:31 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
@@ -19,8 +19,10 @@
|
|||||||
#ifdef RTEMS_NEWLIB
|
#ifdef RTEMS_NEWLIB
|
||||||
#include <sys/reent.h>
|
#include <sys/reent.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
@@ -29,14 +31,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int gettimeofday(
|
int gettimeofday(
|
||||||
struct timeval *tp,
|
struct timeval *tp,
|
||||||
struct timezone *tzp
|
struct timezone *tzp
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
rtems_clock_time_value time;
|
rtems_clock_time_value time;
|
||||||
|
|
||||||
if ( !tp || !tzp ) {
|
if ( !tp ) {
|
||||||
errno = EFAULT;
|
errno = EFAULT;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -51,34 +53,51 @@ int gettimeofday(
|
|||||||
tp->tv_sec = time.seconds;
|
tp->tv_sec = time.seconds;
|
||||||
tp->tv_usec = time.microseconds;
|
tp->tv_usec = time.microseconds;
|
||||||
|
|
||||||
#if 0
|
|
||||||
tzp->minuteswest = timezone / 60; /* from seconds to minutes */
|
|
||||||
tzp->dsttime = daylight;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* newlib does not have timezone and daylight savings time
|
* newlib does not have timezone and daylight savings time
|
||||||
* yet. When it does this needs to be fixed.
|
* yet. When it does this needs to be fixed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
tzp->tz_minuteswest = 0; /* at UTC */
|
if ( tzp ) {
|
||||||
tzp->tz_dsttime = 0; /* no daylight savings */
|
tzp->tz_minuteswest = 0; /* at UTC */
|
||||||
|
tzp->tz_dsttime = 0; /* no daylight savings */
|
||||||
|
#if 0
|
||||||
|
tzp->minuteswest = timezone / 60; /* from seconds to minutes */
|
||||||
|
tzp->dsttime = daylight;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
#if defined(RTEMS_NEWLIB)
|
||||||
* "Reentrant" versions of the above routines implemented above.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
/*
|
||||||
|
* "Reentrant" version
|
||||||
|
*/
|
||||||
|
|
||||||
int _gettimeofday_r(
|
int _gettimeofday_r(
|
||||||
struct _reent *ignored_reentrancy_stuff,
|
struct _reent *ignored_reentrancy_stuff,
|
||||||
struct timeval *tp,
|
struct timeval *tp,
|
||||||
struct timezone *tzp
|
struct timezone *tzp
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return gettimeofday( tp, tzp );
|
return gettimeofday( tp, tzp );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* "System call" version
|
||||||
|
*/
|
||||||
|
|
||||||
|
int _gettimeofday(
|
||||||
|
struct timeval *tp,
|
||||||
|
struct timezone *tzp
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return gettimeofday( tp, tzp );
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* defined(RTEMS_NEWLIB) */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* @(#)newlibc.c 1.8 - 95/04/25
|
* @(#)newlibc.c 1.9 - 95/05/16
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(RTEMS_NEWLIB)
|
#if defined(RTEMS_NEWLIB)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* File: $RCSfile$
|
* File: newlibc.c,v
|
||||||
* Project: PixelFlow
|
* Project: PixelFlow
|
||||||
* Created: 94/12/7
|
* Created: 94/12/7
|
||||||
* Revision: $Revision$
|
* Revision: 1.2
|
||||||
* Last Mod: $Date$
|
* Last Mod: 1995/05/09 20:24:37
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1994 by Division Incorporated
|
* COPYRIGHT (c) 1994 by Division Incorporated
|
||||||
*
|
*
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
*
|
*
|
||||||
* NOTE:
|
* NOTE:
|
||||||
*
|
*
|
||||||
* $Id$
|
* newlibc.c,v 1.2 1995/05/09 20:24:37 joel Exp
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -329,6 +329,7 @@ void *Stack_check_find_high_water_mark(
|
|||||||
* match pattern
|
* match pattern
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
base += 4;
|
||||||
for (ebase = base + length; base < ebase; base++)
|
for (ebase = base + length; base < ebase; base++)
|
||||||
if (*base != U32_PATTERN)
|
if (*base != U32_PATTERN)
|
||||||
return (void *) base;
|
return (void *) base;
|
||||||
|
|||||||
@@ -146,13 +146,10 @@ rtems_status_code rtems_timer_cancel(
|
|||||||
case OBJECTS_REMOTE: /* should never return this */
|
case OBJECTS_REMOTE: /* should never return this */
|
||||||
return( RTEMS_INTERNAL_ERROR );
|
return( RTEMS_INTERNAL_ERROR );
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) {
|
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
|
||||||
(void) _Watchdog_Remove( &the_timer->Ticker );
|
(void) _Watchdog_Remove( &the_timer->Ticker );
|
||||||
_Thread_Enable_dispatch();
|
|
||||||
return( RTEMS_SUCCESSFUL );
|
|
||||||
}
|
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return( RTEMS_INCORRECT_STATE );
|
return( RTEMS_SUCCESSFUL );
|
||||||
}
|
}
|
||||||
|
|
||||||
return( RTEMS_INTERNAL_ERROR ); /* unreached - only to remove warnings */
|
return( RTEMS_INTERNAL_ERROR ); /* unreached - only to remove warnings */
|
||||||
|
|||||||
@@ -187,11 +187,11 @@ void _IO_Initialize_all_drivers( void );
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
rtems_status_code _IO_Handler_routine(
|
rtems_status_code _IO_Handler_routine(
|
||||||
IO_operations operation,
|
IO_operations operation,
|
||||||
rtems_device_major_number major,
|
rtems_device_major_number major,
|
||||||
rtems_device_minor_number minor,
|
rtems_device_minor_number minor,
|
||||||
void *argument,
|
void *argument,
|
||||||
unsigned32 *return_value
|
unsigned32 *return_value
|
||||||
);
|
);
|
||||||
|
|
||||||
#include <rtems/io.inl>
|
#include <rtems/io.inl>
|
||||||
|
|||||||
@@ -107,6 +107,13 @@ rtems_interrupt_level rtems_initialize_executive_early(
|
|||||||
|
|
||||||
_CPU_Initialize( cpu_table, _Thread_Dispatch );
|
_CPU_Initialize( cpu_table, _Thread_Dispatch );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Do this as early as possible to insure no debugging output
|
||||||
|
* is even attempted to be printed.
|
||||||
|
*/
|
||||||
|
|
||||||
|
_Debug_Manager_initialization();
|
||||||
|
|
||||||
multiprocessing_table = configuration_table->User_multiprocessing_table;
|
multiprocessing_table = configuration_table->User_multiprocessing_table;
|
||||||
if ( multiprocessing_table == NULL )
|
if ( multiprocessing_table == NULL )
|
||||||
multiprocessing_table =
|
multiprocessing_table =
|
||||||
|
|||||||
@@ -256,11 +256,11 @@ rtems_status_code rtems_io_control(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
rtems_status_code _IO_Handler_routine(
|
rtems_status_code _IO_Handler_routine(
|
||||||
IO_operations operation,
|
IO_operations operation,
|
||||||
rtems_device_major_number major,
|
rtems_device_major_number major,
|
||||||
rtems_device_minor_number minor,
|
rtems_device_minor_number minor,
|
||||||
void *argument,
|
void *argument,
|
||||||
unsigned32 *return_value
|
unsigned32 *return_value
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
rtems_device_driver_entry io_callout;
|
rtems_device_driver_entry io_callout;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* Division Incorporated makes no representations about the
|
* Division Incorporated makes no representations about the
|
||||||
* suitability of this software for any purpose.
|
* suitability of this software for any purpose.
|
||||||
*
|
*
|
||||||
* $Id$
|
* cpu.c,v 1.2 1995/05/09 20:11:35 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems/system.h>
|
#include <rtems/system.h>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define ASM
|
#define ASM
|
||||||
#include <i386.h>
|
#include <rtems/i386.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recent versions of GNU cpp define variables which indicate the
|
* Recent versions of GNU cpp define variables which indicate the
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define ASM
|
#define ASM
|
||||||
#include <i386.h>
|
#include <rtems/i386.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recent versions of GNU cpp define variables which indicate the
|
* Recent versions of GNU cpp define variables which indicate the
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define ASM
|
#define ASM
|
||||||
#include <i960.h>
|
#include <rtems/i960.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recent versions of GNU cpp define variables which indicate the
|
* Recent versions of GNU cpp define variables which indicate the
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define ASM
|
#define ASM
|
||||||
#include <m68k.h>
|
#include <rtems/m68k.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recent versions of GNU cpp define variables which indicate the
|
* Recent versions of GNU cpp define variables which indicate the
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define ASM
|
#define ASM
|
||||||
#include <m68k.h>
|
#include <rtems/m68k.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recent versions of GNU cpp define variables which indicate the
|
* Recent versions of GNU cpp define variables which indicate the
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define ASM
|
#define ASM
|
||||||
#include <no_cpu.h>
|
#include <rtems/no_cpu.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recent versions of GNU cpp define variables which indicate the
|
* Recent versions of GNU cpp define variables which indicate the
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define ASM
|
#define ASM
|
||||||
#include <no_cpu.h>
|
#include <rtems/no_cpu.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recent versions of GNU cpp define variables which indicate the
|
* Recent versions of GNU cpp define variables which indicate the
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
@@ -225,18 +224,28 @@ void _CPU_Context_Initialize(
|
|||||||
unsigned32 *_stack_base,
|
unsigned32 *_stack_base,
|
||||||
unsigned32 _size,
|
unsigned32 _size,
|
||||||
unsigned32 _new_level,
|
unsigned32 _new_level,
|
||||||
proc_ptr *_entry_point
|
void *_entry_point
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
unsigned32 *addr;
|
unsigned32 *addr;
|
||||||
unsigned32 jmp_addr;
|
unsigned32 jmp_addr;
|
||||||
unsigned32 _stack;
|
unsigned32 _stack_low; /* lowest "stack aligned" address */
|
||||||
|
unsigned32 _stack_high; /* highest "stack aligned" address */
|
||||||
unsigned32 _the_size;
|
unsigned32 _the_size;
|
||||||
|
|
||||||
jmp_addr = (unsigned32) _entry_point;
|
jmp_addr = (unsigned32) _entry_point;
|
||||||
|
|
||||||
_stack = ((unsigned32)(_stack_base) + CPU_STACK_ALIGNMENT);
|
/*
|
||||||
_stack &= ~(CPU_STACK_ALIGNMENT - 1);
|
* On CPUs with stacks which grow down, we build the stack
|
||||||
|
* based on the _stack_high address. On CPUs with stacks which
|
||||||
|
* grow up, we build the stack based on the _stack_low address.
|
||||||
|
*/
|
||||||
|
|
||||||
|
_stack_low = ((unsigned32)(_stack_base) + CPU_STACK_ALIGNMENT);
|
||||||
|
_stack_low &= ~(CPU_STACK_ALIGNMENT - 1);
|
||||||
|
|
||||||
|
_stack_high = ((unsigned32)(_stack_base) + _size);
|
||||||
|
_stack_high &= ~(CPU_STACK_ALIGNMENT - 1);
|
||||||
|
|
||||||
_the_size = _size & ~(CPU_STACK_ALIGNMENT - 1);
|
_the_size = _size & ~(CPU_STACK_ALIGNMENT - 1);
|
||||||
|
|
||||||
@@ -250,7 +259,7 @@ void _CPU_Context_Initialize(
|
|||||||
|
|
||||||
#if defined(hppa1_1)
|
#if defined(hppa1_1)
|
||||||
*(addr + RP_OFF) = jmp_addr;
|
*(addr + RP_OFF) = jmp_addr;
|
||||||
*(addr + SP_OFF) = (unsigned32)(_stack + CPU_FRAME_SIZE);
|
*(addr + SP_OFF) = (unsigned32)(_stack_low + CPU_FRAME_SIZE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See if we are using shared libraries by checking
|
* See if we are using shared libraries by checking
|
||||||
@@ -274,8 +283,8 @@ void _CPU_Context_Initialize(
|
|||||||
asm ("ta 0x03"); /* flush registers */
|
asm ("ta 0x03"); /* flush registers */
|
||||||
|
|
||||||
*(addr + RP_OFF) = jmp_addr + ADDR_ADJ_OFFSET;
|
*(addr + RP_OFF) = jmp_addr + ADDR_ADJ_OFFSET;
|
||||||
*(addr + SP_OFF) = (unsigned32)(_stack +_the_size - CPU_FRAME_SIZE);
|
*(addr + SP_OFF) = (unsigned32)(_stack_high - CPU_FRAME_SIZE);
|
||||||
*(addr + FP_OFF) = (unsigned32)(_stack +_the_size);
|
*(addr + FP_OFF) = (unsigned32)(_stack_high);
|
||||||
#else
|
#else
|
||||||
#error "UNKNOWN CPU!!!"
|
#error "UNKNOWN CPU!!!"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -100,17 +100,12 @@ typedef struct {
|
|||||||
} Watchdog_Control;
|
} Watchdog_Control;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following type is used for synchronization purposes
|
* The following are used for synchronization purposes
|
||||||
* during an insert on a watchdog delta chain.
|
* during an insert on a watchdog delta chain.
|
||||||
*
|
|
||||||
* NOTE: Watchdog_Pointer is only used to insure that
|
|
||||||
* Watchdog_Synchronization_pointer is a pointer
|
|
||||||
* which is volatile rather than a pointer to a
|
|
||||||
* volatile block of memory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef Watchdog_Control *Watchdog_Pointer;
|
volatile unsigned32 _Watchdog_Sync_level;
|
||||||
typedef volatile Watchdog_Pointer Watchdog_Synchronization_pointer;
|
volatile unsigned32 _Watchdog_Sync_count;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following defines the watchdog chains which are managed
|
* The following defines the watchdog chains which are managed
|
||||||
@@ -120,14 +115,6 @@ typedef volatile Watchdog_Pointer Watchdog_Synchronization_pointer;
|
|||||||
EXTERN Chain_Control _Watchdog_Ticks_chain;
|
EXTERN Chain_Control _Watchdog_Ticks_chain;
|
||||||
EXTERN Chain_Control _Watchdog_Seconds_chain;
|
EXTERN Chain_Control _Watchdog_Seconds_chain;
|
||||||
|
|
||||||
/*
|
|
||||||
* The following defines the synchronization variable used to
|
|
||||||
* allow interrupts to be enabled while inserting a watchdog
|
|
||||||
* on a watchdog chain.
|
|
||||||
*/
|
|
||||||
|
|
||||||
EXTERN Watchdog_Synchronization_pointer _Watchdog_Sync;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _Watchdog_Handler_initialization
|
* _Watchdog_Handler_initialization
|
||||||
*
|
*
|
||||||
@@ -375,46 +362,6 @@ STATIC INLINE Watchdog_Control *_Watchdog_Last(
|
|||||||
Chain_Control *header
|
Chain_Control *header
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
* _Watchdog_Get_sync
|
|
||||||
*
|
|
||||||
* DESCRIPTION:
|
|
||||||
*
|
|
||||||
* This routine returns the current synchronization timer. This
|
|
||||||
* routine is used so that interrupts can be enabled while a
|
|
||||||
* watchdog timer is being inserted into a watchdog chain.
|
|
||||||
*/
|
|
||||||
|
|
||||||
STATIC INLINE Watchdog_Control *_Watchdog_Get_sync( void );
|
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
* _Watchdog_Set_sync
|
|
||||||
*
|
|
||||||
* DESCRIPTION:
|
|
||||||
*
|
|
||||||
* This routine sets the current synchronization timer. This
|
|
||||||
* routine is used so that interrupts can be enabled while a
|
|
||||||
* watchdog timer is being inserted into a watchdog chain.
|
|
||||||
*/
|
|
||||||
|
|
||||||
STATIC INLINE void _Watchdog_Set_sync(
|
|
||||||
Watchdog_Control *the_watchdog
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
* _Watchdog_Clear_sync
|
|
||||||
*
|
|
||||||
* DESCRIPTION:
|
|
||||||
*
|
|
||||||
* This routine will set the watchdog synchronization flag to a
|
|
||||||
* NULL address indicating synchronization is unnecessary.
|
|
||||||
*/
|
|
||||||
|
|
||||||
STATIC INLINE void _Watchdog_Clear_sync( void );
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _Watchdog_Adjust
|
* _Watchdog_Adjust
|
||||||
*
|
*
|
||||||
@@ -427,7 +374,7 @@ STATIC INLINE void _Watchdog_Clear_sync( void );
|
|||||||
void _Watchdog_Adjust (
|
void _Watchdog_Adjust (
|
||||||
Chain_Control *header,
|
Chain_Control *header,
|
||||||
Watchdog_Adjust_directions direction,
|
Watchdog_Adjust_directions direction,
|
||||||
rtems_interval units
|
rtems_interval units
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -257,40 +257,5 @@ STATIC INLINE Watchdog_Control *_Watchdog_Last(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* _Watchdog_Get_sync
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
STATIC INLINE Watchdog_Control *_Watchdog_Get_sync( void )
|
|
||||||
{
|
|
||||||
return (Watchdog_Control *) _Watchdog_Sync;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* _Watchdog_Set_sync
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
STATIC INLINE void _Watchdog_Set_sync(
|
|
||||||
Watchdog_Control *the_watchdog
|
|
||||||
)
|
|
||||||
{
|
|
||||||
_Watchdog_Sync = (Watchdog_Synchronization_pointer) the_watchdog;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* _Watchdog_Clear_sync
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
STATIC INLINE void _Watchdog_Clear_sync( void )
|
|
||||||
{
|
|
||||||
_Watchdog_Sync = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/* end of include file */
|
/* end of include file */
|
||||||
|
|||||||
@@ -171,32 +171,5 @@
|
|||||||
#define _Watchdog_Last( _header ) \
|
#define _Watchdog_Last( _header ) \
|
||||||
((Watchdog_Control *) (_header)->last)
|
((Watchdog_Control *) (_header)->last)
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* _Watchdog_Get_sync
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define _Watchdog_Get_sync() \
|
|
||||||
((Watchdog_Control *) _Watchdog_Sync)
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* _Watchdog_Set_sync
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define _Watchdog_Set_sync( _the_watchdog ) \
|
|
||||||
_Watchdog_Sync = (Watchdog_Synchronization_pointer) (_the_watchdog)
|
|
||||||
|
|
||||||
/*PAGE
|
|
||||||
*
|
|
||||||
* _Watchdog_Clear_sync
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define _Watchdog_Clear_sync() \
|
|
||||||
_Watchdog_Sync = NULL;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/* end of include file */
|
/* end of include file */
|
||||||
|
|||||||
@@ -116,8 +116,13 @@ Heap_Extend_status _Heap_Extend(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
Heap_Block *the_block;
|
Heap_Block *the_block;
|
||||||
Heap_Block *next_block;
|
|
||||||
Heap_Block *previous_block;
|
/*
|
||||||
|
* The overhead was taken from the original heap memory.
|
||||||
|
*/
|
||||||
|
|
||||||
|
Heap_Block *old_final;
|
||||||
|
Heap_Block *new_final;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* There are five possibilities for the location of starting
|
* There are five possibilities for the location of starting
|
||||||
@@ -150,24 +155,27 @@ Heap_Extend_status _Heap_Extend(
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Currently only case 4 should make it to this point.
|
* Currently only case 4 should make it to this point.
|
||||||
|
* The basic trick is to make the extend area look like a used
|
||||||
|
* block and free it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
*amount_extended = size - HEAP_BLOCK_USED_OVERHEAD;
|
*amount_extended = size;
|
||||||
|
|
||||||
previous_block = the_heap->last;
|
old_final = the_heap->final;
|
||||||
|
new_final = _Addresses_Add_offset( old_final, size );
|
||||||
|
/* SAME AS: _Addresses_Add_offset( starting_address, size-HEAP_OVERHEAD ); */
|
||||||
|
|
||||||
the_block = (Heap_Block *) starting_address;
|
the_heap->final = new_final;
|
||||||
the_block->front_flag = size;
|
|
||||||
the_block->next = previous_block->next;
|
|
||||||
the_block->previous = previous_block;
|
|
||||||
|
|
||||||
previous_block->next = the_block;
|
old_final->front_flag =
|
||||||
the_heap->last = the_block;
|
new_final->back_flag = _Heap_Build_flag( size, HEAP_BLOCK_USED );
|
||||||
|
new_final->front_flag = HEAP_DUMMY_FLAG;
|
||||||
|
|
||||||
next_block = _Heap_Next_block( the_block );
|
/*
|
||||||
next_block->back_flag = size;
|
* Must pass in address of "user" area
|
||||||
next_block->front_flag = HEAP_DUMMY_FLAG;
|
*/
|
||||||
the_heap->final = next_block;
|
|
||||||
|
_Heap_Free( the_heap, &old_final->next );
|
||||||
|
|
||||||
return HEAP_EXTEND_SUCCESSFUL;
|
return HEAP_EXTEND_SUCCESSFUL;
|
||||||
}
|
}
|
||||||
@@ -392,8 +400,8 @@ void _Heap_Walk(
|
|||||||
boolean do_dump
|
boolean do_dump
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Heap_Block *the_block;
|
Heap_Block *the_block = 0; /* avoid warnings */
|
||||||
Heap_Block *next_block;
|
Heap_Block *next_block = 0; /* avoid warnings */
|
||||||
int notdone = 1;
|
int notdone = 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -30,7 +30,8 @@
|
|||||||
|
|
||||||
void _Watchdog_Handler_initialization( void )
|
void _Watchdog_Handler_initialization( void )
|
||||||
{
|
{
|
||||||
_Watchdog_Clear_sync();
|
_Watchdog_Sync_count = 0;
|
||||||
|
_Watchdog_Sync_level = 0;
|
||||||
_Chain_Initialize_empty( &_Watchdog_Ticks_chain );
|
_Chain_Initialize_empty( &_Watchdog_Ticks_chain );
|
||||||
_Chain_Initialize_empty( &_Watchdog_Seconds_chain );
|
_Chain_Initialize_empty( &_Watchdog_Seconds_chain );
|
||||||
}
|
}
|
||||||
@@ -56,8 +57,17 @@ Watchdog_States _Watchdog_Remove(
|
|||||||
switch ( previous_state ) {
|
switch ( previous_state ) {
|
||||||
case WATCHDOG_INACTIVE:
|
case WATCHDOG_INACTIVE:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WATCHDOG_REINSERT:
|
||||||
|
|
||||||
|
/*
|
||||||
|
* It is not actually on the chain so just change the state and
|
||||||
|
* the Insert operation we interrupted will be aborted.
|
||||||
|
*/
|
||||||
|
the_watchdog->state = WATCHDOG_INACTIVE;
|
||||||
|
break;
|
||||||
|
|
||||||
case WATCHDOG_ACTIVE:
|
case WATCHDOG_ACTIVE:
|
||||||
case WATCHDOG_REINSERT:
|
|
||||||
case WATCHDOG_REMOVE_IT:
|
case WATCHDOG_REMOVE_IT:
|
||||||
|
|
||||||
the_watchdog->state = WATCHDOG_INACTIVE;
|
the_watchdog->state = WATCHDOG_INACTIVE;
|
||||||
@@ -66,8 +76,8 @@ Watchdog_States _Watchdog_Remove(
|
|||||||
if ( _Watchdog_Next(next_watchdog) )
|
if ( _Watchdog_Next(next_watchdog) )
|
||||||
next_watchdog->delta_interval += the_watchdog->delta_interval;
|
next_watchdog->delta_interval += the_watchdog->delta_interval;
|
||||||
|
|
||||||
if ( the_watchdog == _Watchdog_Sync )
|
if ( _Watchdog_Sync_count )
|
||||||
_Watchdog_Sync = _Watchdog_Previous( the_watchdog );
|
_Watchdog_Sync_level = _ISR_Nest_level;
|
||||||
|
|
||||||
_Chain_Extract_unprotected( &the_watchdog->Node );
|
_Chain_Extract_unprotected( &the_watchdog->Node );
|
||||||
break;
|
break;
|
||||||
@@ -94,7 +104,7 @@ Watchdog_States _Watchdog_Remove(
|
|||||||
void _Watchdog_Adjust(
|
void _Watchdog_Adjust(
|
||||||
Chain_Control *header,
|
Chain_Control *header,
|
||||||
Watchdog_Adjust_directions direction,
|
Watchdog_Adjust_directions direction,
|
||||||
rtems_interval units
|
rtems_interval units
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( !_Chain_Is_empty( header ) ) {
|
if ( !_Chain_Is_empty( header ) ) {
|
||||||
@@ -136,45 +146,66 @@ void _Watchdog_Insert(
|
|||||||
{
|
{
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
Watchdog_Control *after;
|
Watchdog_Control *after;
|
||||||
|
unsigned32 insert_isr_nest_level;
|
||||||
|
rtems_interval delta_interval;
|
||||||
|
|
||||||
|
|
||||||
the_watchdog->state = WATCHDOG_REINSERT;
|
insert_isr_nest_level = _ISR_Nest_level;
|
||||||
the_watchdog->delta_interval = the_watchdog->initial;
|
the_watchdog->state = WATCHDOG_REINSERT;
|
||||||
|
|
||||||
|
_Watchdog_Sync_count++;
|
||||||
|
restart:
|
||||||
|
delta_interval = the_watchdog->initial;
|
||||||
|
|
||||||
_ISR_Disable( level );
|
_ISR_Disable( level );
|
||||||
|
|
||||||
for ( after = _Watchdog_First( header ) ;
|
for ( after = _Watchdog_First( header ) ;
|
||||||
;
|
;
|
||||||
after = _Watchdog_Next( _Watchdog_Get_sync() ) ) {
|
after = _Watchdog_Next( after ) ) {
|
||||||
|
|
||||||
if ( the_watchdog->delta_interval == 0 || !_Watchdog_Next( after ) )
|
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if ( the_watchdog->delta_interval < after->delta_interval ) {
|
if ( delta_interval < after->delta_interval ) {
|
||||||
after->delta_interval -= the_watchdog->delta_interval;
|
after->delta_interval -= delta_interval;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
the_watchdog->delta_interval -= after->delta_interval;
|
delta_interval -= after->delta_interval;
|
||||||
_Watchdog_Set_sync( after );
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If you experience problems comment out the _ISR_Flash line. Under
|
* If you experience problems comment out the _ISR_Flash line. This
|
||||||
* certain circumstances, this flash allows interrupts to execute
|
* (3.2.0) is the first release with this critical section redesigned.
|
||||||
* which violate the design assumptions. The critical section
|
* Under certain circumstances, the PREVIOUS critical section algorithm
|
||||||
* mechanism used here must be redesigned to address this.
|
* used around this flash point allows interrupts to execute
|
||||||
|
* which violated the design assumptions. The critical section
|
||||||
|
* mechanism used here WAS redesigned to address this.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_ISR_Flash( level );
|
_ISR_Flash( level );
|
||||||
|
|
||||||
|
if ( the_watchdog->state != WATCHDOG_REINSERT ) {
|
||||||
|
goto exit_insert;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
|
||||||
|
_Watchdog_Sync_level = insert_isr_nest_level;
|
||||||
|
_ISR_Enable( level );
|
||||||
|
goto restart;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( insert_mode == WATCHDOG_ACTIVATE_NOW )
|
if ( insert_mode == WATCHDOG_ACTIVATE_NOW )
|
||||||
_Watchdog_Activate( the_watchdog );
|
_Watchdog_Activate( the_watchdog );
|
||||||
|
|
||||||
|
the_watchdog->delta_interval = delta_interval;
|
||||||
|
|
||||||
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
|
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
|
||||||
|
|
||||||
_Watchdog_Clear_sync();
|
exit_insert:
|
||||||
|
_Watchdog_Sync_level = insert_isr_nest_level;
|
||||||
_ISR_Enable( level );
|
_Watchdog_Sync_count--;
|
||||||
|
_ISR_Enable( level );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* task1.c,v 1.2 1995/05/09 20:26:24 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
@@ -43,7 +43,7 @@ rtems_task Test_task(
|
|||||||
put_name( Task_name[ task_number( tid ) ], FALSE );
|
put_name( Task_name[ task_number( tid ) ], FALSE );
|
||||||
print_time( " - rtems_clock_get - ", &time, "\n" );
|
print_time( " - rtems_clock_get - ", &time, "\n" );
|
||||||
|
|
||||||
status = rtems_task_wake_after( task_number( tid ) * 5 * TICKS_PER_SECOND );
|
status = rtems_task_wake_after( task_number( tid ) * 1 * TICKS_PER_SECOND );
|
||||||
directive_failed( status, "rtems_task_wake_after" );
|
directive_failed( status, "rtems_task_wake_after" );
|
||||||
|
|
||||||
status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
|
status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* tswitch.c,v 1.2 1995/05/09 20:32:43 joel Exp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
@@ -44,7 +44,7 @@ rtems_extension Task_switch(
|
|||||||
directive_failed( status, "rtems_clock_get" );
|
directive_failed( status, "rtems_clock_get" );
|
||||||
|
|
||||||
put_name( Task_name[ index ], FALSE );
|
put_name( Task_name[ index ], FALSE );
|
||||||
print_time( " - ", &time, "\n" );
|
print_time( "- ", &time, "\n" );
|
||||||
|
|
||||||
if ( time.second >= 16 ) {
|
if ( time.second >= 16 ) {
|
||||||
puts( "*** END OF TEST 4 ***" );
|
puts( "*** END OF TEST 4 ***" );
|
||||||
|
|||||||
@@ -76,14 +76,6 @@ void Screen14()
|
|||||||
);
|
);
|
||||||
puts( "TA1 - rtems_timer_cancel - RTEMS_INVALID_ID" );
|
puts( "TA1 - rtems_timer_cancel - RTEMS_INVALID_ID" );
|
||||||
|
|
||||||
status = rtems_timer_cancel( Timer_id[ 1 ] );
|
|
||||||
fatal_directive_status(
|
|
||||||
status,
|
|
||||||
RTEMS_INCORRECT_STATE,
|
|
||||||
"rtems_timer_cancel before initiated"
|
|
||||||
);
|
|
||||||
puts( "TA1 - rtems_timer_cancel - RTEMS_INCORRECT_STATE" );
|
|
||||||
|
|
||||||
status = rtems_timer_reset( 0x010100 );
|
status = rtems_timer_reset( 0x010100 );
|
||||||
fatal_directive_status(
|
fatal_directive_status(
|
||||||
status,
|
status,
|
||||||
|
|||||||
@@ -237,7 +237,6 @@ TA1 - rtems_timer_delete - local RTEMS_INVALID_ID
|
|||||||
TA1 - rtems_timer_delete - global RTEMS_INVALID_ID
|
TA1 - rtems_timer_delete - global RTEMS_INVALID_ID
|
||||||
TA1 - rtems_timer_ident - RTEMS_INVALID_NAME
|
TA1 - rtems_timer_ident - RTEMS_INVALID_NAME
|
||||||
TA1 - rtems_timer_cancel - RTEMS_INVALID_ID
|
TA1 - rtems_timer_cancel - RTEMS_INVALID_ID
|
||||||
TA1 - rtems_timer_cancel - RTEMS_INCORRECT_STATE
|
|
||||||
TA1 - rtems_timer_reset - RTEMS_INVALID_ID
|
TA1 - rtems_timer_reset - RTEMS_INVALID_ID
|
||||||
TA1 - rtems_timer_reset - RTEMS_NOT_DEFINED
|
TA1 - rtems_timer_reset - RTEMS_NOT_DEFINED
|
||||||
TA1 - rtems_timer_fire_after - RTEMS_INVALID_ID
|
TA1 - rtems_timer_fire_after - RTEMS_INVALID_ID
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ TA4 - rtems_rate_monotonic_ident id = 0x00010004
|
|||||||
TA4 - (0x00010004) period 2
|
TA4 - (0x00010004) period 2
|
||||||
TA5 - rtems_rate_monotonic_create id = 0x00010005
|
TA5 - rtems_rate_monotonic_create id = 0x00010005
|
||||||
TA5 - rtems_rate_monotonic_ident id = 0x00010005
|
TA5 - rtems_rate_monotonic_ident id = 0x00010005
|
||||||
TA5 - (0x00010005) period 50
|
TA5 - (0x00010005) period 100
|
||||||
TA5 - PERIODS CHECK OK (1)
|
TA5 - PERIODS CHECK OK (1)
|
||||||
TA5 - PERIODS CHECK OK (2)
|
TA5 - PERIODS CHECK OK (2)
|
||||||
TA5 - PERIODS CHECK OK (3)
|
TA5 - PERIODS CHECK OK (3)
|
||||||
|
|||||||
@@ -332,7 +332,8 @@ uninitialized =
|
|||||||
|
|
||||||
/*watchdog.h*/ (sizeof _Watchdog_Ticks_chain) +
|
/*watchdog.h*/ (sizeof _Watchdog_Ticks_chain) +
|
||||||
(sizeof _Watchdog_Seconds_chain) +
|
(sizeof _Watchdog_Seconds_chain) +
|
||||||
(sizeof _Watchdog_Sync) +
|
(sizeof _Watchdog_Sync_count) +
|
||||||
|
(sizeof _Watchdog_Sync_level) +
|
||||||
|
|
||||||
/*wkspace.h*/ (sizeof _Workspace_Area);
|
/*wkspace.h*/ (sizeof _Workspace_Area);
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* @(#)genoffsets.c 1.3 - 95/03/15
|
* @(#)genoffsets.c 1.5 - 95/05/16
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* genoffsets.c
|
* genoffsets.c
|
||||||
*
|
*
|
||||||
* This file generates the offsets.h for the HP PA-RISC port of RTEMS.
|
* This file generates the offsets.h for the HP PA-RISC port of RTEMS.
|
||||||
*
|
*
|
||||||
* NOTE: It only prints the offset for structures actually used
|
* NOTE: It only prints the offset for structures actually used
|
||||||
* by the assembly code.
|
* by the assembly code.
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||||
* notice must appear in all copies of this file and its derivatives.
|
* notice must appear in all copies of this file and its derivatives.
|
||||||
*
|
*
|
||||||
* $Id$
|
* genoffsets.c,v 1.2 1995/05/09 20:16:48 joel Exp
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user