summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score/cpu/powerpc
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-05 16:44:02 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-05 16:44:02 +0000
commit458bd343e24cda7169c75f079705979891c9abc1 (patch)
treea9e584c28211674b28d1e37aec005e0e3a25afa1 /c/src/exec/score/cpu/powerpc
parentEliminated references to stack checker related #defines. (diff)
downloadrtems-458bd343e24cda7169c75f079705979891c9abc1.tar.bz2
This is another pass at making sure that nothing outside the BSP
unnecessarily uses any variables defined by the BSP. On this sweep, use of BSP_Configuration and Cpu_table was eliminated. A significant part of this modification was the addition of macros to access fields in the RTEMS configuration structures. This is necessary to strengthen the division between the BSP independent parts of RTEMS and the BSPs themselves. This started after comments and analysis by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
Diffstat (limited to 'c/src/exec/score/cpu/powerpc')
-rw-r--r--c/src/exec/score/cpu/powerpc/mpc750/cpu.h15
-rw-r--r--c/src/exec/score/cpu/powerpc/other_cpu/cpu.h54
2 files changed, 68 insertions, 1 deletions
diff --git a/c/src/exec/score/cpu/powerpc/mpc750/cpu.h b/c/src/exec/score/cpu/powerpc/mpc750/cpu.h
index 68371d33dd..145e2924eb 100644
--- a/c/src/exec/score/cpu/powerpc/mpc750/cpu.h
+++ b/c/src/exec/score/cpu/powerpc/mpc750/cpu.h
@@ -443,6 +443,21 @@ typedef struct {
} rtems_cpu_table;
/*
+ * Macros to access required entires in the CPU Table are in
+ * the file rtems/system.h.
+ */
+
+/*
+ * Macros to access PowerPC MPC750 specific additions to the CPU Table
+ */
+
+#define rtems_cpu_configuration_get_clicks_per_usec() \
+ (_CPU_Table.clicks_per_usec)
+
+#define rtems_cpu_configuration_get_exceptions_in_ram() \
+ (_CPU_Table.exceptions_in_RAM)
+
+/*
* This variable is optional. It is used on CPUs on which it is difficult
* to generate an "uninitialized" FP context. It is filled in by
* _CPU_Initialize and copied into the task's FP context area during
diff --git a/c/src/exec/score/cpu/powerpc/other_cpu/cpu.h b/c/src/exec/score/cpu/powerpc/other_cpu/cpu.h
index c126bdf1a1..2a502d0745 100644
--- a/c/src/exec/score/cpu/powerpc/other_cpu/cpu.h
+++ b/c/src/exec/score/cpu/powerpc/other_cpu/cpu.h
@@ -492,6 +492,58 @@ typedef struct {
} rtems_cpu_table;
/*
+ * Macros to access required entires in the CPU Table are in
+ * the file rtems/system.h.
+ */
+
+/*
+ * Macros to access PowerPC specific additions to the CPU Table
+ */
+
+#define rtems_cpu_configuration_get_clicks_per_usec() \
+ (_CPU_Table.clicks_per_usec)
+
+#define rtems_cpu_configuration_get_spurious_handler() \
+ (_CPU_Table.spurious_handler)
+
+#define rtems_cpu_configuration_get_exceptions_in_ram() \
+ (_CPU_Table.exceptions_in_RAM)
+
+#if (defined(ppc403) || defined(mpc860) || defined(mpc821))
+
+#define rtems_cpu_configuration_get_serial_per_sec() \
+ (_CPU_Table.serial_per_sec)
+
+#define rtems_cpu_configuration_get_serial_external_clock() \
+ (_CPU_Table.serial_external_clock)
+
+#define rtems_cpu_configuration_get_serial_xon_xoff() \
+ (_CPU_Table.serial_xon_xoff)
+
+#define rtems_cpu_configuration_get_serial_cts_rts() \
+ (_CPU_Table.serial_cts_rts)
+
+#define rtems_cpu_configuration_get_serial_rate() \
+ (_CPU_Table.serial_rate)
+
+#define rtems_cpu_configuration_get_timer_average_overhead() \
+ (_CPU_Table.timer_average_overhead)
+
+#define rtems_cpu_configuration_get_timer_least_valid() \
+ (_CPU_Table.timer_least_valid)
+
+#define rtems_cpu_configuration_get_timer_internal_clock() \
+ (_CPU_Table.timer_internal_clock)
+
+#endif
+
+#if (defined(mpc860) || defined(mpc821))
+#define rtems_cpu_configuration_get_clock_speed() \
+ (_CPU_Table.clock_speed)
+#endif
+
+
+/*
* The following type defines an entry in the PPC's trap table.
*
* NOTE: The instructions chosen are RTEMS dependent although one is
@@ -789,7 +841,7 @@ void _CPU_ISR_install_raw_handler(
do { \
unsigned32 start, ticks, now; \
CPU_Get_timebase_low( start ) ; \
- ticks = (_microseconds) * Cpu_table.clicks_per_usec; \
+ ticks = (_microseconds) * _CPU_Table.clicks_per_usec; \
do \
CPU_Get_timebase_low( now ) ; \
while (now - start < ticks); \