NVIDIA DRIVE OS Linux API Reference

5.1.0.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nverror.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2018, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA Corporation and its licensors retain all intellectual property and
5  * proprietary rights in and to this software and related documentation. Any
6  * use, reproduction, disclosure or distribution of this software and related
7  * documentation without an express license agreement from NVIDIA Corporation
8  * is strictly prohibited.
9  */
10 
18 #ifndef INCLUDED_NVERROR_H
19 #define INCLUDED_NVERROR_H
20 
21 #ifdef QB_BL_BUILD
22 
37 typedef enum
38 {
39 
40  NvError_Success = 0x00000000,
41  NvError_NotImplemented = 0x00000001,
42  NvError_NotSupported = 0x00000002,
43  NvError_NotInitialized = 0x00000003,
44  NvError_BadParameter = 0x00000004,
45  NvError_Timeout = 0x00000005,
46  NvError_InsufficientMemory = 0x00000006,
47  NvError_ReadOnlyAttribute = 0x00000007,
48  NvError_InvalidState = 0x00000008,
49  NvError_InvalidAddress = 0x00000009,
50  NvError_InvalidSize = 0x0000000A,
51  NvError_BadValue = 0x0000000B,
52  NvError_AlreadyAllocated = 0x0000000C,
53  NvError_Busy = 0x0000000D,
54  NvError_ModuleNotPresent = 0x0000000E,
55  NvError_ResourceError = 0x0000000F,
56  NvError_CountMismatch = 0x00000010,
57  NvError_OverFlow = 0x00000011,
58  NvError_ImageCorrupted = 0x00000012,
59  NvError_BadImage = 0x00000013,
60  NvError_FuseBurningTempReadFailure = 0x00000014,
61  NvError_Mb1PartialUpdate = 0x00000015,
62  NvError_Sc7PartialUpdate = 0x00000016,
63  NvError_MtsPartialUpdate = 0x00000017,
64  NvError_Mb1OemSwRatchetSanityCheckFailed = 0x00000018,
65  NvError_MtsOemSwRatchetSanityCheckFailed = 0x00000019,
66  NvError_MtsRatchetScratchNotInitialized = 0x0000001a,
67  NvError_Sc7OemSwRatchetSanityCheckFailed = 0x0000001b,
68  NvError_Mb1Sc7OemSwRatchetMismatch = 0x0000001c,
69  NvError_HashMismatch = 0x0000001d,
70  NvError_ImageMismatch = 0x0000001e,
71  Nverror_InvalidPtLayout = 0x0000001f,
72  NvError_BCHNotCached = 0x00000020,
73  NvError_FuseBurningTempLow = 0x00000021,
74  NvError_FuseBurningTempHigh = 0x00000022,
75  NvError_ECIDMisMatch = 0x00000023,
76  NvError_InActiveBinInvalid = 0x00000024,
77 
78  NvError_FileWriteFailed = 0x00030000,
79  NvError_FileReadFailed = 0x00030001,
80  NvError_EndOfFile = 0x00030002,
81  NvError_FileOperationFailed = 0x00030003,
82  NvError_DirOperationFailed = 0x00030004,
83  NvError_EndOfDirList = 0x00030005,
84  NvError_ConfigVarNotFound = 0x00030006,
85  NvError_InvalidConfigVar = 0x00030007,
86  NvError_MemoryMapFailed = 0x0003000a,
87  NvError_IoctlFailed = 0x0003000f,
88  NvError_AccessDenied = 0x00030010,
89  NvError_DeviceNotFound = 0x00030011,
90  NvError_KernelDriverNotFound = 0x00030012,
91  NvError_FileNotFound = 0x00030013,
92  NvError_InvalidArgument = 0x00030014,
93  NvError_ProcessNotFound = 0x00030015,
94  NvError_Deadlock = 0x00030016,
95  NvError_FileNameNotExist = 0x00030017,
96  NvError_PartitionNotExist = 0x00030018,
97  NvError_DeviceFailToRegister = 0x00030019,
98  NvError_SystemCommandFailed = 0x0003001A,
99  NvError_CorruptedBuffer = 0x0003000B,
100 
101  NvError_SdioCardNotPresent = 0x00042000,
102  NvError_SdioInstanceTaken = 0x00042001,
103  NvError_SdioControllerBusy = 0x00042002,
104  NvError_SdioReadFailed = 0x00042003,
105  NvError_SdioWriteFailed = 0x00042004,
106  NvError_SdioBadBlockSize = 0x00042005,
107  NvError_SdioClockNotConfigured = 0x00042006,
108  NvError_SdioSdhcPatternIntegrityFailed = 0x00042007,
109  NvError_SdioCommandFailed = 0x00042008,
110  NvError_SdioCardAlwaysPresent = 0x00042009,
111  NvError_SdioAutoDetectCard = 0x0004200a,
112 
113  NvError_SdMmcRecoveryFailed = 0x00043001,
114  NvError_SdMmcTransferStateTimeout = 0x00043002,
115  NvError_SdMmcStandByStateTimeout = 0x00043003,
116  NvError_SdMmcIdleStateTimeout = 0x00043004,
117 
118  NvError_I2cReadFailed = 0x00045000,
119  NvError_I2cWriteFailed = 0x00045001,
120  NvError_I2cDeviceNotFound = 0x00045003,
121  NvError_I2cInternalError = 0x00045004,
122  NvError_I2cArbitrationFailed = 0x00045005,
123  NvError_I2CCommunicationError = 0x00045006,
124 
125  NvError_IdeHwError = 0x00046000,
126  NvError_IdeReadError = 0x00046001,
127  NvError_IdeWriteError = 0x00046002,
128  NvError_VsWriteError = 0x00046003,
129  NvError_VsReadError = 0x00046004,
130 
131  NvError_ChipSkuClockLimitViolation = 0x00180000,
132  NvError_ChipSkuNumCoreViolation = 0x00180001,
133  NvError_ChipSkuDmaFuseReadFail = 0x00180002,
134  NvError_ChipSkuNoTableEntry = 0x00180003,
135  NvError_ChipSkuInvalidDividerValue = 0x00180004,
136  NvError_MCMRevFuseReadFail = 0x00180005,
137 
138  // An alias for success
139  NvSuccess = NvError_Success,
140 
141  NvError_Force32 = 0x7FFFFFFF
142 } NvError;
143 
144 
153 #define NV_CHECK_ERROR(expr) \
154  do \
155  { \
156  e = (expr); \
157  if (e != NvSuccess) \
158  { \
159  QbPrintErrorCode(e); \
160  return e; \
161  } \
162  } while (0)
163 
171 #define NV_CHECK_ERROR_CLEANUP(expr) \
172  do \
173  { \
174  e = (expr); \
175  if (e != NvSuccess) \
176  { \
177  QbPrintErrorCode(e); \
178  goto fail; \
179  } \
180  } while (0)
181 
194 #define NV_CHECK_PRINT_ERR(expr, ...) \
195  do \
196  { \
197  e = (expr); \
198  if (e != NvSuccess) \
199  { \
200  pr_error(__VA_ARGS__); \
201  QbPrintErrorCode(e); \
202  return e; \
203  } \
204  } while (0)
205 
206 #define NV_CHECK_PRINT_ERR_CLEANUP(expr, ...)\
207  do \
208  { \
209  e = (expr); \
210  if (e != NvSuccess) \
211  { \
212  pr_error(__VA_ARGS__); \
213  QbPrintErrorCode(e); \
214  goto fail; \
215  } \
216  } while (0)
217 
218 #endif // QB_BL_BUILD
219 
220 #endif // INCLUDED_NVERROR_H