Changeset 137 for trunk/hal/x86_64/drivers/soclib_xcu.c
- Timestamp:
- Jul 4, 2017, 10:17:44 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/drivers/soclib_xcu.c
r135 r137 32 32 extern size_t ioapic_pins; 33 33 34 uint64_t apic_fake_status __in_kdata = 0; 35 36 /* 37 * These indexes are used to translate a type::idx to a pin on the IOAPIC. 38 */ 39 uint32_t hwi_baseidx __in_kdata = 0; 40 uint32_t wti_baseidx __in_kdata = 0; 41 uint32_t pti_baseidx __in_kdata = 0; 42 34 43 void soclib_xcu_init(chdev_t *icu, lid_t lid) 35 44 { … … 38 47 /* disable all IRQs */ 39 48 for (i = 0; i < ioapic_pins; i++) { 40 hal_ioapic_ set_entry(i, IOENTRY_DISABLE);49 hal_ioapic_disable_entry(i); 41 50 } 42 51 … … 44 53 } 45 54 46 void soclib_xcu_disable_irq( chdev_t * icu, 47 uint32_t mask, 48 uint32_t type, 49 lid_t lid ) 55 void soclib_xcu_enable_irq(chdev_t *icu, uint32_t idx, uint32_t type, 56 lid_t lid) 50 57 { 58 uint32_t pin; 59 60 switch (type) { 61 case HWI_TYPE: 62 pin = hwi_baseidx + idx; 63 case WTI_TYPE: 64 pin = wti_baseidx + idx; 65 case PTI_TYPE: 66 pin = pti_baseidx + idx; 67 default: 68 x86_panic("enabling wrong irq"); 69 } 70 51 71 x86_panic((char *)__func__); 52 72 } 53 73 54 void soclib_xcu_enable_irq( chdev_t * icu, 55 uint32_t mask, 56 uint32_t type, 57 lid_t lid ) 74 void soclib_xcu_disable_irq(chdev_t *icu, uint32_t idx, uint32_t type, 75 lid_t lid) 58 76 { 59 77 x86_panic((char *)__func__); … … 83 101 } 84 102 85 void soclib_xcu_get_status( chdev_t * icu, 86 lid_t lid, 87 uint32_t * hwi_status, 88 uint32_t * wti_status, 89 uint32_t * pti_status ) 103 104 105 106 107 void soclib_xcu_get_status(chdev_t *icu, lid_t lid, uint32_t *hwi_status, 108 uint32_t *wti_status, uint32_t *pti_status) 90 109 { 110 if (lid != 0) { 111 x86_panic("xcu_get_status should have lid==0"); 112 } 113 91 114 x86_panic((char *)__func__); 92 115 } 116 117 118 119 120 93 121 94 122 void soclib_xcu_send_ipi( xptr_t icu_xp,
Note: See TracChangeset
for help on using the changeset viewer.