ReactOS  0.4.14-dev-1279-gc1464a4
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 {
9 }
_Out_ PKIRQL Irql
Definition: csq.h:179
__INTRIN_INLINE void __writecr8(unsigned int Data)
Definition: intrin_x86.h:1686

◆ 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:82

Referenced by KiInitializePcr().

◆ 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:69
unsigned __int64 ULONG64
Definition: imports.h:198

◆ 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:6
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2374
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 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()

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 }
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2374
base of all file and directory entries
Definition: entries.h:82

Referenced by KiInitGdtEntry().

◆ 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:315
base of all file and directory entries
Definition: entries.h:82

Referenced by KiInitGdtEntry().