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.
This commit is contained in:
Joel Sherrill
2002-04-12 15:10:42 +00:00
parent a324355fb8
commit 43f67aa4cb
4 changed files with 13 additions and 83 deletions

View File

@@ -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:

View File

@@ -5,7 +5,7 @@
*/
#include <rtems.h>
#include <libcpu/registers.h>
#include <rtems/score/registers.h>
#include "cache_.h"
void _CPU_disable_cache() {

View File

@@ -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
@@ -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
*/

View File

@@ -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