summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/src/exinit.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-03 22:23:13 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-03 22:23:13 +0000
commit976162a69f6fdfbd2ab507074be7d99a48b4f7f7 (patch)
tree375dac0660e6845642167a2cba304a6812a33d26 /cpukit/sapi/src/exinit.c
parent2007-12-03 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-976162a69f6fdfbd2ab507074be7d99a48b4f7f7.tar.bz2
2007-12-03 Joel Sherrill <joel.sherrill@OARcorp.com>
* libcsupport/src/malloc.c, libmisc/monitor/mon-command.c, posix/preinstall.am, posix/include/rtems/posix/cond.h, posix/include/rtems/posix/mqueue.h, posix/include/rtems/posix/mutex.h, posix/include/rtems/posix/pthread.h, posix/include/rtems/posix/semaphore.h, posix/src/conddestroy.c, posix/src/mutexdestroy.c, posix/src/mutexinit.c, posix/src/mutexsetprioceiling.c, posix/src/mutexunlock.c, sapi/include/confdefs.h, sapi/include/rtems/config.h, sapi/include/rtems/init.h, sapi/include/rtems/sptables.h, sapi/src/exinit.c, score/include/rtems/system.h, score/include/rtems/score/mpci.h, score/src/mpci.c, score/src/thread.c, score/src/threadcreateidle.c, score/src/threadstackallocate.c, score/src/threadstackfree.c, score/src/wkspace.c: Moved most of the remaining CPU Table fields to the Configuration Table. This included pretasking_hook, predriver_hook, postdriver_hook, idle_task, do_zero_of_workspace, extra_mpci_receive_server_stack, stack_allocate_hook, and stack_free_hook. As a side-effect of this effort some multiprocessing code was made conditional and some style clean up occurred.
Diffstat (limited to '')
-rw-r--r--cpukit/sapi/src/exinit.c49
1 files changed, 29 insertions, 20 deletions
diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c
index 452f50708f..c25c5ec173 100644
--- a/cpukit/sapi/src/exinit.c
+++ b/cpukit/sapi/src/exinit.c
@@ -92,6 +92,21 @@ rtems_interrupt_level rtems_initialize_executive_early(
INTERNAL_ERROR_NO_CPU_TABLE
);
+ /*
+ * Grab our own copy of the user's CPU table.
+ */
+ _CPU_Table = *cpu_table;
+
+ /*
+ * Provide pointers just for later convenience.
+ */
+ _Configuration_Table = configuration_table;
+
+ /*
+ * Initialize any target architecture specific support as early as possible
+ */
+ _CPU_Initialize( cpu_table, _Thread_Dispatch );
+
#if defined(RTEMS_MULTIPROCESSING)
/*
* Initialize the system state based on whether this is an MP system.
@@ -112,18 +127,6 @@ rtems_interrupt_level rtems_initialize_executive_early(
#endif
/*
- * Grab our own copy of the user's CPU table.
- */
- _CPU_Table = *cpu_table;
-
- /*
- * Provide pointers just for later convenience.
- */
- _Configuration_Table = configuration_table;
-
- _CPU_Initialize( cpu_table, _Thread_Dispatch );
-
- /*
* Do this as early as possible to insure no debugging output
* is even attempted to be printed.
*/
@@ -173,13 +176,13 @@ rtems_interrupt_level rtems_initialize_executive_early(
configuration_table->maximum_extensions
#if defined(RTEMS_MULTIPROCESSING)
,
- multiprocessing_table->maximum_proxies
+ _Configuration_MP_table->maximum_proxies
#endif
);
#if defined(RTEMS_MULTIPROCESSING)
_MPCI_Handler_initialization(
- multiprocessing_table->User_mpci_table,
+ _Configuration_MP_table->User_mpci_table,
RTEMS_TIMEOUT
);
#endif
@@ -220,8 +223,10 @@ rtems_interrupt_level rtems_initialize_executive_early(
* Scheduling can properly occur now as long as we avoid dispatching.
*/
- if ( cpu_table->pretasking_hook )
- (*cpu_table->pretasking_hook)();
+ {
+ extern void bsp_pretasking_hook(void);
+ bsp_pretasking_hook();
+ }
#if defined(RTEMS_MULTIPROCESSING)
_MPCI_Create_server();
@@ -233,8 +238,10 @@ rtems_interrupt_level rtems_initialize_executive_early(
_API_extensions_Run_predriver();
- if ( _CPU_Table.predriver_hook )
- (*_CPU_Table.predriver_hook)();
+ {
+ extern void bsp_predriver_hook(void);
+ bsp_predriver_hook();
+ }
/*
* Initialize all the device drivers and initialize the MPCI layer.
@@ -261,8 +268,10 @@ rtems_interrupt_level rtems_initialize_executive_early(
_API_extensions_Run_postdriver();
- if ( _CPU_Table.postdriver_hook )
- (*_CPU_Table.postdriver_hook)();
+ {
+ extern void bsp_postdriver_hook(void);
+ bsp_postdriver_hook();
+ }
return bsp_level;
}