NVIDIA DRIVE OS Linux API Reference

5.1.3.0 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 
36 typedef enum
37 {
38 
39  NvError_Success = 0x00000000,
40  NvError_NotImplemented = 0x00000001,
41  NvError_NotSupported = 0x00000002,
42  NvError_NotInitialized = 0x00000003,
43  NvError_BadParameter = 0x00000004,
44  NvError_Timeout = 0x00000005,
47  NvError_InvalidState = 0x00000008,
48  NvError_InvalidAddress = 0x00000009,
49  NvError_InvalidSize = 0x0000000A,
50  NvError_BadValue = 0x0000000B,
52  NvError_Busy = 0x0000000D,
54  NvError_ResourceError = 0x0000000F,
55  NvError_CountMismatch = 0x00000010,
56  NvError_OverFlow = 0x00000011,
57  NvError_ImageCorrupted = 0x00000012,
58  NvError_BadImage = 0x00000013,
68  NvError_HashMismatch = 0x0000001d,
69  NvError_ImageMismatch = 0x0000001e,
71  NvError_BCHNotCached = 0x00000020,
74  NvError_ECIDMisMatch = 0x00000023,
78  NvError_FileReadFailed = 0x00030001,
79  NvError_EndOfFile = 0x00030002,
82  NvError_EndOfDirList = 0x00030005,
86  NvError_IoctlFailed = 0x0003000f,
87  NvError_AccessDenied = 0x00030010,
88  NvError_DeviceNotFound = 0x00030011,
90  NvError_FileNotFound = 0x00030013,
93  NvError_Deadlock = 0x00030016,
99 
111 
122 
123  NvError_I2cReadFailed = 0x00045000,
129 
130  NvError_IdeHwError = 0x00046000,
131  NvError_IdeReadError = 0x00046001,
132  NvError_IdeWriteError = 0x00046002,
133  NvError_VsWriteError = 0x00046003,
134  NvError_VsReadError = 0x00046004,
135 
139 
145 
152 
153  // An alias for success
155 
156  NvError_Force32 = 0x7FFFFFFF
157 } NvError;
158 
159 
160 #ifdef QB_BL_BUILD
161 
169 #define NV_CHECK_ERROR(expr) \
170  do \
171  { \
172  e = (expr); \
173  if (e != NvSuccess) \
174  { \
175  QbPrintErrorCode(e); \
176  return e; \
177  } \
178  } while (0)
179 
187 #define NV_CHECK_ERROR_CLEANUP(expr) \
188  do \
189  { \
190  e = (expr); \
191  if (e != NvSuccess) \
192  { \
193  QbPrintErrorCode(e); \
194  goto fail; \
195  } \
196  } while (0)
197 
208 #define NV_CHECK_PRINT_ERR(expr, ...) \
209  do \
210  { \
211  e = (expr); \
212  if (e != NvSuccess) \
213  { \
214  pr_error(__VA_ARGS__); \
215  QbPrintErrorCode(e); \
216  return e; \
217  } \
218  } while (0)
219 
220 #define NV_CHECK_PRINT_ERR_CLEANUP(expr, ...)\
221  do \
222  { \
223  e = (expr); \
224  if (e != NvSuccess) \
225  { \
226  pr_error(__VA_ARGS__); \
227  QbPrintErrorCode(e); \
228  goto fail; \
229  } \
230  } while (0)
231 
232 #endif // QB_BL_BUILD
233 
236 #endif // INCLUDED_NVERROR_H
NvError
The NvError enumeration contains ALL return / error codes.
Definition: nverror.h:36