Patch for score, removing functions using virtualization sensitive
instructions.
diff --git a/cpukit/score/cpu/i386/Makefile.am b/cpukit/score/cpu/i386/Makefile.am
index e35a81c..dc33e93 100644
--- a/cpukit/score/cpu/i386/Makefile.am
+++ b/cpukit/score/cpu/i386/Makefile.am
@@ -7,7 +7,6 @@ include_rtems_scoredir = $(includedir)/rtems/score
include_rtems_score_HEADERS = rtems/score/cpu.h
include_rtems_score_HEADERS += rtems/score/i386.h
include_rtems_score_HEADERS += rtems/score/types.h
-include_rtems_score_HEADERS += rtems/score/interrupts.h
include_rtems_score_HEADERS += rtems/score/registers.h
include_rtems_score_HEADERS += rtems/score/idtr.h
include_rtems_score_HEADERS += rtems/score/cpuatomic.h
diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c
index c87a76d..87edd05 100644
--- a/cpukit/score/cpu/i386/cpu.c
+++ b/cpukit/score/cpu/i386/cpu.c
@@ -97,13 +97,6 @@ uint32_t _CPU_ISR_Get_level( void )
return level;
}
-void *_CPU_Thread_Idle_body( uintptr_t ignored )
-{
- while(1){
- __asm__ volatile ("hlt");
- }
- return NULL;
-}
struct Frame_ {
struct Frame_ *up;
diff --git a/cpukit/score/cpu/i386/preinstall.am b/cpukit/score/cpu/i386/preinstall.am
index f9faf87..4519686 100644
--- a/cpukit/score/cpu/i386/preinstall.am
+++ b/cpukit/score/cpu/i386/preinstall.am
@@ -39,10 +39,6 @@ $(PROJECT_INCLUDE)/rtems/score/types.h: rtems/score/types.h $(PROJECT_INCLUDE)/r
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/types.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/types.h
-$(PROJECT_INCLUDE)/rtems/score/interrupts.h: rtems/score/interrupts.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/interrupts.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/interrupts.h
-
$(PROJECT_INCLUDE)/rtems/score/registers.h: rtems/score/registers.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/registers.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/registers.h
diff --git a/cpukit/score/cpu/i386/rtems/score/cpu.h b/cpukit/score/cpu/i386/rtems/score/cpu.h
index 30a9a64..fe41688 100644
--- a/cpukit/score/cpu/i386/rtems/score/cpu.h
+++ b/cpukit/score/cpu/i386/rtems/score/cpu.h
@@ -29,9 +29,10 @@ extern "C" {
#include <rtems/score/types.h>
#include <rtems/score/i386.h>
-
+#include <libcpu/cpu-score-split.h>
+// TODO Fix includes for interrupts.h -- kept include structure in libcpu
#ifndef ASM
-#include <rtems/score/interrupts.h> /* formerly in libcpu/cpu.h> */
+#include <libcpu/interrupts.h> /* formerly in libcpu/cpu.h> */
#include <rtems/score/registers.h> /* formerly part of libcpu */
#endif
@@ -362,6 +363,7 @@ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context;
* + restore previous interrupt level (enable)
* + temporarily restore interrupts (flash)
* + set a particular level
+ * -> MOVED to libcpu/i386/
*/
#define _CPU_ISR_Disable( _level ) i386_disable_interrupts( _level )
@@ -370,12 +372,6 @@ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context;
#define _CPU_ISR_Flash( _level ) i386_flash_interrupts( _level )
-#define _CPU_ISR_Set_level( _new_level ) \
- { \
- if ( _new_level ) __asm__ volatile ( "cli" ); \
- else __asm__ volatile ( "sti" ); \
- }
-
uint32_t _CPU_ISR_Get_level( void );
/* Make sure interrupt stack has space for ISR
@@ -401,7 +397,7 @@ uint32_t _CPU_ISR_Get_level( void );
* + calculate the initial pointer into a FP context area
* + initialize an FP context area
*/
-
+//TODO evaluate if CPU_EFLAGS_INTERRUPTS_* must be moved to libcpu
#define CPU_EFLAGS_INTERRUPTS_ON 0x00003202
#define CPU_EFLAGS_INTERRUPTS_OFF 0x00003002
@@ -484,22 +480,6 @@ uint32_t _CPU_ISR_Get_level( void );
/* end of Context handler macros */
-/*
- * Fatal Error manager macros
- *
- * These macros perform the following functions:
- * + disable interrupts and halt the CPU
- */
-
-#define _CPU_Fatal_halt( _error ) \
- { \
- __asm__ volatile ( "cli ; \
- movl %0,%%eax ; \
- hlt" \
- : "=r" ((_error)) : "0" ((_error)) \
- ); \
- }
-
#endif /* ASM */
/* end of Fatal Error manager macros */
diff --git a/cpukit/score/cpu/i386/rtems/score/interrupts.h b/cpukit/score/cpu/i386/rtems/score/interrupts.h
deleted file mode 100644
index bed6330..0000000
--- a/cpukit/score/cpu/i386/rtems/score/interrupts.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * @file
- *
- * @brief Intel I386 Interrupt Macros
- *
- * Formerly contained in and extracted from libcpu/i386/cpu.h
- */
-
-/*
- * COPYRIGHT (c) 1998 [email protected]
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * Applications must not include this file directly.
- */
-
-#ifndef _RTEMS_SCORE_INTERRUPTS_H
-#define _RTEMS_SCORE_INTERRUPTS_H
-
-#ifndef ASM
-
-struct __rtems_raw_irq_connect_data__;
-
-typedef void (*rtems_raw_irq_hdl) (void);
-typedef void (*rtems_raw_irq_enable) (const struct __rtems_raw_irq_connect_data__*);
-typedef void (*rtems_raw_irq_disable) (const struct __rtems_raw_irq_connect_data__*);
-typedef int (*rtems_raw_irq_is_enabled) (const struct __rtems_raw_irq_connect_data__*);
-
-/**
- * @name Interrupt Level Macros
- *
- */
-/**@{**/
-
-#define i386_disable_interrupts( _level ) \
- { \
- __asm__ volatile ( "pushf ; \
- cli ; \
- pop %0" \
- : "=rm" ((_level)) \
- ); \
- }
-
-#define i386_enable_interrupts( _level ) \
- { \
- __asm__ volatile ( "push %0 ; \
- popf" \
- : : "rm" ((_level)) : "cc" \
- ); \
- }
-
-#define i386_flash_interrupts( _level ) \
- { \
- __asm__ volatile ( "push %0 ; \
- popf ; \
- cli" \
- : : "rm" ((_level)) : "cc" \
- ); \
- }
-
-#define i386_get_interrupt_level( _level ) \
- do { \
- register uint32_t _eflags; \
- \
- __asm__ volatile ( "pushf ; \
- pop %0" \
- : "=rm" ((_eflags)) \
- ); \
- \
- _level = (_eflags & EFLAGS_INTR_ENABLE) ? 0 : 1; \
- } while (0)
-
-#define _CPU_ISR_Disable( _level ) i386_disable_interrupts( _level )
-#define _CPU_ISR_Enable( _level ) i386_enable_interrupts( _level )
-
-/** @} */
-
-#endif
-#endif
_______________________________________________
rtems-devel mailing list
[email protected]
http://www.rtems.org/mailman/listinfo/rtems-devel