Lines Matching +full:hp +full:- +full:cfg

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * boot.c - Architecture-Specific Low-Level ACPI Boot Support
22 #include <linux/efi-bgrt.h>
74 * ->device_hotplug_lock
75 * ->acpi_ioapic_lock
76 * ->ioapic_lock
78 * ->acpi_ioapic_lock
79 * ->ioapic_mutex
80 * ->ioapic_lock
85 /* --------------------------------------------------------------------------
86 Boot-time Configuration
87 -------------------------------------------------------------------------- */
131 return -EINVAL; in acpi_parse_madt()
136 return -ENODEV; in acpi_parse_madt()
139 if (madt->address) { in acpi_parse_madt()
140 acpi_lapic_addr = (u64) madt->address; in acpi_parse_madt()
142 pr_debug("Local APIC address 0x%08x\n", madt->address); in acpi_parse_madt()
145 if (madt->flags & ACPI_MADT_PCAT_COMPAT) in acpi_parse_madt()
154 default_acpi_madt_oem_check(madt->header.oem_id, in acpi_parse_madt()
155 madt->header.oem_table_id); in acpi_parse_madt()
184 return -EINVAL; in acpi_parse_x2apic()
186 acpi_table_print_madt_entry(&header->common); in acpi_parse_x2apic()
189 apic_id = processor->local_apic_id; in acpi_parse_x2apic()
190 enabled = processor->lapic_flags & ACPI_MADT_ENABLED; in acpi_parse_x2apic()
197 if (!acpi_is_processor_usable(processor->lapic_flags)) in acpi_parse_x2apic()
201 …://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html#processor-local-x2apic-structure in acpi_parse_x2apic()
221 topology_register_apic(apic_id, processor->uid, enabled); in acpi_parse_x2apic()
237 return -EINVAL; in acpi_parse_lapic()
239 acpi_table_print_madt_entry(&header->common); in acpi_parse_lapic()
242 if (processor->id == 0xff) in acpi_parse_lapic()
246 if (!acpi_is_processor_usable(processor->lapic_flags)) in acpi_parse_lapic()
256 topology_register_apic(processor->id, /* APIC ID */ in acpi_parse_lapic()
257 processor->processor_id, /* ACPI ID */ in acpi_parse_lapic()
258 processor->lapic_flags & ACPI_MADT_ENABLED); in acpi_parse_lapic()
272 return -EINVAL; in acpi_parse_sapic()
274 acpi_table_print_madt_entry(&header->common); in acpi_parse_sapic()
276 topology_register_apic((processor->id << 8) | processor->eid,/* APIC ID */ in acpi_parse_sapic()
277 processor->processor_id, /* ACPI ID */ in acpi_parse_sapic()
278 processor->lapic_flags & ACPI_MADT_ENABLED); in acpi_parse_sapic()
292 return -EINVAL; in acpi_parse_lapic_addr_ovr()
294 acpi_table_print_madt_entry(&header->common); in acpi_parse_lapic_addr_ovr()
296 acpi_lapic_addr = lapic_addr_ovr->address; in acpi_parse_lapic_addr_ovr()
310 return -EINVAL; in acpi_parse_x2apic_nmi()
312 acpi_table_print_madt_entry(&header->common); in acpi_parse_x2apic_nmi()
314 if (x2apic_nmi->lint != 1) in acpi_parse_x2apic_nmi()
328 return -EINVAL; in acpi_parse_lapic_nmi()
330 acpi_table_print_madt_entry(&header->common); in acpi_parse_lapic_nmi()
332 if (lapic_nmi->lint != 1) in acpi_parse_lapic_nmi()
393 number = pdev->bus->number; in mp_config_acpi_gsi()
394 devfn = pdev->devfn; in mp_config_acpi_gsi()
395 pin = pdev->pin; in mp_config_acpi_gsi()
402 mp_irq.srcbusirq = (((devfn >> 3) & 0x1f) << 2) | ((pin - 1) & 3); in mp_config_acpi_gsi()
443 struct ioapic_domain_cfg cfg = { in acpi_parse_ioapic() local
451 return -EINVAL; in acpi_parse_ioapic()
453 acpi_table_print_madt_entry(&header->common); in acpi_parse_ioapic()
456 if (ioapic->global_irq_base < nr_legacy_irqs()) in acpi_parse_ioapic()
457 cfg.type = IOAPIC_DOMAIN_LEGACY; in acpi_parse_ioapic()
459 mp_register_ioapic(ioapic->id, ioapic->address, ioapic->global_irq_base, in acpi_parse_ioapic()
460 &cfg); in acpi_parse_ioapic()
476 /* Command-line over-ride via acpi_sci= */ in acpi_sci_ioapic_setup()
491 * stash over-ride to indicate we've been here in acpi_sci_ioapic_setup()
507 return -EINVAL; in acpi_parse_int_src_ovr()
509 acpi_table_print_madt_entry(&header->common); in acpi_parse_int_src_ovr()
511 if (intsrc->source_irq < NR_IRQS_LEGACY) in acpi_parse_int_src_ovr()
512 acpi_int_src_ovr[intsrc->source_irq] = true; in acpi_parse_int_src_ovr()
514 if (intsrc->source_irq == acpi_gbl_FADT.sci_interrupt) { in acpi_parse_int_src_ovr()
515 acpi_sci_ioapic_setup(intsrc->source_irq, in acpi_parse_int_src_ovr()
516 intsrc->inti_flags & ACPI_MADT_POLARITY_MASK, in acpi_parse_int_src_ovr()
517 (intsrc->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2, in acpi_parse_int_src_ovr()
518 intsrc->global_irq); in acpi_parse_int_src_ovr()
522 if (intsrc->source_irq == 0) { in acpi_parse_int_src_ovr()
528 if ((intsrc->global_irq == 2) && acpi_fix_pin2_polarity in acpi_parse_int_src_ovr()
529 && (intsrc->inti_flags & ACPI_MADT_POLARITY_MASK)) { in acpi_parse_int_src_ovr()
530 intsrc->inti_flags &= ~ACPI_MADT_POLARITY_MASK; in acpi_parse_int_src_ovr()
535 mp_override_legacy_irq(intsrc->source_irq, in acpi_parse_int_src_ovr()
536 intsrc->inti_flags & ACPI_MADT_POLARITY_MASK, in acpi_parse_int_src_ovr()
537 (intsrc->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2, in acpi_parse_int_src_ovr()
538 intsrc->global_irq); in acpi_parse_int_src_ovr()
551 return -EINVAL; in acpi_parse_nmi_src()
553 acpi_table_print_madt_entry(&header->common); in acpi_parse_nmi_src()
565 * use ELCR to set PIC-mode trigger type for SCI
567 * If a PIC-mode SCI is not recognized or gives spurious IRQ7's
568 * it may require Edge Trigger -- use "acpi_sci=edge"
570 * Port 0x4d0-4d1 are ELCR1 and ELCR2, the Edge/Level Control Registers
572 * ELCR1 is IRQs 0-7 (IRQ 0, 1, 2 must be 0)
573 * ELCR2 is IRQs 8-15 (IRQ 8, 13 must be 0)
596 case 1: /* Edge - clear */ in acpi_pic_sci_set_trigger()
599 case 3: /* Level - set */ in acpi_pic_sci_set_trigger()
644 return -1; in acpi_isa_irq_to_gsi()
652 * Make sure all (legacy) PCI IRQs are set as level-triggered. in acpi_register_gsi_pic()
787 int ret = -ENOSYS; in acpi_register_ioapic()
791 struct ioapic_domain_cfg cfg = { in acpi_register_ioapic() local
805 return -EINVAL; in acpi_register_ioapic()
811 ret = mp_register_ioapic(ioapic_id, phys_addr, gsi_base, &cfg); in acpi_register_ioapic()
821 int ret = -ENOSYS; in acpi_unregister_ioapic()
834 * acpi_ioapic_registered - Check whether IOAPIC associated with @gsi_base
859 sbf_port = sb->cmos_index; /* Save CMOS port */ in acpi_parse_sbf()
873 if (hpet_tbl->address.space_id != ACPI_SPACE_MEM) { in acpi_parse_hpet()
875 return -1; in acpi_parse_hpet()
878 hpet_address = hpet_tbl->address.address; in acpi_parse_hpet()
879 hpet_blockid = hpet_tbl->sequence; in acpi_parse_hpet()
886 pr_warn("HPET id: %#x base: %#lx is invalid\n", hpet_tbl->id, hpet_address); in acpi_parse_hpet()
898 hpet_tbl->id); in acpi_parse_hpet()
903 hpet_tbl->id); in acpi_parse_hpet()
907 pr_info("HPET id: %#x base: %#lx\n", hpet_tbl->id, hpet_address); in acpi_parse_hpet()
920 hpet_res->name = (void *)&hpet_res[1]; in acpi_parse_hpet()
921 hpet_res->flags = IORESOURCE_MEM; in acpi_parse_hpet()
922 snprintf((char *)hpet_res->name, HPET_RESOURCE_NAME_SIZE, "HPET %u", in acpi_parse_hpet()
923 hpet_tbl->sequence); in acpi_parse_hpet()
925 hpet_res->start = hpet_address; in acpi_parse_hpet()
926 hpet_res->end = hpet_address + (1 * 1024) - 1; in acpi_parse_hpet()
994 pr_info("PM-Timer IO Port: %#x\n", pmtmr_ioport); in acpi_parse_fadt()
1010 return -ENODEV; in early_acpi_parse_madt_lapic_addr_ovr()
1013 * Note that the LAPIC address is obtained from the MADT (32-bit value) in early_acpi_parse_madt_lapic_addr_ovr()
1014 * and (optionally) overridden by a LAPIC_ADDR_OVR entry (64-bit value). in early_acpi_parse_madt_lapic_addr_ovr()
1034 return -ENODEV; in acpi_parse_madt_lapic_entries()
1048 return -ENODEV; in acpi_parse_madt_lapic_entries()
1084 * Use the default configuration for the IRQs 0-15. Unless in mp_config_acpi_legacy_irqs()
1110 if (irq->srcbus == MP_ISA_BUS && irq->srcbusirq == i) in mp_config_acpi_legacy_irqs()
1114 if (irq->dstapic == dstapic && irq->dstirq == pin) in mp_config_acpi_legacy_irqs()
1145 * so if it is off, don't enumerate the io-apics with ACPI. in acpi_parse_madt_ioapic_entries()
1150 return -ENODEV; in acpi_parse_madt_ioapic_entries()
1153 return -ENODEV; in acpi_parse_madt_ioapic_entries()
1156 * if "noapic" boot option, don't look for IO-APICs in acpi_parse_madt_ioapic_entries()
1160 return -ENODEV; in acpi_parse_madt_ioapic_entries()
1167 return -ENODEV; in acpi_parse_madt_ioapic_entries()
1208 return -1; in acpi_parse_madt_ioapic_entries()
1227 if (error == -EINVAL) { in early_acpi_process_madt()
1253 * Parse MADT IO-APIC entries in acpi_process_madt()
1272 if (error == -EINVAL) { in acpi_process_madt()
1286 pr_warn("No APIC-table, disabling MPS\n"); in acpi_process_madt()
1292 * ACPI supports both logical (e.g. Hyper-Threading) and physical in acpi_process_madt()
1306 pr_notice("%s detected: force use of acpi=noirq\n", d->ident); in disable_acpi_irq()
1315 pr_notice("%s detected: force use of pci=noacpi\n", d->ident); in disable_acpi_pci()
1324 pr_notice("%s detected: force use of acpi=rsdt\n", d->ident); in disable_acpi_xsdt()
1335 pr_notice("%s detected: acpi off\n", d->ident); in dmi_disable_acpi()
1350 d->ident); in dmi_ignore_irq0_timer_override()
1361 * We initialize the Hardware-reduced ACPI model here:
1382 * works for you, please contact linux-acpi@vger.kernel.org
1438 .ident = "ASUS PR-DLS",
1441 DMI_MATCH(DMI_BOARD_NAME, "PR-DLS"),
1443 "ASUS PR-DLS ACPI BIOS Revision 1010"),
1460 .ident = "Advantech DAC-BJ01",
1471 /* second table for DMI checks that should run after early-quirks */
1474 * HP laptops which use a DSDT reporting as HP/SB400/10000,
1485 .ident = "HP nx6115 laptop",
1487 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
1488 DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq nx6115"),
1493 .ident = "HP NX6125 laptop",
1495 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
1496 DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq nx6125"),
1501 .ident = "HP NX6325 laptop",
1503 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
1504 DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq nx6325"),
1509 .ident = "HP 6715b laptop",
1511 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
1512 DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6715b"),
1531 * 3. enumerates io-apics
1556 * Initialize the ACPI boot-time table parser. in acpi_boot_table_init()
1592 * Hardware-reduced ACPI mode initialization: in early_acpi_boot_init()
1601 /* those are executed after early-quirks are executed */ in acpi_boot_init()
1637 return -EINVAL; in parse_acpi()
1643 /* acpi=force to over-ride black-list */ in parse_acpi()
1648 /* acpi=strict disables out-of-spec workarounds */ in parse_acpi()
1669 return -EINVAL; in parse_acpi()
1694 /* mptable code is not built-in*/ in acpi_mps_check()
1696 …pr_warn("MPS support code is not built-in, using acpi=off or acpi=noirq or pci=noacpi may have pro… in acpi_mps_check()
1722 return -EINVAL; in setup_acpi_sci()
1736 return -EINVAL; in setup_acpi_sci()
1754 return -1; in __acpi_acquire_global_lock()