Lines Matching refs:log

136 		     const u8 *event, u8 *log)  in tcg2_log_append()  argument
143 put_unaligned_le32(pcr_index, log); in tcg2_log_append()
145 put_unaligned_le32(event_type, log + pos); in tcg2_log_append()
148 put_unaligned_le32(digest_list->count, log + pos); in tcg2_log_append()
160 put_unaligned_le16(hash_alg, log + pos); in tcg2_log_append()
162 memcpy(log + pos, (u8 *)&digest_list->digests[i].digest, len); in tcg2_log_append()
166 put_unaligned_le32(size, log + pos); in tcg2_log_append()
168 memcpy(log + pos, event, size); in tcg2_log_append()
177 u8 *log; in tcg2_log_append_check() local
186 log = elog->log + elog->log_position; in tcg2_log_append_check()
189 tcg2_log_append(pcr_index, event_type, digest_list, size, event, log); in tcg2_log_append_check()
197 struct tcg_pcr_event *log; in tcg2_log_init() local
240 log = (struct tcg_pcr_event *)elog->log; in tcg2_log_init()
241 put_unaligned_le32(0, &log->pcr_index); in tcg2_log_init()
242 put_unaligned_le32(EV_NO_ACTION, &log->event_type); in tcg2_log_init()
243 memset(&log->digest, 0, sizeof(log->digest)); in tcg2_log_init()
244 put_unaligned_le32(event_size, &log->event_size); in tcg2_log_init()
246 ev = (struct tcg_efi_spec_id_event *)log->event; in tcg2_log_init()
292 u8 *log; in tcg2_replay_eventlog() local
297 log = elog->log + log_position; in tcg2_replay_eventlog()
300 pcr = get_unaligned_le32(log + pos); in tcg2_replay_eventlog()
302 if (!get_unaligned_le32(log + pos)) in tcg2_replay_eventlog()
307 count = get_unaligned_le32(log + pos); in tcg2_replay_eventlog()
319 algo = get_unaligned_le16(log + pos); in tcg2_replay_eventlog()
338 log + pos, len); in tcg2_replay_eventlog()
347 event_size = get_unaligned_le32(log + pos); in tcg2_replay_eventlog()
370 struct tcg_pcr_event *log; in tcg2_log_parse() local
386 log = (struct tcg_pcr_event *)elog->log; in tcg2_log_parse()
387 if (get_unaligned_le32(&log->pcr_index) != 0 || in tcg2_log_parse()
388 get_unaligned_le32(&log->event_type) != EV_NO_ACTION) in tcg2_log_parse()
391 for (i = 0; i < sizeof(log->digest); i++) { in tcg2_log_parse()
392 if (log->digest[i]) in tcg2_log_parse()
396 evsz = get_unaligned_le32(&log->event_size); in tcg2_log_parse()
401 event = (struct tcg_efi_spec_id_event *)log->event; in tcg2_log_parse()
553 struct tcg2_event_log log; in tcg2_log_prepare_buffer() local
559 rc = tcg2_platform_get_log(dev, (void **)&log.log, &log.log_size); in tcg2_log_prepare_buffer()
561 log.log_position = 0; in tcg2_log_prepare_buffer()
562 log.found = false; in tcg2_log_prepare_buffer()
565 rc = tcg2_log_parse(dev, &log); in tcg2_log_prepare_buffer()
571 if (log.found) { in tcg2_log_prepare_buffer()
572 if (elog->log_size < log.log_position) in tcg2_log_prepare_buffer()
579 memcpy(elog->log, log.log, log.log_position); in tcg2_log_prepare_buffer()
582 unmap_physmem(log.log, MAP_NOCACHE); in tcg2_log_prepare_buffer()
584 elog->log = log.log; in tcg2_log_prepare_buffer()
585 elog->log_size = log.log_size; in tcg2_log_prepare_buffer()
588 elog->log_position = log.log_position; in tcg2_log_prepare_buffer()
589 elog->found = log.found; in tcg2_log_prepare_buffer()
643 if (elog->log) in tcg2_measurement_term()
644 unmap_physmem(elog->log, MAP_NOCACHE); in tcg2_measurement_term()