Minor bug fixes to get all targets compilable and running. The

single biggest changes were the expansion of the workspace size
macro to include other types of objects and the increase in the
minimum stack size for most CPUs.
This commit is contained in:
Joel Sherrill
1995-09-19 14:53:29 +00:00
parent b3ac6a8dfe
commit 3652ad356b
228 changed files with 4850 additions and 2355 deletions

View File

@@ -29,6 +29,7 @@
#include <rtems.h>
#include <bsp.h>
#include <rtems/libio.h>
#include <rtems/core/intthrd.h>
#include <libcsupport.h>
@@ -85,9 +86,9 @@ fast_idle_switch_hook(rtems_tcb *current_task,
* but its the best we could think of at the moment.
*/
if (heir_task->name == rtems_build_name('I', 'D', 'L', 'E'))
if (heir_task == _Internal_threads_Idle_thread)
CPU_HPPA_CLICKS_PER_TICK = fast_clock;
else if (current_task->name == rtems_build_name('I', 'D', 'L', 'E'))
else if (heir_task == _Internal_threads_Idle_thread)
CPU_HPPA_CLICKS_PER_TICK = normal_clock;
}
@@ -211,7 +212,7 @@ bsp_pretasking_hook(void)
memset(&fast_idle_extension, 0, sizeof(fast_idle_extension));
fast_idle_extension.task_switch = fast_idle_switch_hook;
fast_idle_extension.thread_switch = fast_idle_switch_hook;
rc = rtems_extension_create(rtems_build_name('F', 'D', 'L', 'E'),
&fast_idle_extension, &extension_id);

View File

@@ -266,7 +266,9 @@ rtems_device_driver console_write(
}
outbyte( buffer[ count ] );
}
return maximum;
rw_args->bytes_moved = maximum;
return 0;
}
/*

View File

@@ -74,16 +74,41 @@ void bsp_libc_init()
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.
*/
#ifdef STACK_CHECKER_ON
Stack_check_Initialize();
#endif
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* After drivers are setup, register some "filenames"
@@ -135,9 +160,9 @@ int main(
* we do not use the pretasking_hook.
*/
Cpu_table.pretasking_hook = NULL;
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.predriver_hook = bsp_libc_init; /* RTEMS resources available */
Cpu_table.predriver_hook = NULL;
Cpu_table.postdriver_hook = bsp_postdriver_hook;

View File

@@ -237,7 +237,9 @@ rtems_device_driver console_write(
}
outbyte( buffer[ count ] );
}
return maximum;
rw_args->bytes_moved = maximum;
return 0;
}
/*

View File

@@ -81,17 +81,42 @@ void bsp_libc_init()
libc_init(1); /* reentrant if possible */
else
libc_init(0); /* non-reentrant */
/*
* Initialize the stack bounds checker
*/
#ifdef STACK_CHECKER_ON
Stack_check_Initialize();
#endif
}
/*
* 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
@@ -138,8 +163,8 @@ int main(
else
rtems_progname = "RTEMS";
Cpu_table.pretasking_hook = NULL;
Cpu_table.predriver_hook = bsp_libc_init; /* RTEMS resources available */
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;

View File

@@ -192,7 +192,9 @@ rtems_device_driver console_write(
}
outbyte( buffer[ count ] );
}
return maximum;
rw_args->bytes_moved = maximum;
return 0;
}
/*

View File

@@ -76,14 +76,41 @@ void bsp_libc_init()
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.
*/
#ifdef STACK_CHECKER_ON
Stack_check_Initialize();
#endif
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* After drivers are setup, register some "filenames"
@@ -152,9 +179,9 @@ int main(
* we do not use the pretasking_hook.
*/
Cpu_table.pretasking_hook = NULL;
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.predriver_hook = bsp_libc_init; /* RTEMS resources available */
Cpu_table.predriver_hook = NULL;
Cpu_table.postdriver_hook = bsp_postdriver_hook;

View File

@@ -230,7 +230,9 @@ rtems_device_driver console_write(
}
outbyte( buffer[ count ] );
}
return maximum;
rw_args->bytes_moved = maximum;
return 0;
}
/*

View File

@@ -75,15 +75,41 @@ void bsp_libc_init()
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.
*/
#ifdef STACK_CHECKER_ON
Stack_check_Initialize();
#endif
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* After drivers are setup, register some "filenames"
@@ -158,9 +184,9 @@ int main(
* we only use a hook to get the C library initialized.
*/
Cpu_table.pretasking_hook = NULL;
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.predriver_hook = bsp_libc_init; /* RTEMS resources available */
Cpu_table.predriver_hook = NULL;
Cpu_table.postdriver_hook = bsp_postdriver_hook;

View File

@@ -285,7 +285,9 @@ rtems_device_driver console_write(
}
outbyte( buffer[ count ] );
}
return maximum;
rw_args->bytes_moved = maximum;
return 0;
}
/*

View File

@@ -82,15 +82,41 @@ void bsp_libc_init()
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.
*/
#ifdef STACK_CHECKER_ON
Stack_check_Initialize();
#endif
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* After drivers are setup, register some "filenames"
@@ -192,9 +218,9 @@ int main(
* we do not use the pretasking_hook
*/
Cpu_table.pretasking_hook = NULL;
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.predriver_hook = bsp_libc_init; /* RTEMS resources available */
Cpu_table.predriver_hook = NULL;
Cpu_table.postdriver_hook = bsp_postdriver_hook;

View File

@@ -265,7 +265,9 @@ rtems_device_driver console_write(
}
outbyte( buffer[ count ], minor );
}
return maximum;
rw_args->bytes_moved = maximum;
return 0;
}
/*

View File

@@ -83,14 +83,39 @@ void bsp_libc_init()
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.
*
*/
/*
* Initialize the stack bounds checker
*/
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
}
@@ -166,12 +191,12 @@ int main(
* we only use a hook to get the C library initialized.
*/
Cpu_table.pretasking_hook = NULL;
Cpu_table.predriver_hook = bsp_libc_init; /* RTEMS resources available */
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;

View File

@@ -205,7 +205,9 @@ rtems_device_driver console_write(
}
outbyte( buffer[ count ] );
}
return maximum;
rw_args->bytes_moved = maximum;
return 0;
}
/*

View File

@@ -54,10 +54,6 @@ void bsp_libc_init()
extern int end;
rtems_unsigned32 heap_start;
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
heap_start = (rtems_unsigned32) &end;
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
@@ -80,15 +76,41 @@ void bsp_libc_init()
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.
*/
#ifdef STACK_CHECKER_ON
Stack_check_Initialize();
#endif
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* After drivers are setup, register some "filenames"
@@ -152,9 +174,9 @@ int main(
* we only use a hook to get the C library initialized.
*/
Cpu_table.pretasking_hook = NULL;
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.predriver_hook = bsp_libc_init; /* RTEMS resources available */
Cpu_table.predriver_hook = NULL;
Cpu_table.postdriver_hook = bsp_postdriver_hook;

View File

@@ -237,7 +237,9 @@ rtems_device_driver console_write(
}
outbyte( buffer[ count ], minor );
}
return maximum;
rw_args->bytes_moved = maximum;
return 0;
}
/*

View File

@@ -82,15 +82,41 @@ void bsp_libc_init()
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.
*/
#ifdef STACK_CHECKER_ON
Stack_check_Initialize();
#endif
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* After drivers are setup, register some "filenames"
@@ -165,9 +191,9 @@ int main(
* we only use a hook to get the C library initialized.
*/
Cpu_table.pretasking_hook = NULL;
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.predriver_hook = bsp_libc_init; /* RTEMS resources available */
Cpu_table.predriver_hook = NULL;
Cpu_table.postdriver_hook = bsp_postdriver_hook;

View File

@@ -204,7 +204,9 @@ rtems_device_driver console_write(
}
outbyte( buffer[ count ] );
}
return maximum;
rw_args->bytes_moved = maximum;
return 0;
}
/*

View File

@@ -83,15 +83,41 @@ void bsp_libc_init()
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.
*/
#ifdef STACK_CHECKER_ON
Stack_check_Initialize();
#endif
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* After drivers are setup, register some "filenames"
@@ -119,7 +145,7 @@ bsp_postdriver_hook(void)
rtems_fatal_error_occurred('STIO');
}
int main(
int bsp_start(
int argc,
char **argv,
char **environp
@@ -196,9 +222,9 @@ int main(
* we do not use the pretasking_hook
*/
Cpu_table.pretasking_hook = NULL;
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.predriver_hook = bsp_libc_init; /* RTEMS resources available */
Cpu_table.predriver_hook = NULL;
Cpu_table.postdriver_hook = bsp_postdriver_hook;

View File

@@ -19,10 +19,11 @@
int main(
int argc,
char **argv
char **argv,
char **environp
)
{
bsp_start();
bsp_start( argc, argv, environp );
/*
* May be able to return to the "crt/start.s" code but also

View File

@@ -101,14 +101,41 @@ void bsp_libc_init()
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.
*/
#ifdef STACK_CHECKER_ON
Stack_check_Initialize();
#endif
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
}
/*
* After drivers are setup, register some "filenames"
@@ -204,13 +231,9 @@ int main(
* initialize the CPU table for this BSP
*/
/*
* we do not use the pretasking_hook
*/
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.pretasking_hook = NULL;
Cpu_table.predriver_hook = bsp_libc_init; /* RTEMS resources available */
Cpu_table.predriver_hook = NULL;
Cpu_table.postdriver_hook = bsp_postdriver_hook;

View File

@@ -130,7 +130,7 @@ rtems_monitor_id_fixup(
#else
#warning "TONY... FIX ME!!!!!"
#if defined(hppa1_1)
#error "TONY... I SAID TO FIX ME!!!!! <HAHAHAHAHA>"
#warning "TONY... I SAID TO FIX ME!!!!! <HAHAHAHAHA>"
#endif
id = _Objects_Build_id(0, default_node, rtems_get_index(id));
#endif

View File

@@ -18,9 +18,9 @@ rtems_monitor_queue_canonical(
Message_queue_Control *rtems_queue = (Message_queue_Control *) queue_void;
canonical_queue->attributes = rtems_queue->attribute_set;
canonical_queue->maximum_message_size = rtems_queue->maximum_message_size;
canonical_queue->maximum_pending_messages = rtems_queue->maximum_pending_messages;
canonical_queue->number_of_pending_messages = rtems_queue->number_of_pending_messages;
canonical_queue->maximum_message_size = rtems_queue->message_queue.maximum_message_size;
canonical_queue->maximum_pending_messages = rtems_queue->message_queue.maximum_pending_messages;
canonical_queue->number_of_pending_messages = rtems_queue->message_queue.number_of_pending_messages;
}
void