Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/nvdimm/nvdimm_var.h
Show First 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | |||||
__BUS_ACCESSOR(nvdimm_root, acpi_handle, NVDIMM_ROOT, ACPI_HANDLE, ACPI_HANDLE) | __BUS_ACCESSOR(nvdimm_root, acpi_handle, NVDIMM_ROOT, ACPI_HANDLE, ACPI_HANDLE) | ||||
__BUS_ACCESSOR(nvdimm_root, device_handle, NVDIMM_ROOT, DEVICE_HANDLE, | __BUS_ACCESSOR(nvdimm_root, device_handle, NVDIMM_ROOT, DEVICE_HANDLE, | ||||
nfit_handle_t) | nfit_handle_t) | ||||
struct nvdimm_dev { | struct nvdimm_dev { | ||||
device_t nv_dev; | device_t nv_dev; | ||||
nfit_handle_t nv_handle; | nfit_handle_t nv_handle; | ||||
uint64_t **nv_flush_addr; | uint64_t **nv_flush_addr; | ||||
char *nv_flags_str; | |||||
int nv_flush_addr_cnt; | int nv_flush_addr_cnt; | ||||
uint32_t label_area_size; | uint32_t label_area_size; | ||||
uint32_t max_label_xfer; | uint32_t max_label_xfer; | ||||
struct nvdimm_label_index *label_index; | struct nvdimm_label_index *label_index; | ||||
SLIST_HEAD(, nvdimm_label_entry) labels; | SLIST_HEAD(, nvdimm_label_entry) labels; | ||||
}; | }; | ||||
enum SPA_mapping_type { | enum SPA_mapping_type { | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | |||||
void acpi_nfit_get_spa_ranges(ACPI_TABLE_NFIT *nfitbl, | void acpi_nfit_get_spa_ranges(ACPI_TABLE_NFIT *nfitbl, | ||||
ACPI_NFIT_SYSTEM_ADDRESS ***listp, int *countp); | ACPI_NFIT_SYSTEM_ADDRESS ***listp, int *countp); | ||||
void acpi_nfit_get_region_mappings_by_spa_range(ACPI_TABLE_NFIT *nfitbl, | void acpi_nfit_get_region_mappings_by_spa_range(ACPI_TABLE_NFIT *nfitbl, | ||||
uint16_t spa_range_index, ACPI_NFIT_MEMORY_MAP ***listp, int *countp); | uint16_t spa_range_index, ACPI_NFIT_MEMORY_MAP ***listp, int *countp); | ||||
void acpi_nfit_get_control_region(ACPI_TABLE_NFIT *nfitbl, | void acpi_nfit_get_control_region(ACPI_TABLE_NFIT *nfitbl, | ||||
uint16_t control_region_index, ACPI_NFIT_CONTROL_REGION **out); | uint16_t control_region_index, ACPI_NFIT_CONTROL_REGION **out); | ||||
void acpi_nfit_get_flush_addrs(ACPI_TABLE_NFIT *nfitbl, nfit_handle_t dimm, | void acpi_nfit_get_flush_addrs(ACPI_TABLE_NFIT *nfitbl, nfit_handle_t dimm, | ||||
uint64_t ***listp, int *countp); | uint64_t ***listp, int *countp); | ||||
void acpi_nfit_get_memory_maps_by_dimm(ACPI_TABLE_NFIT *nfitbl, | |||||
nfit_handle_t dimm, ACPI_NFIT_MEMORY_MAP ***listp, int *countp); | |||||
enum SPA_mapping_type nvdimm_spa_type_from_name(const char *); | enum SPA_mapping_type nvdimm_spa_type_from_name(const char *); | ||||
enum SPA_mapping_type nvdimm_spa_type_from_uuid(struct uuid *); | enum SPA_mapping_type nvdimm_spa_type_from_uuid(struct uuid *); | ||||
bool nvdimm_spa_type_user_accessible(enum SPA_mapping_type); | bool nvdimm_spa_type_user_accessible(enum SPA_mapping_type); | ||||
struct nvdimm_dev *nvdimm_find_by_handle(nfit_handle_t nv_handle); | struct nvdimm_dev *nvdimm_find_by_handle(nfit_handle_t nv_handle); | ||||
int nvdimm_spa_init(struct SPA_mapping *spa, ACPI_NFIT_SYSTEM_ADDRESS *nfitaddr, | int nvdimm_spa_init(struct SPA_mapping *spa, ACPI_NFIT_SYSTEM_ADDRESS *nfitaddr, | ||||
enum SPA_mapping_type spa_type); | enum SPA_mapping_type spa_type); | ||||
void nvdimm_spa_fini(struct SPA_mapping *spa); | void nvdimm_spa_fini(struct SPA_mapping *spa); | ||||
int nvdimm_spa_dev_init(struct nvdimm_spa_dev *dev, const char *name, int unit); | int nvdimm_spa_dev_init(struct nvdimm_spa_dev *dev, const char *name, int unit); | ||||
void nvdimm_spa_dev_fini(struct nvdimm_spa_dev *dev); | void nvdimm_spa_dev_fini(struct nvdimm_spa_dev *dev); | ||||
int nvdimm_create_namespaces(struct SPA_mapping *spa, ACPI_TABLE_NFIT *nfitbl); | int nvdimm_create_namespaces(struct SPA_mapping *spa, ACPI_TABLE_NFIT *nfitbl); | ||||
void nvdimm_destroy_namespaces(struct SPA_mapping *spa); | void nvdimm_destroy_namespaces(struct SPA_mapping *spa); | ||||
#endif /* __DEV_NVDIMM_VAR_H__ */ | #endif /* __DEV_NVDIMM_VAR_H__ */ |