1 #ifndef _G_CRASHCAT_QUEUE_NVOC_H_ 2 #define _G_CRASHCAT_QUEUE_NVOC_H_ 3 #include "nvoc/runtime.h" 4 5 #ifdef __cplusplus 6 extern "C" { 7 #endif 8 9 /* 10 * SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 11 * SPDX-License-Identifier: MIT 12 * 13 * Permission is hereby granted, free of charge, to any person obtaining a 14 * copy of this software and associated documentation files (the "Software"), 15 * to deal in the Software without restriction, including without limitation 16 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 17 * and/or sell copies of the Software, and to permit persons to whom the 18 * Software is furnished to do so, subject to the following conditions: 19 * 20 * The above copyright notice and this permission notice shall be included in 21 * all copies or substantial portions of the Software. 22 * 23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 26 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 29 * DEALINGS IN THE SOFTWARE. 30 */ 31 32 #include "g_crashcat_queue_nvoc.h" 33 34 #ifndef CRASHCAT_QUEUE_H 35 #define CRASHCAT_QUEUE_H 36 37 #include "nvoc/object.h" 38 #include "nv-crashcat.h" 39 #include "crashcat/crashcat_wayfinder.h" // for CrashCatWayfinderHal spec 40 41 struct CrashCatEngine; 42 43 #ifndef __NVOC_CLASS_CrashCatEngine_TYPEDEF__ 44 #define __NVOC_CLASS_CrashCatEngine_TYPEDEF__ 45 typedef struct CrashCatEngine CrashCatEngine; 46 #endif /* __NVOC_CLASS_CrashCatEngine_TYPEDEF__ */ 47 48 #ifndef __nvoc_class_id_CrashCatEngine 49 #define __nvoc_class_id_CrashCatEngine 0x654166 50 #endif /* __nvoc_class_id_CrashCatEngine */ 51 52 53 struct CrashCatReport; 54 55 #ifndef __NVOC_CLASS_CrashCatReport_TYPEDEF__ 56 #define __NVOC_CLASS_CrashCatReport_TYPEDEF__ 57 typedef struct CrashCatReport CrashCatReport; 58 #endif /* __NVOC_CLASS_CrashCatReport_TYPEDEF__ */ 59 60 #ifndef __nvoc_class_id_CrashCatReport 61 #define __nvoc_class_id_CrashCatReport 0xde4777 62 #endif /* __nvoc_class_id_CrashCatReport */ 63 64 65 66 typedef struct 67 { 68 NV_CRASHCAT_MEM_APERTURE aperture; 69 NvU32 size; 70 NvU64 offset; 71 72 NvU32 putRegOffset; 73 NvU32 getRegOffset; 74 } CrashCatQueueConfig; 75 76 #ifdef NVOC_CRASHCAT_QUEUE_H_PRIVATE_ACCESS_ALLOWED 77 #define PRIVATE_FIELD(x) x 78 #else 79 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x) 80 #endif 81 struct CrashCatQueue { 82 const struct NVOC_RTTI *__nvoc_rtti; 83 struct Object __nvoc_base_Object; 84 struct Object *__nvoc_pbase_Object; 85 struct CrashCatQueue *__nvoc_pbase_CrashCatQueue; 86 CrashCatQueueConfig PRIVATE_FIELD(config); 87 struct CrashCatEngine *PRIVATE_FIELD(pEngine); 88 void *PRIVATE_FIELD(pMapping); 89 }; 90 91 #ifndef __NVOC_CLASS_CrashCatQueue_TYPEDEF__ 92 #define __NVOC_CLASS_CrashCatQueue_TYPEDEF__ 93 typedef struct CrashCatQueue CrashCatQueue; 94 #endif /* __NVOC_CLASS_CrashCatQueue_TYPEDEF__ */ 95 96 #ifndef __nvoc_class_id_CrashCatQueue 97 #define __nvoc_class_id_CrashCatQueue 0xbaa900 98 #endif /* __nvoc_class_id_CrashCatQueue */ 99 100 extern const struct NVOC_CLASS_DEF __nvoc_class_def_CrashCatQueue; 101 102 #define __staticCast_CrashCatQueue(pThis) \ 103 ((pThis)->__nvoc_pbase_CrashCatQueue) 104 105 #ifdef __nvoc_crashcat_queue_h_disabled 106 #define __dynamicCast_CrashCatQueue(pThis) ((CrashCatQueue*)NULL) 107 #else //__nvoc_crashcat_queue_h_disabled 108 #define __dynamicCast_CrashCatQueue(pThis) \ 109 ((CrashCatQueue*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(CrashCatQueue))) 110 #endif //__nvoc_crashcat_queue_h_disabled 111 112 113 NV_STATUS __nvoc_objCreateDynamic_CrashCatQueue(CrashCatQueue**, Dynamic*, NvU32, va_list); 114 115 NV_STATUS __nvoc_objCreate_CrashCatQueue(CrashCatQueue**, Dynamic*, NvU32, CrashCatQueueConfig * arg_pQueueConfig); 116 #define __objCreate_CrashCatQueue(ppNewObj, pParent, createFlags, arg_pQueueConfig) \ 117 __nvoc_objCreate_CrashCatQueue((ppNewObj), staticCast((pParent), Dynamic), (createFlags), arg_pQueueConfig) 118 119 struct CrashCatReport *crashcatQueueConsumeNextReport_V1(struct CrashCatQueue *arg0); 120 121 122 #ifdef __nvoc_crashcat_queue_h_disabled 123 static inline struct CrashCatReport *crashcatQueueConsumeNextReport(struct CrashCatQueue *arg0) { 124 NV_ASSERT_FAILED_PRECOMP("CrashCatQueue was disabled!"); 125 return NULL; 126 } 127 #else //__nvoc_crashcat_queue_h_disabled 128 #define crashcatQueueConsumeNextReport(arg0) crashcatQueueConsumeNextReport_V1(arg0) 129 #endif //__nvoc_crashcat_queue_h_disabled 130 131 #define crashcatQueueConsumeNextReport_HAL(arg0) crashcatQueueConsumeNextReport(arg0) 132 133 NV_STATUS crashcatQueueConstruct_IMPL(struct CrashCatQueue *arg_, CrashCatQueueConfig *arg_pQueueConfig); 134 135 #define __nvoc_crashcatQueueConstruct(arg_, arg_pQueueConfig) crashcatQueueConstruct_IMPL(arg_, arg_pQueueConfig) 136 void crashcatQueueDestruct_IMPL(struct CrashCatQueue *arg0); 137 138 #define __nvoc_crashcatQueueDestruct(arg0) crashcatQueueDestruct_IMPL(arg0) 139 #undef PRIVATE_FIELD 140 141 142 #endif // CRASHCAT_QUEUE_H 143 144 #ifdef __cplusplus 145 } // extern "C" 146 #endif 147 #endif // _G_CRASHCAT_QUEUE_NVOC_H_ 148