diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2002-04-12 15:10:42 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2002-04-12 15:10:42 +0000 |
commit | 43f67aa4cb88ed671df9ca3404afba8ac42fe459 (patch) | |
tree | 2181bfa3624f0bae45d680145e10efd88ad75feb | |
parent | 2002-03-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff) | |
download | rtems-43f67aa4cb88ed671df9ca3404afba8ac42fe459.tar.bz2 |
2002-03-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* cache.c: Include <rtems/score/registers.h> instead of
<libcpu/registers.h>.
* cpu.h: Ditto. Remove parts moved to score/cpu/i386.
* registers.h: Add BIG-FAT warning.
-rw-r--r-- | c/src/lib/libcpu/i386/ChangeLog | 7 | ||||
-rw-r--r-- | c/src/lib/libcpu/i386/cache.c | 2 | ||||
-rw-r--r-- | c/src/lib/libcpu/i386/cpu.h | 85 | ||||
-rw-r--r-- | c/src/lib/libcpu/i386/registers.h | 2 |
4 files changed, 13 insertions, 83 deletions
diff --git a/c/src/lib/libcpu/i386/ChangeLog b/c/src/lib/libcpu/i386/ChangeLog index 39da4cf28a..e8eae96f10 100644 --- a/c/src/lib/libcpu/i386/ChangeLog +++ b/c/src/lib/libcpu/i386/ChangeLog @@ -1,3 +1,10 @@ +2002-03-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de> + + * cache.c: Include <rtems/score/registers.h> instead of + <libcpu/registers.h>. + * cpu.h: Ditto. Remove parts moved to score/cpu/i386. + * registers.h: Add BIG-FAT warning. + 2002-03-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de> * configure.ac: diff --git a/c/src/lib/libcpu/i386/cache.c b/c/src/lib/libcpu/i386/cache.c index 57dfee283d..d501ae1577 100644 --- a/c/src/lib/libcpu/i386/cache.c +++ b/c/src/lib/libcpu/i386/cache.c @@ -5,7 +5,7 @@ */ #include <rtems.h> -#include <libcpu/registers.h> +#include <rtems/score/registers.h> #include "cache_.h" void _CPU_disable_cache() { diff --git a/c/src/lib/libcpu/i386/cpu.h b/c/src/lib/libcpu/i386/cpu.h index 791173f15b..4591eff6cb 100644 --- a/c/src/lib/libcpu/i386/cpu.h +++ b/c/src/lib/libcpu/i386/cpu.h @@ -21,56 +21,15 @@ #ifndef _LIBCPU_i386_CPU_H #define _LIBCPU_i386_CPU_H -#include <libcpu/registers.h> - +#include <rtems/score/registers.h> #ifndef ASM /* * Interrupt Level Macros */ +#include <rtems/score/interrupts.h> -#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 ) - /* * Segment Access Routines * @@ -193,13 +152,6 @@ do { register unsigned short __port = _port; \ typedef unsigned char rtems_vector_offset; -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__*); - typedef struct __rtems_raw_irq_connect_data__{ /* * IDT vector offset (IRQ line + PC386_IRQ_VECTOR_BASE) @@ -248,25 +200,7 @@ typedef struct { rtems_raw_irq_connect_data* rawIrqHdlTbl; }rtems_raw_irq_global_settings; -/* - * 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 - */ -void create_interrupt_gate_descriptor (interrupt_gate_descriptor*, rtems_raw_irq_hdl); +#include <rtems/score/idtr.h> /* * C callable function enabling to get handler currently connected to a vector @@ -275,19 +209,6 @@ void create_interrupt_gate_descriptor (interrupt_gate_descriptor*, rtems_raw_irq rtems_raw_irq_hdl get_hdl_from_vector(rtems_vector_offset); /* - * C callable function enabling to get easilly 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); - -/* * C callable function enabling to set up one raw idt entry */ extern int i386_set_idt_entry (const rtems_raw_irq_connect_data*); diff --git a/c/src/lib/libcpu/i386/registers.h b/c/src/lib/libcpu/i386/registers.h index ab783fd329..55b2334e1f 100644 --- a/c/src/lib/libcpu/i386/registers.h +++ b/c/src/lib/libcpu/i386/registers.h @@ -11,6 +11,8 @@ * $Id$ */ +#warning "This file is obsolete, use rtems/score/registers.h instead." + #ifndef _LIBCPU_i386_REGISTERS_H #define _LIBCPU_i386_REGISTERS_H |