From 39993d6d7693b9fd26d729efd199cc605cd2ae65 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 7 May 2013 10:14:55 +0200 Subject: score: Add CPU context validation --- cpukit/score/cpu/no_cpu/rtems/score/cpu.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'cpukit/score/cpu/no_cpu/rtems/score/cpu.h') diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h index 8c4a61bbb4..6d72976d07 100644 --- a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h +++ b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h @@ -1294,6 +1294,37 @@ void _CPU_Context_restore_fp( Context_Control_fp **fp_context_ptr ); +/** + * @ingroup CPUContext + * + * @brief Clobbers all volatile registers with values derived from the pattern + * parameter. + * + * This function is used only in test sptests/spcontext01. + * + * @param[in] pattern Pattern used to generate distinct register values. + * + * @see _CPU_Context_validate(). + */ +void _CPU_Context_volatile_clobber( uintptr_t pattern ); + +/** + * @ingroup CPUContext + * + * @brief Initializes and validates the CPU context with values derived from + * the pattern parameter. + * + * This function will not return if the CPU context remains consistent. In + * case this function returns the CPU port is broken. + * + * This function is used only in test sptests/spcontext01. + * + * @param[in] pattern Pattern used to generate distinct register values. + * + * @see _CPU_Context_volatile_clobber(). + */ +void _CPU_Context_validate( uintptr_t pattern ); + /** * @brief The set of registers that specifies the complete processor state. * -- cgit v1.2.3