summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2001-11-28 18:15:51 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2001-11-28 18:15:51 +0000
commit75ad73760f33b0d2b30061919d8d4b4bf0b4277b (patch)
treefa1952b4f64567b4a808aa2c9dbb7d672f517c38 /c/src/lib/libcpu
parent2001-11-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-75ad73760f33b0d2b30061919d8d4b4bf0b4277b.tar.bz2
2001-11-28 Joel Sherrill <joel@OARcorp.com>,
This was tracked as PR91. * rtems/score/cpu.h: Added CPU_PROVIDES_ISR_IS_IN_PROGRESS macro which is used to specify if the port uses the standard macro for this (FALSE). A TRUE setting indicates the port provides its own implementation. * rtems/score/c_isr.inl: Deleted and contents merged into cpu.c. * cpu.c: Received contents of c_isr.inl. * Makefile.am: Deleted reference to c_isr.inl.
Diffstat (limited to 'c/src/lib/libcpu')
-rw-r--r--c/src/lib/libcpu/powerpc/new-exceptions/ChangeLog10
-rw-r--r--c/src/lib/libcpu/powerpc/new-exceptions/cpu.c15
-rw-r--r--c/src/lib/libcpu/powerpc/old-exceptions/ChangeLog10
-rw-r--r--c/src/lib/libcpu/powerpc/old-exceptions/cpu.c16
4 files changed, 50 insertions, 1 deletions
diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/ChangeLog b/c/src/lib/libcpu/powerpc/new-exceptions/ChangeLog
index 514a006ddf..bee7d01726 100644
--- a/c/src/lib/libcpu/powerpc/new-exceptions/ChangeLog
+++ b/c/src/lib/libcpu/powerpc/new-exceptions/ChangeLog
@@ -1,3 +1,13 @@
+2001-11-28 Joel Sherrill <joel@OARcorp.com>,
+
+ This was tracked as PR91.
+ * rtems/score/cpu.h: Added CPU_PROVIDES_ISR_IS_IN_PROGRESS macro which
+ is used to specify if the port uses the standard macro for this (FALSE).
+ A TRUE setting indicates the port provides its own implementation.
+ * rtems/score/c_isr.inl: Deleted and contents merged into cpu.c.
+ * cpu.c: Received contents of c_isr.inl.
+ * Makefile.am: Deleted reference to c_isr.inl.
+
2001-11-26 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* .cvsignore: Add aclocal.m4, autom4te.*, config.*, configure.
diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/cpu.c b/c/src/lib/libcpu/powerpc/new-exceptions/cpu.c
index 38a962e967..10d38fab1a 100644
--- a/c/src/lib/libcpu/powerpc/new-exceptions/cpu.c
+++ b/c/src/lib/libcpu/powerpc/new-exceptions/cpu.c
@@ -110,6 +110,19 @@ void _CPU_Install_interrupt_stack( void )
{
}
+/*PAGE
+ *
+ * This is the PowerPC specific implementation of the routine which
+ * returns TRUE if an interrupt is in progress.
+ */
-
+boolean _ISR_Is_in_progress( void )
+{
+ register unsigned int isr_nesting_level;
+ /*
+ * Move from special purpose register 0 (mfspr SPRG0, r3)
+ */
+ asm volatile ("mfspr %0, 272" : "=r" (isr_nesting_level));
+ return isr_nesting_level;
+}
diff --git a/c/src/lib/libcpu/powerpc/old-exceptions/ChangeLog b/c/src/lib/libcpu/powerpc/old-exceptions/ChangeLog
index 514a006ddf..bee7d01726 100644
--- a/c/src/lib/libcpu/powerpc/old-exceptions/ChangeLog
+++ b/c/src/lib/libcpu/powerpc/old-exceptions/ChangeLog
@@ -1,3 +1,13 @@
+2001-11-28 Joel Sherrill <joel@OARcorp.com>,
+
+ This was tracked as PR91.
+ * rtems/score/cpu.h: Added CPU_PROVIDES_ISR_IS_IN_PROGRESS macro which
+ is used to specify if the port uses the standard macro for this (FALSE).
+ A TRUE setting indicates the port provides its own implementation.
+ * rtems/score/c_isr.inl: Deleted and contents merged into cpu.c.
+ * cpu.c: Received contents of c_isr.inl.
+ * Makefile.am: Deleted reference to c_isr.inl.
+
2001-11-26 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* .cvsignore: Add aclocal.m4, autom4te.*, config.*, configure.
diff --git a/c/src/lib/libcpu/powerpc/old-exceptions/cpu.c b/c/src/lib/libcpu/powerpc/old-exceptions/cpu.c
index 1d6845cb69..5b8fcb6259 100644
--- a/c/src/lib/libcpu/powerpc/old-exceptions/cpu.c
+++ b/c/src/lib/libcpu/powerpc/old-exceptions/cpu.c
@@ -873,3 +873,19 @@ unsigned32 ppc_exception_vector_addr(
return Top;
}
+/*PAGE
+ *
+ * This is the PowerPC specific implementation of the routine which
+ * returns TRUE if an interrupt is in progress.
+ *
+ * NOTE: This is the same as the generic version. But since the
+ * PowerPC is still supporting old and new exception processing
+ * models and the new exception processing model has a hardware
+ * way of doing this, we have to provide this capability here
+ * for symmetry.
+ */
+
+boolean _ISR_Is_in_progress( void )
+{
+ return (_ISR_Nest_level != 0);
+}