- Remove KD APIs from stub HAL, they've been in kdcom for a while (merge from kd...
[reactos.git] / reactos / ntoskrnl / include / internal / ke.h
1 #ifndef __NTOSKRNL_INCLUDE_INTERNAL_KE_H
2 #define __NTOSKRNL_INCLUDE_INTERNAL_KE_H
3
4 /* INCLUDES *****************************************************************/
5
6 #include "arch/ke.h"
7
8 /* INTERNAL KERNEL TYPES ****************************************************/
9
10 typedef struct _WOW64_PROCESS
11 {
12 PVOID Wow64;
13 } WOW64_PROCESS, *PWOW64_PROCESS;
14
15 typedef struct _KPROFILE_SOURCE_OBJECT
16 {
17 KPROFILE_SOURCE Source;
18 LIST_ENTRY ListEntry;
19 } KPROFILE_SOURCE_OBJECT, *PKPROFILE_SOURCE_OBJECT;
20
21 typedef enum _CONNECT_TYPE
22 {
23 NoConnect,
24 NormalConnect,
25 ChainConnect,
26 UnknownConnect
27 } CONNECT_TYPE, *PCONNECT_TYPE;
28
29 typedef struct _DISPATCH_INFO
30 {
31 CONNECT_TYPE Type;
32 PKINTERRUPT Interrupt;
33 PKINTERRUPT_ROUTINE NoDispatch;
34 PKINTERRUPT_ROUTINE InterruptDispatch;
35 PKINTERRUPT_ROUTINE FloatingDispatch;
36 PKINTERRUPT_ROUTINE ChainedDispatch;
37 PKINTERRUPT_ROUTINE *FlatDispatch;
38 } DISPATCH_INFO, *PDISPATCH_INFO;
39
40 typedef struct _KI_SAMPLE_MAP
41 {
42 LARGE_INTEGER PerfStart;
43 LARGE_INTEGER PerfEnd;
44 LONGLONG PerfDelta;
45 LARGE_INTEGER PerfFreq;
46 LONGLONG TSCStart;
47 LONGLONG TSCEnd;
48 LONGLONG TSCDelta;
49 ULONG MHz;
50 } KI_SAMPLE_MAP, *PKI_SAMPLE_MAP;
51
52 typedef struct _KTIMER_TABLE_ENTRY
53 {
54 LIST_ENTRY Entry;
55 ULARGE_INTEGER Time;
56 } KTIMER_TABLE_ENTRY, *PKTIMER_TABLE_ENTRY;
57
58 #define MAX_TIMER_DPCS 16
59
60 typedef struct _DPC_QUEUE_ENTRY
61 {
62 PKDPC Dpc;
63 PKDEFERRED_ROUTINE Routine;
64 PVOID Context;
65 } DPC_QUEUE_ENTRY, *PDPC_QUEUE_ENTRY;
66
67 typedef PCHAR
68 (NTAPI *PKE_BUGCHECK_UNICODE_TO_ANSI)(
69 IN PUNICODE_STRING Unicode,
70 IN PCHAR Ansi,
71 IN ULONG Length
72 );
73
74 extern ULONG_PTR MmFreeLdrFirstKrnlPhysAddr;
75 extern ULONG_PTR MmFreeLdrLastKrnlPhysAddr;
76 extern ULONG_PTR MmFreeLdrLastKernelAddress;
77
78 extern PVOID KeUserApcDispatcher;
79 extern PVOID KeUserCallbackDispatcher;
80 extern PVOID KeUserExceptionDispatcher;
81 extern PVOID KeRaiseUserExceptionDispatcher;
82 extern LARGE_INTEGER KeBootTime;
83 extern ULONGLONG KeBootTimeBias;
84 extern BOOLEAN ExCmosClockIsSane;
85 extern ULONG KeI386NpxPresent;
86 extern ULONG KeI386XMMIPresent;
87 extern ULONG KeI386FxsrPresent;
88 extern ULONG KiMXCsrMask;
89 extern ULONG KeI386CpuType;
90 extern ULONG KeI386CpuStep;
91 extern ULONG KeProcessorArchitecture;
92 extern ULONG KeProcessorLevel;
93 extern ULONG KeProcessorRevision;
94 extern ULONG KeFeatureBits;
95 extern ULONG Ke386GlobalPagesEnabled;
96 extern BOOLEAN KiI386PentiumLockErrataPresent;
97 extern KNODE KiNode0;
98 extern PKNODE KeNodeBlock[1];
99 extern UCHAR KeNumberNodes;
100 extern UCHAR KeProcessNodeSeed;
101 extern ETHREAD KiInitialThread;
102 extern EPROCESS KiInitialProcess;
103 extern ULONG KiInterruptTemplate[KINTERRUPT_DISPATCH_CODES];
104 extern PULONG KiInterruptTemplateObject;
105 extern PULONG KiInterruptTemplateDispatch;
106 extern PULONG KiInterruptTemplate2ndDispatch;
107 extern ULONG KiUnexpectedEntrySize;
108 extern PVOID Ki386IopmSaveArea;
109 extern ULONG KeI386EFlagsAndMaskV86;
110 extern ULONG KeI386EFlagsOrMaskV86;
111 extern BOOLEAN KeI386VirtualIntExtensions;
112 extern KIDTENTRY KiIdt[];
113 extern KGDTENTRY KiBootGdt[];
114 extern KDESCRIPTOR KiGdtDescriptor;
115 extern KDESCRIPTOR KiIdtDescriptor;
116 extern KTSS KiBootTss;
117 extern UCHAR P0BootStack[];
118 extern UCHAR KiDoubleFaultStack[];
119 extern FAST_MUTEX KernelAddressSpaceLock;
120 extern ULONG KiMaximumDpcQueueDepth;
121 extern ULONG KiMinimumDpcRate;
122 extern ULONG KiAdjustDpcThreshold;
123 extern ULONG KiIdealDpcRate;
124 extern BOOLEAN KeThreadDpcEnable;
125 extern LARGE_INTEGER KiTimeIncrementReciprocal;
126 extern UCHAR KiTimeIncrementShiftCount;
127 extern ULONG KiTimeLimitIsrMicroseconds;
128 extern ULONG KiServiceLimit;
129 extern LIST_ENTRY KeBugcheckCallbackListHead, KeBugcheckReasonCallbackListHead;
130 extern KSPIN_LOCK BugCheckCallbackLock;
131 extern KDPC KiTimerExpireDpc;
132 extern KTIMER_TABLE_ENTRY KiTimerTableListHead[TIMER_TABLE_SIZE];
133 extern FAST_MUTEX KiGenericCallDpcMutex;
134 extern LIST_ENTRY KiProfileListHead, KiProfileSourceListHead;
135 extern KSPIN_LOCK KiProfileLock;
136 extern LIST_ENTRY KiProcessListHead;
137 extern LIST_ENTRY KiProcessInSwapListHead, KiProcessOutSwapListHead;
138 extern LIST_ENTRY KiStackInSwapListHead;
139 extern KEVENT KiSwapEvent;
140 extern PKPRCB KiProcessorBlock[];
141 extern ULONG KiMask32Array[MAXIMUM_PRIORITY];
142 extern ULONG KiIdleSummary;
143 extern VOID __cdecl KiTrap8(VOID);
144 extern VOID __cdecl KiTrap2(VOID);
145 extern VOID __cdecl KiFastCallEntry(VOID);
146 extern PVOID KeUserApcDispatcher;
147 extern PVOID KeUserCallbackDispatcher;
148 extern PVOID KeUserExceptionDispatcher;
149 extern PVOID KeRaiseUserExceptionDispatcher;
150 extern UCHAR KiDebugRegisterTrapOffsets[9];
151 extern UCHAR KiDebugRegisterContextOffsets[9];
152 extern ULONG KeTimeIncrement;
153 extern ULONG_PTR KiBugCheckData[5];
154 extern ULONG KiFreezeFlag;
155
156 /* MACROS *************************************************************************/
157
158 #define AFFINITY_MASK(Id) KiMask32Array[Id]
159 #define PRIORITY_MASK(Id) KiMask32Array[Id]
160
161 /* The following macro initializes a dispatcher object's header */
162 #define KeInitializeDispatcherHeader(Header, t, s, State) \
163 { \
164 (Header)->Type = t; \
165 (Header)->Absolute = 0; \
166 (Header)->Inserted = 0; \
167 (Header)->Size = s; \
168 (Header)->SignalState = State; \
169 InitializeListHead(&((Header)->WaitListHead)); \
170 }
171
172 #define KEBUGCHECKWITHTF(a,b,c,d,e,f) \
173 DbgPrint("KeBugCheckWithTf at %s:%i\n",__FILE__,__LINE__), \
174 KeBugCheckWithTf(a,b,c,d,e,f)
175
176 /* Tells us if the Timer or Event is a Syncronization or Notification Object */
177 #define TIMER_OR_EVENT_TYPE 0x7L
178
179 /* One of the Reserved Wait Blocks, this one is for the Thread's Timer */
180 #define TIMER_WAIT_BLOCK 0x3L
181
182 /* IOPM Definitions */
183 #define IO_ACCESS_MAP_NONE 0
184 #define IOPM_OFFSET FIELD_OFFSET(KTSS, IoMaps[0].IoMap)
185 #define KiComputeIopmOffset(MapNumber) \
186 (MapNumber == IO_ACCESS_MAP_NONE) ? \
187 (USHORT)(sizeof(KTSS)) : \
188 (USHORT)(FIELD_OFFSET(KTSS, IoMaps[MapNumber-1].IoMap))
189
190 #define SIZE_OF_FX_REGISTERS 32
191
192 /* INTERNAL KERNEL FUNCTIONS ************************************************/
193
194 /* Finds a new thread to run */
195 NTSTATUS
196 FASTCALL
197 KiSwapThread(
198 IN PKTHREAD Thread,
199 IN PKPRCB Prcb
200 );
201
202 VOID
203 NTAPI
204 KeReadyThread(
205 IN PKTHREAD Thread
206 );
207
208 BOOLEAN
209 NTAPI
210 KeSetDisableBoostThread(
211 IN OUT PKTHREAD Thread,
212 IN BOOLEAN Disable
213 );
214
215 VOID
216 NTAPI
217 KeBalanceSetManager(IN PVOID Context);
218
219 VOID
220 NTAPI
221 KiReadyThread(IN PKTHREAD Thread);
222
223 ULONG
224 NTAPI
225 KeSuspendThread(PKTHREAD Thread);
226
227 BOOLEAN
228 NTAPI
229 KeReadStateThread(IN PKTHREAD Thread);
230
231 BOOLEAN
232 FASTCALL
233 KiSwapContext(
234 IN PKTHREAD CurrentThread,
235 IN PKTHREAD NewThread
236 );
237
238 VOID
239 NTAPI
240 KiAdjustQuantumThread(IN PKTHREAD Thread);
241
242 VOID
243 FASTCALL
244 KiExitDispatcher(KIRQL OldIrql);
245
246 VOID
247 NTAPI
248 KiDeferredReadyThread(IN PKTHREAD Thread);
249
250 KAFFINITY
251 FASTCALL
252 KiSetAffinityThread(
253 IN PKTHREAD Thread,
254 IN KAFFINITY Affinity
255 );
256
257 PKTHREAD
258 FASTCALL
259 KiSelectNextThread(
260 IN PKPRCB Prcb
261 );
262
263 VOID
264 NTAPI
265 CPUID(
266 OUT ULONG CpuInfo[4],
267 IN ULONG InfoType
268 );
269
270 BOOLEAN
271 FASTCALL
272 KiInsertTimerTable(
273 IN PKTIMER Timer,
274 IN ULONG Hand
275 );
276
277 BOOLEAN
278 FASTCALL
279 KiInsertTreeTimer(
280 IN PKTIMER Timer,
281 IN LARGE_INTEGER Interval
282 );
283
284 VOID
285 FASTCALL
286 KiCompleteTimer(
287 IN PKTIMER Timer,
288 IN PKSPIN_LOCK_QUEUE LockQueue
289 );
290
291 /* gmutex.c ********************************************************************/
292
293 VOID
294 FASTCALL
295 KiAcquireGuardedMutexContented(PKGUARDED_MUTEX GuardedMutex);
296
297 /* gate.c **********************************************************************/
298
299 VOID
300 FASTCALL
301 KeInitializeGate(PKGATE Gate);
302
303 VOID
304 FASTCALL
305 KeSignalGateBoostPriority(PKGATE Gate);
306
307 VOID
308 FASTCALL
309 KeWaitForGate(
310 PKGATE Gate,
311 KWAIT_REASON WaitReason,
312 KPROCESSOR_MODE WaitMode
313 );
314
315 /* ipi.c ********************************************************************/
316
317 VOID
318 NTAPI
319 KiIpiSendRequest(
320 KAFFINITY TargetSet,
321 ULONG IpiRequest
322 );
323
324 /* next file ***************************************************************/
325
326 UCHAR
327 NTAPI
328 KeFindNextRightSetAffinity(
329 IN UCHAR Number,
330 IN ULONG Set
331 );
332
333 VOID
334 NTAPI
335 DbgBreakPointNoBugCheck(VOID);
336
337 VOID
338 NTAPI
339 KeInitializeProfile(
340 struct _KPROFILE* Profile,
341 struct _KPROCESS* Process,
342 PVOID ImageBase,
343 ULONG ImageSize,
344 ULONG BucketSize,
345 KPROFILE_SOURCE ProfileSource,
346 KAFFINITY Affinity
347 );
348
349 VOID
350 NTAPI
351 KeStartProfile(
352 struct _KPROFILE* Profile,
353 PVOID Buffer
354 );
355
356 BOOLEAN
357 NTAPI
358 KeStopProfile(struct _KPROFILE* Profile);
359
360 ULONG
361 NTAPI
362 KeQueryIntervalProfile(KPROFILE_SOURCE ProfileSource);
363
364 VOID
365 NTAPI
366 KeSetIntervalProfile(
367 KPROFILE_SOURCE ProfileSource,
368 ULONG Interval
369 );
370
371 VOID
372 NTAPI
373 KeProfileInterrupt(
374 PKTRAP_FRAME TrapFrame
375 );
376
377 VOID
378 NTAPI
379 KeProfileInterruptWithSource(
380 IN PKTRAP_FRAME TrapFrame,
381 IN KPROFILE_SOURCE Source
382 );
383
384 VOID
385 NTAPI
386 KeUpdateRunTime(
387 PKTRAP_FRAME TrapFrame,
388 KIRQL Irql
389 );
390
391 VOID
392 NTAPI
393 KiExpireTimers(
394 PKDPC Dpc,
395 PVOID DeferredContext,
396 PVOID SystemArgument1,
397 PVOID SystemArgument2
398 );
399
400 VOID
401 NTAPI
402 KeInitializeThread(
403 IN PKPROCESS Process,
404 IN OUT PKTHREAD Thread,
405 IN PKSYSTEM_ROUTINE SystemRoutine,
406 IN PKSTART_ROUTINE StartRoutine,
407 IN PVOID StartContext,
408 IN PCONTEXT Context,
409 IN PVOID Teb,
410 IN PVOID KernelStack
411 );
412
413 VOID
414 NTAPI
415 KeUninitThread(
416 IN PKTHREAD Thread
417 );
418
419 NTSTATUS
420 NTAPI
421 KeInitThread(
422 IN OUT PKTHREAD Thread,
423 IN PVOID KernelStack,
424 IN PKSYSTEM_ROUTINE SystemRoutine,
425 IN PKSTART_ROUTINE StartRoutine,
426 IN PVOID StartContext,
427 IN PCONTEXT Context,
428 IN PVOID Teb,
429 IN PKPROCESS Process
430 );
431
432 VOID
433 NTAPI
434 KeStartThread(
435 IN OUT PKTHREAD Thread
436 );
437
438 BOOLEAN
439 NTAPI
440 KeAlertThread(
441 IN PKTHREAD Thread,
442 IN KPROCESSOR_MODE AlertMode
443 );
444
445 ULONG
446 NTAPI
447 KeAlertResumeThread(
448 IN PKTHREAD Thread
449 );
450
451 ULONG
452 NTAPI
453 KeResumeThread(
454 IN PKTHREAD Thread
455 );
456
457 PVOID
458 NTAPI
459 KeSwitchKernelStack(
460 IN PVOID StackBase,
461 IN PVOID StackLimit
462 );
463
464 VOID
465 NTAPI
466 KeRundownThread(VOID);
467
468 NTSTATUS
469 NTAPI
470 KeReleaseThread(PKTHREAD Thread);
471
472 VOID
473 NTAPI
474 KiSuspendRundown(
475 IN PKAPC Apc
476 );
477
478 VOID
479 NTAPI
480 KiSuspendNop(
481 IN PKAPC Apc,
482 IN PKNORMAL_ROUTINE *NormalRoutine,
483 IN PVOID *NormalContext,
484 IN PVOID *SystemArgument1,
485 IN PVOID *SystemArgument2
486 );
487
488 VOID
489 NTAPI
490 KiSuspendThread(
491 IN PVOID NormalContext,
492 IN PVOID SystemArgument1,
493 IN PVOID SystemArgument2
494 );
495
496 LONG
497 NTAPI
498 KeQueryBasePriorityThread(IN PKTHREAD Thread);
499
500 VOID
501 FASTCALL
502 KiSetPriorityThread(
503 IN PKTHREAD Thread,
504 IN KPRIORITY Priority
505 );
506
507 VOID
508 FASTCALL
509 KiUnlinkThread(
510 IN PKTHREAD Thread,
511 IN NTSTATUS WaitStatus
512 );
513
514 VOID
515 NTAPI
516 KeDumpStackFrames(PULONG Frame);
517
518 BOOLEAN
519 NTAPI
520 KiTestAlert(VOID);
521
522 VOID
523 FASTCALL
524 KiUnwaitThread(
525 IN PKTHREAD Thread,
526 IN NTSTATUS WaitStatus,
527 IN KPRIORITY Increment
528 );
529
530 VOID
531 NTAPI
532 KeInitializeProcess(
533 struct _KPROCESS *Process,
534 KPRIORITY Priority,
535 KAFFINITY Affinity,
536 PLARGE_INTEGER DirectoryTableBase,
537 IN BOOLEAN Enable
538 );
539
540 VOID
541 NTAPI
542 KeSetQuantumProcess(
543 IN PKPROCESS Process,
544 IN UCHAR Quantum
545 );
546
547 KPRIORITY
548 NTAPI
549 KeSetPriorityAndQuantumProcess(
550 IN PKPROCESS Process,
551 IN KPRIORITY Priority,
552 IN UCHAR Quantum OPTIONAL
553 );
554
555 ULONG
556 NTAPI
557 KeForceResumeThread(IN PKTHREAD Thread);
558
559 VOID
560 NTAPI
561 KeThawAllThreads(
562 VOID
563 );
564
565 VOID
566 NTAPI
567 KeFreezeAllThreads(
568 VOID
569 );
570
571 BOOLEAN
572 NTAPI
573 KeDisableThreadApcQueueing(IN PKTHREAD Thread);
574
575 VOID
576 FASTCALL
577 KiWaitTest(
578 PVOID Object,
579 KPRIORITY Increment
580 );
581
582 VOID
583 NTAPI
584 KeContextToTrapFrame(
585 PCONTEXT Context,
586 PKEXCEPTION_FRAME ExeptionFrame,
587 PKTRAP_FRAME TrapFrame,
588 ULONG ContextFlags,
589 KPROCESSOR_MODE PreviousMode
590 );
591
592 VOID
593 NTAPI
594 KiCheckForKernelApcDelivery(VOID);
595
596 LONG
597 NTAPI
598 KiInsertQueue(
599 IN PKQUEUE Queue,
600 IN PLIST_ENTRY Entry,
601 BOOLEAN Head
602 );
603
604 VOID
605 NTAPI
606 KiTimerExpiration(
607 IN PKDPC Dpc,
608 IN PVOID DeferredContext,
609 IN PVOID SystemArgument1,
610 IN PVOID SystemArgument2
611 );
612
613 ULONG
614 NTAPI
615 KiComputeTimerTableIndex(
616 IN LONGLONG TimeValue
617 );
618
619 ULONG
620 NTAPI
621 KeSetProcess(
622 struct _KPROCESS* Process,
623 KPRIORITY Increment,
624 BOOLEAN InWait
625 );
626
627 VOID
628 NTAPI
629 KeInitializeEventPair(PKEVENT_PAIR EventPair);
630
631 VOID
632 NTAPI
633 KiInitializeUserApc(
634 IN PKEXCEPTION_FRAME Reserved,
635 IN PKTRAP_FRAME TrapFrame,
636 IN PKNORMAL_ROUTINE NormalRoutine,
637 IN PVOID NormalContext,
638 IN PVOID SystemArgument1,
639 IN PVOID SystemArgument2
640 );
641
642 PLIST_ENTRY
643 NTAPI
644 KeFlushQueueApc(
645 IN PKTHREAD Thread,
646 IN KPROCESSOR_MODE PreviousMode
647 );
648
649 VOID
650 NTAPI
651 KiAttachProcess(
652 struct _KTHREAD *Thread,
653 struct _KPROCESS *Process,
654 PKLOCK_QUEUE_HANDLE ApcLock,
655 struct _KAPC_STATE *SavedApcState
656 );
657
658 VOID
659 NTAPI
660 KiSwapProcess(
661 struct _KPROCESS *NewProcess,
662 struct _KPROCESS *OldProcess
663 );
664
665 BOOLEAN
666 NTAPI
667 KeTestAlertThread(IN KPROCESSOR_MODE AlertMode);
668
669 BOOLEAN
670 NTAPI
671 KeRemoveQueueApc(PKAPC Apc);
672
673 VOID
674 FASTCALL
675 KiActivateWaiterQueue(IN PKQUEUE Queue);
676
677 /* INITIALIZATION FUNCTIONS *************************************************/
678
679 BOOLEAN
680 NTAPI
681 KeInitSystem(VOID);
682
683 VOID
684 NTAPI
685 KeInitExceptions(VOID);
686
687 VOID
688 NTAPI
689 KeInitInterrupts(VOID);
690
691 VOID
692 NTAPI
693 KiInitializeBugCheck(VOID);
694
695 VOID
696 NTAPI
697 KiSystemStartup(
698 IN PLOADER_PARAMETER_BLOCK LoaderBlock
699 );
700
701 BOOLEAN
702 NTAPI
703 KiDeliverUserApc(PKTRAP_FRAME TrapFrame);
704
705 VOID
706 NTAPI
707 KiMoveApcState(
708 PKAPC_STATE OldState,
709 PKAPC_STATE NewState
710 );
711
712 VOID
713 NTAPI
714 KiAddProfileEvent(
715 KPROFILE_SOURCE Source,
716 ULONG Pc
717 );
718
719 VOID
720 NTAPI
721 KiDispatchException(
722 PEXCEPTION_RECORD ExceptionRecord,
723 PKEXCEPTION_FRAME ExceptionFrame,
724 PKTRAP_FRAME Tf,
725 KPROCESSOR_MODE PreviousMode,
726 BOOLEAN SearchFrames
727 );
728
729 VOID
730 NTAPI
731 KeTrapFrameToContext(
732 IN PKTRAP_FRAME TrapFrame,
733 IN PKEXCEPTION_FRAME ExceptionFrame,
734 IN OUT PCONTEXT Context
735 );
736
737 VOID
738 NTAPI
739 KeBugCheckWithTf(
740 ULONG BugCheckCode,
741 ULONG BugCheckParameter1,
742 ULONG BugCheckParameter2,
743 ULONG BugCheckParameter3,
744 ULONG BugCheckParameter4,
745 PKTRAP_FRAME Tf
746 );
747
748 VOID
749 NTAPI
750 KeFlushCurrentTb(VOID);
751
752 VOID
753 NTAPI
754 KeRosDumpStackFrames(
755 PULONG Frame,
756 ULONG FrameCount
757 );
758
759 VOID
760 NTAPI
761 KeSetSystemTime(
762 IN PLARGE_INTEGER NewSystemTime,
763 OUT PLARGE_INTEGER OldSystemTime,
764 IN BOOLEAN FixInterruptTime,
765 IN PLARGE_INTEGER HalTime
766 );
767
768 ULONG
769 NTAPI
770 KeV86Exception(
771 ULONG ExceptionNr,
772 PKTRAP_FRAME Tf,
773 ULONG address
774 );
775
776 VOID
777 NTAPI
778 KiStartUnexpectedRange(
779 VOID
780 );
781
782 VOID
783 NTAPI
784 KiEndUnexpectedRange(
785 VOID
786 );
787
788 VOID
789 NTAPI
790 KiInterruptDispatch(
791 VOID
792 );
793
794 VOID
795 NTAPI
796 KiChainedDispatch(
797 VOID
798 );
799
800 VOID
801 NTAPI
802 Ki386AdjustEsp0(
803 IN PKTRAP_FRAME TrapFrame
804 );
805
806 VOID
807 NTAPI
808 Ki386SetupAndExitToV86Mode(
809 OUT PTEB VdmTeb
810 );
811
812 VOID
813 NTAPI
814 KeI386VdmInitialize(
815 VOID
816 );
817
818 VOID
819 NTAPI
820 KiInitializeMachineType(
821 VOID
822 );
823
824 VOID
825 NTAPI
826 KiFlushNPXState(
827 IN FLOATING_SAVE_AREA *SaveArea
828 );
829
830 VOID
831 NTAPI
832 KiInitSpinLocks(
833 IN PKPRCB Prcb,
834 IN CCHAR Number
835 );
836
837 LARGE_INTEGER
838 NTAPI
839 KiComputeReciprocal(
840 IN LONG Divisor,
841 OUT PUCHAR Shift
842 );
843
844 VOID
845 NTAPI
846 KiInitSystem(
847 VOID
848 );
849
850 VOID
851 FASTCALL
852 KiInsertQueueApc(
853 IN PKAPC Apc,
854 IN KPRIORITY PriorityBoost
855 );
856
857 NTSTATUS
858 NTAPI
859 KiCallUserMode(
860 IN PVOID *OutputBuffer,
861 IN PULONG OutputLength
862 );
863
864 PULONG
865 NTAPI
866 KiGetUserModeStackAddress(
867 VOID
868 );
869
870 ULONG_PTR
871 NTAPI
872 Ki386EnableGlobalPage(IN volatile ULONG_PTR Context);
873
874 VOID
875 NTAPI
876 KiInitializePAT(VOID);
877
878 VOID
879 NTAPI
880 KiInitializeMTRR(IN BOOLEAN FinalCpu);
881
882 VOID
883 NTAPI
884 KiAmdK6InitializeMTRR(VOID);
885
886 VOID
887 NTAPI
888 KiRestoreFastSyscallReturnState(VOID);
889
890 ULONG_PTR
891 NTAPI
892 Ki386EnableDE(IN ULONG_PTR Context);
893
894 ULONG_PTR
895 NTAPI
896 Ki386EnableFxsr(IN ULONG_PTR Context);
897
898 ULONG_PTR
899 NTAPI
900 Ki386EnableXMMIExceptions(IN ULONG_PTR Context);
901
902 VOID
903 NTAPI
904 KiInitMachineDependent(VOID);
905
906 VOID
907 NTAPI
908 KiI386PentiumLockErrataFixup(VOID);
909
910 VOID
911 WRMSR(
912 IN ULONG Register,
913 IN LONGLONG Value
914 );
915
916 BOOLEAN
917 NTAPI
918 KeFreezeExecution(IN PKTRAP_FRAME TrapFrame,
919 IN PKEXCEPTION_FRAME ExceptionFrame);
920
921 VOID
922 NTAPI
923 KeThawExecution(IN BOOLEAN Enable);
924
925 #include "ke_x.h"
926
927 #endif /* __NTOSKRNL_INCLUDE_INTERNAL_KE_H */