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>
53 len -= sizeof(*event_header); in tpm_is_tpm2_log()
58 efispecid = (struct tcg_efi_specid_event_head *)event_header->event; in tpm_is_tpm2_log()
60 n = memcmp(efispecid->signature, TCG_SPECID_SIG, in tpm_is_tpm2_log()
78 log = &chip->log; in tpm_read_log_acpi()
83 if (!chip->acpi_dev_handle) in tpm_read_log_acpi()
84 return -ENODEV; in tpm_read_log_acpi()
86 if (chip->flags & TPM_CHIP_FLAG_TPM2) { in tpm_read_log_acpi()
90 return -ENODEV; in tpm_read_log_acpi()
92 if (tbl->header.length < in tpm_read_log_acpi()
94 return -ENODEV; in tpm_read_log_acpi()
97 len = tpm2_phy->log_area_minimum_length; in tpm_read_log_acpi()
99 start = tpm2_phy->log_area_start_address; in tpm_read_log_acpi()
101 return -ENODEV; in tpm_read_log_acpi()
109 return -ENODEV; in tpm_read_log_acpi()
111 switch (buff->platform_class) { in tpm_read_log_acpi()
113 len = buff->server.log_max_len; in tpm_read_log_acpi()
114 start = buff->server.log_start_addr; in tpm_read_log_acpi()
118 len = buff->client.log_max_len; in tpm_read_log_acpi()
119 start = buff->client.log_start_addr; in tpm_read_log_acpi()
126 dev_warn(&chip->dev, "%s: TCPA log area empty\n", __func__); in tpm_read_log_acpi()
127 return -EIO; in tpm_read_log_acpi()
131 log->bios_event_log = kmalloc(len, GFP_KERNEL); in tpm_read_log_acpi()
132 if (!log->bios_event_log) in tpm_read_log_acpi()
133 return -ENOMEM; in tpm_read_log_acpi()
135 log->bios_event_log_end = log->bios_event_log + len; in tpm_read_log_acpi()
137 ret = -EIO; in tpm_read_log_acpi()
142 memcpy_fromio(log->bios_event_log, virt, len); in tpm_read_log_acpi()
146 if (chip->flags & TPM_CHIP_FLAG_TPM2 && in tpm_read_log_acpi()
147 !tpm_is_tpm2_log(log->bios_event_log, len)) { in tpm_read_log_acpi()
149 ret = -ENODEV; in tpm_read_log_acpi()
156 kfree(log->bios_event_log); in tpm_read_log_acpi()
157 log->bios_event_log = NULL; in tpm_read_log_acpi()