Changeset 623b49f1 in mainline for kernel/genarch/src/acpi/madt.c
- Timestamp:
- 2007-01-29T19:22:04Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1004b37
- Parents:
- 7d07bf3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/acpi/madt.c
r7d07bf3 r623b49f1 70 70 71 71 struct madt_apic_header * * madt_entries_index = NULL; 72 int madt_entries_index_cnt = 0;72 unsigned int madt_entries_index_cnt = 0; 73 73 74 74 char *entry[] = { … … 91 91 static bool madt_cpu_bootstrap(index_t i); 92 92 static uint8_t madt_cpu_apic_id(index_t i); 93 static int madt_irq_to_pin( int irq);93 static int madt_irq_to_pin(unsigned int irq); 94 94 95 95 struct smp_config_operations madt_config_operations = { … … 125 125 } 126 126 127 int madt_irq_to_pin( int irq)127 int madt_irq_to_pin(unsigned int irq) 128 128 { 129 129 ASSERT(irq < sizeof(isa_irq_map)/sizeof(int)); … … 144 144 struct madt_apic_header *h; 145 145 146 146 l_apic = (uint32_t *) (unative_t) acpi_madt->l_apic_address; 147 147 148 148 /* calculate madt entries */ … … 165 165 qsort(madt_entries_index, madt_entries_index_cnt, sizeof(uintptr_t), &madt_cmp); 166 166 167 /* Parse MADT entries */ 168 for (index = 0; index < madt_entries_index_cnt - 1; index++) { 169 h = madt_entries_index[index]; 170 switch (h->type) { 171 case MADT_L_APIC: 172 madt_l_apic_entry((struct madt_l_apic *) h, index); 173 break; 174 case MADT_IO_APIC: 175 madt_io_apic_entry((struct madt_io_apic *) h, index); 176 break; 177 case MADT_INTR_SRC_OVRD: 178 madt_intr_src_ovrd_entry((struct madt_intr_src_ovrd *) h, index); 179 break; 180 case MADT_NMI_SRC: 181 case MADT_L_APIC_NMI: 182 case MADT_L_APIC_ADDR_OVRD: 183 case MADT_IO_SAPIC: 184 case MADT_L_SAPIC: 185 case MADT_PLATFORM_INTR_SRC: 186 printf("MADT: skipping %s entry (type=%zd)\n", entry[h->type], h->type); 187 break; 188 189 default: 190 if (h->type >= MADT_RESERVED_SKIP_BEGIN && h->type <= MADT_RESERVED_SKIP_END) { 191 printf("MADT: skipping reserved entry (type=%zd)\n", h->type); 192 } 193 if (h->type >= MADT_RESERVED_OEM_BEGIN) { 194 printf("MADT: skipping OEM entry (type=%zd)\n", h->type); 195 } 196 break; 167 /* Parse MADT entries */ 168 if (madt_entries_index_cnt > 0) { 169 for (index = 0; index < madt_entries_index_cnt - 1; index++) { 170 h = madt_entries_index[index]; 171 switch (h->type) { 172 case MADT_L_APIC: 173 madt_l_apic_entry((struct madt_l_apic *) h, index); 174 break; 175 case MADT_IO_APIC: 176 madt_io_apic_entry((struct madt_io_apic *) h, index); 177 break; 178 case MADT_INTR_SRC_OVRD: 179 madt_intr_src_ovrd_entry((struct madt_intr_src_ovrd *) h, index); 180 break; 181 case MADT_NMI_SRC: 182 case MADT_L_APIC_NMI: 183 case MADT_L_APIC_ADDR_OVRD: 184 case MADT_IO_SAPIC: 185 case MADT_L_SAPIC: 186 case MADT_PLATFORM_INTR_SRC: 187 printf("MADT: skipping %s entry (type=%zd)\n", entry[h->type], h->type); 188 break; 189 190 default: 191 if (h->type >= MADT_RESERVED_SKIP_BEGIN && h->type <= MADT_RESERVED_SKIP_END) { 192 printf("MADT: skipping reserved entry (type=%zd)\n", h->type); 193 } 194 if (h->type >= MADT_RESERVED_OEM_BEGIN) { 195 printf("MADT: skipping OEM entry (type=%zd)\n", h->type); 196 } 197 break; 198 } 197 199 } 198 199 200 } 201 200 } 202 201 203 202 if (cpu_count)
Note:
See TracChangeset
for help on using the changeset viewer.