2019-05-29 14:18:02 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2015-07-30 21:57:47 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2014-2015, Intel Corporation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __NVDIMM_PFN_H
|
|
|
|
#define __NVDIMM_PFN_H
|
|
|
|
|
|
|
|
#include <linux/types.h>
|
2016-03-03 17:14:36 +00:00
|
|
|
#include <linux/mmzone.h>
|
2015-07-30 21:57:47 +00:00
|
|
|
|
|
|
|
#define PFN_SIG_LEN 16
|
|
|
|
#define PFN_SIG "NVDIMM_PFN_INFO\0"
|
2016-05-18 21:50:12 +00:00
|
|
|
#define DAX_SIG "NVDIMM_DAX_INFO\0"
|
2015-07-30 21:57:47 +00:00
|
|
|
|
|
|
|
struct nd_pfn_sb {
|
|
|
|
u8 signature[PFN_SIG_LEN];
|
|
|
|
u8 uuid[16];
|
|
|
|
u8 parent_uuid[16];
|
|
|
|
__le32 flags;
|
|
|
|
__le16 version_major;
|
|
|
|
__le16 version_minor;
|
2016-03-03 17:38:00 +00:00
|
|
|
__le64 dataoff; /* relative to namespace_base + start_pad */
|
2015-07-30 21:57:47 +00:00
|
|
|
__le64 npfns;
|
|
|
|
__le32 mode;
|
2016-03-03 17:38:00 +00:00
|
|
|
/* minor-version-1 additions for section alignment */
|
|
|
|
__le32 start_pad;
|
|
|
|
__le32 end_trunc;
|
2016-03-31 22:41:18 +00:00
|
|
|
/* minor-version-2 record the base alignment of the mapping */
|
|
|
|
__le32 align;
|
2019-07-18 22:58:36 +00:00
|
|
|
/* minor-version-3 guarantee the padding and flags are zero */
|
2016-03-31 22:41:18 +00:00
|
|
|
u8 padding[4000];
|
2015-07-30 21:57:47 +00:00
|
|
|
__le64 checksum;
|
|
|
|
};
|
2016-03-03 17:14:36 +00:00
|
|
|
|
2015-07-30 21:57:47 +00:00
|
|
|
#endif /* __NVDIMM_PFN_H */
|