acpi: fpdt: Generate the table
Add an ACPI writer to automatically generate the FPDT table with boot timing information when ACPI tables are created. This allows the OS to read firmware boot-timing metrics from the FPDT table. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -785,3 +785,18 @@ int acpi_fix_fpdt_checksum(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* this board lacks the bootstage timer */
|
||||
#ifndef CONFIG_TARGET_QEMU_VIRT
|
||||
|
||||
static int acpi_create_fpdt(struct acpi_ctx *ctx,
|
||||
const struct acpi_writer *entry)
|
||||
{
|
||||
u64 uboot_start;
|
||||
|
||||
uboot_start = bootstage_get_time(BOOTSTAGE_ID_START_UBOOT_F);
|
||||
|
||||
return acpi_write_fpdt(ctx, uboot_start);
|
||||
}
|
||||
ACPI_WRITER(6fpdt, "FPDT", acpi_create_fpdt, 0);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user