mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-27 23:10:16 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7dc3529ea4 |
@@ -21,10 +21,10 @@ The following persons/organizations have made contributions:
|
||||
Research to port RTEMS to the Hewlett-Packard PA-RISC architecture (V1.1)
|
||||
and the addition of HP-UX as a development host. Tony Bennett
|
||||
(tbennett@divnc.com) was assisted in this effort by Joel Sherrill
|
||||
(joel@OARcorp.com). Tony also deserves a big pat on the back for
|
||||
contributing significantly to the overall organization of the development
|
||||
environment and directory structure. RTEMS is much easier to build
|
||||
because of Tony.
|
||||
(jsherril@redstone.army.mil). Tony also deserves a big pat on the
|
||||
back for contributing significantly to the overall organization
|
||||
of the development environment and directory structure. RTEMS
|
||||
is much easier to build because of Tony.
|
||||
|
||||
+ Greg Allen of Division Inc. of Chapel Hill, NC for
|
||||
porting RTEMS to HP-UX. This port treats a UNIX computer as simply
|
||||
@@ -75,10 +75,6 @@ The following persons/organizations have made contributions:
|
||||
Laboratory submitted the support for the Motorola MC68360 CPU
|
||||
including the `gen68360' BSP.
|
||||
|
||||
+ Dominique le Campion (Dominique.LECAMPION@enst-bretagne.fr), for
|
||||
Telecom Bretagne and T.N.I. (Brest, France) submitted the BSP for
|
||||
the Motorola MVME147 board (68030 CPU + 68881 FPU).
|
||||
|
||||
Finally, the RTEMS project would like to thank those who have contributed
|
||||
to the other free software efforts which RTEMS utilizes. The primary RTEMS
|
||||
development environment is from the Free Software Foundation (the GNU
|
||||
|
||||
18
c/PROBLEMS
18
c/PROBLEMS
@@ -4,21 +4,23 @@
|
||||
|
||||
This is the list of outstanding problems in this release.
|
||||
|
||||
+ The POSIX threads and real time extensions code in this tree are
|
||||
not completely tested yet. Some of the POSIX tests do run but none
|
||||
of the POSIX code is in the normal build path.
|
||||
+ The POSIX threads and real time extensions code in this tree does
|
||||
not work yet and is intentionally not in the normal build path.
|
||||
|
||||
+ The test spfatal is out of date and as a result will NOT execute
|
||||
correctly. The addition of POSIX and consequent ongoing initialization
|
||||
reorganization makes it pointless to fix this until the POSIX support
|
||||
is completely in place.
|
||||
|
||||
+ The m68k family has become quite large and an understanding of the
|
||||
compatibility of the peripherals on the various members of the 683xx
|
||||
family would allow someone to designate some of the drivers submitted
|
||||
for the gen683xx BSPs as useful on other members.
|
||||
+ The m68000 support is nearly complete now. The missing piece
|
||||
inside the executive proper is support for the software interrupt
|
||||
stack. Also, the m68k family has become quite large and an
|
||||
understanding of the compatibility of the peripherals on the various
|
||||
members of the 683xx family would allow someone to designate some
|
||||
of the drivers submitted for the gen683xx BSPs as useful on other
|
||||
members.
|
||||
|
||||
+ The only supported i960 family member is the CA. No support for the
|
||||
+ The only i960 family member tested is the CA. No support for the
|
||||
floating point support found in other family members is present.
|
||||
This also implies that RTEMS may "think" of something as generic
|
||||
across the i960 family when in fact it is specific to the CA.
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
1. The installation procedure assumes that "gcc" is installed
|
||||
and is in your path for the installation of local tools.
|
||||
|
||||
2. gcc 2.7.2 with crossgcc patches (ftp.cygnus.com:/pub/embedded/crossgcc)
|
||||
2. gcc 2.6.3 with crossgcc patches (ftp.cygnus.com:/pub/embedded)
|
||||
|
||||
3. binutils 2.6 with crossgcc patches.
|
||||
3. binutils 2.5.2
|
||||
|
||||
4. newlib with RTEMS configurations.
|
||||
|
||||
|
||||
75
c/TESTED
75
c/TESTED
@@ -2,50 +2,55 @@
|
||||
# $Id$
|
||||
#
|
||||
|
||||
This file is current as of the 3.5.17 snapshot.
|
||||
The RTEMS Project does not have all of the development computers or
|
||||
target boards included in the RTEMS distribution. Many of the BSPs
|
||||
are user supplied and we try to insure that they compile before each
|
||||
full release. This file describes the range of configurations the
|
||||
RTEMS project can internally test.
|
||||
|
||||
The RTEMS project uses SparcStations running the Solaris 2.3 operating
|
||||
system internally for development. This release has been tested on the
|
||||
following Languages/CPUs/Targets using Solaris 2.3/SPARC as the host
|
||||
environment:
|
||||
Host Development Systems
|
||||
========================
|
||||
|
||||
CPU CPU
|
||||
LANGUAGE FAMILY MODEL TARGET SUITES
|
||||
======== ====== ========= =================== ===============
|
||||
C m68k m68000 efi68k (note 1)
|
||||
C m68k m68020 Motorola MVME136 ALL TESTS
|
||||
C m68k m68020 Motorola MVME147 (note 1)
|
||||
C m68k m68lc040 Motorola MVME162 (note 1)
|
||||
C m68k m68ec040 Motorola IDP (note 1)
|
||||
C m68k m68020 DY-4 DMV152 (note 1)
|
||||
C m68k m68302 generic 68302 (note 1)
|
||||
C m68k m68332 efi332 (note 1)
|
||||
C m68k m68302 generic 68360 (note 1)
|
||||
C i386 i386_fp Force CPU-386 ALL TESTS
|
||||
C i386 i486 DJGPP/PC-AT ALL TESTS
|
||||
C i386 pentium DJGPP/PC-AT ALL TESTS
|
||||
C i960 i960ca Cyclone CVME961 (note 4)
|
||||
C hppa hppa7100 simhppa (note 1)
|
||||
C ppc 403 Papyrus (note 1)
|
||||
C UNIX NA Solaris 2 (SPARC) ALL TESTS (inlines)
|
||||
C UNIX NA Solaris 2 (SPARC) ALL TESTS (macros)
|
||||
C UNIX NA Linux (i386) NOT TESTED
|
||||
C UNIX NA HPUX (PA-RISC) (note 2)
|
||||
C no_cpu NA no_bsp (note 3)
|
||||
All RTEMS development is done on a Sun SPARCStation running Solaris 2.3 and
|
||||
all other host systems are not tested internally.
|
||||
|
||||
NOTES:
|
||||
Target Systems
|
||||
==============
|
||||
|
||||
"NOT TESTED" indicates that this was not tested in the testing cycle
|
||||
immediately preceding the snapshot.
|
||||
The following table describes the testability of each BSP by the RTEMS project:
|
||||
|
||||
CPU CPU
|
||||
FAMILY MODEL TARGET STATUS
|
||||
====== ========= =================== =================
|
||||
m68k m68000 efi68k (note 1)
|
||||
m68k m68020 Motorola MVME136 TESTED INTERNALLY
|
||||
m68k m68lc040 Motorola MVME162 (note 1)
|
||||
m68k m68ec040 Motorola IDP (note 1)
|
||||
m68k m68020 DY-4 DMV152 (note 1)
|
||||
m68k m68302 generic 68302 (note 1)
|
||||
m68k m68332 efi332 (note 1)
|
||||
i386 i386_fp Force CPU-386 TESTED INTERNALLY
|
||||
i386 i486 DJGPP/PC-AT TESTED INTERNALLY
|
||||
i386 pentium DJGPP/PC-AT TESTED INTERNALLY
|
||||
i960 i960ca Cyclone CVME961 (note 4)
|
||||
hppa hppa7100 simhppa (note 2)
|
||||
ppc 403 Papyrus (note 2)
|
||||
UNIX NA Solaris 2 (SPARC) TESTED INTERNALLY (inlines)
|
||||
UNIX NA Solaris 2 (SPARC) TESTED INTERNALLY (macros)
|
||||
UNIX NA Linux (i386) (note 5)
|
||||
UNIX NA HPUX (PA-RISC) (note 2)
|
||||
no_cpu NA no_bsp (note 3)
|
||||
|
||||
|
||||
(1) Target board is not owned by RTEMS Project. The target is known
|
||||
to compile and link with all appropriate tests successfully.
|
||||
If the target does not support multiprocessor configurations, then
|
||||
"ALL TESTS" does not include the multiprocessor tests.
|
||||
|
||||
|
||||
(2) RTEMS Project cannot internally compile or test this target.
|
||||
|
||||
|
||||
(3) Target is not intended to be executed. It is only an example.
|
||||
|
||||
(4) The RTEMS Project owns this board but it is broken at the moment.
|
||||
|
||||
(4) The board owned by the RTEMS Project is broken. The BSP is known
|
||||
to compile and link with all appropriate tests successfully.
|
||||
(5) The RTEMS Project owns a Linux host but does not regularly test this BSP.
|
||||
|
||||
@@ -88,12 +88,8 @@ void error(int errn, ...);
|
||||
#define ERR_ABORT (ERR_ERRNO / 4) /* error is fatal; abort */
|
||||
#define ERR_MASK (ERR_ERRNO | ERR_FATAL | ERR_ABORT) /* all */
|
||||
|
||||
#if (defined(sparc) && (sunos < 500))
|
||||
#define stol(p) strtol(p, (char **) NULL, 0) /* Sunos */
|
||||
#else
|
||||
#define stol(p) strtoul(p, (char **) NULL, 0) /* Solaris */
|
||||
#endif
|
||||
|
||||
#define stol(p) strtoul(p, (char **) NULL, 0)
|
||||
|
||||
int unhex(FILE *ifp, char *inm, FILE *ofp, char *onm);
|
||||
int convert_Intel_records(FILE *ifp, char *inm, FILE *ofp, char *onm);
|
||||
int convert_S_records(FILE *ifp, char *inm, FILE *ofp, char *onm);
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/* config.h
|
||||
*
|
||||
* This include file contains the table of user defined configuration
|
||||
* parameters specific for the RTEMS API.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __RTEMS_RTEMS_CONFIGURATION_h
|
||||
#define __RTEMS_RTEMS_CONFIGURATION_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rtems/rtems/types.h>
|
||||
#include <rtems/rtems/tasks.h>
|
||||
|
||||
/*
|
||||
* The following records define the Configuration Table. The
|
||||
* information contained in this table is required in all
|
||||
* RTEMS systems, whether single or multiprocessor. This
|
||||
* table primarily defines the following:
|
||||
*
|
||||
* + required number of each object type
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
unsigned32 maximum_tasks;
|
||||
unsigned32 maximum_timers;
|
||||
unsigned32 maximum_semaphores;
|
||||
unsigned32 maximum_message_queues;
|
||||
unsigned32 maximum_partitions;
|
||||
unsigned32 maximum_regions;
|
||||
unsigned32 maximum_ports;
|
||||
unsigned32 maximum_periods;
|
||||
unsigned32 number_of_initialization_tasks;
|
||||
rtems_initialization_tasks_table *User_initialization_tasks_table;
|
||||
} rtems_api_configuration_table;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
@@ -51,7 +51,7 @@ typedef struct {
|
||||
* The following define the internal Dual Ported Memory information.
|
||||
*/
|
||||
|
||||
RTEMS_EXTERN Objects_Information _Dual_ported_memory_Information;
|
||||
EXTERN Objects_Information _Dual_ported_memory_Information;
|
||||
|
||||
/*
|
||||
* _Dual_ported_memory_Manager_initialization
|
||||
|
||||
@@ -159,7 +159,7 @@ void _Event_Timeout (
|
||||
* executing thread are received properly.
|
||||
*/
|
||||
|
||||
RTEMS_EXTERN volatile Event_Sync_states _Event_Sync_state;
|
||||
EXTERN volatile Event_Sync_states _Event_Sync_state;
|
||||
|
||||
#include <rtems/rtems/eventmp.h>
|
||||
#ifndef __RTEMS_APPLICATION__
|
||||
|
||||
@@ -68,7 +68,7 @@ typedef struct {
|
||||
* manage this class of objects.
|
||||
*/
|
||||
|
||||
RTEMS_EXTERN Objects_Information _Message_queue_Information;
|
||||
EXTERN Objects_Information _Message_queue_Information;
|
||||
|
||||
/*
|
||||
* _Message_queue_Manager_initialization
|
||||
|
||||
@@ -55,7 +55,7 @@ typedef struct {
|
||||
* manage this class of objects.
|
||||
*/
|
||||
|
||||
RTEMS_EXTERN Objects_Information _Partition_Information;
|
||||
EXTERN Objects_Information _Partition_Information;
|
||||
|
||||
/*
|
||||
* _Partition_Manager_initialization
|
||||
|
||||
@@ -67,7 +67,7 @@ typedef struct {
|
||||
Thread_Control *owner;
|
||||
} Rate_monotonic_Control;
|
||||
|
||||
RTEMS_EXTERN Objects_Information _Rate_monotonic_Information;
|
||||
EXTERN Objects_Information _Rate_monotonic_Information;
|
||||
|
||||
/*
|
||||
* _Rate_monotonic_Manager_initialization
|
||||
|
||||
@@ -59,7 +59,7 @@ typedef struct {
|
||||
* manage this class of objects.
|
||||
*/
|
||||
|
||||
RTEMS_EXTERN Objects_Information _Region_Information;
|
||||
EXTERN Objects_Information _Region_Information;
|
||||
|
||||
/*
|
||||
* _Region_Manager_initialization
|
||||
|
||||
@@ -58,7 +58,7 @@ typedef struct {
|
||||
* this class of objects.
|
||||
*/
|
||||
|
||||
RTEMS_EXTERN Objects_Information _Semaphore_Information;
|
||||
EXTERN Objects_Information _Semaphore_Information;
|
||||
|
||||
/*
|
||||
* _Semaphore_Manager_initialization
|
||||
|
||||
@@ -60,7 +60,7 @@ typedef enum {
|
||||
|
||||
extern rtems_status_code _Status_Object_name_errors_to_status[];
|
||||
|
||||
#ifdef RTEMS_API_INIT
|
||||
#ifdef INIT
|
||||
rtems_status_code _Status_Object_name_errors_to_status[] = {
|
||||
RTEMS_SUCCESSFUL, /* OBJECTS_SUCCESSFUL */
|
||||
RTEMS_INVALID_NAME, /* OBJECTS_INVALID_NAME */
|
||||
|
||||
@@ -45,7 +45,6 @@ extern "C" {
|
||||
#include <rtems/rtems/eventset.h>
|
||||
#include <rtems/rtems/asr.h>
|
||||
#include <rtems/rtems/attr.h>
|
||||
#include <rtems/rtems/status.h>
|
||||
|
||||
/*
|
||||
* Constant to be used as the ID of current task
|
||||
@@ -164,15 +163,14 @@ typedef struct {
|
||||
* manage this class of objects.
|
||||
*/
|
||||
|
||||
RTEMS_EXTERN Objects_Information _RTEMS_tasks_Information;
|
||||
EXTERN Objects_Information _RTEMS_tasks_Information;
|
||||
|
||||
/*
|
||||
* These are used to manage the user initialization tasks.
|
||||
*/
|
||||
|
||||
RTEMS_EXTERN rtems_initialization_tasks_table
|
||||
*_RTEMS_tasks_User_initialization_tasks;
|
||||
RTEMS_EXTERN unsigned32 _RTEMS_tasks_Number_of_initialization_tasks;
|
||||
EXTERN rtems_initialization_tasks_table *_RTEMS_tasks_User_initialization_tasks;
|
||||
EXTERN unsigned32 _RTEMS_tasks_Number_of_initialization_tasks;
|
||||
|
||||
/*
|
||||
* _RTEMS_tasks_Manager_initialization
|
||||
|
||||
@@ -64,7 +64,7 @@ typedef rtems_timer_service_routine ( *rtems_timer_service_routine_entry )(
|
||||
* this class of objects.
|
||||
*/
|
||||
|
||||
RTEMS_EXTERN Objects_Information _Timer_Information;
|
||||
EXTERN Objects_Information _Timer_Information;
|
||||
|
||||
/*
|
||||
* The following records define the control block used to manage
|
||||
|
||||
@@ -62,7 +62,7 @@ rtems_status_code rtems_clock_get(
|
||||
return RTEMS_SUCCESSFUL;
|
||||
|
||||
case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT:
|
||||
*(rtems_interval *)time_buffer = _Watchdog_Ticks_since_boot;
|
||||
*(rtems_interval *)time_buffer = _TOD_Ticks_since_boot;
|
||||
return RTEMS_SUCCESSFUL;
|
||||
|
||||
case RTEMS_CLOCK_GET_TICKS_PER_SECOND:
|
||||
|
||||
@@ -126,8 +126,7 @@ rtems_status_code rtems_semaphore_create(
|
||||
if ( _Attributes_Is_inherit_priority( attribute_set ) )
|
||||
return RTEMS_NOT_DEFINED;
|
||||
|
||||
} else if ( _Attributes_Is_inherit_priority( attribute_set ) ||
|
||||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
|
||||
} else if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
|
||||
|
||||
if ( ! ( _Attributes_Is_binary_semaphore( attribute_set ) &&
|
||||
_Attributes_Is_priority( attribute_set ) ) )
|
||||
|
||||
@@ -174,14 +174,8 @@ void _RTEMS_tasks_Manager_initialization(
|
||||
_RTEMS_tasks_Number_of_initialization_tasks = number_of_initialization_tasks;
|
||||
_RTEMS_tasks_User_initialization_tasks = user_tasks;
|
||||
|
||||
/*
|
||||
* There may not be any RTEMS initialization tasks configured.
|
||||
*/
|
||||
|
||||
#if 0
|
||||
if ( user_tasks == NULL || number_of_initialization_tasks == 0 )
|
||||
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, RTEMS_TOO_MANY );
|
||||
#endif
|
||||
|
||||
_Objects_Initialize_information(
|
||||
&_RTEMS_tasks_Information,
|
||||
@@ -354,10 +348,7 @@ rtems_status_code rtems_task_create(
|
||||
is_fp,
|
||||
core_priority,
|
||||
_Modes_Is_preempt(initial_modes) ? TRUE : FALSE,
|
||||
_Modes_Is_timeslice(initial_modes) ?
|
||||
THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE :
|
||||
THREAD_CPU_BUDGET_ALGORITHM_NONE,
|
||||
NULL, /* no budget algorithm callout */
|
||||
_Modes_Is_timeslice(initial_modes) ? TRUE : FALSE,
|
||||
_Modes_Get_interrupt_level(initial_modes),
|
||||
&name
|
||||
);
|
||||
@@ -780,12 +771,7 @@ rtems_status_code rtems_task_mode(
|
||||
asr = &api->Signal;
|
||||
|
||||
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
|
||||
|
||||
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
|
||||
old_mode |= RTEMS_NO_TIMESLICE;
|
||||
else
|
||||
old_mode |= RTEMS_TIMESLICE;
|
||||
|
||||
old_mode |= (executing->is_timeslice) ? RTEMS_TIMESLICE : RTEMS_NO_TIMESLICE;
|
||||
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
|
||||
old_mode |= _ISR_Get_level();
|
||||
|
||||
@@ -798,12 +784,8 @@ rtems_status_code rtems_task_mode(
|
||||
if ( mask & RTEMS_PREEMPT_MASK )
|
||||
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? TRUE : FALSE;
|
||||
|
||||
if ( mask & RTEMS_TIMESLICE_MASK ) {
|
||||
if ( _Modes_Is_timeslice(mode_set) )
|
||||
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
|
||||
else
|
||||
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
|
||||
}
|
||||
if ( mask & RTEMS_TIMESLICE_MASK )
|
||||
executing->is_timeslice = _Modes_Is_timeslice(mode_set) ? TRUE : FALSE;
|
||||
|
||||
/*
|
||||
* Set the new interrupt level
|
||||
@@ -1090,9 +1072,6 @@ void _RTEMS_tasks_Initialize_user_tasks( void )
|
||||
user_tasks = _RTEMS_tasks_User_initialization_tasks;
|
||||
maximum = _RTEMS_tasks_Number_of_initialization_tasks;
|
||||
|
||||
if ( !user_tasks || maximum == 0 )
|
||||
return;
|
||||
|
||||
for ( index=0 ; index < maximum ; index++ ) {
|
||||
return_value = rtems_task_create(
|
||||
user_tasks[ index ].name,
|
||||
|
||||
@@ -21,29 +21,12 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This is kind of kludgy but it allows targets to totally ignore the
|
||||
* POSIX API safely.
|
||||
*/
|
||||
|
||||
#ifdef RTEMS_POSIX_API
|
||||
#include <rtems/posix/config.h>
|
||||
#else
|
||||
|
||||
typedef void *posix_api_configuration_table;
|
||||
#endif
|
||||
|
||||
#include <rtems/rtems/config.h>
|
||||
|
||||
/* XXX <rtems/rtems/config.h> should cover these
|
||||
#include <rtems/rtems/status.h>
|
||||
#include <rtems/rtems/types.h>
|
||||
#include <rtems/rtems/tasks.h>
|
||||
*/
|
||||
|
||||
#include <rtems/extension.h>
|
||||
#include <rtems/io.h>
|
||||
#include <rtems/score/mpci.h>
|
||||
#include <rtems/rtems/types.h>
|
||||
#include <rtems/rtems/tasks.h>
|
||||
|
||||
/*
|
||||
* The following records define the Multiprocessor Configuration
|
||||
@@ -67,24 +50,32 @@ typedef struct {
|
||||
* table primarily defines the following:
|
||||
*
|
||||
* + location and size of the RTEMS Workspace
|
||||
* + required number of each object type
|
||||
* + microseconds per clock tick
|
||||
* + clock ticks per task timeslice
|
||||
* + required number of each object type for each API configured
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
void *work_space_start;
|
||||
unsigned32 work_space_size;
|
||||
unsigned32 maximum_tasks;
|
||||
unsigned32 maximum_timers;
|
||||
unsigned32 maximum_semaphores;
|
||||
unsigned32 maximum_message_queues;
|
||||
unsigned32 maximum_partitions;
|
||||
unsigned32 maximum_regions;
|
||||
unsigned32 maximum_ports;
|
||||
unsigned32 maximum_periods;
|
||||
unsigned32 maximum_extensions;
|
||||
unsigned32 microseconds_per_tick;
|
||||
unsigned32 ticks_per_timeslice;
|
||||
unsigned32 maximum_devices;
|
||||
unsigned32 number_of_initialization_tasks;
|
||||
rtems_initialization_tasks_table *User_initialization_tasks_table;
|
||||
unsigned32 number_of_device_drivers;
|
||||
unsigned32 maximum_devices;
|
||||
rtems_driver_address_table *Device_driver_table;
|
||||
rtems_extensions_table *User_extension_table;
|
||||
rtems_multiprocessing_table *User_multiprocessing_table;
|
||||
rtems_api_configuration_table *RTEMS_api_configuration;
|
||||
posix_api_configuration_table *POSIX_api_configuration;
|
||||
} rtems_configuration_table;
|
||||
|
||||
/*
|
||||
@@ -92,8 +83,8 @@ typedef struct {
|
||||
* the user. They are not used in RTEMS itself.
|
||||
*/
|
||||
|
||||
SAPI_EXTERN rtems_configuration_table *_Configuration_Table;
|
||||
SAPI_EXTERN rtems_multiprocessing_table *_Configuration_MP_table;
|
||||
EXTERN rtems_configuration_table *_Configuration_Table;
|
||||
EXTERN rtems_multiprocessing_table *_Configuration_MP_table;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ typedef User_extensions_Table rtems_extensions_table;
|
||||
* this class of objects.
|
||||
*/
|
||||
|
||||
SAPI_EXTERN Objects_Information _Extension_Information;
|
||||
EXTERN Objects_Information _Extension_Information;
|
||||
|
||||
/*
|
||||
* The following records define the control block used to manage
|
||||
|
||||
@@ -86,10 +86,10 @@ typedef struct {
|
||||
* Address Table and Device Name Table.
|
||||
*/
|
||||
|
||||
SAPI_EXTERN unsigned32 _IO_Number_of_drivers;
|
||||
SAPI_EXTERN rtems_driver_address_table *_IO_Driver_address_table;
|
||||
SAPI_EXTERN unsigned32 _IO_Number_of_devices;
|
||||
SAPI_EXTERN rtems_driver_name_t *_IO_Driver_name_table;
|
||||
EXTERN unsigned32 _IO_Number_of_drivers;
|
||||
EXTERN rtems_driver_address_table *_IO_Driver_address_table;
|
||||
EXTERN unsigned32 _IO_Number_of_devices;
|
||||
EXTERN rtems_driver_name_t *_IO_Driver_name_table;
|
||||
|
||||
/*
|
||||
* _IO_Manager_initialization
|
||||
|
||||
@@ -62,7 +62,7 @@ const rtems_multiprocessing_table
|
||||
*/
|
||||
|
||||
const char _RTEMS_version[] =
|
||||
"RTEMS RELEASE V3.5.17 snapshot (" CPU_NAME "/" CPU_MODEL_NAME ")";
|
||||
"RTEMS RELEASE V3.5.15 snapshot (" CPU_NAME "/" CPU_MODEL_NAME ")";
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -14,27 +14,21 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef RTEMS_POSIX_API
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
/*
|
||||
* POSIX_API_INIT is defined so all of the POSIX API
|
||||
* data will be included in this object file.
|
||||
*/
|
||||
|
||||
#define POSIX_API_INIT
|
||||
|
||||
#include <rtems/system.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <rtems/config.h>
|
||||
#define INIT
|
||||
|
||||
#include <rtems/posix/cond.h>
|
||||
#include <rtems/posix/condmp.h>
|
||||
#include <rtems/posix/config.h>
|
||||
#include <rtems/posix/key.h>
|
||||
#include <rtems/posix/mutex.h>
|
||||
#include <rtems/posix/mutexmp.h>
|
||||
#include <rtems/posix/priority.h>
|
||||
#include <rtems/posix/pthread.h>
|
||||
#include <rtems/posix/pthreadmp.h>
|
||||
#include <rtems/posix/time.h>
|
||||
|
||||
/*PAGE
|
||||
@@ -54,17 +48,20 @@ void _POSIX_API_Initialize(
|
||||
|
||||
assert( api_configuration );
|
||||
|
||||
_POSIX_Threads_Manager_initialization(
|
||||
api_configuration->maximum_threads,
|
||||
_RTEMS_tasks_Manager_initialization(
|
||||
api_configuration->maximum_tasks
|
||||
#if 0
|
||||
,
|
||||
api_configuration->number_of_initialization_tasks,
|
||||
api_configuration->User_initialization_tasks_table
|
||||
#endif
|
||||
);
|
||||
|
||||
_POSIX_Condition_variables_Manager_initialization(
|
||||
api_configuration->maximum_condition_variables
|
||||
);
|
||||
|
||||
_POSIX_Key_Manager_initialization( api_configuration->maximum_keys );
|
||||
void _POSIX_Key_Manager_initialization( api_configuration->maximum_keys );
|
||||
|
||||
_POSIX_Mutex_Manager_initialization(
|
||||
api_configuration->maximum_mutexes
|
||||
@@ -72,5 +69,4 @@ void _POSIX_API_Initialize(
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
/* end of file */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* POSIX API Initialization Support
|
||||
* RTEMS API Support
|
||||
*
|
||||
* NOTE:
|
||||
*
|
||||
@@ -14,17 +14,12 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* RTEMS_API_INIT is defined so all of the RTEMS API
|
||||
* data will be included in this object file.
|
||||
*/
|
||||
|
||||
#define RTEMS_API_INIT
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/rtems/status.h>
|
||||
#include <rtems/rtems/rtemsapi.h>
|
||||
|
||||
#define INIT
|
||||
|
||||
#include <rtems/rtems/intr.h>
|
||||
#include <rtems/rtems/clock.h>
|
||||
#include <rtems/rtems/tasks.h>
|
||||
@@ -50,10 +45,6 @@ void _RTEMS_API_Initialize(
|
||||
rtems_configuration_table *configuration_table
|
||||
)
|
||||
{
|
||||
rtems_api_configuration_table *api_configuration;
|
||||
|
||||
api_configuration = configuration_table->RTEMS_api_configuration;
|
||||
|
||||
_Attributes_Handler_initialization();
|
||||
|
||||
_Interrupt_Manager_initialization();
|
||||
@@ -61,30 +52,38 @@ void _RTEMS_API_Initialize(
|
||||
_Multiprocessing_Manager_initialization();
|
||||
|
||||
_RTEMS_tasks_Manager_initialization(
|
||||
api_configuration->maximum_tasks,
|
||||
api_configuration->number_of_initialization_tasks,
|
||||
api_configuration->User_initialization_tasks_table
|
||||
configuration_table->maximum_tasks,
|
||||
configuration_table->number_of_initialization_tasks,
|
||||
configuration_table->User_initialization_tasks_table
|
||||
);
|
||||
|
||||
_Timer_Manager_initialization( api_configuration->maximum_timers );
|
||||
_Timer_Manager_initialization( configuration_table->maximum_timers );
|
||||
|
||||
_Signal_Manager_initialization();
|
||||
|
||||
_Event_Manager_initialization();
|
||||
|
||||
_Message_queue_Manager_initialization(
|
||||
api_configuration->maximum_message_queues
|
||||
configuration_table->maximum_message_queues
|
||||
);
|
||||
|
||||
_Semaphore_Manager_initialization( api_configuration->maximum_semaphores );
|
||||
_Semaphore_Manager_initialization(
|
||||
configuration_table->maximum_semaphores
|
||||
);
|
||||
|
||||
_Partition_Manager_initialization( api_configuration->maximum_partitions );
|
||||
_Partition_Manager_initialization(
|
||||
configuration_table->maximum_partitions
|
||||
);
|
||||
|
||||
_Region_Manager_initialization( api_configuration->maximum_regions );
|
||||
_Region_Manager_initialization( configuration_table->maximum_regions );
|
||||
|
||||
_Dual_ported_memory_Manager_initialization( api_configuration->maximum_ports);
|
||||
_Dual_ported_memory_Manager_initialization(
|
||||
configuration_table->maximum_ports
|
||||
);
|
||||
|
||||
_Rate_monotonic_Manager_initialization( api_configuration->maximum_periods );
|
||||
_Rate_monotonic_Manager_initialization(
|
||||
configuration_table->maximum_periods
|
||||
);
|
||||
}
|
||||
|
||||
/* end of file */
|
||||
|
||||
@@ -122,9 +122,9 @@ typedef struct {
|
||||
|
||||
/* variables */
|
||||
|
||||
SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context;
|
||||
SCORE_EXTERN void *_CPU_Interrupt_stack_low;
|
||||
SCORE_EXTERN void *_CPU_Interrupt_stack_high;
|
||||
EXTERN Context_Control_fp _CPU_Null_fp_context;
|
||||
EXTERN void *_CPU_Interrupt_stack_low;
|
||||
EXTERN void *_CPU_Interrupt_stack_high;
|
||||
|
||||
/* constants */
|
||||
|
||||
|
||||
@@ -157,8 +157,8 @@ typedef struct {
|
||||
|
||||
/* variables */
|
||||
|
||||
SCORE_EXTERN void *_CPU_Interrupt_stack_low;
|
||||
SCORE_EXTERN void *_CPU_Interrupt_stack_high;
|
||||
EXTERN void *_CPU_Interrupt_stack_low;
|
||||
EXTERN void *_CPU_Interrupt_stack_high;
|
||||
|
||||
/* constants */
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@ extern "C" {
|
||||
* in some time critical routines.
|
||||
*/
|
||||
|
||||
#define NO_UNINITIALIZED_WARNINGS
|
||||
|
||||
#include <rtems/score/m68k.h>
|
||||
#ifndef ASM
|
||||
#include <rtems/score/m68ktypes.h>
|
||||
@@ -146,10 +148,10 @@ typedef struct {
|
||||
|
||||
/* variables */
|
||||
|
||||
SCORE_EXTERN void *_CPU_Interrupt_stack_low;
|
||||
SCORE_EXTERN void *_CPU_Interrupt_stack_high;
|
||||
EXTERN void *_CPU_Interrupt_stack_low;
|
||||
EXTERN void *_CPU_Interrupt_stack_high;
|
||||
/* points to jsr-exception-table in targets wo/ VBR register */
|
||||
extern char _VBR[];
|
||||
extern char _VBR[];
|
||||
|
||||
/* constants */
|
||||
|
||||
@@ -308,9 +310,28 @@ unsigned32 _CPU_ISR_Get_level( void );
|
||||
#define CPU_USE_GENERIC_BITFIELD_DATA FALSE
|
||||
|
||||
#if ( M68K_HAS_BFFFO == 1 )
|
||||
#ifdef NO_UNINITIALIZED_WARNINGS
|
||||
|
||||
#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
|
||||
asm volatile( "bfffo (%1),#0,#16,%0" : "=d" (_output) : "a" (&_value));
|
||||
{ \
|
||||
register void *__base = (void *)&(_value); \
|
||||
\
|
||||
(_output) = 0; /* avoids warnings */ \
|
||||
asm volatile( "bfffo (%0),#0,#16,%1" \
|
||||
: "=a" (__base), "=d" ((_output)) \
|
||||
: "0" (__base), "1" ((_output)) ) ; \
|
||||
}
|
||||
#else
|
||||
#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
|
||||
{ \
|
||||
register void *__base = (void *)&(_value); \
|
||||
\
|
||||
asm volatile( "bfffo (%0),#0,#16,%1" \
|
||||
: "=a" (__base), "=d" ((_output)) \
|
||||
: "0" (__base), "1" ((_output)) ) ; \
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
/* duplicates BFFFO results for 16 bits (i.e., 15-(_priority) in
|
||||
|
||||
@@ -193,6 +193,15 @@ extern "C" {
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If defined, this causes some of the macros to initialize their
|
||||
* variables to zero before doing inline assembly. This gets rid
|
||||
* of compile time warnings at the cost of a little execution time
|
||||
* in some time critical routines.
|
||||
*/
|
||||
|
||||
#define NO_UNINITIALIZED_WARNINGS
|
||||
|
||||
/*
|
||||
* Define the name of the CPU family.
|
||||
*/
|
||||
@@ -201,42 +210,78 @@ extern "C" {
|
||||
|
||||
#ifndef ASM
|
||||
|
||||
#ifdef NO_UNINITIALIZED_WARNINGS
|
||||
#define m68k_disable_interrupts( _level ) \
|
||||
asm volatile ( "movew %%sr,%0\n\t" \
|
||||
"orw #0x0700,%%sr" \
|
||||
: "=d" (_level))
|
||||
{ \
|
||||
(_level) = 0; /* avoids warnings */ \
|
||||
asm volatile ( "movew %%sr,%0 ; \
|
||||
orw #0x0700,%%sr" \
|
||||
: "=d" ((_level)) : "0" ((_level)) \
|
||||
); \
|
||||
}
|
||||
#else
|
||||
#define m68k_disable_interrupts( _level ) \
|
||||
{ \
|
||||
asm volatile ( "movew %%sr,%0 ; \
|
||||
orw #0x0700,%%sr" \
|
||||
: "=d" ((_level)) : "0" ((_level)) \
|
||||
); \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define m68k_enable_interrupts( _level ) \
|
||||
asm volatile ( "movew %0,%%sr " : : "d" (_level));
|
||||
{ \
|
||||
asm volatile ( "movew %0,%%sr " \
|
||||
: "=d" ((_level)) : "0" ((_level)) \
|
||||
); \
|
||||
}
|
||||
|
||||
#define m68k_flash_interrupts( _level ) \
|
||||
asm volatile ( "movew %0,%%sr\n\t" \
|
||||
"orw #0x0700,%%sr" \
|
||||
: : "d" (_level))
|
||||
{ \
|
||||
asm volatile ( "movew %0,%%sr ; \
|
||||
orw #0x0700,%%sr" \
|
||||
: "=d" ((_level)) : "0" ((_level)) \
|
||||
); \
|
||||
}
|
||||
|
||||
#define m68k_get_interrupt_level( _level ) \
|
||||
do { \
|
||||
register unsigned32 _tmpsr; \
|
||||
register unsigned32 _tmpsr = 0; \
|
||||
\
|
||||
asm volatile( "movw %%sr,%0" \
|
||||
: "=d" (_tmpsr) : "0" (_tmpsr) \
|
||||
); \
|
||||
\
|
||||
asm volatile( "movw %%sr,%0" : "=d" (_tmpsr)); \
|
||||
_level = (_tmpsr & 0x0700) >> 8; \
|
||||
} while (0)
|
||||
|
||||
#define m68k_set_interrupt_level( _newlevel ) \
|
||||
do { \
|
||||
register unsigned32 _tmpsr; \
|
||||
{ \
|
||||
register unsigned32 _tmpsr = 0; \
|
||||
\
|
||||
asm volatile( "movw %%sr,%0" \
|
||||
: "=d" (_tmpsr) : "0" (_tmpsr) \
|
||||
); \
|
||||
\
|
||||
asm volatile( "movw %%sr,%0" : "=d" (_tmpsr)); \
|
||||
_tmpsr = (_tmpsr & 0xf8ff) | ((_newlevel) << 8); \
|
||||
asm volatile( "movw %0,%%sr" : : "d" (_tmpsr)); \
|
||||
} while (0)
|
||||
\
|
||||
asm volatile( "movw %0,%%sr" \
|
||||
: "=d" (_tmpsr) : "0" (_tmpsr) \
|
||||
); \
|
||||
}
|
||||
|
||||
#if ( M68K_HAS_VBR == 1 )
|
||||
#define m68k_get_vbr( vbr ) \
|
||||
asm volatile ( "movec %%vbr,%0 " : "=r" (vbr))
|
||||
{ (vbr) = 0; \
|
||||
asm volatile ( "movec %%vbr,%0 " \
|
||||
: "=r" (vbr) : "0" (vbr) ); \
|
||||
}
|
||||
|
||||
#define m68k_set_vbr( vbr ) \
|
||||
asm volatile ( "movec %0,%%vbr " : : "r" (vbr))
|
||||
{ register m68k_isr *_vbr= (m68k_isr *)(vbr); \
|
||||
asm volatile ( "movec %0,%%vbr " \
|
||||
: "=a" (_vbr) : "0" (_vbr) ); \
|
||||
}
|
||||
#else
|
||||
#define m68k_get_vbr( _vbr ) _vbr = (void *)_VBR
|
||||
#define m68k_set_vbr( _vbr )
|
||||
|
||||
@@ -50,28 +50,14 @@
|
||||
#define _SIM_H_
|
||||
|
||||
|
||||
/*
|
||||
* XXX Why is a generic file like this including a bsp specific file?
|
||||
|
||||
#include <efi332.h>
|
||||
*/
|
||||
|
||||
|
||||
/* SAM-- shift and mask */
|
||||
#undef SAM
|
||||
#define SAM(a,b,c) ((a << b) & c)
|
||||
|
||||
/*
|
||||
* These macros make this file usable from assembly.
|
||||
*/
|
||||
|
||||
#ifdef ASM
|
||||
#define SIM_VOLATILE_USHORT_POINTER
|
||||
#define SIM_VOLATILE_UCHAR_POINTER
|
||||
#else
|
||||
#define SIM_VOLATILE_USHORT_POINTER (volatile unsigned short int * const)
|
||||
#define SIM_VOLATILE_UCHAR_POINTER (volatile unsigned char * const)
|
||||
#endif
|
||||
|
||||
/* SIM_CRB (SIM Control Register Block) base address of the SIM
|
||||
control registers */
|
||||
@@ -87,7 +73,7 @@
|
||||
|
||||
|
||||
|
||||
#define SIMCR SIM_VOLATILE_USHORT_POINTER(0x00 + SIM_CRB)
|
||||
#define SIMCR (volatile unsigned short int * const)(0x00 + SIM_CRB)
|
||||
/* Module Configuration Register */
|
||||
#define EXOFF 0x8000 /* External Clock Off */
|
||||
#define FRZSW 0x4000 /* Freeze Software Enable */
|
||||
@@ -100,13 +86,13 @@
|
||||
|
||||
|
||||
|
||||
#define SIMTR SIM_VOLATILE_USHORT_POINTER(0x02 + SIM_CRB)
|
||||
#define SIMTR (volatile unsigned short int * const)(0x02 + SIM_CRB)
|
||||
/* SIM Test Register */
|
||||
/* Used only for factor testing */
|
||||
|
||||
|
||||
|
||||
#define SYNCR SIM_VOLATILE_USHORT_POINTER(0x04 + SIM_CRB)
|
||||
#define SYNCR (volatile unsigned short int * const)(0x04 + SIM_CRB)
|
||||
/* Clock Synthesizer Control Register */
|
||||
#define W 0x8000 /* Frequency Control (VCO) */
|
||||
#define X 0x4000 /* Frequency Control Bit (Prescale) */
|
||||
@@ -120,7 +106,7 @@
|
||||
|
||||
|
||||
|
||||
#define RSR SIM_VOLATILE_UCHAR_POINTER(0x07 + SIM_CRB)
|
||||
#define RSR (volatile unsigned char * const)(0x07 + SIM_CRB)
|
||||
/* Reset Status Register */
|
||||
#define EXT 0x0080 /* External Reset */
|
||||
#define POW 0x0040 /* Power-On Reset */
|
||||
@@ -132,18 +118,18 @@
|
||||
|
||||
|
||||
|
||||
#define SIMTRE SIM_VOLATILE_USHORT_POINTER(0x08 + SIM_CRB)
|
||||
#define SIMTRE (volatile unsigned short int * const)(0x08 + SIM_CRB)
|
||||
/* System Integration Test Register */
|
||||
/* Used only for factor testing */
|
||||
|
||||
|
||||
|
||||
#define PORTE0 SIM_VOLATILE_UCHAR_POINTER(0x11 + SIM_CRB)
|
||||
#define PORTE1 SIM_VOLATILE_UCHAR_POINTER(0x13 + SIM_CRB)
|
||||
#define PORTE0 (volatile unsigned char * const)(0x11 + SIM_CRB)
|
||||
#define PORTE1 (volatile unsigned char * const)(0x13 + SIM_CRB)
|
||||
/* Port E Data Register */
|
||||
#define DDRE SIM_VOLATILE_UCHAR_POINTER(0x15 + SIM_CRB)
|
||||
#define DDRE (volatile unsigned char * const)(0x15 + SIM_CRB)
|
||||
/* Port E Data Direction Register */
|
||||
#define PEPAR SIM_VOLATILE_UCHAR_POINTER(0x17 + SIM_CRB)
|
||||
#define PEPAR (volatile unsigned char * const)(0x17 + SIM_CRB)
|
||||
/* Port E Pin Assignment Register */
|
||||
/* Any bit cleared (zero) defines the corresponding pin to be an I/O
|
||||
pin. Any bit set defines the corresponding pin to be a bus control
|
||||
@@ -151,19 +137,19 @@
|
||||
|
||||
|
||||
|
||||
#define PORTF0 SIM_VOLATILE_UCHAR_POINTER(0x19 + SIM_CRB)
|
||||
#define PORTF1 SIM_VOLATILE_UCHAR_POINTER(0x1b + SIM_CRB)
|
||||
#define PORTF0 (volatile unsigned char * const)(0x19 + SIM_CRB)
|
||||
#define PORTF1 (volatile unsigned char * const)(0x1b + SIM_CRB)
|
||||
/* Port F Data Register */
|
||||
#define DDRF SIM_VOLATILE_UCHAR_POINTER(0x1d + SIM_CRB)
|
||||
#define DDRF (volatile unsigned char * const)(0x1d + SIM_CRB)
|
||||
/* Port E Data Direction Register */
|
||||
#define PFPAR SIM_VOLATILE_UCHAR_POINTER(0x1f + SIM_CRB)
|
||||
#define PFPAR (volatile unsigned char * const)(0x1f + SIM_CRB)
|
||||
/* Any bit cleared (zero) defines the corresponding pin to be an I/O
|
||||
pin. Any bit set defines the corresponding pin to be a bus control
|
||||
signal. */
|
||||
|
||||
|
||||
|
||||
#define SYPCR SIM_VOLATILE_UCHAR_POINTER(0x21 + SIM_CRB)
|
||||
#define SYPCR (volatile unsigned char * const)(0x21 + SIM_CRB)
|
||||
/* !!! can write to only once after reset !!! */
|
||||
/* System Protection Control Register */
|
||||
#define SWE 0x80 /* Software Watch Enable */
|
||||
@@ -175,55 +161,55 @@
|
||||
|
||||
|
||||
|
||||
#define PICR SIM_VOLATILE_USHORT_POINTER(0x22 + SIM_CRB)
|
||||
#define PICR (volatile unsigned short int * const)(0x22 + SIM_CRB)
|
||||
/* Periodic Interrupt Control Reg. */
|
||||
#define PIRQL 0x0700 /* Periodic Interrupt Request Level */
|
||||
#define PIV 0x00ff /* Periodic Interrupt Level */
|
||||
|
||||
|
||||
|
||||
#define PITR SIM_VOLATILE_USHORT_POINTER(0x24 + SIM_CRB)
|
||||
#define PITR (volatile unsigned short int * const)(0x24 + SIM_CRB)
|
||||
/* Periodic Interrupt Timer Register */
|
||||
#define PTP 0x0100 /* Periodic Timer Prescaler Control */
|
||||
#define PITM 0x00ff /* Periodic Interrupt Timing Modulus */
|
||||
|
||||
|
||||
|
||||
#define SWSR SIM_VOLATILE_UCHAR_POINTER(0x27 + SIM_CRB)
|
||||
#define SWSR (volatile unsigned char * const)(0x27 + SIM_CRB)
|
||||
/* Software Service Register */
|
||||
/* write 0x55 then 0xaa to service the software watchdog */
|
||||
|
||||
|
||||
|
||||
#define TSTMSRA SIM_VOLATILE_USHORT_POINTER(0x30 + SIM_CRB)
|
||||
#define TSTMSRA (volatile unsigned short int * const)(0x30 + SIM_CRB)
|
||||
/* Test Module Master Shift A */
|
||||
#define TSTMSRB SIM_VOLATILE_USHORT_POINTER(0x32 + SIM_CRB)
|
||||
#define TSTMSRB (volatile unsigned short int * const)(0x32 + SIM_CRB)
|
||||
/* Test Module Master Shift A */
|
||||
#define TSTSC SIM_VOLATILE_USHORT_POINTER(0x34 + SIM_CRB)
|
||||
#define TSTSC (volatile unsigned short int * const)(0x34 + SIM_CRB)
|
||||
/* Test Module Shift Count */
|
||||
#define TSTRC SIM_VOLATILE_USHORT_POINTER(0x36 + SIM_CRB)
|
||||
#define TSTRC (volatile unsigned short int * const)(0x36 + SIM_CRB)
|
||||
/* Test Module Repetition Counter */
|
||||
#define CREG SIM_VOLATILE_USHORT_POINTER(0x38 + SIM_CRB)
|
||||
#define CREG (volatile unsigned short int * const)(0x38 + SIM_CRB)
|
||||
/* Test Module Control */
|
||||
#define DREG SIM_VOLATILE_USHORT_POINTER(0x3a + SIM_CRB)
|
||||
#define DREG (volatile unsigned short int * const)(0x3a + SIM_CRB)
|
||||
/* Test Module Distributed */
|
||||
/* Used only for factor testing */
|
||||
|
||||
|
||||
|
||||
#define PORTC SIM_VOLATILE_UCHAR_POINTER(0x41 + SIM_CRB)
|
||||
#define PORTC (volatile unsigned char * const)(0x41 + SIM_CRB)
|
||||
/* Port C Data */
|
||||
|
||||
|
||||
|
||||
#define CSPAR0 SIM_VOLATILE_USHORT_POINTER(0x44 + SIM_CRB)
|
||||
#define CSPAR0 (volatile unsigned short int * const)(0x44 + SIM_CRB)
|
||||
/* Chip Select Pin Assignment
|
||||
Resgister 0 */
|
||||
/* CSPAR0 contains seven two-bit fields that determine the functions
|
||||
of corresponding chip-select pins. CSPAR0[15:14] are not
|
||||
used. These bits always read zero; write have no effect. CSPAR0 bit
|
||||
1 always reads one; writes to CSPAR0 bit 1 have no effect. */
|
||||
#define CSPAR1 SIM_VOLATILE_USHORT_POINTER(0x46 + SIM_CRB)
|
||||
#define CSPAR1 (volatile unsigned short int * const)(0x46 + SIM_CRB)
|
||||
/* Chip Select Pin Assignment
|
||||
Register 1 */
|
||||
/* CSPAR1 contains five two-bit fields that determine the finctions of
|
||||
@@ -269,18 +255,18 @@
|
||||
#define BS_512K 0x6
|
||||
#define BS_1M 0x7
|
||||
|
||||
#define CSBARBT SIM_VOLATILE_USHORT_POINTER(0x48 + SIM_CRB)
|
||||
#define CSBAR0 SIM_VOLATILE_USHORT_POINTER(0x4c + SIM_CRB)
|
||||
#define CSBAR1 SIM_VOLATILE_USHORT_POINTER(0x50 + SIM_CRB)
|
||||
#define CSBAR2 SIM_VOLATILE_USHORT_POINTER(0x54 + SIM_CRB)
|
||||
#define CSBAR3 SIM_VOLATILE_USHORT_POINTER(0x58 + SIM_CRB)
|
||||
#define CSBAR4 SIM_VOLATILE_USHORT_POINTER(0x5c + SIM_CRB)
|
||||
#define CSBAR5 SIM_VOLATILE_USHORT_POINTER(0x60 + SIM_CRB)
|
||||
#define CSBAR6 SIM_VOLATILE_USHORT_POINTER(0x64 + SIM_CRB)
|
||||
#define CSBAR7 SIM_VOLATILE_USHORT_POINTER(0x68 + SIM_CRB)
|
||||
#define CSBAR8 SIM_VOLATILE_USHORT_POINTER(0x6c + SIM_CRB)
|
||||
#define CSBAR9 SIM_VOLATILE_USHORT_POINTER(0x70 + SIM_CRB)
|
||||
#define CSBAR10 SIM_VOLATILE_USHORT_POINTER(0x74 + SIM_CRB)
|
||||
#define CSBARBT (volatile unsigned short int * const)(0x48 + SIM_CRB)
|
||||
#define CSBAR0 (volatile unsigned short int * const)(0x4c + SIM_CRB)
|
||||
#define CSBAR1 (volatile unsigned short int * const)(0x50 + SIM_CRB)
|
||||
#define CSBAR2 (volatile unsigned short int * const)(0x54 + SIM_CRB)
|
||||
#define CSBAR3 (volatile unsigned short int * const)(0x58 + SIM_CRB)
|
||||
#define CSBAR4 (volatile unsigned short int * const)(0x5c + SIM_CRB)
|
||||
#define CSBAR5 (volatile unsigned short int * const)(0x60 + SIM_CRB)
|
||||
#define CSBAR6 (volatile unsigned short int * const)(0x64 + SIM_CRB)
|
||||
#define CSBAR7 (volatile unsigned short int * const)(0x68 + SIM_CRB)
|
||||
#define CSBAR8 (volatile unsigned short int * const)(0x6c + SIM_CRB)
|
||||
#define CSBAR9 (volatile unsigned short int * const)(0x70 + SIM_CRB)
|
||||
#define CSBAR10 (volatile unsigned short int * const)(0x74 + SIM_CRB)
|
||||
|
||||
#define MODE 0x8000
|
||||
#define Disable 0
|
||||
@@ -326,17 +312,17 @@
|
||||
|
||||
#define AVEC 1
|
||||
|
||||
#define CSORBT SIM_VOLATILE_USHORT_POINTER(0x4a + SIM_CRB)
|
||||
#define CSOR0 SIM_VOLATILE_USHORT_POINTER(0x4e + SIM_CRB)
|
||||
#define CSOR1 SIM_VOLATILE_USHORT_POINTER(0x52 + SIM_CRB)
|
||||
#define CSOR2 SIM_VOLATILE_USHORT_POINTER(0x56 + SIM_CRB)
|
||||
#define CSOR3 SIM_VOLATILE_USHORT_POINTER(0x5a + SIM_CRB)
|
||||
#define CSOR4 SIM_VOLATILE_USHORT_POINTER(0x5e + SIM_CRB)
|
||||
#define CSOR5 SIM_VOLATILE_USHORT_POINTER(0x62 + SIM_CRB)
|
||||
#define CSOR6 SIM_VOLATILE_USHORT_POINTER(0x66 + SIM_CRB)
|
||||
#define CSOR7 SIM_VOLATILE_USHORT_POINTER(0x6a + SIM_CRB)
|
||||
#define CSOR8 SIM_VOLATILE_USHORT_POINTER(0x6e + SIM_CRB)
|
||||
#define CSOR9 SIM_VOLATILE_USHORT_POINTER(0x72 + SIM_CRB)
|
||||
#define CSOR10 SIM_VOLATILE_USHORT_POINTER(0x76 + SIM_CRB)
|
||||
#define CSORBT (volatile unsigned short int * const)(0x4a + SIM_CRB)
|
||||
#define CSOR0 (volatile unsigned short int * const)(0x4e + SIM_CRB)
|
||||
#define CSOR1 (volatile unsigned short int * const)(0x52 + SIM_CRB)
|
||||
#define CSOR2 (volatile unsigned short int * const)(0x56 + SIM_CRB)
|
||||
#define CSOR3 (volatile unsigned short int * const)(0x5a + SIM_CRB)
|
||||
#define CSOR4 (volatile unsigned short int * const)(0x5e + SIM_CRB)
|
||||
#define CSOR5 (volatile unsigned short int * const)(0x62 + SIM_CRB)
|
||||
#define CSOR6 (volatile unsigned short int * const)(0x66 + SIM_CRB)
|
||||
#define CSOR7 (volatile unsigned short int * const)(0x6a + SIM_CRB)
|
||||
#define CSOR8 (volatile unsigned short int * const)(0x6e + SIM_CRB)
|
||||
#define CSOR9 (volatile unsigned short int * const)(0x72 + SIM_CRB)
|
||||
#define CSOR10 (volatile unsigned short int * const)(0x76 + SIM_CRB)
|
||||
|
||||
#endif /* _SIM_h_ */
|
||||
|
||||
@@ -352,7 +352,7 @@ typedef struct {
|
||||
* _CPU_Context_Initialize.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context;
|
||||
EXTERN Context_Control_fp _CPU_Null_fp_context;
|
||||
|
||||
/*
|
||||
* On some CPUs, RTEMS supports a software managed interrupt stack.
|
||||
@@ -367,8 +367,8 @@ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context;
|
||||
* CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN void *_CPU_Interrupt_stack_low;
|
||||
SCORE_EXTERN void *_CPU_Interrupt_stack_high;
|
||||
EXTERN void *_CPU_Interrupt_stack_low;
|
||||
EXTERN void *_CPU_Interrupt_stack_high;
|
||||
|
||||
/*
|
||||
* With some compilation systems, it is difficult if not impossible to
|
||||
@@ -380,7 +380,7 @@ SCORE_EXTERN void *_CPU_Interrupt_stack_high;
|
||||
* sequence (if a dispatch is necessary).
|
||||
*/
|
||||
|
||||
SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)();
|
||||
EXTERN void (*_CPU_Thread_dispatch_pointer)();
|
||||
|
||||
/*
|
||||
* Nothing prevents the porter from declaring more CPU specific variables.
|
||||
|
||||
@@ -514,7 +514,7 @@ typedef struct {
|
||||
* context area during _CPU_Context_Initialize.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context CPU_STRUCTURE_ALIGNMENT;
|
||||
EXTERN Context_Control_fp _CPU_Null_fp_context CPU_STRUCTURE_ALIGNMENT;
|
||||
|
||||
/*
|
||||
* This stack is allocated by the Interrupt Manager and the switch
|
||||
@@ -529,8 +529,8 @@ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context CPU_STRUCTURE_ALIGNMENT;
|
||||
* are required.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN void *_CPU_Interrupt_stack_low;
|
||||
SCORE_EXTERN void *_CPU_Interrupt_stack_high;
|
||||
EXTERN void *_CPU_Interrupt_stack_low;
|
||||
EXTERN void *_CPU_Interrupt_stack_high;
|
||||
|
||||
#if defined(erc32)
|
||||
|
||||
@@ -538,7 +538,7 @@ SCORE_EXTERN void *_CPU_Interrupt_stack_high;
|
||||
* ERC32 Specific Variables
|
||||
*/
|
||||
|
||||
SCORE_EXTERN unsigned32 _ERC32_MEC_Timer_Control_Mirror;
|
||||
EXTERN unsigned32 _ERC32_MEC_Timer_Control_Mirror;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -585,7 +585,7 @@ extern const CPU_Trap_table_entry _CPU_Trap_slot_template;
|
||||
|
||||
#define SPARC_TRAP_TABLE_ALIGNMENT 4096
|
||||
|
||||
SCORE_EXTERN unsigned8 _CPU_Trap_Table_area[ 8192 ]
|
||||
EXTERN unsigned8 _CPU_Trap_Table_area[ 8192 ]
|
||||
__attribute__ ((aligned (SPARC_TRAP_TABLE_ALIGNMENT)));
|
||||
|
||||
|
||||
|
||||
@@ -34,14 +34,13 @@
|
||||
#define MALLOC_0_RETURNS_NULL
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/times.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <setjmp.h>
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/ipc.h>
|
||||
@@ -55,16 +54,16 @@
|
||||
|
||||
typedef struct {
|
||||
jmp_buf regs;
|
||||
unsigned32 isr_level;
|
||||
sigset_t isr_level;
|
||||
} Context_Control_overlay;
|
||||
|
||||
void _CPU_Signal_initialize(void);
|
||||
void _CPU_Stray_signal(int);
|
||||
void _CPU_ISR_Handler(int);
|
||||
|
||||
static sigset_t _CPU_Signal_mask;
|
||||
static Context_Control_overlay _CPU_Context_Default_with_ISRs_enabled;
|
||||
static Context_Control_overlay _CPU_Context_Default_with_ISRs_disabled;
|
||||
sigset_t _CPU_Signal_mask;
|
||||
Context_Control _CPU_Context_Default_with_ISRs_enabled;
|
||||
Context_Control _CPU_Context_Default_with_ISRs_disabled;
|
||||
|
||||
/*
|
||||
* Which cpu are we? Used by libcpu and libbsp.
|
||||
@@ -92,7 +91,7 @@ void _CPU_ISR_From_CPU_Init()
|
||||
|
||||
/*
|
||||
* Block all the signals except SIGTRAP for the debugger
|
||||
* and fatal error signals.
|
||||
* and SIGABRT for fatal errors.
|
||||
*/
|
||||
|
||||
(void) sigfillset(&_CPU_Signal_mask);
|
||||
@@ -100,9 +99,6 @@ void _CPU_ISR_From_CPU_Init()
|
||||
(void) sigdelset(&_CPU_Signal_mask, SIGABRT);
|
||||
(void) sigdelset(&_CPU_Signal_mask, SIGIOT);
|
||||
(void) sigdelset(&_CPU_Signal_mask, SIGCONT);
|
||||
(void) sigdelset(&_CPU_Signal_mask, SIGSEGV);
|
||||
(void) sigdelset(&_CPU_Signal_mask, SIGBUS);
|
||||
(void) sigdelset(&_CPU_Signal_mask, SIGFPE);
|
||||
|
||||
_CPU_ISR_Enable(1);
|
||||
|
||||
@@ -123,16 +119,20 @@ void _CPU_Signal_initialize( void )
|
||||
{
|
||||
struct sigaction act;
|
||||
sigset_t mask;
|
||||
|
||||
|
||||
/* mark them all active except for TraceTrap and Abort */
|
||||
|
||||
mask = _CPU_Signal_mask;
|
||||
|
||||
sigfillset(&mask);
|
||||
sigdelset(&mask, SIGTRAP);
|
||||
sigdelset(&mask, SIGABRT);
|
||||
sigdelset(&mask, SIGIOT);
|
||||
sigdelset(&mask, SIGCONT);
|
||||
sigprocmask(SIG_UNBLOCK, &mask, 0);
|
||||
|
||||
|
||||
act.sa_handler = _CPU_ISR_Handler;
|
||||
act.sa_mask = mask;
|
||||
act.sa_flags = SA_RESTART;
|
||||
|
||||
|
||||
sigaction(SIGHUP, &act, 0);
|
||||
sigaction(SIGINT, &act, 0);
|
||||
sigaction(SIGQUIT, &act, 0);
|
||||
@@ -166,6 +166,7 @@ void _CPU_Signal_initialize( void )
|
||||
#ifdef SIGLOST
|
||||
sigaction(SIGLOST, &act, 0);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
@@ -207,14 +208,14 @@ void _CPU_Context_From_CPU_Init()
|
||||
|
||||
_CPU_ISR_Set_level( 0 );
|
||||
_CPU_Context_switch(
|
||||
(Context_Control *) &_CPU_Context_Default_with_ISRs_enabled,
|
||||
(Context_Control *) &_CPU_Context_Default_with_ISRs_enabled
|
||||
&_CPU_Context_Default_with_ISRs_enabled,
|
||||
&_CPU_Context_Default_with_ISRs_enabled
|
||||
);
|
||||
|
||||
|
||||
_CPU_ISR_Set_level( 1 );
|
||||
_CPU_Context_switch(
|
||||
(Context_Control *) &_CPU_Context_Default_with_ISRs_disabled,
|
||||
(Context_Control *) &_CPU_Context_Default_with_ISRs_disabled
|
||||
&_CPU_Context_Default_with_ISRs_disabled,
|
||||
&_CPU_Context_Default_with_ISRs_disabled
|
||||
);
|
||||
}
|
||||
|
||||
@@ -223,16 +224,21 @@ void _CPU_Context_From_CPU_Init()
|
||||
* _CPU_ISR_Get_level
|
||||
*/
|
||||
|
||||
sigset_t GET_old_mask;
|
||||
|
||||
unsigned32 _CPU_ISR_Get_level( void )
|
||||
{
|
||||
sigset_t old_mask;
|
||||
/* sigset_t old_mask; */
|
||||
unsigned32 old_level;
|
||||
|
||||
sigprocmask(SIG_BLOCK, 0, &old_mask);
|
||||
sigprocmask(0, 0, &GET_old_mask);
|
||||
|
||||
if (memcmp((void *)&posix_empty_mask, (void *)&old_mask, sizeof(sigset_t)))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
if (memcmp((void *)&posix_empty_mask, (void *)&GET_old_mask, sizeof(sigset_t)))
|
||||
old_level = 1;
|
||||
else
|
||||
old_level = 0;
|
||||
|
||||
return old_level;
|
||||
}
|
||||
|
||||
/* _CPU_Initialize
|
||||
@@ -354,15 +360,8 @@ void _CPU_Install_interrupt_stack( void )
|
||||
|
||||
void _CPU_Thread_Idle_body( void )
|
||||
{
|
||||
while (1) {
|
||||
#ifdef RTEMS_DEBUG
|
||||
/* interrupts had better be enabled at this point! */
|
||||
if (_CPU_ISR_Get_level() != 0)
|
||||
abort();
|
||||
#endif
|
||||
while (1)
|
||||
pause();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
@@ -379,6 +378,7 @@ void _CPU_Context_Initialize(
|
||||
boolean _is_fp
|
||||
)
|
||||
{
|
||||
void *source;
|
||||
unsigned32 *addr;
|
||||
unsigned32 jmp_addr;
|
||||
unsigned32 _stack_low; /* lowest "stack aligned" address */
|
||||
@@ -409,12 +409,16 @@ void _CPU_Context_Initialize(
|
||||
*/
|
||||
|
||||
if ( _new_level == 0 )
|
||||
*_the_context = *(Context_Control *)
|
||||
&_CPU_Context_Default_with_ISRs_enabled;
|
||||
source = &_CPU_Context_Default_with_ISRs_enabled;
|
||||
else
|
||||
*_the_context = *(Context_Control *)
|
||||
&_CPU_Context_Default_with_ISRs_disabled;
|
||||
source = &_CPU_Context_Default_with_ISRs_disabled;
|
||||
|
||||
memcpy(
|
||||
_the_context,
|
||||
source,
|
||||
sizeof(Context_Control) /* sizeof(jmp_buf)); */
|
||||
);
|
||||
|
||||
addr = (unsigned32 *)_the_context;
|
||||
|
||||
#if defined(hppa1_1)
|
||||
@@ -487,7 +491,7 @@ void _CPU_Context_restore(
|
||||
{
|
||||
Context_Control_overlay *nextp = (Context_Control_overlay *)next;
|
||||
|
||||
_CPU_ISR_Enable(nextp->isr_level);
|
||||
sigprocmask( SIG_SETMASK, &nextp->isr_level, 0 );
|
||||
longjmp( nextp->regs, 0 );
|
||||
}
|
||||
|
||||
@@ -496,11 +500,6 @@ void _CPU_Context_restore(
|
||||
* _CPU_Context_switch
|
||||
*/
|
||||
|
||||
static void do_jump(
|
||||
Context_Control_overlay *currentp,
|
||||
Context_Control_overlay *nextp
|
||||
);
|
||||
|
||||
void _CPU_Context_switch(
|
||||
Context_Control *current,
|
||||
Context_Control *next
|
||||
@@ -508,50 +507,33 @@ void _CPU_Context_switch(
|
||||
{
|
||||
Context_Control_overlay *currentp = (Context_Control_overlay *)current;
|
||||
Context_Control_overlay *nextp = (Context_Control_overlay *)next;
|
||||
#if 0
|
||||
int status;
|
||||
#endif
|
||||
|
||||
currentp->isr_level = _CPU_ISR_Disable_support();
|
||||
|
||||
do_jump( currentp, nextp );
|
||||
|
||||
#if 0
|
||||
if (sigsetjmp(currentp->regs, 1) == 0) { /* Save the current context */
|
||||
siglongjmp(nextp->regs, 0); /* Switch to the new context */
|
||||
_Internal_error_Occurred(
|
||||
INTERNAL_ERROR_CORE,
|
||||
TRUE,
|
||||
status
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RTEMS_DEBUG
|
||||
if (_CPU_ISR_Get_level() == 0)
|
||||
abort();
|
||||
#endif
|
||||
|
||||
_CPU_ISR_Enable(currentp->isr_level);
|
||||
}
|
||||
|
||||
static void do_jump(
|
||||
Context_Control_overlay *currentp,
|
||||
Context_Control_overlay *nextp
|
||||
)
|
||||
{
|
||||
int status;
|
||||
|
||||
/*
|
||||
* Switch levels in one operation
|
||||
*/
|
||||
|
||||
status = sigprocmask( SIG_SETMASK, &nextp->isr_level, ¤tp->isr_level );
|
||||
if ( status )
|
||||
_Internal_error_Occurred(
|
||||
INTERNAL_ERROR_CORE,
|
||||
TRUE,
|
||||
status
|
||||
);
|
||||
|
||||
if (setjmp(currentp->regs) == 0) { /* Save the current context */
|
||||
longjmp(nextp->regs, 0); /* Switch to the new context */
|
||||
_Internal_error_Occurred(
|
||||
if ( status )
|
||||
_Internal_error_Occurred(
|
||||
INTERNAL_ERROR_CORE,
|
||||
TRUE,
|
||||
status
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* _CPU_Save_float_context
|
||||
@@ -731,7 +713,6 @@ void _CPU_Stray_signal(int sig_num)
|
||||
case SIGBUS:
|
||||
case SIGSEGV:
|
||||
case SIGTERM:
|
||||
case SIGIOT:
|
||||
_CPU_Fatal_error(0x100 + sig_num);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -436,8 +436,8 @@ extern "C" {
|
||||
/*
|
||||
* This is really just the area for the following fields.
|
||||
*
|
||||
* jmp_buf regs;
|
||||
* unsigned32 isr_level;
|
||||
* jmp_buf regs;
|
||||
* sigset_t isr_level;
|
||||
*
|
||||
* Doing it this way avoids conflicts between the native stuff and the
|
||||
* RTEMS stuff.
|
||||
@@ -491,7 +491,7 @@ typedef struct {
|
||||
* _CPU_Context_Initialize.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context;
|
||||
EXTERN Context_Control_fp _CPU_Null_fp_context;
|
||||
|
||||
/*
|
||||
* On some CPUs, RTEMS supports a software managed interrupt stack.
|
||||
@@ -506,8 +506,8 @@ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context;
|
||||
* CPU_HAS_SOFTWARE_INTERRUPT_STACK is defined as TRUE.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN void *_CPU_Interrupt_stack_low;
|
||||
SCORE_EXTERN void *_CPU_Interrupt_stack_high;
|
||||
EXTERN void *_CPU_Interrupt_stack_low;
|
||||
EXTERN void *_CPU_Interrupt_stack_high;
|
||||
|
||||
/*
|
||||
* With some compilation systems, it is difficult if not impossible to
|
||||
@@ -519,7 +519,7 @@ SCORE_EXTERN void *_CPU_Interrupt_stack_high;
|
||||
* sequence (if a dispatch is necessary).
|
||||
*/
|
||||
|
||||
SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)();
|
||||
EXTERN void (*_CPU_Thread_dispatch_pointer)();
|
||||
|
||||
/*
|
||||
* Nothing prevents the porter from declaring more CPU specific variables.
|
||||
|
||||
@@ -43,7 +43,7 @@ typedef struct {
|
||||
* This is the list of API extensions to the system initialization.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Chain_Control _API_extensions_List;
|
||||
EXTERN Chain_Control _API_extensions_List;
|
||||
|
||||
/*
|
||||
* _API_extensions_Initialization
|
||||
|
||||
@@ -40,8 +40,8 @@ extern "C" {
|
||||
|
||||
#if ( CPU_USE_GENERIC_BITFIELD_DATA == TRUE )
|
||||
|
||||
#ifndef SCORE_INIT
|
||||
extern const unsigned char __log2table[256];
|
||||
#ifndef INIT
|
||||
extern const unsigned char __log2table[256];
|
||||
#else
|
||||
const unsigned char __log2table[256] = {
|
||||
7, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
|
||||
@@ -35,7 +35,7 @@ extern "C" {
|
||||
* currently executing thread and given to the heir thread.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN volatile boolean _Context_Switch_necessary;
|
||||
EXTERN boolean _Context_Switch_necessary;
|
||||
|
||||
/*
|
||||
* _Context_Initialize
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef SCORE_INIT
|
||||
#ifdef INIT
|
||||
|
||||
const char _Copyright_Notice[] =
|
||||
"COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.\n\
|
||||
|
||||
@@ -40,7 +40,7 @@ typedef unsigned32 rtems_debug_control;
|
||||
* This variable contains the current debug level.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN rtems_debug_control _Debug_Level;
|
||||
EXTERN rtems_debug_control _Debug_Level;
|
||||
|
||||
/*
|
||||
* _Debug_Manager_initialization
|
||||
|
||||
@@ -29,8 +29,7 @@ extern "C" {
|
||||
|
||||
typedef enum {
|
||||
INTERNAL_ERROR_CORE,
|
||||
INTERNAL_ERROR_RTEMS_API,
|
||||
INTERNAL_ERROR_POSIX_API
|
||||
INTERNAL_ERROR_RTEMS_API
|
||||
} Internal_errors_Source;
|
||||
|
||||
/*
|
||||
@@ -70,7 +69,7 @@ typedef struct {
|
||||
* When a fatal error occurs, the error information is stored here.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Internal_errors_Information Internal_errors_What_happened;
|
||||
EXTERN Internal_errors_Information Internal_errors_What_happened;
|
||||
|
||||
/*
|
||||
* _Internal_error_Occurred
|
||||
|
||||
@@ -68,21 +68,21 @@ typedef ISR_Handler ( *ISR_Handler_entry )(
|
||||
* executing thread by an ISR handler.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN boolean _ISR_Signals_to_thread_executing;
|
||||
EXTERN boolean _ISR_Signals_to_thread_executing;
|
||||
|
||||
/*
|
||||
* The following contains the interrupt service routine nest level.
|
||||
* When this variable is zero, a thread is executing.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN unsigned32 _ISR_Nest_level;
|
||||
EXTERN unsigned32 _ISR_Nest_level;
|
||||
|
||||
/*
|
||||
* The following declares the Vector Table. Application
|
||||
* interrupt service routines are vectored by the ISR Handler via this table.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN ISR_Handler_entry _ISR_Vector_table[ ISR_NUMBER_OF_VECTORS ];
|
||||
EXTERN ISR_Handler_entry _ISR_Vector_table[ ISR_NUMBER_OF_VECTORS ];
|
||||
|
||||
/*
|
||||
* _ISR_Handler_initialization
|
||||
|
||||
@@ -127,34 +127,33 @@ typedef struct {
|
||||
* This is the core semaphore which the MPCI Receive Server blocks on.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN CORE_semaphore_Control _MPCI_Semaphore;
|
||||
EXTERN CORE_semaphore_Control _MPCI_Semaphore;
|
||||
/*
|
||||
* The following thread queue is used to maintain a list of tasks
|
||||
* which currently have outstanding remote requests.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads;
|
||||
EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads;
|
||||
|
||||
/*
|
||||
* The following define the internal pointers to the user's
|
||||
* configuration information.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN MPCI_Control *_MPCI_table;
|
||||
EXTERN MPCI_Control *_MPCI_table;
|
||||
|
||||
/*
|
||||
* The following points to the MPCI Receive Server.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Thread_Control *_MPCI_Receive_server_tcb;
|
||||
EXTERN Thread_Control *_MPCI_Receive_server_tcb;
|
||||
|
||||
/*
|
||||
* The following table contains the process packet routines provided
|
||||
* by each object that supports MP operations.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN MPCI_Packet_processor
|
||||
_MPCI_Packet_processors[MP_PACKET_CLASSES_LAST+1];
|
||||
EXTERN MPCI_Packet_processor _MPCI_Packet_processors[MP_PACKET_CLASSES_LAST+1];
|
||||
|
||||
/*
|
||||
* _MPCI_Handler_initialization
|
||||
|
||||
@@ -100,7 +100,7 @@ typedef enum {
|
||||
|
||||
#define OBJECTS_CLASSES_FIRST OBJECTS_NO_CLASS
|
||||
#define OBJECTS_CLASSES_LAST OBJECTS_POSIX_CONDITION_VARIABLES
|
||||
#define OBJECTS_CLASSES_FIRST_THREAD_CLASS OBJECTS_INTERNAL_THREADS
|
||||
#define OBJECTS_CLASSES_FIRST_THREAD_CLASS OBJECTS_MPCI_PACKETS
|
||||
#define OBJECTS_CLASSES_LAST_THREAD_CLASS OBJECTS_POSIX_THREADS
|
||||
|
||||
/*
|
||||
@@ -151,8 +151,8 @@ typedef struct {
|
||||
* node number of the local node.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN unsigned32 _Objects_Local_node;
|
||||
SCORE_EXTERN unsigned32 _Objects_Maximum_nodes;
|
||||
EXTERN unsigned32 _Objects_Local_node;
|
||||
EXTERN unsigned32 _Objects_Maximum_nodes;
|
||||
|
||||
/*
|
||||
* The following is the list of information blocks for each object
|
||||
@@ -160,7 +160,7 @@ SCORE_EXTERN unsigned32 _Objects_Maximum_nodes;
|
||||
* and obtain a pointer to the appropriate object control block.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Objects_Information
|
||||
EXTERN Objects_Information
|
||||
*_Objects_Information_table[OBJECTS_CLASSES_LAST + 1];
|
||||
|
||||
/*
|
||||
|
||||
@@ -137,8 +137,8 @@ void _Objects_MP_Is_remote (
|
||||
* inactive global object control blocks.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN unsigned32 _Objects_MP_Maximum_global_objects;
|
||||
SCORE_EXTERN Chain_Control _Objects_MP_Inactive_global_objects;
|
||||
EXTERN unsigned32 _Objects_MP_Maximum_global_objects;
|
||||
EXTERN Chain_Control _Objects_MP_Inactive_global_objects;
|
||||
|
||||
#ifndef __RTEMS_APPLICATION__
|
||||
#include <rtems/score/objectmp.inl>
|
||||
|
||||
@@ -58,9 +58,8 @@ typedef struct {
|
||||
* threads are ready at that priority.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN volatile Priority_Bit_map_control _Priority_Major_bit_map;
|
||||
SCORE_EXTERN Priority_Bit_map_control
|
||||
_Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
|
||||
EXTERN volatile Priority_Bit_map_control _Priority_Major_bit_map;
|
||||
EXTERN Priority_Bit_map_control _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
|
||||
|
||||
/*
|
||||
* The definition of the Priority_Bit_map_control type is CPU dependent.
|
||||
|
||||
@@ -32,34 +32,29 @@ typedef unsigned32 States_Control;
|
||||
* be used to compose and manipulate a thread's state.
|
||||
*/
|
||||
|
||||
#define STATES_ALL_SET 0xfffff /* all states */
|
||||
#define STATES_READY 0x00000 /* ready to run */
|
||||
#define STATES_DORMANT 0x00001 /* created not started */
|
||||
#define STATES_SUSPENDED 0x00002 /* waiting for resume */
|
||||
#define STATES_TRANSIENT 0x00004 /* in transition */
|
||||
#define STATES_DELAYING 0x00008 /* wait for timeout */
|
||||
#define STATES_WAITING_FOR_TIME 0x00010 /* wait for TOD */
|
||||
#define STATES_WAITING_FOR_BUFFER 0x00020
|
||||
#define STATES_WAITING_FOR_SEGMENT 0x00040
|
||||
#define STATES_WAITING_FOR_MESSAGE 0x00080
|
||||
#define STATES_WAITING_FOR_EVENT 0x00100
|
||||
#define STATES_WAITING_FOR_SEMAPHORE 0x00200
|
||||
#define STATES_WAITING_FOR_MUTEX 0x00400
|
||||
#define STATES_WAITING_FOR_CONDITION_VARIABLE 0x00800
|
||||
#define STATES_WAITING_FOR_JOIN_AT_EXIT 0x01000
|
||||
#define STATES_WAITING_FOR_RPC_REPLY 0x02000
|
||||
#define STATES_WAITING_FOR_PERIOD 0x04000
|
||||
#define STATES_WAITING_FOR_SIGNAL 0x08000
|
||||
#define STATES_INTERRUPTIBLE_BY_SIGNAL 0x10000
|
||||
#define STATES_ALL_SET 0xffff /* all states */
|
||||
#define STATES_READY 0x0000 /* ready to run */
|
||||
#define STATES_DORMANT 0x0001 /* created not started */
|
||||
#define STATES_SUSPENDED 0x0002 /* waiting for resume */
|
||||
#define STATES_TRANSIENT 0x0004 /* thread in transition */
|
||||
#define STATES_DELAYING 0x0008 /* wait for timeout */
|
||||
#define STATES_WAITING_FOR_TIME 0x0010 /* wait for TOD */
|
||||
#define STATES_WAITING_FOR_BUFFER 0x0020
|
||||
#define STATES_WAITING_FOR_SEGMENT 0x0040
|
||||
#define STATES_WAITING_FOR_MESSAGE 0x0080
|
||||
#define STATES_WAITING_FOR_EVENT 0x0100
|
||||
#define STATES_WAITING_FOR_SEMAPHORE 0x0200
|
||||
#define STATES_WAITING_FOR_MUTEX 0x0400
|
||||
#define STATES_WAITING_FOR_CONDITION_VARIABLE 0x0800
|
||||
#define STATES_WAITING_FOR_RPC_REPLY 0x1000
|
||||
#define STATES_WAITING_FOR_PERIOD 0x2000
|
||||
|
||||
#define STATES_LOCALLY_BLOCKED ( STATES_WAITING_FOR_BUFFER | \
|
||||
STATES_WAITING_FOR_SEGMENT | \
|
||||
STATES_WAITING_FOR_MESSAGE | \
|
||||
STATES_WAITING_FOR_SEMAPHORE | \
|
||||
STATES_WAITING_FOR_MUTEX | \
|
||||
STATES_WAITING_FOR_CONDITION_VARIABLE | \
|
||||
STATES_WAITING_FOR_JOIN_AT_EXIT | \
|
||||
STATES_WAITING_FOR_SIGNAL )
|
||||
STATES_WAITING_FOR_SEMAPHORE )
|
||||
|
||||
#define STATES_WAITING_ON_THREAD_QUEUE \
|
||||
( STATES_LOCALLY_BLOCKED | \
|
||||
@@ -69,8 +64,7 @@ typedef unsigned32 States_Control;
|
||||
STATES_WAITING_FOR_TIME | \
|
||||
STATES_WAITING_FOR_PERIOD | \
|
||||
STATES_WAITING_FOR_EVENT | \
|
||||
STATES_WAITING_ON_THREAD_QUEUE | \
|
||||
STATES_INTERRUPTIBLE_BY_SIGNAL )
|
||||
STATES_WAITING_ON_THREAD_QUEUE )
|
||||
|
||||
#ifndef __RTEMS_APPLICATION__
|
||||
#include <rtems/score/states.inl>
|
||||
|
||||
@@ -44,13 +44,13 @@ typedef enum {
|
||||
* an multiprocessing system.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN boolean _System_state_Is_multiprocessing;
|
||||
EXTERN boolean _System_state_Is_multiprocessing;
|
||||
|
||||
/*
|
||||
* The following variable contains the current system state.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN System_state_Codes _System_state_Current;
|
||||
EXTERN System_state_Codes _System_state_Current;
|
||||
|
||||
/*
|
||||
* Make it possible for the application to get the system state information.
|
||||
|
||||
@@ -36,41 +36,16 @@ extern "C" {
|
||||
|
||||
/*
|
||||
* The following insures that all data is declared in the space
|
||||
* of the initialization routine for either the Initialization Manager
|
||||
* or the initialization file for the appropriate API. It is
|
||||
* referenced as "external" in every other file.
|
||||
* of the Initialization Manager. It is referenced as "external"
|
||||
* in every other file.
|
||||
*/
|
||||
|
||||
#ifdef SCORE_INIT
|
||||
#undef SCORE_EXTERN
|
||||
#define SCORE_EXTERN
|
||||
#ifdef INIT
|
||||
#undef EXTERN
|
||||
#define EXTERN
|
||||
#else
|
||||
#undef SCORE_EXTERN
|
||||
#define SCORE_EXTERN extern
|
||||
#endif
|
||||
|
||||
#ifdef SAPI_INIT
|
||||
#undef SAPI_EXTERN
|
||||
#define SAPI_EXTERN
|
||||
#else
|
||||
#undef SAPI_EXTERN
|
||||
#define SAPI_EXTERN extern
|
||||
#endif
|
||||
|
||||
#ifdef RTEMS_API_INIT
|
||||
#undef RTEMS_EXTERN
|
||||
#define RTEMS_EXTERN
|
||||
#else
|
||||
#undef RTEMS_EXTERN
|
||||
#define RTEMS_EXTERN extern
|
||||
#endif
|
||||
|
||||
#ifdef POSIX_API_INIT
|
||||
#undef POSIX_EXTERN
|
||||
#define POSIX_EXTERN
|
||||
#else
|
||||
#undef POSIX_EXTERN
|
||||
#define POSIX_EXTERN extern
|
||||
#undef EXTERN
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -143,7 +118,7 @@ extern const char _Copyright_Notice[]; /* RTEMS copyright string */
|
||||
* The following defines the CPU dependent information table.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN rtems_cpu_table _CPU_Table; /* CPU dependent info */
|
||||
EXTERN rtems_cpu_table _CPU_Table; /* CPU dependent info */
|
||||
|
||||
/*
|
||||
* XXX weird RTEMS stuff
|
||||
|
||||
@@ -55,25 +55,6 @@ typedef enum {
|
||||
|
||||
typedef Thread ( *Thread_Entry )( );
|
||||
|
||||
/*
|
||||
* The following lists the algorithms used to manage the thread cpu budget.
|
||||
*
|
||||
* Reset Timeslice: At each context switch, reset the time quantum.
|
||||
* Exhaust Timeslice: Only reset the quantum once it is consumed.
|
||||
* Callout: Execute routine when budget is consumed.
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
THREAD_CPU_BUDGET_ALGORITHM_NONE,
|
||||
THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE,
|
||||
THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE,
|
||||
THREAD_CPU_BUDGET_ALGORITHM_CALLOUT
|
||||
} Thread_CPU_budget_algorithms;
|
||||
|
||||
typedef struct Thread_Control_struct Thread_Control;
|
||||
|
||||
typedef void (*Thread_CPU_budget_algorithm_callout )( Thread_Control * );
|
||||
|
||||
/*
|
||||
* The following structure contains the information which defines
|
||||
* the starting state of a thread.
|
||||
@@ -86,11 +67,9 @@ typedef struct {
|
||||
unsigned32 numeric_argument; /* numeric argument */
|
||||
/* initial execution modes */
|
||||
boolean is_preemptible;
|
||||
Thread_CPU_budget_algorithms budget_algorithm;
|
||||
Thread_CPU_budget_algorithm_callout budget_callout;
|
||||
boolean is_timeslice;
|
||||
unsigned32 isr_level;
|
||||
Priority_Control initial_priority; /* initial priority */
|
||||
boolean core_allocated_stack;
|
||||
Stack_Control Initial_stack; /* stack information */
|
||||
void *fp_context; /* initial FP context area address */
|
||||
void *stack; /* initial FP context area address */
|
||||
@@ -158,32 +137,28 @@ typedef enum {
|
||||
#define THREAD_API_FIRST THREAD_API_RTEMS
|
||||
#define THREAD_API_LAST THREAD_API_POSIX
|
||||
|
||||
struct Thread_Control_struct {
|
||||
Objects_Control Object;
|
||||
States_Control current_state;
|
||||
Priority_Control current_priority;
|
||||
Priority_Control real_priority;
|
||||
unsigned32 resource_count;
|
||||
Thread_Wait_information Wait;
|
||||
Watchdog_Control Timer;
|
||||
MP_packet_Prefix *receive_packet;
|
||||
typedef struct {
|
||||
Objects_Control Object;
|
||||
States_Control current_state;
|
||||
Priority_Control current_priority;
|
||||
Priority_Control real_priority;
|
||||
unsigned32 resource_count;
|
||||
Thread_Wait_information Wait;
|
||||
Watchdog_Control Timer;
|
||||
MP_packet_Prefix *receive_packet;
|
||||
/****************** end of common block ********************/
|
||||
boolean is_global;
|
||||
boolean do_post_task_switch_extension;
|
||||
|
||||
boolean is_preemptible;
|
||||
unsigned32 cpu_time_budget;
|
||||
Thread_CPU_budget_algorithms budget_algorithm;
|
||||
Thread_CPU_budget_algorithm_callout budget_callout;
|
||||
|
||||
Chain_Control *ready;
|
||||
Priority_Information Priority_map;
|
||||
Thread_Start_information Start;
|
||||
Context_Control Registers;
|
||||
void *fp_context;
|
||||
void *API_Extensions[ THREAD_API_LAST + 1 ];
|
||||
void **extensions;
|
||||
};
|
||||
boolean is_global;
|
||||
boolean do_post_task_switch_extension;
|
||||
Chain_Control *ready;
|
||||
Priority_Information Priority_map;
|
||||
Thread_Start_information Start;
|
||||
boolean is_preemptible;
|
||||
boolean is_timeslice;
|
||||
Context_Control Registers;
|
||||
void *fp_context;
|
||||
void *API_Extensions[ THREAD_API_LAST + 1 ];
|
||||
void **extensions;
|
||||
} Thread_Control;
|
||||
|
||||
/*
|
||||
* The following constants define the stack size requirements for
|
||||
@@ -198,14 +173,14 @@ struct Thread_Control_struct {
|
||||
* manage this class of objects.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Objects_Information _Thread_Internal_information;
|
||||
EXTERN Objects_Information _Thread_Internal_information;
|
||||
|
||||
/*
|
||||
* The following define the thread control pointers used to access
|
||||
* and manipulate the idle thread.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Thread_Control *_Thread_Idle;
|
||||
EXTERN Thread_Control *_Thread_Idle;
|
||||
|
||||
/*
|
||||
* The following context area contains the context of the "thread"
|
||||
@@ -215,7 +190,7 @@ SCORE_EXTERN Thread_Control *_Thread_Idle;
|
||||
* which initiated the system.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Context_Control _Thread_BSP_context;
|
||||
EXTERN Context_Control _Thread_BSP_context;
|
||||
|
||||
/*
|
||||
* The following declares the dispatch critical section nesting
|
||||
@@ -223,14 +198,7 @@ SCORE_EXTERN Context_Control _Thread_BSP_context;
|
||||
* moments.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN unsigned32 _Thread_Dispatch_disable_level;
|
||||
|
||||
/*
|
||||
* If this is non-zero, then the post-task switch extension
|
||||
* is run regardless of the state of the per thread flag.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN unsigned32 _Thread_Do_post_task_switch_extension;
|
||||
EXTERN unsigned32 _Thread_Dispatch_disable_level;
|
||||
|
||||
/*
|
||||
* The following holds how many user extensions are in the system. This
|
||||
@@ -238,27 +206,28 @@ SCORE_EXTERN unsigned32 _Thread_Do_post_task_switch_extension;
|
||||
* per thread.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN unsigned32 _Thread_Maximum_extensions;
|
||||
EXTERN unsigned32 _Thread_Maximum_extensions;
|
||||
|
||||
/*
|
||||
* The following is used to manage the length of a timeslice quantum.
|
||||
* The following data items are used to manage timeslicing.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN unsigned32 _Thread_Ticks_per_timeslice;
|
||||
EXTERN unsigned32 _Thread_Ticks_remaining_in_timeslice;
|
||||
EXTERN unsigned32 _Thread_Ticks_per_timeslice;
|
||||
|
||||
/*
|
||||
* The following points to the array of FIFOs used to manage the
|
||||
* set of ready threads.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Chain_Control *_Thread_Ready_chain;
|
||||
EXTERN Chain_Control *_Thread_Ready_chain;
|
||||
|
||||
/*
|
||||
* The following points to the thread which is currently executing.
|
||||
* This thread is implicitly manipulated by numerous directives.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Thread_Control *_Thread_Executing;
|
||||
EXTERN Thread_Control *_Thread_Executing;
|
||||
|
||||
/*
|
||||
* The following points to the highest priority ready thread
|
||||
@@ -267,14 +236,14 @@ SCORE_EXTERN Thread_Control *_Thread_Executing;
|
||||
* dispatch occurs.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Thread_Control *_Thread_Heir;
|
||||
EXTERN Thread_Control *_Thread_Heir;
|
||||
|
||||
/*
|
||||
* The following points to the thread whose floating point
|
||||
* context is currently loaded.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Thread_Control *_Thread_Allocated_fp;
|
||||
EXTERN Thread_Control *_Thread_Allocated_fp;
|
||||
|
||||
/*
|
||||
* _Thread_Handler_initialization
|
||||
@@ -336,27 +305,20 @@ void _Thread_Dispatch( void );
|
||||
* DESCRIPTION:
|
||||
*
|
||||
* XXX
|
||||
*
|
||||
* NOTES:
|
||||
*
|
||||
* If stack_area is NULL, it is allocated from the workspace.
|
||||
*
|
||||
* If the stack is allocated from the workspace, then it is guaranteed to be
|
||||
* of at least minimum size.
|
||||
*/
|
||||
|
||||
boolean _Thread_Initialize(
|
||||
Objects_Information *information,
|
||||
Thread_Control *the_thread,
|
||||
void *stack_area,
|
||||
unsigned32 stack_size,
|
||||
boolean is_fp,
|
||||
Priority_Control priority,
|
||||
boolean is_preemptible,
|
||||
Thread_CPU_budget_algorithms budget_algorithm,
|
||||
Thread_CPU_budget_algorithm_callout budget_callout,
|
||||
unsigned32 isr_level,
|
||||
Objects_Name name
|
||||
Objects_Information *information,
|
||||
Thread_Control *the_thread,
|
||||
void *stack_area, /* NULL if to be allocated */
|
||||
unsigned32 stack_size, /* insure it is >= min */
|
||||
boolean is_fp, /* TRUE if thread uses FP */
|
||||
Priority_Control priority,
|
||||
boolean is_preemptible,
|
||||
boolean is_timeslice,
|
||||
unsigned32 isr_level,
|
||||
Objects_Name name
|
||||
|
||||
);
|
||||
|
||||
/*
|
||||
|
||||
@@ -68,14 +68,14 @@ Thread_Control *_Thread_MP_Find_proxy (
|
||||
* blocking the multiprocessing receive thread.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Thread_Control *_Thread_MP_Receive;
|
||||
EXTERN Thread_Control *_Thread_MP_Receive;
|
||||
|
||||
/*
|
||||
* The following chains are used to manage proxies.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Chain_Control _Thread_MP_Active_proxies;
|
||||
SCORE_EXTERN Chain_Control _Thread_MP_Inactive_proxies;
|
||||
EXTERN Chain_Control _Thread_MP_Active_proxies;
|
||||
EXTERN Chain_Control _Thread_MP_Inactive_proxies;
|
||||
|
||||
#ifndef __RTEMS_APPLICATION__
|
||||
#include <rtems/score/threadmp.inl>
|
||||
|
||||
@@ -52,7 +52,7 @@ typedef void ( *Thread_queue_Extract_callout )(
|
||||
Thread_Control *
|
||||
);
|
||||
|
||||
SCORE_EXTERN Thread_queue_Extract_callout
|
||||
EXTERN Thread_queue_Extract_callout
|
||||
_Thread_queue_Extract_table[ OBJECTS_CLASSES_LAST + 1 ];
|
||||
|
||||
/*
|
||||
|
||||
@@ -39,10 +39,8 @@ extern "C" {
|
||||
|
||||
#define TOD_SECONDS_PER_NON_LEAP_YEAR (365 * TOD_SECONDS_PER_DAY)
|
||||
|
||||
#define TOD_MILLISECONDS_PER_SECOND 1000
|
||||
#define TOD_MICROSECONDS_PER_SECOND 1000000
|
||||
#define TOD_NANOSECONDS_PER_SECOND 1000000000
|
||||
#define TOD_NANOSECONDS_PER_MICROSECOND 1000
|
||||
#define TOD_MICROSECONDS_PER_SECOND 1000000
|
||||
#define TOD_MILLISECONDS_PER_SECOND 1000
|
||||
|
||||
/*
|
||||
* The following constant define the earliest year to which an
|
||||
@@ -71,20 +69,27 @@ typedef struct { /* RTEID style time/date */
|
||||
* The following contains the current time of day.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN TOD_Control _TOD_Current;
|
||||
EXTERN TOD_Control _TOD_Current;
|
||||
|
||||
/*
|
||||
* The following contains the number of seconds from 00:00:00
|
||||
* January 1, TOD_BASE_YEAR until the current time of day.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Watchdog_Interval _TOD_Seconds_since_epoch;
|
||||
EXTERN Watchdog_Interval _TOD_Seconds_since_epoch;
|
||||
|
||||
/*
|
||||
* The following contains the number of ticks since the
|
||||
* system was booted.
|
||||
*/
|
||||
|
||||
EXTERN Watchdog_Interval _TOD_Ticks_since_boot;
|
||||
|
||||
/*
|
||||
* The following contains the number of microseconds per tick.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN unsigned32 _TOD_Microseconds_per_tick;
|
||||
EXTERN unsigned32 _TOD_Microseconds_per_tick;
|
||||
|
||||
/*
|
||||
* The following contains the number of clock ticks per second.
|
||||
@@ -97,16 +102,16 @@ SCORE_EXTERN unsigned32 _TOD_Microseconds_per_tick;
|
||||
* can be a source of error in the current time of day.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN unsigned32 _TOD_Ticks_per_second;
|
||||
EXTERN unsigned32 _TOD_Ticks_per_second;
|
||||
|
||||
/*
|
||||
* This is the control structure for the watchdog timer which
|
||||
* fires to service the seconds chain.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Watchdog_Control _TOD_Seconds_watchdog;
|
||||
EXTERN Watchdog_Control _TOD_Seconds_watchdog;
|
||||
|
||||
#ifdef SCORE_INIT
|
||||
#ifdef INIT
|
||||
|
||||
/*
|
||||
* The following array contains the number of days in all months.
|
||||
|
||||
@@ -100,13 +100,13 @@ typedef struct {
|
||||
* configured by the application.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN User_extensions_Control _User_extensions_Initial;
|
||||
EXTERN User_extensions_Control _User_extensions_Initial;
|
||||
|
||||
/*
|
||||
* The following is used to manage the list of active extensions.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Chain_Control _User_extensions_List;
|
||||
EXTERN Chain_Control _User_extensions_List;
|
||||
|
||||
/*
|
||||
* _User_extensions_Thread_create
|
||||
|
||||
@@ -82,8 +82,6 @@ typedef struct {
|
||||
Watchdog_States state;
|
||||
Watchdog_Interval initial;
|
||||
Watchdog_Interval delta_interval;
|
||||
Watchdog_Interval start_time;
|
||||
Watchdog_Interval stop_time;
|
||||
Watchdog_Service_routine_entry routine;
|
||||
Objects_Id id;
|
||||
void *user_data;
|
||||
@@ -94,23 +92,16 @@ typedef struct {
|
||||
* during an insert on a watchdog delta chain.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN volatile unsigned32 _Watchdog_Sync_level;
|
||||
SCORE_EXTERN volatile unsigned32 _Watchdog_Sync_count;
|
||||
|
||||
/*
|
||||
* The following contains the number of ticks since the
|
||||
* system was booted.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Watchdog_Interval _Watchdog_Ticks_since_boot;
|
||||
EXTERN volatile unsigned32 _Watchdog_Sync_level;
|
||||
EXTERN volatile unsigned32 _Watchdog_Sync_count;
|
||||
|
||||
/*
|
||||
* The following defines the watchdog chains which are managed
|
||||
* on ticks and second boundaries.
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Chain_Control _Watchdog_Ticks_chain;
|
||||
SCORE_EXTERN Chain_Control _Watchdog_Seconds_chain;
|
||||
EXTERN Chain_Control _Watchdog_Ticks_chain;
|
||||
EXTERN Chain_Control _Watchdog_Seconds_chain;
|
||||
|
||||
/*
|
||||
* _Watchdog_Handler_initialization
|
||||
|
||||
@@ -30,7 +30,7 @@ extern "C" {
|
||||
*
|
||||
*/
|
||||
|
||||
SCORE_EXTERN Heap_Control _Workspace_Area; /* executive heap header */
|
||||
EXTERN Heap_Control _Workspace_Area; /* executive heap header */
|
||||
|
||||
/*
|
||||
* _Workspace_Handler_initialization
|
||||
|
||||
@@ -45,7 +45,7 @@ STATIC INLINE boolean _TOD_Is_set( void )
|
||||
STATIC INLINE void _TOD_Tickle_ticks( void )
|
||||
{
|
||||
_TOD_Current.ticks += 1;
|
||||
_Watchdog_Ticks_since_boot += 1;
|
||||
_TOD_Ticks_since_boot += 1;
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#define _TOD_Tickle_ticks() \
|
||||
_TOD_Current.ticks++; \
|
||||
_Watchdog_Ticks_since_boot++
|
||||
_TOD_Ticks_since_boot++
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*/
|
||||
|
||||
|
||||
void _CORE_mutex_Initialize(
|
||||
CORE_mutex_Control *the_mutex,
|
||||
Objects_Classes the_class,
|
||||
@@ -57,7 +57,7 @@ void _CORE_mutex_Initialize(
|
||||
|
||||
the_mutex->Attributes = *the_mutex_attributes;
|
||||
the_mutex->lock = initial_lock;
|
||||
|
||||
|
||||
if ( initial_lock == CORE_MUTEX_LOCKED ) {
|
||||
the_mutex->nest_count = 1;
|
||||
the_mutex->holder = _Thread_Executing;
|
||||
@@ -144,37 +144,14 @@ void _CORE_mutex_Seize(
|
||||
executing->Wait.id = id;
|
||||
_ISR_Enable( level );
|
||||
|
||||
switch ( the_mutex->Attributes.discipline ) {
|
||||
case CORE_MUTEX_DISCIPLINES_FIFO:
|
||||
case CORE_MUTEX_DISCIPLINES_PRIORITY:
|
||||
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
|
||||
break;
|
||||
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
|
||||
if ( the_mutex->holder->current_priority > executing->current_priority ) {
|
||||
_Thread_Change_priority(
|
||||
the_mutex->holder,
|
||||
executing->current_priority
|
||||
);
|
||||
}
|
||||
break;
|
||||
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) &&
|
||||
the_mutex->holder->current_priority >
|
||||
_Thread_Executing->current_priority ) {
|
||||
_Thread_Change_priority(
|
||||
the_mutex->holder, _Thread_Executing->current_priority );
|
||||
}
|
||||
|
||||
_Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout );
|
||||
|
||||
if ( _Thread_Executing->Wait.return_code == CORE_MUTEX_STATUS_SUCCESSFUL ) {
|
||||
switch ( the_mutex->Attributes.discipline ) {
|
||||
case CORE_MUTEX_DISCIPLINES_FIFO:
|
||||
case CORE_MUTEX_DISCIPLINES_PRIORITY:
|
||||
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
|
||||
break;
|
||||
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
|
||||
_Thread_Change_priority(
|
||||
executing,
|
||||
the_mutex->Attributes.priority_ceiling
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -195,7 +172,7 @@ void _CORE_mutex_Seize(
|
||||
* CORE_MUTEX_STATUS_SUCCESSFUL - if successful
|
||||
* core error code - if unsuccessful
|
||||
*/
|
||||
|
||||
|
||||
CORE_mutex_Status _CORE_mutex_Surrender(
|
||||
CORE_mutex_Control *the_mutex,
|
||||
Objects_Id id,
|
||||
@@ -203,70 +180,62 @@ CORE_mutex_Status _CORE_mutex_Surrender(
|
||||
)
|
||||
{
|
||||
Thread_Control *the_thread;
|
||||
Thread_Control *executing;
|
||||
|
||||
executing = _Thread_Executing;
|
||||
|
||||
if ( !_Objects_Are_ids_equal(
|
||||
_Thread_Executing->Object.id, the_mutex->holder_id ) )
|
||||
return( CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE );
|
||||
|
||||
|
||||
the_mutex->nest_count--;
|
||||
|
||||
|
||||
if ( the_mutex->nest_count != 0 )
|
||||
return( CORE_MUTEX_STATUS_SUCCESSFUL );
|
||||
|
||||
|
||||
_Thread_Executing->resource_count--;
|
||||
the_mutex->holder = NULL;
|
||||
the_mutex->holder_id = 0;
|
||||
|
||||
|
||||
/*
|
||||
* Whether or not someone is waiting for the mutex, an
|
||||
* inherited priority must be lowered if this is the last
|
||||
* mutex (i.e. resource) this task has.
|
||||
*/
|
||||
|
||||
switch ( the_mutex->Attributes.discipline ) {
|
||||
case CORE_MUTEX_DISCIPLINES_FIFO:
|
||||
case CORE_MUTEX_DISCIPLINES_PRIORITY:
|
||||
break;
|
||||
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
|
||||
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
|
||||
if ( executing->resource_count == 0 &&
|
||||
executing->real_priority !=
|
||||
executing->current_priority ) {
|
||||
_Thread_Change_priority( executing, executing->real_priority );
|
||||
}
|
||||
break;
|
||||
|
||||
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) &&
|
||||
_Thread_Executing->resource_count == 0 &&
|
||||
_Thread_Executing->real_priority !=
|
||||
_Thread_Executing->current_priority ) {
|
||||
_Thread_Change_priority(
|
||||
_Thread_Executing,
|
||||
_Thread_Executing->real_priority
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) {
|
||||
|
||||
|
||||
if ( !_Objects_Is_local_id( the_thread->Object.id ) ) {
|
||||
|
||||
the_mutex->holder = NULL;
|
||||
the_mutex->holder_id = the_thread->Object.id;
|
||||
the_mutex->nest_count = 1;
|
||||
|
||||
|
||||
( *api_mutex_mp_support)( the_thread, id );
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
the_mutex->holder = the_thread;
|
||||
the_mutex->holder_id = the_thread->Object.id;
|
||||
the_thread->resource_count++;
|
||||
the_mutex->nest_count = 1;
|
||||
|
||||
|
||||
/*
|
||||
* No special action for priority inheritance or priority ceiling
|
||||
* because the_thread is guaranteed to be the highest priority
|
||||
* thread waiting for the mutex.
|
||||
* No special action for priority inheritance because the_thread
|
||||
* is guaranteed to be the highest priority thread waiting for
|
||||
* the mutex.
|
||||
*/
|
||||
}
|
||||
} else
|
||||
the_mutex->lock = CORE_MUTEX_UNLOCKED;
|
||||
|
||||
|
||||
return( CORE_MUTEX_STATUS_SUCCESSFUL );
|
||||
}
|
||||
|
||||
@@ -283,16 +252,18 @@ CORE_mutex_Status _CORE_mutex_Surrender(
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*/
|
||||
|
||||
|
||||
void _CORE_mutex_Flush(
|
||||
CORE_mutex_Control *the_mutex,
|
||||
Thread_queue_Flush_callout remote_extract_callout,
|
||||
unsigned32 status
|
||||
)
|
||||
{
|
||||
|
||||
_Thread_queue_Flush(
|
||||
&the_mutex->Wait_queue,
|
||||
remote_extract_callout,
|
||||
status
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -115,8 +115,7 @@ void _MPCI_Create_server( void )
|
||||
CPU_ALL_TASKS_ARE_FP,
|
||||
PRIORITY_MINIMUM,
|
||||
FALSE, /* no preempt */
|
||||
THREAD_CPU_BUDGET_ALGORITHM_NONE,
|
||||
NULL, /* no budget algorithm callout */
|
||||
FALSE, /* not timesliced */
|
||||
0, /* all interrupts enabled */
|
||||
_MPCI_Internal_name
|
||||
);
|
||||
|
||||
@@ -71,7 +71,6 @@ void _Objects_Handler_initialization(
|
||||
* maximum - maximum objects of this class
|
||||
* is_string - TRUE if names for this object are strings
|
||||
* size - size of this object's control block
|
||||
* is_thread - TRUE if this class is threads
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*/
|
||||
|
||||
@@ -68,11 +68,10 @@ void _Thread_Handler_initialization(
|
||||
_Thread_Heir = NULL;
|
||||
_Thread_Allocated_fp = NULL;
|
||||
|
||||
_Thread_Do_post_task_switch_extension = 0;
|
||||
|
||||
_Thread_Maximum_extensions = maximum_extensions;
|
||||
|
||||
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
|
||||
_Thread_Ticks_remaining_in_timeslice = ticks_per_timeslice;
|
||||
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
|
||||
|
||||
_Thread_Ready_chain = _Workspace_Allocate_or_fatal_error(
|
||||
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
|
||||
@@ -138,8 +137,7 @@ void _Thread_Create_idle( void )
|
||||
CPU_IDLE_TASK_IS_FP,
|
||||
PRIORITY_MAXIMUM,
|
||||
TRUE, /* preemptable */
|
||||
THREAD_CPU_BUDGET_ALGORITHM_NONE,
|
||||
NULL, /* no budget algorithm callout */
|
||||
FALSE, /* not timesliced */
|
||||
0, /* all interrupts enabled */
|
||||
_Thread_Idle_name
|
||||
);
|
||||
@@ -246,8 +244,7 @@ void _Thread_Dispatch( void )
|
||||
|
||||
_User_extensions_Thread_switch( executing, heir );
|
||||
|
||||
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
|
||||
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
|
||||
_Thread_Ticks_remaining_in_timeslice = _Thread_Ticks_per_timeslice;
|
||||
|
||||
/*
|
||||
* If the CPU has hardware floating point, then we must address saving
|
||||
@@ -290,8 +287,7 @@ void _Thread_Dispatch( void )
|
||||
|
||||
_ISR_Enable( level );
|
||||
|
||||
if ( _Thread_Do_post_task_switch_extension ||
|
||||
executing->do_post_task_switch_extension ) {
|
||||
if ( executing->do_post_task_switch_extension ) {
|
||||
executing->do_post_task_switch_extension = FALSE;
|
||||
_API_extensions_Run_postswitch();
|
||||
}
|
||||
@@ -357,17 +353,8 @@ static unsigned32 _Thread_Stack_Allocate(
|
||||
* Deallocate the Thread's stack.
|
||||
*/
|
||||
|
||||
static void _Thread_Stack_Free(
|
||||
Thread_Control *the_thread
|
||||
)
|
||||
static void _Thread_Stack_Free(void *stack_addr)
|
||||
{
|
||||
/*
|
||||
* If the API provided the stack space, then don't free it.
|
||||
*/
|
||||
|
||||
if ( !the_thread->Start.core_allocated_stack )
|
||||
return;
|
||||
|
||||
/*
|
||||
* Call ONLY the CPU table stack free hook, or the
|
||||
* the RTEMS workspace free. This is so the free
|
||||
@@ -375,9 +362,9 @@ static void _Thread_Stack_Free(
|
||||
*/
|
||||
|
||||
if ( _CPU_Table.stack_free_hook )
|
||||
(*_CPU_Table.stack_free_hook)( the_thread->Start.Initial_stack.area );
|
||||
(*_CPU_Table.stack_free_hook)( stack_addr );
|
||||
else
|
||||
_Workspace_Free( the_thread->Start.Initial_stack.area );
|
||||
_Workspace_Free( stack_addr );
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
@@ -388,21 +375,21 @@ static void _Thread_Stack_Free(
|
||||
*/
|
||||
|
||||
boolean _Thread_Initialize(
|
||||
Objects_Information *information,
|
||||
Thread_Control *the_thread,
|
||||
void *stack_area,
|
||||
unsigned32 stack_size,
|
||||
boolean is_fp,
|
||||
Priority_Control priority,
|
||||
boolean is_preemptible,
|
||||
Thread_CPU_budget_algorithms budget_algorithm,
|
||||
Thread_CPU_budget_algorithm_callout budget_callout,
|
||||
unsigned32 isr_level,
|
||||
Objects_Name name
|
||||
Objects_Information *information,
|
||||
Thread_Control *the_thread,
|
||||
void *stack_area, /* NULL if to be allocated */
|
||||
unsigned32 stack_size, /* insure it is >= min */
|
||||
boolean is_fp, /* TRUE if thread uses FP */
|
||||
Priority_Control priority,
|
||||
boolean is_preemptible,
|
||||
boolean is_timeslice,
|
||||
unsigned32 isr_level,
|
||||
Objects_Name name
|
||||
|
||||
)
|
||||
{
|
||||
unsigned32 actual_stack_size = 0;
|
||||
void *stack = NULL;
|
||||
unsigned32 actual_stack_size;
|
||||
void *stack;
|
||||
void *fp_area;
|
||||
void *extensions_area;
|
||||
|
||||
@@ -410,29 +397,23 @@ boolean _Thread_Initialize(
|
||||
* Allocate and Initialize the stack for this thread.
|
||||
*/
|
||||
|
||||
if ( !_Stack_Is_enough( stack_size ) )
|
||||
actual_stack_size = STACK_MINIMUM_SIZE;
|
||||
else
|
||||
actual_stack_size = stack_size;
|
||||
|
||||
actual_stack_size = _Stack_Adjust_size( actual_stack_size );
|
||||
stack = stack_area;
|
||||
|
||||
if ( !stack ) {
|
||||
if ( !_Stack_Is_enough( stack_size ) )
|
||||
actual_stack_size = STACK_MINIMUM_SIZE;
|
||||
else
|
||||
actual_stack_size = stack_size;
|
||||
|
||||
actual_stack_size = _Stack_Adjust_size( actual_stack_size );
|
||||
stack = stack_area;
|
||||
|
||||
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
|
||||
|
||||
if ( !actual_stack_size )
|
||||
return FALSE; /* stack allocation failed */
|
||||
|
||||
stack = the_thread->Start.stack;
|
||||
|
||||
the_thread->Start.core_allocated_stack = TRUE;
|
||||
} else {
|
||||
stack = stack_area;
|
||||
actual_stack_size = stack_size;
|
||||
the_thread->Start.core_allocated_stack = FALSE;
|
||||
}
|
||||
} else
|
||||
the_thread->Start.stack = NULL;
|
||||
|
||||
_Stack_Initialize(
|
||||
&the_thread->Start.Initial_stack,
|
||||
@@ -448,7 +429,8 @@ boolean _Thread_Initialize(
|
||||
|
||||
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
|
||||
if ( !fp_area ) {
|
||||
_Thread_Stack_Free( the_thread );
|
||||
if ( the_thread->Start.stack )
|
||||
(void) _Thread_Stack_Free( the_thread->Start.stack );
|
||||
return FALSE;
|
||||
}
|
||||
fp_area = _Context_Fp_start( fp_area, 0 );
|
||||
@@ -458,6 +440,7 @@ boolean _Thread_Initialize(
|
||||
|
||||
the_thread->fp_context = fp_area;
|
||||
the_thread->Start.fp_context = fp_area;
|
||||
|
||||
|
||||
/*
|
||||
* Allocate the extensions area for this thread
|
||||
@@ -472,7 +455,8 @@ boolean _Thread_Initialize(
|
||||
if ( fp_area )
|
||||
(void) _Workspace_Free( fp_area );
|
||||
|
||||
_Thread_Stack_Free( the_thread );
|
||||
if ( the_thread->Start.stack )
|
||||
(void) _Thread_Stack_Free( the_thread->Start.stack );
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -485,10 +469,9 @@ boolean _Thread_Initialize(
|
||||
* General initialization
|
||||
*/
|
||||
|
||||
the_thread->Start.is_preemptible = is_preemptible;
|
||||
the_thread->Start.budget_algorithm = budget_algorithm;
|
||||
the_thread->Start.budget_callout = budget_callout;
|
||||
the_thread->Start.isr_level = isr_level;
|
||||
the_thread->Start.is_preemptible = is_preemptible;
|
||||
the_thread->Start.is_timeslice = is_timeslice;
|
||||
the_thread->Start.isr_level = isr_level;
|
||||
|
||||
the_thread->current_state = STATES_DORMANT;
|
||||
the_thread->resource_count = 0;
|
||||
@@ -515,7 +498,8 @@ boolean _Thread_Initialize(
|
||||
if ( fp_area )
|
||||
(void) _Workspace_Free( fp_area );
|
||||
|
||||
_Thread_Stack_Free( the_thread->Start.stack );
|
||||
if ( the_thread->Start.stack )
|
||||
(void) _Thread_Stack_Free( the_thread->Start.stack );
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -579,9 +563,8 @@ boolean _Thread_Restart(
|
||||
|
||||
_Thread_Set_transient( the_thread );
|
||||
the_thread->resource_count = 0;
|
||||
the_thread->is_preemptible = the_thread->Start.is_preemptible;
|
||||
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
|
||||
the_thread->budget_callout = the_thread->Start.budget_callout;
|
||||
the_thread->is_preemptible = the_thread->Start.is_preemptible;
|
||||
the_thread->is_timeslice = the_thread->Start.is_timeslice;
|
||||
|
||||
the_thread->Start.pointer_argument = pointer_argument;
|
||||
the_thread->Start.numeric_argument = numeric_argument;
|
||||
@@ -646,7 +629,8 @@ void _Thread_Close(
|
||||
if ( the_thread->Start.fp_context )
|
||||
(void) _Workspace_Free( the_thread->Start.fp_context );
|
||||
|
||||
_Thread_Stack_Free( the_thread );
|
||||
if ( the_thread->Start.stack )
|
||||
(void) _Workspace_Free( the_thread->Start.stack );
|
||||
|
||||
if ( the_thread->extensions )
|
||||
(void) _Workspace_Free( the_thread->extensions );
|
||||
@@ -721,38 +705,32 @@ void _Thread_Ready(
|
||||
* select heir
|
||||
*/
|
||||
|
||||
|
||||
void _Thread_Clear_state(
|
||||
Thread_Control *the_thread,
|
||||
States_Control state
|
||||
)
|
||||
{
|
||||
ISR_Level level;
|
||||
States_Control current_state;
|
||||
ISR_Level level;
|
||||
|
||||
_ISR_Disable( level );
|
||||
current_state = the_thread->current_state;
|
||||
|
||||
if ( current_state & state ) {
|
||||
current_state =
|
||||
the_thread->current_state = _States_Clear( state, current_state );
|
||||
the_thread->current_state =
|
||||
_States_Clear( state, the_thread->current_state );
|
||||
|
||||
if ( _States_Is_ready( current_state ) ) {
|
||||
if ( _States_Is_ready( the_thread->current_state ) ) {
|
||||
|
||||
_Priority_Add_to_bit_map( &the_thread->Priority_map );
|
||||
_Priority_Add_to_bit_map( &the_thread->Priority_map );
|
||||
|
||||
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
|
||||
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
|
||||
|
||||
_ISR_Flash( level );
|
||||
_ISR_Flash( level );
|
||||
|
||||
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
|
||||
_Thread_Heir = the_thread;
|
||||
if ( _Thread_Executing->is_preemptible ||
|
||||
the_thread->current_priority == 0 )
|
||||
_Context_Switch_necessary = TRUE;
|
||||
}
|
||||
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
|
||||
_Thread_Heir = the_thread;
|
||||
if ( _Thread_Executing->is_preemptible ||
|
||||
the_thread->current_priority == 0 )
|
||||
_Context_Switch_necessary = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
_ISR_Enable( level );
|
||||
}
|
||||
|
||||
@@ -878,7 +856,7 @@ void _Thread_Set_transient(
|
||||
|
||||
void _Thread_Reset_timeslice( void )
|
||||
{
|
||||
ISR_Level level;
|
||||
ISR_Level level;
|
||||
Thread_Control *executing;
|
||||
Chain_Control *ready;
|
||||
|
||||
@@ -886,6 +864,7 @@ void _Thread_Reset_timeslice( void )
|
||||
ready = executing->ready;
|
||||
_ISR_Disable( level );
|
||||
if ( _Chain_Has_only_one_node( ready ) ) {
|
||||
_Thread_Ticks_remaining_in_timeslice = _Thread_Ticks_per_timeslice;
|
||||
_ISR_Enable( level );
|
||||
return;
|
||||
}
|
||||
@@ -917,32 +896,13 @@ void _Thread_Reset_timeslice( void )
|
||||
|
||||
void _Thread_Tickle_timeslice( void )
|
||||
{
|
||||
Thread_Control *executing;
|
||||
|
||||
executing = _Thread_Executing;
|
||||
|
||||
if ( !executing->is_preemptible )
|
||||
if ( !_Thread_Executing->is_timeslice ||
|
||||
!_Thread_Executing->is_preemptible ||
|
||||
!_States_Is_ready( _Thread_Executing->current_state ) )
|
||||
return;
|
||||
|
||||
if ( !_States_Is_ready( executing->current_state ) )
|
||||
return;
|
||||
|
||||
switch ( executing->budget_algorithm ) {
|
||||
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
|
||||
break;
|
||||
|
||||
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
|
||||
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
|
||||
if ( --executing->cpu_time_budget == 0 ) {
|
||||
_Thread_Reset_timeslice();
|
||||
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
|
||||
}
|
||||
break;
|
||||
|
||||
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
|
||||
if ( --executing->cpu_time_budget == 0 )
|
||||
(*executing->budget_callout)( executing );
|
||||
break;
|
||||
if ( --_Thread_Ticks_remaining_in_timeslice == 0 ) {
|
||||
_Thread_Reset_timeslice();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1017,9 +977,8 @@ void _Thread_Load_environment(
|
||||
}
|
||||
|
||||
the_thread->do_post_task_switch_extension = FALSE;
|
||||
the_thread->is_preemptible = the_thread->Start.is_preemptible;
|
||||
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
|
||||
the_thread->budget_callout = the_thread->Start.budget_callout;
|
||||
the_thread->is_preemptible = the_thread->Start.is_preemptible;
|
||||
the_thread->is_timeslice = the_thread->Start.is_timeslice;
|
||||
|
||||
_Context_Initialize(
|
||||
&the_thread->Registers,
|
||||
@@ -1036,25 +995,10 @@ void _Thread_Load_environment(
|
||||
*
|
||||
* _Thread_Handler
|
||||
*
|
||||
* This routine is the "primal" entry point for all threads.
|
||||
* _Context_Initialize() dummies up the thread's initial context
|
||||
* to cause the first Context_Switch() to jump to _Thread_Handler().
|
||||
*
|
||||
* This routine is the default thread exitted error handler. It is
|
||||
* returned to when a thread exits. The configured fatal error handler
|
||||
* is invoked to process the exit.
|
||||
*
|
||||
* NOTE:
|
||||
*
|
||||
* On entry, it is assumed all interrupts are blocked and that this
|
||||
* routine needs to set the initial isr level. This may or may not
|
||||
* actually be needed by the context switch routine and as a result
|
||||
* interrupts may already be at there proper level. Either way,
|
||||
* setting the initial isr level properly here is safe.
|
||||
*
|
||||
* Currently this is only really needed for the posix port,
|
||||
* ref: _Context_Switch in unix/cpu.c
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
@@ -1062,18 +1006,9 @@ void _Thread_Load_environment(
|
||||
|
||||
void _Thread_Handler( void )
|
||||
{
|
||||
ISR_Level level;
|
||||
Thread_Control *executing;
|
||||
|
||||
|
||||
executing = _Thread_Executing;
|
||||
|
||||
/*
|
||||
* have to put level into a register for those cpu's that use
|
||||
* inline asm here
|
||||
*/
|
||||
|
||||
level = executing->Start.isr_level;
|
||||
_ISR_Set_level(level);
|
||||
|
||||
/*
|
||||
* Take care that 'begin' extensions get to complete before
|
||||
|
||||
@@ -37,6 +37,7 @@ void _TOD_Handler_initialization(
|
||||
{
|
||||
_TOD_Microseconds_per_tick = microseconds_per_tick;
|
||||
|
||||
_TOD_Ticks_since_boot = 0;
|
||||
_TOD_Seconds_since_epoch = 0;
|
||||
|
||||
_TOD_Current.year = TOD_BASE_YEAR;
|
||||
|
||||
@@ -32,8 +32,6 @@ void _Watchdog_Handler_initialization( void )
|
||||
{
|
||||
_Watchdog_Sync_count = 0;
|
||||
_Watchdog_Sync_level = 0;
|
||||
_Watchdog_Ticks_since_boot = 0;
|
||||
|
||||
_Chain_Initialize_empty( &_Watchdog_Ticks_chain );
|
||||
_Chain_Initialize_empty( &_Watchdog_Seconds_chain );
|
||||
}
|
||||
@@ -84,8 +82,6 @@ Watchdog_States _Watchdog_Remove(
|
||||
_Chain_Extract_unprotected( &the_watchdog->Node );
|
||||
break;
|
||||
}
|
||||
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
|
||||
|
||||
_ISR_Enable( level );
|
||||
return( previous_state );
|
||||
}
|
||||
@@ -204,8 +200,6 @@ restart:
|
||||
|
||||
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
|
||||
|
||||
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
|
||||
|
||||
exit_insert:
|
||||
_Watchdog_Sync_level = insert_isr_nest_level;
|
||||
_Watchdog_Sync_count--;
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
#include <signal.h>
|
||||
|
||||
typedef struct {
|
||||
jmp_buf regs;
|
||||
int isr_level;
|
||||
jmp_buf regs;
|
||||
sigset_t isr_level;
|
||||
} Context_Control;
|
||||
|
||||
int main(
|
||||
|
||||
@@ -194,7 +194,7 @@ int main(
|
||||
* Add 1 region for Malloc in libc_low
|
||||
*/
|
||||
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
BSP_Configuration.maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -13,179 +13,179 @@ Wait States: 0 wait states
|
||||
Times Reported in: microseconds
|
||||
Timer Source: count-down timer provided by a Motorola MC68901
|
||||
|
||||
Column A: 3.5.1
|
||||
Column B: 3.5.17 - pre-release
|
||||
Column A: 3.5.1 pre-release
|
||||
Column B: 3.5.1
|
||||
|
||||
# DESCRIPTION A B
|
||||
== ================================================================= ==== ====
|
||||
1 rtems_semaphore_create 73 64
|
||||
rtems_semaphore_delete 69 60
|
||||
rtems_semaphore_obtain: available 50 41
|
||||
rtems_semaphore_obtain: not available -- NO_WAIT 50 40
|
||||
rtems_semaphore_release: no waiting tasks 55 47
|
||||
1 rtems_semaphore_create 73 72
|
||||
rtems_semaphore_delete 69 70
|
||||
rtems_semaphore_obtain: available 50
|
||||
rtems_semaphore_obtain: not available -- NO_WAIT 50
|
||||
rtems_semaphore_release: no waiting tasks 55
|
||||
|
||||
2 rtems_semaphore_obtain: not available -- caller blocks 126 123
|
||||
2 rtems_semaphore_obtain: not available -- caller blocks 126 127
|
||||
|
||||
3 rtems_semaphore_release: task readied -- preempts caller 104 95
|
||||
3 rtems_semaphore_release: task readied -- preempts caller 104 103
|
||||
|
||||
4 rtems_task_restart: blocked task -- preempts caller 164 162
|
||||
rtems_task_restart: ready task -- preempts caller 158 156
|
||||
rtems_semaphore_release: task readied -- returns to caller 79 70
|
||||
rtems_task_create 164 157
|
||||
rtems_task_start 93 86
|
||||
rtems_task_restart: suspended task -- returns to caller 109 103
|
||||
rtems_task_delete: suspended task 154 147
|
||||
rtems_task_restart: ready task -- returns to caller 111 105
|
||||
rtems_task_restart: blocked task -- returns to caller 144 138
|
||||
rtems_task_delete: blocked task 162 153
|
||||
4 rtems_task_restart: blocked task -- preempts caller 164 165
|
||||
rtems_task_restart: ready task -- preempts caller 158
|
||||
rtems_semaphore_release: task readied -- returns to caller 79
|
||||
rtems_task_create 164 167
|
||||
rtems_task_start 93
|
||||
rtems_task_restart: suspended task -- returns to caller 109
|
||||
rtems_task_delete: suspended task 154 156
|
||||
rtems_task_restart: ready task -- returns to caller 111
|
||||
rtems_task_restart: blocked task -- returns to caller 144 145
|
||||
rtems_task_delete: blocked task 162 163
|
||||
|
||||
5 rtems_task_suspend: calling task 87 81
|
||||
rtems_task_resume: task readied -- preempts caller 79 71
|
||||
5 rtems_task_suspend: calling task 87
|
||||
rtems_task_resume: task readied -- preempts caller 79
|
||||
|
||||
6 rtems_task_restart: calling task 121 118
|
||||
rtems_task_suspend: returns to caller 54 45
|
||||
rtems_task_resume: task readied -- returns to caller 54 46
|
||||
rtems_task_delete: ready task 164 157
|
||||
6 rtems_task_restart: calling task 121
|
||||
rtems_task_suspend: returns to caller 54
|
||||
rtems_task_resume: task readied -- returns to caller 54
|
||||
rtems_task_delete: ready task 164
|
||||
|
||||
7 rtems_task_restart: suspended task -- preempts caller 151 149
|
||||
7 rtems_task_restart: suspended task -- preempts caller 151 152
|
||||
|
||||
8 rtems_task_set_priority: obtain current priority 40 30
|
||||
rtems_task_set_priority: returns to caller 75 67
|
||||
rtems_task_mode: obtain current mode 20 19
|
||||
rtems_task_mode: no reschedule 22 21
|
||||
rtems_task_mode: reschedule -- returns to caller 27 27
|
||||
rtems_task_mode: reschedule -- preempts caller 74 66
|
||||
rtems_task_set_note 41 32
|
||||
rtems_task_get_note 42 32
|
||||
rtems_clock_set 95 85
|
||||
rtems_clock_get 2 2
|
||||
8 rtems_task_set_priority: obtain current priority 40
|
||||
rtems_task_set_priority: returns to caller 75
|
||||
rtems_task_mode: obtain current mode 20
|
||||
rtems_task_mode: no reschedule 22
|
||||
rtems_task_mode: reschedule -- returns to caller 27
|
||||
rtems_task_mode: reschedule -- preempts caller 74
|
||||
rtems_task_set_note 41
|
||||
rtems_task_get_note 42
|
||||
rtems_clock_set 95
|
||||
rtems_clock_get 88
|
||||
|
||||
9 rtems_message_queue_create 304 294
|
||||
rtems_message_queue_send: no waiting tasks 124 117
|
||||
rtems_message_queue_urgent: no waiting tasks 123 117
|
||||
rtems_message_queue_receive: available 101 93
|
||||
rtems_message_queue_flush: no messages flushed 38 29
|
||||
rtems_message_queue_flush: messages flushed 50 41
|
||||
rtems_message_queue_delete 88 81
|
||||
9 rtems_message_queue_create 304 303
|
||||
rtems_message_queue_send: no waiting tasks 124
|
||||
rtems_message_queue_urgent: no waiting tasks 123 124
|
||||
rtems_message_queue_receive: available 101 102
|
||||
rtems_message_queue_flush: no messages flushed 38
|
||||
rtems_message_queue_flush: messages flushed 50 49
|
||||
rtems_message_queue_delete 88 89
|
||||
|
||||
10 rtems_message_queue_receive: not available -- NO_WAIT 54 45
|
||||
rtems_message_queue_receive: not available -- caller blocks 131 127
|
||||
10 rtems_message_queue_receive: not available -- NO_WAIT 54
|
||||
rtems_message_queue_receive: not available -- caller blocks 131
|
||||
|
||||
11 rtems_message_queue_send: task readied -- preempts caller 152 144
|
||||
11 rtems_message_queue_send: task readied -- preempts caller 152
|
||||
|
||||
12 rtems_message_queue_send: task readied -- returns to caller 126 118
|
||||
12 rtems_message_queue_send: task readied -- returns to caller 126 127
|
||||
|
||||
13 rtems_message_queue_urgent: task readied -- preempts caller 152 144
|
||||
13 rtems_message_queue_urgent: task readied -- preempts caller 152 151
|
||||
|
||||
14 rtems_message_queue_urgent: task readied -- returns to caller 126 116
|
||||
14 rtems_message_queue_urgent: task readied -- returns to caller 126
|
||||
|
||||
15 rtems_event_receive: obtain current events 0 <1
|
||||
rtems_event_receive: not available -- NO_WAIT 37 25
|
||||
rtems_event_receive: not available -- caller blocks 102 94
|
||||
rtems_event_send: no task readied 37 26
|
||||
rtems_event_receive: available 39 27
|
||||
rtems_event_send: task readied -- returns to caller 68 60
|
||||
15 rtems_event_receive: obtain current events 0
|
||||
rtems_event_receive: not available -- NO_WAIT 37
|
||||
rtems_event_receive: not available -- caller blocks 102 101
|
||||
rtems_event_send: no task readied 37
|
||||
rtems_event_receive: available 39 40
|
||||
rtems_event_send: task readied -- returns to caller 68 69
|
||||
|
||||
16 rtems_event_send: task readied -- preempts caller 96 89
|
||||
16 rtems_event_send: task readied -- preempts caller 96 97
|
||||
|
||||
17 rtems_task_set_priority: preempts caller 119 115
|
||||
17 rtems_task_set_priority: preempts caller 119 118
|
||||
|
||||
18 rtems_task_delete: calling task 192 187
|
||||
18 rtems_task_delete: calling task 192
|
||||
|
||||
19 rtems_signal_catch 23 13
|
||||
rtems_signal_send: returns to caller 43 34
|
||||
rtems_signal_send: signal to self 57 59
|
||||
exit ASR overhead: returns to calling task 39 39
|
||||
exit ASR overhead: returns to preempting task 70 60
|
||||
19 rtems_signal_catch 23
|
||||
rtems_signal_send: returns to caller 43
|
||||
rtems_signal_send: signal to self 57
|
||||
exit ASR overhead: returns to calling task 39
|
||||
exit ASR overhead: returns to preempting task 70
|
||||
|
||||
20 rtems_partition_create 96 83
|
||||
rtems_region_create 78 68
|
||||
rtems_partition_get_buffer: available 42 34
|
||||
rtems_partition_get_buffer: not available 42 33
|
||||
rtems_partition_return_buffer 49 40
|
||||
rtems_partition_delete 50 49
|
||||
rtems_region_get_segment: available 57 45
|
||||
rtems_region_get_segment: not available -- NO_WAIT 54 52
|
||||
rtems_region_return_segment: no waiting tasks 62 52
|
||||
rtems_region_get_segment: not available -- caller blocks 131 127
|
||||
rtems_region_return_segment: task readied -- preempts caller 147 138
|
||||
rtems_region_return_segment: task readied -- returns to caller 123 113
|
||||
rtems_region_delete 48 39
|
||||
rtems_io_initialize 4 4
|
||||
rtems_io_open 1 1
|
||||
rtems_io_close 1 0
|
||||
rtems_io_read 1 1
|
||||
rtems_io_write 1 1
|
||||
rtems_io_control 1 1
|
||||
20 rtems_partition_create 96 92
|
||||
rtems_region_create 78 77
|
||||
rtems_partition_get_buffer: available 42
|
||||
rtems_partition_get_buffer: not available 42
|
||||
rtems_partition_return_buffer 49
|
||||
rtems_partition_delete 50
|
||||
rtems_region_get_segment: available 57 58
|
||||
rtems_region_get_segment: not available -- NO_WAIT 54
|
||||
rtems_region_return_segment: no waiting tasks 62 61
|
||||
rtems_region_get_segment: not available -- caller blocks 131 132
|
||||
rtems_region_return_segment: task readied -- preempts caller 147 146
|
||||
rtems_region_return_segment: task readied -- returns to caller 123 122
|
||||
rtems_region_delete 48
|
||||
rtems_io_initialize 4
|
||||
rtems_io_open 1
|
||||
rtems_io_close 1
|
||||
rtems_io_read 1
|
||||
rtems_io_write 1
|
||||
rtems_io_control 1
|
||||
|
||||
21 rtems_task_ident 671 748
|
||||
rtems_message_queue_ident 656 730
|
||||
rtems_semaphore_ident 699 787
|
||||
rtems_partition_ident 655 730
|
||||
rtems_region_ident 670 739
|
||||
rtems_port_ident 657 728
|
||||
rtems_timer_ident 658 729
|
||||
rtems_rate_monotonic_ident 659 729
|
||||
21 rtems_task_ident 671
|
||||
rtems_message_queue_ident 656
|
||||
rtems_semaphore_ident 699
|
||||
rtems_partition_ident 655
|
||||
rtems_region_ident 670
|
||||
rtems_port_ident 657
|
||||
rtems_timer_ident 658
|
||||
rtems_rate_monotonic_ident 659
|
||||
|
||||
22 rtems_message_queue_broadcast: task readied -- returns to caller 129 122
|
||||
rtems_message_queue_broadcast: no waiting tasks 61 53
|
||||
rtems_message_queue_broadcast: task readied -- preempts caller 155 146
|
||||
22 rtems_message_queue_broadcast: task readied -- returns to caller 129
|
||||
rtems_message_queue_broadcast: no waiting tasks 61 62
|
||||
rtems_message_queue_broadcast: task readied -- preempts caller 155 154
|
||||
|
||||
23 rtems_timer_create 45 34
|
||||
rtems_timer_fire_after: inactive 70 65
|
||||
rtems_timer_fire_after: active 75 69
|
||||
rtems_timer_cancel: active 45 37
|
||||
rtems_timer_cancel: inactive 41 32
|
||||
rtems_timer_reset: inactive 65 58
|
||||
rtems_timer_reset: active 69 63
|
||||
rtems_timer_fire_when: inactive 100 92
|
||||
rtems_timer_fire_when: active 100 92
|
||||
rtems_timer_delete: active 60 52
|
||||
rtems_timer_delete: inactive 56 48
|
||||
rtems_task_wake_when 132 128
|
||||
23 rtems_timer_create 45
|
||||
rtems_timer_fire_after: inactive 70
|
||||
rtems_timer_fire_after: active 75
|
||||
rtems_timer_cancel: active 45
|
||||
rtems_timer_cancel: inactive 41
|
||||
rtems_timer_reset: inactive 65
|
||||
rtems_timer_reset: active 69
|
||||
rtems_timer_fire_when: inactive 100
|
||||
rtems_timer_fire_when: active 100
|
||||
rtems_timer_delete: active 60
|
||||
rtems_timer_delete: inactive 56
|
||||
rtems_task_wake_when 132
|
||||
|
||||
24 rtems_task_wake_after: yield -- returns to caller 29 18
|
||||
rtems_task_wake_after: yields -- preempts caller 71 63
|
||||
24 rtems_task_wake_after: yield -- returns to caller 29
|
||||
rtems_task_wake_after: yields -- preempts caller 71
|
||||
|
||||
25 rtems_clock_tick 14 16
|
||||
25 rtems_clock_tick 14
|
||||
|
||||
26 _ISR_Disable 2 1
|
||||
_ISR_Flash 2 1
|
||||
_ISR_Enable 1 1
|
||||
_Thread_Disable_dispatch 1 1
|
||||
_Thread_Enable_dispatch 22 10
|
||||
_Thread_Set_state 25 26
|
||||
_Thread_Disptach (NO FP) 55 48
|
||||
context switch: no floating point contexts 42 34
|
||||
context switch: self 8 9
|
||||
context switch: to another task 10 10
|
||||
context switch: restore 1st FP task 65 57
|
||||
fp context switch: save idle, restore idle 93 83
|
||||
fp context switch: save idle, restore initialized 60 59
|
||||
fp context switch: save initialized, restore initialized 60 59
|
||||
_Thread_Resume 19 19
|
||||
_Thread_Unblock 19 19
|
||||
_Thread_Ready 22 22
|
||||
_Thread_Get 14 15
|
||||
_Semaphore_Get 11 13
|
||||
_Thread_Get: invalid id 3 3
|
||||
26 _ISR_Disable 2
|
||||
_ISR_Flash 2
|
||||
_ISR_Enable 1
|
||||
_Thread_Disable_dispatch 1
|
||||
_Thread_Enable_dispatch 22
|
||||
_Thread_Set_state 25
|
||||
_Thread_Disptach (NO FP) 55
|
||||
context switch: no floating point contexts 42
|
||||
context switch: self 8
|
||||
context switch: to another task 10
|
||||
context switch: restore 1st FP task 65
|
||||
fp context switch: save idle, restore idle 93
|
||||
fp context switch: save idle, restore initialized 60
|
||||
fp context switch: save initialized, restore initialized 60
|
||||
_Thread_Resume 19
|
||||
_Thread_Unblock 19
|
||||
_Thread_Ready 22
|
||||
_Thread_Get 14
|
||||
_Semaphore_Get 11
|
||||
_Thread_Get: invalid id 3
|
||||
|
||||
27 interrupt entry overhead: returns to interrupted task 13 13
|
||||
interrupt exit overhead: returns to interrupted task 11 11
|
||||
interrupt entry overhead: returns to nested interrupt 12 12
|
||||
interrupt exit overhead: returns to nested interrupt 10 10
|
||||
interrupt entry overhead: returns to preempting task 12 12
|
||||
interrupt exit overhead: returns to preempting task 65 58
|
||||
27 interrupt entry overhead: returns to interrupted task 13 12
|
||||
interrupt exit overhead: returns to interrupted task 11
|
||||
interrupt entry overhead: returns to nested interrupt 12
|
||||
interrupt exit overhead: returns to nested interrupt 10
|
||||
interrupt entry overhead: returns to preempting task 12
|
||||
interrupt exit overhead: returns to preempting task 65
|
||||
|
||||
28 rtems_port_create 48 39
|
||||
rtems_port_external_to_internal 36 26
|
||||
rtems_port_internal_to_external 36 26
|
||||
rtems_port_delete 48 39
|
||||
28 rtems_port_create 48
|
||||
rtems_port_external_to_internal 36
|
||||
rtems_port_internal_to_external 36
|
||||
rtems_port_delete 48
|
||||
|
||||
29 rtems_rate_monotonic_create 47 36
|
||||
rtems_rate_monotonic_period: initiate period -- returns to caller 60 53
|
||||
rtems_rate_monotonic_period: obtain status 38 30
|
||||
rtems_rate_monotonic_cancel 48 39
|
||||
rtems_rate_monotonic_delete: inactive 57 49
|
||||
rtems_rate_monotonic_delete: active 61 53
|
||||
rtems_rate_monotonic_period: conclude periods -- caller blocks 88 82
|
||||
29 rtems_rate_monotonic_create 47
|
||||
rtems_rate_monotonic_period: initiate period -- returns to caller 60
|
||||
rtems_rate_monotonic_period: obtain status 38
|
||||
rtems_rate_monotonic_cancel 48
|
||||
rtems_rate_monotonic_delete: inactive 57
|
||||
rtems_rate_monotonic_delete: active 61
|
||||
rtems_rate_monotonic_period: conclude periods -- caller blocks 88
|
||||
|
||||
@@ -194,7 +194,7 @@ int main(
|
||||
* Add 1 region for Malloc in libc_low
|
||||
*/
|
||||
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
BSP_Configuration.maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -14,178 +14,178 @@ Times Reported in: microseconds
|
||||
Timer Source: i8254
|
||||
|
||||
Column A: 3.5.1 pre-release
|
||||
Column B: 3.5.17 pre-release
|
||||
Column B: unused
|
||||
|
||||
# DESCRIPTION A B
|
||||
== ================================================================= ==== ====
|
||||
1 rtems_semaphore_create 57 66
|
||||
rtems_semaphore_delete 59 61
|
||||
rtems_semaphore_obtain: available 9 7
|
||||
rtems_semaphore_obtain: not available -- NO_WAIT 8 7
|
||||
rtems_semaphore_release: no waiting tasks 9 8
|
||||
1 rtems_semaphore_create 57
|
||||
rtems_semaphore_delete 59
|
||||
rtems_semaphore_obtain: available 9
|
||||
rtems_semaphore_obtain: not available -- NO_WAIT 8
|
||||
rtems_semaphore_release: no waiting tasks 9
|
||||
|
||||
2 rtems_semaphore_obtain: not available -- caller blocks 39 37
|
||||
2 rtems_semaphore_obtain: not available -- caller blocks 39
|
||||
|
||||
3 rtems_semaphore_release: task readied -- preempts caller 25 24
|
||||
3 rtems_semaphore_release: task readied -- preempts caller 25
|
||||
|
||||
4 rtems_task_restart: blocked task -- preempts caller 124 102
|
||||
rtems_task_restart: ready task -- preempts caller 55 111
|
||||
rtems_semaphore_release: task readied -- returns to caller 16 15
|
||||
rtems_task_create 31 30
|
||||
rtems_task_start 19 18
|
||||
rtems_task_restart: suspended task -- returns to caller 20 19
|
||||
rtems_task_delete: suspended task 28 26
|
||||
rtems_task_restart: ready task -- returns to caller 20 19
|
||||
rtems_task_restart: blocked task -- returns to caller 28 26
|
||||
rtems_task_delete: blocked task 34 28
|
||||
4 rtems_task_restart: blocked task -- preempts caller 124
|
||||
rtems_task_restart: ready task -- preempts caller 55
|
||||
rtems_semaphore_release: task readied -- returns to caller 16
|
||||
rtems_task_create 31
|
||||
rtems_task_start 19
|
||||
rtems_task_restart: suspended task -- returns to caller 20
|
||||
rtems_task_delete: suspended task 28
|
||||
rtems_task_restart: ready task -- returns to caller 20
|
||||
rtems_task_restart: blocked task -- returns to caller 28
|
||||
rtems_task_delete: blocked task 34
|
||||
|
||||
5 rtems_task_suspend: calling task 26 23
|
||||
rtems_task_resume: task readied -- preempts caller 17 15
|
||||
5 rtems_task_suspend: calling task 26
|
||||
rtems_task_resume: task readied -- preempts caller 17
|
||||
|
||||
6 rtems_task_restart: calling task 22 19
|
||||
rtems_task_suspend: returns to caller 10 8
|
||||
rtems_task_resume: task readied -- returns to caller 10 8
|
||||
rtems_task_delete: ready task 34 33
|
||||
6 rtems_task_restart: calling task 22
|
||||
rtems_task_suspend: returns to caller 10
|
||||
rtems_task_resume: task readied -- returns to caller 10
|
||||
rtems_task_delete: ready task 34
|
||||
|
||||
7 rtems_task_restart: suspended task -- preempts caller 37 34
|
||||
7 rtems_task_restart: suspended task -- preempts caller 37
|
||||
|
||||
8 rtems_task_set_priority: obtain current priority 7 5
|
||||
rtems_task_set_priority: returns to caller 13 12
|
||||
rtems_task_mode: obtain current mode 3 3
|
||||
rtems_task_mode: no reschedule 4 4
|
||||
rtems_task_mode: reschedule -- returns to caller 20 17
|
||||
rtems_task_mode: reschedule -- preempts caller 39 37
|
||||
rtems_task_set_note 7 5
|
||||
rtems_task_get_note 7 5
|
||||
rtems_clock_set 17 16
|
||||
rtems_clock_get 2 1
|
||||
8 rtems_task_set_priority: obtain current priority 7
|
||||
rtems_task_set_priority: returns to caller 13
|
||||
rtems_task_mode: obtain current mode 3
|
||||
rtems_task_mode: no reschedule 4
|
||||
rtems_task_mode: reschedule -- returns to caller 20
|
||||
rtems_task_mode: reschedule -- preempts caller 39
|
||||
rtems_task_set_note 7
|
||||
rtems_task_get_note 7
|
||||
rtems_clock_set 17
|
||||
rtems_clock_get 2
|
||||
|
||||
9 rtems_message_queue_create 117 113
|
||||
rtems_message_queue_send: no waiting tasks 22 19
|
||||
rtems_message_queue_urgent: no waiting tasks 22 19
|
||||
rtems_message_queue_receive: available 18 16
|
||||
rtems_message_queue_flush: no messages flushed 15 14
|
||||
rtems_message_queue_flush: messages flushed 17 17
|
||||
rtems_message_queue_delete 63 63
|
||||
9 rtems_message_queue_create 117
|
||||
rtems_message_queue_send: no waiting tasks 22
|
||||
rtems_message_queue_urgent: no waiting tasks 22
|
||||
rtems_message_queue_receive: available 18
|
||||
rtems_message_queue_flush: no messages flushed 15
|
||||
rtems_message_queue_flush: messages flushed 17
|
||||
rtems_message_queue_delete 63
|
||||
|
||||
10 rtems_message_queue_receive: not available -- NO_WAIT 10 8
|
||||
rtems_message_queue_receive: not available -- caller blocks 42 40
|
||||
10 rtems_message_queue_receive: not available -- NO_WAIT 10
|
||||
rtems_message_queue_receive: not available -- caller blocks 42
|
||||
|
||||
11 rtems_message_queue_send: task readied -- preempts caller 38 37
|
||||
11 rtems_message_queue_send: task readied -- preempts caller 38
|
||||
|
||||
12 rtems_message_queue_send: task readied -- returns to caller 27 24
|
||||
12 rtems_message_queue_send: task readied -- returns to caller 27
|
||||
|
||||
13 rtems_message_queue_urgent: task readied -- preempts caller 38 36
|
||||
13 rtems_message_queue_urgent: task readied -- preempts caller 38
|
||||
|
||||
14 rtems_message_queue_urgent: task readied -- returns to caller 26 24
|
||||
14 rtems_message_queue_urgent: task readied -- returns to caller 26
|
||||
|
||||
15 rtems_event_receive: obtain current events 0 0
|
||||
rtems_event_receive: not available -- NO_WAIT 6 5
|
||||
rtems_event_receive: not available -- caller blocks 34 33
|
||||
rtems_event_send: no task readied 6 5
|
||||
rtems_event_receive: available 21 19
|
||||
rtems_event_send: task readied -- returns to caller 19 15
|
||||
15 rtems_event_receive: obtain current events 0
|
||||
rtems_event_receive: not available -- NO_WAIT 6
|
||||
rtems_event_receive: not available -- caller blocks 34
|
||||
rtems_event_send: no task readied 6
|
||||
rtems_event_receive: available 21
|
||||
rtems_event_send: task readied -- returns to caller 19
|
||||
|
||||
16 rtems_event_send: task readied -- preempts caller 26 24
|
||||
16 rtems_event_send: task readied -- preempts caller 26
|
||||
|
||||
17 rtems_task_set_priority: preempts caller 36 33
|
||||
17 rtems_task_set_priority: preempts caller 36
|
||||
|
||||
18 rtems_task_delete: calling task 51 52
|
||||
18 rtems_task_delete: calling task 51
|
||||
|
||||
19 rtems_signal_catch 17 18
|
||||
rtems_signal_send: returns to caller 38 39
|
||||
rtems_signal_send: signal to self 46 62
|
||||
exit ASR overhead: returns to calling task 20 25
|
||||
exit ASR overhead: returns to preempting task 29 29
|
||||
19 rtems_signal_catch 17
|
||||
rtems_signal_send: returns to caller 38
|
||||
rtems_signal_send: signal to self 46
|
||||
exit ASR overhead: returns to calling task 20
|
||||
exit ASR overhead: returns to preempting task 29
|
||||
|
||||
20 rtems_partition_create 65 67
|
||||
rtems_region_create 59 54
|
||||
rtems_partition_get_buffer: available 39 35
|
||||
rtems_partition_get_buffer: not available 18 16
|
||||
rtems_partition_return_buffer 36 30
|
||||
rtems_partition_delete 32 30
|
||||
rtems_region_get_segment: available 22 21
|
||||
rtems_region_get_segment: not available -- NO_WAIT 29 25
|
||||
rtems_region_return_segment: no waiting tasks 24 22
|
||||
rtems_region_get_segment: not available -- caller blocks 83 81
|
||||
rtems_region_return_segment: task readied -- preempts caller 85 84
|
||||
rtems_region_return_segment: task readied -- returns to caller 39 41
|
||||
rtems_region_delete 30 30
|
||||
rtems_io_initialize 1 1
|
||||
rtems_io_open 0 0
|
||||
rtems_io_close 0 0
|
||||
rtems_io_read 0 0
|
||||
rtems_io_write 0 0
|
||||
rtems_io_control 0 1
|
||||
20 rtems_partition_create 65
|
||||
rtems_region_create 59
|
||||
rtems_partition_get_buffer: available 39
|
||||
rtems_partition_get_buffer: not available 18
|
||||
rtems_partition_return_buffer 36
|
||||
rtems_partition_delete 32
|
||||
rtems_region_get_segment: available 22
|
||||
rtems_region_get_segment: not available -- NO_WAIT 29
|
||||
rtems_region_return_segment: no waiting tasks 24
|
||||
rtems_region_get_segment: not available -- caller blocks 83
|
||||
rtems_region_return_segment: task readied -- preempts caller 85
|
||||
rtems_region_return_segment: task readied -- returns to caller 39
|
||||
rtems_region_delete 30
|
||||
rtems_io_initialize 1
|
||||
rtems_io_open 0
|
||||
rtems_io_close 0
|
||||
rtems_io_read 0
|
||||
rtems_io_write 0
|
||||
rtems_io_control 0
|
||||
|
||||
21 rtems_task_ident 116 114
|
||||
rtems_message_queue_ident 113 111
|
||||
rtems_semaphore_ident 122 120
|
||||
rtems_partition_ident 113 110
|
||||
rtems_region_ident 115 111
|
||||
rtems_port_ident 113 109
|
||||
rtems_timer_ident 113 109
|
||||
rtems_rate_monotonic_ident 113 111
|
||||
21 rtems_task_ident 116
|
||||
rtems_message_queue_ident 113
|
||||
rtems_semaphore_ident 122
|
||||
rtems_partition_ident 113
|
||||
rtems_region_ident 115
|
||||
rtems_port_ident 113
|
||||
rtems_timer_ident 113
|
||||
rtems_rate_monotonic_ident 113
|
||||
|
||||
22 rtems_message_queue_broadcast: task readied -- returns to caller 82 85
|
||||
rtems_message_queue_broadcast: no waiting tasks 11 9
|
||||
rtems_message_queue_broadcast: task readied -- preempts caller 51 56
|
||||
22 rtems_message_queue_broadcast: task readied -- returns to caller 82
|
||||
rtems_message_queue_broadcast: no waiting tasks 11
|
||||
rtems_message_queue_broadcast: task readied -- preempts caller 51
|
||||
|
||||
23 rtems_timer_create 8 7
|
||||
rtems_timer_fire_after: inactive 14 12
|
||||
rtems_timer_fire_after: active 13 12
|
||||
rtems_timer_cancel: active 8 7
|
||||
rtems_timer_cancel: inactive 7 6
|
||||
rtems_timer_reset: inactive 11 10
|
||||
rtems_timer_reset: active 11 11
|
||||
rtems_timer_fire_when: inactive 17 16
|
||||
rtems_timer_fire_when: active 17 17
|
||||
rtems_timer_delete: active 10 9
|
||||
rtems_timer_delete: inactive 9 8
|
||||
rtems_task_wake_when 36 34
|
||||
23 rtems_timer_create 8
|
||||
rtems_timer_fire_after: inactive 14
|
||||
rtems_timer_fire_after: active 13
|
||||
rtems_timer_cancel: active 8
|
||||
rtems_timer_cancel: inactive 7
|
||||
rtems_timer_reset: inactive 11
|
||||
rtems_timer_reset: active 11
|
||||
rtems_timer_fire_when: inactive 17
|
||||
rtems_timer_fire_when: active 17
|
||||
rtems_timer_delete: active 10
|
||||
rtems_timer_delete: inactive 9
|
||||
rtems_task_wake_when 36
|
||||
|
||||
24 rtems_task_wake_after: yield -- returns to caller 5 3
|
||||
rtems_task_wake_after: yields -- preempts caller 22 19
|
||||
24 rtems_task_wake_after: yield -- returns to caller 5
|
||||
rtems_task_wake_after: yields -- preempts caller 22
|
||||
|
||||
25 rtems_clock_tick 31 31
|
||||
25 rtems_clock_tick 31
|
||||
|
||||
26 _ISR_Disable 11 12
|
||||
_ISR_Flash 9 9
|
||||
_ISR_Enable 31 67
|
||||
_Thread_Disable_dispatch 11 10
|
||||
_Thread_Enable_dispatch 18 18
|
||||
_Thread_Set_state 20 22
|
||||
_Thread_Disptach (NO FP) 37 41
|
||||
context switch: no floating point contexts 29 26
|
||||
context switch: self 14 10
|
||||
context switch: to another task 12 12
|
||||
context switch: restore 1st FP task 54 54
|
||||
fp context switch: save idle, restore idle 47 46
|
||||
fp context switch: save idle, restore initialized 25 25
|
||||
fp context switch: save initialized, restore initialized 24 25
|
||||
_Thread_Resume 23 24
|
||||
_Thread_Unblock 14 14
|
||||
_Thread_Ready 16 24
|
||||
_Thread_Get 2 2
|
||||
_Semaphore_Get 1 1
|
||||
_Thread_Get: invalid id 0 0
|
||||
26 _ISR_Disable 11
|
||||
_ISR_Flash 9
|
||||
_ISR_Enable 31
|
||||
_Thread_Disable_dispatch 11
|
||||
_Thread_Enable_dispatch 18
|
||||
_Thread_Set_state 20
|
||||
_Thread_Disptach (NO FP) 37
|
||||
context switch: no floating point contexts 29
|
||||
context switch: self 14
|
||||
context switch: to another task 12
|
||||
context switch: restore 1st FP task 54
|
||||
fp context switch: save idle, restore idle 47
|
||||
fp context switch: save idle, restore initialized 25
|
||||
fp context switch: save initialized, restore initialized 24
|
||||
_Thread_Resume 23
|
||||
_Thread_Unblock 14
|
||||
_Thread_Ready 16
|
||||
_Thread_Get 2
|
||||
_Semaphore_Get 1
|
||||
_Thread_Get: invalid id 0
|
||||
|
||||
27 interrupt entry overhead: returns to interrupted task 25 23
|
||||
interrupt exit overhead: returns to interrupted task 14 15
|
||||
interrupt entry overhead: returns to nested interrupt 12 12
|
||||
interrupt exit overhead: returns to nested interrupt 14 14
|
||||
interrupt entry overhead: returns to preempting task 14 16
|
||||
interrupt exit overhead: returns to preempting task 42 38
|
||||
27 interrupt entry overhead: returns to interrupted task 25
|
||||
interrupt exit overhead: returns to interrupted task 14
|
||||
interrupt entry overhead: returns to nested interrupt 12
|
||||
interrupt exit overhead: returns to nested interrupt 14
|
||||
interrupt entry overhead: returns to preempting task 14
|
||||
interrupt exit overhead: returns to preempting task 42
|
||||
|
||||
28 rtems_port_create 43 42
|
||||
rtems_port_external_to_internal 6 4
|
||||
rtems_port_internal_to_external 6 4
|
||||
rtems_port_delete 39 33
|
||||
28 rtems_port_create 43
|
||||
rtems_port_external_to_internal 6
|
||||
rtems_port_internal_to_external 6
|
||||
rtems_port_delete 39
|
||||
|
||||
29 rtems_rate_monotonic_create 48 42
|
||||
rtems_rate_monotonic_period: initiate period -- returns to caller 61 65
|
||||
rtems_rate_monotonic_period: obtain status 23 21
|
||||
rtems_rate_monotonic_cancel 38 35
|
||||
rtems_rate_monotonic_delete: inactive 32 32
|
||||
rtems_rate_monotonic_delete: active 22 22
|
||||
rtems_rate_monotonic_period: conclude periods -- caller blocks 24 19
|
||||
29 rtems_rate_monotonic_create 48
|
||||
rtems_rate_monotonic_period: initiate period -- returns to caller 61
|
||||
rtems_rate_monotonic_period: obtain status 23
|
||||
rtems_rate_monotonic_cancel 38
|
||||
rtems_rate_monotonic_delete: inactive 32
|
||||
rtems_rate_monotonic_delete: active 22
|
||||
rtems_rate_monotonic_period: conclude periods -- caller blocks 24
|
||||
|
||||
@@ -208,7 +208,7 @@ int main(
|
||||
* Add 1 region for the RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
BSP_Configuration.maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -216,7 +216,7 @@ int main(
|
||||
* Add 1 region for Malloc in libc_low
|
||||
*/
|
||||
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
BSP_Configuration.maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -40,11 +40,7 @@
|
||||
|
||||
|
||||
/* macros/functions */
|
||||
#if 0
|
||||
static void reboot(void) __attribute__ ((noreturn));
|
||||
__inline__ static void reboot() {asm("trap #15");}
|
||||
#else
|
||||
#define reboot() do {asm("trap #15");} while(0)
|
||||
#endif
|
||||
|
||||
#endif /* _EFI332_H_ */
|
||||
|
||||
@@ -189,7 +189,7 @@ int main(
|
||||
* Add 1 region for Malloc in libc_low
|
||||
*/
|
||||
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
BSP_Configuration.maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -15,12 +15,7 @@
|
||||
|
||||
|
||||
/* macro/function definitions */
|
||||
#if 0
|
||||
static void reboot(void) __attribute__ ((noreturn));
|
||||
__inline__ static void reboot() {asm("trap #15");}
|
||||
#else
|
||||
#define reboot() do {asm("trap #15");} while(0)
|
||||
#endif
|
||||
|
||||
__inline__ static void reboot(void) {asm("trap #15");}
|
||||
|
||||
#endif /* _EFI68k_H_ */
|
||||
|
||||
@@ -199,7 +199,7 @@ int main(
|
||||
* Add 1 region for Malloc in libc_low
|
||||
*/
|
||||
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
BSP_Configuration.maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -157,7 +157,7 @@ void tcp_init()
|
||||
detection circuit. */
|
||||
|
||||
/* I had trouble getting the tcp to be completely
|
||||
flexible to supply modes (i.e., automatically
|
||||
flexabale to supply modes (i.e., automatically
|
||||
selecting single or normal battery backup modes based
|
||||
on inputs at power-up. If single supply mode is
|
||||
selected, the low battery detect is disabled and the
|
||||
|
||||
@@ -180,7 +180,7 @@ int main(
|
||||
* Add 1 region for the RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
BSP_Configuration.maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -177,7 +177,7 @@ int main(
|
||||
* Add 1 region for the RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
BSP_Configuration.maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -154,7 +154,7 @@ void _Init68360 (void)
|
||||
|
||||
/*
|
||||
* Step 14: More system initialization
|
||||
* SDCR (Serial DMA configuration register)
|
||||
* SDCR (Serial DMA configuratin register)
|
||||
* Give SDMA priority over all interrupt handlers
|
||||
* Set DMA arbiration level to 4
|
||||
* CICR (CPM interrupt configuration register):
|
||||
|
||||
@@ -81,10 +81,10 @@ SECTIONS {
|
||||
|
||||
_HeapStart = .;
|
||||
__HeapStart = .;
|
||||
. += HeapSize; /* XXX -- Old gld can't handle this */
|
||||
. += StackSize; /* XXX -- Old gld can't handle this */
|
||||
/* . += 0x10000; */ /* HeapSize for old gld */
|
||||
/* . += 0x1000; */ /* StackSize for old gld */
|
||||
/* . += HeapSize; */ /* XXX -- Old gld can't handle this */
|
||||
/* . += StackSize; */ /* XXX -- Old gld can't handle this */
|
||||
. += 0x10000; /* HeapSize for old gld */
|
||||
. += 0x1000; /* StackSize for old gld */
|
||||
. = ALIGN (16);
|
||||
stack_init = .;
|
||||
clear_end = .;
|
||||
|
||||
@@ -223,7 +223,7 @@ int main(
|
||||
* Add 1 region for the RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
BSP_Configuration.maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -206,7 +206,7 @@ int main(
|
||||
* Add 1 region for the RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
BSP_Configuration.maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -14,178 +14,178 @@ Times Reported in: microseconds
|
||||
Timer Source: Zilog Z8036
|
||||
|
||||
Column A: 3.5.1 pre-release
|
||||
Column B: 3.5.17 pre-release
|
||||
Column B: unused
|
||||
|
||||
# DESCRIPTION A B
|
||||
== ================================================================= ==== ====
|
||||
1 rtems_semaphore_create 67 60
|
||||
rtems_semaphore_delete 64 58
|
||||
rtems_semaphore_obtain: available 46 38
|
||||
rtems_semaphore_obtain: not available -- NO_WAIT 45 38
|
||||
rtems_semaphore_release: no waiting tasks 51 44
|
||||
1 rtems_semaphore_create 67
|
||||
rtems_semaphore_delete 64
|
||||
rtems_semaphore_obtain: available 46
|
||||
rtems_semaphore_obtain: not available -- NO_WAIT 45
|
||||
rtems_semaphore_release: no waiting tasks 51
|
||||
|
||||
2 rtems_semaphore_obtain: not available -- caller blocks 113 109
|
||||
2 rtems_semaphore_obtain: not available -- caller blocks 113 115
|
||||
|
||||
3 rtems_semaphore_release: task readied -- preempts caller 94 87
|
||||
3 rtems_semaphore_release: task readied -- preempts caller 94
|
||||
|
||||
4 rtems_task_restart: blocked task -- preempts caller 152 149
|
||||
rtems_task_restart: ready task -- preempts caller 145 142
|
||||
rtems_semaphore_release: task readied -- returns to caller 71 66
|
||||
rtems_task_create 154 148
|
||||
rtems_task_start 82 76
|
||||
rtems_task_restart: suspended task -- returns to caller 94 89
|
||||
rtems_task_delete: suspended task 145 138
|
||||
rtems_task_restart: ready task -- returns to caller 97 92
|
||||
rtems_task_restart: blocked task -- returns to caller 128 124
|
||||
rtems_task_delete: blocked task 149 143
|
||||
4 rtems_task_restart: blocked task -- preempts caller 152
|
||||
rtems_task_restart: ready task -- preempts caller 145
|
||||
rtems_semaphore_release: task readied -- returns to caller 71
|
||||
rtems_task_create 154
|
||||
rtems_task_start 82
|
||||
rtems_task_restart: suspended task -- returns to caller 94 97
|
||||
rtems_task_delete: suspended task 145
|
||||
rtems_task_restart: ready task -- returns to caller 97 99
|
||||
rtems_task_restart: blocked task -- returns to caller 128 130
|
||||
rtems_task_delete: blocked task 149 151
|
||||
|
||||
5 rtems_task_suspend: calling task 77 71
|
||||
rtems_task_resume: task readied -- preempts caller 74 67
|
||||
5 rtems_task_suspend: calling task 77
|
||||
rtems_task_resume: task readied -- preempts caller 74
|
||||
|
||||
6 rtems_task_restart: calling task 101 95
|
||||
rtems_task_suspend: returns to caller 50 43
|
||||
rtems_task_resume: task readied -- returns to caller 50 45
|
||||
rtems_task_delete: ready task 151 144
|
||||
6 rtems_task_restart: calling task 101
|
||||
rtems_task_suspend: returns to caller 50
|
||||
rtems_task_resume: task readied -- returns to caller 50
|
||||
rtems_task_delete: ready task 151
|
||||
|
||||
7 rtems_task_restart: suspended task -- preempts caller 130 125
|
||||
7 rtems_task_restart: suspended task -- preempts caller 130 129
|
||||
|
||||
8 rtems_task_set_priority: obtain current priority 38 31
|
||||
rtems_task_set_priority: returns to caller 71 64
|
||||
rtems_task_mode: obtain current mode 16 14
|
||||
rtems_task_mode: no reschedule 18 16
|
||||
rtems_task_mode: reschedule -- returns to caller 24 23
|
||||
rtems_task_mode: reschedule -- preempts caller 68 60
|
||||
rtems_task_set_note 39 33
|
||||
rtems_task_get_note 40 33
|
||||
rtems_clock_set 93 86
|
||||
rtems_clock_get 1 1
|
||||
8 rtems_task_set_priority: obtain current priority 38
|
||||
rtems_task_set_priority: returns to caller 71
|
||||
rtems_task_mode: obtain current mode 16
|
||||
rtems_task_mode: no reschedule 18
|
||||
rtems_task_mode: reschedule -- returns to caller 24
|
||||
rtems_task_mode: reschedule -- preempts caller 68 67
|
||||
rtems_task_set_note 39 41
|
||||
rtems_task_get_note 40 41
|
||||
rtems_clock_set 93 91
|
||||
rtems_clock_get 1
|
||||
|
||||
9 rtems_message_queue_create 207 200
|
||||
rtems_message_queue_send: no waiting tasks 103 97
|
||||
rtems_message_queue_urgent: no waiting tasks 103 96
|
||||
rtems_message_queue_receive: available 87 79
|
||||
rtems_message_queue_flush: no messages flushed 36 29
|
||||
rtems_message_queue_flush: messages flushed 46 39
|
||||
rtems_message_queue_delete 85 80
|
||||
9 rtems_message_queue_create 207
|
||||
rtems_message_queue_send: no waiting tasks 103
|
||||
rtems_message_queue_urgent: no waiting tasks 103
|
||||
rtems_message_queue_receive: available 87
|
||||
rtems_message_queue_flush: no messages flushed 36
|
||||
rtems_message_queue_flush: messages flushed 46
|
||||
rtems_message_queue_delete 85
|
||||
|
||||
10 rtems_message_queue_receive: not available -- NO_WAIT 51 43
|
||||
rtems_message_queue_receive: not available -- caller blocks 115 114
|
||||
10 rtems_message_queue_receive: not available -- NO_WAIT 51 51
|
||||
rtems_message_queue_receive: not available -- caller blocks 115 119
|
||||
|
||||
11 rtems_message_queue_send: task readied -- preempts caller 129 123
|
||||
11 rtems_message_queue_send: task readied -- preempts caller 129
|
||||
|
||||
12 rtems_message_queue_send: task readied -- returns to caller 107 101
|
||||
12 rtems_message_queue_send: task readied -- returns to caller 107
|
||||
|
||||
13 rtems_message_queue_urgent: task readied -- preempts caller 130 123
|
||||
13 rtems_message_queue_urgent: task readied -- preempts caller 130
|
||||
|
||||
14 rtems_message_queue_urgent: task readied -- returns to caller 107 101
|
||||
14 rtems_message_queue_urgent: task readied -- returns to caller 107
|
||||
|
||||
15 rtems_event_receive: obtain current events 0 1
|
||||
rtems_event_receive: not available -- NO_WAIT 33 23
|
||||
rtems_event_receive: not available -- caller blocks 92 84
|
||||
rtems_event_send: no task readied 34 24
|
||||
rtems_event_receive: available 36 28
|
||||
rtems_event_send: task readied -- returns to caller 67 60
|
||||
15 rtems_event_receive: obtain current events 0
|
||||
rtems_event_receive: not available -- NO_WAIT 33
|
||||
rtems_event_receive: not available -- caller blocks 92
|
||||
rtems_event_send: no task readied 34
|
||||
rtems_event_receive: available 36
|
||||
rtems_event_send: task readied -- returns to caller 67
|
||||
|
||||
16 rtems_event_send: task readied -- preempts caller 90 84
|
||||
16 rtems_event_send: task readied -- preempts caller 90
|
||||
|
||||
17 rtems_task_set_priority: preempts caller 110 106
|
||||
17 rtems_task_set_priority: preempts caller 110
|
||||
|
||||
18 rtems_task_delete: calling task 175 170
|
||||
18 rtems_task_delete: calling task 175
|
||||
|
||||
19 rtems_signal_catch 23 15
|
||||
rtems_signal_send: returns to caller 43 37
|
||||
rtems_signal_send: signal to self 52 55
|
||||
exit ASR overhead: returns to calling task 37 37
|
||||
exit ASR overhead: returns to preempting task 65 54
|
||||
19 rtems_signal_catch 23
|
||||
rtems_signal_send: returns to caller 43 42
|
||||
rtems_signal_send: signal to self 52 51
|
||||
exit ASR overhead: returns to calling task 37
|
||||
exit ASR overhead: returns to preempting task 65
|
||||
|
||||
20 rtems_partition_create 77 70
|
||||
rtems_region_create 70 63
|
||||
rtems_partition_get_buffer: available 42 35
|
||||
rtems_partition_get_buffer: not available 40 33
|
||||
rtems_partition_return_buffer 50 43
|
||||
rtems_partition_delete 47 42
|
||||
rtems_region_get_segment: available 58 52
|
||||
rtems_region_get_segment: not available -- NO_WAIT 55 49
|
||||
rtems_region_return_segment: no waiting tasks 60 54
|
||||
rtems_region_get_segment: not available -- caller blocks 126 123
|
||||
rtems_region_return_segment: task readied -- preempts caller 143 136
|
||||
rtems_region_return_segment: task readied -- returns to caller 120 114
|
||||
rtems_region_delete 45 39
|
||||
rtems_io_initialize 6 4
|
||||
rtems_io_open 2 2
|
||||
rtems_io_close 1 1
|
||||
rtems_io_read 1 2
|
||||
rtems_io_write 1 3
|
||||
rtems_io_control 2 2
|
||||
20 rtems_partition_create 77
|
||||
rtems_region_create 70
|
||||
rtems_partition_get_buffer: available 42
|
||||
rtems_partition_get_buffer: not available 40
|
||||
rtems_partition_return_buffer 50
|
||||
rtems_partition_delete 47
|
||||
rtems_region_get_segment: available 58
|
||||
rtems_region_get_segment: not available -- NO_WAIT 55
|
||||
rtems_region_return_segment: no waiting tasks 60
|
||||
rtems_region_get_segment: not available -- caller blocks 126
|
||||
rtems_region_return_segment: task readied -- preempts caller 143
|
||||
rtems_region_return_segment: task readied -- returns to caller 120
|
||||
rtems_region_delete 45
|
||||
rtems_io_initialize 6
|
||||
rtems_io_open 2
|
||||
rtems_io_close 1
|
||||
rtems_io_read 1
|
||||
rtems_io_write 1
|
||||
rtems_io_control 2
|
||||
|
||||
21 rtems_task_ident 353 350
|
||||
rtems_message_queue_ident 344 341
|
||||
rtems_semaphore_ident 369 367
|
||||
rtems_partition_ident 344 341
|
||||
rtems_region_ident 350 348
|
||||
rtems_port_ident 343 340
|
||||
rtems_timer_ident 345 343
|
||||
rtems_rate_monotonic_ident 344 341
|
||||
21 rtems_task_ident 353
|
||||
rtems_message_queue_ident 344
|
||||
rtems_semaphore_ident 369
|
||||
rtems_partition_ident 344
|
||||
rtems_region_ident 350
|
||||
rtems_port_ident 343
|
||||
rtems_timer_ident 345
|
||||
rtems_rate_monotonic_ident 344
|
||||
|
||||
22 rtems_message_queue_broadcast: task readied -- returns to caller 115 111
|
||||
rtems_message_queue_broadcast: no waiting tasks 60 53
|
||||
rtems_message_queue_broadcast: task readied -- preempts caller 138 133
|
||||
22 rtems_message_queue_broadcast: task readied -- returns to caller 115
|
||||
rtems_message_queue_broadcast: no waiting tasks 60
|
||||
rtems_message_queue_broadcast: task readied -- preempts caller 138
|
||||
|
||||
23 rtems_timer_create 37 28
|
||||
rtems_timer_fire_after: inactive 66 58
|
||||
rtems_timer_fire_after: active 70 61
|
||||
rtems_timer_cancel: active 42 34
|
||||
rtems_timer_cancel: inactive 39 31
|
||||
rtems_timer_reset: inactive 60 54
|
||||
rtems_timer_reset: active 65 58
|
||||
rtems_timer_fire_when: inactive 96 88
|
||||
rtems_timer_fire_when: active 96 88
|
||||
rtems_timer_delete: active 55 47
|
||||
rtems_timer_delete: inactive 51 47
|
||||
rtems_task_wake_when 125 117
|
||||
23 rtems_timer_create 37
|
||||
rtems_timer_fire_after: inactive 66
|
||||
rtems_timer_fire_after: active 70 69
|
||||
rtems_timer_cancel: active 42
|
||||
rtems_timer_cancel: inactive 39
|
||||
rtems_timer_reset: inactive 60
|
||||
rtems_timer_reset: active 65 64
|
||||
rtems_timer_fire_when: inactive 96
|
||||
rtems_timer_fire_when: active 96
|
||||
rtems_timer_delete: active 55
|
||||
rtems_timer_delete: inactive 51 50
|
||||
rtems_task_wake_when 125
|
||||
|
||||
24 rtems_task_wake_after: yield -- returns to caller 26 16
|
||||
rtems_task_wake_after: yields -- preempts caller 65 56
|
||||
24 rtems_task_wake_after: yield -- returns to caller 26
|
||||
rtems_task_wake_after: yields -- preempts caller 65 63
|
||||
|
||||
25 rtems_clock_tick 14 17
|
||||
25 rtems_clock_tick 14
|
||||
|
||||
26 _ISR_Disable 0 0
|
||||
_ISR_Flash 0 0
|
||||
_ISR_Enable 0 0
|
||||
_Thread_Disable_dispatch 0 0
|
||||
_Thread_Enable_dispatch 19 11
|
||||
_Thread_Set_state 24 24
|
||||
_Thread_Disptach (NO FP) 50 43
|
||||
context switch: no floating point contexts 41 35
|
||||
context switch: self 9 9
|
||||
context switch: to another task 9 10
|
||||
context switch: restore 1st FP task 46 39
|
||||
fp context switch: save idle, restore idle 75 68
|
||||
fp context switch: save idle, restore initialized 66 66
|
||||
fp context switch: save initialized, restore initialized 65 66
|
||||
_Thread_Resume 18 19
|
||||
_Thread_Unblock 18 19
|
||||
_Thread_Ready 22 21
|
||||
_Thread_Get 12 14
|
||||
_Semaphore_Get 10 10
|
||||
_Thread_Get: invalid id 2 2
|
||||
26 _ISR_Disable 0
|
||||
_ISR_Flash 0
|
||||
_ISR_Enable 0
|
||||
_Thread_Disable_dispatch 0
|
||||
_Thread_Enable_dispatch 19
|
||||
_Thread_Set_state 24
|
||||
_Thread_Disptach (NO FP) 50
|
||||
context switch: no floating point contexts 41
|
||||
context switch: self 9
|
||||
context switch: to another task 9
|
||||
context switch: restore 1st FP task 46
|
||||
fp context switch: save idle, restore idle 75
|
||||
fp context switch: save idle, restore initialized 66
|
||||
fp context switch: save initialized, restore initialized 65
|
||||
_Thread_Resume 18 17
|
||||
_Thread_Unblock 18 17
|
||||
_Thread_Ready 22 21
|
||||
_Thread_Get 12
|
||||
_Semaphore_Get 10
|
||||
_Thread_Get: invalid id 2
|
||||
|
||||
27 interrupt entry overhead: returns to interrupted task 9 9
|
||||
interrupt exit overhead: returns to interrupted task 8 8
|
||||
interrupt entry overhead: returns to nested interrupt 14 12
|
||||
interrupt exit overhead: returns to nested interrupt 0 0
|
||||
interrupt entry overhead: returns to preempting task 8 9
|
||||
interrupt exit overhead: returns to preempting task 62 54
|
||||
27 interrupt entry overhead: returns to interrupted task 9
|
||||
interrupt exit overhead: returns to interrupted task 8
|
||||
interrupt entry overhead: returns to nested interrupt 14
|
||||
interrupt exit overhead: returns to nested interrupt 0
|
||||
interrupt entry overhead: returns to preempting task 8
|
||||
interrupt exit overhead: returns to preempting task 62
|
||||
|
||||
28 rtems_port_create 44 35
|
||||
rtems_port_external_to_internal 35 27
|
||||
rtems_port_internal_to_external 34 26
|
||||
rtems_port_delete 46 39
|
||||
28 rtems_port_create 44
|
||||
rtems_port_external_to_internal 35 34
|
||||
rtems_port_internal_to_external 34
|
||||
rtems_port_delete 46 45
|
||||
|
||||
29 rtems_rate_monotonic_create 40 32
|
||||
rtems_rate_monotonic_period: initiate period -- returns to caller 60 54
|
||||
rtems_rate_monotonic_period: obtain status 38 31
|
||||
rtems_rate_monotonic_cancel 46 39
|
||||
rtems_rate_monotonic_delete: inactive 54 48
|
||||
rtems_rate_monotonic_delete: active 57 51
|
||||
rtems_rate_monotonic_period: conclude periods -- caller blocks 83 74
|
||||
29 rtems_rate_monotonic_create 40
|
||||
rtems_rate_monotonic_period: initiate period -- returns to caller 60
|
||||
rtems_rate_monotonic_period: obtain status 38
|
||||
rtems_rate_monotonic_cancel 46
|
||||
rtems_rate_monotonic_delete: inactive 54
|
||||
rtems_rate_monotonic_delete: active 57
|
||||
rtems_rate_monotonic_period: conclude periods -- caller blocks 83
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
Notes about the MVME147 bsp
|
||||
|
||||
MVME147 port for TNI - Telecom Bretagne
|
||||
by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
May 1996
|
||||
|
||||
|
||||
This bsp is essentially based on the mvme136 bsp.
|
||||
|
||||
Summary of the modifications that were made:
|
||||
|
||||
* include
|
||||
|
||||
- bsp.h
|
||||
Peripheral Channel Controller memory mapping
|
||||
Z8530 memory mapping
|
||||
|
||||
* startup
|
||||
|
||||
- bspstart.c
|
||||
main () setup for VME roundrobin mode
|
||||
setup for the PCC interrupt vector base
|
||||
- bspclean.c
|
||||
bsp_cleanup () disable timer 1 & 2 interruptions
|
||||
- linkcmds set the RAM start (0x5000) and size (4Meg - 0x5000)
|
||||
- setvec.c unchanged
|
||||
- sbrk.c unchanged
|
||||
|
||||
* console
|
||||
|
||||
- console.c taken from the dmv152 bsp (Zilog Z8530)
|
||||
with no modification
|
||||
|
||||
* clock
|
||||
|
||||
- ckinit.c entirely rewritten for the PCC tick timer 2
|
||||
|
||||
* timer
|
||||
|
||||
- timerisr.s and timer.c
|
||||
entirely rewritten for the PCC tick timer 1
|
||||
now gives results un 6.25 us units (mininum timer delay,
|
||||
suprising big grain)
|
||||
|
||||
* times
|
||||
|
||||
- updated results for the mvme147 (beware of the 6.25 us grain)
|
||||
|
||||
* Makefiles
|
||||
|
||||
- compilation of shmsupp simply removed
|
||||
|
||||
|
||||
To be done:
|
||||
|
||||
* add VMEchip memory mapping to include/bsp.h
|
||||
|
||||
* update the overheads in coverhead.h
|
||||
|
||||
* add support for serila ports 2,3 and 4.
|
||||
|
||||
Other notes:
|
||||
|
||||
* There is no MP support (no more shmsupp) because I have no
|
||||
experience of the VME bus. The mvme136 shared memory support
|
||||
does not seem applicable on the VMEchip of the mvme147, so
|
||||
I don't know where to start. Suggestions are welcome.
|
||||
|
||||
* All the timing tests and sp tests have been run except tmoverhd.
|
||||
The test hangs during the pause (where the task should be suspended
|
||||
until a return). Maybe the rtems_initialize_executive is no more
|
||||
reentrant with this bsp.
|
||||
|
||||
Future work:
|
||||
|
||||
* Add gdb serial remote support.
|
||||
|
||||
* Shared memory support (I don't really need it, but I can do
|
||||
it if it's simple).
|
||||
|
||||
* Message passing on VME bus, with Ada 95 annex E (distributed
|
||||
systems) in mind.
|
||||
@@ -1,142 +0,0 @@
|
||||
/* Clock_init()
|
||||
*
|
||||
* This routine initializes the Tick Timer 2 on the MVME147 board.
|
||||
* The tick frequency is 1 millisecond.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* MVME147 port for TNI - Telecom Bretagne
|
||||
* by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
* May 1996
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <bsp.h>
|
||||
#include <rtems/libio.h>
|
||||
|
||||
#define MS_COUNT 65376 /* 1ms */
|
||||
/* MS_COUNT = 0x10000 - 1e-3/6.25e-6 */
|
||||
#define CLOCK_INT_LEVEL 6 /* T2's interrupt level */
|
||||
|
||||
rtems_unsigned32 Clock_isrs; /* ISRs until next tick */
|
||||
volatile rtems_unsigned32 Clock_driver_ticks; /* ticks since initialization */
|
||||
rtems_isr_entry Old_ticker;
|
||||
|
||||
void Clock_exit( void );
|
||||
|
||||
/*
|
||||
* These are set by clock driver during its init
|
||||
*/
|
||||
|
||||
rtems_device_major_number rtems_clock_major = ~0;
|
||||
rtems_device_minor_number rtems_clock_minor;
|
||||
|
||||
|
||||
/*
|
||||
* ISR Handler
|
||||
*/
|
||||
|
||||
rtems_isr Clock_isr(rtems_vector_number vector)
|
||||
{
|
||||
Clock_driver_ticks += 1;
|
||||
pcc->timer2_int_control |= 0x80; /* Acknowledge interr. */
|
||||
|
||||
if (Clock_isrs == 1) {
|
||||
rtems_clock_tick();
|
||||
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
|
||||
}
|
||||
else
|
||||
Clock_isrs -= 1;
|
||||
}
|
||||
|
||||
void Install_clock(rtems_isr_entry clock_isr )
|
||||
{
|
||||
|
||||
Clock_driver_ticks = 0;
|
||||
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
|
||||
|
||||
if ( BSP_Configuration.ticks_per_timeslice ) {
|
||||
Old_ticker =
|
||||
(rtems_isr_entry) set_vector( clock_isr, TIMER_2_VECTOR, 1 );
|
||||
|
||||
pcc->timer2_int_control = 0x00; /* Disable T2 Interr. */
|
||||
pcc->timer2_preload = MS_COUNT;
|
||||
/* write preload value */
|
||||
pcc->timer2_control = 0x07; /* clear T2 overflow counter, enable counter */
|
||||
pcc->timer2_int_control = CLOCK_INT_LEVEL|0x08;
|
||||
/* Enable Timer 2 and set its int. level */
|
||||
|
||||
atexit( Clock_exit );
|
||||
}
|
||||
}
|
||||
|
||||
void Clock_exit( void )
|
||||
{
|
||||
if ( BSP_Configuration.ticks_per_timeslice ) {
|
||||
pcc->timer2_int_control = 0x00; /* Disable T2 Interr. */
|
||||
}
|
||||
}
|
||||
|
||||
rtems_device_driver Clock_initialize(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void *pargp
|
||||
)
|
||||
{
|
||||
Install_clock( Clock_isr );
|
||||
|
||||
/*
|
||||
* make major/minor avail to others such as shared memory driver
|
||||
*/
|
||||
|
||||
rtems_clock_major = major;
|
||||
rtems_clock_minor = minor;
|
||||
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
rtems_device_driver Clock_control(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void *pargp
|
||||
)
|
||||
{
|
||||
rtems_unsigned32 isrlevel;
|
||||
rtems_libio_ioctl_args_t *args = pargp;
|
||||
|
||||
if (args == 0)
|
||||
goto done;
|
||||
|
||||
/*
|
||||
* This is hokey, but until we get a defined interface
|
||||
* to do this, it will just be this simple...
|
||||
*/
|
||||
|
||||
if (args->command == rtems_build_name('I', 'S', 'R', ' '))
|
||||
{
|
||||
Clock_isr(TIMER_2_VECTOR);
|
||||
}
|
||||
else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
|
||||
{
|
||||
rtems_interrupt_disable( isrlevel );
|
||||
(void) set_vector( args->buffer, TIMER_2_VECTOR, 1 );
|
||||
rtems_interrupt_enable( isrlevel );
|
||||
}
|
||||
|
||||
done:
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
@@ -1,258 +0,0 @@
|
||||
/*
|
||||
* This file contains the MVME147 console IO package.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* MVME147 port for TNI - Telecom Bretagne
|
||||
* by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
* May 1996
|
||||
*
|
||||
* This file was taken from the DMV152 bsp
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#define M147_INIT
|
||||
|
||||
#include <bsp.h>
|
||||
#include <rtems/libio.h>
|
||||
#include <z8530.h>
|
||||
|
||||
|
||||
/* console_initialize
|
||||
*
|
||||
* This routine initializes the console IO driver.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values:
|
||||
*/
|
||||
|
||||
rtems_device_driver console_initialize(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void *arg
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
status = rtems_io_register_name(
|
||||
"/dev/console",
|
||||
major,
|
||||
(rtems_device_minor_number) 0
|
||||
);
|
||||
|
||||
if (status != RTEMS_SUCCESSFUL)
|
||||
rtems_fatal_error_occurred(status);
|
||||
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
/* is_character_ready
|
||||
*
|
||||
* This routine returns TRUE if a character is available.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values:
|
||||
*/
|
||||
|
||||
rtems_boolean is_character_ready(
|
||||
char *ch
|
||||
)
|
||||
{
|
||||
rtems_unsigned8 rr_0;
|
||||
|
||||
for ( ; ; ) {
|
||||
Z8x30_READ_CONTROL( CONSOLE_CONTROL, RR_0, rr_0 );
|
||||
if ( !(rr_0 & RR_0_RX_DATA_AVAILABLE) )
|
||||
return( FALSE );
|
||||
|
||||
Z8x30_READ_DATA( CONSOLE_DATA, *ch );
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
/* inbyte
|
||||
*
|
||||
* This routine reads a character from the SCC.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values:
|
||||
* character read from SCC
|
||||
*/
|
||||
|
||||
char inbyte( void )
|
||||
{
|
||||
rtems_unsigned8 rr_0;
|
||||
char ch;
|
||||
|
||||
for ( ; ; ) {
|
||||
Z8x30_READ_CONTROL( CONSOLE_CONTROL, RR_0, rr_0 );
|
||||
if ( (rr_0 & RR_0_RX_DATA_AVAILABLE) != 0 )
|
||||
break;
|
||||
}
|
||||
|
||||
Z8x30_READ_DATA( CONSOLE_DATA, ch );
|
||||
return ( ch );
|
||||
}
|
||||
|
||||
/* outbyte
|
||||
*
|
||||
* This routine transmits a character out the SCC. It supports
|
||||
* XON/XOFF flow control.
|
||||
*
|
||||
* Input parameters:
|
||||
* ch - character to be transmitted
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*/
|
||||
|
||||
void outbyte(
|
||||
char ch
|
||||
)
|
||||
{
|
||||
rtems_unsigned8 rr_0;
|
||||
char flow_control;
|
||||
|
||||
for ( ; ; ) {
|
||||
Z8x30_READ_CONTROL( CONSOLE_CONTROL, RR_0, rr_0 );
|
||||
if ( (rr_0 & RR_0_TX_BUFFER_EMPTY) != 0 )
|
||||
break;
|
||||
}
|
||||
|
||||
for ( ; ; ) {
|
||||
Z8x30_READ_CONTROL( CONSOLE_CONTROL, RR_0, rr_0 );
|
||||
if ( (rr_0 & RR_0_RX_DATA_AVAILABLE) == 0 )
|
||||
break;
|
||||
|
||||
Z8x30_READ_DATA( CONSOLE_DATA, flow_control );
|
||||
|
||||
if ( flow_control == XOFF )
|
||||
do {
|
||||
do {
|
||||
Z8x30_READ_CONTROL( CONSOLE_CONTROL, RR_0, rr_0 );
|
||||
} while ( (rr_0 & RR_0_RX_DATA_AVAILABLE) == 0 );
|
||||
Z8x30_READ_DATA( CONSOLE_DATA, flow_control );
|
||||
} while ( flow_control != XON );
|
||||
}
|
||||
|
||||
Z8x30_WRITE_DATA( CONSOLE_DATA, ch );
|
||||
}
|
||||
|
||||
/*
|
||||
* Open entry point
|
||||
*/
|
||||
|
||||
rtems_device_driver console_open(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void * arg
|
||||
)
|
||||
{
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Close entry point
|
||||
*/
|
||||
|
||||
rtems_device_driver console_close(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void * arg
|
||||
)
|
||||
{
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
/*
|
||||
* read bytes from the serial port. We only have stdin.
|
||||
*/
|
||||
|
||||
rtems_device_driver console_read(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void * arg
|
||||
)
|
||||
{
|
||||
rtems_libio_rw_args_t *rw_args;
|
||||
char *buffer;
|
||||
int maximum;
|
||||
int count = 0;
|
||||
|
||||
rw_args = (rtems_libio_rw_args_t *) arg;
|
||||
|
||||
buffer = rw_args->buffer;
|
||||
maximum = rw_args->count;
|
||||
|
||||
for (count = 0; count < maximum; count++) {
|
||||
buffer[ count ] = inbyte();
|
||||
if (buffer[ count ] == '\n' || buffer[ count ] == '\r') {
|
||||
buffer[ count++ ] = '\n';
|
||||
buffer[ count ] = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
rw_args->bytes_moved = count;
|
||||
return (count >= 0) ? RTEMS_SUCCESSFUL : RTEMS_UNSATISFIED;
|
||||
}
|
||||
|
||||
/*
|
||||
* write bytes to the serial port. Stdout and stderr are the same.
|
||||
*/
|
||||
|
||||
rtems_device_driver console_write(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void * arg
|
||||
)
|
||||
{
|
||||
int count;
|
||||
int maximum;
|
||||
rtems_libio_rw_args_t *rw_args;
|
||||
char *buffer;
|
||||
|
||||
rw_args = (rtems_libio_rw_args_t *) arg;
|
||||
|
||||
buffer = rw_args->buffer;
|
||||
maximum = rw_args->count;
|
||||
|
||||
for (count = 0; count < maximum; count++) {
|
||||
if ( buffer[ count ] == '\n') {
|
||||
outbyte('\r');
|
||||
}
|
||||
outbyte( buffer[ count ] );
|
||||
}
|
||||
|
||||
rw_args->bytes_moved = maximum;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* IO Control entry point
|
||||
*/
|
||||
|
||||
rtems_device_driver console_control(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void * arg
|
||||
)
|
||||
{
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
@@ -1,189 +0,0 @@
|
||||
/* bsp.h
|
||||
*
|
||||
* This include file contains all MVME147 board IO definitions.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* MVME147 port for TNI - Telecom Bretagne
|
||||
* by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
* May 1996
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __MVME147_h
|
||||
#define __MVME147_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rtems.h>
|
||||
#include <clockdrv.h>
|
||||
#include <console.h>
|
||||
#include <iosupp.h>
|
||||
|
||||
/* Constants */
|
||||
|
||||
#define RAM_START 0x00005000
|
||||
#define RAM_END 0x00400000
|
||||
|
||||
/* MVME 147 Peripheral controller chip
|
||||
see MVME147/D1, 3.4 */
|
||||
|
||||
struct pcc_map {
|
||||
/* 32 bit registers */
|
||||
rtems_unsigned32 dma_table_address; /* 0xfffe1000 */
|
||||
rtems_unsigned32 dma_data_address; /* 0xfffe1004 */
|
||||
rtems_unsigned32 dma_bytecount; /* 0xfffe1008 */
|
||||
rtems_unsigned32 dma_data_holding; /* 0xfffe100c */
|
||||
|
||||
/* 16 bit registers */
|
||||
rtems_unsigned16 timer1_preload; /* 0xfffe1010 */
|
||||
rtems_unsigned16 timer1_count; /* 0xfffe1012 */
|
||||
rtems_unsigned16 timer2_preload; /* 0xfffe1014 */
|
||||
rtems_unsigned16 timer2_count; /* 0xfffe1016 */
|
||||
|
||||
/* 8 bit registers */
|
||||
rtems_unsigned8 timer1_int_control; /* 0xfffe1018 */
|
||||
rtems_unsigned8 timer1_control; /* 0xfffe1019 */
|
||||
rtems_unsigned8 timer2_int_control; /* 0xfffe101a */
|
||||
rtems_unsigned8 timer2_control; /* 0xfffe101b */
|
||||
|
||||
rtems_unsigned8 acfail_int_control; /* 0xfffe101c */
|
||||
rtems_unsigned8 watchdog_control; /* 0xfffe101d */
|
||||
|
||||
rtems_unsigned8 printer_int_control; /* 0xfffe101e */
|
||||
rtems_unsigned8 printer_control; /* 0xfffe102f */
|
||||
|
||||
rtems_unsigned8 dma_int_control; /* 0xfffe1020 */
|
||||
rtems_unsigned8 dma_control; /* 0xfffe1021 */
|
||||
rtems_unsigned8 bus_error_int_control; /* 0xfffe1022 */
|
||||
rtems_unsigned8 dma_status; /* 0xfffe1023 */
|
||||
rtems_unsigned8 abort_int_control; /* 0xfffe1024 */
|
||||
rtems_unsigned8 table_address_function_code; /* 0xfffe1025 */
|
||||
rtems_unsigned8 serial_port_int_control; /* 0xfffe1026 */
|
||||
rtems_unsigned8 general_purpose_control; /* 0xfffe1027 */
|
||||
rtems_unsigned8 lan_int_control; /* 0xfffe1028 */
|
||||
rtems_unsigned8 general_purpose_status; /* 0xfffe1029 */
|
||||
rtems_unsigned8 scsi_port_int_control; /* 0xfffe102a */
|
||||
rtems_unsigned8 slave_base_address; /* 0xfffe102b */
|
||||
rtems_unsigned8 software_int_1_control; /* 0xfffe102c */
|
||||
rtems_unsigned8 int_base_vector; /* 0xfffe102d */
|
||||
rtems_unsigned8 software_int_2_control; /* 0xfffe102e */
|
||||
rtems_unsigned8 revision_level; /* 0xfffe102f */
|
||||
};
|
||||
|
||||
#define pcc ((volatile struct pcc_map * const) 0xfffe1000)
|
||||
|
||||
#define z8530 0xfffe3001
|
||||
|
||||
|
||||
/* interrupt vectors - see MVME146/D1 4.14 */
|
||||
#define PCC_BASE_VECTOR 0x40 /* First user int */
|
||||
#define SCC_VECTOR PCC_BASE_VECTOR+3
|
||||
#define TIMER_1_VECTOR PCC_BASE_VECTOR+8
|
||||
#define TIMER_2_VECTOR PCC_BASE_VECTOR+9
|
||||
#define SOFT_1_VECTOR PCC_BASE_VECTOR+10
|
||||
#define SOFT_2_VECTOR PCC_BASE_VECTOR+11
|
||||
|
||||
#define USE_CHANNEL_A 1 /* 1 = use channel A for console */
|
||||
#define USE_CHANNEL_B 0 /* 1 = use channel B for console */
|
||||
|
||||
#if (USE_CHANNEL_A == 1)
|
||||
#define CONSOLE_CONTROL 0xfffe3002
|
||||
#define CONSOLE_DATA 0xfffe3003
|
||||
#elif (USE_CHANNEL_B == 1)
|
||||
#define CONSOLE_CONTROL 0xfffe3000
|
||||
#define CONSOLE_DATA 0xfffe3001
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define FOREVER 1 /* infinite loop */
|
||||
|
||||
#ifdef M147_INIT
|
||||
#undef EXTERN
|
||||
#define EXTERN
|
||||
#else
|
||||
#undef EXTERN
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Define the time limits for RTEMS Test Suite test durations.
|
||||
* Long test and short test duration limits are provided. These
|
||||
* values are in seconds and need to be converted to ticks for the
|
||||
* application.
|
||||
*
|
||||
*/
|
||||
|
||||
#define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */
|
||||
#define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */
|
||||
|
||||
/*
|
||||
* Define the interrupt mechanism for Time Test 27
|
||||
*
|
||||
* NOTE: Use the MPCSR vector for the MVME147
|
||||
*/
|
||||
|
||||
#define MUST_WAIT_FOR_INTERRUPT 0
|
||||
|
||||
#define Install_tm27_vector( handler ) set_vector( (handler), \
|
||||
SOFT_1_VECTOR, 1 )
|
||||
|
||||
#define Cause_tm27_intr() pcc->software_int_1_control = 0x0c
|
||||
/* generate level 4 sotware int. */
|
||||
|
||||
#define Clear_tm27_intr() pcc->software_int_1_control = 0x00
|
||||
|
||||
#define Lower_tm27_intr()
|
||||
|
||||
|
||||
/* miscellaneous stuff assumed to exist */
|
||||
|
||||
extern rtems_configuration_table BSP_Configuration;
|
||||
|
||||
extern m68k_isr_entry M68Kvec[]; /* vector table address */
|
||||
|
||||
/*
|
||||
* Device Driver Table Entries
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTE: Use the standard Console driver entry
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTE: Use the standard Clock driver entry
|
||||
*/
|
||||
|
||||
/*
|
||||
* How many libio files we want
|
||||
*/
|
||||
|
||||
#define BSP_LIBIO_MAX_FDS 20
|
||||
|
||||
/* functions */
|
||||
|
||||
void bsp_cleanup( void );
|
||||
|
||||
m68k_isr_entry set_vector(
|
||||
rtems_isr_entry handler,
|
||||
rtems_vector_number vector,
|
||||
int type
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
/* coverhd.h
|
||||
*
|
||||
* This include file has defines to represent the overhead associated
|
||||
* with calling a particular directive from C on this target.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __COVERHD_h
|
||||
#define __COVERHD_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define CALLING_OVERHEAD_INITIALIZE_EXECUTIVE 2
|
||||
#define CALLING_OVERHEAD_SHUTDOWN_EXECUTIVE 1
|
||||
#define CALLING_OVERHEAD_TASK_CREATE 3
|
||||
#define CALLING_OVERHEAD_TASK_IDENT 2
|
||||
#define CALLING_OVERHEAD_TASK_START 2
|
||||
#define CALLING_OVERHEAD_TASK_RESTART 2
|
||||
#define CALLING_OVERHEAD_TASK_DELETE 1
|
||||
#define CALLING_OVERHEAD_TASK_SUSPEND 1
|
||||
#define CALLING_OVERHEAD_TASK_RESUME 2
|
||||
#define CALLING_OVERHEAD_TASK_SET_PRIORITY 2
|
||||
#define CALLING_OVERHEAD_TASK_MODE 2
|
||||
#define CALLING_OVERHEAD_TASK_GET_NOTE 2
|
||||
#define CALLING_OVERHEAD_TASK_SET_NOTE 2
|
||||
#define CALLING_OVERHEAD_TASK_WAKE_WHEN 4
|
||||
#define CALLING_OVERHEAD_TASK_WAKE_AFTER 1
|
||||
#define CALLING_OVERHEAD_INTERRUPT_CATCH 2
|
||||
#define CALLING_OVERHEAD_CLOCK_GET 5
|
||||
#define CALLING_OVERHEAD_CLOCK_SET 4
|
||||
#define CALLING_OVERHEAD_CLOCK_TICK 1
|
||||
|
||||
#define CALLING_OVERHEAD_TIMER_CREATE 2
|
||||
#define CALLING_OVERHEAD_TIMER_IDENT 1
|
||||
#define CALLING_OVERHEAD_TIMER_DELETE 2
|
||||
#define CALLING_OVERHEAD_TIMER_FIRE_AFTER 2
|
||||
#define CALLING_OVERHEAD_TIMER_FIRE_WHEN 5
|
||||
#define CALLING_OVERHEAD_TIMER_RESET 1
|
||||
#define CALLING_OVERHEAD_TIMER_CANCEL 1
|
||||
#define CALLING_OVERHEAD_SEMAPHORE_CREATE 3
|
||||
#define CALLING_OVERHEAD_SEMAPHORE_DELETE 1
|
||||
#define CALLING_OVERHEAD_SEMAPHORE_IDENT 2
|
||||
#define CALLING_OVERHEAD_SEMAPHORE_OBTAIN 2
|
||||
#define CALLING_OVERHEAD_SEMAPHORE_RELEASE 1
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_CREATE 2
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_IDENT 2
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_DELETE 1
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_SEND 2
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT 2
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_BROADCAST 2
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE 3
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_FLUSH 2
|
||||
|
||||
#define CALLING_OVERHEAD_EVENT_SEND 2
|
||||
#define CALLING_OVERHEAD_EVENT_RECEIVE 2
|
||||
#define CALLING_OVERHEAD_SIGNAL_CATCH 2
|
||||
#define CALLING_OVERHEAD_SIGNAL_SEND 2
|
||||
#define CALLING_OVERHEAD_PARTITION_CREATE 3
|
||||
#define CALLING_OVERHEAD_PARTITION_IDENT 2
|
||||
#define CALLING_OVERHEAD_PARTITION_DELETE 1
|
||||
#define CALLING_OVERHEAD_PARTITION_GET_BUFFER 2
|
||||
#define CALLING_OVERHEAD_PARTITION_RETURN_BUFFER 2
|
||||
#define CALLING_OVERHEAD_REGION_CREATE 3
|
||||
#define CALLING_OVERHEAD_REGION_IDENT 2
|
||||
#define CALLING_OVERHEAD_REGION_DELETE 2
|
||||
#define CALLING_OVERHEAD_REGION_GET_SEGMENT 3
|
||||
#define CALLING_OVERHEAD_REGION_RETURN_SEGMENT 2
|
||||
#define CALLING_OVERHEAD_PORT_CREATE 3
|
||||
#define CALLING_OVERHEAD_PORT_IDENT 2
|
||||
#define CALLING_OVERHEAD_PORT_DELETE 1
|
||||
#define CALLING_OVERHEAD_PORT_EXTERNAL_TO_INTERNAL 2
|
||||
#define CALLING_OVERHEAD_PORT_INTERNAL_TO_EXTERNAL 2
|
||||
|
||||
#define CALLING_OVERHEAD_IO_INITIALIZE 2
|
||||
#define CALLING_OVERHEAD_IO_OPEN 2
|
||||
#define CALLING_OVERHEAD_IO_CLOSE 3
|
||||
#define CALLING_OVERHEAD_IO_READ 2
|
||||
#define CALLING_OVERHEAD_IO_WRITE 2
|
||||
#define CALLING_OVERHEAD_IO_CONTROL 2
|
||||
#define CALLING_OVERHEAD_FATAL_ERROR_OCCURRED 1
|
||||
#define CALLING_OVERHEAD_RATE_MONOTONIC_CREATE 2
|
||||
#define CALLING_OVERHEAD_RATE_MONOTONIC_IDENT 2
|
||||
#define CALLING_OVERHEAD_RATE_MONOTONIC_DELETE 1
|
||||
#define CALLING_OVERHEAD_RATE_MONOTONIC_CANCEL 1
|
||||
#define CALLING_OVERHEAD_RATE_MONOTONIC_PERIOD 2
|
||||
#define CALLING_OVERHEAD_MULTIPROCESSING_ANNOUNCE 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* This routine returns control to 147Bug.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* MVME147 port for TNI - Telecom Bretagne
|
||||
* by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
* May 1996
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
#include <bsp.h>
|
||||
#include <clockdrv.h>
|
||||
|
||||
void bsp_return_to_monitor_trap()
|
||||
{
|
||||
extern void start( void );
|
||||
|
||||
register volatile void *start_addr;
|
||||
|
||||
m68k_set_vbr( 0 ); /* restore 147Bug vectors */
|
||||
asm volatile( "trap #15" ); /* trap to 147Bug */
|
||||
asm volatile( ".short 0x63" ); /* return to 147Bug (.RETURN) */
|
||||
/* restart program */
|
||||
start_addr = start;
|
||||
|
||||
asm volatile ( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) );
|
||||
}
|
||||
|
||||
void bsp_cleanup( void )
|
||||
{
|
||||
pcc->timer1_int_control = 0; /* Disable Timer 1 */
|
||||
pcc->timer2_int_control = 0; /* Disable Timer 2 */
|
||||
|
||||
M68Kvec[ 45 ] = bsp_return_to_monitor_trap; /* install handler */
|
||||
asm volatile( "trap #13" ); /* insures SUPV mode */
|
||||
}
|
||||
@@ -1,245 +0,0 @@
|
||||
/* bsp_start()
|
||||
*
|
||||
* This routine starts the application. It includes application,
|
||||
* board, and monitor specific initialization and configuration.
|
||||
* The generic CPU dependent initialization has been performed
|
||||
* before this routine is invoked.
|
||||
*
|
||||
* INPUT: NONE
|
||||
*
|
||||
* OUTPUT: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* MVME147 port for TNI - Telecom Bretagne
|
||||
* by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
* May 1996
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <rtems/libio.h>
|
||||
|
||||
#include <libcsupport.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef STACK_CHECKER_ON
|
||||
#include <stackchk.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The original table from the application and our copy of it with
|
||||
* some changes.
|
||||
*/
|
||||
|
||||
extern rtems_configuration_table Configuration;
|
||||
rtems_configuration_table BSP_Configuration;
|
||||
|
||||
rtems_cpu_table Cpu_table;
|
||||
|
||||
char *rtems_progname;
|
||||
|
||||
/* Initialize whatever libc we are using
|
||||
* called from postdriver hook
|
||||
*/
|
||||
|
||||
void bsp_libc_init()
|
||||
{
|
||||
extern int end;
|
||||
rtems_unsigned32 heap_start;
|
||||
|
||||
heap_start = (rtems_unsigned32) &end;
|
||||
if (heap_start & (CPU_ALIGNMENT-1))
|
||||
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
|
||||
|
||||
RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
|
||||
|
||||
/*
|
||||
* Init the RTEMS libio facility to provide UNIX-like system
|
||||
* calls for use by newlib (ie: provide __open, __close, etc)
|
||||
* Uses malloc() to get area for the iops, so must be after malloc init
|
||||
*/
|
||||
|
||||
rtems_libio_init();
|
||||
|
||||
/*
|
||||
* Set up for the libc handling.
|
||||
*/
|
||||
|
||||
if (BSP_Configuration.ticks_per_timeslice > 0)
|
||||
libc_init(1); /* reentrant if possible */
|
||||
else
|
||||
libc_init(0); /* non-reentrant */
|
||||
}
|
||||
|
||||
/*
|
||||
* Function: bsp_pretasking_hook
|
||||
* Created: 95/03/10
|
||||
*
|
||||
* Description:
|
||||
* BSP pretasking hook. Called just before drivers are initialized.
|
||||
* Used to setup libc and install any BSP extensions.
|
||||
*
|
||||
* NOTES:
|
||||
* Must not use libc (to do io) from here, since drivers are
|
||||
* not yet initialized.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
bsp_pretasking_hook(void)
|
||||
{
|
||||
bsp_libc_init();
|
||||
|
||||
#ifdef STACK_CHECKER_ON
|
||||
/*
|
||||
* Initialize the stack bounds checker
|
||||
* We can either turn it on here or from the app.
|
||||
*/
|
||||
|
||||
Stack_check_Initialize();
|
||||
#endif
|
||||
|
||||
#ifdef RTEMS_DEBUG
|
||||
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* After drivers are setup, register some "filenames"
|
||||
* and open stdin, stdout, stderr files
|
||||
*
|
||||
* Newlib will automatically associate the files with these
|
||||
* (it hardcodes the numbers)
|
||||
*/
|
||||
|
||||
void
|
||||
bsp_postdriver_hook(void)
|
||||
{
|
||||
int stdin_fd, stdout_fd, stderr_fd;
|
||||
int error_code;
|
||||
|
||||
error_code = 'S' << 24 | 'T' << 16;
|
||||
|
||||
if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1)
|
||||
rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
|
||||
|
||||
if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1)
|
||||
rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
|
||||
|
||||
if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1)
|
||||
rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
|
||||
|
||||
if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
|
||||
rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
|
||||
}
|
||||
|
||||
|
||||
int main(
|
||||
int argc,
|
||||
char **argv,
|
||||
char **environp
|
||||
)
|
||||
{
|
||||
m68k_isr_entry *monitors_vector_table;
|
||||
int index;
|
||||
|
||||
if ((argc > 0) && argv && argv[0])
|
||||
rtems_progname = argv[0];
|
||||
else
|
||||
rtems_progname = "RTEMS";
|
||||
|
||||
monitors_vector_table = (m68k_isr_entry *)0; /* 135Bug Vectors are at 0 */
|
||||
m68k_set_vbr( monitors_vector_table );
|
||||
|
||||
for ( index=2 ; index<=255 ; index++ )
|
||||
M68Kvec[ index ] = monitors_vector_table[ 32 ];
|
||||
|
||||
M68Kvec[ 2 ] = monitors_vector_table[ 2 ]; /* bus error vector */
|
||||
M68Kvec[ 4 ] = monitors_vector_table[ 4 ]; /* breakpoints vector */
|
||||
M68Kvec[ 9 ] = monitors_vector_table[ 9 ]; /* trace vector */
|
||||
M68Kvec[ 47 ] = monitors_vector_table[ 47 ]; /* system call vector */
|
||||
|
||||
m68k_set_vbr( &M68Kvec );
|
||||
|
||||
pcc->int_base_vector = PCC_BASE_VECTOR; /* Set the PCC int vectors base */
|
||||
|
||||
(*(rtems_unsigned8 *)0xfffe2001) = 0x08;
|
||||
/* make VME access round-robin */
|
||||
|
||||
m68k_enable_caching();
|
||||
|
||||
/*
|
||||
* we only use a hook to get the C library initialized.
|
||||
*/
|
||||
|
||||
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
|
||||
|
||||
Cpu_table.predriver_hook = NULL;
|
||||
|
||||
Cpu_table.postdriver_hook = bsp_postdriver_hook;
|
||||
|
||||
Cpu_table.idle_task = NULL; /* do not override system IDLE task */
|
||||
|
||||
Cpu_table.do_zero_of_workspace = TRUE;
|
||||
|
||||
Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
|
||||
|
||||
Cpu_table.interrupt_stack_size = 4096;
|
||||
|
||||
Cpu_table.extra_mpci_receive_server_stack = 0;
|
||||
|
||||
/*
|
||||
* Copy the table
|
||||
*/
|
||||
|
||||
BSP_Configuration = Configuration;
|
||||
|
||||
BSP_Configuration.work_space_start = (void *)
|
||||
(RAM_END - BSP_Configuration.work_space_size);
|
||||
|
||||
/*
|
||||
* Add 1 region for the RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
*/
|
||||
|
||||
#ifdef RTEMS_NEWLIB
|
||||
BSP_Configuration.maximum_extensions++;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Add another extension if using the stack checker
|
||||
*/
|
||||
|
||||
#ifdef STACK_CHECKER_ON
|
||||
BSP_Configuration.maximum_extensions++;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Tell libio how many fd's we want and allow it to tweak config
|
||||
*/
|
||||
|
||||
rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
|
||||
|
||||
rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
|
||||
/* does not return */
|
||||
|
||||
bsp_cleanup();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* This file contains directives for the GNU linker which are specific
|
||||
* to the Motorola MVME147 boards.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* MVME147 port for TNI - Telecom Bretagne
|
||||
* by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
* May 1996
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
ram : org = 0x5000, l = 0x3fafff
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text 0x5000 :
|
||||
{
|
||||
text_start = . ;
|
||||
_text_start = . ;
|
||||
*(.text)
|
||||
etext = ALIGN( 0x10 ) ;
|
||||
_etext = .;
|
||||
}
|
||||
.data ADDR( .text ) + SIZEOF( .text ):
|
||||
{
|
||||
data_start = . ;
|
||||
_data_start = .;
|
||||
*(.data)
|
||||
edata = ALIGN( 0x10 ) ;
|
||||
_edata = .;
|
||||
}
|
||||
.bss ADDR( .data ) + SIZEOF( .data ):
|
||||
{
|
||||
bss_start = . ;
|
||||
_bss_start = . ;
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
end = . ;
|
||||
_end = . ;
|
||||
}
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
/* Timer_init()
|
||||
*
|
||||
* This routine initializes the PCC timer on the MVME147 board.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* NOTE: It is important that the timer start/stop overhead be
|
||||
* determined when porting or modifying this code.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* MVME147 port for TNI - Telecom Bretagne
|
||||
* by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
* May 1996
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
|
||||
#define TIMER_INT_LEVEL 6
|
||||
|
||||
#define COUNTDOWN_VALUE 0
|
||||
/* Allows 0.4096 second delay betwin ints */
|
||||
/* Each tick is 6.25 us */
|
||||
|
||||
int Ttimer_val;
|
||||
rtems_boolean Timer_driver_Find_average_overhead;
|
||||
|
||||
rtems_isr timerisr();
|
||||
|
||||
void Timer_initialize()
|
||||
{
|
||||
(void) set_vector(timerisr, TIMER_1_VECTOR, 0); /* install ISR */
|
||||
|
||||
Ttimer_val = 0; /* clear timer ISR count */
|
||||
pcc->timer1_int_control = 0x00; /* Disable T1 Interr. */
|
||||
pcc->timer1_preload = COUNTDOWN_VALUE;
|
||||
/* write countdown preload value */
|
||||
pcc->timer1_control = 0x00; /* load preload value */
|
||||
pcc->timer1_control = 0x07; /* clear T1 overflow counter, enable counter */
|
||||
pcc->timer1_int_control = TIMER_INT_LEVEL|0x08;
|
||||
/* Enable Timer 1 and set its int. level */
|
||||
|
||||
}
|
||||
|
||||
#define AVG_OVERHEAD 0 /* No need to start/stop the timer to read
|
||||
its value on the MVME147 PCC: reads are not
|
||||
synchronized whith the counter updates*/
|
||||
#define LEAST_VALID 10 /* Don't trust a value lower than this */
|
||||
|
||||
int Read_timer()
|
||||
{
|
||||
rtems_unsigned32 total;
|
||||
rtems_unsigned16 counter_value;
|
||||
|
||||
counter_value = pcc->timer1_count; /* read the counter value */
|
||||
|
||||
total = ((Ttimer_val * 0x10000) + counter_value); /* in 6.25 us units */
|
||||
/* DC note : just look at the assembly generated
|
||||
to see gcc's impressive optimization ! */
|
||||
return total;
|
||||
|
||||
}
|
||||
|
||||
rtems_status_code Empty_function( void )
|
||||
{
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
void Set_find_average_overhead(
|
||||
rtems_boolean find_flag
|
||||
)
|
||||
{
|
||||
Timer_driver_Find_average_overhead = find_flag;
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
# timer_isr()
|
||||
#
|
||||
# This routine provides the ISR for the PCC timer on the MVME147
|
||||
# board. The timer is set up to generate an interrupt at maximum
|
||||
# intervals.
|
||||
#
|
||||
# MVME147 port for TNI - Telecom Bretagne
|
||||
# by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
# May 1996
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#include "asm.h"
|
||||
|
||||
BEGIN_CODE
|
||||
|
||||
.set T1_CONTROL_REGISTER, 0xfffe1018 | timer 1 control register
|
||||
|
||||
PUBLIC (timerisr)
|
||||
SYM (timerisr):
|
||||
orb #0x80, T1_CONTROL_REGISTER | clear T1 int status bit
|
||||
addql #1, SYM (Ttimer_val) | increment timer value
|
||||
end_timerisr:
|
||||
rte
|
||||
|
||||
END_CODE
|
||||
END
|
||||
@@ -1,194 +0,0 @@
|
||||
#
|
||||
# Timing Test Suite Results for the Motorola MVME147 BSP
|
||||
#
|
||||
# MVME147 port for TNI - Telecom Bretagne
|
||||
# by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
# May 1996
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
Board: Motorola MVME147S
|
||||
CPU: Motorola MC68030 + MC68882 FPU
|
||||
Clock Speed: 20 Mhz
|
||||
Memory Configuration: DRAM w/no cache
|
||||
Wait States: ? wait state
|
||||
|
||||
Times Reported in: microseconds (6.25 us grain)
|
||||
Timer Source: MVME147 Peripheral Channel Controller tick timer
|
||||
|
||||
Column A: 3.5.1 pre-release
|
||||
|
||||
# DESCRIPTION A
|
||||
== ================================================================= ====
|
||||
1 rtems_semaphore_create 69
|
||||
rtems_semaphore_delete 69
|
||||
rtems_semaphore_obtain: available 44
|
||||
rtems_semaphore_obtain: not available -- NO_WAIT 44
|
||||
rtems_semaphore_release: no waiting tasks 56
|
||||
|
||||
2 rtems_semaphore_obtain: not available -- caller blocks 125
|
||||
|
||||
3 rtems_semaphore_release: task readied -- preempts caller 106
|
||||
|
||||
4 rtems_task_restart: blocked task -- preempts caller 181
|
||||
rtems_task_restart: ready task -- preempts caller 169
|
||||
rtems_semaphore_release: task readied -- returns to caller 81
|
||||
rtems_task_create 169
|
||||
rtems_task_start 87
|
||||
rtems_task_restart: suspended task -- returns to caller 106
|
||||
rtems_task_delete: suspended task 169
|
||||
rtems_task_restart: ready task -- returns to caller 112
|
||||
rtems_task_restart: blocked task -- returns to caller 150
|
||||
rtems_task_delete: blocked task 175
|
||||
|
||||
5 rtems_task_suspend: calling task 87
|
||||
rtems_task_resume: task readied -- preempts caller 75
|
||||
|
||||
6 rtems_task_restart: calling task 112
|
||||
rtems_task_suspend: returns to caller 56
|
||||
rtems_task_resume: task readied -- returns to caller 50
|
||||
rtems_task_delete: ready task 169
|
||||
|
||||
7 rtems_task_restart: suspended task -- preempts caller 143
|
||||
|
||||
8 rtems_task_set_priority: obtain current priority 37
|
||||
rtems_task_set_priority: returns to caller 75
|
||||
rtems_task_mode: obtain current mode 6
|
||||
rtems_task_mode: no reschedule 6
|
||||
rtems_task_mode: reschedule -- returns to caller 19
|
||||
rtems_task_mode: reschedule -- preempts caller 75
|
||||
rtems_task_set_note 37
|
||||
rtems_task_get_note 37
|
||||
rtems_clock_set 87
|
||||
rtems_clock_get 0
|
||||
|
||||
9 rtems_message_queue_create 225
|
||||
rtems_message_queue_send: no waiting tasks 112
|
||||
rtems_message_queue_urgent: no waiting tasks 112
|
||||
rtems_message_queue_receive: available 87
|
||||
rtems_message_queue_flush: no messages flushed 37
|
||||
rtems_message_queue_flush: messages flushed 50
|
||||
rtems_message_queue_delete 106
|
||||
|
||||
10 rtems_message_queue_receive: not available -- NO_WAIT 44
|
||||
rtems_message_queue_receive: not available -- caller blocks 125
|
||||
|
||||
11 rtems_message_queue_send: task readied -- preempts caller 144
|
||||
|
||||
12 rtems_message_queue_send: task readied -- returns to caller 119
|
||||
|
||||
13 rtems_message_queue_urgent: task readied -- preempts caller 144
|
||||
|
||||
14 rtems_message_queue_urgent: task readied -- returns to caller 119
|
||||
|
||||
15 rtems_event_receive: obtain current events 0
|
||||
rtems_event_receive: not available -- NO_WAIT 25
|
||||
rtems_event_receive: not available -- caller blocks 100
|
||||
rtems_event_send: no task readied 31
|
||||
rtems_event_receive: available 37
|
||||
rtems_event_send: task readied -- returns to caller 69
|
||||
|
||||
16 rtems_event_send: task readied -- preempts caller 100
|
||||
|
||||
17 rtems_task_set_priority: preempts caller 125
|
||||
|
||||
18 rtems_task_delete: calling task 200
|
||||
|
||||
19 rtems_signal_catch 19
|
||||
rtems_signal_send: returns to caller 50
|
||||
rtems_signal_send: signal to self 56
|
||||
exit ASR overhead: returns to calling task 44
|
||||
exit ASR overhead: returns to preempting task 75
|
||||
|
||||
20 rtems_partition_create 81
|
||||
rtems_region_create 75
|
||||
rtems_partition_get_buffer: available 44
|
||||
rtems_partition_get_buffer: not available 44
|
||||
rtems_partition_return_buffer 56
|
||||
rtems_partition_delete 62
|
||||
rtems_region_get_segment: available 56
|
||||
rtems_region_get_segment: not available -- NO_WAIT 56
|
||||
rtems_region_return_segment: no waiting tasks 69
|
||||
rtems_region_get_segment: not available -- caller blocks 144
|
||||
rtems_region_return_segment: task readied -- preempts caller 169
|
||||
rtems_region_return_segment: task readied -- returns to caller 137
|
||||
rtems_region_delete 56
|
||||
rtems_io_initialize 0
|
||||
rtems_io_open 0
|
||||
rtems_io_close 0
|
||||
rtems_io_read 0
|
||||
rtems_io_write 0
|
||||
rtems_io_control 0
|
||||
|
||||
21 rtems_task_ident 375
|
||||
rtems_message_queue_ident 362
|
||||
rtems_semaphore_ident 394
|
||||
rtems_partition_ident 362
|
||||
rtems_region_ident 369
|
||||
rtems_port_ident 362
|
||||
rtems_timer_ident 369
|
||||
rtems_rate_monotonic_ident 362
|
||||
|
||||
22 rtems_message_queue_broadcast: task readied -- returns to caller 131
|
||||
rtems_message_queue_broadcast: no waiting tasks 62
|
||||
rtems_message_queue_broadcast: task readied -- preempts caller 156
|
||||
|
||||
23 rtems_timer_create 31
|
||||
rtems_timer_fire_after: inactive 69
|
||||
rtems_timer_fire_after: active 69
|
||||
rtems_timer_cancel: active 44
|
||||
rtems_timer_cancel: inactive 37
|
||||
rtems_timer_reset: inactive 69
|
||||
rtems_timer_reset: active 69
|
||||
rtems_timer_fire_when: inactive 87
|
||||
rtems_timer_fire_when: active 87
|
||||
rtems_timer_delete: active 56
|
||||
rtems_timer_delete: inactive 50
|
||||
rtems_task_wake_when 125
|
||||
|
||||
24 rtems_task_wake_after: yield -- returns to caller 19
|
||||
rtems_task_wake_after: yields -- preempts caller 69
|
||||
|
||||
25 rtems_clock_tick 19
|
||||
|
||||
26 _ISR_Disable 6
|
||||
_ISR_Flash 6
|
||||
_ISR_Enable 6
|
||||
_Thread_Disable_dispatch 6
|
||||
_Thread_Enable_dispatch 25
|
||||
_Thread_Set_state 31
|
||||
_Thread_Disptach (NO FP) 62
|
||||
context switch: no floating point contexts 50
|
||||
context switch: self 12
|
||||
context switch: to another task 12
|
||||
context switch: restore 1st FP task 56
|
||||
fp context switch: save idle, restore idle 87
|
||||
fp context switch: save idle, restore initialized 75
|
||||
fp context switch: save initialized, restore initialized 75
|
||||
_Thread_Resume 25
|
||||
_Thread_Unblock 25
|
||||
_Thread_Ready 31
|
||||
_Thread_Get 12
|
||||
_Semaphore_Get 6
|
||||
_Thread_Get: invalid id 0
|
||||
|
||||
27 interrupt entry overhead: returns to interrupted task 12
|
||||
interrupt exit overhead: returns to interrupted task 12
|
||||
interrupt entry overhead: returns to nested interrupt 19
|
||||
interrupt exit overhead: returns to nested interrupt 6
|
||||
interrupt entry overhead: returns to preempting task 12
|
||||
interrupt exit overhead: returns to preempting task 81
|
||||
|
||||
28 rtems_port_create 37
|
||||
rtems_port_external_to_internal 31
|
||||
rtems_port_internal_to_external 31
|
||||
rtems_port_delete 56
|
||||
|
||||
29 rtems_rate_monotonic_create 44
|
||||
rtems_rate_monotonic_period: initiate period -- returns to caller 62
|
||||
rtems_rate_monotonic_period: obtain status 37
|
||||
rtems_rate_monotonic_cancel 56
|
||||
rtems_rate_monotonic_delete: inactive 62
|
||||
rtems_rate_monotonic_delete: active 69
|
||||
rtems_rate_monotonic_period: conclude periods -- caller blocks 87
|
||||
@@ -220,7 +220,7 @@ int main(
|
||||
* Add 1 region for the RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
BSP_Configuration.maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -177,7 +177,7 @@ int bsp_start(
|
||||
* Add 1 region for the RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
BSP_Configuration.maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
|
||||
@@ -34,8 +34,6 @@ Shm_Print_statistics(void)
|
||||
(void) rtems_clock_get( RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second );
|
||||
|
||||
seconds = ticks / ticks_per_second;
|
||||
if ( seconds == 0 )
|
||||
seconds = 1;
|
||||
|
||||
packets_per_second = Shm_Receive_message_count / seconds;
|
||||
if ( (Shm_Receive_message_count % seconds) >= (seconds / 2) )
|
||||
|
||||
@@ -323,7 +323,7 @@ bsp_start(void)
|
||||
* Add 1 region for RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
|
||||
BSP_Configuration.maximum_regions++;
|
||||
|
||||
#ifdef RTEMS_NEWLIB
|
||||
/*
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
/*
|
||||
* Provide UNIX/POSIX-like io system calls for RTEMS using the
|
||||
* Provide UNIX/POSIX-like io system calls for RTEMS using the
|
||||
* RTEMS IO manager
|
||||
*
|
||||
* TODO
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
@@ -11,15 +13,12 @@
|
||||
#include <stdio.h> /* O_RDONLY, et.al. */
|
||||
#include <fcntl.h> /* O_RDONLY, et.al. */
|
||||
|
||||
#if ! defined(O_NDELAY)
|
||||
# if defined(solaris2)
|
||||
# define O_NDELAY O_NONBLOCK
|
||||
# elif defined(RTEMS_NEWLIB)
|
||||
# define O_NDELAY _FNBIO
|
||||
# endif
|
||||
#if defined(solaris2)
|
||||
#define O_NDELAY O_NONBLOCK
|
||||
#elif defined(RTEMS_NEWLIB)
|
||||
#define O_NDELAY _FNBIO
|
||||
#endif
|
||||
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h> /* strcmp */
|
||||
#include <unistd.h>
|
||||
@@ -91,9 +90,8 @@ rtems_libio_config(
|
||||
* tweak config to reflect # of semaphores we will need
|
||||
*/
|
||||
|
||||
/* one for iop table */
|
||||
config->RTEMS_api_configuration->maximum_semaphores += 1;
|
||||
config->RTEMS_api_configuration->maximum_semaphores += max_fds;
|
||||
config->maximum_semaphores += 1; /* one for iop table */
|
||||
config->maximum_semaphores += max_fds;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -252,9 +252,6 @@ void *realloc(
|
||||
}
|
||||
|
||||
new_area = malloc( size );
|
||||
|
||||
MSBUMP(malloc_calls, -1); /* subtract off the malloc */
|
||||
|
||||
if ( !new_area ) {
|
||||
free( ptr );
|
||||
return (void *) 0;
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include <string.h> /* for memset() */
|
||||
|
||||
#include <sys/reent.h> /* for extern of _REENT (aka _impure_ptr) */
|
||||
#include <errno.h>
|
||||
|
||||
/*
|
||||
* NOTE: When using RTEMS fake stat, fstat, and isatty, all output
|
||||
@@ -132,7 +131,7 @@ libc_start_hook(rtems_tcb *current_task,
|
||||
* real target.
|
||||
*/
|
||||
|
||||
#ifdef NEED_SETVBUF
|
||||
#ifdef RTEMS_UNIX
|
||||
rtems_extension
|
||||
libc_begin_hook(rtems_tcb *current_task)
|
||||
{
|
||||
@@ -275,7 +274,7 @@ libc_init(int reentrant)
|
||||
|
||||
libc_extension.thread_create = libc_create_hook;
|
||||
libc_extension.thread_start = libc_start_hook;
|
||||
#ifdef NEED_SETVBUF
|
||||
#ifdef RTEMS_UNIX
|
||||
libc_extension.thread_begin = libc_begin_hook;
|
||||
#endif
|
||||
libc_extension.thread_switch = libc_switch_hook;
|
||||
@@ -290,15 +289,15 @@ libc_init(int reentrant)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Routines required by the gnat runtime.
|
||||
*/
|
||||
|
||||
int get_errno()
|
||||
void
|
||||
exit(int status)
|
||||
{
|
||||
return errno;
|
||||
libc_wrapup();
|
||||
rtems_shutdown_executive(status);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Function: _exit
|
||||
* Created: 94/12/10
|
||||
@@ -332,72 +331,6 @@ void _exit(int status)
|
||||
{
|
||||
rtems_shutdown_executive(status);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void exit(int status)
|
||||
{
|
||||
libc_wrapup();
|
||||
rtems_shutdown_executive(status);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* These are directly supported (and completely correct) in the posix api.
|
||||
*/
|
||||
|
||||
#if !defined(__RTEMS_POSIX_API__)
|
||||
|
||||
pid_t __getpid(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(__RTEMS_POSIX_API__) && !defined(__GO32__)
|
||||
pid_t getpid(void)
|
||||
{
|
||||
return __getpid();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(__RTEMS_POSIX_API__) && !defined(__GO32__)
|
||||
int kill( pid_t pid, int sig )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int __kill( pid_t pid, int sig )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned int sleep(
|
||||
unsigned int seconds
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
rtems_interval ticks_per_second;
|
||||
rtems_interval ticks;
|
||||
|
||||
status = rtems_clock_get(
|
||||
RTEMS_CLOCK_GET_TICKS_PER_SECOND,
|
||||
&ticks_per_second
|
||||
);
|
||||
|
||||
ticks = seconds * ticks_per_second;
|
||||
|
||||
status = rtems_task_wake_after( ticks );
|
||||
|
||||
/*
|
||||
* Returns the "unslept" amount of time. In RTEMS signals are not
|
||||
* interruptable, so tasks really sleep all of the requested time.
|
||||
*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user