summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-19 14:53:29 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-19 14:53:29 +0000
commit3652ad356bf13abe0963c992cbbda96476d31609 (patch)
tree8ae01f1eec49c8fabc0a3db3d5b58b29a61428f2 /c/src/lib/libbsp/m68k
parentInitial attempt at building HP PA-RISC using Solaris hosted tools. (diff)
downloadrtems-3652ad356bf13abe0963c992cbbda96476d31609.tar.bz2
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.
Diffstat (limited to 'c/src/lib/libbsp/m68k')
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/console/console.c4
-rw-r--r--c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c34
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/console/console.c4
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c34
-rw-r--r--c/src/lib/libbsp/m68k/idp/console/console.c4
-rw-r--r--c/src/lib/libbsp/m68k/idp/startup/bspstart.c37
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/console/console.c4
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c38
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/console/console.c4
-rw-r--r--c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c34
10 files changed, 166 insertions, 31 deletions
diff --git a/c/src/lib/libbsp/m68k/dmv152/console/console.c b/c/src/lib/libbsp/m68k/dmv152/console/console.c
index ed0cd801c8..daa50f37f1 100644
--- a/c/src/lib/libbsp/m68k/dmv152/console/console.c
+++ b/c/src/lib/libbsp/m68k/dmv152/console/console.c
@@ -230,7 +230,9 @@ rtems_device_driver console_write(
}
outbyte( buffer[ count ] );
}
- return maximum;
+
+ rw_args->bytes_moved = maximum;
+ return 0;
}
/*
diff --git a/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c b/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
index 4079ee4a8e..44ad6b6f7e 100644
--- a/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
@@ -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;
diff --git a/c/src/lib/libbsp/m68k/gen68302/console/console.c b/c/src/lib/libbsp/m68k/gen68302/console/console.c
index dd461e4557..04820bf579 100644
--- a/c/src/lib/libbsp/m68k/gen68302/console/console.c
+++ b/c/src/lib/libbsp/m68k/gen68302/console/console.c
@@ -285,7 +285,9 @@ rtems_device_driver console_write(
}
outbyte( buffer[ count ] );
}
- return maximum;
+
+ rw_args->bytes_moved = maximum;
+ return 0;
}
/*
diff --git a/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c b/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
index 72e1656e04..94973ea4cc 100644
--- a/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
@@ -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;
diff --git a/c/src/lib/libbsp/m68k/idp/console/console.c b/c/src/lib/libbsp/m68k/idp/console/console.c
index 5540d26fcd..cd64e27e84 100644
--- a/c/src/lib/libbsp/m68k/idp/console/console.c
+++ b/c/src/lib/libbsp/m68k/idp/console/console.c
@@ -265,7 +265,9 @@ rtems_device_driver console_write(
}
outbyte( buffer[ count ], minor );
}
- return maximum;
+
+ rw_args->bytes_moved = maximum;
+ return 0;
}
/*
diff --git a/c/src/lib/libbsp/m68k/idp/startup/bspstart.c b/c/src/lib/libbsp/m68k/idp/startup/bspstart.c
index 233449282e..b4f4928f7d 100644
--- a/c/src/lib/libbsp/m68k/idp/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/idp/startup/bspstart.c
@@ -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.
+ *
+ */
+
+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
}
@@ -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;
diff --git a/c/src/lib/libbsp/m68k/mvme136/console/console.c b/c/src/lib/libbsp/m68k/mvme136/console/console.c
index e619fc1428..1c65707dc0 100644
--- a/c/src/lib/libbsp/m68k/mvme136/console/console.c
+++ b/c/src/lib/libbsp/m68k/mvme136/console/console.c
@@ -205,7 +205,9 @@ rtems_device_driver console_write(
}
outbyte( buffer[ count ] );
}
- return maximum;
+
+ rw_args->bytes_moved = maximum;
+ return 0;
}
/*
diff --git a/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c
index 5f822855e8..3465f72416 100644
--- a/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c
@@ -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;
diff --git a/c/src/lib/libbsp/m68k/mvme162/console/console.c b/c/src/lib/libbsp/m68k/mvme162/console/console.c
index 72595f3bce..2e1b877f3b 100644
--- a/c/src/lib/libbsp/m68k/mvme162/console/console.c
+++ b/c/src/lib/libbsp/m68k/mvme162/console/console.c
@@ -237,7 +237,9 @@ rtems_device_driver console_write(
}
outbyte( buffer[ count ], minor );
}
- return maximum;
+
+ rw_args->bytes_moved = maximum;
+ return 0;
}
/*
diff --git a/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c
index 973a78a9f4..123cd413d2 100644
--- a/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c
@@ -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;