#include <linux/acpi.h>
#include <linux/device.h>
#include <linux/efi.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/idr.h>
#include <linux/miscdevice.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/string.h>
#include <linux/uaccess.h>
#include <linux/uio.h>
#include <linux/uuid.h>
#include <uapi/linux/pfrut.h>
#define PFRU_FUNC_STANDARD_QUERY …
#define PFRU_FUNC_QUERY_UPDATE_CAP …
#define PFRU_FUNC_QUERY_BUF …
#define PFRU_FUNC_START …
#define PFRU_CODE_INJECT_TYPE …
#define PFRU_DRIVER_UPDATE_TYPE …
#define PFRU_REVID_1 …
#define PFRU_REVID_2 …
#define PFRU_DEFAULT_REV_ID …
enum cap_index { … };
enum buf_index { … };
enum update_index { … };
enum pfru_start_action { … };
struct pfru_device { … };
static DEFINE_IDA(pfru_ida);
static const guid_t pfru_guid = …;
static const guid_t pfru_code_inj_guid = …;
static const guid_t pfru_drv_update_guid = …;
static inline int pfru_valid_revid(u32 id)
{ … }
static inline struct pfru_device *to_pfru_dev(struct file *file)
{ … }
static int query_capability(struct pfru_update_cap_info *cap_hdr,
struct pfru_device *pfru_dev)
{ … }
static int query_buffer(struct pfru_com_buf_info *info,
struct pfru_device *pfru_dev)
{ … }
static int get_image_type(const struct efi_manage_capsule_image_header *img_hdr,
struct pfru_device *pfru_dev)
{ … }
static int adjust_efi_size(const struct efi_manage_capsule_image_header *img_hdr,
int size)
{ … }
static bool applicable_image(const void *data, struct pfru_update_cap_info *cap,
struct pfru_device *pfru_dev)
{ … }
static void print_update_debug_info(struct pfru_updated_result *result,
struct pfru_device *pfru_dev)
{ … }
static int start_update(int action, struct pfru_device *pfru_dev)
{ … }
static long pfru_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{ … }
static ssize_t pfru_write(struct file *file, const char __user *buf,
size_t len, loff_t *ppos)
{ … }
static const struct file_operations acpi_pfru_fops = …;
static void acpi_pfru_remove(struct platform_device *pdev)
{ … }
static void pfru_put_idx(void *data)
{ … }
static int acpi_pfru_probe(struct platform_device *pdev)
{ … }
static const struct acpi_device_id acpi_pfru_ids[] = …;
MODULE_DEVICE_TABLE(acpi, acpi_pfru_ids);
static struct platform_driver acpi_pfru_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;