ReactOS  0.4.13-dev-986-g029b8f2
intrin_i.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

VOID FORCEINLINE KeSetCurrentIrql (KIRQL Irql)
 
PKGDTENTRY64 FORCEINLINE KiGetGdtEntry (PVOID pGdt, USHORT Selector)
 
PVOID FORCEINLINE KiGetGdtDescriptorBase (PKGDTENTRY Entry)
 
VOID FORCEINLINE KiSetGdtDescriptorBase (PKGDTENTRY Entry, ULONG64 Base)
 
VOID FORCEINLINE KiSetGdtDescriptorLimit (PKGDTENTRY Entry, ULONG Limit)
 
VOID FORCEINLINE KiInitGdtEntry (PKGDTENTRY64 Entry, ULONG64 Base, ULONG Size, UCHAR Type, UCHAR Dpl)
 

Function Documentation

◆ KeSetCurrentIrql()

VOID FORCEINLINE KeSetCurrentIrql ( KIRQL  Irql)

Definition at line 6 of file intrin_i.h.

7 {
9 }
_Out_ PKIRQL Irql
Definition: csq.h:179
__INTRIN_INLINE void __writecr8(unsigned int Data)
Definition: intrin_x86.h:1686

◆ KiGetGdtDescriptorBase()

PVOID FORCEINLINE KiGetGdtDescriptorBase ( PKGDTENTRY  Entry)

Definition at line 20 of file intrin_i.h.

21 {
22  return (PVOID)((ULONG64)Entry->BaseLow |
23  (ULONG64)Entry->Bytes.BaseMiddle << 16 |
24  (ULONG64)Entry->Bytes.BaseHigh << 24 |
25  (ULONG64)Entry->BaseUpper << 32);
26 }
unsigned __int64 ULONG64
Definition: imports.h:198
base of all file and directory entries
Definition: entries.h:82

Referenced by KiInitializePcr().

◆ KiGetGdtEntry()

PKGDTENTRY64 FORCEINLINE KiGetGdtEntry ( PVOID  pGdt,
USHORT  Selector 
)

Definition at line 13 of file intrin_i.h.

14 {
15  return (PKGDTENTRY64)((ULONG64)pGdt + (Selector & ~RPL_MASK));
16 }
#define RPL_MASK
Definition: ketypes.h:69
unsigned __int64 ULONG64
Definition: imports.h:198

Referenced by Amd64SetupGdt(), KiInitializePcr(), and KiInitializeTss().

◆ KiInitGdtEntry()

VOID FORCEINLINE KiInitGdtEntry ( PKGDTENTRY64  Entry,
ULONG64  Base,
ULONG  Size,
UCHAR  Type,
UCHAR  Dpl 
)

Definition at line 48 of file intrin_i.h.

49 {
52  Entry->Bits.Type = Type;
53  Entry->Bits.Dpl = Dpl;
54  Entry->Bits.Present = 1;
55  Entry->Bits.System = 0;
56  Entry->Bits.LongMode = 0;
57  Entry->Bits.DefaultBig = 0;
58  Entry->Bits.Granularity = 0;
59  Entry->MustBeZero = 0;
60 }
Type
Definition: Type.h:6
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2343
VOID FORCEINLINE KiSetGdtDescriptorLimit(PKGDTENTRY Entry, ULONG Limit)
Definition: intrin_i.h:40
VOID FORCEINLINE KiSetGdtDescriptorBase(PKGDTENTRY Entry, ULONG64 Base)
Definition: intrin_i.h:30
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
base of all file and directory entries
Definition: entries.h:82

Referenced by Amd64SetupGdt(), and KiInitializeTss().

◆ KiSetGdtDescriptorBase()

VOID FORCEINLINE KiSetGdtDescriptorBase ( PKGDTENTRY  Entry,
ULONG64  Base 
)

Definition at line 30 of file intrin_i.h.

31 {
32  Entry->BaseLow = Base & 0xffff;
33  Entry->Bits.BaseMiddle = (Base >> 16) & 0xff;
34  Entry->Bits.BaseHigh = (Base >> 24) & 0xff;
35  Entry->BaseUpper = Base >> 32;
36 }
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2343
base of all file and directory entries
Definition: entries.h:82

Referenced by KiInitGdtEntry().

◆ KiSetGdtDescriptorLimit()

VOID FORCEINLINE KiSetGdtDescriptorLimit ( PKGDTENTRY  Entry,
ULONG  Limit 
)

Definition at line 40 of file intrin_i.h.

41 {
42  Entry->LimitLow = Limit & 0xffff;
43  Entry->Bits.LimitHigh = Limit >> 16;
44 }
_In_ LONG _In_ LONG Limit
Definition: kefuncs.h:328
base of all file and directory entries
Definition: entries.h:82

Referenced by KiInitGdtEntry().