Lines Matching full:record
109 * firmware record.
119 * * Extract a pointer to the start of the record area
172 /* extract a pointer to the record area, which just follows the main in pldm_parse_header()
250 * @record: pointer to the record this TLV belongs too
259 pldm_parse_desc_tlvs(struct pldmfw_priv *data, struct pldmfw_record *record, u8 desc_count) in pldm_parse_desc_tlvs() argument
298 list_add_tail(&desc->entry, &record->descs); in pldm_parse_desc_tlvs()
305 * pldm_parse_one_record - Verify size of one PLDM record
307 * @__record: pointer to the record to check
309 * This function checks that the record size does not exceed either the size
312 * It also verifies that the recorded length of the start of the record
323 struct pldmfw_record *record; in pldm_parse_one_record() local
330 /* Make a copy and insert it into the record list */ in pldm_parse_one_record()
331 record = kzalloc(sizeof(*record), GFP_KERNEL); in pldm_parse_one_record()
332 if (!record) in pldm_parse_one_record()
335 INIT_LIST_HEAD(&record->descs); in pldm_parse_one_record()
336 list_add_tail(&record->entry, &data->records); in pldm_parse_one_record()
344 record->package_data_len = get_unaligned_le16(&__record->package_data_len); in pldm_parse_one_record()
345 record->version_len = __record->version_len; in pldm_parse_one_record()
346 record->version_type = __record->version_type; in pldm_parse_one_record()
355 record->component_bitmap_len = data->component_bitmap_len; in pldm_parse_one_record()
356 record->component_bitmap = bitmap_zalloc(record->component_bitmap_len, in pldm_parse_one_record()
358 if (!record->component_bitmap) in pldm_parse_one_record()
362 bitmap_set_value8(record->component_bitmap, bitmap_ptr[i], i * 8); in pldm_parse_one_record()
364 record->version_string = data->fw->data + data->offset; in pldm_parse_one_record()
366 err = pldm_move_fw_offset(data, record->version_len); in pldm_parse_one_record()
371 err = pldm_parse_desc_tlvs(data, record, __record->descriptor_count); in pldm_parse_one_record()
375 record->package_data = data->fw->data + data->offset; in pldm_parse_one_record()
377 err = pldm_move_fw_offset(data, record->package_data_len); in pldm_parse_one_record()
383 …dev_dbg(data->context->dev, "Unexpected record length. Measured record length is %zu bytes, expect… in pldm_parse_one_record()
395 * Extract the record count, and loop through each record, searching for the
403 const struct __pldmfw_record_info *record; in pldm_parse_records() local
407 pldm_for_each_record(i, record, data->record_start, data->record_count) { in pldm_parse_records()
408 err = pldm_parse_one_record(data, record); in pldm_parse_records()
414 * PLDM device record data. in pldm_parse_records()
541 * allocated descriptor, record, and component.
546 struct pldmfw_record *record, *r_safe; in pldmfw_free_priv() local
554 list_for_each_entry_safe(record, r_safe, &data->records, entry) { in pldmfw_free_priv()
555 list_for_each_entry_safe(desc, d_safe, &record->descs, entry) { in pldmfw_free_priv()
560 if (record->component_bitmap) { in pldmfw_free_priv()
561 bitmap_free(record->component_bitmap); in pldmfw_free_priv()
562 record->component_bitmap = NULL; in pldmfw_free_priv()
565 list_del(&record->entry); in pldmfw_free_priv()
566 kfree(record); in pldmfw_free_priv()
615 * pldmfw_op_pci_match_record - Check if a PCI device matches the record
617 * @record: list of records extracted from the PLDM image
619 * Determine of the PCI device associated with this device matches the record
626 * Returns: true if the device matches the record, false otherwise.
628 bool pldmfw_op_pci_match_record(struct pldmfw *context, struct pldmfw_record *record) in pldmfw_op_pci_match_record() argument
639 list_for_each_entry(desc, &record->descs, entry) { in pldmfw_op_pci_match_record()
663 * used when the record should ignore this field when matching in pldmfw_op_pci_match_record()
664 * device. For example if the record applies to any subsystem in pldmfw_op_pci_match_record()
684 * pldm_find_matching_record - Find the first matching PLDM record
690 * Store a pointer to the matching record, if found.
692 * Returns: zero on success, or -ENOENT if no matching record is found.
696 struct pldmfw_record *record; in pldm_find_matching_record() local
698 list_for_each_entry(record, &data->records, entry) { in pldm_find_matching_record()
699 if (data->context->ops->match_record(data->context, record)) { in pldm_find_matching_record()
700 data->matching_record = record; in pldm_find_matching_record()
709 * pldm_send_package_data - Send firmware the package data for the record
712 * Send the package data associated with the matching record to the firmware,
720 struct pldmfw_record *record = data->matching_record; in pldm_send_package_data() local
723 return ops->send_package_data(data->context, record->package_data, in pldm_send_package_data()
724 record->package_data_len); in pldm_send_package_data()
774 * Loop through each component that is active for the matching device record,
826 * Extract the device record Package Data and Component Tables and send them