75283b3cc042833c710c838b82db0340fe6ff0d7
[reactos.git] / reactos / ntoskrnl / include / internal / i386 / ke.h
1 #ifndef __NTOSKRNL_INCLUDE_INTERNAL_I386_KE_H
2 #define __NTOSKRNL_INCLUDE_INTERNAL_I386_KE_H
3
4 #ifndef __ASM__
5
6 #include "intrin_i.h"
7 #include "v86m.h"
8
9 extern ULONG Ke386CacheAlignment;
10
11 #define IMAGE_FILE_MACHINE_ARCHITECTURE IMAGE_FILE_MACHINE_I386
12
13 //
14 // INT3 is 1 byte long
15 //
16 #define KD_BREAKPOINT_SIZE 1
17
18 //
19 // Macros for getting and setting special purpose registers in portable code
20 //
21 #define KeGetContextPc(Context) \
22 ((Context)->Eip)
23
24 #define KeSetContextPc(Context, ProgramCounter) \
25 ((Context)->Eip = (ProgramCounter))
26
27 #define KeGetTrapFramePc(TrapFrame) \
28 ((TrapFrame)->Eip)
29
30 #define KeGetContextReturnRegister(Context) \
31 ((Context)->Eax)
32
33 #define KeSetContextReturnRegister(Context, ReturnValue) \
34 ((Context)->Eax = (ReturnValue))
35
36 VOID
37 FASTCALL
38 Ki386InitializeTss(
39 IN PKTSS Tss,
40 IN PKIDTENTRY Idt,
41 IN PKGDTENTRY Gdt
42 );
43
44 VOID
45 NTAPI
46 KiSetCR0Bits(VOID);
47
48 VOID
49 NTAPI
50 KiGetCacheInformation(VOID);
51
52 BOOLEAN
53 NTAPI
54 KiIsNpxPresent(
55 VOID
56 );
57
58 BOOLEAN
59 NTAPI
60 KiIsNpxErrataPresent(
61 VOID
62 );
63
64 VOID
65 NTAPI
66 KiSetProcessorType(VOID);
67
68 ULONG
69 NTAPI
70 KiGetFeatureBits(VOID);
71
72 #ifdef _NTOSKRNL_ /* FIXME: Move flags above to NDK instead of here */
73 VOID
74 NTAPI
75 KiThreadStartup(PKSYSTEM_ROUTINE SystemRoutine,
76 PKSTART_ROUTINE StartRoutine,
77 PVOID StartContext,
78 BOOLEAN UserThread,
79 KTRAP_FRAME TrapFrame);
80 #endif
81
82 #endif
83 #endif /* __NTOSKRNL_INCLUDE_INTERNAL_I386_KE_H */
84
85 /* EOF */