summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score/cpu/i386
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2002-07-22 09:46:48 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2002-07-22 09:46:48 +0000
commit2b3e9d9b244e279ef5693a7cf5dacc7903164af5 (patch)
tree955e5242d4d08a8ec747c8350f55003bb9d4b519 /c/src/exec/score/cpu/i386
parentRemove everything. (diff)
downloadrtems-2b3e9d9b244e279ef5693a7cf5dacc7903164af5.tar.bz2
Remove, moved to cpukit.
Diffstat (limited to 'c/src/exec/score/cpu/i386')
-rw-r--r--c/src/exec/score/cpu/i386/.cvsignore14
-rw-r--r--c/src/exec/score/cpu/i386/ChangeLog135
-rw-r--r--c/src/exec/score/cpu/i386/Makefile.am58
-rw-r--r--c/src/exec/score/cpu/i386/asm.h138
-rw-r--r--c/src/exec/score/cpu/i386/configure.ac30
-rw-r--r--c/src/exec/score/cpu/i386/cpu.c198
-rw-r--r--c/src/exec/score/cpu/i386/cpu_asm.S274
-rw-r--r--c/src/exec/score/cpu/i386/rtems/.cvsignore2
-rw-r--r--c/src/exec/score/cpu/i386/rtems/score/.cvsignore2
-rw-r--r--c/src/exec/score/cpu/i386/rtems/score/cpu.h513
-rw-r--r--c/src/exec/score/cpu/i386/rtems/score/i386.h244
-rw-r--r--c/src/exec/score/cpu/i386/rtems/score/idtr.h62
-rw-r--r--c/src/exec/score/cpu/i386/rtems/score/interrupts.h75
-rw-r--r--c/src/exec/score/cpu/i386/rtems/score/registers.h184
-rw-r--r--c/src/exec/score/cpu/i386/rtems/score/types.h57
15 files changed, 0 insertions, 1986 deletions
diff --git a/c/src/exec/score/cpu/i386/.cvsignore b/c/src/exec/score/cpu/i386/.cvsignore
deleted file mode 100644
index d29e5050f5..0000000000
--- a/c/src/exec/score/cpu/i386/.cvsignore
+++ /dev/null
@@ -1,14 +0,0 @@
-Makefile
-Makefile.in
-aclocal.m4
-autom4te.cache
-config.cache
-config.guess
-config.log
-config.status
-config.sub
-configure
-depcomp
-install-sh
-missing
-mkinstalldirs
diff --git a/c/src/exec/score/cpu/i386/ChangeLog b/c/src/exec/score/cpu/i386/ChangeLog
deleted file mode 100644
index 5ba423533b..0000000000
--- a/c/src/exec/score/cpu/i386/ChangeLog
+++ /dev/null
@@ -1,135 +0,0 @@
-2002-07-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * configure.ac: RTEMS_TOP(../../../..).
-
-2002-07-03 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * rtems.S: Remove.
- * Makefile.am: Reflect changes above.
-
-2002-07-01 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * configure.ac: Remove RTEMS_PROJECT_ROOT.
-
-2002-06-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * configure.ac: Add RTEMS_PROG_CCAS
-
-2002-06-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * configure.ac: Use AC_CONFIG_AUX_DIR(../../../..).
- Add AC_PROG_RANLIB.
-
-2002-06-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * Makefile.am: Include $(top_srcdir)/../../../automake/*.am.
- Use ../../../aclocal.
-
-2002-03-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * rtems/score/idtr.h: New file, extracted from libcpu/cpu.h.
- * rtems/score/interrupts.h: New file, extracted from libcpu/cpu.h.
- * rtems/score/registers.h: New file, moved from libcpu.
- * Makefile.am: Reflect changes above.
- * cpu.c: Don't include cpuModel.h,
- #include <rtems.h>,
- #include <rtems/score/i386types.h>,
- #include <rtems/score/idtr.h>.
- * rtems/score/cpu.h: Don't include libcpu/cpu.h.
- #include <rtems/score/interrupts.h>,
- #include <rtems/score/registers.h>.
-
-2001-04-03 Joel Sherrill <joel@OARcorp.com>
-
- * Per PR94, all rtems/score/CPUtypes.h are named rtems/score/types.h.
- * rtems/score/i386types.h: Removed.
- * rtems/score/types.h: New file via CVS magic.
- * Makefile.am, rtems/score/cpu.h: Account for name change.
-
-2002-03-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * configure.ac:
- AC_INIT(package,_RTEMS_VERSION,_RTEMS_BUGS).
- AM_INIT_AUTOMAKE([no-define foreign 1.6]).
- * Makefile.am: Remove AUTOMAKE_OPTIONS.
-
-2001-02-05 Joel Sherrill <joel@OARcorp.com>
-
- * rtems/Makefile.am, rtems/score/Makefile.am: Removed again.
-
-2002-01-31 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * rtems/Makefile.am: Removed.
- * rtems/score/Makefile.am: Removed.
- * configure.ac: Reflect changes above.
- * Makefile.am: Reflect changes above.
-
-2001-01-30 Joel Sherrill <joel@OARcorp.com>
-
- * Makefile.am: Corrected so .h files from rtems/score/ are installed.
-
-2002-01-03 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * cpu.c: Include rtems/bspIo.h instead of bspIo.h.
-
-2001-12-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * Makefile.am: Add multilib support.
-
-2001-11-28 Joel Sherrill <joel@OARcorp.com>,
-
- This was tracked as PR91.
- * rtems/score/cpu.h: Added CPU_PROVIDES_ISR_IS_IN_PROGRESS macro which
- is used to specify if the port uses the standard macro for this (FALSE).
- A TRUE setting indicates the port provides its own implementation.
-
-2001-10-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * .cvsignore: Add autom4te.cache for autoconf > 2.52.
- * configure.in: Remove.
- * configure.ac: New file, generated from configure.in by autoupdate.
-
-2001-09-23 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * rtems/score/Makefile.am: Use 'PREINSTALL_FILES ='.
- * Makefile.am: Use 'PREINSTALL_FILES ='.
-
-2001-02-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * Makefile.am, rtems/score/Makefile.am:
- Apply include_*HEADERS instead of H_FILES.
-
-2001-01-03 Joel Sherrill <joel@OARcorp.com>
-
- * rtems/score/cpu.h: Added _CPU_Initialize_vectors().
-
-2000-11-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * Makefile.am: Use ... instead of RTEMS_TOPdir in ACLOCAL_AMFLAGS.
-
-2000-11-02 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * Makefile.am: Switch to ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal.
-
-2000-10-25 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * Makefile.am: ACLOCAL_AMFLAGS= -I $(RTEMS_TOPdir)/macros.
- Switch to GNU canonicalization.
-
-2000-09-12 Joel Sherrill <joel@OARcorp.com>
-
- * rtems/score/i386.h: Corrected "#elsif" to be "#elif".
-
-2000-09-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * Makefile.am: Include compile.am.
-
-2000-08-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * rtems/score/i386.h: cpu-variant define handling
- Rewrite due to introduction of multilib defines.
- * asm.h: include cpuopts.h instead of targopts.h
-
-2000-08-10 Joel Sherrill <joel@OARcorp.com>
-
- * ChangeLog: New file.
diff --git a/c/src/exec/score/cpu/i386/Makefile.am b/c/src/exec/score/cpu/i386/Makefile.am
deleted file mode 100644
index efcc908a16..0000000000
--- a/c/src/exec/score/cpu/i386/Makefile.am
+++ /dev/null
@@ -1,58 +0,0 @@
-##
-## $Id$
-##
-
-ACLOCAL_AMFLAGS = -I ../../../aclocal
-
-include $(top_srcdir)/../../../automake/multilib.am
-include $(top_srcdir)/../../../automake/compile.am
-include $(top_srcdir)/../../../automake/lib.am
-
-$(PROJECT_INCLUDE)/%.h: %.h
- $(INSTALL_DATA) $< $@
-
-$(PROJECT_INCLUDE):
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/rtems:
- $(mkinstalldirs) $@
-
-$(PROJECT_INCLUDE)/rtems/score:
- $(mkinstalldirs) $@
-
-include_HEADERS= asm.h
-PREINSTALL_FILES = $(PROJECT_INCLUDE) $(include_HEADERS:%=$(PROJECT_INCLUDE)/%)
-
-include_rtems_scoredir = $(includedir)/rtems/score
-include_rtems_score_HEADERS = \
- rtems/score/cpu.h \
- rtems/score/i386.h \
- rtems/score/types.h \
- rtems/score/interrupts.h \
- rtems/score/registers.h \
- rtems/score/idtr.h
-
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score \
- $(include_rtems_score_HEADERS:%.h=$(PROJECT_INCLUDE)/%.h)
-
-REL = $(ARCH)/rtems-cpu.rel
-
-C_FILES = cpu.c
-C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
-
-S_FILES = cpu_asm.S
-S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.o)
-
-rtems_cpu_rel_OBJECTS = $(C_O_FILES) $(S_O_FILES)
-
-$(REL): $(rtems_cpu_rel_OBJECTS)
- $(make-rel)
-
-all-local: $(ARCH) $(PREINSTALL_FILES) $(rtems_cpu_rel_OBJECTS) $(REL) \
- $(TMPINSTALL_FILES)
-
-.PRECIOUS: $(REL)
-
-EXTRA_DIST = cpu.c cpu_asm.S
-
-include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/exec/score/cpu/i386/asm.h b/c/src/exec/score/cpu/i386/asm.h
deleted file mode 100644
index f1981791a3..0000000000
--- a/c/src/exec/score/cpu/i386/asm.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/* asm.h
- *
- * This include file attempts to address the problems
- * caused by incompatible flavors of assemblers and
- * toolsets. It primarily addresses variations in the
- * use of leading underscores on symbols and the requirement
- * that register names be preceded by a %.
- *
- *
- * NOTE: The spacing in the use of these macros
- * is critical to them working as advertised.
- *
- * COPYRIGHT:
- *
- * This file is based on similar code found in newlib available
- * from ftp.cygnus.com. The file which was used had no copyright
- * notice. This file is freely distributable as long as the source
- * of the file is noted. This file is:
- *
- * COPYRIGHT (c) 1994-1997.
- * On-Line Applications Research Corporation (OAR).
- *
- * $Id$
- */
-
-#ifndef __i386_ASM_h
-#define __i386_ASM_h
-
-/*
- * Indicate we are in an assembly file and get the basic CPU definitions.
- */
-
-#ifndef ASM
-#define ASM
-#endif
-#include <rtems/score/cpuopts.h>
-#include <rtems/score/i386.h>
-
-/*
- * Recent versions of GNU cpp define variables which indicate the
- * need for underscores and percents. If not using GNU cpp or
- * the version does not support this, then you will obviously
- * have to define these as appropriate.
- */
-
-/*
- * Looks like there is a bug in gcc 2.6.2 where this is not
- * defined correctly when configured as i386-coff and
- * i386-aout.
- */
-
-#undef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__ %
-
-/*
-#ifndef __REGISTER_PREFIX__
-#define __REGISTER_PREFIX__
-#endif
-*/
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
-
-#define eax REG (eax)
-#define ebx REG (ebx)
-#define ecx REG (ecx)
-#define edx REG (edx)
-#define esi REG (esi)
-#define edi REG (edi)
-#define esp REG (esp)
-#define ebp REG (ebp)
-#define cr0 REG (cr0)
-
-#define ax REG (ax)
-#define bx REG (bx)
-#define cx REG (cx)
-#define dx REG (dx)
-#define si REG (si)
-#define di REG (di)
-#define sp REG (sp)
-#define bp REG (bp)
-
-#define ah REG (ah)
-#define bh REG (bh)
-#define ch REG (ch)
-#define dh REG (dh)
-
-#define al REG (al)
-#define bl REG (bl)
-#define cl REG (cl)
-#define dl REG (dl)
-
-#define cs REG (cs)
-#define ds REG (ds)
-#define es REG (es)
-#define fs REG (fs)
-#define gs REG (gs)
-#define ss REG (ss)
-
-/*
- * Define macros to handle section beginning and ends.
- */
-
-
-#define BEGIN_CODE_DCL .text
-#define END_CODE_DCL
-#define BEGIN_DATA_DCL .data
-#define END_DATA_DCL
-#define BEGIN_CODE .text
-#define END_CODE
-#define BEGIN_DATA .data
-#define END_DATA
-#define BEGIN_BSS .bss
-#define END_BSS
-#define END
-
-/*
- * Following must be tailor for a particular flavor of the C compiler.
- * They may need to put underscores in front of the symbols.
- */
-
-#define PUBLIC(sym) .globl SYM (sym)
-#define EXTERN(sym) .globl SYM (sym)
-
-#endif
-/* end of include file */
-
-
diff --git a/c/src/exec/score/cpu/i386/configure.ac b/c/src/exec/score/cpu/i386/configure.ac
deleted file mode 100644
index ce9ddef33e..0000000000
--- a/c/src/exec/score/cpu/i386/configure.ac
+++ /dev/null
@@ -1,30 +0,0 @@
-## Process this file with autoconf to produce a configure script.
-##
-## $Id$
-
-AC_PREREQ(2.52)
-AC_INIT([rtems-c-src-exec-score-cpu-i386],[_RTEMS_VERSION],[rtems-bugs@OARcorp.com])
-AC_CONFIG_SRCDIR([cpu_asm.S])
-RTEMS_TOP(../../../..)
-AC_CONFIG_AUX_DIR(../../../..)
-
-RTEMS_CANONICAL_TARGET_CPU
-
-AM_INIT_AUTOMAKE([no-define foreign 1.6])
-AM_MAINTAINER_MODE
-
-RTEMS_ENV_RTEMSCPU
-
-RTEMS_CHECK_CPU
-RTEMS_CANONICAL_HOST
-
-RTEMS_PROG_CC_FOR_TARGET
-RTEMS_PROG_CCAS
-RTEMS_CANONICALIZE_TOOLS
-AC_PROG_RANLIB
-
-RTEMS_CHECK_NEWLIB
-
-# Explicitly list all Makefiles here
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/c/src/exec/score/cpu/i386/cpu.c b/c/src/exec/score/cpu/i386/cpu.c
deleted file mode 100644
index b55be879ab..0000000000
--- a/c/src/exec/score/cpu/i386/cpu.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Intel i386 Dependent Source
- *
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <rtems.h>
-#include <rtems/system.h>
-#include <rtems/score/types.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/idtr.h>
-
-#include <rtems/bspIo.h>
-#include <rtems/score/thread.h>
-
-/* _CPU_Initialize
- *
- * This routine performs processor dependent initialization.
- *
- * INPUT PARAMETERS:
- * cpu_table - CPU table to initialize
- * thread_dispatch - address of disptaching routine
- */
-
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch) /* ignored on this CPU */
-)
-{
-#if CPU_HARDWARE_FP
- register unsigned16 fp_status asm ("ax");
- register void *fp_context;
-#endif
-
- _CPU_Table = *cpu_table;
-
- /*
- * The following code saves a NULL i387 context which is given
- * to each task at start and restart time. The following code
- * is based upon that provided in the i386 Programmer's
- * Manual and should work on any coprocessor greater than
- * the i80287.
- *
- * NOTE: The NO WAIT form of the coprocessor instructions
- * MUST be used in case there is not a coprocessor
- * to wait for.
- */
-
-#if CPU_HARDWARE_FP
- fp_status = 0xa5a5;
- asm volatile( "fninit" );
- asm volatile( "fnstsw %0" : "=a" (fp_status) : "0" (fp_status) );
-
- if ( fp_status == 0 ) {
-
- fp_context = &_CPU_Null_fp_context;
-
- asm volatile( "fsave (%0)" : "=r" (fp_context)
- : "0" (fp_context)
- );
- }
-#endif
-
-}
-
-/*PAGE
- *
- * _CPU_ISR_Get_level
- */
-
-unsigned32 _CPU_ISR_Get_level( void )
-{
- unsigned32 level;
-
- i386_get_interrupt_level( level );
-
- return level;
-}
-
-void _CPU_Thread_Idle_body ()
-{
- while(1){
- asm volatile ("hlt");
- }
-}
-
-void _defaultExcHandler (CPU_Exception_frame *ctx)
-{
- unsigned int faultAddr = 0;
- printk("----------------------------------------------------------\n");
- printk("Exception %d caught at PC %x by thread %d\n",
- ctx->idtIndex,
- ctx->eip,
- _Thread_Executing->Object.id);
- printk("----------------------------------------------------------\n");
- printk("Processor execution context at time of the fault was :\n");
- printk("----------------------------------------------------------\n");
- printk(" EAX = %x EBX = %x ECX = %x EDX = %x\n",
- ctx->eax, ctx->ebx, ctx->ecx, ctx->edx);
- printk(" ESI = %x EDI = %x EBP = %x ESP = %x\n",
- ctx->esi, ctx->edi, ctx->ebp, ctx->esp0);
- printk("----------------------------------------------------------\n");
- printk("Error code pushed by processor itself (if not 0) = %x\n",
- ctx->faultCode);
- printk("----------------------------------------------------------\n");
- if (ctx->idtIndex == I386_EXCEPTION_PAGE_FAULT){
- faultAddr = i386_get_cr2();
- printk("Page fault linear address (CR2) = %x\n", faultAddr);
- printk("----------------------------------------------------------\n\n");
- }
- if (_ISR_Nest_level > 0) {
- /*
- * In this case we shall not delete the task interrupted as
- * it has nothing to do with the fault. We cannot return either
- * because the eip points to the faulty instruction so...
- */
- printk("Exception while executing ISR!!!. System locked\n");
- _CPU_Fatal_halt(faultAddr);
- }
- else {
- /*
- * OK I could probably use a simplified version but at least this
- * should work.
- */
- printk(" ************ FAULTY THREAD WILL BE DELETED **************\n");
- rtems_task_delete(_Thread_Executing->Object.id);
- }
-}
-
-cpuExcHandlerType _currentExcHandler = _defaultExcHandler;
-
-extern void rtems_exception_prologue_0();
-extern void rtems_exception_prologue_1();
-extern void rtems_exception_prologue_2();
-extern void rtems_exception_prologue_3();
-extern void rtems_exception_prologue_4();
-extern void rtems_exception_prologue_5();
-extern void rtems_exception_prologue_6();
-extern void rtems_exception_prologue_7();
-extern void rtems_exception_prologue_8();
-extern void rtems_exception_prologue_9();
-extern void rtems_exception_prologue_10();
-extern void rtems_exception_prologue_11();
-extern void rtems_exception_prologue_12();
-extern void rtems_exception_prologue_13();
-extern void rtems_exception_prologue_14();
-extern void rtems_exception_prologue_16();
-extern void rtems_exception_prologue_17();
-extern void rtems_exception_prologue_18();
-
-static rtems_raw_irq_hdl tbl[] = {
- rtems_exception_prologue_0,
- rtems_exception_prologue_1,
- rtems_exception_prologue_2,
- rtems_exception_prologue_3,
- rtems_exception_prologue_4,
- rtems_exception_prologue_5,
- rtems_exception_prologue_6,
- rtems_exception_prologue_7,
- rtems_exception_prologue_8,
- rtems_exception_prologue_9,
- rtems_exception_prologue_10,
- rtems_exception_prologue_11,
- rtems_exception_prologue_12,
- rtems_exception_prologue_13,
- rtems_exception_prologue_14,
- rtems_exception_prologue_16,
- rtems_exception_prologue_17,
- rtems_exception_prologue_18,
-};
-
-void rtems_exception_init_mngt()
-{
- unsigned int i,j;
- interrupt_gate_descriptor *currentIdtEntry;
- unsigned limit;
- unsigned level;
-
- i = sizeof(tbl) / sizeof (rtems_raw_irq_hdl);
-
- i386_get_info_from_IDTR (&currentIdtEntry, &limit);
-
- _CPU_ISR_Disable(level);
- for (j = 0; j < i; j++) {
- create_interrupt_gate_descriptor (&currentIdtEntry[j], tbl[j]);
- }
- _CPU_ISR_Enable(level);
-}
-
diff --git a/c/src/exec/score/cpu/i386/cpu_asm.S b/c/src/exec/score/cpu/i386/cpu_asm.S
deleted file mode 100644
index 85316e357a..0000000000
--- a/c/src/exec/score/cpu/i386/cpu_asm.S
+++ /dev/null
@@ -1,274 +0,0 @@
-/* cpu_asm.s
- *
- * This file contains all assembly code for the Intel i386 implementation
- * of RTEMS.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#include <asm.h>
-
-/*
- * Format of i386 Register structure
- */
-
-.set REG_EFLAGS, 0
-.set REG_ESP, REG_EFLAGS + 4
-.set REG_EBP, REG_ESP + 4
-.set REG_EBX, REG_EBP + 4
-.set REG_ESI, REG_EBX + 4
-.set REG_EDI, REG_ESI + 4
-.set SIZE_REGS, REG_EDI + 4
-
- BEGIN_CODE
-
-/*
- * void _CPU_Context_switch( run_context, heir_context )
- *
- * This routine performs a normal non-FP context.
- */
-
- .p2align 1
- PUBLIC (_CPU_Context_switch)
-
-.set RUNCONTEXT_ARG, 4 # save context argument
-.set HEIRCONTEXT_ARG, 8 # restore context argument
-
-SYM (_CPU_Context_switch):
- movl RUNCONTEXT_ARG(esp),eax # eax = running threads context
- pushf # push eflags
- popl REG_EFLAGS(eax) # save eflags
- movl esp,REG_ESP(eax) # save stack pointer
- movl ebp,REG_EBP(eax) # save base pointer
- movl ebx,REG_EBX(eax) # save ebx
- movl esi,REG_ESI(eax) # save source register
- movl edi,REG_EDI(eax) # save destination register
-
- movl HEIRCONTEXT_ARG(esp),eax # eax = heir threads context
-
-restore:
- pushl REG_EFLAGS(eax) # push eflags
- popf # restore eflags
- movl REG_ESP(eax),esp # restore stack pointer
- movl REG_EBP(eax),ebp # restore base pointer
- movl REG_EBX(eax),ebx # restore ebx
- movl REG_ESI(eax),esi # restore source register
- movl REG_EDI(eax),edi # restore destination register
- ret
-
-/*
- * NOTE: May be unnecessary to reload some registers.
- */
-
-/*
- * void _CPU_Context_restore( new_context )
- *
- * This routine performs a normal non-FP context.
- */
-
- PUBLIC (_CPU_Context_restore)
-
-.set NEWCONTEXT_ARG, 4 # context to restore argument
-
-SYM (_CPU_Context_restore):
-
- movl NEWCONTEXT_ARG(esp),eax # eax = running threads context
- jmp restore
-
-/*PAGE
- * void _CPU_Context_save_fp_context( &fp_context_ptr )
- * void _CPU_Context_restore_fp_context( &fp_context_ptr )
- *
- * This section is used to context switch an i80287, i80387,
- * the built-in coprocessor or the i80486 or compatible.
- */
-
-.set FPCONTEXT_ARG, 4 # FP context argument
-
- .p2align 1
- PUBLIC (_CPU_Context_save_fp)
-SYM (_CPU_Context_save_fp):
- movl FPCONTEXT_ARG(esp),eax # eax = &ptr to FP context area
- movl (eax),eax # eax = FP context area
- fsave (eax) # save FP context
- ret
-
- .p2align 1
- PUBLIC (_CPU_Context_restore_fp)
-SYM (_CPU_Context_restore_fp):
- movl FPCONTEXT_ARG(esp),eax # eax = &ptr to FP context area
- movl (eax),eax # eax = FP context area
- frstor (eax) # restore FP context
- ret
-
- PUBLIC (_Exception_Handler)
-SYM (_Exception_Handler):
- pusha # Push general purpose registers
- pushl esp # Push exception frame address
- movl _currentExcHandler, eax # Call function storead in _currentExcHandler
- call * eax
- addl $4, esp
- popa # restore general purpose registers
- addl $8, esp # skill vector number and faultCode
- iret
-
-#define DISTINCT_EXCEPTION_WITH_FAULTCODE_ENTRY(_vector) \
- .p2align 4 ; \
- PUBLIC (rtems_exception_prologue_ ## _vector ) ; \
-SYM (rtems_exception_prologue_ ## _vector ): \
- pushl $ _vector ; \
- jmp SYM (_Exception_Handler) ;
-
-#define DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY(_vector) \
- .p2align 4 ; \
- PUBLIC (rtems_exception_prologue_ ## _vector ) ; \
-SYM (rtems_exception_prologue_ ## _vector ): \
- pushl $ 0 ; \
- pushl $ _vector ; \
- jmp SYM (_Exception_Handler) ;
-
-/*
- * Divide Error
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (0)
-/*
- * Debug Exception
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (1)
-/*
- * NMI
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (2)
-/*
- * Breakpoint
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (3)
-/*
- * Overflow
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (4)
-/*
- * Bound Range Exceeded
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (5)
-/*
- * Invalid Opcode
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (6)
-/*
- * No Math Coproc
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (7)
-/*
- * Double Fault
- */
-DISTINCT_EXCEPTION_WITH_FAULTCODE_ENTRY (8)
-/*
- * Coprocessor segment overrun
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (9)
-/*
- * Invalid TSS
- */
-DISTINCT_EXCEPTION_WITH_FAULTCODE_ENTRY (10)
-/*
- * Segment Not Present
- */
-DISTINCT_EXCEPTION_WITH_FAULTCODE_ENTRY (11)
-/*
- * Stack segment Fault
- */
-DISTINCT_EXCEPTION_WITH_FAULTCODE_ENTRY (12)
-/*
- * General Protection Fault
- */
-DISTINCT_EXCEPTION_WITH_FAULTCODE_ENTRY (13)
-/*
- * Page Fault
- */
-DISTINCT_EXCEPTION_WITH_FAULTCODE_ENTRY (14)
-/*
- * Floating point error (NB 15 is reserved it is therefor skipped)
- */
-DISTINCT_EXCEPTION_WITHOUT_FAULTCODE_ENTRY (16)
-/*
- * Aligment Check
- */
-DISTINCT_EXCEPTION_WITH_FAULTCODE_ENTRY (17)
-/*
- * Machine Check
- */
-DISTINCT_EXCEPTION_WITH_FAULTCODE_ENTRY (18)
-
-
-/*
- * void *i386_Logical_to_physical(
- * rtems_unsigned16 segment,
- * void *address
- * );
- *
- * Returns thirty-two bit physical address for segment:address.
- */
-
-.set SEGMENT_ARG, 4
-.set ADDRESS_ARG, 8
-
- PUBLIC (i386_Logical_to_physical)
-
-SYM (i386_Logical_to_physical):
-
- xorl eax,eax # clear eax
- movzwl SEGMENT_ARG(esp),ecx # ecx = segment value
- movl $ SYM (_Global_descriptor_table),edx
- # edx = address of our GDT
- addl ecx,edx # edx = address of desired entry
- movb 7(edx),ah # ah = base 31:24
- movb 4(edx),al # al = base 23:16
- shll $16,eax # move ax into correct bits
- movw 2(edx),ax # ax = base 0:15
- movl ADDRESS_ARG(esp),ecx # ecx = address to convert
- addl eax,ecx # ecx = physical address equivalent
- movl ecx,eax # eax = ecx
- ret
-
-/*
- * void *i386_Physical_to_logical(
- * rtems_unsigned16 segment,
- * void *address
- * );
- *
- * Returns thirty-two bit physical address for segment:address.
- */
-
-/*
- *.set SEGMENT_ARG, 4
- *.set ADDRESS_ARG, 8 -- use sets from above
- */
-
- PUBLIC (i386_Physical_to_logical)
-
-SYM (i386_Physical_to_logical):
- xorl eax,eax # clear eax
- movzwl SEGMENT_ARG(esp),ecx # ecx = segment value
- movl $ SYM (_Global_descriptor_table),edx
- # edx = address of our GDT
- addl ecx,edx # edx = address of desired entry
- movb 7(edx),ah # ah = base 31:24
- movb 4(edx),al # al = base 23:16
- shll $16,eax # move ax into correct bits
- movw 2(edx),ax # ax = base 0:15
- movl ADDRESS_ARG(esp),ecx # ecx = address to convert
- subl eax,ecx # ecx = logical address equivalent
- movl ecx,eax # eax = ecx
- ret
-
-END_CODE
-
-END
diff --git a/c/src/exec/score/cpu/i386/rtems/.cvsignore b/c/src/exec/score/cpu/i386/rtems/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/c/src/exec/score/cpu/i386/rtems/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/c/src/exec/score/cpu/i386/rtems/score/.cvsignore b/c/src/exec/score/cpu/i386/rtems/score/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/c/src/exec/score/cpu/i386/rtems/score/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/c/src/exec/score/cpu/i386/rtems/score/cpu.h b/c/src/exec/score/cpu/i386/rtems/score/cpu.h
deleted file mode 100644
index a6ea2c7628..0000000000
--- a/c/src/exec/score/cpu/i386/rtems/score/cpu.h
+++ /dev/null
@@ -1,513 +0,0 @@
-/* cpu.h
- *
- * This include file contains information pertaining to the Intel
- * i386 processor.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __CPU_h
-#define __CPU_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/i386.h> /* pick up machine definitions */
-
-#ifndef ASM
-#include <rtems/score/types.h>
-#include <rtems/score/interrupts.h> /* formerly in libcpu/cpu.h> */
-#include <rtems/score/registers.h> /* formerly part of libcpu */
-#endif
-
-/* conditional compilation parameters */
-
-#define CPU_INLINE_ENABLE_DISPATCH TRUE
-#define CPU_UNROLL_ENQUEUE_PRIORITY FALSE
-
-/*
- * i386 has an RTEMS allocated and managed interrupt stack.
- */
-
-#define CPU_HAS_SOFTWARE_INTERRUPT_STACK TRUE
-#define CPU_HAS_HARDWARE_INTERRUPT_STACK FALSE
-#define CPU_ALLOCATE_INTERRUPT_STACK TRUE
-
-/*
- * Does the RTEMS invoke the user's ISR with the vector number and
- * a pointer to the saved interrupt frame (1) or just the vector
- * number (0)?
- */
-
-#define CPU_ISR_PASSES_FRAME_POINTER 0
-
-/*
- * Some family members have no FP, some have an FPU such as the i387
- * for the i386, others have it built in (i486DX, Pentium).
- */
-
-#if ( I386_HAS_FPU == 1 )
-#define CPU_HARDWARE_FP TRUE /* i387 for i386 */
-#else
-#define CPU_HARDWARE_FP FALSE
-#endif
-#define CPU_SOFTWARE_FP FALSE
-
-#define CPU_ALL_TASKS_ARE_FP FALSE
-#define CPU_IDLE_TASK_IS_FP FALSE
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-
-#define CPU_STACK_GROWS_UP FALSE
-#define CPU_STRUCTURE_ALIGNMENT
-
-/*
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine _CPU_Thread_Idle_body
- * must be provided and is the default IDLE thread body instead of
- * _CPU_Thread_Idle_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- */
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
-
-/*
- * Define what is required to specify how the network to host conversion
- * routines are handled.
- */
-
-#define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
-#define CPU_BIG_ENDIAN FALSE
-#define CPU_LITTLE_ENDIAN TRUE
-
-/* structures */
-
-/*
- * Basic integer context for the i386 family.
- */
-
-typedef struct {
- unsigned32 eflags; /* extended flags register */
- void *esp; /* extended stack pointer register */
- void *ebp; /* extended base pointer register */
- unsigned32 ebx; /* extended bx register */
- unsigned32 esi; /* extended source index register */
- unsigned32 edi; /* extended destination index flags register */
-} Context_Control;
-
-/*
- * FP context save area for the i387 numeric coprocessors.
- */
-
-typedef struct {
- unsigned8 fp_save_area[108]; /* context size area for I80387 */
- /* 28 bytes for environment */
-} Context_Control_fp;
-
-
-/*
- * The following structure defines the set of information saved
- * on the current stack by RTEMS upon receipt of execptions.
- *
- * idtIndex is either the interrupt number or the trap/exception number.
- * faultCode is the code pushed by the processor on some exceptions.
- */
-
-typedef struct {
- unsigned32 edi;
- unsigned32 esi;
- unsigned32 ebp;
- unsigned32 esp0;
- unsigned32 ebx;
- unsigned32 edx;
- unsigned32 ecx;
- unsigned32 eax;
- unsigned32 idtIndex;
- unsigned32 faultCode;
- unsigned32 eip;
- unsigned32 cs;
- unsigned32 eflags;
-} CPU_Exception_frame;
-
-typedef void (*cpuExcHandlerType) (CPU_Exception_frame*);
-extern cpuExcHandlerType _currentExcHandler;
-extern void rtems_exception_init_mngt();
-
-/*
- * The following structure defines the set of information saved
- * on the current stack by RTEMS upon receipt of each interrupt
- * that will lead to re-enter the kernel to signal the thread.
- */
-
-typedef CPU_Exception_frame CPU_Interrupt_frame;
-
-typedef enum {
- I386_EXCEPTION_DIVIDE_BY_ZERO = 0,
- I386_EXCEPTION_DEBUG = 1,
- I386_EXCEPTION_NMI = 2,
- I386_EXCEPTION_BREAKPOINT = 3,
- I386_EXCEPTION_OVERFLOW = 4,
- I386_EXCEPTION_BOUND = 5,
- I386_EXCEPTION_ILLEGAL_INSTR = 6,
- I386_EXCEPTION_MATH_COPROC_UNAVAIL = 7,
- I386_EXCEPTION_DOUBLE_FAULT = 8,
- I386_EXCEPTION_I386_COPROC_SEG_ERR = 9,
- I386_EXCEPTION_INVALID_TSS = 10,
- I386_EXCEPTION_SEGMENT_NOT_PRESENT = 11,
- I386_EXCEPTION_STACK_SEGMENT_FAULT = 12,
- I386_EXCEPTION_GENERAL_PROT_ERR = 13,
- I386_EXCEPTION_PAGE_FAULT = 14,
- I386_EXCEPTION_INTEL_RES15 = 15,
- I386_EXCEPTION_FLOAT_ERROR = 16,
- I386_EXCEPTION_ALIGN_CHECK = 17,
- I386_EXCEPTION_MACHINE_CHECK = 18,
- I386_EXCEPTION_ENTER_RDBG = 50 /* to enter manually RDBG */
-
-} Intel_symbolic_exception_name;
-
-
-/*
- * The following table contains the information required to configure
- * the i386 specific parameters.
- */
-
-typedef struct {
- void (*pretasking_hook)( void );
- void (*predriver_hook)( void );
- void (*postdriver_hook)( void );
- void (*idle_task)( void );
- boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
- void (*stack_free_hook)( void* );
- /* end of fields required on all CPUs */
-
- unsigned32 interrupt_table_segment;
- void *interrupt_table_offset;
-} rtems_cpu_table;
-
-/*
- * Macros to access required entires in the CPU Table are in
- * the file rtems/system.h.
- */
-
-/*
- * Macros to access i386 specific additions to the CPU Table
- */
-
-#define rtems_cpu_configuration_get_interrupt_table_segment() \
- (_CPU_Table.interrupt_table_segment)
-
-#define rtems_cpu_configuration_get_interrupt_table_offset() \
- (_CPU_Table.interrupt_table_offset)
-
-/*
- * context size area for floating point
- *
- * NOTE: This is out of place on the i386 to avoid a forward reference.
- */
-
-#define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp )
-
-/* variables */
-
-SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context;
-SCORE_EXTERN void *_CPU_Interrupt_stack_low;
-SCORE_EXTERN void *_CPU_Interrupt_stack_high;
-
-/* constants */
-
-/*
- * This defines the number of levels and the mask used to pick those
- * bits out of a thread mode.
- */
-
-#define CPU_MODES_INTERRUPT_LEVEL 0x00000001 /* interrupt level in mode */
-#define CPU_MODES_INTERRUPT_MASK 0x00000001 /* interrupt level in mode */
-
-/*
- * extra stack required by the MPCI receive server thread
- */
-
-#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 1024
-
-/*
- * i386 family supports 256 distinct vectors.
- */
-
-#define CPU_INTERRUPT_NUMBER_OF_VECTORS 256
-#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (CPU_INTERRUPT_NUMBER_OF_VECTORS - 1)
-
-/*
- * This is defined if the port has a special way to report the ISR nesting
- * level. Most ports maintain the variable _ISR_Nest_level.
- */
-
-#define CPU_PROVIDES_ISR_IS_IN_PROGRESS FALSE
-
-/*
- * Minimum size of a thread's stack.
- */
-
-#define CPU_STACK_MINIMUM_SIZE 1024
-
-/*
- * i386 is pretty tolerant of alignment. Just put things on 4 byte boundaries.
- */
-
-#define CPU_ALIGNMENT 4
-#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
-#define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT
-
-/*
- * On i386 thread stacks require no further alignment after allocation
- * from the Workspace.
- */
-
-#define CPU_STACK_ALIGNMENT 0
-
-/* macros */
-
-/*
- * ISR handler macros
- *
- * These macros perform the following functions:
- * + initialize the RTEMS vector table
- * + disable all maskable CPU interrupts
- * + restore previous interrupt level (enable)
- * + temporarily restore interrupts (flash)
- * + set a particular level
- */
-
-#define _CPU_Initialize_vectors()
-
-#define _CPU_ISR_Disable( _level ) i386_disable_interrupts( _level )
-
-#define _CPU_ISR_Enable( _level ) i386_enable_interrupts( _level )
-
-#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" ); \
- }
-
-unsigned32 _CPU_ISR_Get_level( void );
-
-/* end of ISR handler macros */
-
-/*
- * Context handler macros
- *
- * These macros perform the following functions:
- * + initialize a context area
- * + restart the current thread
- * + calculate the initial pointer into a FP context area
- * + initialize an FP context area
- */
-
-#define CPU_EFLAGS_INTERRUPTS_ON 0x00003202
-#define CPU_EFLAGS_INTERRUPTS_OFF 0x00003002
-
-#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \
- _isr, _entry_point, _is_fp ) \
- do { \
- unsigned32 _stack; \
- \
- if ( (_isr) ) (_the_context)->eflags = CPU_EFLAGS_INTERRUPTS_OFF; \
- else (_the_context)->eflags = CPU_EFLAGS_INTERRUPTS_ON; \
- \
- _stack = ((unsigned32)(_stack_base)) + (_size) - 4; \
- \
- *((proc_ptr *)(_stack)) = (_entry_point); \
- (_the_context)->ebp = (void *) _stack; \
- (_the_context)->esp = (void *) _stack; \
- } while (0)
-
-#define _CPU_Context_Restart_self( _the_context ) \
- _CPU_Context_restore( (_the_context) );
-
-#define _CPU_Context_Fp_start( _base, _offset ) \
- ( (void *) _Addresses_Add_offset( (_base), (_offset) ) )
-
-#define _CPU_Context_Initialize_fp( _fp_area ) \
- { \
- unsigned32 *_source = (unsigned32 *) &_CPU_Null_fp_context; \
- unsigned32 *_destination = *(_fp_area); \
- unsigned32 _index; \
- \
- for ( _index=0 ; _index < CPU_CONTEXT_FP_SIZE/4 ; _index++ ) \
- *_destination++ = *_source++; \
- }
-
-/* 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)) \
- ); \
- }
-
-/* end of Fatal Error manager macros */
-
-/*
- * Bitfield handler macros
- *
- * These macros perform the following functions:
- * + scan for the highest numbered (MSB) set in a 16 bit bitfield
- */
-
-#define CPU_USE_GENERIC_BITFIELD_CODE FALSE
-#define CPU_USE_GENERIC_BITFIELD_DATA FALSE
-
-#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
- { \
- register unsigned16 __value_in_register = (_value); \
- \
- _output = 0; \
- \
- asm volatile ( "bsfw %0,%1 " \
- : "=r" (__value_in_register), "=r" (_output) \
- : "0" (__value_in_register), "1" (_output) \
- ); \
- }
-
-/* end of Bitfield handler macros */
-
-/*
- * Priority handler macros
- *
- * These macros perform the following functions:
- * + return a mask with the bit for this major/minor portion of
- * of thread priority set.
- * + translate the bit number returned by "Bitfield_find_first_bit"
- * into an index into the thread ready chain bit maps
- */
-
-#define _CPU_Priority_Mask( _bit_number ) \
- ( 1 << (_bit_number) )
-
-#define _CPU_Priority_bits_index( _priority ) \
- (_priority)
-
-/* functions */
-
-/*
- * _CPU_Initialize
- *
- * This routine performs CPU dependent initialization.
- */
-
-void _CPU_Initialize(
- rtems_cpu_table *cpu_table,
- void (*thread_dispatch)
-);
-
-/*
- * _CPU_ISR_install_raw_handler
- *
- * This routine installs a "raw" interrupt handler directly into the
- * processor's vector table.
- */
-
-void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_ISR_install_vector
- *
- * This routine installs an interrupt vector.
- */
-
-void _CPU_ISR_install_vector(
- unsigned32 vector,
- proc_ptr new_handler,
- proc_ptr *old_handler
-);
-
-/*
- * _CPU_Thread_Idle_body
- *
- * Use the halt instruction of low power mode of a particular i386 model.
- */
-
-#if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
-
-void _CPU_Thread_Idle_body( void );
-
-#endif /* CPU_PROVIDES_IDLE_THREAD_BODY */
-
-/*
- * _CPU_Context_switch
- *
- * This routine switches from the run context to the heir context.
- */
-
-void _CPU_Context_switch(
- Context_Control *run,
- Context_Control *heir
-);
-
-/*
- * _CPU_Context_restore
- *
- * This routine is generally used only to restart self in an
- * efficient manner and avoid stack conflicts.
- */
-
-void _CPU_Context_restore(
- Context_Control *new_context
-);
-
-/*
- * _CPU_Context_save_fp
- *
- * This routine saves the floating point context passed to it.
- */
-
-void _CPU_Context_save_fp(
- void **fp_context_ptr
-);
-
-/*
- * _CPU_Context_restore_fp
- *
- * This routine restores the floating point context passed to it.
- */
-
-void _CPU_Context_restore_fp(
- void **fp_context_ptr
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/score/cpu/i386/rtems/score/i386.h b/c/src/exec/score/cpu/i386/rtems/score/i386.h
deleted file mode 100644
index 9d317f7843..0000000000
--- a/c/src/exec/score/cpu/i386/rtems/score/i386.h
+++ /dev/null
@@ -1,244 +0,0 @@
-/* i386.h
- *
- * This include file contains information pertaining to the Intel
- * i386 processor.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __i386_h
-#define __i386_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section contains the information required to build
- * RTEMS for a particular member of the Intel i386
- * family when executing in protected mode. It does
- * this by setting variables to indicate which implementation
- * dependent features are present in a particular member
- * of the family.
- *
- * Currently recognized:
- * i386_fp (i386 DX or SX w/i387)
- * i386_nofp (i386 DX or SX w/o i387)
- * i486dx
- * i486sx
- * pentium
- * pentiumpro
- *
- * CPU Model Feature Flags:
- *
- * I386_HAS_BSWAP: Defined to "1" if the instruction for endian swapping
- * (bswap) should be used. This instruction appears to
- * be present in all i486's and above.
- *
- * I386_HAS_FPU: Defined to "1" if the CPU has an FPU.
- *
- */
-
-#if defined(_SOFT_FLOAT)
-#define I386_HAS_FPU 0
-#else
-#define I386_HAS_FPU 1
-#endif
-
-#if defined(__pentiumpro__)
-
-#define CPU_MODEL_NAME "Pentium Pro"
-
-#elif defined(__i586__)
-
-# if defined(__pentium__)
-# define CPU_MODEL_NAME "Pentium"
-# elif defined(__k6__)
-# define CPU_MODEL_NAME "K6"
-# else
-# define CPU_MODEL_NAME "i586"
-# endif
-
-#elif defined(__i486__)
-
-# if !defined(_SOFT_FLOAT)
-# define CPU_MODEL_NAME "i486dx"
-# else
-# define CPU_MODEL_NAME "i486sx"
-# endif
-
-#elif defined(__i386__)
-
-#define I386_HAS_BSWAP 0
-
-# if !defined(_SOFT_FLOAT)
-# define CPU_MODEL_NAME "i386 with i387"
-# else
-# define CPU_MODEL_NAME "i386 w/o i387"
-# endif
-
-#else
-#error "Unknown CPU Model"
-#endif
-
-/*
- * Set default values for CPU model feature flags
- *
- * NOTE: These settings are chosen to reflect most of the family members.
- */
-
-#ifndef I386_HAS_FPU
-#define I386_HAS_FPU 1
-#endif
-
-#ifndef I386_HAS_BSWAP
-#define I386_HAS_BSWAP 1
-#endif
-
-/*
- * Define the name of the CPU family.
- */
-
-#define CPU_NAME "Intel i386"
-
-#ifndef ASM
-
-/*
- * The following routine swaps the endian format of an unsigned int.
- * It must be static so it can be referenced indirectly.
- */
-
-static inline unsigned int i386_swap_U32(
- unsigned int value
-)
-{
- unsigned long lout;
-
-#if (I386_HAS_BSWAP == 0)
- asm volatile( "rorw $8,%%ax;"
- "rorl $16,%0;"
- "rorw $8,%%ax" : "=a" (lout) : "0" (value) );
-#else
- __asm__ volatile( "bswap %0" : "=r" (lout) : "0" (value));
-#endif
- return( lout );
-}
-
-static inline unsigned int i386_swap_U16(
- unsigned int value
-)
-{
- unsigned short sout;
-
- __asm__ volatile( "rorw $8,%0" : "=r" (sout) : "0" (value));
- return (sout);
-}
-
-
-/*
- * Added for pagination management
- */
-
-static inline unsigned int i386_get_cr0()
-{
- register unsigned int segment = 0;
-
- asm volatile ( "movl %%cr0,%0" : "=r" (segment) : "0" (segment) );
-
- return segment;
-}
-
-static inline void i386_set_cr0(unsigned int segment)
-{
- asm volatile ( "movl %0,%%cr0" : "=r" (segment) : "0" (segment) );
-}
-
-static inline unsigned int i386_get_cr2()
-{
- register unsigned int segment = 0;
-
- asm volatile ( "movl %%cr2,%0" : "=r" (segment) : "0" (segment) );
-
- return segment;
-}
-
-static inline unsigned int i386_get_cr3()
-{
- register unsigned int segment = 0;
-
- asm volatile ( "movl %%cr3,%0" : "=r" (segment) : "0" (segment) );
-
- return segment;
-}
-
-static inline void i386_set_cr3(unsigned int segment)
-{
- asm volatile ( "movl %0,%%cr3" : "=r" (segment) : "0" (segment) );
-}
-
-/* routines */
-
-/*
- * i386_Logical_to_physical
- *
- * Converts logical address to physical address.
- */
-
-void *i386_Logical_to_physical(
- unsigned short segment,
- void *address
-);
-
-/*
- * i386_Physical_to_logical
- *
- * Converts physical address to logical address.
- */
-
-void *i386_Physical_to_logical(
- unsigned short segment,
- void *address
-);
-
-
-/*
- * "Simpler" names for a lot of the things defined in this file
- */
-
-/* segment access routines */
-
-#define get_cs() i386_get_cs()
-#define get_ds() i386_get_ds()
-#define get_es() i386_get_es()
-#define get_ss() i386_get_ss()
-#define get_fs() i386_get_fs()
-#define get_gs() i386_get_gs()
-
-#define CPU_swap_u32( _value ) i386_swap_U32( _value )
-#define CPU_swap_u16( _value ) i386_swap_U16( _value )
-
-/* i80x86 I/O instructions */
-
-#define outport_byte( _port, _value ) i386_outport_byte( _port, _value )
-#define outport_word( _port, _value ) i386_outport_word( _port, _value )
-#define outport_long( _port, _value ) i386_outport_long( _port, _value )
-#define inport_byte( _port, _value ) i386_inport_byte( _port, _value )
-#define inport_word( _port, _value ) i386_inport_word( _port, _value )
-#define inport_long( _port, _value ) i386_inport_long( _port, _value )
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */
diff --git a/c/src/exec/score/cpu/i386/rtems/score/idtr.h b/c/src/exec/score/cpu/i386/rtems/score/idtr.h
deleted file mode 100644
index 7c4f95214f..0000000000
--- a/c/src/exec/score/cpu/i386/rtems/score/idtr.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * This file contains definitions for data structure related
- * to Intel system programming. More information can be found
- * on Intel site and more precisely in the following book :
- *
- * Pentium Processor familly
- * Developper's Manual
- *
- * Volume 3 : Architecture and Programming Manual
- *
- * Formerly contained in and extracted from libcpu/i386/cpu.h.
- *
- * Copyright (C) 1998 Eric Valette (valette@crf.canon.fr)
- * Canon Centre Recherche France.
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- *
- * Applications must not include this file directly.
- */
-
-#ifndef _rtems_score_idtr_h
-#define _rtems_score_idtr_h
-
-/*
- * See page 14.9 Figure 14-2.
- *
- */
-typedef struct
-{
- unsigned int low_offsets_bits:16;
- unsigned int segment_selector:16;
- unsigned int fixed_value_bits:8;
- unsigned int gate_type:5;
- unsigned int privilege:2;
- unsigned int present:1;
- unsigned int high_offsets_bits:16;
-} interrupt_gate_descriptor;
-
-/*
- * C callable function enabling to create a interrupt_gate_descriptor
- */
-extern void create_interrupt_gate_descriptor (interrupt_gate_descriptor*, rtems_raw_irq_hdl);
-
-/*
- * C callable function enabling to get easily usable info from
- * the actual value of IDT register.
- */
-extern void i386_get_info_from_IDTR (interrupt_gate_descriptor** table,
- unsigned* limit);
-
-/*
- * C callable function enabling to change the value of IDT register. Must be called
- * with interrupts masked at processor level!!!.
- */
-extern void i386_set_IDTR (interrupt_gate_descriptor* table,
- unsigned limit);
-
-#endif
diff --git a/c/src/exec/score/cpu/i386/rtems/score/interrupts.h b/c/src/exec/score/cpu/i386/rtems/score/interrupts.h
deleted file mode 100644
index bcc1dfb85a..0000000000
--- a/c/src/exec/score/cpu/i386/rtems/score/interrupts.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * i386 interrupt macros.
- *
- * Formerly contained in and extracted from libcpu/i386/cpu.h
- *
- * COPYRIGHT (c) 1998 valette@crf.canon.fr
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- *
- * 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__*);
-
-/*
- * 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 unsigned32 _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
diff --git a/c/src/exec/score/cpu/i386/rtems/score/registers.h b/c/src/exec/score/cpu/i386/rtems/score/registers.h
deleted file mode 100644
index 993b7fb834..0000000000
--- a/c/src/exec/score/cpu/i386/rtems/score/registers.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/* registers.h
- *
- * This file contains definition and constants related to Intel Cpu
- *
- * COPYRIGHT (c) 1998 valette@crf.canon.fr
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef _rtems_score_registers_h
-#define _rtems_score_registers_h
-
-/*
- * definition related to EFLAGS
- */
-#define EFLAGS_CARRY 0x1
-#define EFLAGS_PARITY 0x4
-
-#define EFLAGS_AUX_CARRY 0x10
-#define EFLAGS_ZERO 0x40
-#define EFLAGS_SIGN 0x80
-
-#define EFLAGS_TRAP 0x100
-#define EFLAGS_INTR_ENABLE 0x200
-#define EFLAGS_DIRECTION 0x400
-#define EFLAGS_OVERFLOW 0x800
-
-#define EFLAGS_IOPL_MASK 0x3000
-#define EFLAGS_NESTED_TASK 0x8000
-
-#define EFLAGS_RESUME 0x10000
-#define EFLAGS_VIRTUAL_MODE 0x20000
-#define EFLAGS_ALIGN_CHECK 0x40000
-#define EFLAGS_VIRTUAL_INTR 0x80000
-
-#define EFLAGS_VIRTUAL_INTR_PEND 0x100000
-#define EFLAGS_ID 0x200000
-
-/*
- * definitions related to CR0
- */
-#define CR0_PROTECTION_ENABLE 0x1
-#define CR0_MONITOR_COPROC 0x2
-#define CR0_COPROC_SOFT_EMUL 0x4
-#define CR0_FLOATING_INSTR_EXCEPTION 0x8
-
-#define CR0_EXTENSION_TYPE 0x10
-#define CR0_NUMERIC_ERROR 0x20
-
-#define CR0_WRITE_PROTECT 0x10000
-#define CR0_ALIGMENT_MASK 0x40000
-
-#define CR0_NO_WRITE_THROUGH 0x20000000
-#define CR0_PAGE_LEVEL_CACHE_DISABLE 0x40000000
-#define CR0_PAGING 0x80000000
-
-/*
- * definitions related to CR3
- */
-
-#define CR3_PAGE_CACHE_DISABLE 0x10
-#define CR3_PAGE_WRITE_THROUGH 0x8
-
-
-#ifndef ASM
-
-/*
- * definition of eflags registers has a bit field structure
- */
-typedef struct {
- /*
- * fist byte : bits 0->7
- */
- unsigned int carry : 1;
- unsigned int : 1;
- unsigned int parity : 1;
- unsigned int : 1;
-
- unsigned int auxiliary_carry : 1;
- unsigned int : 1;
- unsigned int zero : 1; /* result is zero */
- unsigned int sign : 1; /* result is less than zero */
- /*
- * Second byte : bits 7->15
- */
- unsigned int trap : 1;
- unsigned int intr_enable : 1; /* set => intr on */
- unsigned int direction : 1; /* set => autodecrement */
- unsigned int overflow : 1;
-
- unsigned int IO_privilege : 2;
- unsigned int nested_task : 1;
- unsigned int : 1;
- /*
- * Third byte : bits 15->23
- */
- unsigned int resume : 1;
- unsigned int virtual_mode : 1;
- unsigned int aligment_check : 1;
- unsigned int virtual_intr : 1;
-
- unsigned int virtual_intr_pending : 1;
- unsigned int id : 1;
- unsigned int : 2;
-
- /*
- * fourth byte : bits 24->31 : UNUSED
- */
- unsigned int : 8;
-}eflags_bits;
-
-typedef union {
- eflags_bits eflags;
- unsigned int i;
-}eflags;
-/*
- * definition of eflags registers has a bit field structure
- */
-typedef struct {
- /*
- * fist byte : bits 0->7
- */
- unsigned int protection_enable : 1;
- unsigned int monitor_coproc : 1;
- unsigned int coproc_soft_emul : 1;
- unsigned int floating_instr_except : 1;
-
- unsigned int extension_type : 1;
- unsigned int numeric_error : 1;
- unsigned int : 2;
- /*
- * second byte 8->15 : UNUSED
- */
- unsigned int : 8;
- /*
- * third byte 16->23
- */
- unsigned int write_protect : 1;
- unsigned int : 1;
- unsigned int aligment_mask : 1;
- unsigned int : 1;
-
- unsigned int : 4;
- /*
- * fourth byte 24->31
- */
- unsigned int : 4;
-
- unsigned int : 1;
- unsigned int no_write_through : 1;
- unsigned int page_level_cache_disable : 1;
- unsigned int paging : 1;
-}cr0_bits;
-
-typedef union {
- cr0_bits cr0;
- unsigned int i;
-}cr0;
-
-/*
- * definition of cr3 registers has a bit field structure
- */
-typedef struct {
-
- unsigned int : 3;
- unsigned int page_write_transparent : 1;
- unsigned int page_cache_disable : 1;
- unsigned int : 7;
- unsigned int page_directory_base :20;
-}cr3_bits;
-
-typedef union {
- cr3_bits cr3;
- unsigned int i;
-}cr3;
-
-#endif
-
-#endif
-
diff --git a/c/src/exec/score/cpu/i386/rtems/score/types.h b/c/src/exec/score/cpu/i386/rtems/score/types.h
deleted file mode 100644
index 1b9091f501..0000000000
--- a/c/src/exec/score/cpu/i386/rtems/score/types.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* i386types.h
- *
- * This include file contains type definitions pertaining to the Intel
- * i386 processor family.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __i386_TYPES_h
-#define __i386_TYPES_h
-
-#ifndef ASM
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This section defines the basic types for this processor.
- */
-
-typedef unsigned char unsigned8; /* unsigned 8-bit integer */
-typedef unsigned short unsigned16; /* unsigned 16-bit integer */
-typedef unsigned int unsigned32; /* unsigned 32-bit integer */
-typedef unsigned long long unsigned64; /* unsigned 64-bit integer */
-
-typedef unsigned16 Priority_Bit_map_control;
-
-typedef signed char signed8; /* 8-bit signed integer */
-typedef signed short signed16; /* 16-bit signed integer */
-typedef signed int signed32; /* 32-bit signed integer */
-typedef signed long long signed64; /* 64 bit signed integer */
-
-typedef unsigned32 boolean; /* Boolean value */
-
-typedef float single_precision; /* single precision float */
-typedef double double_precision; /* double precision float */
-
-typedef void i386_isr;
-
-typedef i386_isr ( *i386_isr_entry )( void );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !ASM */
-
-#endif
-/* end of include file */