2009-10-17 Chris Johns <chrisj@rtems.org>

* shared/irq/idt.c: Check is the irq handlers are present before
        calling.
        * shared/comm/i386-stub-glue.c: Revert the change of 2009-05-06 as
        the handlers need to be present. Fixed the warnings.
This commit is contained in:
Chris Johns
2009-10-16 22:14:01 +00:00
parent 9f6aaf7191
commit 069ed6c5b4
3 changed files with 27 additions and 6 deletions

View File

@@ -1,3 +1,10 @@
2009-10-17 Chris Johns <chrisj@rtems.org>
* shared/irq/idt.c: Check is the irq handlers are present before
calling.
* shared/comm/i386-stub-glue.c: Revert the change of 2009-05-06 as
the handlers need to be present. Fixed the warnings.
2009-10-01 Ralf Corsépius <ralf.corsepius@rtems.org> 2009-10-01 Ralf Corsépius <ralf.corsepius@rtems.org>
PR 1445/BSPs PR 1445/BSPs

View File

@@ -20,6 +20,17 @@ int getDebugChar(void); /* read and return a single char */
/* assign an exception handler */ /* assign an exception handler */
void exceptionHandler(int, void (*handler)(void)); void exceptionHandler(int, void (*handler)(void));
static void
nop(const rtems_raw_irq_connect_data* notused)
{
}
static int
isOn(const rtems_raw_irq_connect_data* notused)
{
return 1;
}
void BSP_loop(int uart); void BSP_loop(int uart);
/* Current uart used by gdb stub */ /* Current uart used by gdb stub */
@@ -36,7 +47,8 @@ i386_stub_glue_init(int uart)
uart_current = uart; uart_current = uart;
BSP_uart_init(uart, 38400, CHR_8_BITS, 0, 0, 0); /* BSP_uart_init(uart, 38400, CHR_8_BITS, 0, 0, 0);*/
BSP_uart_init(uart, 115200, CHR_8_BITS, 0, 0, 0);
} }
void BSP_uart_on(const rtems_raw_irq_connect_data* used) void BSP_uart_on(const rtems_raw_irq_connect_data* used)
@@ -152,9 +164,9 @@ void exceptionHandler(int vector, void (*handler)(void))
rtems_fatal_error_occurred(1); rtems_fatal_error_occurred(1);
} }
excep_raw_irq_data.on = NULL; excep_raw_irq_data.on = nop;
excep_raw_irq_data.off = NULL; excep_raw_irq_data.off = nop;
excep_raw_irq_data.isOn = NULL; excep_raw_irq_data.isOn = isOn;
excep_raw_irq_data.hdl = handler; excep_raw_irq_data.hdl = handler;
if (!i386_set_idt_entry (&excep_raw_irq_data)) { if (!i386_set_idt_entry (&excep_raw_irq_data)) {

View File

@@ -87,7 +87,8 @@ int i386_set_idt_entry (const rtems_raw_irq_connect_data* irq)
raw_irq_table [irq->idtIndex] = *irq; raw_irq_table [irq->idtIndex] = *irq;
create_interrupt_gate_descriptor (&idt_entry_tbl[irq->idtIndex], irq->hdl); create_interrupt_gate_descriptor (&idt_entry_tbl[irq->idtIndex], irq->hdl);
irq->on(irq); if (irq->on)
irq->on(irq);
rtems_interrupt_enable(level); rtems_interrupt_enable(level);
return 1; return 1;
@@ -168,7 +169,8 @@ int i386_delete_idt_entry (const rtems_raw_irq_connect_data* irq)
idt_entry_tbl[irq->idtIndex] = default_idt_entry; idt_entry_tbl[irq->idtIndex] = default_idt_entry;
irq->off(irq); if (irq->off)
irq->off(irq);
raw_irq_table[irq->idtIndex] = default_raw_irq_entry; raw_irq_table[irq->idtIndex] = default_raw_irq_entry;
raw_irq_table[irq->idtIndex].idtIndex = irq->idtIndex; raw_irq_table[irq->idtIndex].idtIndex = irq->idtIndex;