linux/drivers/acpi/prmt.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Author: Erik Kaneda <[email protected]>
 * Copyright 2020 Intel Corporation
 *
 * prmt.c
 *
 * Each PRM service is an executable that is run in a restricted environment
 * that is invoked by writing to the PlatformRtMechanism OperationRegion from
 * AML bytecode.
 *
 * init_prmt initializes the Platform Runtime Mechanism (PRM) services by
 * processing data in the PRMT as well as registering an ACPI OperationRegion
 * handler for the PlatformRtMechanism subtype.
 *
 */
#include <linux/kernel.h>
#include <linux/efi.h>
#include <linux/acpi.h>
#include <linux/prmt.h>
#include <asm/efi.h>

#pragma pack(1)
struct prm_mmio_addr_range {};

struct prm_mmio_info {};

struct prm_buffer {};

struct prm_context_buffer {};
#pragma pack()

static LIST_HEAD(prm_module_list);

struct prm_handler_info {};

struct prm_module_info {};

static u64 efi_pa_va_lookup(efi_guid_t *guid, u64 pa)
{}

#define get_first_handler(a)
#define get_next_handler(a)

static int __init
acpi_parse_prmt(union acpi_subtable_headers *header, const unsigned long end)
{}

#define GET_MODULE
#define GET_HANDLER

static void *find_guid_info(const guid_t *guid, u8 mode)
{}

static struct prm_module_info *find_prm_module(const guid_t *guid)
{}

static struct prm_handler_info *find_prm_handler(const guid_t *guid)
{}

/* In-coming PRM commands */

#define PRM_CMD_RUN_SERVICE
#define PRM_CMD_START_TRANSACTION
#define PRM_CMD_END_TRANSACTION

/* statuses that can be passed back to ASL */

#define PRM_HANDLER_SUCCESS
#define PRM_HANDLER_ERROR
#define INVALID_PRM_COMMAND
#define PRM_HANDLER_GUID_NOT_FOUND
#define UPDATE_LOCK_ALREADY_HELD
#define UPDATE_UNLOCK_WITHOUT_LOCK

int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer)
{}
EXPORT_SYMBOL_GPL();

/*
 * This is the PlatformRtMechanism opregion space handler.
 * @function: indicates the read/write. In fact as the PlatformRtMechanism
 * message is driven by command, only write is meaningful.
 *
 * @addr   : not used
 * @bits   : not used.
 * @value  : it is an in/out parameter. It points to the PRM message buffer.
 * @handler_context: not used
 */
static acpi_status acpi_platformrt_space_handler(u32 function,
						 acpi_physical_address addr,
						 u32 bits, acpi_integer *value,
						 void *handler_context,
						 void *region_context)
{}

void __init init_prmt(void)
{}