1 #define NVOC_GPU_ACCESS_H_PRIVATE_ACCESS_ALLOWED 2 #include "nvoc/runtime.h" 3 #include "nvoc/rtti.h" 4 #include "nvtypes.h" 5 #include "nvport/nvport.h" 6 #include "nvport/inline/util_valist.h" 7 #include "utils/nvassert.h" 8 #include "g_gpu_access_nvoc.h" 9 10 #ifdef DEBUG 11 char __nvoc_class_id_uniqueness_check_0x40549c = 1; 12 #endif 13 14 extern const struct NVOC_CLASS_DEF __nvoc_class_def_IoAperture; 15 16 extern const struct NVOC_CLASS_DEF __nvoc_class_def_Object; 17 18 extern const struct NVOC_CLASS_DEF __nvoc_class_def_RegisterAperture; 19 20 void __nvoc_init_IoAperture(IoAperture*); 21 void __nvoc_init_funcTable_IoAperture(IoAperture*); 22 NV_STATUS __nvoc_ctor_IoAperture(IoAperture*, struct IoAperture * arg_pParentAperture, OBJGPU * arg_pGpu, NvU32 arg_deviceIndex, NvU32 arg_deviceInstance, DEVICE_MAPPING * arg_pMapping, NvU32 arg_mappingStartAddr, NvU32 arg_offset, NvU32 arg_length); 23 void __nvoc_init_dataField_IoAperture(IoAperture*); 24 void __nvoc_dtor_IoAperture(IoAperture*); 25 extern const struct NVOC_EXPORT_INFO __nvoc_export_info_IoAperture; 26 27 static const struct NVOC_RTTI __nvoc_rtti_IoAperture_IoAperture = { 28 /*pClassDef=*/ &__nvoc_class_def_IoAperture, 29 /*dtor=*/ (NVOC_DYNAMIC_DTOR) &__nvoc_dtor_IoAperture, 30 /*offset=*/ 0, 31 }; 32 33 static const struct NVOC_RTTI __nvoc_rtti_IoAperture_Object = { 34 /*pClassDef=*/ &__nvoc_class_def_Object, 35 /*dtor=*/ &__nvoc_destructFromBase, 36 /*offset=*/ NV_OFFSETOF(IoAperture, __nvoc_base_Object), 37 }; 38 39 static const struct NVOC_RTTI __nvoc_rtti_IoAperture_RegisterAperture = { 40 /*pClassDef=*/ &__nvoc_class_def_RegisterAperture, 41 /*dtor=*/ &__nvoc_destructFromBase, 42 /*offset=*/ NV_OFFSETOF(IoAperture, __nvoc_base_RegisterAperture), 43 }; 44 45 static const struct NVOC_CASTINFO __nvoc_castinfo_IoAperture = { 46 /*numRelatives=*/ 3, 47 /*relatives=*/ { 48 &__nvoc_rtti_IoAperture_IoAperture, 49 &__nvoc_rtti_IoAperture_RegisterAperture, 50 &__nvoc_rtti_IoAperture_Object, 51 }, 52 }; 53 54 const struct NVOC_CLASS_DEF __nvoc_class_def_IoAperture = 55 { 56 /*classInfo=*/ { 57 /*size=*/ sizeof(IoAperture), 58 /*classId=*/ classId(IoAperture), 59 /*providerId=*/ &__nvoc_rtti_provider, 60 #if NV_PRINTF_STRINGS_ALLOWED 61 /*name=*/ "IoAperture", 62 #endif 63 }, 64 /*objCreatefn=*/ (NVOC_DYNAMIC_OBJ_CREATE) &__nvoc_objCreateDynamic_IoAperture, 65 /*pCastInfo=*/ &__nvoc_castinfo_IoAperture, 66 /*pExportInfo=*/ &__nvoc_export_info_IoAperture 67 }; 68 69 static NvU8 __nvoc_thunk_IoAperture_regaprtReadReg08(struct RegisterAperture *pAperture, NvU32 addr) { 70 return ioaprtReadReg08((struct IoAperture *)(((unsigned char *)pAperture) - __nvoc_rtti_IoAperture_RegisterAperture.offset), addr); 71 } 72 73 static NvU16 __nvoc_thunk_IoAperture_regaprtReadReg16(struct RegisterAperture *pAperture, NvU32 addr) { 74 return ioaprtReadReg16((struct IoAperture *)(((unsigned char *)pAperture) - __nvoc_rtti_IoAperture_RegisterAperture.offset), addr); 75 } 76 77 static NvU32 __nvoc_thunk_IoAperture_regaprtReadReg32(struct RegisterAperture *pAperture, NvU32 addr) { 78 return ioaprtReadReg32((struct IoAperture *)(((unsigned char *)pAperture) - __nvoc_rtti_IoAperture_RegisterAperture.offset), addr); 79 } 80 81 static void __nvoc_thunk_IoAperture_regaprtWriteReg08(struct RegisterAperture *pAperture, NvU32 addr, NvV8 value) { 82 ioaprtWriteReg08((struct IoAperture *)(((unsigned char *)pAperture) - __nvoc_rtti_IoAperture_RegisterAperture.offset), addr, value); 83 } 84 85 static void __nvoc_thunk_IoAperture_regaprtWriteReg16(struct RegisterAperture *pAperture, NvU32 addr, NvV16 value) { 86 ioaprtWriteReg16((struct IoAperture *)(((unsigned char *)pAperture) - __nvoc_rtti_IoAperture_RegisterAperture.offset), addr, value); 87 } 88 89 static void __nvoc_thunk_IoAperture_regaprtWriteReg32(struct RegisterAperture *pAperture, NvU32 addr, NvV32 value) { 90 ioaprtWriteReg32((struct IoAperture *)(((unsigned char *)pAperture) - __nvoc_rtti_IoAperture_RegisterAperture.offset), addr, value); 91 } 92 93 static void __nvoc_thunk_IoAperture_regaprtWriteReg32Uc(struct RegisterAperture *pAperture, NvU32 addr, NvV32 value) { 94 ioaprtWriteReg32Uc((struct IoAperture *)(((unsigned char *)pAperture) - __nvoc_rtti_IoAperture_RegisterAperture.offset), addr, value); 95 } 96 97 static NvBool __nvoc_thunk_IoAperture_regaprtIsRegValid(struct RegisterAperture *pAperture, NvU32 addr) { 98 return ioaprtIsRegValid((struct IoAperture *)(((unsigned char *)pAperture) - __nvoc_rtti_IoAperture_RegisterAperture.offset), addr); 99 } 100 101 const struct NVOC_EXPORT_INFO __nvoc_export_info_IoAperture = 102 { 103 /*numEntries=*/ 0, 104 /*pExportEntries=*/ 0 105 }; 106 107 void __nvoc_dtor_Object(Object*); 108 void __nvoc_dtor_RegisterAperture(RegisterAperture*); 109 void __nvoc_dtor_IoAperture(IoAperture *pThis) { 110 __nvoc_dtor_Object(&pThis->__nvoc_base_Object); 111 __nvoc_dtor_RegisterAperture(&pThis->__nvoc_base_RegisterAperture); 112 PORT_UNREFERENCED_VARIABLE(pThis); 113 } 114 115 void __nvoc_init_dataField_IoAperture(IoAperture *pThis) { 116 PORT_UNREFERENCED_VARIABLE(pThis); 117 } 118 119 NV_STATUS __nvoc_ctor_Object(Object* ); 120 NV_STATUS __nvoc_ctor_RegisterAperture(RegisterAperture* ); 121 NV_STATUS __nvoc_ctor_IoAperture(IoAperture *pThis, struct IoAperture * arg_pParentAperture, OBJGPU * arg_pGpu, NvU32 arg_deviceIndex, NvU32 arg_deviceInstance, DEVICE_MAPPING * arg_pMapping, NvU32 arg_mappingStartAddr, NvU32 arg_offset, NvU32 arg_length) { 122 NV_STATUS status = NV_OK; 123 status = __nvoc_ctor_Object(&pThis->__nvoc_base_Object); 124 if (status != NV_OK) goto __nvoc_ctor_IoAperture_fail_Object; 125 status = __nvoc_ctor_RegisterAperture(&pThis->__nvoc_base_RegisterAperture); 126 if (status != NV_OK) goto __nvoc_ctor_IoAperture_fail_RegisterAperture; 127 __nvoc_init_dataField_IoAperture(pThis); 128 129 status = __nvoc_ioaprtConstruct(pThis, arg_pParentAperture, arg_pGpu, arg_deviceIndex, arg_deviceInstance, arg_pMapping, arg_mappingStartAddr, arg_offset, arg_length); 130 if (status != NV_OK) goto __nvoc_ctor_IoAperture_fail__init; 131 goto __nvoc_ctor_IoAperture_exit; // Success 132 133 __nvoc_ctor_IoAperture_fail__init: 134 __nvoc_dtor_RegisterAperture(&pThis->__nvoc_base_RegisterAperture); 135 __nvoc_ctor_IoAperture_fail_RegisterAperture: 136 __nvoc_dtor_Object(&pThis->__nvoc_base_Object); 137 __nvoc_ctor_IoAperture_fail_Object: 138 __nvoc_ctor_IoAperture_exit: 139 140 return status; 141 } 142 143 static void __nvoc_init_funcTable_IoAperture_1(IoAperture *pThis) { 144 PORT_UNREFERENCED_VARIABLE(pThis); 145 146 pThis->__ioaprtReadReg08__ = &ioaprtReadReg08_IMPL; 147 148 pThis->__ioaprtReadReg16__ = &ioaprtReadReg16_IMPL; 149 150 pThis->__ioaprtReadReg32__ = &ioaprtReadReg32_IMPL; 151 152 pThis->__ioaprtWriteReg08__ = &ioaprtWriteReg08_IMPL; 153 154 pThis->__ioaprtWriteReg16__ = &ioaprtWriteReg16_IMPL; 155 156 pThis->__ioaprtWriteReg32__ = &ioaprtWriteReg32_IMPL; 157 158 pThis->__ioaprtWriteReg32Uc__ = &ioaprtWriteReg32Uc_IMPL; 159 160 pThis->__ioaprtIsRegValid__ = &ioaprtIsRegValid_IMPL; 161 162 pThis->__nvoc_base_RegisterAperture.__regaprtReadReg08__ = &__nvoc_thunk_IoAperture_regaprtReadReg08; 163 164 pThis->__nvoc_base_RegisterAperture.__regaprtReadReg16__ = &__nvoc_thunk_IoAperture_regaprtReadReg16; 165 166 pThis->__nvoc_base_RegisterAperture.__regaprtReadReg32__ = &__nvoc_thunk_IoAperture_regaprtReadReg32; 167 168 pThis->__nvoc_base_RegisterAperture.__regaprtWriteReg08__ = &__nvoc_thunk_IoAperture_regaprtWriteReg08; 169 170 pThis->__nvoc_base_RegisterAperture.__regaprtWriteReg16__ = &__nvoc_thunk_IoAperture_regaprtWriteReg16; 171 172 pThis->__nvoc_base_RegisterAperture.__regaprtWriteReg32__ = &__nvoc_thunk_IoAperture_regaprtWriteReg32; 173 174 pThis->__nvoc_base_RegisterAperture.__regaprtWriteReg32Uc__ = &__nvoc_thunk_IoAperture_regaprtWriteReg32Uc; 175 176 pThis->__nvoc_base_RegisterAperture.__regaprtIsRegValid__ = &__nvoc_thunk_IoAperture_regaprtIsRegValid; 177 } 178 179 void __nvoc_init_funcTable_IoAperture(IoAperture *pThis) { 180 __nvoc_init_funcTable_IoAperture_1(pThis); 181 } 182 183 void __nvoc_init_Object(Object*); 184 void __nvoc_init_RegisterAperture(RegisterAperture*); 185 void __nvoc_init_IoAperture(IoAperture *pThis) { 186 pThis->__nvoc_pbase_IoAperture = pThis; 187 pThis->__nvoc_pbase_Object = &pThis->__nvoc_base_Object; 188 pThis->__nvoc_pbase_RegisterAperture = &pThis->__nvoc_base_RegisterAperture; 189 __nvoc_init_Object(&pThis->__nvoc_base_Object); 190 __nvoc_init_RegisterAperture(&pThis->__nvoc_base_RegisterAperture); 191 __nvoc_init_funcTable_IoAperture(pThis); 192 } 193 194 NV_STATUS __nvoc_objCreate_IoAperture(IoAperture **ppThis, Dynamic *pParent, NvU32 createFlags, struct IoAperture * arg_pParentAperture, OBJGPU * arg_pGpu, NvU32 arg_deviceIndex, NvU32 arg_deviceInstance, DEVICE_MAPPING * arg_pMapping, NvU32 arg_mappingStartAddr, NvU32 arg_offset, NvU32 arg_length) { 195 NV_STATUS status; 196 Object *pParentObj; 197 IoAperture *pThis; 198 199 status = __nvoc_handleObjCreateMemAlloc(createFlags, sizeof(IoAperture), (void**)&pThis, (void**)ppThis); 200 if (status != NV_OK) 201 return status; 202 203 portMemSet(pThis, 0, sizeof(IoAperture)); 204 205 __nvoc_initRtti(staticCast(pThis, Dynamic), &__nvoc_class_def_IoAperture); 206 207 pThis->__nvoc_base_Object.createFlags = createFlags; 208 209 if (pParent != NULL && !(createFlags & NVOC_OBJ_CREATE_FLAGS_PARENT_HALSPEC_ONLY)) 210 { 211 pParentObj = dynamicCast(pParent, Object); 212 objAddChild(pParentObj, &pThis->__nvoc_base_Object); 213 } 214 else 215 { 216 pThis->__nvoc_base_Object.pParent = NULL; 217 } 218 219 __nvoc_init_IoAperture(pThis); 220 status = __nvoc_ctor_IoAperture(pThis, arg_pParentAperture, arg_pGpu, arg_deviceIndex, arg_deviceInstance, arg_pMapping, arg_mappingStartAddr, arg_offset, arg_length); 221 if (status != NV_OK) goto __nvoc_objCreate_IoAperture_cleanup; 222 223 *ppThis = pThis; 224 225 return NV_OK; 226 227 __nvoc_objCreate_IoAperture_cleanup: 228 // do not call destructors here since the constructor already called them 229 if (createFlags & NVOC_OBJ_CREATE_FLAGS_IN_PLACE_CONSTRUCT) 230 portMemSet(pThis, 0, sizeof(IoAperture)); 231 else 232 portMemFree(pThis); 233 234 // coverity[leaked_storage:FALSE] 235 return status; 236 } 237 238 NV_STATUS __nvoc_objCreateDynamic_IoAperture(IoAperture **ppThis, Dynamic *pParent, NvU32 createFlags, va_list args) { 239 NV_STATUS status; 240 struct IoAperture * arg_pParentAperture = va_arg(args, struct IoAperture *); 241 OBJGPU * arg_pGpu = va_arg(args, OBJGPU *); 242 NvU32 arg_deviceIndex = va_arg(args, NvU32); 243 NvU32 arg_deviceInstance = va_arg(args, NvU32); 244 DEVICE_MAPPING * arg_pMapping = va_arg(args, DEVICE_MAPPING *); 245 NvU32 arg_mappingStartAddr = va_arg(args, NvU32); 246 NvU32 arg_offset = va_arg(args, NvU32); 247 NvU32 arg_length = va_arg(args, NvU32); 248 249 status = __nvoc_objCreate_IoAperture(ppThis, pParent, createFlags, arg_pParentAperture, arg_pGpu, arg_deviceIndex, arg_deviceInstance, arg_pMapping, arg_mappingStartAddr, arg_offset, arg_length); 250 251 return status; 252 } 253 254 #ifdef DEBUG 255 char __nvoc_class_id_uniqueness_check_0x6d0f88 = 1; 256 #endif 257 258 extern const struct NVOC_CLASS_DEF __nvoc_class_def_SwBcAperture; 259 260 extern const struct NVOC_CLASS_DEF __nvoc_class_def_Object; 261 262 extern const struct NVOC_CLASS_DEF __nvoc_class_def_RegisterAperture; 263 264 void __nvoc_init_SwBcAperture(SwBcAperture*); 265 void __nvoc_init_funcTable_SwBcAperture(SwBcAperture*); 266 NV_STATUS __nvoc_ctor_SwBcAperture(SwBcAperture*, struct IoAperture * arg_pApertures, NvU32 arg_numApertures); 267 void __nvoc_init_dataField_SwBcAperture(SwBcAperture*); 268 void __nvoc_dtor_SwBcAperture(SwBcAperture*); 269 extern const struct NVOC_EXPORT_INFO __nvoc_export_info_SwBcAperture; 270 271 static const struct NVOC_RTTI __nvoc_rtti_SwBcAperture_SwBcAperture = { 272 /*pClassDef=*/ &__nvoc_class_def_SwBcAperture, 273 /*dtor=*/ (NVOC_DYNAMIC_DTOR) &__nvoc_dtor_SwBcAperture, 274 /*offset=*/ 0, 275 }; 276 277 static const struct NVOC_RTTI __nvoc_rtti_SwBcAperture_Object = { 278 /*pClassDef=*/ &__nvoc_class_def_Object, 279 /*dtor=*/ &__nvoc_destructFromBase, 280 /*offset=*/ NV_OFFSETOF(SwBcAperture, __nvoc_base_Object), 281 }; 282 283 static const struct NVOC_RTTI __nvoc_rtti_SwBcAperture_RegisterAperture = { 284 /*pClassDef=*/ &__nvoc_class_def_RegisterAperture, 285 /*dtor=*/ &__nvoc_destructFromBase, 286 /*offset=*/ NV_OFFSETOF(SwBcAperture, __nvoc_base_RegisterAperture), 287 }; 288 289 static const struct NVOC_CASTINFO __nvoc_castinfo_SwBcAperture = { 290 /*numRelatives=*/ 3, 291 /*relatives=*/ { 292 &__nvoc_rtti_SwBcAperture_SwBcAperture, 293 &__nvoc_rtti_SwBcAperture_RegisterAperture, 294 &__nvoc_rtti_SwBcAperture_Object, 295 }, 296 }; 297 298 const struct NVOC_CLASS_DEF __nvoc_class_def_SwBcAperture = 299 { 300 /*classInfo=*/ { 301 /*size=*/ sizeof(SwBcAperture), 302 /*classId=*/ classId(SwBcAperture), 303 /*providerId=*/ &__nvoc_rtti_provider, 304 #if NV_PRINTF_STRINGS_ALLOWED 305 /*name=*/ "SwBcAperture", 306 #endif 307 }, 308 /*objCreatefn=*/ (NVOC_DYNAMIC_OBJ_CREATE) &__nvoc_objCreateDynamic_SwBcAperture, 309 /*pCastInfo=*/ &__nvoc_castinfo_SwBcAperture, 310 /*pExportInfo=*/ &__nvoc_export_info_SwBcAperture 311 }; 312 313 static NvU8 __nvoc_thunk_SwBcAperture_regaprtReadReg08(struct RegisterAperture *pAperture, NvU32 addr) { 314 return swbcaprtReadReg08((struct SwBcAperture *)(((unsigned char *)pAperture) - __nvoc_rtti_SwBcAperture_RegisterAperture.offset), addr); 315 } 316 317 static NvU16 __nvoc_thunk_SwBcAperture_regaprtReadReg16(struct RegisterAperture *pAperture, NvU32 addr) { 318 return swbcaprtReadReg16((struct SwBcAperture *)(((unsigned char *)pAperture) - __nvoc_rtti_SwBcAperture_RegisterAperture.offset), addr); 319 } 320 321 static NvU32 __nvoc_thunk_SwBcAperture_regaprtReadReg32(struct RegisterAperture *pAperture, NvU32 addr) { 322 return swbcaprtReadReg32((struct SwBcAperture *)(((unsigned char *)pAperture) - __nvoc_rtti_SwBcAperture_RegisterAperture.offset), addr); 323 } 324 325 static void __nvoc_thunk_SwBcAperture_regaprtWriteReg08(struct RegisterAperture *pAperture, NvU32 addr, NvV8 value) { 326 swbcaprtWriteReg08((struct SwBcAperture *)(((unsigned char *)pAperture) - __nvoc_rtti_SwBcAperture_RegisterAperture.offset), addr, value); 327 } 328 329 static void __nvoc_thunk_SwBcAperture_regaprtWriteReg16(struct RegisterAperture *pAperture, NvU32 addr, NvV16 value) { 330 swbcaprtWriteReg16((struct SwBcAperture *)(((unsigned char *)pAperture) - __nvoc_rtti_SwBcAperture_RegisterAperture.offset), addr, value); 331 } 332 333 static void __nvoc_thunk_SwBcAperture_regaprtWriteReg32(struct RegisterAperture *pAperture, NvU32 addr, NvV32 value) { 334 swbcaprtWriteReg32((struct SwBcAperture *)(((unsigned char *)pAperture) - __nvoc_rtti_SwBcAperture_RegisterAperture.offset), addr, value); 335 } 336 337 static void __nvoc_thunk_SwBcAperture_regaprtWriteReg32Uc(struct RegisterAperture *pAperture, NvU32 addr, NvV32 value) { 338 swbcaprtWriteReg32Uc((struct SwBcAperture *)(((unsigned char *)pAperture) - __nvoc_rtti_SwBcAperture_RegisterAperture.offset), addr, value); 339 } 340 341 static NvBool __nvoc_thunk_SwBcAperture_regaprtIsRegValid(struct RegisterAperture *pAperture, NvU32 addr) { 342 return swbcaprtIsRegValid((struct SwBcAperture *)(((unsigned char *)pAperture) - __nvoc_rtti_SwBcAperture_RegisterAperture.offset), addr); 343 } 344 345 const struct NVOC_EXPORT_INFO __nvoc_export_info_SwBcAperture = 346 { 347 /*numEntries=*/ 0, 348 /*pExportEntries=*/ 0 349 }; 350 351 void __nvoc_dtor_Object(Object*); 352 void __nvoc_dtor_RegisterAperture(RegisterAperture*); 353 void __nvoc_dtor_SwBcAperture(SwBcAperture *pThis) { 354 __nvoc_dtor_Object(&pThis->__nvoc_base_Object); 355 __nvoc_dtor_RegisterAperture(&pThis->__nvoc_base_RegisterAperture); 356 PORT_UNREFERENCED_VARIABLE(pThis); 357 } 358 359 void __nvoc_init_dataField_SwBcAperture(SwBcAperture *pThis) { 360 PORT_UNREFERENCED_VARIABLE(pThis); 361 } 362 363 NV_STATUS __nvoc_ctor_Object(Object* ); 364 NV_STATUS __nvoc_ctor_RegisterAperture(RegisterAperture* ); 365 NV_STATUS __nvoc_ctor_SwBcAperture(SwBcAperture *pThis, struct IoAperture * arg_pApertures, NvU32 arg_numApertures) { 366 NV_STATUS status = NV_OK; 367 status = __nvoc_ctor_Object(&pThis->__nvoc_base_Object); 368 if (status != NV_OK) goto __nvoc_ctor_SwBcAperture_fail_Object; 369 status = __nvoc_ctor_RegisterAperture(&pThis->__nvoc_base_RegisterAperture); 370 if (status != NV_OK) goto __nvoc_ctor_SwBcAperture_fail_RegisterAperture; 371 __nvoc_init_dataField_SwBcAperture(pThis); 372 373 status = __nvoc_swbcaprtConstruct(pThis, arg_pApertures, arg_numApertures); 374 if (status != NV_OK) goto __nvoc_ctor_SwBcAperture_fail__init; 375 goto __nvoc_ctor_SwBcAperture_exit; // Success 376 377 __nvoc_ctor_SwBcAperture_fail__init: 378 __nvoc_dtor_RegisterAperture(&pThis->__nvoc_base_RegisterAperture); 379 __nvoc_ctor_SwBcAperture_fail_RegisterAperture: 380 __nvoc_dtor_Object(&pThis->__nvoc_base_Object); 381 __nvoc_ctor_SwBcAperture_fail_Object: 382 __nvoc_ctor_SwBcAperture_exit: 383 384 return status; 385 } 386 387 static void __nvoc_init_funcTable_SwBcAperture_1(SwBcAperture *pThis) { 388 PORT_UNREFERENCED_VARIABLE(pThis); 389 390 pThis->__swbcaprtReadReg08__ = &swbcaprtReadReg08_IMPL; 391 392 pThis->__swbcaprtReadReg16__ = &swbcaprtReadReg16_IMPL; 393 394 pThis->__swbcaprtReadReg32__ = &swbcaprtReadReg32_IMPL; 395 396 pThis->__swbcaprtWriteReg08__ = &swbcaprtWriteReg08_IMPL; 397 398 pThis->__swbcaprtWriteReg16__ = &swbcaprtWriteReg16_IMPL; 399 400 pThis->__swbcaprtWriteReg32__ = &swbcaprtWriteReg32_IMPL; 401 402 pThis->__swbcaprtWriteReg32Uc__ = &swbcaprtWriteReg32Uc_IMPL; 403 404 pThis->__swbcaprtIsRegValid__ = &swbcaprtIsRegValid_IMPL; 405 406 pThis->__nvoc_base_RegisterAperture.__regaprtReadReg08__ = &__nvoc_thunk_SwBcAperture_regaprtReadReg08; 407 408 pThis->__nvoc_base_RegisterAperture.__regaprtReadReg16__ = &__nvoc_thunk_SwBcAperture_regaprtReadReg16; 409 410 pThis->__nvoc_base_RegisterAperture.__regaprtReadReg32__ = &__nvoc_thunk_SwBcAperture_regaprtReadReg32; 411 412 pThis->__nvoc_base_RegisterAperture.__regaprtWriteReg08__ = &__nvoc_thunk_SwBcAperture_regaprtWriteReg08; 413 414 pThis->__nvoc_base_RegisterAperture.__regaprtWriteReg16__ = &__nvoc_thunk_SwBcAperture_regaprtWriteReg16; 415 416 pThis->__nvoc_base_RegisterAperture.__regaprtWriteReg32__ = &__nvoc_thunk_SwBcAperture_regaprtWriteReg32; 417 418 pThis->__nvoc_base_RegisterAperture.__regaprtWriteReg32Uc__ = &__nvoc_thunk_SwBcAperture_regaprtWriteReg32Uc; 419 420 pThis->__nvoc_base_RegisterAperture.__regaprtIsRegValid__ = &__nvoc_thunk_SwBcAperture_regaprtIsRegValid; 421 } 422 423 void __nvoc_init_funcTable_SwBcAperture(SwBcAperture *pThis) { 424 __nvoc_init_funcTable_SwBcAperture_1(pThis); 425 } 426 427 void __nvoc_init_Object(Object*); 428 void __nvoc_init_RegisterAperture(RegisterAperture*); 429 void __nvoc_init_SwBcAperture(SwBcAperture *pThis) { 430 pThis->__nvoc_pbase_SwBcAperture = pThis; 431 pThis->__nvoc_pbase_Object = &pThis->__nvoc_base_Object; 432 pThis->__nvoc_pbase_RegisterAperture = &pThis->__nvoc_base_RegisterAperture; 433 __nvoc_init_Object(&pThis->__nvoc_base_Object); 434 __nvoc_init_RegisterAperture(&pThis->__nvoc_base_RegisterAperture); 435 __nvoc_init_funcTable_SwBcAperture(pThis); 436 } 437 438 NV_STATUS __nvoc_objCreate_SwBcAperture(SwBcAperture **ppThis, Dynamic *pParent, NvU32 createFlags, struct IoAperture * arg_pApertures, NvU32 arg_numApertures) { 439 NV_STATUS status; 440 Object *pParentObj; 441 SwBcAperture *pThis; 442 443 status = __nvoc_handleObjCreateMemAlloc(createFlags, sizeof(SwBcAperture), (void**)&pThis, (void**)ppThis); 444 if (status != NV_OK) 445 return status; 446 447 portMemSet(pThis, 0, sizeof(SwBcAperture)); 448 449 __nvoc_initRtti(staticCast(pThis, Dynamic), &__nvoc_class_def_SwBcAperture); 450 451 pThis->__nvoc_base_Object.createFlags = createFlags; 452 453 if (pParent != NULL && !(createFlags & NVOC_OBJ_CREATE_FLAGS_PARENT_HALSPEC_ONLY)) 454 { 455 pParentObj = dynamicCast(pParent, Object); 456 objAddChild(pParentObj, &pThis->__nvoc_base_Object); 457 } 458 else 459 { 460 pThis->__nvoc_base_Object.pParent = NULL; 461 } 462 463 __nvoc_init_SwBcAperture(pThis); 464 status = __nvoc_ctor_SwBcAperture(pThis, arg_pApertures, arg_numApertures); 465 if (status != NV_OK) goto __nvoc_objCreate_SwBcAperture_cleanup; 466 467 *ppThis = pThis; 468 469 return NV_OK; 470 471 __nvoc_objCreate_SwBcAperture_cleanup: 472 // do not call destructors here since the constructor already called them 473 if (createFlags & NVOC_OBJ_CREATE_FLAGS_IN_PLACE_CONSTRUCT) 474 portMemSet(pThis, 0, sizeof(SwBcAperture)); 475 else 476 portMemFree(pThis); 477 478 // coverity[leaked_storage:FALSE] 479 return status; 480 } 481 482 NV_STATUS __nvoc_objCreateDynamic_SwBcAperture(SwBcAperture **ppThis, Dynamic *pParent, NvU32 createFlags, va_list args) { 483 NV_STATUS status; 484 struct IoAperture * arg_pApertures = va_arg(args, struct IoAperture *); 485 NvU32 arg_numApertures = va_arg(args, NvU32); 486 487 status = __nvoc_objCreate_SwBcAperture(ppThis, pParent, createFlags, arg_pApertures, arg_numApertures); 488 489 return status; 490 } 491 492