On Thu, 11 Jun 2020 10:25:38 -0400 Stefan Berger <stef...@linux.ibm.com> wrote:
> On 6/11/20 9:59 AM, Eric Auger wrote: [...] > > - tpm2_ptr->log_area_minimum_length = > > - cpu_to_le32(TPM_LOG_AREA_MINIMUM_SIZE); > > + /* Platform Specific Parameters */ > > + g_array_append_vals(table_data, &start_method_params, > > + ARRAY_SIZE(start_method_params)); > > > > - acpi_data_push(tcpalog, > > le32_to_cpu(tpm2_ptr->log_area_minimum_length)); > > + /* Log Area Minimum Length */ > > + build_append_int_noprefix(table_data, TPM_LOG_AREA_MINIMUM_SIZE, 4); > > Here you push data related to TPM2 table... > > > > + > > + acpi_data_push(tcpalog, TPM_LOG_AREA_MINIMUM_SIZE); > > ... here you push log area memory ... > > > > bios_linker_loader_alloc(linker, ACPI_BUILD_TPMLOG_FILE, tcpalog, 1, > > false); > > > > - /* log area start address to be filled by Guest linker */ > > + log_addr_offset = table_data->len; > > + build_append_int_noprefix(table_data, 0, 8); > > > ... here you push TPM2 table related data again. Is this right or did we > just mess up the TPM 2 table? it's 2 differnt blobs tcpalog and table_data > > > > + /* Log Area Start Address to be filled by Guest linker */ > > bios_linker_loader_add_pointer(linker, ACPI_BUILD_TABLE_FILE, > > - log_addr_offset, log_addr_size, > > + log_addr_offset, 8, > > ACPI_BUILD_TPMLOG_FILE, 0); > > build_header(linker, table_data, > > - (void *)tpm2_ptr, "TPM2", sizeof(*tpm2_ptr), 4, NULL, > > NULL); > > + tpm2_ptr, "TPM2", table_data->len - tpm2_start, 4, NULL, > > NULL); > > } > > > > #define HOLE_640K_START (640 * KiB) > >