Changeset ab0df696 in rtems


Ignore:
Timestamp:
Aug 5, 1998, 3:15:46 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
0e3c0096
Parents:
5094711
Message:

Automatic CPU type detection code from Eric Valette <valette@…>.
Enabled on the pc386.

Files:
4 added
13 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/score/cpu/i386/asm.h

    r5094711 rab0df696  
    9393#define esp REG (esp)
    9494#define ebp REG (ebp)
     95#define cr0 REG (cr0)
    9596
    9697#define ax REG (ax)
  • c/src/exec/score/tools/hppa1.1/Makefile.in

    r5094711 rab0df696  
    5151
    5252all:    ${ARCH} $(SRCS) preinstall $(PGMS)
    53         $(INSTALL) $(INSTBINFLAGS) ${PGMS} ${PROJECT_RELEASE}/bin
    5453
    5554# Hack
    5655# we are #including files that haven't been installed yet.
    5756# Make sure they are available.
    58 preinstall: FORCEIT
     57preinstall: ${ARCH} headers $(SRCS) $(PGMS)
     58        $(INSTALL) $(INSTBINFLAGS) ${PGMS} ${PROJECT_RELEASE}/bin
     59
     60headers: FORCE
    5961        cd $(CPU_DIR);   $(MAKE) install-headers
    6062
  • c/src/lib/libbsp/i386/force386/include/bsp.h

    r5094711 rab0df696  
    147147extern rtems_configuration_table BSP_Configuration;
    148148
    149 extern i386_IDT_slot Interrupt_descriptor_table[ 256 ];
    150 extern i386_GDT_slot Global_descriptor_table[ 8192 ];
     149#define IDT_SIZE 256
     150#define GDT_SIZE 8192
     151
     152extern interrupt_gate_descriptor Interrupt_descriptor_table[IDT_SIZE];
     153extern segment_descriptors Global_descriptor_table   [GDT_SIZE];
    151154
    152155BSP_EXTERN unsigned short Idt[3];  /* Interrupt Descriptor Table Address */
  • c/src/lib/libbsp/i386/force386/startup/setvec.c

    r5094711 rab0df696  
    3333{
    3434  i386_isr_entry previous_isr;
    35   i386_IDT_slot idt;
     35  interrupt_gate_descriptor idt;
    3636
    3737  if ( type )
  • c/src/lib/libbsp/i386/i386ex/include/bsp.h

    r5094711 rab0df696  
    117117extern rtems_configuration_table BSP_Configuration;
    118118
    119 extern i386_IDT_slot Interrupt_descriptor_table[ 256 ];
    120 extern i386_GDT_slot Global_descriptor_table[ 8192 ];
     119#define IDT_SIZE 256
     120#define GDT_SIZE 8192
     121
     122extern interrupt_gate_descriptor Interrupt_descriptor_table[IDT_SIZE];
     123extern segment_descriptors Global_descriptor_table   [GDT_SIZE];
    121124
    122125BSP_EXTERN unsigned short Idt[3];  /* Interrupt Descriptor Table Address */
  • c/src/lib/libbsp/i386/i386ex/startup/setvec.c

    r5094711 rab0df696  
    3333{
    3434  i386_isr_entry previous_isr;
    35   i386_IDT_slot  idt;
     35  interrupt_gate_descriptor  idt;
    3636
    3737  if ( type )
     
    4646
    4747    /* build the IDT entry */
    48     idt.offset_0_15      = ((rtems_unsigned32) handler) & 0xffff;
    49     idt.segment_selector = get_cs();
    50     idt.reserved         = 0x00;
    51     idt.p_dpl            = 0x8e;         /* present, ISR */
    52     idt.offset_16_31     = ((rtems_unsigned32) handler) >> 16;
     48    create_interrupt_gate_descriptor( &idt, handler );
    5349
    5450    /* install the IDT entry */
  • c/src/lib/libbsp/i386/pc386/console/console.c

    r5094711 rab0df696  
    233233        }
    234234    }
    235  
     235#define  DISPLAY_CPU_INFO
     236#ifdef DISPLAY_CPU_INFO
     237  printCpuInfo();
     238#endif
     239 
    236240  return RTEMS_SUCCESSFUL;
    237241} /* console_initialize */
  • c/src/lib/libbsp/i386/pc386/start/start.s

    r5094711 rab0df696  
    6565        EXTERN (_IBMPC_initVideo)
    6666        EXTERN (debugPollingGetChar)
     67        EXTERN (checkCPUtypeSetCr0)
     68       
    6769
    6870/*
     
    8890        nop
    8991        cli                     # DISABLE INTERRUPTS!!!
     92        cld
    9093#ifdef DEBUG_EARLY_START
    91         cld
    9294        /*
    9395         * Must get video attribute to have a working printk.
     
    150152
    151153/*---------------------------------------------------------------------+
    152 | Initialize the i387.
    153 |
    154 | Using the NO WAIT form of the instruction insures that if it is not
    155 | present the board will not lock up or get an exception.
     154| Check CPU type. Enable Cache and init coprocessor if needed.
    156155+---------------------------------------------------------------------*/
    157 
    158         fninit                          # MUST USE NO-WAIT FORM
    159 
     156        call checkCPUtypeSetCr0
    160157/*---------------------------------------------------------------------+
    161158| Transfer control to User's Board Support Package
  • c/src/lib/libbsp/i386/pc386/startup/bspstart.c

    r5094711 rab0df696  
    3838#include <libcsupport.h>
    3939#include <rtems/libio.h>
    40  
     40#include <libcpu/cpuModel.h>
     41
    4142/*-------------------------------------------------------------------------+
    4243| Global Variables
     
    5960char            *rtems_progname;               /* Program name - from main(). */
    6061
     62extern void debugPollingGetChar();
    6163
    6264/*-------------------------------------------------------------------------+
     
    131133
    132134  /*
    133    * Init trems_interrupt_management
     135   * Init rtems_interrupt_management
    134136   */
    135137  rtems_irq_mngt_init();
  • c/src/lib/libcpu/i386/Makefile.in

    r5094711 rab0df696  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=cpu
     14C_PIECES=cpu displayCpu
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
    1717
    18 H_FILES=$(srcdir)/cpu.h
     18H_FILES=$(srcdir)/cpu.h $(srcdir)/registers.h $(srcdir)/cpuModel.h
    1919
    2020# Assembly source names, if any, go here -- minus the .s
    21 S_PIECES=cpu_asm
     21S_PIECES=cpu_asm cpuModel
    2222S_FILES=$(S_PIECES:%=%.S)
    2323S_O_FILES=$(S_FILES:%.S=${ARCH}/%.o)
  • c/src/lib/libcpu/i386/cpu.h

    r5094711 rab0df696  
    1919 */
    2020
    21 #ifndef _i386_CPU_H
    22 #define _i386_CPU_H
     21#ifndef _LIBCPU_i386_CPU_H
     22#define _LIBCPU_i386_CPU_H
     23
     24#include <libcpu/registers.h>
     25
    2326
    2427#ifndef ASM
     
    6467    ); \
    6568    \
    66     _level = (_eflags & 0x0200) ? 0 : 1; \
     69    _level = (_eflags &  EFLAGS_INTR_ENABLE) ? 0 : 1; \
    6770  } while (0)
    6871
  • cpukit/score/cpu/i386/asm.h

    r5094711 rab0df696  
    9393#define esp REG (esp)
    9494#define ebp REG (ebp)
     95#define cr0 REG (cr0)
    9596
    9697#define ax REG (ax)
  • cpukit/score/cpu/i386/rtems/asm.h

    r5094711 rab0df696  
    9393#define esp REG (esp)
    9494#define ebp REG (ebp)
     95#define cr0 REG (cr0)
    9596
    9697#define ax REG (ax)
Note: See TracChangeset for help on using the changeset viewer.