Proposal: add sysfs nodes for retrieving information contained in ACPI 'Firmware Basic Boot Performance Data Record' as well as 'S3 Performance Table'. This will provide performance tools-- like systemd or pm-graph-- with a common interface to access the information contained in these ACPI tables. Backing up: The Firmware Performance Data Table (FPDT) is documented in the ACPI Spec v6.3[1] on page 209 (Section 5.2.23). The Spec records two "record types" for FPDT: 'Firmware Basic Boot Performance Pointer Record' and 'S3 Performance Table Pointer Record'. Mind that these are "pointer" records, meaning it's a layer of indirection-- the actual data is stored in other tables. Today, as of kernel v5.1, the platform's ACPI FPDT (if it exists) is exposed in sysfs under: /sys/firmware/acpi/tables/FPDT However, retrieval of the actual Firmware Boot and S3 data is left as an exercise to the user: e.g. systemd[2], pm-graph, or other like tools. The tool/user has to roll their own method for getting at the actual information, often requiring a trip into /dev/mem. [1] ACPI v6.3 Spec: https://uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf [2] Example: how systemd gets at FPDT: https://github.com/systemd/systemd/blob/1e5d2d656420d0e755dbcf72aeba3c3aba54e956/src/shared/acpi-fpdt.c#L64
The S3PT and FBPT records are what we need to get via sysfs. Right now the FPDT data includes pointers to these records which the user has to get manually from /dev/mem, so in theory if the kernel could read them for us and present them in sysfs that would be great. S3PT = S3 suspend performance table (firmware suspend/resume perf) FCPT = firmware boot performance table (firmware boot perf)
(In reply to Todd Brandt from comment #1) > The S3PT and FBPT records are what we need to get via sysfs. Right now the > FPDT data includes pointers to these records which the user has to get > manually from /dev/mem, so in theory if the kernel could read them for us > and present them in sysfs that would be great. > > S3PT = S3 suspend performance table (firmware suspend/resume perf) > FCPT = firmware boot performance table (firmware boot perf) s/FCPT/FBPT/
Patch reposted at https://patchwork.kernel.org/patch/11312819/ Mark bug as Resolved.