Skip to content

Commit 0db89fa

Browse files
yu-chen-surfrafaeljw
authored andcommitted
ACPI: Introduce Platform Firmware Runtime Update device driver
Introduce the pfr_update driver which can be used for Platform Firmware Runtime code injection and driver update [1]. The user is expected to provide the EFI capsule, and pass it to the driver by writing the capsule to a device special file. The capsule is transferred by the driver to the platform firmware with the help of an ACPI _DSM method under the special ACPI Platform Firmware Runtime Update device (INTC1080), and the actual firmware update is carried out by the low-level Management Mode code in the platform firmware. This change allows certain pieces of the platform firmware to be updated on the fly while the system is running (runtime) without the need to restart it, which is key in the cases when the system needs to be available 100% of the time and it cannot afford the downtime related to restarting it, or when the work carried out by the system is particularly important, so it cannot be interrupted, and it is not practical to wait until it is complete. Link: https://uefi.org/sites/default/files/resources/Intel_MM_OS_Interface_Spec_Rev100.pdf # [1] Tested-by: Hongyu Ning <[email protected]> Signed-off-by: Chen Yu <[email protected]> [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 1882de7 commit 0db89fa

File tree

5 files changed

+769
-0
lines changed

5 files changed

+769
-0
lines changed

Documentation/userspace-api/ioctl/ioctl-number.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ Code Seq# Include File Comments
367367
368368
0xE5 00-3F linux/fuse.h
369369
0xEC 00-01 drivers/platform/chrome/cros_ec_dev.h ChromeOS EC driver
370+
0xEE 00-09 uapi/linux/pfrut.h Platform Firmware Runtime Update and Telemetry
370371
0xF3 00-3F drivers/usb/misc/sisusbvga/sisusb.h sisfb (in development)
371372
372373
0xF6 all LTTng Linux Trace Toolkit Next Generation

drivers/acpi/Kconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,24 @@ config ACPI_CONFIGFS
517517
userspace. The configurable ACPI groups will be visible under
518518
/config/acpi, assuming configfs is mounted under /config.
519519

520+
config ACPI_PFRUT
521+
tristate "ACPI Platform Firmware Runtime Update and Telemetry"
522+
depends on 64BIT
523+
help
524+
This mechanism allows certain pieces of the platform firmware
525+
to be updated on the fly while the system is running (runtime)
526+
without the need to restart it, which is key in the cases when
527+
the system needs to be available 100% of the time and it cannot
528+
afford the downtime related to restarting it, or when the work
529+
carried out by the system is particularly important, so it cannot
530+
be interrupted, and it is not practical to wait until it is complete.
531+
532+
The existing firmware code can be modified (driver update) or
533+
extended by adding new code to the firmware (code injection).
534+
535+
To compile this driver as module, choose M here:
536+
the module will be called pfr_update.
537+
520538
if ARM64
521539
source "drivers/acpi/arm64/Kconfig"
522540

drivers/acpi/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ obj-$(CONFIG_ACPI_CPPC_LIB) += cppc_acpi.o
102102
obj-$(CONFIG_ACPI_SPCR_TABLE) += spcr.o
103103
obj-$(CONFIG_ACPI_DEBUGGER_USER) += acpi_dbg.o
104104
obj-$(CONFIG_ACPI_PPTT) += pptt.o
105+
obj-$(CONFIG_ACPI_PFRUT) += pfr_update.o
105106

106107
# processor has its own "processor." module_param namespace
107108
processor-y := processor_driver.o

0 commit comments

Comments
 (0)