1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright(c) 2018 Intel Corporation. All rights reserved.
4 * Intel specific definitions for NVDIMM Firmware Interface Table - NFIT
9 #define ND_INTEL_SMART 1
11 #define ND_INTEL_SMART_SHUTDOWN_COUNT_VALID (1 << 5)
12 #define ND_INTEL_SMART_SHUTDOWN_VALID (1 << 10)
14 struct nd_intel_smart {
24 u16 media_temperature;
38 extern const struct nvdimm_security_ops *intel_security_ops;
40 #define ND_INTEL_STATUS_SIZE 4
41 #define ND_INTEL_PASSPHRASE_SIZE 32
43 #define ND_INTEL_STATUS_NOT_SUPPORTED 1
44 #define ND_INTEL_STATUS_RETRY 5
45 #define ND_INTEL_STATUS_NOT_READY 9
46 #define ND_INTEL_STATUS_INVALID_STATE 10
47 #define ND_INTEL_STATUS_INVALID_PASS 11
48 #define ND_INTEL_STATUS_OVERWRITE_UNSUPPORTED 0x10007
49 #define ND_INTEL_STATUS_OQUERY_INPROGRESS 0x10007
50 #define ND_INTEL_STATUS_OQUERY_SEQUENCE_ERR 0x20007
52 #define ND_INTEL_SEC_STATE_ENABLED 0x02
53 #define ND_INTEL_SEC_STATE_LOCKED 0x04
54 #define ND_INTEL_SEC_STATE_FROZEN 0x08
55 #define ND_INTEL_SEC_STATE_PLIMIT 0x10
56 #define ND_INTEL_SEC_STATE_UNSUPPORTED 0x20
57 #define ND_INTEL_SEC_STATE_OVERWRITE 0x40
59 #define ND_INTEL_SEC_ESTATE_ENABLED 0x01
60 #define ND_INTEL_SEC_ESTATE_PLIMIT 0x02
62 struct nd_intel_get_security_state {
70 struct nd_intel_set_passphrase {
71 u8 old_pass[ND_INTEL_PASSPHRASE_SIZE];
72 u8 new_pass[ND_INTEL_PASSPHRASE_SIZE];
76 struct nd_intel_unlock_unit {
77 u8 passphrase[ND_INTEL_PASSPHRASE_SIZE];
81 struct nd_intel_disable_passphrase {
82 u8 passphrase[ND_INTEL_PASSPHRASE_SIZE];
86 struct nd_intel_freeze_lock {
90 struct nd_intel_secure_erase {
91 u8 passphrase[ND_INTEL_PASSPHRASE_SIZE];
95 struct nd_intel_overwrite {
96 u8 passphrase[ND_INTEL_PASSPHRASE_SIZE];
100 struct nd_intel_query_overwrite {
104 struct nd_intel_set_master_passphrase {
105 u8 old_pass[ND_INTEL_PASSPHRASE_SIZE];
106 u8 new_pass[ND_INTEL_PASSPHRASE_SIZE];
110 struct nd_intel_master_secure_erase {
111 u8 passphrase[ND_INTEL_PASSPHRASE_SIZE];