f539cf4facb6cce976de081ea77d611c72608fcd
[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 //
5 //Lockdown TLB entries
6 //
7 #define PCR_ENTRY 0
8 #define PDR_ENTRY 2
9
10 #define IMAGE_FILE_MACHINE_ARCHITECTURE IMAGE_FILE_MACHINE_ARM
11
12 //
13 // BKPT is 4 bytes long
14 //
15 #define KD_BREAKPOINT_TYPE ULONG
16 #define KD_BREAKPOINT_SIZE sizeof(ULONG)
17 //#define KD_BREAKPOINT_VALUE
18
19 //
20 // Macros for getting and setting special purpose registers in portable code
21 //
22 #define KeGetContextPc(Context) \
23 ((Context)->Pc)
24
25 #define KeSetContextPc(Context, ProgramCounter) \
26 ((Context)->Pc = (ProgramCounter))
27
28 #define KeGetTrapFramePc(TrapFrame) \
29 ((TrapFrame)->Pc)
30
31 #define KeGetContextReturnRegister(Context) \
32 ((Context)->R0)
33
34 #define KeSetContextReturnRegister(Context, ReturnValue) \
35 ((Context)->R0 = (ReturnValue))
36
37 //
38 // Returns the Interrupt State from a Trap Frame.
39 // ON = TRUE, OFF = FALSE
40 //
41 //#define KeGetTrapFrameInterruptState(TrapFrame) \
42
43 //
44 // Invalidates the TLB entry for a specified address
45 //
46 FORCEINLINE
47 VOID
48 KeInvalidateTlbEntry(IN PVOID Address)
49 {
50 /* Invalidate the TLB entry for this address */
51 KeArmInvalidateTlbEntry(Address);
52 }
53
54 VOID
55 KiPassiveRelease(
56 VOID
57
58 );
59
60 VOID
61 KiApcInterrupt(
62 VOID
63 );
64
65 #include "mm.h"
66
67 VOID
68 KeFillFixedEntryTb(
69 IN ARM_PTE Pte,
70 IN PVOID Virtual,
71 IN ULONG Index
72 );
73
74 VOID
75 KeFlushTb(
76 VOID
77 );
78
79 #define KiSystemStartupReal KiSystemStartup
80
81 #define KiGetPreviousMode(tf) \
82 ((tf->Spsr & CPSR_MODES) == CPSR_USER_MODE) ? UserMode: KernelMode
83
84 #endif