Some build fixes for ReactOS ARM. Credits go to Alex Ionescu and Timo Kreuzer while...
[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 // Returns the Interrupt State from a Trap Frame.
41 // ON = TRUE, OFF = FALSE
42 //
43 //#define KeGetTrapFrameInterruptState(TrapFrame)
44
45 //
46 // Invalidates the TLB entry for a specified address
47 //
48 FORCEINLINE
49 VOID
50 KeInvalidateTlbEntry(IN PVOID Address)
51 {
52 /* Invalidate the TLB entry for this address */
53 KeArmInvalidateTlbEntry(Address);
54 }
55
56 VOID
57 KiPassiveRelease(
58 VOID
59
60 );
61
62 VOID
63 KiApcInterrupt(
64 VOID
65 );
66
67 #include "mm.h"
68
69 VOID
70 KeFillFixedEntryTb(
71 IN ARM_PTE Pte,
72 IN PVOID Virtual,
73 IN ULONG Index
74 );
75
76 VOID
77 KeFlushTb(
78 VOID
79 );
80
81 #define KiSystemStartupReal KiSystemStartup
82
83 #define KiGetPreviousMode(tf) \
84 ((tf->Spsr & CPSR_MODES) == CPSR_USER_MODE) ? UserMode: KernelMode
85
86 #endif