linux/drivers/acpi/nfit/nfit.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * NVDIMM Firmware Interface Table - NFIT
 *
 * Copyright(c) 2013-2015 Intel Corporation. All rights reserved.
 */
#ifndef __NFIT_H__
#define __NFIT_H__
#include <linux/workqueue.h>
#include <linux/libnvdimm.h>
#include <linux/ndctl.h>
#include <linux/types.h>
#include <linux/acpi.h>
#include <acpi/acuuid.h>

/* ACPI 6.1 */
#define UUID_NFIT_BUS

/* https://pmem.io/documents/NVDIMM_DSM_Interface-V1.6.pdf */
#define UUID_NFIT_DIMM
#define UUID_INTEL_BUS

/* https://github.com/HewlettPackard/hpe-nvm/blob/master/Documentation/ */
#define UUID_NFIT_DIMM_N_HPE1
#define UUID_NFIT_DIMM_N_HPE2

/* https://msdn.microsoft.com/library/windows/hardware/mt604741 */
#define UUID_NFIT_DIMM_N_MSFT

/* http://www.uefi.org/RFIC_LIST (see "Virtual NVDIMM 0x1901") */
#define UUID_NFIT_DIMM_N_HYPERV

#define ACPI_NFIT_MEM_FAILED_MASK

#define NVDIMM_CMD_MAX

#define NVDIMM_STANDARD_CMDMASK

/*
 * Command numbers that the kernel needs to know about to handle
 * non-default DSM revision ids
 */
enum nvdimm_family_cmds {};

enum nvdimm_bus_family_cmds {};

#define NVDIMM_INTEL_SECURITY_CMDMASK

#define NVDIMM_INTEL_FW_ACTIVATE_CMDMASK

#define NVDIMM_BUS_INTEL_FW_ACTIVATE_CMDMASK

#define NVDIMM_INTEL_CMDMASK

#define NVDIMM_INTEL_DENY_CMDMASK

enum nfit_uuids {};

/*
 * Region format interface codes are stored with the interface as the
 * LSB and the function as the MSB.
 */
#define NFIT_FIC_BYTE
#define NFIT_FIC_BLK
#define NFIT_FIC_BYTEN

enum {};

enum nfit_root_notifiers {};

enum nfit_dimm_notifiers {};

enum nfit_ars_state {};

struct nfit_spa {};

struct nfit_dcr {};

struct nfit_bdw {};

struct nfit_idt {};

struct nfit_flush {};

struct nfit_memdev {};

enum nfit_mem_flags {};

#define NFIT_DIMM_ID_LEN

/* assembled tables for a given dimm/memory-device */
struct nfit_mem {};

enum scrub_flags {};

struct acpi_nfit_desc {};

enum scrub_mode {};

enum nd_blk_mmio_selector {};

struct nd_blk_addr {};

struct nfit_blk {};

extern struct list_head acpi_descs;
extern struct mutex acpi_desc_lock;
int acpi_nfit_ars_rescan(struct acpi_nfit_desc *acpi_desc,
		enum nfit_ars_state req_type);

#ifdef CONFIG_X86_MCE
void nfit_mce_register(void);
void nfit_mce_unregister(void);
#else
static inline void nfit_mce_register(void)
{
}
static inline void nfit_mce_unregister(void)
{
}
#endif

int nfit_spa_type(struct acpi_nfit_system_address *spa);

static inline struct acpi_nfit_memory_map *__to_nfit_memdev(
		struct nfit_mem *nfit_mem)
{}

static inline struct acpi_nfit_desc *to_acpi_desc(
		struct nvdimm_bus_descriptor *nd_desc)
{}

const guid_t *to_nfit_uuid(enum nfit_uuids id);
int acpi_nfit_init(struct acpi_nfit_desc *acpi_desc, void *nfit, acpi_size sz);
void acpi_nfit_shutdown(void *data);
void __acpi_nfit_notify(struct device *dev, acpi_handle handle, u32 event);
void __acpi_nvdimm_notify(struct device *dev, u32 event);
int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
		unsigned int cmd, void *buf, unsigned int buf_len, int *cmd_rc);
void acpi_nfit_desc_init(struct acpi_nfit_desc *acpi_desc, struct device *dev);
bool intel_fwa_supported(struct nvdimm_bus *nvdimm_bus);
extern struct device_attribute dev_attr_firmware_activate_noidle;
void nfit_intel_shutdown_status(struct nfit_mem *nfit_mem);

#endif /* __NFIT_H__ */