summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-11-05 09:23:52 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-11-06 14:05:53 +0100
commit2c467ec76780f2e93ff99f7993a17a65c03ab924 (patch)
treebb197a82c4ff2607791c3aa424319a39ed2f432a
parentrtems-bsps: Use build specification items (diff)
downloadrtems-2c467ec76780f2e93ff99f7993a17a65c03ab924.tar.bz2
sparc: Move SPARC-specific macros to sparc.h
Clarify Doxygen comments. Fix formatting. Update #4171.
-rw-r--r--cpukit/score/cpu/sparc/include/rtems/score/cpu.h21
-rw-r--r--cpukit/score/cpu/sparc/include/rtems/score/sparc.h41
2 files changed, 40 insertions, 22 deletions
diff --git a/cpukit/score/cpu/sparc/include/rtems/score/cpu.h b/cpukit/score/cpu/sparc/include/rtems/score/cpu.h
index e2604bb76f..8c5330b8ce 100644
--- a/cpukit/score/cpu/sparc/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc/include/rtems/score/cpu.h
@@ -692,27 +692,6 @@ extern const CPU_Trap_table_entry _CPU_Trap_slot_template;
#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER 511
/**
- * This is the bit step in a vector number to indicate it is being installed
- * as a synchronous trap.
- */
-#define SPARC_SYNCHRONOUS_TRAP_BIT_MASK 0x100
-
-/**
- * This macro indicates that @a _trap as an asynchronous trap.
- */
-#define SPARC_ASYNCHRONOUS_TRAP( _trap ) (_trap)
-
-/**
- * This macro indicates that @a _trap as a synchronous trap.
- */
-#define SPARC_SYNCHRONOUS_TRAP( _trap ) ((_trap) + 256 )
-
-/**
- * This macro returns the real hardware vector number associated with @a _trap.
- */
-#define SPARC_REAL_TRAP_NUMBER( _trap ) ((_trap) % 256)
-
-/**
* This is defined if the port has a special way to report the ISR nesting
* level. Most ports maintain the variable _ISR_Nest_level.
*/
diff --git a/cpukit/score/cpu/sparc/include/rtems/score/sparc.h b/cpukit/score/cpu/sparc/include/rtems/score/sparc.h
index db659cc1fa..f38e002422 100644
--- a/cpukit/score/cpu/sparc/include/rtems/score/sparc.h
+++ b/cpukit/score/cpu/sparc/include/rtems/score/sparc.h
@@ -167,6 +167,45 @@ extern "C" {
#define SPARC_SWTRAP_IRQDIS_FP 11
#endif
+/**
+ * @brief This is the bit step in a vector number to indicate it is being
+ * installed as a synchronous trap.
+ */
+#define SPARC_SYNCHRONOUS_TRAP_BIT_MASK 0x100
+
+/**
+ * @brief Maps the real hardware vector number to the associated asynchronous
+ * trap number.
+ *
+ * @param _vector is the real hardware vector number to map.
+ *
+ * @return Returns the asynchronous trap number associated with the real
+ * hardware vector number.
+ */
+#define SPARC_ASYNCHRONOUS_TRAP( _vector ) ( _vector )
+
+/**
+ * @brief Maps the real hardware vector number to the associated synchronous
+ * trap number.
+ *
+ * @param _vector is the real hardware vector number to map.
+ *
+ * @return Returns the synchronous trap number associated with the
+ * real hardware vector number.
+ */
+#define SPARC_SYNCHRONOUS_TRAP( _vector ) ( ( _vector ) + 256 )
+
+/**
+ * @brief Maps the synchronous or asynchronous trap number to the associated
+ * real hardware vector number.
+ *
+ * @param _trap is the synchronous or asynchronous trap number to map.
+ *
+ * @return Returns the real hardware vector number associated with the
+ * synchronous or asynchronous trap number.
+ */
+#define SPARC_REAL_TRAP_NUMBER( _trap ) ( ( _trap ) % 256 )
+
#ifndef ASM
/**
@@ -411,7 +450,7 @@ static inline uint32_t _LEON3_Get_current_processor( void )
return asr17 >> LEON3_ASR17_PROCESSOR_INDEX_SHIFT;
}
-#endif
+#endif /* ASM */
#ifdef __cplusplus
}