From 458bd343e24cda7169c75f079705979891c9abc1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 5 Nov 1999 16:44:02 +0000 Subject: This is another pass at making sure that nothing outside the BSP unnecessarily uses any variables defined by the BSP. On this sweep, use of BSP_Configuration and Cpu_table was eliminated. A significant part of this modification was the addition of macros to access fields in the RTEMS configuration structures. This is necessary to strengthen the division between the BSP independent parts of RTEMS and the BSPs themselves. This started after comments and analysis by Ralf Corsepius . --- c/src/exec/score/include/rtems/system.h | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'c/src/exec/score/include') diff --git a/c/src/exec/score/include/rtems/system.h b/c/src/exec/score/include/rtems/system.h index 5e1cc80ed5..4d7f550141 100644 --- a/c/src/exec/score/include/rtems/system.h +++ b/c/src/exec/score/include/rtems/system.h @@ -139,6 +139,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 */ -- cgit v1.2.3