ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
August 2008
----- 2024 -----
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
27 participants
853 discussions
Start a n
N
ew thread
[hpoussin] 35554: Add new devices at start of list, not end. Order is now like in pre-r35543
by hpoussin@svn.reactos.org
Author: hpoussin Date: Sat Aug 23 04:43:56 2008 New Revision: 35554 URL:
http://svn.reactos.org/svn/reactos?rev=35554&view=rev
Log: Add new devices at start of list, not end. Order is now like in pre-r35543 Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Sat Aug 23 04:43:56 2008 @@ -388,11 +388,10 @@ { KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); Node->Parent = ParentNode; - if (ParentNode->LastChild != NULL) - ParentNode->LastChild->Sibling = Node; - else - ParentNode->Child = Node; - ParentNode->LastChild = Node; + Node->Sibling = ParentNode->Child; + ParentNode->Child = Node; + if (ParentNode->LastChild == NULL) + ParentNode->LastChild = Node; KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); Node->Level = ParentNode->Level + 1; }
16 years, 1 month
1
0
0
0
[arty] 35553: Should've done this a long time ago. Just noticed that we're potentially sending a bunch of 0 handles into AfdSelect.
by arty@svn.reactos.org
Author: arty Date: Sat Aug 23 04:01:29 2008 New Revision: 35553 URL:
http://svn.reactos.org/svn/reactos?rev=35553&view=rev
Log: Should've done this a long time ago. Just noticed that we're potentially sending a bunch of 0 handles into AfdSelect. Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/dllma…
============================================================================== --- trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] Sat Aug 23 04:01:29 2008 @@ -15,8 +15,8 @@ #include <debug.h> #ifdef DBG -//DWORD DebugTraceLevel = DEBUG_ULTRA; -DWORD DebugTraceLevel = 0; +DWORD DebugTraceLevel = DEBUG_ULTRA; +//DWORD DebugTraceLevel = 0; #endif /* DBG */ HANDLE GlobalHeap; @@ -598,7 +598,7 @@ IO_STATUS_BLOCK IOSB; PAFD_POLL_INFO PollInfo; NTSTATUS Status; - ULONG HandleCount, OutCount = 0; + LONG HandleCount, OutCount = 0; ULONG PollBufferSize; PVOID PollBuffer; ULONG i, j = 0, x; @@ -661,7 +661,6 @@ RtlZeroMemory( PollInfo, PollBufferSize ); /* Number of handles for AFD to Check */ - PollInfo->HandleCount = HandleCount; PollInfo->Exclusive = FALSE; PollInfo->Timeout = Timeout; @@ -689,6 +688,9 @@ } } + PollInfo->HandleCount = j; + PollBufferSize = ((PCHAR)&PollInfo->Handles[j+1]) - ((PCHAR)PollInfo); + /* Send IOCTL */ Status = NtDeviceIoControlFile( (HANDLE)PollInfo->Handles[0].Handle, SockEvent,
16 years, 1 month
1
0
0
0
[fireball] 35552: - Silence "Font loaded" debug print, which was mistakingly promoted to DPRINT in r35184.
by fireball@svn.reactos.org
Author: fireball Date: Sat Aug 23 03:10:15 2008 New Revision: 35552 URL:
http://svn.reactos.org/svn/reactos?rev=35552&view=rev
Log: - Silence "Font loaded" debug print, which was mistakingly promoted to DPRINT in r35184. Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/text.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/text.c [iso-8859-1] Sat Aug 23 03:10:15 2008 @@ -385,7 +385,7 @@ - DPRINT1("Font loaded: %s (%s)\n", Face->family_name, Face->style_name); + DPRINT("Font loaded: %s (%s)\n", Face->family_name, Face->style_name); DPRINT("Num glyphs: %u\n", Face->num_glyphs); /* Add this font resource to the font table */
16 years, 1 month
1
0
0
0
[arty] 35551: Hand merge a lost change from aicom-network-fixes.
by arty@svn.reactos.org
Author: arty Date: Sat Aug 23 02:39:02 2008 New Revision: 35551 URL:
http://svn.reactos.org/svn/reactos?rev=35551&view=rev
Log: Hand merge a lost change from aicom-network-fixes. Modified: trunk/reactos/drivers/network/afd/afd/listen.c Modified: trunk/reactos/drivers/network/afd/afd/listen.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/li…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/listen.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/listen.c [iso-8859-1] Sat Aug 23 02:39:02 2008 @@ -216,7 +216,6 @@ NTSTATUS AfdWaitForListen( PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp ) { - NTSTATUS Status = STATUS_SUCCESS; PFILE_OBJECT FileObject = IrpSp->FileObject; PAFD_FCB FCB = FileObject->FsContext; @@ -239,7 +238,7 @@ PollReeval( FCB->DeviceExt, FCB->FileObject ); SocketStateUnlock( FCB ); - return Status; + return Irp->IoStatus.Status; } else { AFD_DbgPrint(MID_TRACE,("Holding\n")); @@ -328,10 +327,9 @@ FCB->PollState &= ~AFD_EVENT_ACCEPT; SocketStateUnlock( FCB ); - return Status; + return Irp->IoStatus.Status; } } - SocketStateUnlock( FCB ); - return STATUS_UNSUCCESSFUL; -} + return UnlockAndMaybeComplete( FCB, STATUS_UNSUCCESSFUL, Irp, 0, NULL ); +}
16 years, 1 month
1
0
0
0
[arty] 35550: Merge aicom-network-fixes up to 35538
by arty@svn.reactos.org
Author: arty Date: Sat Aug 23 02:20:22 2008 New Revision: 35550 URL:
http://svn.reactos.org/svn/reactos?rev=35550&view=rev
Log: Merge aicom-network-fixes up to 35538 Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c trunk/reactos/drivers/network/afd/afd/bind.c trunk/reactos/drivers/network/afd/afd/info.c trunk/reactos/drivers/network/afd/afd/lock.c trunk/reactos/drivers/network/afd/afd/read.c trunk/reactos/drivers/network/afd/afd/write.c Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/dllma…
============================================================================== --- trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] Sat Aug 23 02:20:22 2008 @@ -291,6 +291,7 @@ case STATUS_INVALID_CONNECTION: AFD_DbgPrint(MID_TRACE,("MSAFD: STATUS_INVALID_CONNECTION\n")); *Errno = WSAEAFNOSUPPORT; break; case STATUS_REMOTE_NOT_LISTENING: AFD_DbgPrint(MID_TRACE, ("MSAFD: STATUS_REMOTE_NOT_LISTENING\n")); *Errno = WSAECONNRESET; break; case STATUS_FILE_CLOSED: AFD_DbgPrint(MID_TRACE, ("MSAFD: STATUS_FILE_CLOSED\n")); *Errno = WSAENOTSOCK; break; + case STATUS_INVALID_PARAMETER: DbgPrint("MSAFD: STATUS_INVALID_PARAMETER\n"); *Errno = WSAEINVAL; break; default: DbgPrint("MSAFD: Error %x is unknown\n", Status); *Errno = WSAEINVAL; break; Modified: trunk/reactos/drivers/network/afd/afd/bind.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/bi…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/bind.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/bind.c [iso-8859-1] Sat Aug 23 02:20:22 2008 @@ -25,7 +25,7 @@ } if( !FCB->LocalAddress ) { AFD_DbgPrint(MID_TRACE,("No local address\n")); - return STATUS_UNSUCCESSFUL; + return STATUS_INVALID_PARAMETER; } Status = TdiOpenAddressFile(&FCB->TdiDeviceName, Modified: trunk/reactos/drivers/network/afd/afd/info.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/in…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/info.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/info.c [iso-8859-1] Sat Aug 23 02:20:22 2008 @@ -84,7 +84,7 @@ if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp ); if( FCB->AddressFile.Object == NULL) { - return UnlockAndMaybeComplete( FCB, STATUS_UNSUCCESSFUL, Irp, 0, + return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp, 0, NULL ); } Modified: trunk/reactos/drivers/network/afd/afd/lock.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/lo…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/lock.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/lock.c [iso-8859-1] Sat Aug 23 02:20:22 2008 @@ -37,7 +37,7 @@ } IrpSp->Parameters.DeviceIoControl.Type3InputBuffer = - MmMapLockedPages( Irp->MdlAddress, KernelMode ); + MmGetSystemAddressForMdlSafe( Irp->MdlAddress, NormalPagePriority ); if( !IrpSp->Parameters.DeviceIoControl.Type3InputBuffer ) { IoFreeMdl( Irp->MdlAddress ); @@ -50,12 +50,13 @@ } VOID UnlockRequest( PIRP Irp, PIO_STACK_LOCATION IrpSp ) { - if( !IrpSp->Parameters.DeviceIoControl.Type3InputBuffer || !Irp->MdlAddress ) return; - - MmUnmapLockedPages( IrpSp->Parameters.DeviceIoControl.Type3InputBuffer, - Irp->MdlAddress ); - MmUnlockPages( Irp->MdlAddress ); - IoFreeMdl( Irp->MdlAddress ); + PVOID Buffer = MmGetSystemAddressForMdlSafe( Irp->MdlAddress, NormalPagePriority ); + if( IrpSp->Parameters.DeviceIoControl.Type3InputBuffer == Buffer || Buffer == NULL ) { + MmUnmapLockedPages( IrpSp->Parameters.DeviceIoControl.Type3InputBuffer, Irp->MdlAddress ); + MmUnlockPages( Irp->MdlAddress ); + IoFreeMdl( Irp->MdlAddress ); + } + Irp->MdlAddress = NULL; } @@ -72,6 +73,7 @@ UINT Size = sizeof(AFD_WSABUF) * (Count + Lock); PAFD_WSABUF NewBuf = ExAllocatePool( PagedPool, Size * 2 ); PMDL NewMdl; + BOOLEAN LockFailed = FALSE; AFD_DbgPrint(MID_TRACE,("Called(%08x)\n", NewBuf)); @@ -117,9 +119,19 @@ if( MapBuf[i].Mdl ) { AFD_DbgPrint(MID_TRACE,("Probe and lock pages\n")); - MmProbeAndLockPages( MapBuf[i].Mdl, KernelMode, - Write ? IoModifyAccess : IoReadAccess ); + _SEH_TRY { + MmProbeAndLockPages( MapBuf[i].Mdl, KernelMode, + Write ? IoModifyAccess : IoReadAccess ); + } _SEH_HANDLE { + LockFailed = TRUE; + } _SEH_END; AFD_DbgPrint(MID_TRACE,("MmProbeAndLock finished\n")); + + if( LockFailed ) { + IoFreeMdl( MapBuf[i].Mdl ); + MapBuf[i].Mdl = NULL; + LockFailed = FALSE; + } } } } Modified: trunk/reactos/drivers/network/afd/afd/read.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/re…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/read.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/read.c [iso-8859-1] Sat Aug 23 02:20:22 2008 @@ -252,7 +252,7 @@ } else if( FCB->State == SOCKET_STATE_LISTENING ) { AFD_DbgPrint(MIN_TRACE,("!!! LISTENER GOT A RECEIVE COMPLETE !!!\n")); SocketStateUnlock( FCB ); - return STATUS_UNSUCCESSFUL; + return STATUS_INVALID_PARAMETER; } HandleEOFOnIrp( FCB, Irp->IoStatus.Status, Irp->IoStatus.Information ); @@ -285,7 +285,7 @@ FCB->State != SOCKET_STATE_CONNECTING ) { AFD_DbgPrint(MID_TRACE,("Called recv on wrong kind of socket (s%x)\n", FCB->State)); - return UnlockAndMaybeComplete( FCB, STATUS_UNSUCCESSFUL, + return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp, 0, NULL ); } @@ -576,7 +576,7 @@ /* Check that the socket is bound */ if( FCB->State != SOCKET_STATE_BOUND ) return UnlockAndMaybeComplete - ( FCB, STATUS_UNSUCCESSFUL, Irp, 0, NULL ); + ( FCB, STATUS_INVALID_PARAMETER, Irp, 0, NULL ); if( !(RecvReq = LockRequest( Irp, IrpSp )) ) return UnlockAndMaybeComplete ( FCB, STATUS_NO_MEMORY, Irp, 0, NULL ); Modified: trunk/reactos/drivers/network/afd/afd/write.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/wr…
============================================================================== --- trunk/reactos/drivers/network/afd/afd/write.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/afd/afd/write.c [iso-8859-1] Sat Aug 23 02:20:22 2008 @@ -223,7 +223,7 @@ /* Check that the socket is bound */ if( FCB->State != SOCKET_STATE_BOUND ) - return UnlockAndMaybeComplete( FCB, STATUS_UNSUCCESSFUL, Irp, + return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp, 0, NULL ); if( !(SendReq = LockRequest( Irp, IrpSp )) ) @@ -398,7 +398,7 @@ /* Check that the socket is bound */ if( FCB->State != SOCKET_STATE_BOUND ) return UnlockAndMaybeComplete - ( FCB, STATUS_UNSUCCESSFUL, Irp, 0, NULL ); + ( FCB, STATUS_INVALID_PARAMETER, Irp, 0, NULL ); if( !(SendReq = LockRequest( Irp, IrpSp )) ) return UnlockAndMaybeComplete ( FCB, STATUS_NO_MEMORY, Irp, 0, NULL );
16 years, 1 month
1
0
0
0
[tkreuzer] 35549: Implement KiSetProcessorType, KiGetCpuVendor, KiGetFeatureBits, KiGetCacheInformation, KiSetCr0Bits and KiInitializeTss based on x86 implementation. Fix and enable Code in KiInitalizeKernel, enable call to HalInitializeProcessor.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Aug 22 21:11:09 2008 New Revision: 35549 URL:
http://svn.reactos.org/svn/reactos?rev=35549&view=rev
Log: Implement KiSetProcessorType, KiGetCpuVendor, KiGetFeatureBits, KiGetCacheInformation, KiSetCr0Bits and KiInitializeTss based on x86 implementation. Fix and enable Code in KiInitalizeKernel, enable call to HalInitializeProcessor. Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1] Fri Aug 22 21:11:09 2008 @@ -75,7 +75,8 @@ Ki386InitializeTss( IN PKTSS Tss, IN PKIDTENTRY Idt, - IN PKGDTENTRY Gdt + IN PKGDTENTRY Gdt, + IN UINT64 Stack ); VOID KiDivideErrorFault(); Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c [iso-8859-1] Fri Aug 22 21:11:09 2008 @@ -12,32 +12,475 @@ #define NDEBUG #include <debug.h> +/* FIXME: Local EFLAGS defines not used anywhere else */ +#define EFLAGS_IOPL 0x3000 +#define EFLAGS_NF 0x4000 +#define EFLAGS_RF 0x10000 +#define EFLAGS_ID 0x200000 + /* GLOBALS *******************************************************************/ /* The Boot TSS */ KTSS64 KiBootTss; -/* The TSS to use for Double Fault Traps (INT 0x9) */ -UCHAR KiDoubleFaultTSS[KTSS_IO_MAPS]; - -/* The TSS to use for NMI Fault Traps (INT 0x2) */ -UCHAR KiNMITSS[KTSS_IO_MAPS]; - /* CPU Features and Flags */ +ULONG KeI386CpuType; +ULONG KeI386CpuStep; ULONG KeI386MachineType; - +ULONG KeI386NpxPresent = 1; +ULONG KeI386XMMIPresent = 0; +ULONG KeI386FxsrPresent = 0; CHAR KeNumberProcessors = 0; +BOOLEAN KiI386PentiumLockErrataPresent; +BOOLEAN KiSMTProcessorsPresent; + +/* CPU Signatures */ +static const CHAR CmpIntelID[] = "GenuineIntel"; +static const CHAR CmpAmdID[] = "AuthenticAMD"; +static const CHAR CmpCyrixID[] = "CyrixInstead"; +static const CHAR CmpTransmetaID[] = "GenuineTMx86"; +static const CHAR CmpCentaurID[] = "CentaurHauls"; +static const CHAR CmpRiseID[] = "RiseRiseRise"; /* FUNCTIONS *****************************************************************/ + +VOID +NTAPI +KiSetProcessorType(VOID) +{ + ULONG64 EFlags; + int Reg[4]; + ULONG Stepping, Type; + + /* Start by assuming no CPUID data */ + KeGetCurrentPrcb()->CpuID = 0; + + /* Save EFlags */ + Ke386SaveFlags(EFlags); + + /* Do CPUID 1 now */ + __cpuid(Reg, 1); + + /* + * Get the Stepping and Type. The stepping contains both the + * Model and the Step, while the Type contains the returned Type. + * We ignore the family. + * + * For the stepping, we convert this: zzzzzzxy into this: x0y + */ + Stepping = Reg[0] & 0xF0; + Stepping <<= 4; + Stepping += (Reg[0] & 0xFF); + Stepping &= 0xF0F; + Type = Reg[0] & 0xF00; + Type >>= 8; + + /* Save them in the PRCB */ + KeGetCurrentPrcb()->CpuID = TRUE; + KeGetCurrentPrcb()->CpuType = (UCHAR)Type; + KeGetCurrentPrcb()->CpuStep = (USHORT)Stepping; + + /* Restore EFLAGS */ + Ke386RestoreFlags(EFlags); +} + +ULONG +NTAPI +KiGetCpuVendor(VOID) +{ + PKPRCB Prcb = KeGetCurrentPrcb(); + ULONG Vendor[5]; + ULONG Temp; + + /* Assume no Vendor ID and fail if no CPUID Support. */ + Prcb->VendorString[0] = 0; + if (!Prcb->CpuID) return 0; + + /* Get the Vendor ID and null-terminate it */ + __cpuid(Vendor, 0); + Vendor[4] = 0; + + /* Re-arrange vendor string */ + Temp = Vendor[2]; + Vendor[2] = Vendor[3]; + Vendor[3] = Temp; + + /* Copy it to the PRCB and null-terminate it again */ + RtlCopyMemory(Prcb->VendorString, + &Vendor[1], + sizeof(Prcb->VendorString) - sizeof(CHAR)); + Prcb->VendorString[sizeof(Prcb->VendorString) - sizeof(CHAR)] = ANSI_NULL; + + /* Now check the CPU Type */ + if (!strcmp(Prcb->VendorString, CmpIntelID)) + { + return CPU_INTEL; + } + else if (!strcmp(Prcb->VendorString, CmpAmdID)) + { + return CPU_AMD; + } + else if (!strcmp(Prcb->VendorString, CmpCyrixID)) + { + DPRINT1("Cyrix CPUs not fully supported\n"); + return 0; + } + else if (!strcmp(Prcb->VendorString, CmpTransmetaID)) + { + DPRINT1("Transmeta CPUs not fully supported\n"); + return 0; + } + else if (!strcmp(Prcb->VendorString, CmpCentaurID)) + { + DPRINT1("VIA CPUs not fully supported\n"); + return 0; + } + else if (!strcmp(Prcb->VendorString, CmpRiseID)) + { + DPRINT1("Rise CPUs not fully supported\n"); + return 0; + } + + /* Invalid CPU */ + return 0; +} + +ULONG +NTAPI +KiGetFeatureBits(VOID) +{ + PKPRCB Prcb = KeGetCurrentPrcb(); + ULONG Vendor; + ULONG FeatureBits = KF_WORKING_PTE; + ULONG Reg[4]; + BOOLEAN ExtendedCPUID = TRUE; + ULONG CpuFeatures = 0; + + /* Get the Vendor ID */ + Vendor = KiGetCpuVendor(); + + /* Make sure we got a valid vendor ID at least. */ + if (!Vendor) return FeatureBits; + + /* Get the CPUID Info. Features are in Reg[3]. */ + __cpuid(Reg, 1); + + /* Set the initial APIC ID */ + Prcb->InitialApicId = (UCHAR)(Reg[1] >> 24); + + /* Check for AMD CPU */ + if (Vendor == CPU_AMD) + { + /* Check if this is a K5 or higher. */ + if ((Reg[0] & 0x0F00) >= 0x0500) + { + /* Check if this is a K5 specifically. */ + if ((Reg[0] & 0x0F00) == 0x0500) + { + /* Get the Model Number */ + switch (Reg[0] & 0x00F0) + { + /* Check if this is the Model 1 */ + case 0x0010: + + /* Check if this is Step 0 or 1. They don't support PGE */ + if ((Reg[0] & 0x000F) > 0x03) break; + + case 0x0000: + + /* Model 0 doesn't support PGE at all. */ + Reg[3] &= ~0x2000; + break; + + case 0x0080: + + /* K6-2, Step 8 and over have support for MTRR. */ + if ((Reg[0] & 0x000F) >= 0x8) FeatureBits |= KF_AMDK6MTRR; + break; + + case 0x0090: + + /* As does the K6-3 */ + FeatureBits |= KF_AMDK6MTRR; + break; + + default: + break; + } + } + } + else + { + /* Families below 5 don't support PGE, PSE or CMOV at all */ + Reg[3] &= ~(0x08 | 0x2000 | 0x8000); + + /* They also don't support advanced CPUID functions. */ + ExtendedCPUID = FALSE; + } + + /* Set the current features */ + CpuFeatures = Reg[3]; + } + + /* Now check if this is Intel */ + if (Vendor == CPU_INTEL) + { + /* Check if it's a P6 */ + if (Prcb->CpuType == 6) + { + /* Perform the special sequence to get the MicroCode Signature */ + __writemsr(0x8B, 0); + __writemsr(Reg, 1); + Prcb->UpdateSignature.QuadPart = __readmsr(0x8B); + } + else if (Prcb->CpuType == 5) + { + /* On P5, enable workaround for the LOCK errata. */ + KiI386PentiumLockErrataPresent = TRUE; + } + + /* Check for broken P6 with bad SMP PTE implementation */ + if (((Reg[0] & 0x0FF0) == 0x0610 && (Reg[0] & 0x000F) <= 0x9) || + ((Reg[0] & 0x0FF0) == 0x0630 && (Reg[0] & 0x000F) <= 0x4)) + { + /* Remove support for correct PTE support. */ + FeatureBits &= ~KF_WORKING_PTE; + } + + /* Check if the CPU is too old to support SYSENTER */ + if ((Prcb->CpuType < 6) || + ((Prcb->CpuType == 6) && (Prcb->CpuStep < 0x0303))) + { + /* Disable it */ + Reg[3] &= ~0x800; + } + + /* Set the current features */ + CpuFeatures = Reg[3]; + } + + /* Convert all CPUID Feature bits into our format */ + if (CpuFeatures & 0x00000002) FeatureBits |= KF_V86_VIS | KF_CR4; + if (CpuFeatures & 0x00000008) FeatureBits |= KF_LARGE_PAGE | KF_CR4; + if (CpuFeatures & 0x00000010) FeatureBits |= KF_RDTSC; + if (CpuFeatures & 0x00000100) FeatureBits |= KF_CMPXCHG8B; + if (CpuFeatures & 0x00000800) FeatureBits |= KF_FAST_SYSCALL; + if (CpuFeatures & 0x00001000) FeatureBits |= KF_MTRR; + if (CpuFeatures & 0x00002000) FeatureBits |= KF_GLOBAL_PAGE | KF_CR4; + if (CpuFeatures & 0x00008000) FeatureBits |= KF_CMOV; + if (CpuFeatures & 0x00010000) FeatureBits |= KF_PAT; + if (CpuFeatures & 0x00200000) FeatureBits |= KF_DTS; + if (CpuFeatures & 0x00800000) FeatureBits |= KF_MMX; + if (CpuFeatures & 0x01000000) FeatureBits |= KF_FXSR; + if (CpuFeatures & 0x02000000) FeatureBits |= KF_XMMI; + if (CpuFeatures & 0x04000000) FeatureBits |= KF_XMMI64; + + /* Check if the CPU has hyper-threading */ + if (CpuFeatures & 0x10000000) + { + /* Set the number of logical CPUs */ + Prcb->LogicalProcessorsPerPhysicalProcessor = (UCHAR)(Reg[1] >> 16); + if (Prcb->LogicalProcessorsPerPhysicalProcessor > 1) + { + /* We're on dual-core */ + KiSMTProcessorsPresent = TRUE; + } + } + else + { + /* We only have a single CPU */ + Prcb->LogicalProcessorsPerPhysicalProcessor = 1; + } + + /* Check if CPUID 0x80000000 is supported */ + if (ExtendedCPUID) + { + /* Do the call */ + __cpuid(Reg, 0x80000000); + if ((Reg[0] & 0xffffff00) == 0x80000000) + { + /* Check if CPUID 0x80000001 is supported */ + if (Reg[0] >= 0x80000001) + { + /* Check which extended features are available. */ + __cpuid(Reg, 0x80000001); + + /* Check if NX-bit is supported */ + if (Reg[3] & 0x00100000) FeatureBits |= KF_NX_BIT; + + /* Now handle each features for each CPU Vendor */ + switch (Vendor) + { + case CPU_AMD: + if (Reg[3] & 0x80000000) FeatureBits |= KF_3DNOW; + break; + } + } + } + } + + /* Return the Feature Bits */ + return FeatureBits; +} + +VOID +NTAPI +KiGetCacheInformation(VOID) +{ + PKIPCR Pcr = (PKIPCR)KeGetPcr(); + ULONG Vendor; + ULONG Data[4]; + ULONG CacheRequests = 0, i; + ULONG CurrentRegister; + UCHAR RegisterByte; + BOOLEAN FirstPass = TRUE; + + /* Set default L2 size */ + Pcr->SecondLevelCacheSize = 0; + + /* Get the Vendor ID and make sure we support CPUID */ + Vendor = KiGetCpuVendor(); + if (!Vendor) return; + + /* Check the Vendor ID */ + switch (Vendor) + { + /* Handle Intel case */ + case CPU_INTEL: + + /*Check if we support CPUID 2 */ + __cpuid(Data, 0); + if (Data[0] >= 2) + { + /* We need to loop for the number of times CPUID will tell us to */ + do + { + /* Do the CPUID call */ + __cpuid(Data, 2); + + /* Check if it was the first call */ + if (FirstPass) + { + /* + * The number of times to loop is the first byte. Read + * it and then destroy it so we don't get confused. + */ + CacheRequests = Data[0] & 0xFF; + Data[0] &= 0xFFFFFF00; + + /* Don't go over this again */ + FirstPass = FALSE; + } + + /* Loop all 4 registers */ + for (i = 0; i < 4; i++) + { + /* Get the current register */ + CurrentRegister = Data[i]; + + /* + * If the upper bit is set, then this register should + * be skipped. + */ + if (CurrentRegister & 0x80000000) continue; + + /* Keep looping for every byte inside this register */ + while (CurrentRegister) + { + /* Read a byte, skip a byte. */ + RegisterByte = (UCHAR)(CurrentRegister & 0xFF); + CurrentRegister >>= 8; + if (!RegisterByte) continue; + + /* + * Valid values are from 0x40 (0 bytes) to 0x49 + * (32MB), or from 0x80 to 0x89 (same size but + * 8-way associative. + */ + if (((RegisterByte > 0x40) && + (RegisterByte <= 0x49)) || + ((RegisterByte > 0x80) && + (RegisterByte <= 0x89))) + { + /* Mask out only the first nibble */ + RegisterByte &= 0x0F; + + /* Set the L2 Cache Size */ + Pcr->SecondLevelCacheSize = 0x10000 << + RegisterByte; + } + } + } + } while (--CacheRequests); + } + break; + + case CPU_AMD: + + /* Check if we support CPUID 0x80000006 */ + __cpuid(Data, 0x80000000); + if (Data[0] >= 6) + { + /* Get 2nd level cache and tlb size */ + __cpuid(Data, 0x80000006); + + /* Set the L2 Cache Size */ + Pcr->SecondLevelCacheSize = (Data[2] & 0xFFFF0000) >> 6; + } + break; + } +} + + +VOID +NTAPI +KiSetCR0Bits(VOID) +{ + ULONG64 Cr0; + + /* Save current CR0 */ + Cr0 = __readcr0(); + + /* If this is a 486, enable Write-Protection */ + if (KeGetCurrentPrcb()->CpuType > 3) Cr0 |= CR0_WP; + + /* Set new Cr0 */ + __writecr0(Cr0); +} VOID FASTCALL -Ki386InitializeTss(IN PKTSS Tss, +Ki386InitializeTss(IN PKTSS64 Tss, IN PKIDTENTRY Idt, - IN PKGDTENTRY Gdt) -{ - // UNIMPLEMENTED; + IN PKGDTENTRY Gdt, + IN UINT64 Stack) +{ + PKGDTENTRY TssEntry; + + /* Initialize the boot TSS entry */ + TssEntry = &Gdt[KGDT_TSS / sizeof(KGDTENTRY)]; + TssEntry->Bits.Type = I386_TSS; + TssEntry->Bits.Present = 1; + TssEntry->Bits.Dpl = 0; + + /* FIXME: I/O Map */ + + /* Load the task register */ + Ke386SetTr(KGDT_TSS); + + /* Setup stack pointer */ + Tss->Rsp0 = Stack; + + /* Setup a stack for Double Fault Traps */ + Tss->Ist[1] = PtrToUlong(KiDoubleFaultStack); + + /* Setup a stack for CheckAbort Traps */ + Tss->Ist[2] = PtrToUlong(KiDoubleFaultStack); + + /* Setup a stack for NMI Traps */ + Tss->Ist[3] = PtrToUlong(KiDoubleFaultStack); + } VOID Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c [iso-8859-1] Fri Aug 22 21:11:09 2008 @@ -374,6 +374,8 @@ Pcr->TssBase = Tss; Pcr->Prcb.DpcStack = DpcStack; + Pcr->Prcb.RspBase = Tss->Rsp0; + /* Setup the processor set */ Pcr->Prcb.MultiThreadProcessorSet = Pcr->Prcb.SetMember; } @@ -387,13 +389,10 @@ IN CCHAR Number, IN PLOADER_PARAMETER_BLOCK LoaderBlock) { - FrLdrDbgPrint("Enter KiInitializeKernel\n"); -#if 0 BOOLEAN NpxPresent; ULONG FeatureBits; - LARGE_INTEGER PageDirectory; + ULONG PageDirectory[2]; PVOID DpcStack; - ULONG Vendor[3]; /* Detect and set the CPU Type */ KiSetProcessorType(); @@ -401,14 +400,8 @@ /* Set CR0 features based on detected CPU */ KiSetCR0Bits(); - /* Check if an FPU is present */ - NpxPresent = KiIsNpxPresent(); - /* Initialize the Power Management Support for this PRCB */ - PoInitializePrcb(Prcb); - - /* Bugcheck if this is a 386 CPU */ - if (Prcb->CpuType == 3) KeBugCheckEx(0x5D, 0x386, 0, 0, 0); +// PoInitializePrcb(Prcb); /* Get the processor features for the CPU */ FeatureBits = KiGetFeatureBits(); @@ -456,7 +449,7 @@ KiInitSpinLocks(Prcb, Number); /* Check if this is the Boot CPU */ - if (!Number) + if (Number == 0) { /* Set Node Data */ KeNodeBlock[0] = &KiNode0; @@ -474,20 +467,6 @@ KeI386FxsrPresent = (KeFeatureBits & KF_FXSR) ? TRUE : FALSE; KeI386XMMIPresent = (KeFeatureBits & KF_XMMI) ? TRUE : FALSE; - /* Detect 8-byte compare exchange support */ - if (!(KeFeatureBits & KF_CMPXCHG8B)) - { - /* Copy the vendor string */ - RtlCopyMemory(Vendor, Prcb->VendorString, sizeof(Vendor)); - - /* Bugcheck the system. Windows *requires* this */ - KeBugCheckEx(0x5D, - (1 << 24 ) | (Prcb->CpuType << 16) | Prcb->CpuStep, - Vendor[0], - Vendor[1], - Vendor[2]); - } - /* Set the current MP Master KPRCB to the Boot PRCB */ Prcb->MultiThreadSetMaster = Prcb; @@ -503,11 +482,12 @@ /* Initialize the Idle Process and the Process Listhead */ InitializeListHead(&KiProcessListHead); - PageDirectory.QuadPart = 0; + PageDirectory[0] = 0; + PageDirectory[1] = 0; KeInitializeProcess(InitProcess, 0, 0xFFFFFFFF, - &PageDirectory, + PageDirectory, FALSE); InitProcess->QuantumReset = MAXCHAR; } @@ -516,7 +496,8 @@ /* FIXME */ DPRINT1("SMP Boot support not yet present\n"); } - +FrLdrDbgPrint("before KeInitializeThread\n"); +for(;;); /* Setup the Idle Thread */ KeInitializeThread(InitProcess, InitThread, @@ -577,14 +558,14 @@ Prcb->DpcStack = DpcStack; /* Allocate the IOPM save area. */ - Ki386IopmSaveArea = ExAllocatePoolWithTag(PagedPool, - PAGE_SIZE * 2, - TAG('K', 'e', ' ', ' ')); - if (!Ki386IopmSaveArea) - { - /* Bugcheck. We need this for V86/VDM support. */ - KeBugCheckEx(NO_PAGES_AVAILABLE, 2, PAGE_SIZE * 2, 0, 0); - } +// Ki386IopmSaveArea = ExAllocatePoolWithTag(PagedPool, +// PAGE_SIZE * 2, +// TAG('K', 'e', ' ', ' ')); +// if (!Ki386IopmSaveArea) +// { +// /* Bugcheck. We need this for V86/VDM support. */ +// KeBugCheckEx(NO_PAGES_AVAILABLE, 2, PAGE_SIZE * 2, 0, 0); +// } } /* Raise to Dispatch */ @@ -601,7 +582,6 @@ /* Raise back to HIGH_LEVEL and clear the PRCB for the loader block */ KfRaiseIrql(HIGH_LEVEL); LoaderBlock->Prcb = 0; -#endif } VOID @@ -712,7 +692,7 @@ FrLdrDbgPrint("Gdt = %p, Idt = %p, Pcr = %p, Tss = %p\n", Gdt, Idt, Pcr, Tss); /* Setup the TSS descriptors and entries */ - Ki386InitializeTss(Tss, Idt, Gdt); + Ki386InitializeTss(Tss, Idt, Gdt, InitialStack); /* Initialize the PCR */ RtlZeroMemory(Pcr, PAGE_SIZE); @@ -769,7 +749,7 @@ Pcr->Prcb.SetMember = 1 << Cpu; /* Initialize the Processor with HAL */ -// HalInitializeProcessor(Cpu, KeLoaderBlock); + HalInitializeProcessor(Cpu, KeLoaderBlock); /* Set active processors */ KeActiveProcessors |= 1 << Cpu;
16 years, 1 month
1
0
0
0
[tkreuzer] 35548: Fix Ke386SaveFlags and Ke386RestoreFlags. Rename KIDT_INIT's 3rd member to IstIndex and use it in KeInitExceptions.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Aug 22 20:31:51 2008 New Revision: 35548 URL:
http://svn.reactos.org/svn/reactos?rev=35548&view=rev
Log: Fix Ke386SaveFlags and Ke386RestoreFlags. Rename KIDT_INIT's 3rd member to IstIndex and use it in KeInitExceptions. Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/intrin_i.h branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/except.c Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/intrin_i.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/intrin_i.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/intrin_i.h [iso-8859-1] Fri Aug 22 20:31:51 2008 @@ -48,8 +48,8 @@ : /* no outputs */ \ : "m" (X)); -#define Ke386SaveFlags(x) __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */) -#define Ke386RestoreFlags(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory") +#define Ke386SaveFlags(x) __asm__ __volatile__("pushfq ; popq %0":"=g" (x): /* no input */) +#define Ke386RestoreFlags(x) __asm__ __volatile__("pushq %0 ; popfq": /* no output */ :"g" (x):"memory") #define _Ke386GetSeg(N) ({ \ unsigned int __d; \ Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1] Fri Aug 22 20:31:51 2008 @@ -54,7 +54,7 @@ { UCHAR InterruptId; UCHAR Dpl; - UCHAR Type; + UCHAR IstIndex; PVOID ServiceRoutine; } KIDT_INIT, *PKIDT_INIT; Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/except.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/except.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/except.c [iso-8859-1] Fri Aug 22 20:31:51 2008 @@ -42,7 +42,7 @@ {0x2D, 0x03, 0x00, KiDebugServiceTrap}, {0x2F, 0x00, 0x00, KiDpcInterrupt}, {0xE1, 0x00, 0x00, KiIpiInterrupt}, - {0, 0} + {0, 0, 0, 0} }; KIDTENTRY64 KiIdt[256]; @@ -68,17 +68,18 @@ { Offset = (ULONG64)KiInterruptInitTable[j].ServiceRoutine; KiIdt[i].Dpl = KiInterruptInitTable[j].Dpl; + KiIdt[i].IstIndex = KiInterruptInitTable[j].IstIndex; j++; } else { Offset = (ULONG64)KiUnexpectedInterrupt; KiIdt[i].Dpl = 0; + KiIdt[i].IstIndex = 0; } KiIdt[i].OffsetLow = Offset & 0xffff; KiIdt[i].Selector = KGDT_64_R0_CODE; KiIdt[i].Type = 0x0e; - KiIdt[i].IstIndex = 0; KiIdt[i].Reserved0 = 0; KiIdt[i].Present = 1; KiIdt[i].OffsetMiddle = (Offset >> 16) & 0xffff;
16 years, 1 month
1
0
0
0
[tkreuzer] 35547: Setup KUSER_SHARED_DATA.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Aug 22 20:19:34 2008 New Revision: 35547 URL:
http://svn.reactos.org/svn/reactos?rev=35547&view=rev
Log: Setup KUSER_SHARED_DATA. Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/amd64/loader.c 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] Fri Aug 22 20:19:34 2008 @@ -198,6 +198,7 @@ FrLdrSetupPageDirectory(VOID) { ULONG KernelPages; + PVOID UserSharedData; /* Allocate a Page for the PML4 */ pPML4 = MmAllocateMemoryWithType(PAGE_SIZE, LoaderSpecialMemory); @@ -238,9 +239,15 @@ TssBase = GdtBase + 20 * sizeof(ULONG64); // FIXME: don't hardcode if (!FrLdrMapSinglePage(GdtBase, (ULONGLONG)pGdt)) { - DbgPrint("Could not map idt page.\n", KernelPages); - } - + DbgPrint("Could not map gdt page.\n", KernelPages); + } + + /* Setup KUSER_SHARED_DATA page */ + UserSharedData = MmAllocateMemoryWithType(PAGE_SIZE, LoaderSpecialMemory); + if (!FrLdrMapSinglePage(KI_USER_SHARED_DATA, (ULONG64)UserSharedData)) + { + DbgPrint("Could not map KUSER_SHARED_DATA page.\n", KernelPages); + } }
16 years, 1 month
1
0
0
0
[tkreuzer] 35546: Fix __readmsr and __writemsr on amd64
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Aug 22 20:18:07 2008 New Revision: 35546 URL:
http://svn.reactos.org/svn/reactos?rev=35546&view=rev
Log: Fix __readmsr and __writemsr on amd64 Modified: branches/ros-amd64-bringup/reactos/include/psdk/intrin_x86.h Modified: branches/ros-amd64-bringup/reactos/include/psdk/intrin_x86.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/psdk/intrin_x86.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/psdk/intrin_x86.h [iso-8859-1] Fri Aug 22 20:18:07 2008 @@ -1200,14 +1200,24 @@ /*** System operations ***/ static __inline__ __attribute__((always_inline)) unsigned long long __readmsr(const int reg) { +#ifdef _M_AMD64 + unsigned long low, high; + __asm__ __volatile__("rdmsr" : "=a" (low), "=d" (high) : "c" (reg)); + return (high << 32) | low; +#else unsigned long long retval; __asm__ __volatile__("rdmsr" : "=A" (retval) : "c" (reg)); return retval; +#endif } static __inline__ __attribute__((always_inline)) void __writemsr(const unsigned long Register, const unsigned long long Value) { +#ifdef _M_AMD64 + __asm__ __volatile__("wrmsr" : : "a" (Value), "d" (Value >> 32), "c" (Register)); +#else __asm__ __volatile__("wrmsr" : : "A" (Value), "c" (Register)); +#endif } static __inline__ __attribute__((always_inline)) unsigned long long __readpmc(const int counter)
16 years, 1 month
1
0
0
0
[hpoussin] 35545: Remove useless 'if'
by hpoussin@svn.reactos.org
Author: hpoussin Date: Fri Aug 22 17:13:46 2008 New Revision: 35545 URL:
http://svn.reactos.org/svn/reactos?rev=35545&view=rev
Log: Remove useless 'if' Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Fri Aug 22 17:13:46 2008 @@ -397,8 +397,7 @@ Node->Level = ParentNode->Level + 1; } - if (PhysicalDeviceObject) - PhysicalDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING; + PhysicalDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING; *DeviceNode = Node;
16 years, 1 month
1
0
0
0
← Newer
1
...
27
28
29
30
31
32
33
...
86
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Results per page:
10
25
50
100
200