Lines Matching refs:subtable
670 static uint32_t acpi_get_subtable_entry_num(int type, ACPI_SUBTABLE_HEADER *subtable, in acpi_get_subtable_entry_num() argument
676 if (type == subtable->Type) { in acpi_get_subtable_entry_num()
679 offset += subtable->Length; in acpi_get_subtable_entry_num()
680 subtable = ACPI_ADD_PTR(ACPI_SUBTABLE_HEADER, base, offset); in acpi_get_subtable_entry_num()
682 if (!subtable->Length) { in acpi_get_subtable_entry_num()
695 ACPI_SUBTABLE_HEADER *subtable; in acpi_madt_entry_get() local
701 subtable = ACPI_ADD_PTR(ACPI_SUBTABLE_HEADER, base, offset); in acpi_madt_entry_get()
704 if (type == subtable->Type) { in acpi_madt_entry_get()
705 *tables = subtable; in acpi_madt_entry_get()
706 *num_inst = acpi_get_subtable_entry_num(type, subtable, offset, base, in acpi_madt_entry_get()
711 offset += subtable->Length; in acpi_madt_entry_get()
712 subtable = ACPI_ADD_PTR(ACPI_SUBTABLE_HEADER, base, offset); in acpi_madt_entry_get()
723 ACPI_DMAR_HEADER *subtable; in acpi_dmar_entry_get() local
730 subtable = ACPI_ADD_PTR(ACPI_DMAR_HEADER, base, offset); in acpi_dmar_entry_get()
732 if (type == subtable->Type) { in acpi_dmar_entry_get()
733 *tables = (struct acpi_subtable_header *)subtable; in acpi_dmar_entry_get()
736 offset += subtable->Length; in acpi_dmar_entry_get()
737 subtable = ACPI_ADD_PTR(ACPI_DMAR_HEADER, base, offset); in acpi_dmar_entry_get()
752 ACPI_DMAR_HEADER *subtable = ACPI_ADD_PTR(ACPI_DMAR_HEADER, dmar, offset); in acpi_dmar_foreach_subtable() local
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()
757 func(subtable, arg); in acpi_dmar_foreach_subtable()
759 offset += subtable->Length; in acpi_dmar_foreach_subtable()
806 static void subtable_handler(ACPI_DMAR_HEADER *subtable, void *arg) in subtable_handler() argument
810 if (subtable->Type == ACPI_DMAR_TYPE_HARDWARE_UNIT) { in subtable_handler()
813 hu = CONTAINER_OF(subtable, ACPI_DMAR_HARDWARE_UNIT, Header); in subtable_handler()
842 ACPI_DMAR_DEVICE_SCOPE *subtable; in acpi_drhd_get() local
863 subtable = ACPI_ADD_PTR(ACPI_DMAR_DEVICE_SCOPE, base, offset); 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()
870 dev_path = ACPI_ADD_PTR(ACPI_DMAR_PCI_PATH, subtable, 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()
900 if (dev_scope && subtable) { in acpi_drhd_get()
901 memcpy(dev_scope, subtable, sizeof(struct acpi_dmar_device_scope)); in acpi_drhd_get()