mbox series

[v3,0/2] PRM handler direct call interface

Message ID 20240730151731.15363-1-john.allen@amd.com (mailing list archive)
Headers show
Series PRM handler direct call interface | expand

Message

John Allen July 30, 2024, 3:17 p.m. UTC
Platform Runtime Mechanism (PRM) introduces a means for the AML
interpreter and OS drivers to invoke runtime handlers from platform
firmware in order to remove the need for certain classes of SMIs.
Further details can be seen in the PRM specification[1].

Future AMD platforms will implement a PRM module in firmware that will
include handlers for performing various types of address translation.
The address translation PRM module is documented in chapter 22 of the
publicly available "AMD Family 1Ah Models 00h–0Fh and Models 10h–1Fh
ACPI v6.5 Porting Guide"[2].

While the kernel currently has support for calling PRM handlers from the
AML interpreter, it does not support calling PRM handlers directly from
OS drivers. This series implements the direct call interface and uses it
for translating normalized addresses to system physical addresses.

Thanks,
John

[1]:
https://uefi.org/sites/default/files/resources/Platform%20Runtime%20Mechanism%20-%20with%20legal%20notice.pdf
[2]:
https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/programmer-references/58088-0.75-pub.pdf

Tree: git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Base commit: 8400291e289ee6b2bf9779ff1c83a291501f017b

John Allen (2):
  ACPI: PRM: Add PRM handler direct call support
  RAS/AMD/ATL: Translate normalized to system physical addresses using
    PRM

 drivers/acpi/prmt.c            | 24 ++++++++++++++
 drivers/ras/amd/atl/Kconfig    |  4 +++
 drivers/ras/amd/atl/Makefile   |  2 ++
 drivers/ras/amd/atl/internal.h | 10 ++++++
 drivers/ras/amd/atl/prm.c      | 57 ++++++++++++++++++++++++++++++++++
 drivers/ras/amd/atl/umc.c      |  5 +++
 include/linux/prmt.h           |  5 +++
 7 files changed, 107 insertions(+)
 create mode 100644 drivers/ras/amd/atl/prm.c

Comments

Borislav Petkov Aug. 1, 2024, 12:49 p.m. UTC | #1
On Tue, Jul 30, 2024 at 03:17:29PM +0000, John Allen wrote:
> Platform Runtime Mechanism (PRM) introduces a means for the AML
> interpreter and OS drivers to invoke runtime handlers from platform
> firmware in order to remove the need for certain classes of SMIs.
> Further details can be seen in the PRM specification[1].
> 
> Future AMD platforms will implement a PRM module in firmware that will
> include handlers for performing various types of address translation.
> The address translation PRM module is documented in chapter 22 of the
> publicly available "AMD Family 1Ah Models 00h–0Fh and Models 10h–1Fh
> ACPI v6.5 Porting Guide"[2].
> 
> While the kernel currently has support for calling PRM handlers from the
> AML interpreter, it does not support calling PRM handlers directly from
> OS drivers. This series implements the direct call interface and uses it
> for translating normalized addresses to system physical addresses.
> 
> Thanks,
> John
> 
> [1]:
> https://uefi.org/sites/default/files/resources/Platform%20Runtime%20Mechanism%20-%20with%20legal%20notice.pdf
> [2]:
> https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/programmer-references/58088-0.75-pub.pdf
> 
> Tree: git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
> Base commit: 8400291e289ee6b2bf9779ff1c83a291501f017b
> 
> John Allen (2):
>   ACPI: PRM: Add PRM handler direct call support
>   RAS/AMD/ATL: Translate normalized to system physical addresses using
>     PRM
> 
>  drivers/acpi/prmt.c            | 24 ++++++++++++++
>  drivers/ras/amd/atl/Kconfig    |  4 +++
>  drivers/ras/amd/atl/Makefile   |  2 ++
>  drivers/ras/amd/atl/internal.h | 10 ++++++
>  drivers/ras/amd/atl/prm.c      | 57 ++++++++++++++++++++++++++++++++++
>  drivers/ras/amd/atl/umc.c      |  5 +++
>  include/linux/prmt.h           |  5 +++
>  7 files changed, 107 insertions(+)
>  create mode 100644 drivers/ras/amd/atl/prm.c
> 
> -- 

Applied, thanks.