Changeset a83a802 in mainline for genarch/src/acpi/matd.c
- Timestamp:
- 2005-11-23T13:28:17Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8418c7d
- Parents:
- 607c5f9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
genarch/src/acpi/matd.c
r607c5f9 ra83a802 45 45 #ifdef CONFIG_SMP 46 46 47 /** Standard ISA IRQ map; can be overriden by Interrupt Source Override entries of MADT. */ 48 int isa_irq_map[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; 49 47 50 static void madt_l_apic_entry(struct madt_l_apic *la, __u32 index); 48 51 static void madt_io_apic_entry(struct madt_io_apic *ioa, __u32 index); 52 static void madt_intr_src_ovrd_entry(struct madt_intr_src_ovrd *override, __u32 index); 49 53 static int madt_cmp(void * a, void * b); 50 54 … … 80 84 static bool madt_cpu_bootstrap(index_t i); 81 85 static __u8 madt_cpu_apic_id(index_t i); 86 static int madt_irq_to_pin(int irq); 82 87 83 88 struct smp_config_operations madt_config_operations = { … … 85 90 .cpu_enabled = madt_cpu_enabled, 86 91 .cpu_bootstrap = madt_cpu_bootstrap, 87 .cpu_apic_id = madt_cpu_apic_id 92 .cpu_apic_id = madt_cpu_apic_id, 93 .irq_to_pin = madt_irq_to_pin 88 94 }; 89 95 90 staticcount_t madt_cpu_count(void)96 count_t madt_cpu_count(void) 91 97 { 92 98 return madt_l_apic_entry_cnt; 93 99 } 94 100 95 staticbool madt_cpu_enabled(index_t i)101 bool madt_cpu_enabled(index_t i) 96 102 { 97 103 ASSERT(i < madt_l_apic_entry_cnt); … … 100 106 } 101 107 102 staticbool madt_cpu_bootstrap(index_t i)108 bool madt_cpu_bootstrap(index_t i) 103 109 { 104 110 ASSERT(i < madt_l_apic_entry_cnt); … … 106 112 } 107 113 108 static__u8 madt_cpu_apic_id(index_t i)114 __u8 madt_cpu_apic_id(index_t i) 109 115 { 110 116 ASSERT(i < madt_l_apic_entry_cnt); 111 117 return ((struct madt_l_apic *) madt_entries_index[madt_l_apic_entry_index + i])->apic_id; 118 } 119 120 int madt_irq_to_pin(int irq) 121 { 122 ASSERT(irq < sizeof(isa_irq_map)/sizeof(int)); 123 return isa_irq_map[irq]; 112 124 } 113 125 … … 155 167 break; 156 168 case MADT_INTR_SRC_OVRD: 169 madt_intr_src_ovrd_entry((struct madt_intr_src_ovrd *) h, index); 170 break; 157 171 case MADT_NMI_SRC: 158 172 case MADT_L_APIC_NMI: … … 210 224 } 211 225 226 void madt_intr_src_ovrd_entry(struct madt_intr_src_ovrd *override, __u32 index) 227 { 228 ASSERT(override->source < sizeof(isa_irq_map)/sizeof(int)); 229 printf("Remapping irq%d to IO APIC pin%d\n", override->source, override->global_intr); 230 isa_irq_map[override->source] = override->global_intr; 231 232 } 212 233 213 234 #endif /* CONFIG_SMP */
Note:
See TracChangeset
for help on using the changeset viewer.