Lines Matching +full:hall +full:- +full:switch +full:-
1 // SPDX-License-Identifier: GPL-2.0-or-later
9 * Kylene Hall <kjhall@us.ibm.com>
12 * Maintained by: <tpmdd-devel@lists.sourceforge.net>
54 len -= sizeof(*event_header); in tpm_is_tpm2_log()
59 efispecid = (struct tcg_efi_specid_event_head *)event_header->event; in tpm_is_tpm2_log()
61 n = memcmp(efispecid->signature, TCG_SPECID_SIG, in tpm_is_tpm2_log()
79 log = &chip->log; in tpm_read_log_acpi()
84 if (!chip->acpi_dev_handle) in tpm_read_log_acpi()
85 return -ENODEV; in tpm_read_log_acpi()
87 if (chip->flags & TPM_CHIP_FLAG_TPM2) { in tpm_read_log_acpi()
91 return -ENODEV; in tpm_read_log_acpi()
93 if (tbl->header.length < in tpm_read_log_acpi()
96 return -ENODEV; in tpm_read_log_acpi()
100 len = tpm2_phy->log_area_minimum_length; in tpm_read_log_acpi()
102 start = tpm2_phy->log_area_start_address; in tpm_read_log_acpi()
105 return -ENODEV; in tpm_read_log_acpi()
115 return -ENODEV; in tpm_read_log_acpi()
117 switch (buff->platform_class) { in tpm_read_log_acpi()
119 len = buff->server.log_max_len; in tpm_read_log_acpi()
120 start = buff->server.log_start_addr; in tpm_read_log_acpi()
124 len = buff->client.log_max_len; in tpm_read_log_acpi()
125 start = buff->client.log_start_addr; in tpm_read_log_acpi()
134 dev_warn(&chip->dev, "%s: TCPA log area empty\n", __func__); in tpm_read_log_acpi()
135 return -EIO; in tpm_read_log_acpi()
139 log->bios_event_log = devm_kmalloc(&chip->dev, len, GFP_KERNEL); in tpm_read_log_acpi()
140 if (!log->bios_event_log) in tpm_read_log_acpi()
141 return -ENOMEM; in tpm_read_log_acpi()
143 log->bios_event_log_end = log->bios_event_log + len; in tpm_read_log_acpi()
147 dev_warn(&chip->dev, "%s: Failed to map ACPI memory\n", __func__); in tpm_read_log_acpi()
149 ret = -ENODEV; in tpm_read_log_acpi()
153 memcpy_fromio(log->bios_event_log, virt, len); in tpm_read_log_acpi()
157 if (chip->flags & TPM_CHIP_FLAG_TPM2 && in tpm_read_log_acpi()
158 !tpm_is_tpm2_log(log->bios_event_log, len)) { in tpm_read_log_acpi()
160 ret = -ENODEV; in tpm_read_log_acpi()
167 devm_kfree(&chip->dev, log->bios_event_log); in tpm_read_log_acpi()
168 log->bios_event_log = NULL; in tpm_read_log_acpi()