summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/shared/irq/irq.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-10-05 22:36:06 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-10-05 22:36:06 +0000
commit0ebbf66b0ee518763ee38b4ac28c7d3b6feaadf1 (patch)
tree4092e08f36cef683d4eb0b38687023b93f33b63c /c/src/lib/libbsp/i386/shared/irq/irq.c
parentNew file based on information from Eric Norum <eric@skatter.usask.ca>. (diff)
downloadrtems-0ebbf66b0ee518763ee38b4ac28c7d3b6feaadf1.tar.bz2
Large patch from Erik Ivanenko <erik.ivanenko@utoronto.ca> which
moves pieces of the pc386 bsp up to a shared level for all i386 BSPs and modifies the i386ex BSP to use those shared pieces. Serial remote debugging is included for both targets. Erik's notes: There are several workarounds in it: 1) #define NEXT_GAS is hardcoded in pc386/start/start.s 2) #define NEXT_GAS is hardcoded in i386ex/start/start.s 3) #define NEW_GAS is hardcoded in pc386/start16.s 4) #undef __assert and redeclare _assert hardcoded in console.c for both pc386 and i386ex due to my egcs1.1b ~ newlib problem. Should have modified t-rtems.cfg ( no time ) I've tested pc386 with both video and serial consoles and GDB remote. All work fine, except that GDB acts weird. ( re: other posting) I hope this will work for you. It took quite some time to locate the autoconf error. The remainder was just grunt work. Unfortunately, I think I've unwound the removal of the IBMPCInitVideo stuff. Sorry. I REALLY can't spend more time... I've been at this conversion to 4.0 locally and updating the release since Sept. 8th, and have yet to compile my network driver.... This is as much as I can do right now. I look forward to the next patch to really test i368ex. I did make sure that the sample tests worked for pc386.
Diffstat (limited to 'c/src/lib/libbsp/i386/shared/irq/irq.c')
-rw-r--r--c/src/lib/libbsp/i386/shared/irq/irq.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/c/src/lib/libbsp/i386/shared/irq/irq.c b/c/src/lib/libbsp/i386/shared/irq/irq.c
index 9dea372e0f..cd38ec51c4 100644
--- a/c/src/lib/libbsp/i386/shared/irq/irq.c
+++ b/c/src/lib/libbsp/i386/shared/irq/irq.c
@@ -21,19 +21,19 @@
* pointer to the mask representing the additionnal irq vectors
* that must be disabled when a particular entry is activated.
* They will be dynamically computed from teh prioruty table given
- * in pc386_rtems_irq_mngt_set();
+ * in BSP_rtems_irq_mngt_set();
* CAUTION : this table is accessed directly by interrupt routine
* prologue.
*/
-rtems_i8259_masks irq_mask_or_tbl[PC_386_IRQ_LINES_NUMBER];
+rtems_i8259_masks irq_mask_or_tbl[BSP_IRQ_LINES_NUMBER];
/*
- * Copy of data given via initial pc386_rtems_irq_mngt_set() for
+ * Copy of data given via initial BSP_rtems_irq_mngt_set() for
* the sake of efficiency.
* CAUTION : this table is accessed directly by interrupt routine
* prologue.
*/
-rtems_irq_hdl current_irq[PC_386_IRQ_LINES_NUMBER];
+rtems_irq_hdl current_irq[BSP_IRQ_LINES_NUMBER];
/*
* default handler connected on each irq after bsp initialization
*/
@@ -56,19 +56,19 @@ static rtems_irq_connect_data* rtems_hdl_tbl;
rtems_i8259_masks i8259s_cache;
/*-------------------------------------------------------------------------+
-| Function: PC386_irq_disable_at_i8259s
+| Function: BSP_irq_disable_at_i8259s
| Description: Mask IRQ line in appropriate PIC chip.
| Global Variables: i8259s_cache
| Arguments: vector_offset - number of IRQ line to mask.
| Returns: Nothing.
+--------------------------------------------------------------------------*/
-int pc386_irq_disable_at_i8259s (const rtems_irq_symbolic_name irqLine)
+int BSP_irq_disable_at_i8259s (const rtems_irq_symbolic_name irqLine)
{
unsigned short mask;
unsigned int level;
- if ( ((int)irqLine < PC_386_LOWEST_OFFSET) ||
- ((int)irqLine > PC_386_MAX_OFFSET )
+ if ( ((int)irqLine < BSP_LOWEST_OFFSET) ||
+ ((int)irqLine > BSP_MAX_OFFSET )
)
return 1;
@@ -91,19 +91,19 @@ int pc386_irq_disable_at_i8259s (const rtems_irq_symbolic_name irqLine)
}
/*-------------------------------------------------------------------------+
-| Function: pc386_irq_enable_at_i8259s
+| Function: BSP_irq_enable_at_i8259s
| Description: Unmask IRQ line in appropriate PIC chip.
| Global Variables: i8259s_cache
| Arguments: irqLine - number of IRQ line to mask.
| Returns: Nothing.
+--------------------------------------------------------------------------*/
-int pc386_irq_enable_at_i8259s (const rtems_irq_symbolic_name irqLine)
+int BSP_irq_enable_at_i8259s (const rtems_irq_symbolic_name irqLine)
{
unsigned short mask;
unsigned int level;
- if ( ((int)irqLine < PC_386_LOWEST_OFFSET) ||
- ((int)irqLine > PC_386_MAX_OFFSET )
+ if ( ((int)irqLine < BSP_LOWEST_OFFSET) ||
+ ((int)irqLine > BSP_MAX_OFFSET )
)
return 1;
@@ -125,12 +125,12 @@ int pc386_irq_enable_at_i8259s (const rtems_irq_symbolic_name irqLine)
return 0;
} /* mask_irq */
-int pc386_irq_enabled_at_i8259s (const rtems_irq_symbolic_name irqLine)
+int BSP_irq_enabled_at_i8259s (const rtems_irq_symbolic_name irqLine)
{
unsigned short mask;
- if ( ((int)irqLine < PC_386_LOWEST_OFFSET) ||
- ((int)irqLine > PC_386_MAX_OFFSET )
+ if ( ((int)irqLine < BSP_LOWEST_OFFSET) ||
+ ((int)irqLine > BSP_MAX_OFFSET )
)
return 1;
@@ -140,16 +140,16 @@ int pc386_irq_enabled_at_i8259s (const rtems_irq_symbolic_name irqLine)
/*-------------------------------------------------------------------------+
-| Function: pc386_irq_ack_at_i8259s
+| Function: BSP_irq_ack_at_i8259s
| Description: Signal generic End Of Interrupt (EOI) to appropriate PIC.
| Global Variables: None.
| Arguments: irqLine - number of IRQ line to acknowledge.
| Returns: Nothing.
+--------------------------------------------------------------------------*/
-int pc386_irq_ack_at_i8259s (const rtems_irq_symbolic_name irqLine)
+int BSP_irq_ack_at_i8259s (const rtems_irq_symbolic_name irqLine)
{
- if ( ((int)irqLine < PC_386_LOWEST_OFFSET) ||
- ((int)irqLine > PC_386_MAX_OFFSET )
+ if ( ((int)irqLine < BSP_LOWEST_OFFSET) ||
+ ((int)irqLine > BSP_MAX_OFFSET )
)
return 1;
@@ -212,7 +212,7 @@ static void make_copy_of_handlers ()
static int isValidInterrupt(int irq)
{
- if ( (irq < PC_386_LOWEST_OFFSET) || (irq > PC_386_MAX_OFFSET))
+ if ( (irq < BSP_LOWEST_OFFSET) || (irq > BSP_MAX_OFFSET))
return 0;
return 1;
}
@@ -221,7 +221,7 @@ static int isValidInterrupt(int irq)
* ------------------------ RTEMS Single Irq Handler Mngt Routines ----------------
*/
-int pc386_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
+int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
{
unsigned int level;
@@ -251,7 +251,7 @@ int pc386_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
/*
* Enable interrupt at PIC level
*/
- pc386_irq_enable_at_i8259s (irq->name);
+ BSP_irq_enable_at_i8259s (irq->name);
/*
* Enable interrupt on device
*/
@@ -263,7 +263,7 @@ int pc386_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
}
-int pc386_get_current_rtems_irq_handler (rtems_irq_connect_data* irq)
+int BSP_get_current_rtems_irq_handler (rtems_irq_connect_data* irq)
{
if (!isValidInterrupt(irq->name)) {
return 0;
@@ -272,7 +272,7 @@ int pc386_get_current_rtems_irq_handler (rtems_irq_connect_data* irq)
return 1;
}
-int pc386_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
+int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
{
unsigned int level;
@@ -294,7 +294,7 @@ int pc386_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
/*
* disable interrupt at PIC level
*/
- pc386_irq_disable_at_i8259s (irq->name);
+ BSP_irq_disable_at_i8259s (irq->name);
/*
* Disable interrupt on device
@@ -317,7 +317,7 @@ int pc386_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
* ------------------------ RTEMS Global Irq Handler Mngt Routines ----------------
*/
-int pc386_rtems_irq_mngt_set(rtems_irq_global_settings* config)
+int BSP_rtems_irq_mngt_set(rtems_irq_global_settings* config)
{
int i;
unsigned int level;
@@ -337,23 +337,23 @@ int pc386_rtems_irq_mngt_set(rtems_irq_global_settings* config)
for (i=0; i < internal_config->irqNb; i++) {
if (rtems_hdl_tbl[i].hdl != default_rtems_entry.hdl) {
- pc386_irq_enable_at_i8259s (i);
+ BSP_irq_enable_at_i8259s (i);
rtems_hdl_tbl[i].on(&rtems_hdl_tbl[i]);
}
else {
rtems_hdl_tbl[i].off(&rtems_hdl_tbl[i]);
- pc386_irq_disable_at_i8259s (i);
+ BSP_irq_disable_at_i8259s (i);
}
}
/*
* must disable slave pic anyway
*/
- pc386_irq_enable_at_i8259s (2);
+ BSP_irq_enable_at_i8259s (2);
_CPU_ISR_Enable(level);
return 1;
}
-int pc386_rtems_irq_mngt_get(rtems_irq_global_settings** config)
+int BSP_rtems_irq_mngt_get(rtems_irq_global_settings** config)
{
*config = internal_config;
return 0;