platform/x86/amd/pmf: Add support for PMF-TA interaction
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>
Tue, 12 Dec 2023 01:46:55 +0000 (07:16 +0530)
committerHans de Goede <hdegoede@redhat.com>
Mon, 18 Dec 2023 11:47:45 +0000 (12:47 +0100)
commitae82cef7d9c53cad0852d2d79d430b210432a025
tree2c96ced67c5d9c926dc9f998c88174dcf93911cb
parentac052d8c08f9da225bea09c7e71527831368462b
platform/x86/amd/pmf: Add support for PMF-TA interaction

PMF TA (Trusted Application) loads via the TEE environment into the
AMD ASP.

PMF-TA supports two commands:
1) Init: Initialize the TA with the PMF Smart PC policy binary and
start the policy engine. A policy is a combination of inputs and
outputs, where;
 - the inputs are the changing dynamics of the system like the user
   behaviour, system heuristics etc.
 - the outputs, which are the actions to be set on the system which
   lead to better power management and enhanced user experience.

PMF driver acts as a central manager in this case to supply the
inputs required to the TA (either by getting the information from
the other kernel subsystems or from userland)

2) Enact: Enact the output actions from the TA. The action could be
applying a new thermal limit to boost/throttle the power limits or
change system behavior.

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20231212014705.2017474-3-Shyam-sundar.S-k@amd.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/amd/pmf/pmf.h
drivers/platform/x86/amd/pmf/tee-if.c