summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmaan Cheval <amaan.cheval@gmail.com>2018-03-13 21:44:13 +0530
committerJoel Sherrill <joel@rtems.org>2018-03-16 11:01:55 -0500
commite9fb313376b59bd8aa987ce6614db2753e8b28ca (patch)
tree229e7c60ee0551f559a8b51e49e38250003965ae
parentbsps/powerpc: Use shared linker command file (diff)
downloadrtems-e9fb313376b59bd8aa987ce6614db2753e8b28ca.tar.bz2
i386/smp: Define CPU_Interrupt_frame as non-void struct
This change, excluding the #error directive, lets us make progress towards compiling i386 targets with --enable-smp. The #error directive needs to be there since the CPU_Interrupt_frame is used by the SMP context switching code, and this placeholder struct, if used, would only lead to more subtle bugs and errors. With the directive, the SMP context switching code can be improved separately. Updates #3331
-rw-r--r--cpukit/score/cpu/i386/include/rtems/score/cpu.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/cpukit/score/cpu/i386/include/rtems/score/cpu.h b/cpukit/score/cpu/i386/include/rtems/score/cpu.h
index f009a17c16..311a781955 100644
--- a/cpukit/score/cpu/i386/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/i386/include/rtems/score/cpu.h
@@ -274,12 +274,26 @@ typedef void (*cpuExcHandlerType) (CPU_Exception_frame*);
extern cpuExcHandlerType _currentExcHandler;
extern void rtems_exception_init_mngt(void);
+#ifdef RTEMS_SMP
+ /* Throw compile-time error to indicate incomplete support */
+ #error "i386 targets do not support SMP.\
+ See: https://devel.rtems.org/ticket/3335"
+
+ /*
+ * This size must match the size of the CPU_Interrupt_frame, which must be
+ * used in the SMP context switch code, which is incomplete at the moment.
+ */
+ #define CPU_INTERRUPT_FRAME_SIZE 4
+#endif
+
/*
* This port does not pass any frame info to the
* interrupt handler.
*/
-typedef void CPU_Interrupt_frame;
+typedef struct {
+ uint32_t todo_replace_with_apt_registers;
+} CPU_Interrupt_frame;
typedef enum {
I386_EXCEPTION_DIVIDE_BY_ZERO = 0,