3623139042f782af3da0c6d28dcbb4913277bbfa
[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
155 /* MACROS *************************************************************************/
156
157 #define AFFINITY_MASK(Id) KiMask32Array[Id]
158 #define PRIORITY_MASK(Id) KiMask32Array[Id]
159
160 /* The following macro initializes a dispatcher object's header */
161 #define KeInitializeDispatcherHeader(Header, t, s, State) \
162 { \
163 (Header)->Type = t; \
164 (Header)->Absolute = 0; \
165 (Header)->Inserted = 0; \
166 (Header)->Size = s; \
167 (Header)->SignalState = State; \
168 InitializeListHead(&((Header)->WaitListHead)); \
169 }
170
171 #define KEBUGCHECKWITHTF(a,b,c,d,e,f) \
172 DbgPrint("KeBugCheckWithTf at %s:%i\n",__FILE__,__LINE__), \
173 KeBugCheckWithTf(a,b,c,d,e,f)
174
175 /* Tells us if the Timer or Event is a Syncronization or Notification Object */
176 #define TIMER_OR_EVENT_TYPE 0x7L
177
178 /* One of the Reserved Wait Blocks, this one is for the Thread's Timer */
179 #define TIMER_WAIT_BLOCK 0x3L
180
181 /* IOPM Definitions */
182 #define IO_ACCESS_MAP_NONE 0
183 #define IOPM_OFFSET FIELD_OFFSET(KTSS, IoMaps[0].IoMap)
184 #define KiComputeIopmOffset(MapNumber) \
185 (MapNumber == IO_ACCESS_MAP_NONE) ? \
186 (USHORT)(sizeof(KTSS)) : \
187 (USHORT)(FIELD_OFFSET(KTSS, IoMaps[MapNumber-1].IoMap))
188
189 #define SIZE_OF_FX_REGISTERS 32
190
191 /* INTERNAL KERNEL FUNCTIONS ************************************************/
192
193 /* Finds a new thread to run */
194 NTSTATUS
195 FASTCALL
196 KiSwapThread(
197 IN PKTHREAD Thread,
198 IN PKPRCB Prcb
199 );
200
201 VOID
202 NTAPI
203 KeReadyThread(
204 IN PKTHREAD Thread
205 );
206
207 BOOLEAN
208 NTAPI
209 KeSetDisableBoostThread(
210 IN OUT PKTHREAD Thread,
211 IN BOOLEAN Disable
212 );
213
214 VOID
215 NTAPI
216 KeBalanceSetManager(IN PVOID Context);
217
218 VOID
219 NTAPI
220 KiReadyThread(IN PKTHREAD Thread);
221
222 ULONG
223 NTAPI
224 KeSuspendThread(PKTHREAD Thread);
225
226 BOOLEAN
227 NTAPI
228 KeReadStateThread(IN PKTHREAD Thread);
229
230 BOOLEAN
231 FASTCALL
232 KiSwapContext(
233 IN PKTHREAD CurrentThread,
234 IN PKTHREAD NewThread
235 );
236
237 VOID
238 NTAPI
239 KiAdjustQuantumThread(IN PKTHREAD Thread);
240
241 VOID
242 FASTCALL
243 KiExitDispatcher(KIRQL OldIrql);
244
245 VOID
246 NTAPI
247 KiDeferredReadyThread(IN PKTHREAD Thread);
248
249 KAFFINITY
250 FASTCALL
251 KiSetAffinityThread(
252 IN PKTHREAD Thread,
253 IN KAFFINITY Affinity
254 );
255
256 PKTHREAD
257 FASTCALL
258 KiSelectNextThread(
259 IN PKPRCB Prcb
260 );
261
262 VOID
263 NTAPI
264 CPUID(
265 OUT ULONG CpuInfo[4],
266 IN ULONG InfoType
267 );
268
269 BOOLEAN
270 FASTCALL
271 KiInsertTimerTable(
272 IN PKTIMER Timer,
273 IN ULONG Hand
274 );
275
276 BOOLEAN
277 FASTCALL
278 KiInsertTreeTimer(
279 IN PKTIMER Timer,
280 IN LARGE_INTEGER Interval
281 );
282
283 VOID
284 FASTCALL
285 KiCompleteTimer(
286 IN PKTIMER Timer,
287 IN PKSPIN_LOCK_QUEUE LockQueue
288 );
289
290 /* gmutex.c ********************************************************************/
291
292 VOID
293 FASTCALL
294 KiAcquireGuardedMutexContented(PKGUARDED_MUTEX GuardedMutex);
295
296 /* gate.c **********************************************************************/
297
298 VOID
299 FASTCALL
300 KeInitializeGate(PKGATE Gate);
301
302 VOID
303 FASTCALL
304 KeSignalGateBoostPriority(PKGATE Gate);
305
306 VOID
307 FASTCALL
308 KeWaitForGate(
309 PKGATE Gate,
310 KWAIT_REASON WaitReason,
311 KPROCESSOR_MODE WaitMode
312 );
313
314 /* ipi.c ********************************************************************/
315
316 VOID
317 NTAPI
318 KiIpiSendRequest(
319 KAFFINITY TargetSet,
320 ULONG IpiRequest
321 );
322
323 /* next file ***************************************************************/
324
325 UCHAR
326 NTAPI
327 KeFindNextRightSetAffinity(
328 IN UCHAR Number,
329 IN ULONG Set
330 );
331
332 VOID
333 NTAPI
334 DbgBreakPointNoBugCheck(VOID);
335
336 VOID
337 NTAPI
338 KeInitializeProfile(
339 struct _KPROFILE* Profile,
340 struct _KPROCESS* Process,
341 PVOID ImageBase,
342 ULONG ImageSize,
343 ULONG BucketSize,
344 KPROFILE_SOURCE ProfileSource,
345 KAFFINITY Affinity
346 );
347
348 VOID
349 NTAPI
350 KeStartProfile(
351 struct _KPROFILE* Profile,
352 PVOID Buffer
353 );
354
355 BOOLEAN
356 NTAPI
357 KeStopProfile(struct _KPROFILE* Profile);
358
359 ULONG
360 NTAPI
361 KeQueryIntervalProfile(KPROFILE_SOURCE ProfileSource);
362
363 VOID
364 NTAPI
365 KeSetIntervalProfile(
366 KPROFILE_SOURCE ProfileSource,
367 ULONG Interval
368 );
369
370 VOID
371 NTAPI
372 KeProfileInterrupt(
373 PKTRAP_FRAME TrapFrame
374 );
375
376 VOID
377 NTAPI
378 KeProfileInterruptWithSource(
379 IN PKTRAP_FRAME TrapFrame,
380 IN KPROFILE_SOURCE Source
381 );
382
383 VOID
384 NTAPI
385 KeUpdateRunTime(
386 PKTRAP_FRAME TrapFrame,
387 KIRQL Irql
388 );
389
390 VOID
391 NTAPI
392 KiExpireTimers(
393 PKDPC Dpc,
394 PVOID DeferredContext,
395 PVOID SystemArgument1,
396 PVOID SystemArgument2
397 );
398
399 VOID
400 NTAPI
401 KeInitializeThread(
402 IN PKPROCESS Process,
403 IN OUT PKTHREAD Thread,
404 IN PKSYSTEM_ROUTINE SystemRoutine,
405 IN PKSTART_ROUTINE StartRoutine,
406 IN PVOID StartContext,
407 IN PCONTEXT Context,
408 IN PVOID Teb,
409 IN PVOID KernelStack
410 );
411
412 VOID
413 NTAPI
414 KeUninitThread(
415 IN PKTHREAD Thread
416 );
417
418 NTSTATUS
419 NTAPI
420 KeInitThread(
421 IN OUT PKTHREAD Thread,
422 IN PVOID KernelStack,
423 IN PKSYSTEM_ROUTINE SystemRoutine,
424 IN PKSTART_ROUTINE StartRoutine,
425 IN PVOID StartContext,
426 IN PCONTEXT Context,
427 IN PVOID Teb,
428 IN PKPROCESS Process
429 );
430
431 VOID
432 NTAPI
433 KeStartThread(
434 IN OUT PKTHREAD Thread
435 );
436
437 BOOLEAN
438 NTAPI
439 KeAlertThread(
440 IN PKTHREAD Thread,
441 IN KPROCESSOR_MODE AlertMode
442 );
443
444 ULONG
445 NTAPI
446 KeAlertResumeThread(
447 IN PKTHREAD Thread
448 );
449
450 ULONG
451 NTAPI
452 KeResumeThread(
453 IN PKTHREAD Thread
454 );
455
456 PVOID
457 NTAPI
458 KeSwitchKernelStack(
459 IN PVOID StackBase,
460 IN PVOID StackLimit
461 );
462
463 VOID
464 NTAPI
465 KeRundownThread(VOID);
466
467 NTSTATUS
468 NTAPI
469 KeReleaseThread(PKTHREAD Thread);
470
471 VOID
472 NTAPI
473 KiSuspendRundown(
474 IN PKAPC Apc
475 );
476
477 VOID
478 NTAPI
479 KiSuspendNop(
480 IN PKAPC Apc,
481 IN PKNORMAL_ROUTINE *NormalRoutine,
482 IN PVOID *NormalContext,
483 IN PVOID *SystemArgument1,
484 IN PVOID *SystemArgument2
485 );
486
487 VOID
488 NTAPI
489 KiSuspendThread(
490 IN PVOID NormalContext,
491 IN PVOID SystemArgument1,
492 IN PVOID SystemArgument2
493 );
494
495 LONG
496 NTAPI
497 KeQueryBasePriorityThread(IN PKTHREAD Thread);
498
499 VOID
500 FASTCALL
501 KiSetPriorityThread(
502 IN PKTHREAD Thread,
503 IN KPRIORITY Priority
504 );
505
506 VOID
507 FASTCALL
508 KiUnlinkThread(
509 IN PKTHREAD Thread,
510 IN NTSTATUS WaitStatus
511 );
512
513 VOID
514 NTAPI
515 KeDumpStackFrames(PULONG Frame);
516
517 BOOLEAN
518 NTAPI
519 KiTestAlert(VOID);
520
521 VOID
522 FASTCALL
523 KiUnwaitThread(
524 IN PKTHREAD Thread,
525 IN NTSTATUS WaitStatus,
526 IN KPRIORITY Increment
527 );
528
529 VOID
530 NTAPI
531 KeInitializeProcess(
532 struct _KPROCESS *Process,
533 KPRIORITY Priority,
534 KAFFINITY Affinity,
535 PLARGE_INTEGER DirectoryTableBase,
536 IN BOOLEAN Enable
537 );
538
539 VOID
540 NTAPI
541 KeSetQuantumProcess(
542 IN PKPROCESS Process,
543 IN UCHAR Quantum
544 );
545
546 KPRIORITY
547 NTAPI
548 KeSetPriorityAndQuantumProcess(
549 IN PKPROCESS Process,
550 IN KPRIORITY Priority,
551 IN UCHAR Quantum OPTIONAL
552 );
553
554 ULONG
555 NTAPI
556 KeForceResumeThread(IN PKTHREAD Thread);
557
558 VOID
559 NTAPI
560 KeThawAllThreads(
561 VOID
562 );
563
564 VOID
565 NTAPI
566 KeFreezeAllThreads(
567 VOID
568 );
569
570 BOOLEAN
571 NTAPI
572 KeDisableThreadApcQueueing(IN PKTHREAD Thread);
573
574 VOID
575 FASTCALL
576 KiWaitTest(
577 PVOID Object,
578 KPRIORITY Increment
579 );
580
581 VOID
582 NTAPI
583 KeContextToTrapFrame(
584 PCONTEXT Context,
585 PKEXCEPTION_FRAME ExeptionFrame,
586 PKTRAP_FRAME TrapFrame,
587 ULONG ContextFlags,
588 KPROCESSOR_MODE PreviousMode
589 );
590
591 VOID
592 NTAPI
593 KiCheckForKernelApcDelivery(VOID);
594
595 LONG
596 NTAPI
597 KiInsertQueue(
598 IN PKQUEUE Queue,
599 IN PLIST_ENTRY Entry,
600 BOOLEAN Head
601 );
602
603 VOID
604 NTAPI
605 KiTimerExpiration(
606 IN PKDPC Dpc,
607 IN PVOID DeferredContext,
608 IN PVOID SystemArgument1,
609 IN PVOID SystemArgument2
610 );
611
612 ULONG
613 NTAPI
614 KiComputeTimerTableIndex(
615 IN LONGLONG TimeValue
616 );
617
618 ULONG
619 NTAPI
620 KeSetProcess(
621 struct _KPROCESS* Process,
622 KPRIORITY Increment,
623 BOOLEAN InWait
624 );
625
626 VOID
627 NTAPI
628 KeInitializeEventPair(PKEVENT_PAIR EventPair);
629
630 VOID
631 NTAPI
632 KiInitializeUserApc(
633 IN PKEXCEPTION_FRAME Reserved,
634 IN PKTRAP_FRAME TrapFrame,
635 IN PKNORMAL_ROUTINE NormalRoutine,
636 IN PVOID NormalContext,
637 IN PVOID SystemArgument1,
638 IN PVOID SystemArgument2
639 );
640
641 PLIST_ENTRY
642 NTAPI
643 KeFlushQueueApc(
644 IN PKTHREAD Thread,
645 IN KPROCESSOR_MODE PreviousMode
646 );
647
648 VOID
649 NTAPI
650 KiAttachProcess(
651 struct _KTHREAD *Thread,
652 struct _KPROCESS *Process,
653 PKLOCK_QUEUE_HANDLE ApcLock,
654 struct _KAPC_STATE *SavedApcState
655 );
656
657 VOID
658 NTAPI
659 KiSwapProcess(
660 struct _KPROCESS *NewProcess,
661 struct _KPROCESS *OldProcess
662 );
663
664 BOOLEAN
665 NTAPI
666 KeTestAlertThread(IN KPROCESSOR_MODE AlertMode);
667
668 BOOLEAN
669 NTAPI
670 KeRemoveQueueApc(PKAPC Apc);
671
672 VOID
673 FASTCALL
674 KiActivateWaiterQueue(IN PKQUEUE Queue);
675
676 /* INITIALIZATION FUNCTIONS *************************************************/
677
678 BOOLEAN
679 NTAPI
680 KeInitSystem(VOID);
681
682 VOID
683 NTAPI
684 KeInitExceptions(VOID);
685
686 VOID
687 NTAPI
688 KeInitInterrupts(VOID);
689
690 VOID
691 NTAPI
692 KiInitializeBugCheck(VOID);
693
694 VOID
695 NTAPI
696 KiSystemStartup(
697 IN PLOADER_PARAMETER_BLOCK LoaderBlock
698 );
699
700 BOOLEAN
701 NTAPI
702 KiDeliverUserApc(PKTRAP_FRAME TrapFrame);
703
704 VOID
705 NTAPI
706 KiMoveApcState(
707 PKAPC_STATE OldState,
708 PKAPC_STATE NewState
709 );
710
711 VOID
712 NTAPI
713 KiAddProfileEvent(
714 KPROFILE_SOURCE Source,
715 ULONG Pc
716 );
717
718 VOID
719 NTAPI
720 KiDispatchException(
721 PEXCEPTION_RECORD ExceptionRecord,
722 PKEXCEPTION_FRAME ExceptionFrame,
723 PKTRAP_FRAME Tf,
724 KPROCESSOR_MODE PreviousMode,
725 BOOLEAN SearchFrames
726 );
727
728 VOID
729 NTAPI
730 KeTrapFrameToContext(
731 IN PKTRAP_FRAME TrapFrame,
732 IN PKEXCEPTION_FRAME ExceptionFrame,
733 IN OUT PCONTEXT Context
734 );
735
736 VOID
737 NTAPI
738 KeBugCheckWithTf(
739 ULONG BugCheckCode,
740 ULONG BugCheckParameter1,
741 ULONG BugCheckParameter2,
742 ULONG BugCheckParameter3,
743 ULONG BugCheckParameter4,
744 PKTRAP_FRAME Tf
745 );
746
747 VOID
748 NTAPI
749 KeFlushCurrentTb(VOID);
750
751 VOID
752 NTAPI
753 KeRosDumpStackFrames(
754 PULONG Frame,
755 ULONG FrameCount
756 );
757
758 VOID
759 NTAPI
760 KeSetSystemTime(
761 IN PLARGE_INTEGER NewSystemTime,
762 OUT PLARGE_INTEGER OldSystemTime,
763 IN BOOLEAN FixInterruptTime,
764 IN PLARGE_INTEGER HalTime
765 );
766
767 ULONG
768 NTAPI
769 KeV86Exception(
770 ULONG ExceptionNr,
771 PKTRAP_FRAME Tf,
772 ULONG address
773 );
774
775 VOID
776 NTAPI
777 KiStartUnexpectedRange(
778 VOID
779 );
780
781 VOID
782 NTAPI
783 KiEndUnexpectedRange(
784 VOID
785 );
786
787 VOID
788 NTAPI
789 KiInterruptDispatch(
790 VOID
791 );
792
793 VOID
794 NTAPI
795 KiChainedDispatch(
796 VOID
797 );
798
799 VOID
800 NTAPI
801 Ki386AdjustEsp0(
802 IN PKTRAP_FRAME TrapFrame
803 );
804
805 VOID
806 NTAPI
807 Ki386SetupAndExitToV86Mode(
808 OUT PTEB VdmTeb
809 );
810
811 VOID
812 NTAPI
813 KeI386VdmInitialize(
814 VOID
815 );
816
817 VOID
818 NTAPI
819 KiInitializeMachineType(
820 VOID
821 );
822
823 VOID
824 NTAPI
825 KiFlushNPXState(
826 IN FLOATING_SAVE_AREA *SaveArea
827 );
828
829 VOID
830 NTAPI
831 KiInitSpinLocks(
832 IN PKPRCB Prcb,
833 IN CCHAR Number
834 );
835
836 LARGE_INTEGER
837 NTAPI
838 KiComputeReciprocal(
839 IN LONG Divisor,
840 OUT PUCHAR Shift
841 );
842
843 VOID
844 NTAPI
845 KiInitSystem(
846 VOID
847 );
848
849 VOID
850 FASTCALL
851 KiInsertQueueApc(
852 IN PKAPC Apc,
853 IN KPRIORITY PriorityBoost
854 );
855
856 NTSTATUS
857 NTAPI
858 KiCallUserMode(
859 IN PVOID *OutputBuffer,
860 IN PULONG OutputLength
861 );
862
863 PULONG
864 NTAPI
865 KiGetUserModeStackAddress(
866 VOID
867 );
868
869 ULONG_PTR
870 NTAPI
871 Ki386EnableGlobalPage(IN volatile ULONG_PTR Context);
872
873 VOID
874 NTAPI
875 KiInitializePAT(VOID);
876
877 VOID
878 NTAPI
879 KiInitializeMTRR(IN BOOLEAN FinalCpu);
880
881 VOID
882 NTAPI
883 KiAmdK6InitializeMTRR(VOID);
884
885 VOID
886 NTAPI
887 KiRestoreFastSyscallReturnState(VOID);
888
889 ULONG_PTR
890 NTAPI
891 Ki386EnableDE(IN ULONG_PTR Context);
892
893 ULONG_PTR
894 NTAPI
895 Ki386EnableFxsr(IN ULONG_PTR Context);
896
897 ULONG_PTR
898 NTAPI
899 Ki386EnableXMMIExceptions(IN ULONG_PTR Context);
900
901 VOID
902 NTAPI
903 KiInitMachineDependent(VOID);
904
905 VOID
906 NTAPI
907 KiI386PentiumLockErrataFixup(VOID);
908
909 VOID
910 WRMSR(
911 IN ULONG Register,
912 IN LONGLONG Value
913 );
914
915 BOOLEAN
916 NTAPI
917 KeFreezeExecution(IN PKTRAP_FRAME TrapFrame,
918 IN PKEXCEPTION_FRAME ExceptionFrame);
919
920 VOID
921 NTAPI
922 KeThawExecution(IN BOOLEAN Enable);
923
924 #include "ke_x.h"
925
926 #endif /* __NTOSKRNL_INCLUDE_INTERNAL_KE_H */