summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-11 19:35:39 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-11 19:35:39 +0000
commit3a4ae6c210bcc37754767966f1128ae23c77b6af (patch)
tree8804983e5b92bec788d548df13db7513118d351d /cpukit/score/cpu
parentnew file -- split from inlines (diff)
downloadrtems-3a4ae6c210bcc37754767966f1128ae23c77b6af.tar.bz2
The word "RTEMS" almost completely removed from the core.
Configuration Table Template file added and all tests modified to use this. All gvar.h and conftbl.h files removed from test directories. Configuration parameter maximum_devices added. Core semaphore and mutex handlers added and RTEMS API Semaphore Manager updated to reflect this. Initialization sequence changed to invoke API specific initialization routines. Initialization tasks table now owned by RTEMS Tasks Manager. Added user extension for post-switch. Utilized user extensions to implement API specific functionality like signal dispatching. Added extensions to the System Initialization Thread so that an API can register a function to be invoked while the system is being initialized. These are largely equivalent to the pre-driver and post-driver hooks. Added the Modules file oar-go32_p5, modified oar-go32, and modified the file make/custom/go32.cfg to look at an environment varable which determines what CPU model is being used. All BSPs updated to reflect named devices and clock driver's IOCTL used by the Shared Memory Driver. Also merged clock isr into main file and removed ckisr.c where possible. Updated spsize to reflect new and moved variables. Makefiles for the executive source and include files updated to show break down of files into Core, RTEMS API, and Neither. Header and inline files installed into subdirectory based on whether logically in the Core or a part of the RTEMS API.
Diffstat (limited to 'cpukit/score/cpu')
-rw-r--r--cpukit/score/cpu/hppa1.1/cpu.c14
-rw-r--r--cpukit/score/cpu/i386/asm.h2
-rw-r--r--cpukit/score/cpu/i386/cpu.c21
-rw-r--r--cpukit/score/cpu/i386/rtems/asm.h2
-rw-r--r--cpukit/score/cpu/i960/asm.h2
-rw-r--r--cpukit/score/cpu/i960/cpu.c19
-rw-r--r--cpukit/score/cpu/m68k/asm.h2
-rw-r--r--cpukit/score/cpu/m68k/cpu.c19
-rw-r--r--cpukit/score/cpu/m68k/rtems/asm.h2
-rw-r--r--cpukit/score/cpu/no_cpu/asm.h2
-rw-r--r--cpukit/score/cpu/no_cpu/cpu.c19
-rw-r--r--cpukit/score/cpu/no_cpu/cpu_asm.c2
-rw-r--r--cpukit/score/cpu/no_cpu/rtems/asm.h2
-rw-r--r--cpukit/score/cpu/unix/cpu.c29
14 files changed, 96 insertions, 41 deletions
diff --git a/cpukit/score/cpu/hppa1.1/cpu.c b/cpukit/score/cpu/hppa1.1/cpu.c
index 437996a78d..6cb6347151 100644
--- a/cpukit/score/cpu/hppa1.1/cpu.c
+++ b/cpukit/score/cpu/hppa1.1/cpu.c
@@ -19,11 +19,10 @@
#include <rtems/system.h>
#include <rtems/fatal.h>
-#include <rtems/isr.h>
-#include <rtems/intr.h>
-#include <rtems/wkspace.h>
+#include <rtems/core/isr.h>
+#include <rtems/core/wkspace.h>
-rtems_status_code hppa_external_interrupt_initialize(void);
+void hppa_external_interrupt_initialize(void);
void hppa_external_interrupt_enable(unsigned32);
void hppa_external_interrupt_disable(unsigned32);
void hppa_external_interrupt(unsigned32, CPU_Interrupt_frame *);
@@ -73,9 +72,6 @@ void _CPU_Initialize(
extern void IVA_Table(void);
- if ( cpu_table == NULL )
- rtems_fatal_error_occurred( RTEMS_NOT_CONFIGURED );
-
/*
* XXX; need to setup fpsr smarter perhaps
*/
@@ -194,7 +190,7 @@ void _CPU_ISR_install_vector(
* called by bsp_start()
*/
-rtems_status_code
+void
hppa_external_interrupt_initialize(void)
{
rtems_isr_entry ignore;
@@ -207,8 +203,6 @@ hppa_external_interrupt_initialize(void)
/* install the external interrupt handler */
rtems_interrupt_catch((rtems_isr_entry) hppa_external_interrupt,
HPPA_INTERRUPT_EXTERNAL_INTERRUPT, &ignore) ;
-
- return RTEMS_SUCCESSFUL;
}
/*
diff --git a/cpukit/score/cpu/i386/asm.h b/cpukit/score/cpu/i386/asm.h
index adf92f935a..aac1ba9dbe 100644
--- a/cpukit/score/cpu/i386/asm.h
+++ b/cpukit/score/cpu/i386/asm.h
@@ -31,7 +31,7 @@
*/
#define ASM
-#include <rtems/i386.h>
+#include <rtems/core/i386.h>
/*
* Recent versions of GNU cpp define variables which indicate the
diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c
index d1ceaba88a..446515d6f9 100644
--- a/cpukit/score/cpu/i386/cpu.c
+++ b/cpukit/score/cpu/i386/cpu.c
@@ -15,8 +15,8 @@
#include <rtems/system.h>
#include <rtems/fatal.h>
-#include <rtems/isr.h>
-#include <rtems/wkspace.h>
+#include <rtems/core/isr.h>
+#include <rtems/core/wkspace.h>
/* _CPU_Initialize
*
@@ -36,9 +36,6 @@ void _CPU_Initialize(
register unsigned16 fp_status asm ("ax");
register unsigned8 *fp_context;
- if ( cpu_table == NULL )
- rtems_fatal_error_occurred( RTEMS_NOT_CONFIGURED );
-
_CPU_Table = *cpu_table;
/*
@@ -69,6 +66,20 @@ void _CPU_Initialize(
/*PAGE
*
+ * _CPU_ISR_Get_level
+ */
+
+unsigned32 _CPU_ISR_Get_level( void )
+{
+ unsigned32 level;
+
+ i386_get_interrupt_level( level );
+
+ return level;
+}
+
+/*PAGE
+ *
* _CPU_ISR_install_raw_handler
*/
diff --git a/cpukit/score/cpu/i386/rtems/asm.h b/cpukit/score/cpu/i386/rtems/asm.h
index adf92f935a..aac1ba9dbe 100644
--- a/cpukit/score/cpu/i386/rtems/asm.h
+++ b/cpukit/score/cpu/i386/rtems/asm.h
@@ -31,7 +31,7 @@
*/
#define ASM
-#include <rtems/i386.h>
+#include <rtems/core/i386.h>
/*
* Recent versions of GNU cpp define variables which indicate the
diff --git a/cpukit/score/cpu/i960/asm.h b/cpukit/score/cpu/i960/asm.h
index e8fc986402..73a8b3a641 100644
--- a/cpukit/score/cpu/i960/asm.h
+++ b/cpukit/score/cpu/i960/asm.h
@@ -31,7 +31,7 @@
*/
#define ASM
-#include <rtems/i960.h>
+#include <rtems/core/i960.h>
/*
* Recent versions of GNU cpp define variables which indicate the
diff --git a/cpukit/score/cpu/i960/cpu.c b/cpukit/score/cpu/i960/cpu.c
index d5acebd225..ec4613c4cf 100644
--- a/cpukit/score/cpu/i960/cpu.c
+++ b/cpukit/score/cpu/i960/cpu.c
@@ -21,7 +21,7 @@
#include <rtems/system.h>
#include <rtems/fatal.h>
-#include <rtems/isr.h>
+#include <rtems/core/isr.h>
/* _CPU_Initialize
*
@@ -40,15 +40,26 @@ void _CPU_Initialize(
)
{
- if ( cpu_table == NULL )
- rtems_fatal_error_occurred( RTEMS_NOT_CONFIGURED );
-
_CPU_Table = *cpu_table;
}
/*PAGE
*
+ * _CPU_ISR_Get_level
+ */
+
+unsigned32 _CPU_ISR_Get_level( void )
+{
+ unsigned32 level;
+
+ i960_get_interrupt_level( level );
+
+ return level;
+}
+
+/*PAGE
+ *
* _CPU_ISR_install_raw_handler
*/
diff --git a/cpukit/score/cpu/m68k/asm.h b/cpukit/score/cpu/m68k/asm.h
index 58bb04bdf9..7a25b6c298 100644
--- a/cpukit/score/cpu/m68k/asm.h
+++ b/cpukit/score/cpu/m68k/asm.h
@@ -31,7 +31,7 @@
*/
#define ASM
-#include <rtems/m68k.h>
+#include <rtems/core/m68k.h>
/*
* Recent versions of GNU cpp define variables which indicate the
diff --git a/cpukit/score/cpu/m68k/cpu.c b/cpukit/score/cpu/m68k/cpu.c
index a97698372a..fdba64bffe 100644
--- a/cpukit/score/cpu/m68k/cpu.c
+++ b/cpukit/score/cpu/m68k/cpu.c
@@ -14,7 +14,7 @@
#include <rtems/system.h>
#include <rtems/fatal.h>
-#include <rtems/isr.h>
+#include <rtems/core/isr.h>
/* _CPU_Initialize
*
@@ -33,15 +33,26 @@ void _CPU_Initialize(
)
{
- if ( cpu_table == NULL )
- rtems_fatal_error_occurred( RTEMS_NOT_CONFIGURED );
-
_CPU_Table = *cpu_table;
}
/*PAGE
*
+ * _CPU_ISR_Get_level
+ */
+
+unsigned32 _CPU_ISR_Get_level( void )
+{
+ unsigned32 level;
+
+ m68k_get_interrupt_level( level );
+
+ return level;
+}
+
+/*PAGE
+ *
* _CPU_ISR_install_raw_handler
*/
diff --git a/cpukit/score/cpu/m68k/rtems/asm.h b/cpukit/score/cpu/m68k/rtems/asm.h
index 58bb04bdf9..7a25b6c298 100644
--- a/cpukit/score/cpu/m68k/rtems/asm.h
+++ b/cpukit/score/cpu/m68k/rtems/asm.h
@@ -31,7 +31,7 @@
*/
#define ASM
-#include <rtems/m68k.h>
+#include <rtems/core/m68k.h>
/*
* Recent versions of GNU cpp define variables which indicate the
diff --git a/cpukit/score/cpu/no_cpu/asm.h b/cpukit/score/cpu/no_cpu/asm.h
index 97464d5b3a..ca0ff95e35 100644
--- a/cpukit/score/cpu/no_cpu/asm.h
+++ b/cpukit/score/cpu/no_cpu/asm.h
@@ -31,7 +31,7 @@
*/
#define ASM
-#include <rtems/no_cpu.h>
+#include <rtems/core/no_cpu.h>
/*
* Recent versions of GNU cpp define variables which indicate the
diff --git a/cpukit/score/cpu/no_cpu/cpu.c b/cpukit/score/cpu/no_cpu/cpu.c
index f95c435eae..c7e7cbe693 100644
--- a/cpukit/score/cpu/no_cpu/cpu.c
+++ b/cpukit/score/cpu/no_cpu/cpu.c
@@ -15,8 +15,8 @@
#include <rtems/system.h>
#include <rtems/fatal.h>
-#include <rtems/isr.h>
-#include <rtems/wkspace.h>
+#include <rtems/core/isr.h>
+#include <rtems/core/wkspace.h>
/* _CPU_Initialize
*
@@ -33,9 +33,6 @@ void _CPU_Initialize(
void (*thread_dispatch) /* ignored on this CPU */
)
{
- if ( cpu_table == NULL )
- rtems_fatal_error_occurred( RTEMS_NOT_CONFIGURED );
-
/*
* The thread_dispatch argument is the address of the entry point
* for the routine called at the end of an ISR once it has been
@@ -63,6 +60,18 @@ void _CPU_Initialize(
/*PAGE
*
+ * _CPU_ISR_Get_level
+ */
+
+unsigned32 _CPU_ISR_Get_level( void )
+{
+ /*
+ * This routine returns the current interrupt level.
+ */
+}
+
+/*PAGE
+ *
* _CPU_ISR_install_raw_handler
*/
diff --git a/cpukit/score/cpu/no_cpu/cpu_asm.c b/cpukit/score/cpu/no_cpu/cpu_asm.c
index c0cf3b5127..0d7622d15f 100644
--- a/cpukit/score/cpu/no_cpu/cpu_asm.c
+++ b/cpukit/score/cpu/no_cpu/cpu_asm.c
@@ -24,7 +24,7 @@
*/
#include <rtems/system.h>
-#include <rtems/cpu.h>
+#include <rtems/core/cpu.h>
/* #include "cpu_asm.h> */
/*
diff --git a/cpukit/score/cpu/no_cpu/rtems/asm.h b/cpukit/score/cpu/no_cpu/rtems/asm.h
index 97464d5b3a..ca0ff95e35 100644
--- a/cpukit/score/cpu/no_cpu/rtems/asm.h
+++ b/cpukit/score/cpu/no_cpu/rtems/asm.h
@@ -31,7 +31,7 @@
*/
#define ASM
-#include <rtems/no_cpu.h>
+#include <rtems/core/no_cpu.h>
/*
* Recent versions of GNU cpp define variables which indicate the
diff --git a/cpukit/score/cpu/unix/cpu.c b/cpukit/score/cpu/unix/cpu.c
index 736b7c4c7f..339bb2a3ce 100644
--- a/cpukit/score/cpu/unix/cpu.c
+++ b/cpukit/score/cpu/unix/cpu.c
@@ -17,7 +17,7 @@
*/
#include <rtems/system.h>
-#include <rtems/isr.h>
+#include <rtems/core/isr.h>
#include <stdio.h>
#include <stdlib.h>
@@ -186,6 +186,28 @@ void _CPU_Context_From_CPU_Init()
}
+/*PAGE
+ *
+ * _CPU_ISR_Get_level
+ */
+
+unsigned32 _CPU_ISR_Get_level( void )
+{
+ sigset_t sigset;
+
+ sigprocmask( 0, 0, &sigset );
+
+ /*
+ * This is an educated guess based on ONLY ONE of the signals we
+ * disable/enable to mask ISRs.
+ */
+
+ if ( sigismember( &sigset, SIGUSR1 ) )
+ return 1;
+ else
+ return 0;
+}
+
/* _CPU_Initialize
*
* This routine performs processor dependent initialization.
@@ -198,12 +220,9 @@ void _CPU_Context_From_CPU_Init()
void _CPU_Initialize(
rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
+ void (*thread_dispatch) /* ignored on this CPU */
)
{
- if ( cpu_table == NULL )
- _CPU_Fatal_halt( RTEMS_NOT_CONFIGURED );
-
/*
* The thread_dispatch argument is the address of the entry point
* for the routine called at the end of an ISR once it has been