]> mj.ucw.cz Git - pciutils.git/commitdiff
lspci: Add TEE-IO extended capability bit
authorAlexey Kardashevskiy <aik@amd.com>
Mon, 26 Feb 2024 06:01:35 +0000 (17:01 +1100)
committerMartin Mares <mj@ucw.cz>
Mon, 26 Feb 2024 09:08:51 +0000 (10:08 +0100)
PCIe r6.1, sec 7.5.3.3 defines "TEE-IO Supported" in the PCI Express Device
Capabilities Register which indicates that the function implements
the TEE-IO functionality as described by the TEE Device Interface Security
Protocol (TDISP, PCIe r6.1, chapter 11).

tests/cap-ide is an example of such device.

Signed-off-by: Alexey Kardashevskiy <aik@amd.com>
lib/header.h
ls-caps.c

index 68cb3c15a9c1fdc331d4797c723fd92cdc0f695c..0b0ed9a54858f8d814343a9d767a53179780c0df 100644 (file)
 #define  PCI_EXP_DEVCAP_PWR_VAL        0x3fc0000 /* Slot Power Limit Value */
 #define  PCI_EXP_DEVCAP_PWR_SCL        0xc000000 /* Slot Power Limit Scale */
 #define  PCI_EXP_DEVCAP_FLRESET        0x10000000 /* Function-Level Reset */
+#define  PCI_EXP_DEVCAP_TEE_IO  0x40000000 /* TEE-IO Supported (TDISP) */
 #define PCI_EXP_DEVCTL         0x8     /* Device Control */
 #define  PCI_EXP_DEVCTL_CERE   0x0001  /* Correctable Error Reporting En. */
 #define  PCI_EXP_DEVCTL_NFERE  0x0002  /* Non-Fatal Error Reporting Enable */
index 2c99812c4ed25cdb72c7c71054b53365ec78675c..65e92e687591ef84092a9f84e57ec814d6fd5a44 100644 (file)
--- a/ls-caps.c
+++ b/ls-caps.c
@@ -717,6 +717,7 @@ static void cap_express_dev(struct device *d, int where, int type)
       printf(" SlotPowerLimit ");
       show_power_limit((t & PCI_EXP_DEVCAP_PWR_VAL) >> 18, (t & PCI_EXP_DEVCAP_PWR_SCL) >> 26);
     }
+  printf(" TEE-IO%c", FLAG(t, PCI_EXP_DEVCAP_TEE_IO));
   printf("\n");
 
   w = get_conf_word(d, where + PCI_EXP_DEVCTL);