2 * NVDIMM Firmware Interface Table - NFIT
4 * Copyright(c) 2013-2015 Intel Corporation. All rights reserved.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of version 2 of the GNU General Public License as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
17 #include <linux/libnvdimm.h>
18 #include <linux/types.h>
19 #include <linux/uuid.h>
20 #include <linux/acpi.h>
21 #include <acpi/acuuid.h>
23 #define UUID_NFIT_BUS "2f10e7a4-9e91-11e4-89d3-123b93f75cba"
24 #define UUID_NFIT_DIMM "4309ac30-0d11-11e4-9191-0800200c9a66"
41 struct acpi_nfit_system_address
*spa
;
42 struct list_head list
;
46 struct acpi_nfit_control_region
*dcr
;
47 struct list_head list
;
51 struct acpi_nfit_data_region
*bdw
;
52 struct list_head list
;
56 struct acpi_nfit_memory_map
*memdev
;
57 struct list_head list
;
60 /* assembled tables for a given dimm/memory-device */
62 struct acpi_nfit_memory_map
*memdev_dcr
;
63 struct acpi_nfit_memory_map
*memdev_pmem
;
64 struct acpi_nfit_control_region
*dcr
;
65 struct acpi_nfit_data_region
*bdw
;
66 struct acpi_nfit_system_address
*spa_dcr
;
67 struct acpi_nfit_system_address
*spa_bdw
;
68 struct list_head list
;
71 struct acpi_nfit_desc
{
72 struct nvdimm_bus_descriptor nd_desc
;
73 struct acpi_table_nfit
*nfit
;
74 struct list_head memdevs
;
75 struct list_head dimms
;
76 struct list_head spas
;
77 struct list_head dcrs
;
78 struct list_head bdws
;
79 struct nvdimm_bus
*nvdimm_bus
;
83 static inline struct acpi_nfit_memory_map
*__to_nfit_memdev(
84 struct nfit_mem
*nfit_mem
)
86 if (nfit_mem
->memdev_dcr
)
87 return nfit_mem
->memdev_dcr
;
88 return nfit_mem
->memdev_pmem
;
90 #endif /* __NFIT_H__ */