From 43f67aa4cb88ed671df9ca3404afba8ac42fe459 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 12 Apr 2002 15:10:42 +0000 Subject: 2002-03-29 Ralf Corsepius * cache.c: Include instead of . * cpu.h: Ditto. Remove parts moved to score/cpu/i386. * registers.h: Add BIG-FAT warning. --- c/src/lib/libcpu/i386/ChangeLog | 7 ++++ c/src/lib/libcpu/i386/cache.c | 2 +- c/src/lib/libcpu/i386/cpu.h | 85 ++------------------------------------- c/src/lib/libcpu/i386/registers.h | 2 + 4 files changed, 13 insertions(+), 83 deletions(-) (limited to 'c') 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 + + * cache.c: Include instead of + . + * cpu.h: Ditto. Remove parts moved to score/cpu/i386. + * registers.h: Add BIG-FAT warning. + 2002-03-27 Ralf Corsepius * 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 -#include +#include #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 - +#include #ifndef ASM /* * Interrupt Level Macros */ +#include -#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 /* * C callable function enabling to get handler currently connected to a vector @@ -274,19 +208,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 */ 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 -- cgit v1.2.3