/* * Copyright (c) 2014-2016, Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, * version 2.1, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for * more details.
*/ #ifndef __NDCTL_H__ #define __NDCTL_H__
staticinlineconstchar *nvdimm_bus_cmd_name(unsigned cmd)
{ switch (cmd) { case ND_CMD_ARS_CAP: return"ars_cap"; case ND_CMD_ARS_START: return"ars_start"; case ND_CMD_ARS_STATUS: return"ars_status"; case ND_CMD_CLEAR_ERROR: return"clear_error"; case ND_CMD_CALL: return"cmd_call"; default: return"unknown";
}
}
staticinlineconstchar *nvdimm_cmd_name(unsigned cmd)
{ switch (cmd) { case ND_CMD_SMART: return"smart"; case ND_CMD_SMART_THRESHOLD: return"smart_thresh"; case ND_CMD_DIMM_FLAGS: return"flags"; case ND_CMD_GET_CONFIG_SIZE: return"get_size"; case ND_CMD_GET_CONFIG_DATA: return"get_data"; case ND_CMD_SET_CONFIG_DATA: return"set_data"; case ND_CMD_VENDOR_EFFECT_LOG_SIZE: return"effect_size"; case ND_CMD_VENDOR_EFFECT_LOG: return"effect_log"; case ND_CMD_VENDOR: return"vendor"; case ND_CMD_CALL: return"cmd_call"; default: return"unknown";
}
}
/* * struct nd_cmd_pkg * * is a wrapper to a quasi pass thru interface for invoking firmware * associated with nvdimms. * * INPUT PARAMETERS * * nd_family corresponds to the firmware (e.g. DSM) interface. * * nd_command are the function index advertised by the firmware. * * nd_size_in is the size of the input parameters being passed to firmware * * OUTPUT PARAMETERS * * nd_fw_size is the size of the data firmware wants to return for * the call. If nd_fw_size is greater than size of nd_size_out, only * the first nd_size_out bytes are returned.
*/
struct nd_cmd_pkg {
__u64 nd_family; /* family of commands */
__u64 nd_command;
__u32 nd_size_in; /* INPUT: size of input args */
__u32 nd_size_out; /* INPUT: size of payload */
__u32 nd_reserved2[9]; /* reserved must be zero */
__u32 nd_fw_size; /* OUTPUT: size fw wants to return */ unsignedchar nd_payload[]; /* Contents of call */
};
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.5Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.