ReactOS  0.4.14-dev-1112-g2b067d6
ke.h File Reference
Include dependency graph for ke.h:

Go to the source code of this file.

Classes

struct  _KIRQ_TRAPFRAME
 

Macros

#define KPCR_BASE   0xff000000
 
#define NPX_STATE_INVALID   0x01
 
#define NPX_STATE_VALID   0x02
 
#define NPX_STATE_DIRTY   0x04
 
#define KiGetSecondLevelDCacheSize()   ((PKIPCR)KeGetPcr())->SecondLevelDcacheSize
 
#define KeGetContextPc(Context)   ((Context)->Dr0)
 
#define KeSetContextPc(Context, ProgramCounter)   ((Context)->Dr0 = (ProgramCounter))
 
#define KeGetTrapFramePc(TrapFrame)   ((TrapFrame)->Dr0)
 
#define KeGetContextReturnRegister(Context)   ((Context)->Gpr3)
 
#define KeSetContextReturnRegister(Context, ReturnValue)   ((Context)->Gpr3 = (ReturnValue))
 
#define KePPCRdmsr(msr, val1, val2)   __asm__ __volatile__("mfmsr 3")
 
#define KePPCWrmsr(msr, val1, val2)   __asm__ __volatile__("mtmsr 3")
 
#define PPC_MIN_CACHE_LINE_SIZE   32
 

Typedefs

typedef struct _KIRQ_TRAPFRAME KIRQ_TRAPFRAME
 
typedef struct _KIRQ_TRAPFRAMEPKIRQ_TRAPFRAME
 

Functions

FORCEINLINE struct _KPCR *NTHALAPI KeGetCurrentKPCR (VOID)
 
FORCEINLINE VOID KeFlushProcessTb (VOID)
 
FORCEINLINE VOID KeSweepICache (IN PVOID BaseAddress, IN SIZE_T FlushSize)
 
FORCEINLINE PRKTHREAD KeGetCurrentThread (VOID)
 
FORCEINLINE VOID KiRundownThread (IN PKTHREAD Thread)
 

Variables

ULONG KePPCCacheAlignment
 

Macro Definition Documentation

◆ KeGetContextPc

#define KeGetContextPc (   Context)    ((Context)->Dr0)

Definition at line 51 of file ke.h.

◆ KeGetContextReturnRegister

#define KeGetContextReturnRegister (   Context)    ((Context)->Gpr3)

Definition at line 60 of file ke.h.

◆ KeGetTrapFramePc

#define KeGetTrapFramePc (   TrapFrame)    ((TrapFrame)->Dr0)

Definition at line 57 of file ke.h.

◆ KePPCRdmsr

#define KePPCRdmsr (   msr,
  val1,
  val2 
)    __asm__ __volatile__("mfmsr 3")

Definition at line 72 of file ke.h.

◆ KePPCWrmsr

#define KePPCWrmsr (   msr,
  val1,
  val2 
)    __asm__ __volatile__("mtmsr 3")

Definition at line 74 of file ke.h.

◆ KeSetContextPc

#define KeSetContextPc (   Context,
  ProgramCounter 
)    ((Context)->Dr0 = (ProgramCounter))

Definition at line 54 of file ke.h.

◆ KeSetContextReturnRegister

#define KeSetContextReturnRegister (   Context,
  ReturnValue 
)    ((Context)->Gpr3 = (ReturnValue))

Definition at line 63 of file ke.h.

◆ KiGetSecondLevelDCacheSize

#define KiGetSecondLevelDCacheSize ( )    ((PKIPCR)KeGetPcr())->SecondLevelDcacheSize

Definition at line 46 of file ke.h.

◆ KPCR_BASE

#define KPCR_BASE   0xff000000

Definition at line 25 of file ke.h.

◆ NPX_STATE_DIRTY

#define NPX_STATE_DIRTY   0x04

Definition at line 28 of file ke.h.

◆ NPX_STATE_INVALID

#define NPX_STATE_INVALID   0x01

Definition at line 26 of file ke.h.

◆ NPX_STATE_VALID

#define NPX_STATE_VALID   0x02

Definition at line 27 of file ke.h.

◆ PPC_MIN_CACHE_LINE_SIZE

#define PPC_MIN_CACHE_LINE_SIZE   32

Definition at line 76 of file ke.h.

Typedef Documentation

◆ KIRQ_TRAPFRAME

◆ PKIRQ_TRAPFRAME

Function Documentation

◆ KeFlushProcessTb()

FORCEINLINE VOID KeFlushProcessTb ( VOID  )

Definition at line 86 of file ke.h.

87 {
88  /* Flush the TLB */
89  __asm__("sync\n\tisync\n\t");
90 }
__asm__("\t.globl GetPhys\n" "GetPhys:\t\n" "mflr 0\n\t" "stwu 0,-16(1)\n\t" "mfmsr 5\n\t" "andi. 6,5,0xffef\n\t" "mtmsr 6\n\t" "isync\n\t" "sync\n\t" "lwz 3,0(3)\n\t" "mtmsr 5\n\t" "isync\n\t" "sync\n\t" "lwz 0,0(1)\n\t" "addi 1,1,16\n\t" "mtlr 0\n\t" "blr")

◆ KeGetCurrentKPCR()

FORCEINLINE struct _KPCR* NTHALAPI KeGetCurrentKPCR ( VOID  )

Definition at line 78 of file ke.h.

80 {
81  return (struct _KPCR *)__readfsdword(0x1c);
82 }
Definition: ke.h:289
PPC_QUAL unsigned long __readfsdword(const unsigned long Offset)
Definition: intrin_ppc.h:382

◆ KeGetCurrentThread()

FORCEINLINE PRKTHREAD KeGetCurrentThread ( VOID  )

Definition at line 107 of file ke.h.

108 {
109  /* Return the current thread */
110  return KeGetCurrentPrcb()->CurrentThread;
111 }
FORCEINLINE struct _KPRCB * KeGetCurrentPrcb(VOID)
Definition: ketypes.h:1063

◆ KeSweepICache()

FORCEINLINE VOID KeSweepICache ( IN PVOID  BaseAddress,
IN SIZE_T  FlushSize 
)

Definition at line 94 of file ke.h.

96 {
97  //
98  // Always sweep the whole cache
99  //
101  UNREFERENCED_PARAMETER(FlushSize);
102  __asm__ __volatile__("tlbsync");
103 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
__asm__("\t.globl GetPhys\n" "GetPhys:\t\n" "mflr 0\n\t" "stwu 0,-16(1)\n\t" "mfmsr 5\n\t" "andi. 6,5,0xffef\n\t" "mtmsr 6\n\t" "isync\n\t" "sync\n\t" "lwz 3,0(3)\n\t" "mtmsr 5\n\t" "isync\n\t" "sync\n\t" "lwz 0,0(1)\n\t" "addi 1,1,16\n\t" "mtlr 0\n\t" "blr")
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404

◆ KiRundownThread()

FORCEINLINE VOID KiRundownThread ( IN PKTHREAD  Thread)

Definition at line 115 of file ke.h.

116 {
117  /* FIXME */
118 }

Variable Documentation

◆ KePPCCacheAlignment

ULONG KePPCCacheAlignment