Changeset 5 for trunk/kernel/kern/core.c
- Timestamp:
- Apr 26, 2017, 2:11:56 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/core.c
r1 r5 30 30 #include <printk.h> 31 31 #include <thread.h> 32 #include <chdev.h> 32 33 #include <dev_icu.h> 33 34 #include <rpc.h> … … 41 42 ///////////////////////////////// 42 43 void core_init( core_t * core, 43 uint32_tlid,44 uint32_tgid )44 lid_t lid, 45 gid_t gid ) 45 46 { 46 47 core->lid = lid; … … 64 65 65 66 sched_init( core ); 66 67 core->icu = NULL; // TODO ??? [AG]68 67 } 69 68 … … 200 199 201 200 /////////////////////////////////////////////////// 202 void core_set_irq_vector_entry( xptr_t core_xp,201 void core_set_irq_vector_entry( core_t * core, 203 202 uint32_t irq_type, 204 203 uint32_t irq_id, 205 xptr_t dev_xp ) 206 { 207 // get core cluster and local pointer 208 cxy_t core_cxy = GET_CXY( core_xp ); 209 core_t * core_ptr = (core_t *)GET_PTR( core_xp ); 210 211 // compute xptr on relevant interrupt vector entry 212 xptr_t xp; 213 if ( irq_type == WTI_TYPE ) xp = XPTR( core_cxy , &core_ptr->wti_vector[irq_id] ); 214 else if( irq_type == HWI_TYPE ) xp = XPTR( core_cxy , &core_ptr->hwi_vector[irq_id] ); 215 else xp = XPTR( core_cxy , &core_ptr->pti_vector[irq_id] ); 216 217 // set relevant IRQ vector entry 218 hal_remote_swd( xp , dev_xp ); 219 } 204 chdev_t * chdev ) 205 { 206 if ( irq_type == WTI_TYPE ) core->wti_vector[irq_id] = chdev; 207 else if( irq_type == HWI_TYPE ) core->hwi_vector[irq_id] = chdev; 208 else core->pti_vector[irq_id] = chdev; 209 }
Note: See TracChangeset
for help on using the changeset viewer.