Author: tkreuzer
Date: Sun Feb 1 16:08:01 2009
New Revision: 39278
URL:
http://svn.reactos.org/svn/reactos?rev=39278&view=rev
Log:
Fix KiInitGdtEntry
Modified:
branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/amd64/loader.c
branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/arch/amd64/amd64.h
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/amd64/loader.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
==============================================================================
--- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/amd64/loader.c
[iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/amd64/loader.c
[iso-8859-1] Sun Feb 1 16:08:01 2009
@@ -286,7 +286,7 @@
/* 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;
Modified:
branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/arch/amd64/amd64.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
==============================================================================
--- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/arch/amd64/amd64.h
[iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/arch/amd64/amd64.h
[iso-8859-1] Sun Feb 1 16:08:01 2009
@@ -69,7 +69,7 @@
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 @@
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();