Lines Matching +full:pins +full:- +full:are +full:- +full:numbered
1 // SPDX-License-Identifier: GPL-2.0
4 * compliant MP-table parsing routines.
43 while (len--) in mpf_checksum()
54 if (!(m->cpuflag & CPU_ENABLED)) { in MP_processor_info()
59 apicid = m->apicid; in MP_processor_info()
61 if (m->cpuflag & CPU_BOOTPROCESSOR) { in MP_processor_info()
62 bootup_cpu = " (Bootup-CPU)"; in MP_processor_info()
63 boot_cpu_physical_apicid = m->apicid; in MP_processor_info()
66 pr_info("Processor #%d%s\n", m->apicid, bootup_cpu); in MP_processor_info()
67 generic_processor_info(apicid, m->apicver); in MP_processor_info()
73 memcpy(str, m->bustype, 6); in mpc_oem_bus_info()
75 apic_printk(APIC_VERBOSE, "Bus #%d is %s\n", m->busid, str); in mpc_oem_bus_info()
85 if (m->busid >= MAX_MP_BUSSES) { in MP_bus_info()
87 m->busid, str, MAX_MP_BUSSES - 1); in MP_bus_info()
92 set_bit(m->busid, mp_bus_not_pci); in MP_bus_info()
93 if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA) - 1) == 0) { in MP_bus_info()
95 mp_bus_id_to_type[m->busid] = MP_BUS_ISA; in MP_bus_info()
97 } else if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI) - 1) == 0) { in MP_bus_info()
98 clear_bit(m->busid, mp_bus_not_pci); in MP_bus_info()
100 mp_bus_id_to_type[m->busid] = MP_BUS_PCI; in MP_bus_info()
101 } else if (strncmp(str, BUSTYPE_EISA, sizeof(BUSTYPE_EISA) - 1) == 0) { in MP_bus_info()
102 mp_bus_id_to_type[m->busid] = MP_BUS_EISA; in MP_bus_info()
105 pr_warn("Unknown bustype %s - ignoring\n", str); in MP_bus_info()
115 if (m->flags & MPC_APIC_USABLE) in MP_ioapic_info()
116 mp_register_ioapic(m->apicid, m->apicaddr, gsi_top, &cfg); in MP_ioapic_info()
123 mp_irq->irqtype, mp_irq->irqflag & 3, in print_mp_irq_info()
124 (mp_irq->irqflag >> 2) & 3, mp_irq->srcbus, in print_mp_irq_info()
125 mp_irq->srcbusirq, mp_irq->dstapic, mp_irq->dstirq); in print_mp_irq_info()
137 m->irqtype, m->irqflag & 3, (m->irqflag >> 2) & 3, m->srcbusid, in MP_lintsrc_info()
138 m->srcbusirq, m->destapic, m->destapiclint); in MP_lintsrc_info()
147 if (memcmp(mpc->signature, MPC_SIGNATURE, 4)) { in smp_check_mpc()
149 mpc->signature[0], mpc->signature[1], in smp_check_mpc()
150 mpc->signature[2], mpc->signature[3]); in smp_check_mpc()
153 if (mpf_checksum((unsigned char *)mpc, mpc->length)) { in smp_check_mpc()
157 if (mpc->spec != 0x01 && mpc->spec != 0x04) { in smp_check_mpc()
158 pr_err("MPTABLE: bad table version (%d)!!\n", mpc->spec); in smp_check_mpc()
161 if (!mpc->lapic) { in smp_check_mpc()
165 memcpy(oem, mpc->oem, 8); in smp_check_mpc()
169 memcpy(str, mpc->productid, 12); in smp_check_mpc()
174 pr_info("MPTABLE: APIC at: 0x%X\n", mpc->lapic); in smp_check_mpc()
190 1, mpc, mpc->length, 1); in smp_dump_mptable()
206 register_lapic_address(mpc->lapic); in smp_read_mpc()
212 while (count < mpc->length) { in smp_read_mpc()
239 count = mpc->length; in smp_read_mpc()
276 * there is good ELCR data is very simple - IRQ0, 1, 2 and 13 can in construct_default_ioirq_mptable()
305 * If the ELCR indicates a level-sensitive interrupt, we in construct_default_ioirq_mptable()
367 * We set up most of the low 16 IO-APIC pins according to MPS rules. in construct_ioapic_table()
388 * 2 CPUs, numbered 0 & 1. in construct_default_ISA_mptable()
427 size = mpc->length; in get_mpc_size()
429 apic_printk(APIC_VERBOSE, " mpc: %lx-%lx\n", physptr, physptr + size); in get_mpc_size()
439 size = get_mpc_size(mpf->physptr); in check_physptr()
440 mpc = early_memremap(mpf->physptr, size); in check_physptr()
453 return -1; in check_physptr()
458 return -1; in check_physptr()
462 * If there are no explicit MP IRQ entries, then we are in check_physptr()
463 * broken. We set up most of the low 16 IO-APIC pins to in check_physptr()
513 mpf->specification); in default_get_smp_config()
515 if (mpf->feature2 & (1 << 7)) { in default_get_smp_config()
526 if (mpf->feature1) { in default_get_smp_config()
535 pr_info("Default MP configuration #%d\n", mpf->feature1); in default_get_smp_config()
536 construct_default_ISA_mptable(mpf->feature1); in default_get_smp_config()
538 } else if (mpf->physptr) { in default_get_smp_config()
555 memblock_reserve(mpf->physptr, get_mpc_size(mpf->physptr)); in smp_reserve_memory()
564 apic_printk(APIC_VERBOSE, "Scan for SMP in [mem %#010lx-%#010lx]\n", in smp_scan_config()
565 base, base + length - 1); in smp_scan_config()
572 (mpf->length == 1) && in smp_scan_config()
574 ((mpf->specification == 1) in smp_scan_config()
575 || (mpf->specification == 4))) { in smp_scan_config()
582 pr_info("found SMP MP-table at [mem %#010lx-%#010lx]\n", in smp_scan_config()
583 base, base + sizeof(*mpf) - 1); in smp_scan_config()
586 if (mpf->physptr) in smp_scan_config()
597 length -= 16; in smp_scan_config()
623 * there is a real-mode segmented pointer pointing to the in default_find_smp_config()
626 * NOTE! There are Linux loaders that will corrupt the EBDA in default_find_smp_config()
629 * stomped on during early boot. These loaders are buggy and in default_find_smp_config()
647 if (m->irqtype != mp_INT) in get_MP_intsrc_index()
650 if (m->irqflag != (MP_IRQTRIG_LEVEL | MP_IRQPOL_ACTIVE_LOW)) in get_MP_intsrc_index()
663 if (mp_irqs[i].srcbus != m->srcbus) in get_MP_intsrc_index()
665 if (mp_irqs[i].srcbusirq != m->srcbusirq) in get_MP_intsrc_index()
669 return -2; in get_MP_intsrc_index()
676 return -1; in get_MP_intsrc_index()
703 * not found (-1), or duplicated (-2) are invalid entries, in check_irq_src()
716 return -1; in check_slot()
737 pr_info("mpc_length %x\n", mpc->length); in replace_intsrc_all()
738 while (count < mpc->length) { in replace_intsrc_all()
777 nr_m_spare--; in replace_intsrc_all()
786 mpc->length = count; in replace_intsrc_all()
794 mpc->checksum = 0; in replace_intsrc_all()
795 mpc->checksum -= mpf_checksum((unsigned char *)mpc, mpc->length); in replace_intsrc_all()
860 if (mpf->feature1) in update_mp_table()
863 if (!mpf->physptr) in update_mp_table()
866 size = get_mpc_size(mpf->physptr); in update_mp_table()
867 mpc = early_memremap(mpf->physptr, size); in update_mp_table()
877 pr_info("physptr: %x\n", mpf->physptr); in update_mp_table()
879 if (mpc_new_phys && mpc->length > mpc_new_length) { in update_mp_table()
888 mpc->checksum = 0; in update_mp_table()
889 old = mpf_checksum((unsigned char *)mpc, mpc->length); in update_mp_table()
890 mpc->checksum = 0xff; in update_mp_table()
891 new = mpf_checksum((unsigned char *)mpc, mpc->length); in update_mp_table()
896 pr_info("use in-position replacing\n"); in update_mp_table()
903 mpf->physptr = mpc_new_phys; in update_mp_table()
904 memcpy(mpc_new, mpc, mpc->length); in update_mp_table()
909 if (mpc_new_phys - mpf->physptr) { in update_mp_table()
912 mpf_new = early_memremap(0x400 - 16, sizeof(*mpf_new)); in update_mp_table()
917 pr_info("mpf new: %x\n", 0x400 - 16); in update_mp_table()
921 mpf->physptr = mpc_new_phys; in update_mp_table()
923 mpf->checksum = 0; in update_mp_table()
924 mpf->checksum -= mpf_checksum((unsigned char *)mpf, 16); in update_mp_table()
925 pr_info("physptr new: %x\n", mpf->physptr); in update_mp_table()