1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: MIT
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21  * DEALINGS IN THE SOFTWARE.
22  */
23 
24 /***************************** HW State Routines ***************************\
25 *                                                                           *
26 *         ADA specific Descriptor List management functions              *
27 *                                                                           *
28 \***************************************************************************/
29 
30 #include "core/core.h"
31 #include "gpu/gpu.h"
32 #include "gpu/gpu_child_class_defs.h"
33 #include "gpu/eng_desc.h"
34 
35 //
36 // List of GPU children that present for the chip. List entries contain$
37 // {CLASS-ID, # of instances} pairs, e.g.: {CE, 2} is 2 instance of OBJCE. This$
38 // list controls only engine presence. Order is defined by$
39 // gpuGetChildrenOrder_HAL.$
40 //
41 // IMPORTANT: This function is to be deleted. Engine removal should instead be$
42 // handled by <eng>ConstructEngine returning NV_ERR_NOT_SUPPORTED. PLEASE DO NOT$
43 // FORK THIS LIST!$
44 //
45 // List entries contain {CLASS-ID, # of instances} pairs.
46 //
47 
48 static const GPUCHILDPRESENT gpuChildrenPresent_AD102[] =
49 {
50     GPU_CHILD_PRESENT(OBJTMR, 1),
51     GPU_CHILD_PRESENT(KernelMIGManager, 1),
52     GPU_CHILD_PRESENT(KernelGraphicsManager, 1),
53     GPU_CHILD_PRESENT(KernelRc, 1),
54     GPU_CHILD_PRESENT(Intr, 1),
55     GPU_CHILD_PRESENT(NvDebugDump, 1),
56     GPU_CHILD_PRESENT(OBJGPUMON, 1),
57     GPU_CHILD_PRESENT(OBJSWENG, 1),
58     GPU_CHILD_PRESENT(OBJUVM, 1),
59     GPU_CHILD_PRESENT(KernelBif, 1),
60     GPU_CHILD_PRESENT(KernelBus, 1),
61     GPU_CHILD_PRESENT(KernelCE, 5),
62     GPU_CHILD_PRESENT(KernelDisplay, 1),
63     GPU_CHILD_PRESENT(VirtMemAllocator, 1),
64     GPU_CHILD_PRESENT(KernelMemorySystem, 1),
65     GPU_CHILD_PRESENT(MemoryManager, 1),
66     GPU_CHILD_PRESENT(KernelFifo, 1),
67     GPU_CHILD_PRESENT(KernelGmmu, 1),
68     GPU_CHILD_PRESENT(KernelGraphics, 1),
69     GPU_CHILD_PRESENT(KernelHwpm, 1),
70     GPU_CHILD_PRESENT(KernelMc, 1),
71     GPU_CHILD_PRESENT(SwIntr, 1),
72     GPU_CHILD_PRESENT(KernelNvlink, 1),
73     GPU_CHILD_PRESENT(KernelPerf, 1),
74     GPU_CHILD_PRESENT(KernelPmu, 1),
75     GPU_CHILD_PRESENT(KernelSec2, 1),
76     GPU_CHILD_PRESENT(KernelGsp, 1),
77     GPU_CHILD_PRESENT(ConfidentialCompute, 1),
78 };
79 
80 const GPUCHILDPRESENT *
gpuGetChildrenPresent_AD102(OBJGPU * pGpu,NvU32 * pNumEntries)81 gpuGetChildrenPresent_AD102(OBJGPU *pGpu, NvU32 *pNumEntries)
82 {
83     *pNumEntries = NV_ARRAY_ELEMENTS(gpuChildrenPresent_AD102);
84     return gpuChildrenPresent_AD102;
85 }
86 
87