mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
Fix KiInitGdtEntry
svn path=/branches/ros-amd64-bringup/; revision=39278
This commit is contained in:
@@ -286,7 +286,7 @@ FrLdrSetupGdtIdt()
|
||||
|
||||
/* Setup TSS entry */
|
||||
Entry = KiGetGdtEntry(pGdt, KGDT_TSS);
|
||||
KiInitGdtEntry(Entry, TssBase, I386_TSS, 0);
|
||||
KiInitGdtEntry(Entry, TssBase, sizeof(KTSS), I386_TSS, 0);
|
||||
|
||||
/* Setup the gdt descriptor */
|
||||
Desc.Limit = 12 * sizeof(ULONG64) - 1;
|
||||
|
||||
@@ -69,7 +69,7 @@ KiGetGdtEntry(PVOID pGdt, USHORT Index)
|
||||
|
||||
VOID
|
||||
FORCEINLINE
|
||||
KiInitGdtEntry(PKGDTENTRY64 Entry, ULONG64 Base, UCHAR Type, UCHAR Dpl)
|
||||
KiInitGdtEntry(PKGDTENTRY64 Entry, ULONG64 Base, ULONG Limit, UCHAR Type, UCHAR Dpl)
|
||||
{
|
||||
Entry->Bits.Type = Type;
|
||||
Entry->Bits.Present = 1;
|
||||
@@ -78,6 +78,9 @@ KiInitGdtEntry(PKGDTENTRY64 Entry, ULONG64 Base, UCHAR Type, UCHAR Dpl)
|
||||
Entry->Bytes.BaseMiddle = (UCHAR)(Base >> 16);
|
||||
Entry->Bytes.BaseHigh = (UCHAR)(Base >> 24);
|
||||
Entry->BaseUpper = (ULONG)(Base >> 32);
|
||||
Entry->LimitLow = (USHORT)(Limit & 0xFFFF);
|
||||
Entry->Bits.LimitHigh = (ULONG)((Limit >> 16) & 0xf);
|
||||
Entry->MustBeZero = 0;
|
||||
}
|
||||
|
||||
VOID FrLdrSetupGdtIdt();
|
||||
|
||||
Reference in New Issue
Block a user