Update from Eric Valette <valette@crf.canon.fr>:

Here are patches that bring 980911 back to what I think is a correct
    version of raw IDT management as well as a correct initialisation
    of video console and rtems managed interrupts.
This commit is contained in:
Joel Sherrill
1998-09-21 00:24:51 +00:00
parent 04bc5d97f1
commit c610a1f300
4 changed files with 16 additions and 16 deletions

View File

@@ -92,10 +92,8 @@ _start16:
#else
ljmp $PROT_CODE_SEG, $1f # flush prefetch queue, and reload %cs
#endif
1:
.code32
1:
/*---------------------------------------------------------------------+
| load the other segment registers
+---------------------------------------------------------------------*/

View File

@@ -1,6 +1,4 @@
/*-------------------------------------------------------------------------+
| bspstart.c v1.1 - PC386 BSP - 1997/08/07
+--------------------------------------------------------------------------+
| This file contains the PC386 BSP startup package. It includes application,
| board, and monitor specific initialization and configuration. The generic CPU
| dependent initialization has been performed before this routine is invoked.
@@ -38,12 +36,12 @@
#include <libcsupport.h>
#include <rtems/libio.h>
#include <libcpu/cpuModel.h>
#include <pc386uart.h>
/*-------------------------------------------------------------------------+
| Global Variables
+--------------------------------------------------------------------------*/
extern rtems_unsigned32 _end; /* End of BSS. Defined in 'linkcmds'. */
/*
* Size of heap if it is 0 it will be dynamically defined by memory size,
* otherwise the value should be changed by binary patch
@@ -75,6 +73,7 @@ extern void _exit(int); /* define in exit.c */
void bsp_libc_init( void *, unsigned32, int );
void bsp_postdriver_hook(void);
extern void rtems_irq_mngt_init();
extern void _IBMPC_initVideo(void);
/*-------------------------------------------------------------------------+
| Function: bsp_pretasking_hook
@@ -151,6 +150,10 @@ void bsp_start( void )
* Calibrate variable for 1ms-loop (see timer.c)
*/
Calibrate_loop_1ms();
/*
* Initialize printk channel
*/
_IBMPC_initVideo();
rtemsFreeMemStart = (rtems_unsigned32)&_end + _stack_size;
/* set the value of start of free memory. */

View File

@@ -26,7 +26,6 @@ typedef char (*BSP_polling_getchar_function_type) (void);
extern BSP_output_char_function_type BSP_output_char;
extern BSP_polling_getchar_function_type BSP_poll_char;
extern void BSP_emergency_output_init(void);
/*
* All the function declared as extern after this comment
* are available for each ix86 BSP by compiling and linking

View File

@@ -119,16 +119,18 @@ void rtems_irq_mngt_init()
unsigned limit;
unsigned int level;
i386_get_info_from_IDTR (&idt_entry_tbl, &limit);
/* Convert limit into number of entries */
limit = (limit + 1) / sizeof(interrupt_gate_descriptor);
_CPU_ISR_Disable(level);
/*
* Init the complete IDT vector table with defaultRawIrq value
*/
for (i = 0; i < IDT_SIZE; i++) {
idtHdl[i] = defaultRawIrq;
for (i = 0; i < limit; i++) {
idtHdl[i] = defaultRawIrq;
idtHdl[i].idtIndex = i;
}
raw_initial_config.idtSize = IDT_SIZE;
raw_initial_config.defaultRawEntry = defaultRawIrq;
@@ -138,7 +140,6 @@ void rtems_irq_mngt_init()
/*
* put something here that will show the failure...
*/
BSP_emergency_output_init();
printk("Unable to initialize IDT!!! System locked\n");
while (1);
}
@@ -159,7 +160,8 @@ void rtems_irq_mngt_init()
* re-init the rtemsIrq table
*/
for (i = 0; i < PC_386_IRQ_LINES_NUMBER; i++) {
rtemsIrq[i] = defaultIrq;
rtemsIrq[i] = defaultIrq;
rtemsIrq[i].name = i;
}
/*
* Init initial Interrupt management config
@@ -169,11 +171,11 @@ void rtems_irq_mngt_init()
initial_config.irqHdlTbl = rtemsIrq;
initial_config.irqBase = PC386_ASM_IRQ_VECTOR_BASE;
initial_config.irqPrioTbl = irqPrioTable;
if (!pc386_rtems_irq_mngt_set(&initial_config)) {
/*
* put something here that will show the failure...
*/
BSP_emergency_output_init();
printk("Unable to initialize RTEMS interrupt Management!!! System locked\n");
while (1);
}
@@ -188,8 +190,6 @@ void rtems_irq_mngt_init()
*/
unsigned tmp;
BSP_emergency_output_init();
printk("idt_entry_tbl = %x Interrupt_descriptor_table addr = %x\n",
idt_entry_tbl, &Interrupt_descriptor_table);
tmp = (unsigned) get_hdl_from_vector (PC386_ASM_IRQ_VECTOR_BASE + PC_386_PERIODIC_TIMER);