1 #ifndef _G_HAL_MGR_NVOC_H_
2 #define _G_HAL_MGR_NVOC_H_
3 #include "nvoc/runtime.h"
4 
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8 
9 /*
10  * SPDX-FileCopyrightText: Copyright (c) 2019 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_hal_mgr_nvoc.h"
33 
34 #ifndef _HAL_MGR_H_
35 #define _HAL_MGR_H_
36 
37 #include "core/core.h"
38 #include "core/hal.h"
39 
40 #define HALMGR_GET_HAL(p, halid)     halmgrGetHal((p), halid)
41 
42 typedef struct OBJHALMGR *POBJHALMGR;
43 
44 #ifndef __NVOC_CLASS_OBJHALMGR_TYPEDEF__
45 #define __NVOC_CLASS_OBJHALMGR_TYPEDEF__
46 typedef struct OBJHALMGR OBJHALMGR;
47 #endif /* __NVOC_CLASS_OBJHALMGR_TYPEDEF__ */
48 
49 #ifndef __nvoc_class_id_OBJHALMGR
50 #define __nvoc_class_id_OBJHALMGR 0xbf26de
51 #endif /* __nvoc_class_id_OBJHALMGR */
52 
53 
54 
55 
56 // Private field names are wrapped in PRIVATE_FIELD, which does nothing for
57 // the matching C source file, but causes diagnostics to be issued if another
58 // source file references the field.
59 #ifdef NVOC_HAL_MGR_H_PRIVATE_ACCESS_ALLOWED
60 #define PRIVATE_FIELD(x) x
61 #else
62 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x)
63 #endif
64 
65 struct OBJHALMGR {
66     const struct NVOC_RTTI *__nvoc_rtti;
67     struct Object __nvoc_base_Object;
68     struct Object *__nvoc_pbase_Object;
69     struct OBJHALMGR *__nvoc_pbase_OBJHALMGR;
70     struct OBJHAL *pHalList[69];
71 };
72 
73 #ifndef __NVOC_CLASS_OBJHALMGR_TYPEDEF__
74 #define __NVOC_CLASS_OBJHALMGR_TYPEDEF__
75 typedef struct OBJHALMGR OBJHALMGR;
76 #endif /* __NVOC_CLASS_OBJHALMGR_TYPEDEF__ */
77 
78 #ifndef __nvoc_class_id_OBJHALMGR
79 #define __nvoc_class_id_OBJHALMGR 0xbf26de
80 #endif /* __nvoc_class_id_OBJHALMGR */
81 
82 extern const struct NVOC_CLASS_DEF __nvoc_class_def_OBJHALMGR;
83 
84 #define __staticCast_OBJHALMGR(pThis) \
85     ((pThis)->__nvoc_pbase_OBJHALMGR)
86 
87 #ifdef __nvoc_hal_mgr_h_disabled
88 #define __dynamicCast_OBJHALMGR(pThis) ((OBJHALMGR*)NULL)
89 #else //__nvoc_hal_mgr_h_disabled
90 #define __dynamicCast_OBJHALMGR(pThis) \
91     ((OBJHALMGR*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(OBJHALMGR)))
92 #endif //__nvoc_hal_mgr_h_disabled
93 
94 
95 NV_STATUS __nvoc_objCreateDynamic_OBJHALMGR(OBJHALMGR**, Dynamic*, NvU32, va_list);
96 
97 NV_STATUS __nvoc_objCreate_OBJHALMGR(OBJHALMGR**, Dynamic*, NvU32);
98 #define __objCreate_OBJHALMGR(ppNewObj, pParent, createFlags) \
99     __nvoc_objCreate_OBJHALMGR((ppNewObj), staticCast((pParent), Dynamic), (createFlags))
100 
101 NV_STATUS halmgrConstruct_IMPL(struct OBJHALMGR *arg_);
102 
103 #define __nvoc_halmgrConstruct(arg_) halmgrConstruct_IMPL(arg_)
104 void halmgrDestruct_IMPL(struct OBJHALMGR *arg0);
105 
106 #define __nvoc_halmgrDestruct(arg0) halmgrDestruct_IMPL(arg0)
107 NV_STATUS halmgrCreateHal_IMPL(struct OBJHALMGR *arg0, NvU32 arg1);
108 
109 #ifdef __nvoc_hal_mgr_h_disabled
halmgrCreateHal(struct OBJHALMGR * arg0,NvU32 arg1)110 static inline NV_STATUS halmgrCreateHal(struct OBJHALMGR *arg0, NvU32 arg1) {
111     NV_ASSERT_FAILED_PRECOMP("OBJHALMGR was disabled!");
112     return NV_ERR_NOT_SUPPORTED;
113 }
114 #else //__nvoc_hal_mgr_h_disabled
115 #define halmgrCreateHal(arg0, arg1) halmgrCreateHal_IMPL(arg0, arg1)
116 #endif //__nvoc_hal_mgr_h_disabled
117 
118 NV_STATUS halmgrGetHalForGpu_IMPL(struct OBJHALMGR *arg0, NvU32 arg1, NvU32 arg2, NvU32 *arg3);
119 
120 #ifdef __nvoc_hal_mgr_h_disabled
halmgrGetHalForGpu(struct OBJHALMGR * arg0,NvU32 arg1,NvU32 arg2,NvU32 * arg3)121 static inline NV_STATUS halmgrGetHalForGpu(struct OBJHALMGR *arg0, NvU32 arg1, NvU32 arg2, NvU32 *arg3) {
122     NV_ASSERT_FAILED_PRECOMP("OBJHALMGR was disabled!");
123     return NV_ERR_NOT_SUPPORTED;
124 }
125 #else //__nvoc_hal_mgr_h_disabled
126 #define halmgrGetHalForGpu(arg0, arg1, arg2, arg3) halmgrGetHalForGpu_IMPL(arg0, arg1, arg2, arg3)
127 #endif //__nvoc_hal_mgr_h_disabled
128 
129 struct OBJHAL *halmgrGetHal_IMPL(struct OBJHALMGR *arg0, NvU32 arg1);
130 
131 #ifdef __nvoc_hal_mgr_h_disabled
halmgrGetHal(struct OBJHALMGR * arg0,NvU32 arg1)132 static inline struct OBJHAL *halmgrGetHal(struct OBJHALMGR *arg0, NvU32 arg1) {
133     NV_ASSERT_FAILED_PRECOMP("OBJHALMGR was disabled!");
134     return NULL;
135 }
136 #else //__nvoc_hal_mgr_h_disabled
137 #define halmgrGetHal(arg0, arg1) halmgrGetHal_IMPL(arg0, arg1)
138 #endif //__nvoc_hal_mgr_h_disabled
139 
140 #undef PRIVATE_FIELD
141 
142 
143 #endif
144 
145 #ifdef __cplusplus
146 } // extern "C"
147 #endif
148 
149 #endif // _G_HAL_MGR_NVOC_H_
150