]> git.proxmox.com Git - ceph.git/blame - ceph/src/pmdk/src/libpmem2/auto_flush_windows.h
import ceph 16.2.7
[ceph.git] / ceph / src / pmdk / src / libpmem2 / auto_flush_windows.h
CommitLineData
a4b75251
TL
1/* SPDX-License-Identifier: BSD-3-Clause */
2/* Copyright 2018-2020, Intel Corporation */
3
4#ifndef PMEM2_AUTO_FLUSH_WINDOWS_H
5#define PMEM2_AUTO_FLUSH_WINDOWS_H 1
6
7#define ACPI_SIGNATURE 0x41435049 /* hex value of ACPI signature */
8#define NFIT_REV_SIGNATURE 0x5449464e /* hex value of htonl(NFIT) signature */
9#define NFIT_STR_SIGNATURE "NFIT"
10
11#define NFIT_SIGNATURE_LEN 4
12#define NFIT_OEM_ID_LEN 6
13#define NFIT_OEM_TABLE_ID_LEN 8
14#define NFIT_MAX_STRUCTURES 8
15
16#define PCS_RESERVED 3
17#define PCS_RESERVED_2 4
18#define PCS_TYPE_NUMBER 7
19
20/* check if bit on 'bit' position in number 'num' is set */
21#define CHECK_BIT(num, bit) (((num) >> (bit)) & 1)
22/*
23 * sets alignment of members of structure
24 */
25#pragma pack(1)
26struct platform_capabilities
27{
28 uint16_t type;
29 uint16_t length;
30 uint8_t highest_valid;
31 uint8_t reserved[PCS_RESERVED];
32 uint32_t capabilities;
33 uint8_t reserved2[PCS_RESERVED_2];
34};
35
36struct nfit_header
37{
38 uint8_t signature[NFIT_SIGNATURE_LEN];
39 uint32_t length;
40 uint8_t revision;
41 uint8_t checksum;
42 uint8_t oem_id[NFIT_OEM_ID_LEN];
43 uint8_t oem_table_id[NFIT_OEM_TABLE_ID_LEN];
44 uint32_t oem_revision;
45 uint8_t creator_id[4];
46 uint32_t creator_revision;
47 uint32_t reserved;
48};
49#pragma pack()
50#endif