linux/drivers/platform/x86/amd/pmf/tee-if.c

// SPDX-License-Identifier: GPL-2.0
/*
 * AMD Platform Management Framework Driver - TEE Interface
 *
 * Copyright (c) 2023, Advanced Micro Devices, Inc.
 * All Rights Reserved.
 *
 * Author: Shyam Sundar S K <[email protected]>
 */

#include <linux/debugfs.h>
#include <linux/tee_drv.h>
#include <linux/uuid.h>
#include "pmf.h"

#define MAX_TEE_PARAM

/* Policy binary actions sampling frequency (in ms) */
static int pb_actions_ms =;
/* Sideload policy binaries to debug policy failures */
static bool pb_side_load;

#ifdef CONFIG_AMD_PMF_DEBUG
module_param(pb_actions_ms, int, 0644);
MODULE_PARM_DESC();
module_param(pb_side_load, bool, 0444);
MODULE_PARM_DESC();
#endif

static const uuid_t amd_pmf_ta_uuid =;

static const char *amd_pmf_uevent_as_str(unsigned int state)
{}

static void amd_pmf_prepare_args(struct amd_pmf_dev *dev, int cmd,
				 struct tee_ioctl_invoke_arg *arg,
				 struct tee_param *param)
{}

static void amd_pmf_update_uevents(struct amd_pmf_dev *dev, u16 event)
{}

static void amd_pmf_apply_policies(struct amd_pmf_dev *dev, struct ta_pmf_enact_result *out)
{}

static int amd_pmf_invoke_cmd_enact(struct amd_pmf_dev *dev)
{}

static int amd_pmf_invoke_cmd_init(struct amd_pmf_dev *dev)
{}

static void amd_pmf_invoke_cmd(struct work_struct *work)
{}

static int amd_pmf_start_policy_engine(struct amd_pmf_dev *dev)
{}

#ifdef CONFIG_AMD_PMF_DEBUG
static void amd_pmf_hex_dump_pb(struct amd_pmf_dev *dev)
{}

static ssize_t amd_pmf_get_pb_data(struct file *filp, const char __user *buf,
				   size_t length, loff_t *pos)
{}

static const struct file_operations pb_fops =;

static void amd_pmf_open_pb(struct amd_pmf_dev *dev, struct dentry *debugfs_root)
{}

static void amd_pmf_remove_pb(struct amd_pmf_dev *dev)
{}
#else
static void amd_pmf_open_pb(struct amd_pmf_dev *dev, struct dentry *debugfs_root) {}
static void amd_pmf_remove_pb(struct amd_pmf_dev *dev) {}
static void amd_pmf_hex_dump_pb(struct amd_pmf_dev *dev) {}
#endif

static int amd_pmf_amdtee_ta_match(struct tee_ioctl_version_data *ver, const void *data)
{}

static int amd_pmf_ta_open_session(struct tee_context *ctx, u32 *id)
{}

static int amd_pmf_register_input_device(struct amd_pmf_dev *dev)
{}

static int amd_pmf_tee_init(struct amd_pmf_dev *dev)
{}

static void amd_pmf_tee_deinit(struct amd_pmf_dev *dev)
{}

int amd_pmf_init_smart_pc(struct amd_pmf_dev *dev)
{}

void amd_pmf_deinit_smart_pc(struct amd_pmf_dev *dev)
{}