arm-trusted-firmware/plat/xilinx/versal/pm_service
Tanmay Shah 1397967490 feat(versal): add common interfaces to handle EEMI commands
This change adds common interfaces to handle commands from firmware driver
to power management controller. It removes big chunk of source line of code
that was handling each command separately and doing same repetitive work.

EEMI - Embedded Energy Management Interface is Xilinx proprietary
protocol to allow communication between power management controller
and different processing clusters.

As of now, Each EEMI command has its own implementation in TF-A.
This is redundant. Essentially most EEMI command implementation
in TF-A  does same work. It prepares payload received from kernel, sends
payload to firmware, receives response from firmware and send response
back to kernel.

The same functionality can be achieved if common interface is used among
multiple EEMI commands. This change divides platform management related
SMCCC requests into 4 categories.

1) EEMI commands required for backward compatibility.

Some EEMI commands are still required for backward compatibility
until removed completely or its use is changed to accommodate
common interface

2) EEMI commands that require for PSCI interface and accessed from debugfs

For example EEMI calls related to CPU suspend/resume

3) TF-A specific requests

Functionality such as getting TF-A version and getting callback
data for platform management is handled by this interface

4) Common interface for rest of EEMI commands

This handlers performs payload and firmware response transaction job for
rest of EEMI commands. Also it parses module ID from SMC payload and inserts
in IPI request. If not module ID is found, then default is LIBPM_MODULE_ID.
This helps in making common path in TF-A for all the modules in PLM firmware

Change-Id: I57a2787c7fff9f2e1d1f9003b3daab092632d57e
Signed-off-by: Tanmay Shah <tanmay.shah@xilinx.com>
2022-04-27 01:43:41 +02:00
..
pm_api_sys.c feat(versal): add common interfaces to handle EEMI commands 2022-04-27 01:43:41 +02:00
pm_api_sys.h feat(versal): add common interfaces to handle EEMI commands 2022-04-27 01:43:41 +02:00
pm_client.c fix(xilinx): fix coding style violations 2022-03-09 09:14:33 +01:00
pm_defs.h feat(versal): add common interfaces to handle EEMI commands 2022-04-27 01:43:41 +02:00
pm_node.h xilinx: Add support to send PM API to PMC using IPI for versal 2020-01-15 11:01:37 -08:00
pm_svc_main.c feat(versal): add common interfaces to handle EEMI commands 2022-04-27 01:43:41 +02:00
pm_svc_main.h plat: send an sgi to communicate to linux 2021-04-22 22:47:17 +02:00