diff options
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/libcsupport/src/malloc.c | 3 | ||||
-rw-r--r-- | cpukit/libmisc/cpuuse/cpuuse.c | 2 | ||||
-rw-r--r-- | cpukit/libmisc/monitor/mon-command.c | 3 | ||||
-rw-r--r-- | cpukit/libmisc/stackchk/check.c | 7 | ||||
-rw-r--r-- | cpukit/sapi/include/confdefs.h | 2 | ||||
-rw-r--r-- | cpukit/sapi/include/rtems/config.h | 3 | ||||
-rw-r--r-- | cpukit/score/cpu/a29k/rtems/score/cpu.h | 12 | ||||
-rw-r--r-- | cpukit/score/cpu/hppa1.1/rtems/score/cpu.h | 15 | ||||
-rw-r--r-- | cpukit/score/cpu/i386/rtems/score/cpu.h | 15 | ||||
-rw-r--r-- | cpukit/score/cpu/i960/rtems/score/cpu.h | 12 | ||||
-rw-r--r-- | cpukit/score/cpu/m68k/rtems/score/cpu.h | 12 | ||||
-rw-r--r-- | cpukit/score/cpu/mips/rtems/score/cpu.h | 9 | ||||
-rw-r--r-- | cpukit/score/cpu/mips64orion/rtems/score/cpu.h | 9 | ||||
-rw-r--r-- | cpukit/score/cpu/no_cpu/rtems/score/cpu.h | 12 | ||||
-rw-r--r-- | cpukit/score/cpu/sh/rtems/score/cpu.h | 11 | ||||
-rw-r--r-- | cpukit/score/cpu/sparc/rtems/score/cpu.h | 11 | ||||
-rw-r--r-- | cpukit/score/cpu/unix/rtems/score/cpu.h | 11 | ||||
-rw-r--r-- | cpukit/score/include/rtems/system.h | 40 |
18 files changed, 176 insertions, 13 deletions
diff --git a/cpukit/libcsupport/src/malloc.c b/cpukit/libcsupport/src/malloc.c index 30f74c89bb..80708f57c2 100644 --- a/cpukit/libcsupport/src/malloc.c +++ b/cpukit/libcsupport/src/malloc.c @@ -32,7 +32,6 @@ rtems_id RTEMS_Malloc_Heap; size_t RTEMS_Malloc_Sbrk_amount; -extern rtems_cpu_table Cpu_table; #ifdef RTEMS_DEBUG #define MALLOC_STATS #define MALLOC_DIRTY @@ -109,7 +108,7 @@ void RTEMS_Malloc_Initialize( * left over from another process. This would be a security violation. */ - if ( Cpu_table.do_zero_of_workspace ) + if ( rtems_cpu_configuration_get_do_zero_of_workspace() ) memset( starting_address, 0, length ); /* diff --git a/cpukit/libmisc/cpuuse/cpuuse.c b/cpukit/libmisc/cpuuse/cpuuse.c index be2bc1be87..e451318575 100644 --- a/cpukit/libmisc/cpuuse/cpuuse.c +++ b/cpukit/libmisc/cpuuse/cpuuse.c @@ -15,8 +15,6 @@ #include <rtems.h> -extern rtems_configuration_table BSP_Configuration; - #include <assert.h> #include <stdio.h> #include <string.h> diff --git a/cpukit/libmisc/monitor/mon-command.c b/cpukit/libmisc/monitor/mon-command.c index 1fe495e0ae..5c733b60d9 100644 --- a/cpukit/libmisc/monitor/mon-command.c +++ b/cpukit/libmisc/monitor/mon-command.c @@ -50,14 +50,13 @@ rtems_monitor_command_read(char *command, int *argc, char **argv) { - extern rtems_configuration_table BSP_Configuration; static char monitor_prompt[32]; /* * put node number in the prompt if we are multiprocessing */ - if (BSP_Configuration.User_multiprocessing_table == 0) + if (!rtems_configuration_get_user_multiprocessing_table()) sprintf(monitor_prompt, "%s", MONITOR_PROMPT); else if (rtems_monitor_default_node != rtems_monitor_node) sprintf(monitor_prompt, "%d-%s-%d", rtems_monitor_node, MONITOR_PROMPT, rtems_monitor_default_node); diff --git a/cpukit/libmisc/stackchk/check.c b/cpukit/libmisc/stackchk/check.c index ac688c2a2e..b8688d3579 100644 --- a/cpukit/libmisc/stackchk/check.c +++ b/cpukit/libmisc/stackchk/check.c @@ -32,9 +32,6 @@ */ #define DONT_USE_FATAL_EXTENSION - -extern rtems_configuration_table BSP_Configuration; - #include <assert.h> #include <stdio.h> #include <string.h> @@ -318,11 +315,11 @@ void Stack_check_report_blown_task(void) ); fflush(stderr); - if (BSP_Configuration.User_multiprocessing_table) + if (rtems_configuration_get_user_multiprocessing_table()) fprintf( stderr, "; node=%d\n", - BSP_Configuration.User_multiprocessing_table->node + rtems_configuration_get_user_multiprocessing_table()->node ); else fprintf(stderr, "\n"); diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h index b841d568de..e2a0c84d3d 100644 --- a/cpukit/sapi/include/confdefs.h +++ b/cpukit/sapi/include/confdefs.h @@ -80,6 +80,8 @@ int rtems_filesystem_mount_table_size = 1; /* * Stack Checker Requirements + * + * NOTE: This does not automatically enable reporting at program exit. */ #ifdef STACK_CHECKER_ON diff --git a/cpukit/sapi/include/rtems/config.h b/cpukit/sapi/include/rtems/config.h index 8a2def6082..7dbc997ff9 100644 --- a/cpukit/sapi/include/rtems/config.h +++ b/cpukit/sapi/include/rtems/config.h @@ -121,6 +121,9 @@ SAPI_EXTERN rtems_multiprocessing_table *_Configuration_MP_table; * or the exact format of the configuration table. */ +#define rtems_configuration_get_table() \ + (&_Configuration_Table) + #define rtems_configuration_get_work_space_start() \ (_Configuration_Table->work_space_start) diff --git a/cpukit/score/cpu/a29k/rtems/score/cpu.h b/cpukit/score/cpu/a29k/rtems/score/cpu.h index 9cf2fa6f2f..1235e991c8 100644 --- a/cpukit/score/cpu/a29k/rtems/score/cpu.h +++ b/cpukit/score/cpu/a29k/rtems/score/cpu.h @@ -459,10 +459,20 @@ typedef struct { unsigned32 idle_task_stack_size; unsigned32 interrupt_stack_size; unsigned32 extra_system_initialization_stack; - unsigned32 some_other_cpu_dependent_info; } rtems_cpu_table; /* + * Macros to access required entires in the CPU Table are in + * the file rtems/system.h. + */ + +/* + * Macros to access AMD A29K specific additions to the CPU Table + */ + +/* There are no CPU specific additions to the CPU Table for this port. */ + +/* * This variable is optional. It is used on CPUs on which it is difficult * to generate an "uninitialized" FP context. It is filled in by * _CPU_Initialize and copied into the task's FP context area during diff --git a/cpukit/score/cpu/hppa1.1/rtems/score/cpu.h b/cpukit/score/cpu/hppa1.1/rtems/score/cpu.h index 7e810bac52..e5db793923 100644 --- a/cpukit/score/cpu/hppa1.1/rtems/score/cpu.h +++ b/cpukit/score/cpu/hppa1.1/rtems/score/cpu.h @@ -238,6 +238,21 @@ typedef struct { unsigned32 itimer_clicks_per_microsecond; /* for use by Clock driver */ } rtems_cpu_table; +/* + * Macros to access required entires in the CPU Table are in + * the file rtems/system.h. + */ + +/* + * Macros to access HPPA specific additions to the CPU Table + */ + +#define rtems_cpu_configuration_get_spurious_handler() \ + (_CPU_Table.spurious_handler) + +#define rtems_cpu_configuration_get_itimer_clicks_per_microsecond() \ + (_CPU_Table.itimer_clicks_per_microsecond) + /* variables */ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; diff --git a/cpukit/score/cpu/i386/rtems/score/cpu.h b/cpukit/score/cpu/i386/rtems/score/cpu.h index 045df2ae72..68fdea703d 100644 --- a/cpukit/score/cpu/i386/rtems/score/cpu.h +++ b/cpukit/score/cpu/i386/rtems/score/cpu.h @@ -198,6 +198,21 @@ typedef struct { } rtems_cpu_table; /* + * Macros to access required entires in the CPU Table are in + * the file rtems/system.h. + */ + +/* + * Macros to access i386 specific additions to the CPU Table + */ + +#define rtems_cpu_configuration_get_interrupt_table_segment() \ + (_CPU_Table.interrupt_table_segment) + +#define rtems_cpu_configuration_get_interrupt_table_offset() \ + (_CPU_Table.interrupt_table_offset) + +/* * context size area for floating point * * NOTE: This is out of place on the i386 to avoid a forward reference. diff --git a/cpukit/score/cpu/i960/rtems/score/cpu.h b/cpukit/score/cpu/i960/rtems/score/cpu.h index 14083d9860..45a7fb85d6 100644 --- a/cpukit/score/cpu/i960/rtems/score/cpu.h +++ b/cpukit/score/cpu/i960/rtems/score/cpu.h @@ -172,6 +172,18 @@ typedef struct { i960_PRCB *Prcb; } rtems_cpu_table; +/* + * Macros to access required entires in the CPU Table are in + * the file rtems/system.h. + */ + +/* + * Macros to access i960 specific additions to the CPU Table + */ + +#define rtems_cpu_configuration_get_prcb() \ + (_CPU_Table.Prcb) + /* variables */ SCORE_EXTERN void *_CPU_Interrupt_stack_low; diff --git a/cpukit/score/cpu/m68k/rtems/score/cpu.h b/cpukit/score/cpu/m68k/rtems/score/cpu.h index cc51428243..248492ba97 100644 --- a/cpukit/score/cpu/m68k/rtems/score/cpu.h +++ b/cpukit/score/cpu/m68k/rtems/score/cpu.h @@ -195,6 +195,18 @@ typedef struct { m68k_isr *interrupt_vector_table; } rtems_cpu_table; +/* + * Macros to access required entires in the CPU Table are in + * the file rtems/system.h. + */ + +/* + * Macros to access M68K specific additions to the CPU Table + */ + +#define rtems_cpu_configuration_get_interrupt_vector_table() \ + (_CPU_Table.interrupt_vector_table) + /* variables */ SCORE_EXTERN void *_CPU_Interrupt_stack_low; diff --git a/cpukit/score/cpu/mips/rtems/score/cpu.h b/cpukit/score/cpu/mips/rtems/score/cpu.h index 0722a81ca6..69478af9ee 100644 --- a/cpukit/score/cpu/mips/rtems/score/cpu.h +++ b/cpukit/score/cpu/mips/rtems/score/cpu.h @@ -438,6 +438,15 @@ typedef struct { unsigned32 clicks_per_microsecond; } rtems_cpu_table; +/* + * Macros to access required entires in the CPU Table are in + * the file rtems/system.h. + */ + +/* + * Macros to access MIPS64ORION specific additions to the CPU Table + */ + #define rtems_cpu_configuration_get_clicks_per_microsecond() \ (_CPU_Table.clicks_per_microsecond) diff --git a/cpukit/score/cpu/mips64orion/rtems/score/cpu.h b/cpukit/score/cpu/mips64orion/rtems/score/cpu.h index 0722a81ca6..69478af9ee 100644 --- a/cpukit/score/cpu/mips64orion/rtems/score/cpu.h +++ b/cpukit/score/cpu/mips64orion/rtems/score/cpu.h @@ -438,6 +438,15 @@ typedef struct { unsigned32 clicks_per_microsecond; } rtems_cpu_table; +/* + * Macros to access required entires in the CPU Table are in + * the file rtems/system.h. + */ + +/* + * Macros to access MIPS64ORION specific additions to the CPU Table + */ + #define rtems_cpu_configuration_get_clicks_per_microsecond() \ (_CPU_Table.clicks_per_microsecond) diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h index ea18fe2cf3..9bd8c2b045 100644 --- a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h +++ b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h @@ -360,10 +360,20 @@ typedef struct { void (*stack_free_hook)( void* ); /* end of fields required on all CPUs */ - unsigned32 some_other_cpu_dependent_info; } rtems_cpu_table; /* + * Macros to access required entires in the CPU Table are in + * the file rtems/system.h. + */ + +/* + * Macros to access NO_CPU specific additions to the CPU Table + */ + +/* There are no CPU specific additions to the CPU Table for this port. */ + +/* * This variable is optional. It is used on CPUs on which it is difficult * to generate an "uninitialized" FP context. It is filled in by * _CPU_Initialize and copied into the task's FP context area during diff --git a/cpukit/score/cpu/sh/rtems/score/cpu.h b/cpukit/score/cpu/sh/rtems/score/cpu.h index 935cbd4e48..8a18848f09 100644 --- a/cpukit/score/cpu/sh/rtems/score/cpu.h +++ b/cpukit/score/cpu/sh/rtems/score/cpu.h @@ -380,6 +380,17 @@ typedef struct { } rtems_cpu_table; /* + * Macros to access required entires in the CPU Table are in + * the file rtems/system.h. + */ + +/* + * Macros to access SH specific additions to the CPU Table + */ + +/* There are no CPU specific additions to the CPU Table for this port. */ + +/* * This variable is optional. It is used on CPUs on which it is difficult * to generate an "uninitialized" FP context. It is filled in by * _CPU_Initialize and copied into the task's FP context area during diff --git a/cpukit/score/cpu/sparc/rtems/score/cpu.h b/cpukit/score/cpu/sparc/rtems/score/cpu.h index 5e34126b2f..3442adc67d 100644 --- a/cpukit/score/cpu/sparc/rtems/score/cpu.h +++ b/cpukit/score/cpu/sparc/rtems/score/cpu.h @@ -527,6 +527,17 @@ typedef struct { } rtems_cpu_table; /* + * Macros to access required entires in the CPU Table are in + * the file rtems/system.h. + */ + +/* + * Macros to access SPARC specific additions to the CPU Table + */ + +/* There are no CPU specific additions to the CPU Table for this port. */ + +/* * This variable is contains the initialize context for the FP unit. * It is filled in by _CPU_Initialize and copied into the task's FP * context area during _CPU_Context_Initialize. diff --git a/cpukit/score/cpu/unix/rtems/score/cpu.h b/cpukit/score/cpu/unix/rtems/score/cpu.h index 466a5dc5c7..96c7522b53 100644 --- a/cpukit/score/cpu/unix/rtems/score/cpu.h +++ b/cpukit/score/cpu/unix/rtems/score/cpu.h @@ -513,6 +513,17 @@ typedef struct { } rtems_cpu_table; /* + * Macros to access required entires in the CPU Table are in + * the file rtems/system.h. + */ + +/* + * Macros to access UNIX specific additions to the CPU Table + */ + +/* There are no CPU specific additions to the CPU Table for this port. */ + +/* * This variable is optional. It is used on CPUs on which it is difficult * to generate an "uninitialized" FP context. It is filled in by * _CPU_Initialize and copied into the task's FP context area during diff --git a/cpukit/score/include/rtems/system.h b/cpukit/score/include/rtems/system.h index 5e1cc80ed5..4d7f550141 100644 --- a/cpukit/score/include/rtems/system.h +++ b/cpukit/score/include/rtems/system.h @@ -140,6 +140,46 @@ extern const char _Copyright_Notice[]; /* RTEMS copyright string */ SCORE_EXTERN rtems_cpu_table _CPU_Table; /* CPU dependent info */ /* + * Macros to access CPU Table fields required by ALL ports. + * + * NOTE: Similar macros to access port specific fields in in the + * appropriate cpu.h file. + */ + +#define rtems_cpu_configuration_get_table() \ + (&_CPU_Table) + +#define rtems_cpu_configuration_get_pretasking_hook() \ + (_CPU_Table.pretasking_hook) + +#define rtems_cpu_configuration_get_predriver_hook() \ + (_CPU_Table.predriver_hook) + +#define rtems_cpu_configuration_get_postdriver_hook() \ + (_CPU_Table.postdriver_hook) + +#define rtems_cpu_configuration_get_idle_task() \ + (_CPU_Table.idle_task) + +#define rtems_cpu_configuration_get_do_zero_of_workspace() \ + (_CPU_Table.do_zero_of_workspace) + +#define rtems_cpu_configuration_get_idle_task_stack_size() \ + (_CPU_Table.idle_task_stack_size) + +#define rtems_cpu_configuration_get_interrupt_stack_size() \ + (_CPU_Table.interrupt_stack_size) + +#define rtems_cpu_configuration_get_extra_mpci_receive_server_stack() \ + (_CPU_Table.extra_mpci_receive_server_stack) + +#define rtems_cpu_configuration_get_stack_allocate_hook() \ + (_CPU_Table.stack_allocate_hook) + +#define rtems_cpu_configuration_get_stack_free_hook() \ + (_CPU_Table.stack_free_hook) + +/* * XXX weird RTEMS stuff */ |