ReactOS  r76032
stubs.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Kernel
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: ntoskrnl/ke/powerpc/stubs.c
5  * PURPOSE: VDM Support Services
6  * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7  */
8 
9 /* INCLUDES ******************************************************************/
10 
11 #include <ntoskrnl.h>
12 #define NDEBUG
13 #include <debug.h>
14 #include <ppcmmu/mmu.h>
15 
17 NTAPI
19  IN PVOID ControlData)
20 {
21  return STATUS_UNSUCCESSFUL;
22 }
23 
25 NTAPI
28 {
29  return STATUS_UNSUCCESSFUL;
30 }
31 
32 VOID
33 NTAPI
35 {
36 }
37 
39 {
40  return _InterlockedDecrement(Addend);
41 }
42 
44 {
45  return _InterlockedIncrement(Addend);
46 }
47 
49 {
50  return _InterlockedCompareExchange(Target, Exch, Compare);
51 }
52 
53 /*
54  * @unimplemented
55  */
57 NTAPI
60  IN USHORT Selector)
61 {
63  return 0;
64 }
65 
66 /*
67  * @unimplemented
68  */
70 NTAPI
72  IN ULONG NumOfSelectors)
73 {
75  return 0;
76 }
77 
78 /*
79  * @unimplemented
80  */
82 NTAPI
84  IN ULONG NumOfSelectors)
85 {
87  return 0;
88 }
89 
90 VOID
91 NTAPI
93 {
94 }
95 
96 LONG
97 NTAPI
98 Kei386EoiHelper() { return 0; }
99 
100 NTSTATUS
101 NTAPI
103  IN PVOID Argument,
104  IN ULONG ArgumentLength,
105  OUT PVOID *Result,
107 {
108  return STATUS_UNSUCCESSFUL;
109 }
110 
111 VOID
112 NTAPI
114 
115 VOID
116 NTAPI
118 
119 VOID
120 NTAPI
122  IN PKTRAP_FRAME TrapFrame,
123  IN PKNORMAL_ROUTINE NormalRoutine,
124  IN PVOID NormalContext,
127 {
128 }
129 
130 PVOID
131 NTAPI
132 KeSwitchKernelStack(PVOID StackBase, PVOID StackLimit)
133 {
134  return NULL;
135 }
136 
137 VOID
138 NTAPI
139 KiSwapProcess(struct _KPROCESS *NewProcess, struct _KPROCESS *OldProcess)
140 {
141  PEPROCESS EProcess = (PEPROCESS)NewProcess;
142  MmuSetVsid(0, 8, EProcess ? (ULONG)EProcess->UniqueProcessId : 0);
143 }
144 
145 BOOLEAN
146 NTAPI
147 KiSwapContext(PKTHREAD CurrentThread, PKTHREAD NewThread)
148 {
149  KeGetPcr()->Prcb->NextThread = NewThread;
150  __asm__("mtdec %0" : : "r" (1));
151  return TRUE;
152 }
153 
154 VOID
155 NTAPI
157 {
158 }
159 
160 NTSYSAPI
161 NTSTATUS
162 NTAPI
165 {
166  return STATUS_UNSUCCESSFUL;
167 }
168 
169 NTSYSAPI
170 NTSTATUS
171 NTAPI
173 (IN PCONTEXT ThreadContext, IN BOOLEAN RaiseAlert)
174 {
175  return STATUS_UNSUCCESSFUL;
176 }
177 
178 NTSYSAPI
179 ULONG
180 NTAPI
181 NtGetTickCount() { return __rdtsc(); }
182 
183 NTSTATUS
184 NTAPI
186 (ULONG Selector1, LDT_ENTRY LdtEntry1, ULONG Selector2, LDT_ENTRY LdtEntry2)
187 {
188  return STATUS_UNSUCCESSFUL;
189 }
190 
191 NTSYSAPI
192 NTSTATUS
193 NTAPI
195 (IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT ThreadContext, IN BOOLEAN HandleException )
196 {
197  return STATUS_UNSUCCESSFUL;
198 }
199 
200 void _alldiv() { }
201 
202 void _alldvrm() { }
203 
204 void _allmul() { }
205 
206 void _alloca_probe() { }
207 
208 void _allrem() { }
209 
210 void _allshl() { }
211 
212 void _allshr() { }
213 
214 void _aulldiv() { }
215 
216 void _aulldvrm() { }
217 
218 void _aullrem() { }
219 
220 void _aullshr() { }
221 
DWORD *typedef PVOID
Definition: winlogon.h:52
IN CINT OUT PVOID IN ULONG OUT PULONG ResultLength
Definition: conport.c:47
NTSTATUS NTAPI NtVdmControl(IN ULONG ControlCode, IN PVOID ControlData)
Definition: stubs.c:432
NTSTATUS NTAPI KeUserModeCallback(IN ULONG RoutineIndex, IN PVOID Argument, IN ULONG ArgumentLength, OUT PVOID *Result, OUT PULONG ResultLength)
Definition: stubs.c:100
#define IN
Definition: typedefs.h:38
LONG NTAPI Kei386EoiHelper()
Definition: stubs.c:98
void _allmul()
Definition: stubs.c:204
#define TRUE
Definition: types.h:120
long __cdecl _InterlockedCompareExchange(_Interlocked_operand_ long volatile *_Destination, long _Exchange, long _Comparand)
void _aulldiv()
Definition: stubs.c:214
VOID NTAPI KiInitializeUserApc(IN PKEXCEPTION_FRAME ExceptionFrame, IN PKTRAP_FRAME TrapFrame, IN PKNORMAL_ROUTINE NormalRoutine, IN PVOID NormalContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: stubs.c:203
void _alldvrm()
Definition: stubs.c:202
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2327
struct _EPROCESS * PEPROCESS
Definition: nt_native.h:30
PPC_QUAL unsigned long long __rdtsc(void)
Definition: intrin_ppc.h:688
void _alldiv()
Definition: stubs.c:200
void _aullrem()
Definition: stubs.c:218
NTSTATUS NTAPI KeI386ReleaseGdtSelectors(OUT PULONG SelArray, IN ULONG NumOfSelectors)
Definition: stubs.c:71
void _aulldvrm()
Definition: stubs.c:216
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
void _aullshr()
Definition: stubs.c:220
#define UNIMPLEMENTED
Definition: stubs.c:20
__asm__("\t.globl GetPhys\n""GetPhys:\t\n""mflr 0\n\t""stwu 0,-16(1)\n\t""mfmsr 5\n\t""andi. 6,5,0xffef\n\t""mtmsr 6\n\t""isync\n\t""sync\n\t""lwz 3,0(3)\n\t""mtmsr 5\n\t""isync\n\t""sync\n\t""lwz 0,0(1)\n\t""addi 1,1,16\n\t""mtlr 0\n\t""blr")
#define NTSYSAPI
Definition: ntoskrnl.h:14
IN OUT PLONG Addend
Definition: CrNtStubs.h:22
HANDLE UniqueProcessId
Definition: pstypes.h:1199
#define KeGetPcr()
Definition: ke.h:25
VOID NTAPI KeI386VdmInitialize(VOID)
Definition: stubs.c:156
long __cdecl _InterlockedIncrement(_Interlocked_operand_ long volatile *_Addend)
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
long LONG
Definition: pedump.c:60
NTSTATUS NTAPI NtSetLdtEntries(ULONG Selector1, LDT_ENTRY LdtEntry1, ULONG Selector2, LDT_ENTRY LdtEntry2)
Definition: stubs.c:423
long __cdecl _InterlockedDecrement(_Interlocked_operand_ long volatile *_Addend)
smooth NULL
Definition: ftsmooth.c:557
_IRQL_requires_same_ typedef _In_ ULONG ControlCode
Definition: wmitypes.h:55
void _allshl()
Definition: stubs.c:210
void _alloca_probe()
Definition: stubs.c:206
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:660
void HandleException(COMException &e, HWND hwnd)
Exception Handler for COM exceptions.
LONG NTAPI Exi386InterlockedExchangeUlong(PLONG Target, LONG Exch, LONG Compare)
Definition: stubs.c:48
unsigned char BOOLEAN
void _allrem()
Definition: stubs.c:208
void _allshr()
Definition: stubs.c:212
VOID(NTAPI * PKNORMAL_ROUTINE)(IN PVOID NormalContext OPTIONAL, IN PVOID SystemArgument1 OPTIONAL, IN PVOID SystemArgument2 OPTIONAL)
Definition: ketypes.h:632
_Must_inspect_result_ typedef _In_ ULONG _In_ BOOLEAN Target
Definition: iotypes.h:1067
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
LONG NTAPI Exi386InterlockedDecrementLong(PLONG Addend)
Definition: stubs.c:38
VOID UINTN Length
Definition: acefiex.h:744
BOOLEAN NTAPI KiSwapContext(PKTHREAD CurrentThread, PKTHREAD NewThread)
Definition: stubs.c:147
NTSYSAPI NTSTATUS NTAPI NtContinue(IN PCONTEXT ThreadContext, IN BOOLEAN RaiseAlert)
Definition: stubs.c:173
NTSYSAPI ULONG NTAPI NtGetTickCount()
Definition: stubs.c:181
Status
Definition: gdiplustypes.h:24
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
Definition: ketypes.h:660
Definition: compat.h:428
LONG NTAPI Exi386InterlockedIncrementLong(PLONG Addend)
Definition: stubs.c:43
void _abnormal_termination()
Definition: stubs.c:222
VOID NTAPI KiDispatchInterrupt()
Definition: stubs.c:117
LONG NTSTATUS
Definition: DriverTester.h:11
unsigned short USHORT
Definition: pedump.c:61
NTSYSAPI NTSTATUS NTAPI NtRaiseException(IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT ThreadContext, IN BOOLEAN HandleException)
Definition: stubs.c:195
NTSTATUS NTAPI KeI386FlatToGdtSelector(IN ULONG Base, IN USHORT Length, IN USHORT Selector)
Definition: stubs.c:58
unsigned int * PULONG
Definition: retypes.h:1
PVOID NTAPI KeSwitchKernelStack(PVOID StackBase, PVOID StackLimit)
Definition: stubs.c:91
VOID NTAPI KiUnexpectedInterrupt(VOID)
Definition: stubs.c:34
#define OUT
Definition: typedefs.h:39
NTSTATUS NTAPI KeI386AllocateGdtSelectors(OUT PULONG SelArray, IN ULONG NumOfSelectors)
Definition: stubs.c:83
static void MmuSetVsid(int start, int end, int vsid)
Definition: mmu.h:207
unsigned int ULONG
Definition: retypes.h:1
VOID NTAPI KiCoprocessorError()
Definition: stubs.c:113
NTSTATUS NTAPI Ke386CallBios(IN ULONG Int, OUT PCONTEXT Context)
Definition: stubs.c:26
signed int * PLONG
Definition: retypes.h:5
VOID NTAPI KiSwapProcess(IN PKPROCESS NewProcess, IN PKPROCESS OldProcess)
Definition: stubs.c:277
IN HDEVINFO IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL
Definition: devinst.c:44
VOID NTAPI KeDumpStackFrames(PULONG Frame)
Definition: stubs.c:92
int Int
Definition: definitions.h:37
NTSYSAPI NTSTATUS NTAPI NtCallbackReturn(IN PVOID Result OPTIONAL, IN ULONG ResultLength, IN NTSTATUS Status)
Definition: stubs.c:413