Update log2lines to the latest version. Jan Roeloffzen, bug #4342.
[reactos.git] / reactos / ntoskrnl / include / internal / arm / ke.h
1 #ifndef __NTOSKRNL_INCLUDE_INTERNAL_ARM_KE_H
2 #define __NTOSKRNL_INCLUDE_INTERNAL_ARM_KE_H
3
4 #include "intrin_i.h"
5
6 //
7 //Lockdown TLB entries
8 //
9 #define PCR_ENTRY 0
10 #define PDR_ENTRY 2
11
12 #define IMAGE_FILE_MACHINE_ARCHITECTURE IMAGE_FILE_MACHINE_ARM
13
14 //
15 // BKPT is 4 bytes long
16 //
17 #define KD_BREAKPOINT_TYPE ULONG
18 #define KD_BREAKPOINT_SIZE sizeof(ULONG)
19 //#define KD_BREAKPOINT_VALUE
20
21 //
22 // Macros for getting and setting special purpose registers in portable code
23 //
24 #define KeGetContextPc(Context) \
25 ((Context)->Pc)
26
27 #define KeSetContextPc(Context, ProgramCounter) \
28 ((Context)->Pc = (ProgramCounter))
29
30 #define KeGetTrapFramePc(TrapFrame) \
31 ((TrapFrame)->Pc)
32
33 #define KeGetContextReturnRegister(Context) \
34 ((Context)->R0)
35
36 #define KeSetContextReturnRegister(Context, ReturnValue) \
37 ((Context)->R0 = (ReturnValue))
38
39 //
40 // Macro to get trap and exception frame from a thread stack
41 //
42 #define KeGetTrapFrame(Thread) \
43 (PKTRAP_FRAME)((ULONG_PTR)((Thread)->InitialStack) - \
44 sizeof(KTRAP_FRAME))
45
46 #define KeGetExceptionFrame(Thread) \
47 (PKEXCEPTION_FRAME)((ULONG_PTR)KeGetTrapFrame(Thread) - \
48 sizeof(KEXCEPTION_FRAME))
49
50 //
51 // Macro to get context switches from the PRCB
52 // All architectures but x86 have it in the PRCB's KeContextSwitches
53 //
54 #define KeGetContextSwitches(Prcb) \
55 Prcb->KeContextSwitches
56
57 //
58 // Returns the Interrupt State from a Trap Frame.
59 // ON = TRUE, OFF = FALSE
60 //
61 //#define KeGetTrapFrameInterruptState(TrapFrame)
62
63 //
64 // Invalidates the TLB entry for a specified address
65 //
66 FORCEINLINE
67 VOID
68 KeInvalidateTlbEntry(IN PVOID Address)
69 {
70 /* Invalidate the TLB entry for this address */
71 KeArmInvalidateTlbEntry(Address);
72 }
73
74 VOID
75 KiPassiveRelease(
76 VOID
77
78 );
79
80 VOID
81 KiApcInterrupt(
82 VOID
83 );
84
85 #include "mm.h"
86
87 VOID
88 KeFillFixedEntryTb(
89 IN ARM_PTE Pte,
90 IN PVOID Virtual,
91 IN ULONG Index
92 );
93
94 VOID
95 KeFlushTb(
96 VOID
97 );
98
99 #define KiSystemStartupReal KiSystemStartup
100
101 #define KiGetPreviousMode(tf) \
102 ((tf->Spsr & CPSR_MODES) == CPSR_USER_MODE) ? UserMode: KernelMode
103
104 #endif