Platform integrity information in sysfs (version 9)
Subsystems (2)
PATCH 2/2 Platform integrity information in sysfs (version 9)
This patch exports the BIOS Write Enable (bioswe), BIOS
Lock Enable (biosle), and the SMM BIOS Write Protect (SMM_BIOSWP) fields of the BIOS Control register using the platform-integrity misc kernel module. The idea is to keep adding more flags, not only from the BC but also from other registers in following versions.
The goal is that the attributes are avilable to fwupd when SecureBoot is turned on.
Signed-off-by Daniel Gutson <[email protected]>
Tested-by Richard Hughes <[email protected]>
--- drivers/mtd/spi-nor/controllers/Kconfig | 1 + .../mtd/spi-nor/controllers/intel-spi-pci.c | 75 ++++++++++++++- .../spi-nor/controllers/intel-spi-platform.c | 2 +- drivers/mtd/spi-nor/controllers/intel-spi.c | 91 ++++++++++++++++++- drivers/mtd/spi-nor/controllers/intel-spi.h | 9 +- 5 files changed, 171 insertions(+), 7 deletions(-)
drivers/mtd/spi-nor/controllers/Kconfig +1 -0
@@ -29,6 +29,7 @@ config SPI_NXP_SPIFI config SPI_INTEL_SPI tristate + depends on PLATFORM_INTEGRITY_DATA config SPI_INTEL_SPI_PCI tristate "Intel PCH/PCU SPI flash PCI driver (DANGEROUS)"
drivers/mtd/spi-nor/controllers/intel-spi-pci.c +74 -1
98 lines not on this page · raw message
drivers/mtd/spi-nor/controllers/intel-spi-platform.c +1 -1
@@ -23,7 +23,7 @@ static int intel_spi_platform_probe(struct platform_device *pdev)return -EINVAL ; mem =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - ispi =intel_spi_probe (&pdev->dev, mem, info); + ispi =intel_spi_probe (&pdev->dev, mem, info,NULL );if (IS_ERR (ispi))return PTR_ERR (ispi);
drivers/mtd/spi-nor/controllers/intel-spi.c +88 -3
139 lines not on this page · raw message
drivers/mtd/spi-nor/controllers/intel-spi.h +7 -2
@@ -14,8 +14,13 @@struct intel_spi ;struct resource ; -struct intel_spi *intel_spi_probe (struct device *dev, -struct resource *mem,const struct intel_spi_boardinfo *info); +typedef struct device *(*register_platform_integrity_t )(struct device *parent, +enum intel_spi_type type); + +struct intel_spi *intel_spi_probe (struct device *dev,struct resource *mem, +const struct intel_spi_boardinfo *info, +register_platform_integrity_t register_pi_cb); +int intel_spi_remove (struct intel_spi *ispi);#endif /* INTEL_SPI_H */
Signature · 1 line
2.25.1