Changeset f0a2528 in rtems
- Timestamp:
- 04/18/05 17:25:59 (19 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- c163605f
- Parents:
- 68f4e5f
- Location:
- c/src/lib/libbsp/i386/shared
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/i386/shared/ChangeLog
r68f4e5f rf0a2528 1 2005-04-18 Eric Valette <eric.valette@free.fr> 2 3 * irq/irq.c, irq/irq.h, irq/irq_asm.S, irq/irq_init.c: Added parameter 4 to irq handler 5 1 6 2005-03-14 Joel Sherrill <joel@OARcorp.com> 2 7 -
c/src/lib/libbsp/i386/shared/irq/irq.c
r68f4e5f rf0a2528 28 28 29 29 /* 30 * Copy of data given via initial BSP_rtems_irq_mngt_set() for31 * the sake of efficiency.32 * CAUTION : this table is accessed directly by interrupt routine33 * prologue.34 */35 rtems_irq_hdl current_irq[BSP_IRQ_LINES_NUMBER];36 /*37 30 * default handler connected on each irq after bsp initialization 38 31 */ … … 44 37 */ 45 38 static rtems_irq_global_settings* internal_config; 46 static rtems_irq_connect_data*rtems_hdl_tbl;39 rtems_irq_connect_data* rtems_hdl_tbl; 47 40 /*-------------------------------------------------------------------------+ 48 41 | Cache for 1st and 2nd PIC IRQ line's status (enabled or disabled) register. … … 191 184 192 185 /* 193 * Caution : this function assumes the variable "internal_config"194 * is already set and that the tables it contains are still valid195 * and accessible.196 */197 static void make_copy_of_handlers ()198 {199 int i;200 for (i=0; i < internal_config->irqNb; i++) {201 current_irq [i] = internal_config->irqHdlTbl[i].hdl;202 }203 }204 205 /*206 186 * This function check that the value given for the irq line 207 187 * is valid. … … 244 224 rtems_hdl_tbl[irq->name] = *irq; 245 225 /* 246 * update table used directly by rtems interrupt prologue247 */248 current_irq [irq->name] = irq->hdl;249 /*250 226 * Enable interrupt at PIC level 251 227 */ … … 308 284 */ 309 285 rtems_hdl_tbl[irq->name] = default_rtems_entry; 310 311 current_irq[irq->name] = default_rtems_entry.hdl;312 286 313 287 _CPU_ISR_Enable(level); … … 336 310 */ 337 311 compute_i8259_masks_from_prio (); 338 make_copy_of_handlers ();339 312 340 313 for (i=0; i < internal_config->irqNb; i++) { … … 380 353 */ 381 354 } 355 356 void processIrq(unsigned index) 357 { 358 rtems_hdl_tbl[index].hdl(rtems_hdl_tbl[index].handle); 359 } 360 -
c/src/lib/libbsp/i386/shared/irq/irq.h
r68f4e5f rf0a2528 71 71 struct __rtems_irq_connect_data__; /* forward declaratiuon */ 72 72 73 typedef void (*rtems_irq_hdl) (void); 73 typedef void *rtems_irq_hdl_param; 74 typedef void (*rtems_irq_hdl) (rtems_irq_hdl_param); 74 75 typedef void (*rtems_irq_enable) (const struct __rtems_irq_connect_data__*); 75 76 typedef void (*rtems_irq_disable) (const struct __rtems_irq_connect_data__*); … … 85 86 */ 86 87 rtems_irq_hdl hdl; 88 /* 89 * Handler handle to store private data 90 */ 91 rtems_irq_hdl_param handle; 87 92 /* 88 93 * function for enabling interrupts at device level (ONLY!). -
c/src/lib/libbsp/i386/shared/irq/irq_asm.S
r68f4e5f rf0a2528 108 108 109 109 pushl ecx /* push vector number */ 110 mov SYM (current_irq) (,ecx,4),eax 111 /* eax = Users handler */ 112 call *eax /* invoke user ISR */ 110 lea (ecx,ecx,2), eax 111 mov SYM (rtems_hdl_tbl), edx 112 shl $0x3,eax 113 pushl 0x8(edx,eax,1) /* push hdl argument */ 114 call *0x4(edx,eax,1) /* call hdl */ 115 addl $4, esp 116 113 117 /* 114 118 * disable interrupts_again -
c/src/lib/libbsp/i386/shared/irq/irq_init.c
r68f4e5f rf0a2528 82 82 83 83 static rtems_irq_connect_data defaultIrq = { 84 /* vectorIdex, hdl , on , off , isOn */85 0, nop_func , nop_func , nop_func , not_connected84 /* vectorIdex, hdl , handle , on , off , isOn */ 85 0, nop_func , 0 , nop_func , nop_func , not_connected 86 86 }; 87 87
Note: See TracChangeset
for help on using the changeset viewer.