ReactOS 0.4.16-dev-306-g647d351
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

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

Function Documentation

◆ KeSetCurrentIrql()

FORCEINLINE VOID KeSetCurrentIrql ( KIRQL  Irql)

Definition at line 6 of file intrin_i.h.

7{
8 __writecr8(Irql);
9}
_Out_ PKIRQL Irql
Definition: csq.h:179

◆ KiGetGdtDescriptorBase()

FORCEINLINE PVOID 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:83

Referenced by KiInitializeP0BootStructures().

◆ KiGetGdtEntry()

FORCEINLINE PKGDTENTRY64 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:119

Referenced by Amd64SetupGdt(), KeStartAllProcessors(), KiInitializeP0BootStructures(), KiInitializeTss(), and WinLdrSetProcessorContext().

◆ KiInitGdtEntry()

FORCEINLINE VOID 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:7
FORCEINLINE VOID KiSetGdtDescriptorLimit(PKGDTENTRY Entry, ULONG Limit)
Definition: intrin_i.h:40
FORCEINLINE VOID KiSetGdtDescriptorBase(PKGDTENTRY Entry, ULONG64 Base)
Definition: intrin_i.h:30
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2451
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533

Referenced by Amd64SetupGdt(), and KiInitializeTss().

◆ KiSetGdtDescriptorBase()

FORCEINLINE VOID 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}

Referenced by KeStartAllProcessors(), KiInitGdtEntry(), and KiSetGdtEntryEx().

◆ KiSetGdtDescriptorLimit()

FORCEINLINE VOID 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:304

Referenced by KiInitGdtEntry(), and KiSetGdtEntryEx().