Skip to contentSkip to conversation

Intel Software Defined Silicon

PATCH Superseded David E. Box 3 participants 10 messages Feb 8, 2022 – Feb 9, 2022

Subsystems (4)

v6 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

David E. Box

author maintainer
#0 lore raw

v6 cover Intel Software Defined Silicon

This series adds support for Intel Software Defined Silicon. These patches are the same as patches 4-6 from this series [1]. Patches 1-3 of that series were pulled in during the 5.17 merge window.

[1] https://lore.kernel.org/lkml/[email protected]/T/

David E. Box (3):
platform/x86: Add Intel Software Defined Silicon driver tools arch x86: Add Intel SDSi provisiong tool
selftests: sdsi: test sysfs setup

 .../ABI/testing/sysfs-driver-intel_sdsi       |  77 +++
 MAINTAINERS                                   |   7 +
 drivers/platform/x86/intel/Kconfig            |  12 +
 drivers/platform/x86/intel/Makefile           |   2 +
 drivers/platform/x86/intel/sdsi.c             | 574 ++++++++++++++++++
 drivers/platform/x86/intel/vsec.c             |  12 +-
 tools/arch/x86/intel_sdsi/Makefile            |   9 +
 tools/arch/x86/intel_sdsi/sdsi.c              | 540 ++++++++++++++++
 tools/testing/selftests/drivers/sdsi/sdsi.sh  |  18 +
 .../selftests/drivers/sdsi/sdsi_test.py       | 226 +++++++
 10 files changed, 1476 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/ABI/testing/sysfs-driver-intel_sdsi
 create mode 100644 drivers/platform/x86/intel/sdsi.c
 create mode 100644 tools/arch/x86/intel_sdsi/Makefile
 create mode 100644 tools/arch/x86/intel_sdsi/sdsi.c
 create mode 100755 tools/testing/selftests/drivers/sdsi/sdsi.sh
 create mode 100644 tools/testing/selftests/drivers/sdsi/sdsi_test.py
Signature · 1 line
2.25.1
author maintainer
#1 lore raw

PATCH v6 1/3 platform/x86: Add Intel Software Defined Silicon driver

Intel Software Defined Silicon (SDSi) is a post manufacturing mechanism for activating additional silicon features. Features are enabled through a license activation process. The SDSi driver provides a per socket, sysfs attribute interface for applications to perform 3 main provisioning functions:

1. Provision an Authentication Key Certificate (AKC), a key written to internal NVRAM that is used to authenticate a capability specific activation payload.

2. Provision a Capability Activation Payload (CAP), a token authenticated using the AKC and applied to the CPU configuration to activate a new feature.

3. Read the SDSi State Certificate, containing the CPU configuration state.

The operations perform function specific mailbox commands that forward the requests to SDSi hardware to perform authentication of the payloads and enable the silicon configuration (to be made available after power cycling).

The SDSi device itself is enumerated as an auxiliary device from the intel_vsec driver and as such has a build dependency on CONFIG_INTEL_VSEC.

---
V6
- Replace,

              return (ret < 0) ? ret : size;
    with,
              if (ret)
                   return ret;
              return size

    Besides the style change (suggested by GKH) this fixes a klocwork
    warning.

V5
- Update kernel version to 5.18 in API doc and copyrights to 2022.
- Remove unneeded prototypes.
- In binary attribute handlers where ret is only used for errors,

    replace,
              return (ret < 0) ? ret : size;
    with,
              return ret ?: size;

V4
- Replace dropped semicolon on sdsi_aux_driver struct.
V3
- In state_certificate_read(), return the actual size instead of the requested count. Return 0 if offset is non-zero so that subsequent calls attempting to read the rest of the count end.
- s/folder/directory in ABI documentation.
- Add comment that all driver resources are devm managed so remove() is not needed.
V2
- Use sysfs_emit() in guid_show()
- Fix language in ABI, suggested by Bjorn
- Fix wrong directory name in ABI doc

 .../ABI/testing/sysfs-driver-intel_sdsi       |  77 +++
 MAINTAINERS                                   |   5 +
 drivers/platform/x86/intel/Kconfig            |  12 +
 drivers/platform/x86/intel/Makefile           |   2 +
 drivers/platform/x86/intel/sdsi.c             | 574 ++++++++++++++++++
 drivers/platform/x86/intel/vsec.c             |  12 +-
 6 files changed, 681 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/ABI/testing/sysfs-driver-intel_sdsi
 create mode 100644 drivers/platform/x86/intel/sdsi.c
Documentation/ABI/testing/sysfs-driver-intel_sdsi new file +77 -0
new file mode 100644
index 000000000000..ab122125ff9a
@@ -0,0 +1,77 @@
+What:		/sys/bus/auxiliary/devices/intel_vsec.sdsi.X
+Date:		Feb 2022
+KernelVersion:	5.18
+Contact:	"David E. Box" <[email protected]>
+Description:
+		This directory contains interface files for accessing Intel
+		Software Defined Silicon (SDSi) features on a CPU. X
+		represents the socket instance (though not the socket ID).
+		The socket ID is determined by reading the registers file
+		and decoding it per the specification.
+
+		Some files communicate with SDSi hardware through a mailbox.
+		Should the operation fail, one of the following error codes
+		may be returned:
+
+		Error Code	Cause
+	        ----------	-----
+	        EIO		General mailbox failure. Log may indicate cause.
+	        EBUSY		Mailbox is owned by another agent.
+	        EPERM		SDSI capability is not enabled in hardware.
+	        EPROTO		Failure in mailbox protocol detected by driver.
+				See log for details.
+	        EOVERFLOW	For provision commands, the size of the data
+				exceeds what may be written.
+	        ESPIPE		Seeking is not allowed.
+	        ETIMEDOUT	Failure to complete mailbox transaction in time.
+
+What:		/sys/bus/auxiliary/devices/intel_vsec.sdsi.X/guid
+Date:		Feb 2022
+KernelVersion:	5.18
+Contact:	"David E. Box" <[email protected]>
+Description:
+		(RO) The GUID for the registers file. The GUID identifies
+		the layout of the registers file in this directory.
+		Information about the register layouts for a particular GUID
+		is available at http://github.com/intel/intel-sdsi
+
+What:		/sys/bus/auxiliary/devices/intel_vsec.sdsi.X/registers
+Date:		Feb 2022
+KernelVersion:	5.18
+Contact:	"David E. Box" <[email protected]>
+Description:
+		(RO) Contains information needed by applications to provision
+		a CPU and monitor status information. The layout of this file
+		is determined by the GUID in this directory. Information about
+		the layout for a particular GUID is available at
+		http://github.com/intel/intel-sdsi
+
+What:		/sys/bus/auxiliary/devices/intel_vsec.sdsi.X/provision_akc
+Date:		Feb 2022
+KernelVersion:	5.18
+Contact:	"David E. Box" <[email protected]>
+Description:
+		(WO) Used to write an Authentication Key Certificate (AKC) to
+		the SDSi NVRAM for the CPU. The AKC is used to authenticate a
+		Capability Activation Payload. Mailbox command.
+
+What:		/sys/bus/auxiliary/devices/intel_vsec.sdsi.X/provision_cap
+Date:		Feb 2022
+KernelVersion:	5.18
+Contact:	"David E. Box" <[email protected]>
+Description:
+		(WO) Used to write a Capability Activation Payload (CAP) to the
+		SDSi NVRAM for the CPU. CAPs are used to activate a given CPU
+		feature. A CAP is validated by SDSi hardware using a previously
+		provisioned AKC file. Upon successful authentication, the CPU
+		configuration is updated. A cold reboot is required to fully
+		activate the feature. Mailbox command.
+
+What:		/sys/bus/auxiliary/devices/intel_vsec.sdsi.X/state_certificate
+Date:		Feb 2022
+KernelVersion:	5.18
+Contact:	"David E. Box" <[email protected]>
+Description:
+		(RO) Used to read back the current State Certificate for the CPU
+		from SDSi hardware. The State Certificate contains information
+		about the current licenses on the CPU. Mailbox command.
MAINTAINERS +5 -0
index 69a2935daf6c..29d0945f5a63 100644
@@ -9869,6 +9869,11 @@ S:	Maintained
 F:	arch/x86/include/asm/intel_scu_ipc.h
 F:	drivers/platform/x86/intel_scu_*
 
+INTEL SDSI DRIVER
+M:	David E. Box <[email protected]>
+S:	Supported
+F:	drivers/platform/x86/intel/sdsi.c
+
 INTEL SKYLAKE INT3472 ACPI DEVICE DRIVER
 M:	Daniel Scally <[email protected]>
 S:	Maintained
drivers/platform/x86/intel/Kconfig +12 -0
index 8e65086bb6c8..99c8834ec979 100644
@@ -134,6 +134,18 @@ config INTEL_RST
 	  firmware will copy the memory contents back to RAM and resume the OS
 	  as usual.
 
+config INTEL_SDSI
+	tristate "Intel Software Defined Silicon Driver"
+	depends on INTEL_VSEC
+	depends on X86_64
+	help
+	  This driver enables access to the Intel Software Defined Silicon
+	  interface used to provision silicon features with an authentication
+	  certificate and capability license.
+
+	  To compile this driver as a module, choose M here: the module will
+	  be called intel_sdsi.
+
 config INTEL_SMARTCONNECT
 	tristate "Intel Smart Connect disabling driver"
 	depends on ACPI
drivers/platform/x86/intel/Makefile +2 -0
index 35f2066578b2..a765d60b6002 100644
@@ -26,6 +26,8 @@ intel_int0002_vgpio-y			:= int0002_vgpio.o
 obj-$(CONFIG_INTEL_INT0002_VGPIO)	+= intel_int0002_vgpio.o
 intel_oaktrail-y			:= oaktrail.o
 obj-$(CONFIG_INTEL_OAKTRAIL)		+= intel_oaktrail.o
+intel_sdsi-y				:= sdsi.o
+obj-$(CONFIG_INTEL_SDSI)		+= intel_sdsi.o
 intel_vsec-y				:= vsec.o
 obj-$(CONFIG_INTEL_VSEC)		+= intel_vsec.o
 
drivers/platform/x86/intel/sdsi.c new file +574 -0

574 lines not on this page · raw message

drivers/platform/x86/intel/vsec.c +11 -1
index c3bdd75ed690..bed436bf181f 100644
@@ -32,6 +32,7 @@
 #define TABLE_OFFSET_SHIFT		3
 
 static DEFINE_IDA(intel_vsec_ida);
+static DEFINE_IDA(intel_vsec_sdsi_ida);
 
 /**
  * struct intel_vsec_header - Common fields of Intel VSEC and DVSEC registers.
@@ -63,12 +64,14 @@ enum intel_vsec_id {
 	VSEC_ID_TELEMETRY	= 2,
 	VSEC_ID_WATCHER		= 3,
 	VSEC_ID_CRASHLOG	= 4,
+	VSEC_ID_SDSI		= 65,
 };
 
 static enum intel_vsec_id intel_vsec_allow_list[] = {
 	VSEC_ID_TELEMETRY,
 	VSEC_ID_WATCHER,
 	VSEC_ID_CRASHLOG,
+	VSEC_ID_SDSI,
 };
 
 static const char *intel_vsec_name(enum intel_vsec_id id)
@@ -83,6 +86,9 @@ static const char *intel_vsec_name(enum intel_vsec_id id)
 	case VSEC_ID_CRASHLOG:
 		return "crashlog";
 
+	case VSEC_ID_SDSI:
+		return "sdsi";
+
 	default:
 		return NULL;
 	}
@@ -211,7 +217,11 @@ static int intel_vsec_add_dev(struct pci_dev *pdev, struct intel_vsec_header *he
 	intel_vsec_dev->resource = res;
 	intel_vsec_dev->num_resources = header->num_entries;
 	intel_vsec_dev->quirks = quirks;
-	intel_vsec_dev->ida = &intel_vsec_ida;
+
+	if (header->id == VSEC_ID_SDSI)
+		intel_vsec_dev->ida = &intel_vsec_sdsi_ida;
+	else
+		intel_vsec_dev->ida = &intel_vsec_ida;
 
 	return intel_vsec_add_aux(pdev, intel_vsec_dev, intel_vsec_name(header->id));
 }
Signature · 1 line
2.25.1
author maintainer
#7 lore raw

PATCH v6 3/3 selftests: sdsi: test sysfs setup

In reply to David E. Box

Tests file configuration and error handling of the Intel Software Defined Silicon sysfs ABI.

---
V6
- No changes.
V5
- No changes.
V4
- No changes.
V3
- Add tests to check PCI device removal handling and to check for driver memory leaks.
V2
- New patch.

 MAINTAINERS                                   |   1 +
 tools/testing/selftests/drivers/sdsi/sdsi.sh  |  18 ++
 .../selftests/drivers/sdsi/sdsi_test.py       | 226 ++++++++++++++++++
 3 files changed, 245 insertions(+)
 create mode 100755 tools/testing/selftests/drivers/sdsi/sdsi.sh
 create mode 100644 tools/testing/selftests/drivers/sdsi/sdsi_test.py
MAINTAINERS +1 -0
index 80325cbde3bd..a05c6b40601a 100644
@@ -9874,6 +9874,7 @@ M:	David E. Box <[email protected]>
 S:	Supported
 F:	drivers/platform/x86/intel/sdsi.c
 F:	tools/arch/x86/intel_sdsi/
+F:	tools/testing/selftests/drivers/sdsi/
 
 INTEL SKYLAKE INT3472 ACPI DEVICE DRIVER
 M:	Daniel Scally <[email protected]>
tools/testing/selftests/drivers/sdsi/sdsi.sh new file +18 -0
new file mode 100755
index 000000000000..8db71961d164
@@ -0,0 +1,18 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+# Runs tests for the intel_sdsi driver
+
+if ! /sbin/modprobe -q -r intel_sdsi; then
+	echo "drivers/sdsi: [SKIP]"
+	exit 77
+fi
+
+if /sbin/modprobe -q intel_sdsi; then
+	python3 -m pytest sdsi_test.py
+	/sbin/modprobe -q -r intel_sdsi
+
+	echo "drivers/sdsi: ok"
+else
+	echo "drivers/sdsi: [FAIL]"
+	exit 1
+fi
tools/testing/selftests/drivers/sdsi/sdsi_test.py new file +226 -0

226 lines not on this page · raw message

Signature · 1 line
2.25.1
author maintainer
#6 lore raw

PATCH v6 2/3 tools arch x86: Add Intel SDSi provisiong tool

In reply to David E. Box

Add tool for key certificate and activation payload provisioning on Intel CPUs supporting Software Defined Silicon (SDSi).

---
V6
- No changes.
V5
- Update copyright to 2022
V4
- No changes.
V3
- Move from samples to tools.
- Fix bit fields in availability structure.
- Check provisioning availability before issuing command.

V2
- New patch.

 MAINTAINERS                        |   1 +
 tools/arch/x86/intel_sdsi/Makefile |   9 +
 tools/arch/x86/intel_sdsi/sdsi.c   | 540 +++++++++++++++++++++++++++++
 3 files changed, 550 insertions(+)
 create mode 100644 tools/arch/x86/intel_sdsi/Makefile
 create mode 100644 tools/arch/x86/intel_sdsi/sdsi.c
MAINTAINERS +1 -0
index 29d0945f5a63..80325cbde3bd 100644
@@ -9873,6 +9873,7 @@ INTEL SDSI DRIVER
 M:	David E. Box <[email protected]>
 S:	Supported
 F:	drivers/platform/x86/intel/sdsi.c
+F:	tools/arch/x86/intel_sdsi/
 
 INTEL SKYLAKE INT3472 ACPI DEVICE DRIVER
 M:	Daniel Scally <[email protected]>
tools/arch/x86/intel_sdsi/Makefile new file +9 -0
new file mode 100644
index 000000000000..1c2d102ff8fb
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0
+
+.PHONY: sdsi
+
+sdsi: sdsi.o
+	$(CC) -Wall $^ -o $@
+
+clean:
+	rm *.o sdsi
tools/arch/x86/intel_sdsi/sdsi.c new file +540 -0

540 lines not on this page · raw message

Signature · 1 line
2.25.1
#2 lore raw

Re: [PATCH V6 1/3] platform/x86: Add Intel Software Defined Silicon driver

In reply to David E. Box
Quoted 5 lines · David E. Box

Intel Software Defined Silicon (SDSi) is a post manufacturing mechanism for activating additional silicon features. Features are enabled through a license activation process. The SDSi driver provides a per socket, sysfs attribute interface for applications to perform 3 main provisioning functions:

[]

Quoted 11 lines

---
V6
- Replace,

              return (ret < 0) ? ret : size;
    with,
              if (ret)
                   return ret;
              return size

    Besides the style change (suggested by GKH) this fixes a klocwork
    warning.

thanks.

drivers/platform/x86/intel/sdsi.c

Quoted 1 line
drivers/platform/x86/intel/sdsi.c +0 -0

[]

drivers/platform/x86/intel/sdsi.c line 112

Quoted 9 lines
drivers/platform/x86/intel/sdsi.c +9 -0
+/* SDSi mailbox operations must be performed using 64bit mov instructions */
+static __always_inline void
+sdsi_memcpy64_toio(u64 __iomem *to, const u64 *from, size_t count_bytes)
+{
+	size_t count = count_bytes / sizeof(*to);
+	int i;
+
+	for (i = 0; i < count; i++)
+		writeq(from[i], &to[i]);

Any chance the byte count is not a multiple of sizeof(u64) ?

drivers/platform/x86/intel/sdsi.c line 123

Quoted 9 lines
drivers/platform/x86/intel/sdsi.c +9 -0
+static __always_inline void
+sdsi_memcpy64_fromio(u64 *to, const u64 __iomem *from, size_t count_bytes)
+{
+	size_t count = count_bytes / sizeof(*to);
+	int i;
+
+	for (i = 0; i < count; i++)
+		to[i] = readq(&from[i]);
+}

here too.

[]

drivers/platform/x86/intel/sdsi.c line 149

Quoted 5 lines
drivers/platform/x86/intel/sdsi.c +5 -0
+static int sdsi_mbox_cmd_read(struct sdsi_priv *priv, struct sdsi_mbox_info *info,
+			      size_t *data_size)
+{
+	struct device *dev = priv->dev;
+	u32 total, loop, eom, status, message_size;

[]

drivers/platform/x86/intel/sdsi.c line 194

Quoted 2 lines
drivers/platform/x86/intel/sdsi.c +2 -0
+		if (packet_size > SDSI_SIZE_MAILBOX) {
+			dev_err(dev, "Packet size to large\n");

too

[]

drivers/platform/x86/intel/sdsi.c line 218

Quoted 3 lines
drivers/platform/x86/intel/sdsi.c +3 -0
+	/* Message size check is only valid for multi-packet transfers */
+	if (loop && total != message_size)
+		dev_warn(dev, "Read count %d differs from expected count %d\n",

%u

Quoted 9 lines
drivers/platform/x86/intel/sdsi.c +7 -0
+			 total, message_size);
 
 
+static int sdsi_map_mbox_registers(struct sdsi_priv *priv, struct pci_dev *parent,
+				   struct disc_table *disc_table, struct resource *disc_res)
+{
+	u32 access_type = FIELD_GET(DT_ACCESS_TYPE, disc_table->access_info);
+	u32 size = FIELD_GET(DT_SIZE, disc_table->access_info);
+	u32 tbir = FIELD_GET(DT_TBIR, disc_table->offset);

drivers/platform/x86/intel/sdsi.c line 485

Quoted 10 lines
drivers/platform/x86/intel/sdsi.c +10 -0
+	u32 offset = DT_OFFSET(disc_table->offset);
+	u32 features_offset;
+	struct resource res = {};
+
+	/* Starting location of SDSi MMIO region based on access type */
+	switch (access_type) {
+	case ACCESS_TYPE_LOCAL:
+		if (tbir) {
+			dev_err(priv->dev, "Unsupported BAR index %d for access type %d\n",
+				tbir, access_type);

%u here too

[]

drivers/platform/x86/intel/sdsi.c line 501

Quoted 1 line
drivers/platform/x86/intel/sdsi.c +1 -0
+		dev_err(priv->dev, "Unrecognized access_type %d\n", access_type);

and here

author maintainer
#3 lore raw

Re: [PATCH V6 1/3] platform/x86: Add Intel Software Defined Silicon driver

Quoted 26 lines · Joe Perches
Quoted 5 lines · David E. Box

Intel Software Defined Silicon (SDSi) is a post manufacturing mechanism for activating additional silicon features. Features are enabled through a license activation process. The SDSi driver provides a per socket, sysfs attribute interface for applications to perform 3 main provisioning functions:

[]

Quoted 11 lines

---
V6
- Replace,

              return (ret < 0) ? ret : size;
    with,
              if (ret)
                   return ret;
              return size

    Besides the style change (suggested by GKH) this fixes a klocwork
    warning.

thanks.

drivers/platform/x86/intel/sdsi.c

Quoted 2 lines
drivers/platform/x86/intel/sdsi.c +0 -0

[]

Quoted 12 lines

drivers/platform/x86/intel/sdsi.c line 112

Quoted 10 lines

+/* SDSi mailbox operations must be performed using 64bit mov instructions */

drivers/platform/x86/intel/sdsi.c +8 -0
+static __always_inline void
+sdsi_memcpy64_toio(u64 __iomem *to, const u64 *from, size_t count_bytes)
+{
+	size_t count = count_bytes / sizeof(*to);
+	int i;
+
+	for (i = 0; i < count; i++)
+		writeq(from[i], &to[i]);

Any chance the byte count is not a multiple of sizeof(u64) ?

No. The value passed to count_bytes is either u64 or rounded up to sizeof(u64). But I'd like to know how I could guard against accidentally passing something different in the future.

Andy had suggested just adding support for 64 bit memcpy io, but I hadn't time to look at this.

Quoted 12 lines

drivers/platform/x86/intel/sdsi.c line 123

Quoted 10 lines
drivers/platform/x86/intel/sdsi.c +9 -0
+static __always_inline void
+sdsi_memcpy64_fromio(u64 *to, const u64 __iomem *from, size_t count_bytes)
+{
+	size_t count = count_bytes / sizeof(*to);
+	int i;
+
+	for (i = 0; i < count; i++)
+		to[i] = readq(&from[i]);
+}

here too.

Same.

Quoted 10 lines

[]

drivers/platform/x86/intel/sdsi.c line 149

Quoted 6 lines

+static int sdsi_mbox_cmd_read(struct sdsi_priv *priv, struct sdsi_mbox_info *info,

drivers/platform/x86/intel/sdsi.c +4 -0
+			      size_t *data_size)
+{
+	struct device *dev = priv->dev;
+	u32 total, loop, eom, status, message_size;

[]

Quoted 4 lines

drivers/platform/x86/intel/sdsi.c line 194

Quoted 2 lines
drivers/platform/x86/intel/sdsi.c +2 -0
+		if (packet_size > SDSI_SIZE_MAILBOX) {
+			dev_err(dev, "Packet size to large\n");

too

Sorry, I'm missing the question here. If it's whether packet_size could also not be a multiple of sizeof(u64) the answer here is yes. But I don't see how that matters. packet_size is a value read from the hardware. This is just a sanity check.

Quoted 31 lines

[]

drivers/platform/x86/intel/sdsi.c line 218

Quoted 3 lines
drivers/platform/x86/intel/sdsi.c +3 -0
+	/* Message size check is only valid for multi-packet transfers */
+	if (loop && total != message_size)
+		dev_warn(dev, "Read count %d differs from expected count %d\n",

%u

Quoted 19 lines
drivers/platform/x86/intel/sdsi.c +2 -0
+			 total, message_size);
+static int sdsi_map_mbox_registers(struct sdsi_priv *priv, struct pci_dev

*parent,

drivers/platform/x86/intel/sdsi.c +1 -0
+				   struct disc_table *disc_table, struct

resource *disc_res)

drivers/platform/x86/intel/sdsi.c +13 -0
+{
+	u32 access_type = FIELD_GET(DT_ACCESS_TYPE, disc_table->access_info);
+	u32 size = FIELD_GET(DT_SIZE, disc_table->access_info);
+	u32 tbir = FIELD_GET(DT_TBIR, disc_table->offset);
+	u32 offset = DT_OFFSET(disc_table->offset);
+	u32 features_offset;
+	struct resource res = {};
+
+	/* Starting location of SDSi MMIO region based on access type */
+	switch (access_type) {
+	case ACCESS_TYPE_LOCAL:
+		if (tbir) {
+			dev_err(priv->dev, "Unsupported BAR index %d for access

type %d\n",

drivers/platform/x86/intel/sdsi.c line 485

Quoted 1 line
drivers/platform/x86/intel/sdsi.c +1 -0
+				tbir, access_type);

%u here too

Quoted 5 lines

[]

Quoted 2 lines
drivers/platform/x86/intel/sdsi.c +1 -0
+		dev_err(priv->dev, "Unrecognized access_type %d\n",

access_type);

and here

Ack on the specifier changes. Thanks.

Quoted 2 lines
#4 lore raw

Re: [PATCH V6 1/3] platform/x86: Add Intel Software Defined Silicon driver

Quoted 7 lines · David E. Box
Quoted 6 lines · Joe Perches
Quoted 5 lines · David E. Box

Intel Software Defined Silicon (SDSi) is a post manufacturing mechanism for activating additional silicon features. Features are enabled through a license activation process. The SDSi driver provides a per socket, sysfs attribute interface for applications to perform 3 main provisioning functions:

[]

Quoted 12 lines
Quoted 11 lines

drivers/platform/x86/intel/sdsi.c line 149

Quoted 6 lines

+static int sdsi_mbox_cmd_read(struct sdsi_priv *priv, struct sdsi_mbox_info *info,

drivers/platform/x86/intel/sdsi.c new file +4 -0
+			      size_t *data_size)
+{
+	struct device *dev = priv->dev;
+	u32 total, loop, eom, status, message_size;

[]

drivers/platform/x86/intel/sdsi.c line 194

Quoted 2 lines
drivers/platform/x86/intel/sdsi.c new file +2 -0
+		if (packet_size > SDSI_SIZE_MAILBOX) {
+			dev_err(dev, "Packet size to large\n");

too

Quoted 4 lines

Sorry, I'm missing the question here. If it's whether packet_size could also not be a multiple of sizeof(u64) the answer here is yes. But I don't see how that matters. packet_size is a value read from the hardware. This is just a sanity check.

just a to/too typo.

"Packet size too large\n"

author maintainer
#5 lore raw

Re: [PATCH V6 1/3] platform/x86: Add Intel Software Defined Silicon driver

Quoted 32 lines · Joe Perches
Quoted 9 lines · David E. Box
Quoted 8 lines · Joe Perches
Quoted 7 lines · David E. Box

Intel Software Defined Silicon (SDSi) is a post manufacturing mechanism for
activating additional silicon features. Features are enabled through a license activation process. The SDSi driver provides a per socket, sysfs
attribute interface for applications to perform 3 main provisioning functions:

[]

Quoted 13 lines
Quoted 8 lines

drivers/platform/x86/intel/sdsi.c line 149

Quoted 7 lines

+static int sdsi_mbox_cmd_read(struct sdsi_priv *priv, struct sdsi_mbox_info
*info,

drivers/platform/x86/intel/sdsi.c new file +4 -0
+			      size_t *data_size)
+{
+	struct device *dev = priv->dev;
+	u32 total, loop, eom, status, message_size;

[]

Quoted 4 lines

drivers/platform/x86/intel/sdsi.c line 194

Quoted 2 lines
drivers/platform/x86/intel/sdsi.c new file +2 -0
+		if (packet_size > SDSI_SIZE_MAILBOX) {
+			dev_err(dev, "Packet size to large\n");

too

Quoted 7 lines

Sorry, I'm missing the question here. If it's whether packet_size could also not
be a multiple of sizeof(u64) the answer here is yes. But I don't see how that
matters. packet_size is a value read from the hardware. This is just a sanity
check.

Quoted 3 lines

just a to/too typo.

"Packet size too large\n"

Doh!

Quoted 2 lines
#8 lore raw
In reply to David E. Box

Hi David,

Quoted 5 lines · David E. Box

This series adds support for Intel Software Defined Silicon. These patches are the same as patches 4-6 from this series [1]. Patches 1-3 of that series were pulled in during the 5.17 merge window.

[1] https://lore.kernel.org/lkml/[email protected]/T/

Thank you for taking all the feedback from others into account and doing new versions.

I was planning on doing an in-depth / foll review of this today, but unfortunately a kernel regression somewhere else has popped up and that is going to soak up all me work/$dayjob time this week, sorry.

Assuming no major issues are found, the plan definitely is to get this in before the 5.18 merge window. I've made a note in my calendar to get a full review done no later then February 17th.

Regards,

Hans

Quoted 24 lines

David E. Box (3):
platform/x86: Add Intel Software Defined Silicon driver tools arch x86: Add Intel SDSi provisiong tool
selftests: sdsi: test sysfs setup

 .../ABI/testing/sysfs-driver-intel_sdsi       |  77 +++
 MAINTAINERS                                   |   7 +
 drivers/platform/x86/intel/Kconfig            |  12 +
 drivers/platform/x86/intel/Makefile           |   2 +
 drivers/platform/x86/intel/sdsi.c             | 574 ++++++++++++++++++
 drivers/platform/x86/intel/vsec.c             |  12 +-
 tools/arch/x86/intel_sdsi/Makefile            |   9 +
 tools/arch/x86/intel_sdsi/sdsi.c              | 540 ++++++++++++++++
 tools/testing/selftests/drivers/sdsi/sdsi.sh  |  18 +
 .../selftests/drivers/sdsi/sdsi_test.py       | 226 +++++++
 10 files changed, 1476 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/ABI/testing/sysfs-driver-intel_sdsi
 create mode 100644 drivers/platform/x86/intel/sdsi.c
 create mode 100644 tools/arch/x86/intel_sdsi/Makefile
 create mode 100644 tools/arch/x86/intel_sdsi/sdsi.c
 create mode 100755 tools/testing/selftests/drivers/sdsi/sdsi.sh
 create mode 100644 tools/testing/selftests/drivers/sdsi/sdsi_test.py
author maintainer
#9 lore raw
Quoted 18 lines · Hans de Goede

Hi David,

Quoted 6 lines · David E. Box

This series adds support for Intel Software Defined Silicon. These patches are the same as patches 4-6 from this series [1]. Patches 1-3 of that series were pulled in during the 5.17 merge window.

[1]
https://lore.kernel.org/lkml/[email protected]/T/

Thank you for taking all the feedback from others into account and doing new versions.

I was planning on doing an in-depth / foll review of this today, but unfortunately a kernel regression somewhere else has popped up and that is going to soak up all me work/$dayjob time this week, sorry.

Quoted 4 lines

Assuming no major issues are found, the plan definitely is to get this in before the 5.18 merge window. I've made a note in my calendar to get a full review done no later then February 17th.

Thanks for the update.

David