summaryrefslogtreecommitdiffstats
path: root/src/include/usr/isteps/nvdimm/nvdimmreasoncodes.H
blob: da69fb86ea18f01914deedabb220e0001762c65c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/include/usr/isteps/nvdimm/nvdimmreasoncodes.H $           */
/*                                                                        */
/* OpenPOWER HostBoot Project                                             */
/*                                                                        */
/* Contributors Listed Below - COPYRIGHT 2019                             */
/* [+] International Business Machines Corp.                              */
/*                                                                        */
/*                                                                        */
/* Licensed under the Apache License, Version 2.0 (the "License");        */
/* you may not use this file except in compliance with the License.       */
/* You may obtain a copy of the License at                                */
/*                                                                        */
/*     http://www.apache.org/licenses/LICENSE-2.0                         */
/*                                                                        */
/* Unless required by applicable law or agreed to in writing, software    */
/* distributed under the License is distributed on an "AS IS" BASIS,      */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or        */
/* implied. See the License for the specific language governing           */
/* permissions and limitations under the License.                         */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */
/**
 * @file nvdimmreasoncodes.H
 *
 * @brief Reason codes and module ids for the NVDIMM
 *
 */
#ifndef __NVDIMMREASONCODES_H
#define __NVDIMMREASONCODES_H
// -----------------------------------------------
// Includes
// -----------------------------------------------
#include <hbotcompid.H>

namespace NVDIMM
{

/**
* @enum nvdimmModuleid
*
* @brief Module Ids used in created errorlogs.  Indicates which
*      functions an error log was created in.
*
*/
enum nvdimmModuleId
{
    NVDIMM_INVALID_MODULE                   = 0x00,     // Invalid Module Id
    NVDIMM_PERFORM_OP                       = 0x01,
    NVDIMM_READ                             = 0x02,
    NVDIMM_WRITE                            = 0x03,
    NVDIMM_PREPAREADDRESS                   = 0x04,
    NVDIMM_READATTRIBUTES                   = 0x05,
    NVDIMM_GETI2CMASTERTARGET               = 0x06,
    NVDIMM_CROSSESNVDIMMPAGEBOUNDARY        = 0x07,
    NVDIMM_POLL_BACKUP                      = 0x08,
    NVDIMM_POLL_RESTORE                     = 0x09,
    NVDIMM_POLL_ERASE                       = 0x0A,
    NVDIMM_POLL_ARM                         = 0x0B,
    NVDIMM_POLL_CHARGE                      = 0x0C,
    NVDIMM_CHECK_RESTORE                    = 0x0D,
    NVDIMM_CHECK_IMAGE                      = 0x0E,
    NVDIMM_SET_ES                           = 0x0F,
    NVDIMM_SET_ARM                          = 0x10,
    NVDIMM_SET_PAGE                         = 0x11,
    NVDIMM_GET_TIMEOUT                      = 0x12,
    NVDIMM_RESTORE                          = 0x13,
    NVDIMM_OPEN_PAGE                        = 0x14,
    NVDIMM_POLL_STATUS                      = 0x15,
    NVDIMM_CHECK_ERASE                      = 0x16,
    NVDIMM_ARM_ERASE                        = 0x17,
    NVDIMM_CHECK_READY                      = 0x18,
    NOTIFY_NVDIMM_PROTECTION_CHG            = 0x19,
    NVDIMM_RUN_UPDATE                       = 0x1A,
    UPDATE_IMAGE                            = 0x1B,
    UPDATE_IMAGE_DATA                       = 0x1C,
    CHANGE_FW_UPDATE_MODE                   = 0x1D,
    WAIT_FW_OPS_COMPLETE                    = 0x1E,
    BYTE_REGION_BLOCK_TRANSFER              = 0x1F,
    VALIDATE_FW_HEADER                      = 0x20,
    COMMIT_FW_REGION                        = 0x21,
    CLEAR_FW_DATA_BLOCK                     = 0x22,
    VALIDATE_FW_IMAGE                       = 0x23,
    WAIT_FW_OPS_BLOCK_RECEIVED              = 0x24,
    NVDIMM_IS_UPDATE_NEEDED                 = 0x25,
    NVDIMM_RUN_UPDATE_USING_LID             = 0x26,
    NVDIMM_GET_TPM                          = 0x27,
    NVDIMM_SET_KEY_REG                      = 0x28,
    NVDIMM_ENCRYPT_ENABLE                   = 0x29,
    NVDIMM_CRYPTO_ERASE                     = 0x2A,
    NVDIMM_CHECK_VALID_ATTR_DATA            = 0x2B,
    NVDIMM_HANDLE_CONFLICTING_KEYS          = 0x2C,
    NVDIMM_ENCRYPT_UNLOCK                   = 0x2D,
    NVDIMM_GET_DARN_NUMBER                  = 0x2E,
    NVDIMM_KEYIFY_RANDOM_NUMBER             = 0x2F,
    SET_ATTR_NVDIMM_ENCRYPTION_KEYS_FW      = 0x30,
    SEND_ATTR_NVDIMM_ARMED                  = 0x31,
    NVDIMM_FACTORY_RESET                    = 0x32,
    NVDIMM_HEALTH_CHECK                     = 0x33,
    NVDIMM_CHECK_RESETN                     = 0x34,
    NVDIMM_CHECK_CSAVE                      = 0x35,
    NVDIMM_MODULE_HEALTH_STATUS_CHECK       = 0x36,
    NVDIMM_SET_EVENT_NOTIFICATION           = 0x37,
};

/**
 * @enum nvdimmReasonCode
 *
 * @brief Reasoncodes used to describe what errors are being indicated.
 *
 */
enum nvdimmReasonCode
{
    NVDIMM_INVALID_REASONCODE               = NVDIMM_COMP_ID | 0x00,   // Invalid Reasoncode
    NVDIMM_INVALID_OPERATION                = NVDIMM_COMP_ID | 0x01,
    NVDIMM_INVALID_DEVICE_TYPE              = NVDIMM_COMP_ID | 0x02,
    NVDIMM_ATTR_INFO_NOT_FOUND              = NVDIMM_COMP_ID | 0x03,
    NVDIMM_INVALID_CHIP                     = NVDIMM_COMP_ID | 0x04,
    NVDIMM_I2C_MASTER_PATH_ERROR            = NVDIMM_COMP_ID | 0x05,
    NVDIMM_TARGET_NULL                      = NVDIMM_COMP_ID | 0x06,
    NVDIMM_INVALID_ADDR_OFFSET_SIZE         = NVDIMM_COMP_ID | 0x07,
    NVDIMM_OVERFLOW_ERROR                   = NVDIMM_COMP_ID | 0x08,
    NVDIMM_I2C_WRITE_PAGE_SIZE_ZERO         = NVDIMM_COMP_ID | 0x09,
    NVDIMM_INVALID_OFFSET                   = NVDIMM_COMP_ID | 0x0A,
    NVDIMM_READ_FAILURE                     = NVDIMM_COMP_ID | 0x0B,   // NV Controller read failure
    NVDIMM_WRITE_FAILURE                    = NVDIMM_COMP_ID | 0x0C,   // NV Controller write failure
    NVDIMM_BACKUP_TIMEOUT                   = NVDIMM_COMP_ID | 0x0D,   // Backup/save timeout
    NVDIMM_RESTORE_TIMEOUT                  = NVDIMM_COMP_ID | 0x0E,   // Restore timeout
    NVDIMM_ERASE_TIMEOUT                    = NVDIMM_COMP_ID | 0x0F,   // Erase timeout
    NVDIMM_CHARGE_TIMEOUT                   = NVDIMM_COMP_ID | 0x10,   // Battery charging timeout
    NVDIMM_ARM_TIMEOUT                      = NVDIMM_COMP_ID | 0x11,   // Arming timeout
    NVDIMM_SET_ES_ERROR                     = NVDIMM_COMP_ID | 0x12,   // Failure to set the ES policy
    NVDIMM_MSS_STR_ENTRY_ERROR              = NVDIMM_COMP_ID | 0x13,   // Failure to enter STR
    NVDIMM_MSS_STR_EXIT_ERROR               = NVDIMM_COMP_ID | 0x14,   // Failure to exit STR
    NVDIMM_MSS_POST_RSTR_ERROR              = NVDIMM_COMP_ID | 0x15,   // Failure to perform post restore work
    NVDIMM_OPEN_PAGE_TIMEOUT                = NVDIMM_COMP_ID | 0x16,   // Open page timeout
    NVDIMM_STATUS_TIMEOUT                   = NVDIMM_COMP_ID | 0x17,   // Status timeout
    NVDIMM_ARM_FAILED                       = NVDIMM_COMP_ID | 0x18,   // Failure to arm reset_n
    NVDIMM_ERASE_FAILED                     = NVDIMM_COMP_ID | 0x19,   // Failure to erase
    NVDIMM_RESTORE_FAILED                   = NVDIMM_COMP_ID | 0x1A,   // Failure to restore
    NVDIMM_NOT_READY                        = NVDIMM_COMP_ID | 0x1B,   // NVDIMM not ready for host to access
    NVDIMM_NULL_FIRMWARE_REQUEST_PTR        = NVDIMM_COMP_ID | 0x1C,   // Firmware request is NULL
    NVDIMM_UNSUPPORTED_NVDIMM_TYPE          = NVDIMM_COMP_ID | 0x1D,   // Unsupported NVDIMM type for update
    NVDIMM_OPERATION_IN_PROGRESS            = NVDIMM_COMP_ID | 0x1E,   // NV controller is busy
    NVDIMM_CHECKSUM_ERROR                   = NVDIMM_COMP_ID | 0x1F,   // Checksum error between host and nv calculated
    NVDIMM_ZERO_TOTAL_REGIONS               = NVDIMM_COMP_ID | 0x20,   // Zero write regions calculated
    NVDIMM_UPDATE_MODE_UNCHANGED            = NVDIMM_COMP_ID | 0x21,   // Unable to change update mode
    NVDIMM_FW_OPS_IN_PROGRESS_TIMEOUT       = NVDIMM_COMP_ID | 0x22,   // Operations In Progress timeout
    NVDIMM_DATA_SIZE_TOO_LARGE              = NVDIMM_COMP_ID | 0x23,   // Trying to write too much data
    NVDIMM_DATA_SIZE_INVALID                = NVDIMM_COMP_ID | 0x24,   // Data size is invalid
    NVDIMM_BLOCK_NOT_RECEIVED               = NVDIMM_COMP_ID | 0x25,   // Block data not received
    NVDIMM_FW_OPS_NOT_SUCCESSFUL            = NVDIMM_COMP_ID | 0x26,   // Unsuccessful Firmware Operation
    NVDIMM_UPDATE_NOT_SUPPORTED             = NVDIMM_COMP_ID | 0x27,   // NV controller cannot be updated
    NVDIMM_START_UPDATE                     = NVDIMM_COMP_ID | 0x28,   // start update
    NVDIMM_UPDATE_COMPLETE                  = NVDIMM_COMP_ID | 0x29,   // update completed
    NVDIMM_TPM_NOT_FOUND                    = NVDIMM_COMP_ID | 0x2A,   // TPM not found
    NVDIMM_POWER_SAVE_FAILURE               = NVDIMM_COMP_ID | 0x2B,   // Save failed due to power loss
    NVDIMM_CSAVE_ERROR                      = NVDIMM_COMP_ID | 0x2C,   // CSave failed due to error
    NVDIMM_VOLTAGE_REGULATOR_FAILED         = NVDIMM_COMP_ID | 0x2D,
    NVDIMM_VDD_LOST                         = NVDIMM_COMP_ID | 0x2E,
    NVDIMM_VPP_LOST                         = NVDIMM_COMP_ID | 0x2F,
    NVDIMM_VTT_LOST                         = NVDIMM_COMP_ID | 0x30,
    NVDIMM_DRAM_NOT_SELF_REFRESH            = NVDIMM_COMP_ID | 0x31,
    NVDIMM_CONTROLLER_HARDWARE_ERROR        = NVDIMM_COMP_ID | 0x32,
    NVDIMM_NVM_CONTROLLER_ERROR             = NVDIMM_COMP_ID | 0x33,
    NVDIMM_NVM_LIFETIME_ERROR               = NVDIMM_COMP_ID | 0x34,
    NVDIMM_NOT_ENOUGH_ENERGY_FOR_CSAVE      = NVDIMM_COMP_ID | 0x35,
    NVDIMM_INVALID_FIRMWARE_ERROR           = NVDIMM_COMP_ID | 0x36,   // Module Health Status Registers
    NVDIMM_CONFIG_DATA_ERROR                = NVDIMM_COMP_ID | 0x37,
    NVDIMM_NO_ES_PRESENT                    = NVDIMM_COMP_ID | 0x38,
    NVDIMM_ES_POLICY_NOT_SET                = NVDIMM_COMP_ID | 0x39,
    NVDIMM_ES_HARDWARE_FAILURE              = NVDIMM_COMP_ID | 0x3A,
    NVDIMM_ES_HEALTH_ASSESSMENT_ERROR       = NVDIMM_COMP_ID | 0x3B,
    NVDIMM_ES_LIFETIME_ERROR                = NVDIMM_COMP_ID | 0x3C,
    NVDIMM_ES_TEMP_ERROR                    = NVDIMM_COMP_ID | 0x3D,
    NVDIMM_SET_EVENT_NOTIFICATION_ERROR     = NVDIMM_COMP_ID | 0x3E,
    NVDIMM_VERIF_BYTE_CHECK_FAILED          = NVDIMM_COMP_ID | 0x3F,   // Encryption key reg verif failed
    NVDIMM_ENCRYPTION_ENABLE_FAILED         = NVDIMM_COMP_ID | 0x40,   // Encryption enable failed
    NVDIMM_ENCRYPTION_ERASE_PENDING_FAILED  = NVDIMM_COMP_ID | 0x41,   // Encryption crypto erase pending failed
    NVDIMM_ENCRYPTION_ERASE_FAILED          = NVDIMM_COMP_ID | 0x42,   // Encryption crypto erase failed
    NVDIMM_ENCRYPTION_UNLOCK_FAILED         = NVDIMM_COMP_ID | 0x43,   // Encryption unlock failed
    NVDIMM_ENCRYPTION_INVALID_ATTRIBUTE     = NVDIMM_COMP_ID | 0x44,   // Encryption attribute key data invalid
    NVDIMM_ENCRYPTION_KEY_ATTRS_INVALID     = NVDIMM_COMP_ID | 0x45,   // Encryption key attributes are both invalid
    NVDIMM_ENCRYPTION_MAX_DARN_ERRORS       = NVDIMM_COMP_ID | 0x46,   // Darn random key gen reached max errors
    NVDIMM_ENCRYPTION_BAD_RANDOM_DATA       = NVDIMM_COMP_ID | 0x47,   // Generated key data not valid
    NVDIMM_CANNOT_MAKE_ATTRIBUTE            = NVDIMM_COMP_ID | 0x48,   // Cannot make Attribute
    NVDIMM_HEALTH_CHECK_IN_PROGRESS_FAILURE = NVDIMM_COMP_ID | 0x49,   // !< pertains to ES_CMD_STATUS0[0]; the health check in progress flag
    NVDIMM_HEALTH_CHECK_REPORTED_FAILURE    = NVDIMM_COMP_ID | 0x4A,   // !< pertains to ES_CMD_STATUS0[2]; the health check reported a failure flag
    NVDIMM_LIFETIME_MIN_REQ_NOT_MET         = NVDIMM_COMP_ID | 0x4B,   // !< pertains to ES_LIFETIME; BPM does not meet minimum requirement for a new BPM
    NVDIMM_HEALTH_CHECK_NEVER_INITIATED     = NVDIMM_COMP_ID | 0x4C,   // !< A health check was never initiated at start of IPL
};

enum UserDetailsTypes
{
        NVDIMM_UDT_NO_FORMAT       = 0x0,
        NVDIMM_UDT_PARAMETERS      = 0x1,
        NVDIMM_OP_PARAMETERS       = 0x2,
};

};  // end NVDIMM

#endif
OpenPOWER on IntegriCloud