Lines Matching +full:no +full:- +full:error +full:- +full:irq
4 * SPDX-License-Identifier: Apache-2.0
39 return -EIO; in check_init_status()
152 LOG_ERR("No ACPI node with given name: %s", bus_name); in acpi_evaluate_method()
156 if (handle->Type != ACPI_TYPE_DEVICE) { in acpi_evaluate_method()
157 LOG_ERR("No ACPI node foud with given name: %s", bus_name); in acpi_evaluate_method()
166 LOG_ERR("No entry for the ACPI node with given name: %s", bus_name); in acpi_evaluate_method()
188 LOG_WRN("error While executing \\_pic method: %d", status); in acpi_enable_pic_mode()
219 if (!(dev_info->Valid & ACPI_VALID_HID)) { in dev_resource_enum_callback()
224 child_dev->handle = obj_handle; in dev_resource_enum_callback()
225 child_dev->dev_info = dev_info; in dev_resource_enum_callback()
229 LOG_ERR("No memory for path_name"); in dev_resource_enum_callback()
233 child_dev->path = path_name; in dev_resource_enum_callback()
243 child_dev->res_lst = rt_buffer.Pointer; in dev_resource_enum_callback()
274 LOG_ERR("Error in acpi table init:%d", status); in acpi_early_init()
275 return -EIO; in acpi_early_init()
293 return -EAGAIN; in acpi_current_resource_get()
299 return -ENOTSUP; in acpi_current_resource_get()
308 return -ENOTSUP; in acpi_current_resource_get()
326 return -EAGAIN; in acpi_possible_resource_get()
332 return -ENOTSUP; in acpi_possible_resource_get()
364 LOG_DBG("Device irq info: slot:%d pin:%d", slot, pin); in acpi_legacy_irq_get()
369 LOG_DBG("[%d]Device irq info: slot:%d pin:%d irq:%d", i, slot, pin, in acpi_legacy_irq_get()
387 LOG_ERR("no such PCI bus device %s %s", hid, uid); in acpi_legacy_irq_init()
388 return -ENODEV; in acpi_legacy_irq_init()
391 node = acpi_evaluate_method(child_dev->path, METHOD_NAME__PRT); in acpi_legacy_irq_init()
393 LOG_ERR("Evaluation failed for given device: %s", child_dev->path); in acpi_legacy_irq_init()
394 return -ENODEV; in acpi_legacy_irq_init()
402 LOG_ERR("unable to retrieve IRQ Routing Table: %s", child_dev->path); in acpi_legacy_irq_init()
403 return -EIO; in acpi_legacy_irq_init()
406 if (rt_table->Source[0]) { in acpi_legacy_irq_init()
414 return -ENOENT; in acpi_legacy_irq_init()
422 /* mark the PRT irq numbers as reserved. */ in acpi_legacy_irq_init()
434 if (!res->Length) { in acpi_resource_parse()
437 } else if (res->Type == res_type) { in acpi_resource_parse()
441 } while (res->Type != ACPI_RESOURCE_TYPE_END_TAG); in acpi_resource_parse()
443 if (res->Type == ACPI_RESOURCE_TYPE_END_TAG) { in acpi_resource_parse()
452 ACPI_RESOURCE *res = acpi_resource_parse(child_dev->res_lst, ACPI_RESOURCE_TYPE_IRQ); in acpi_device_irq_get()
455 res = acpi_resource_parse(child_dev->res_lst, ACPI_RESOURCE_TYPE_EXTENDED_IRQ); in acpi_device_irq_get()
457 return -ENODEV; in acpi_device_irq_get()
460 if (res->Data.ExtendedIrq.InterruptCount > irq_res->irq_vector_max) { in acpi_device_irq_get()
461 return -ENOMEM; in acpi_device_irq_get()
464 irq_res->irq_vector_max = res->Data.ExtendedIrq.InterruptCount; in acpi_device_irq_get()
465 for (int i = 0; i < irq_res->irq_vector_max; i++) { in acpi_device_irq_get()
466 irq_res->irqs[i] = (uint16_t)res->Data.ExtendedIrq.Interrupts[i]; in acpi_device_irq_get()
469 irq_res->flags = arch_acpi_encode_irq_flags(res->Data.ExtendedIrq.Polarity, in acpi_device_irq_get()
470 res->Data.ExtendedIrq.Triggering); in acpi_device_irq_get()
472 if (res->Data.Irq.InterruptCount > irq_res->irq_vector_max) { in acpi_device_irq_get()
473 return -ENOMEM; in acpi_device_irq_get()
476 irq_res->irq_vector_max = res->Data.Irq.InterruptCount; in acpi_device_irq_get()
477 for (int i = 0; i < irq_res->irq_vector_max; i++) { in acpi_device_irq_get()
478 irq_res->irqs[i] = (uint16_t)res->Data.Irq.Interrupts[i]; in acpi_device_irq_get()
481 irq_res->flags = arch_acpi_encode_irq_flags(res->Data.ExtendedIrq.Polarity, in acpi_device_irq_get()
482 res->Data.ExtendedIrq.Triggering); in acpi_device_irq_get()
490 ACPI_RESOURCE *res = child_dev->res_lst; in acpi_device_mmio_get()
491 struct acpi_reg_base *reg_base = mmio_res->reg_base; in acpi_device_mmio_get()
495 if (!res->Length) { in acpi_device_mmio_get()
500 switch (res->Type) { in acpi_device_mmio_get()
503 reg_base[mmio_cnt].port = (uint32_t)res->Data.Io.Minimum; in acpi_device_mmio_get()
504 reg_base[mmio_cnt++].length = res->Data.Io.AddressLength; in acpi_device_mmio_get()
509 reg_base[mmio_cnt].port = (uint32_t)res->Data.FixedIo.Address; in acpi_device_mmio_get()
510 reg_base[mmio_cnt++].length = res->Data.FixedIo.AddressLength; in acpi_device_mmio_get()
515 reg_base[mmio_cnt].mmio = (uintptr_t)res->Data.Memory24.Minimum; in acpi_device_mmio_get()
516 reg_base[mmio_cnt++].length = res->Data.Memory24.AddressLength; in acpi_device_mmio_get()
521 reg_base[mmio_cnt].mmio = (uintptr_t)res->Data.Memory32.Minimum; in acpi_device_mmio_get()
522 reg_base[mmio_cnt++].length = res->Data.Memory32.AddressLength; in acpi_device_mmio_get()
527 reg_base[mmio_cnt].mmio = (uintptr_t)res->Data.FixedMemory32.Address; in acpi_device_mmio_get()
528 reg_base[mmio_cnt++].length = res->Data.FixedMemory32.AddressLength; in acpi_device_mmio_get()
533 if (mmio_cnt >= mmio_res->mmio_max && in acpi_device_mmio_get()
534 res->Type != ACPI_RESOURCE_TYPE_END_TAG) { in acpi_device_mmio_get()
535 return -ENOMEM; in acpi_device_mmio_get()
537 } while (res->Type != ACPI_RESOURCE_TYPE_END_TAG); in acpi_device_mmio_get()
540 return -ENODEV; in acpi_device_mmio_get()
543 mmio_res->mmio_max = mmio_cnt; in acpi_device_mmio_get()
552 switch (res->Type) { in acpi_res_type()
592 if (!res->Length) { in acpi_device_type_get()
593 LOG_ERR("Error: zero length found!"); in acpi_device_type_get()
601 } while (res->Type != ACPI_RESOURCE_TYPE_END_TAG); in acpi_device_type_get()
619 if (!child_dev->path) { in acpi_device_get()
624 if (!child_dev->res_lst || !child_dev->dev_info || in acpi_device_get()
625 !child_dev->dev_info->HardwareId.Length) { in acpi_device_get()
629 if (!strcmp(hid, child_dev->dev_info->HardwareId.String)) { in acpi_device_get()
630 if (uid && child_dev->dev_info->UniqueId.Length) { in acpi_device_get()
631 if (!strcmp(child_dev->dev_info->UniqueId.String, uid)) { in acpi_device_get()
676 if (type == subtable->Type) { in acpi_get_subtable_entry_num()
679 offset += subtable->Length; in acpi_get_subtable_entry_num()
682 if (!subtable->Length) { in acpi_get_subtable_entry_num()
698 return -EIO; in acpi_madt_entry_get()
702 while (offset < madt->Length) { in acpi_madt_entry_get()
704 if (type == subtable->Type) { in acpi_madt_entry_get()
707 madt->Length); in acpi_madt_entry_get()
711 offset += subtable->Length; in acpi_madt_entry_get()
715 return -ENODEV; in acpi_madt_entry_get()
726 LOG_ERR("error on get DMAR table"); in acpi_dmar_entry_get()
727 return -EIO; in acpi_dmar_entry_get()
731 while (offset < dmar->Header.Length) { in acpi_dmar_entry_get()
732 if (type == subtable->Type) { in acpi_dmar_entry_get()
736 offset += subtable->Length; in acpi_dmar_entry_get()
740 return -ENODEV; in acpi_dmar_entry_get()
746 uint16_t length = dmar->Header.Length; in acpi_dmar_foreach_subtable()
754 __ASSERT_NO_MSG(subtable->Length >= sizeof(*subtable)); in acpi_dmar_foreach_subtable()
755 __ASSERT_NO_MSG(subtable->Length <= length - offset); in acpi_dmar_foreach_subtable()
759 offset += subtable->Length; in acpi_dmar_foreach_subtable()
766 uint16_t length = hu->Header.Length; in acpi_dmar_foreach_devscope()
775 __ASSERT_NO_MSG(devscope->Length >= sizeof(*devscope)); in acpi_dmar_foreach_devscope()
776 __ASSERT_NO_MSG(devscope->Length <= length - offset); in acpi_dmar_foreach_devscope()
780 offset += devscope->Length; in acpi_dmar_foreach_devscope()
791 if (devscope->EntryType == ACPI_DMAR_SCOPE_TYPE_IOAPIC) { in devscope_handler()
798 pci_path.bits.bus = devscope->Bus; in devscope_handler()
799 pci_path.bits.device = dev_path->Device; in devscope_handler()
800 pci_path.bits.function = dev_path->Function; in devscope_handler()
810 if (subtable->Type == ACPI_DMAR_TYPE_HARDWARE_UNIT) { in subtable_handler()
824 return -ENODEV; in acpi_dmar_ioapic_get()
833 return -ENOENT; in acpi_dmar_ioapic_get()
851 LOG_ERR("Error on retrieve DMAR table"); in acpi_drhd_get()
855 scope_size = drdh->Length - sizeof(ACPI_DMAR_HARDWARE_UNIT); in acpi_drhd_get()
864 if (!subtable->Length) { in acpi_drhd_get()
868 if (scope == subtable->EntryType) { in acpi_drhd_get()
869 num_path = (subtable->Length - 6u) / 2u; in acpi_drhd_get()
873 while (num_path--) { in acpi_drhd_get()
876 return -ENOBUFS; in acpi_drhd_get()
878 dmar_id[i].bits.bus = subtable->Bus; in acpi_drhd_get()
886 offset += subtable->Length; in acpi_drhd_get()
888 if (scope_size < subtable->Length) { in acpi_drhd_get()
891 scope_size -= subtable->Length; in acpi_drhd_get()
896 LOG_ERR("Error on retrieve DRHD Info"); in acpi_drhd_get()
897 return -ENODEV; in acpi_drhd_get()
917 /* Error on MAD table. */ in acpi_local_apic_get()
927 cpu_num--; in acpi_local_apic_get()
944 LOG_ERR("error While executing %s method: %d", path, status); in acpi_invoke_method()
945 return -EIO; in acpi_invoke_method()
962 LOG_ERR("Error in ACPI init:%d", status); in acpi_init()
969 LOG_WRN("Error in enable pic mode acpi method:%d", status); in acpi_init()