linux/drivers/platform/x86/intel/wmi/sbl-fw-update.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Slim Bootloader(SBL) firmware update signaling driver
 *
 * Slim Bootloader is a small, open-source, non UEFI compliant, boot firmware
 * optimized for running on certain Intel platforms.
 *
 * SBL exposes an ACPI-WMI device via /sys/bus/wmi/devices/<INTEL_WMI_SBL_GUID>.
 * This driver further adds "firmware_update_request" device attribute.
 * This attribute normally has a value of 0 and userspace can signal SBL
 * to update firmware, on next reboot, by writing a value of 1.
 *
 * More details of SBL firmware update process is available at:
 * https://slimbootloader.github.io/security/firmware-update.html
 */

#include <linux/acpi.h>
#include <linux/device.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/wmi.h>

#define INTEL_WMI_SBL_GUID

static int get_fwu_request(struct device *dev, u32 *out)
{}

static int set_fwu_request(struct device *dev, u32 in)
{}

static ssize_t firmware_update_request_show(struct device *dev,
					    struct device_attribute *attr,
					    char *buf)
{}

static ssize_t firmware_update_request_store(struct device *dev,
					     struct device_attribute *attr,
					     const char *buf, size_t count)
{}
static DEVICE_ATTR_RW(firmware_update_request);

static struct attribute *firmware_update_attrs[] =;
ATTRIBUTE_GROUPS();

static int intel_wmi_sbl_fw_update_probe(struct wmi_device *wdev,
					 const void *context)
{}

static void intel_wmi_sbl_fw_update_remove(struct wmi_device *wdev)
{}

static const struct wmi_device_id intel_wmi_sbl_id_table[] =;
MODULE_DEVICE_TABLE(wmi, intel_wmi_sbl_id_table);

static struct wmi_driver intel_wmi_sbl_fw_update_driver =;
module_wmi_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();