Commit 2546c600 authored by David E. Box's avatar David E. Box Committed by Hans de Goede

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.

Link: https://github.com/intel/intel-sdsiSigned-off-by: default avatarDavid E. Box <david.e.box@linux.intel.com>
Reviewed-by: default avatarMark Gross <markgross@kernel.org>
Link: https://lore.kernel.org/r/20220212013252.1293396-2-david.e.box@linux.intel.comReviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent ae707d0e
What: /sys/bus/auxiliary/devices/intel_vsec.sdsi.X
Date: Feb 2022
KernelVersion: 5.18
Contact: "David E. Box" <david.e.box@linux.intel.com>
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" <david.e.box@linux.intel.com>
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" <david.e.box@linux.intel.com>
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" <david.e.box@linux.intel.com>
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" <david.e.box@linux.intel.com>
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" <david.e.box@linux.intel.com>
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.
...@@ -9867,6 +9867,11 @@ S: Maintained ...@@ -9867,6 +9867,11 @@ S: Maintained
F: arch/x86/include/asm/intel_scu_ipc.h F: arch/x86/include/asm/intel_scu_ipc.h
F: drivers/platform/x86/intel_scu_* F: drivers/platform/x86/intel_scu_*
INTEL SDSI DRIVER
M: David E. Box <david.e.box@linux.intel.com>
S: Supported
F: drivers/platform/x86/intel/sdsi.c
INTEL SKYLAKE INT3472 ACPI DEVICE DRIVER INTEL SKYLAKE INT3472 ACPI DEVICE DRIVER
M: Daniel Scally <djrscally@gmail.com> M: Daniel Scally <djrscally@gmail.com>
S: Maintained S: Maintained
......
...@@ -153,6 +153,18 @@ config INTEL_RST ...@@ -153,6 +153,18 @@ config INTEL_RST
firmware will copy the memory contents back to RAM and resume the OS firmware will copy the memory contents back to RAM and resume the OS
as usual. 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 config INTEL_SMARTCONNECT
tristate "Intel Smart Connect disabling driver" tristate "Intel Smart Connect disabling driver"
depends on ACPI depends on ACPI
......
...@@ -25,6 +25,8 @@ intel_int0002_vgpio-y := int0002_vgpio.o ...@@ -25,6 +25,8 @@ intel_int0002_vgpio-y := int0002_vgpio.o
obj-$(CONFIG_INTEL_INT0002_VGPIO) += intel_int0002_vgpio.o obj-$(CONFIG_INTEL_INT0002_VGPIO) += intel_int0002_vgpio.o
intel_oaktrail-y := oaktrail.o intel_oaktrail-y := oaktrail.o
obj-$(CONFIG_INTEL_OAKTRAIL) += intel_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 intel_vsec-y := vsec.o
obj-$(CONFIG_INTEL_VSEC) += intel_vsec.o obj-$(CONFIG_INTEL_VSEC) += intel_vsec.o
......
This diff is collapsed.
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#define TABLE_OFFSET_SHIFT 3 #define TABLE_OFFSET_SHIFT 3
static DEFINE_IDA(intel_vsec_ida); 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. * struct intel_vsec_header - Common fields of Intel VSEC and DVSEC registers.
...@@ -63,12 +64,14 @@ enum intel_vsec_id { ...@@ -63,12 +64,14 @@ enum intel_vsec_id {
VSEC_ID_TELEMETRY = 2, VSEC_ID_TELEMETRY = 2,
VSEC_ID_WATCHER = 3, VSEC_ID_WATCHER = 3,
VSEC_ID_CRASHLOG = 4, VSEC_ID_CRASHLOG = 4,
VSEC_ID_SDSI = 65,
}; };
static enum intel_vsec_id intel_vsec_allow_list[] = { static enum intel_vsec_id intel_vsec_allow_list[] = {
VSEC_ID_TELEMETRY, VSEC_ID_TELEMETRY,
VSEC_ID_WATCHER, VSEC_ID_WATCHER,
VSEC_ID_CRASHLOG, VSEC_ID_CRASHLOG,
VSEC_ID_SDSI,
}; };
static const char *intel_vsec_name(enum intel_vsec_id id) 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) ...@@ -83,6 +86,9 @@ static const char *intel_vsec_name(enum intel_vsec_id id)
case VSEC_ID_CRASHLOG: case VSEC_ID_CRASHLOG:
return "crashlog"; return "crashlog";
case VSEC_ID_SDSI:
return "sdsi";
default: default:
return NULL; return NULL;
} }
...@@ -211,7 +217,11 @@ static int intel_vsec_add_dev(struct pci_dev *pdev, struct intel_vsec_header *he ...@@ -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->resource = res;
intel_vsec_dev->num_resources = header->num_entries; intel_vsec_dev->num_resources = header->num_entries;
intel_vsec_dev->quirks = quirks; 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)); return intel_vsec_add_aux(pdev, intel_vsec_dev, intel_vsec_name(header->id));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment