From 649709c6fccedc9909fc21f3813185d3c64b3539 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Wed, 12 Jul 2023 11:35:01 +0530 Subject: soc/intel/common/acpi: Add IOE PS2B access APIs This patch implements APIs to access PCR registers from IOE die. BUG=b:290856936 TEST=Able to build and boot google/rex. Change-Id: Ief7a00c4e81048f87ee308e659faeba3fde4c9cd Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/76409 Reviewed-by: Kapil Porwal Tested-by: build bot (Jenkins) Reviewed-by: Werner Zeh --- src/soc/intel/common/acpi/ioe_pcr.asl | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/soc/intel/common/acpi/ioe_pcr.asl (limited to 'src/soc/intel/common/acpi/ioe_pcr.asl') diff --git a/src/soc/intel/common/acpi/ioe_pcr.asl b/src/soc/intel/common/acpi/ioe_pcr.asl new file mode 100644 index 0000000000..7f532606af --- /dev/null +++ b/src/soc/intel/common/acpi/ioe_pcr.asl @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include "pcrlib.asl" + +/* APIs to access P2SB inside IOE die */ + +/* + * Calculate PCR register base at specified PID + * Arg0 - PCR Port ID + */ +Method (ICRB, 1, NotSerialized) +{ + Return (GPCR(IOE_P2SB, Arg0)) +} + +/* + * Read a PCR register at specified PID and offset + * Arg0 - PCR Port ID + * Arg1 - Register Offset + */ +Method (ICRR, 2, Serialized) +{ + Return (RPCR(IOE_P2SB, Arg0, Arg1)) +} + +/* + * AND a value with PCR register at specified PID and offset + * Arg0 - PCR Port ID + * Arg1 - Register Offset + * Arg2 - Value to AND + */ +Method (ICRA, 3, Serialized) +{ + APCR(IOE_P2SB, Arg0, Arg1, Arg2) +} + +/* + * OR a value with PCR register at specified PID and offset + * Arg0 - PCR Port ID + * Arg1 - Register Offset + * Arg2 - Value to OR + */ +Method (ICRO, 3, Serialized) +{ + OPCR(IOE_P2SB, Arg0, Arg1, Arg2) +} -- cgit v1.2.3