1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 1993-2020 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 #ifndef OS_STUB_H
25 #define OS_STUB_H
26 
27 /**************** Resource Manager Defines and Structures ******************\
28 *                                                                           *
29 *       Extern definitions of all public stub function interfaces           *
30 *                                                                           *
31 \***************************************************************************/
32 
33 #include "os/os.h"
34 
35 //
36 // Each of these stub functions returns a different type. Used to
37 // stub out function pointers in OBJOS.
38 //
39 OSQADbgRegistryInit             stubOsQADbgRegistryInit;
40 OSnv_rdcr4                      stubOsnv_rdcr4;
41 OSnv_rdxcr0                     stubOsnv_rdxcr0;
42 OSnv_cpuid                      stubOsnv_cpuid;
43 OSnv_rdmsr                      stubOsnv_rdmsr;
44 OSnv_wrmsr                      stubOsnv_wrmsr;
45 OSRobustChannelsDefaultState    stubOsRobustChannelsDefaultState;
46 OSSpinLoop                      stubOsSpinLoop;
47 OSDbgBreakpointEnabled          stubOsDbgBreakpointEnabled;
48 OSQueueWorkItem                 stubOsQueueWorkItem;
49 OSQueueWorkItemWithFlags        stubOsQueueWorkItemWithFlags;
50 OSQueueSystemWorkItem           stubOsQueueSystemWorkItem;
51 OSSimEscapeWrite                stubOsSimEscapeWrite;
52 OSSimEscapeWriteBuffer          stubOsSimEscapeWriteBuffer;
53 OSSimEscapeRead                 stubOsSimEscapeRead;
54 OSSimEscapeReadBuffer           stubOsSimEscapeReadBuffer;
55 OSSetSurfaceName                stubOsSetSurfaceName;
56 OSCallACPI_NVHG_GPUSTA          stubOsCallWMI_NVHG_GPUSTA;
57 OSCallACPI_NVHG_MXDS            stubOsCallWMI_NVHG_MXDS;
58 OSCallACPI_NVHG_MXMX            stubOsCallWMI_NVHG_MXMX;
59 OSCallACPI_NVHG_DOS             stubOsCallWMI_NVHG_DOS;
60 OSCallACPI_NVHG_DCS             stubOsCallWMI_NVHG_DCS;
61 OSCheckCallback                 stubOsCheckCallback;
62 OSRCCallback                    stubOsRCCallback;
63 
64 OSSetupVBlank                   stubOsSetupVBlank;
65 OSObjectEventNotification       stubOsObjectEventNotification;
66 OSPageArrayGetPhysAddr          stubOsPageArrayGetPhysAddr;
67 OSInternalReserveFreeCallback   stubOsInternalReserveFreeCallback;
68 OSInternalReserveAllocCallback  stubOsInternalReserveAllocCallback;
69 OSGetUefiVariable               stubOsGetUefiVariable;
70 
71 #endif // OS_STUB_H
72