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
December
November
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
November 2006
----- 2024 -----
December 2024
November 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
16 participants
324 discussions
Start a n
N
ew thread
[ion] 24687: - Add hal.h from TinyKRNL containing internal definitions for fstub (MBR, Partiton Table, Partition Table Entry, Layout structures) and helper macros. Some structures come from disk.sys sample in the DDK.
by ion@svn.reactos.org
Author: ion Date: Sun Nov 5 23:44:38 2006 New Revision: 24687 URL:
http://svn.reactos.org/svn/reactos?rev=24687&view=rev
Log: - Add hal.h from TinyKRNL containing internal definitions for fstub (MBR, Partiton Table, Partition Table Entry, Layout structures) and helper macros. Some structures come from disk.sys sample in the DDK. Added: trunk/reactos/ntoskrnl/include/internal/hal.h Added: trunk/reactos/ntoskrnl/include/internal/hal.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/hal.h (added) +++ trunk/reactos/ntoskrnl/include/internal/hal.h Sun Nov 5 23:44:38 2006 @@ -1,0 +1,108 @@ +/* + * PROJECT: ReactOS Kernel + * LICENSE: GPL - See COPYING in the top level directory + * FILE: ntoskrnl/include/hal.h + * PURPOSE: Internal header for the I/O HAL Functions (Fstub) + * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) + */ +#ifndef _HAL_ +#define _HAL_ + +// +// Various offsets in the boot record +// +#define PARTITION_TABLE_OFFSET (0x1BE / 2) +#define BOOT_SIGNATURE_OFFSET ((0x200 / 2) - 1) +#define BOOT_RECORD_RESERVED 0x1BC +#define BOOT_RECORD_SIGNATURE 0xAA55 +#define NUM_PARTITION_TABLE_ENTRIES 4 + +// +// Helper Macros +// +#define GET_STARTING_SECTOR(p) \ + ((ULONG)(p->StartingSectorLsb0) + \ + (ULONG)(p->StartingSectorLsb1 << 8 ) + \ + (ULONG)(p->StartingSectorMsb0 << 16) + \ + (ULONG)(p->StartingSectorMsb1 << 24)) + +#define GET_ENDING_S_OF_CHS(p) \ + ((UCHAR)(p->EndingCylinderLsb & 0x3F)) + +#define GET_PARTITION_LENGTH(p) \ + ((ULONG)(p->PartitionLengthLsb0) + \ + (ULONG)(p->PartitionLengthLsb1 << 8) + \ + (ULONG)(p->PartitionLengthMsb0 << 16) + \ + (ULONG)(p->PartitionLengthMsb1 << 24)) + +// +// Structure describing a partition +// +typedef struct _PARTITION_DESCRIPTOR +{ + UCHAR ActiveFlag; + UCHAR StartingTrack; + UCHAR StartingCylinderLsb; + UCHAR StartingCylinderMsb; + UCHAR PartitionType; + UCHAR EndingTrack; + UCHAR EndingCylinderLsb; + UCHAR EndingCylinderMsb; + UCHAR StartingSectorLsb0; + UCHAR StartingSectorLsb1; + UCHAR StartingSectorMsb0; + UCHAR StartingSectorMsb1; + UCHAR PartitionLengthLsb0; + UCHAR PartitionLengthLsb1; + UCHAR PartitionLengthMsb0; + UCHAR PartitionLengthMsb1; +} PARTITION_DESCRIPTOR, *PPARTITION_DESCRIPTOR; + +// +// Structure describing a boot sector +// +typedef struct _BOOT_SECTOR_INFO +{ + UCHAR JumpByte[1]; + UCHAR Ignore1[2]; + UCHAR OemData[8]; + UCHAR BytesPerSector[2]; + UCHAR Ignore2[6]; + UCHAR NumberOfSectors[2]; + UCHAR MediaByte[1]; + UCHAR Ignore3[2]; + UCHAR SectorsPerTrack[2]; + UCHAR NumberOfHeads[2]; +} BOOT_SECTOR_INFO, *PBOOT_SECTOR_INFO; + +// +// Partition Table and Disk Layout +// +typedef struct _PARTITION_TABLE +{ + PARTITION_INFORMATION PartitionEntry[4]; +} PARTITION_TABLE, *PPARTITION_TABLE; + +typedef struct _DISK_LAYOUT +{ + ULONG TableCount; + ULONG Signature; + PARTITION_TABLE PartitionTable[1]; +} DISK_LAYOUT, *PDISK_LAYOUT; + +// +// Partition Table Entry +// +typedef struct _PTE +{ + UCHAR ActiveFlag; + UCHAR StartingTrack; + USHORT StartingCylinder; + UCHAR PartitionType; + UCHAR EndingTrack; + USHORT EndingCylinder; + ULONG StartingSector; + ULONG PartitionLength; +} PTE, *PPTE; + +#endif
18 years, 1 month
1
0
0
0
[ion] 24686: - disk.sys: Don't fail IOCTL_GET_PARTITION_INFO for Partition 0. This is perfectly valid (and needed for some code I'll add later). - IopGetDiskInformation: Treat the partition buffer as a simple PULONG array. - KeUpdateSystemTime: Fix memory addressing to silence GAS compile-time warning.
by ion@svn.reactos.org
Author: ion Date: Sun Nov 5 23:43:07 2006 New Revision: 24686 URL:
http://svn.reactos.org/svn/reactos?rev=24686&view=rev
Log: - disk.sys: Don't fail IOCTL_GET_PARTITION_INFO for Partition 0. This is perfectly valid (and needed for some code I'll add later). - IopGetDiskInformation: Treat the partition buffer as a simple PULONG array. - KeUpdateSystemTime: Fix memory addressing to silence GAS compile-time warning. Modified: trunk/reactos/drivers/storage/disk/disk.c trunk/reactos/ntoskrnl/io/iomgr/arcname.c trunk/reactos/ntoskrnl/ke/i386/clock.S Modified: trunk/reactos/drivers/storage/disk/disk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/disk/disk.…
============================================================================== --- trunk/reactos/drivers/storage/disk/disk.c (original) +++ trunk/reactos/drivers/storage/disk/disk.c Sun Nov 5 23:43:07 2006 @@ -1129,10 +1129,10 @@ { Status = STATUS_INFO_LENGTH_MISMATCH; } - else if (DiskData->PartitionNumber == 0) - { - Status = STATUS_INVALID_DEVICE_REQUEST; - } + //else if (DiskData->PartitionNumber == 0) +// { +// Status = STATUS_INVALID_DEVICE_REQUEST; + //} else { PPARTITION_INFORMATION PartitionInfo; Modified: trunk/reactos/ntoskrnl/io/iomgr/arcname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/arcname.…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/arcname.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/arcname.c Sun Nov 5 23:43:07 2006 @@ -134,7 +134,7 @@ PIRP Irp; IO_STATUS_BLOCK StatusBlock; LARGE_INTEGER PartitionOffset; - PPARTITION_SECTOR PartitionBuffer; + PULONG PartitionBuffer; /* Build the name */ sprintf(Buffer, "\\Device\\Harddisk%lu\\Partition0", i); @@ -241,10 +241,7 @@ /* Calculate the MBR checksum */ Checksum = 0; - for (j = 0; j < 128; j++) - { - Checksum += ((PULONG)PartitionBuffer)[j]; - } + for (j = 0; j < 128; j++) Checksum += PartitionBuffer[j]; /* Save the signature and checksum */ *CheckSum = ~Checksum + 1; Modified: trunk/reactos/ntoskrnl/ke/i386/clock.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/clock.S?r…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/clock.S (original) +++ trunk/reactos/ntoskrnl/ke/i386/clock.S Sun Nov 5 23:43:07 2006 @@ -207,12 +207,12 @@ mov [_KeTickCount+4], edx /* Store in in shared data too */ - mov [USER_SHARED_DATA+USER_SHARED_DATA_TICK_COUNT+8], edx - mov [USER_SHARED_DATA+USER_SHARED_DATA_TICK_COUNT], ecx - mov [USER_SHARED_DATA+USER_SHARED_DATA_TICK_COUNT+4], edx + mov ds:[USER_SHARED_DATA+USER_SHARED_DATA_TICK_COUNT+8], edx + mov ds:[USER_SHARED_DATA+USER_SHARED_DATA_TICK_COUNT], ecx + mov ds:[USER_SHARED_DATA+USER_SHARED_DATA_TICK_COUNT+4], edx /* FIXME: HACK */ - mov [USER_SHARED_DATA], ecx + mov ds:[USER_SHARED_DATA], ecx IncompleteTick:
18 years, 1 month
1
0
0
0
[ion] 24685: - Simplify LPC Message allocation with an LpcpAllocateFromPortZone macro. - Move LPC Macros/inlines to lpc_x.h - Implement LpcRequestPort. - Fix a bug in CsrTerminateProcess which was setting up incorrect sizes for the LPC message. - Add some debug output to csrss. - NTLPC works perfectly now, except for a bug on shutdown which doesn't properly close LPC processes.
by ion@svn.reactos.org
Author: ion Date: Sun Nov 5 23:31:35 2006 New Revision: 24685 URL:
http://svn.reactos.org/svn/reactos?rev=24685&view=rev
Log: - Simplify LPC Message allocation with an LpcpAllocateFromPortZone macro. - Move LPC Macros/inlines to lpc_x.h - Implement LpcRequestPort. - Fix a bug in CsrTerminateProcess which was setting up incorrect sizes for the LPC message. - Add some debug output to csrss. - NTLPC works perfectly now, except for a bug on shutdown which doesn't properly close LPC processes. Added: trunk/reactos/ntoskrnl/lpc/ntlpc/lpc_x.h Modified: trunk/reactos/ntoskrnl/lpc/ntlpc/close.c trunk/reactos/ntoskrnl/lpc/ntlpc/connect.c trunk/reactos/ntoskrnl/lpc/ntlpc/lpc.h trunk/reactos/ntoskrnl/lpc/ntlpc/port.c trunk/reactos/ntoskrnl/lpc/ntlpc/reply.c trunk/reactos/ntoskrnl/lpc/ntlpc/send.c trunk/reactos/subsystems/win32/csrss/api/process.c trunk/reactos/subsystems/win32/csrss/api/wapi.c Modified: trunk/reactos/ntoskrnl/lpc/ntlpc/close.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/ntlpc/close.c…
============================================================================== --- trunk/reactos/ntoskrnl/lpc/ntlpc/close.c (original) +++ trunk/reactos/ntoskrnl/lpc/ntlpc/close.c Sun Nov 5 23:31:35 2006 @@ -40,7 +40,7 @@ if (Message) { /* FIXME: TODO */ - ASSERT(FALSE); + KEBUGCHECK(0); } /* Release the lock */ Modified: trunk/reactos/ntoskrnl/lpc/ntlpc/connect.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/ntlpc/connect…
============================================================================== --- trunk/reactos/ntoskrnl/lpc/ntlpc/connect.c (original) +++ trunk/reactos/ntoskrnl/lpc/ntlpc/connect.c Sun Nov 5 23:31:35 2006 @@ -301,25 +301,15 @@ ConnectionInfoLength = Port->MaxConnectionInfoLength; } - /* Allocate a message from the port zone while holding the lock */ - KeAcquireGuardedMutex(&LpcpLock); - Message = ExAllocateFromPagedLookasideList(&LpcpMessagesLookaside); + /* Allocate a message from the port zone */ + Message = LpcpAllocateFromPortZone(); if (!Message) { /* Fail if we couldn't allocate a message */ - KeReleaseGuardedMutex(&LpcpLock); if (SectionToMap) ObDereferenceObject(SectionToMap); ObDereferenceObject(ClientPort); return STATUS_NO_MEMORY; } - - /* Initialize it */ - InitializeListHead(&Message->Entry); - Message->RepliedToThread = NULL; - Message->Request.u2.ZeroInit = 0; - - /* Release the lock */ - KeReleaseGuardedMutex(&LpcpLock); /* Set pointer to the connection message and fill in the CID */ ConnectMessage = (PLPCP_CONNECTION_MESSAGE)(Message + 1); Modified: trunk/reactos/ntoskrnl/lpc/ntlpc/lpc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/ntlpc/lpc.h?r…
============================================================================== --- trunk/reactos/ntoskrnl/lpc/ntlpc/lpc.h (original) +++ trunk/reactos/ntoskrnl/lpc/ntlpc/lpc.h Sun Nov 5 23:31:35 2006 @@ -46,97 +46,6 @@ } #endif #endif - -// -// Gets the message type, removing the kernel-mode flag -// -#define LpcpGetMessageType(x) \ - ((x)->u2.s2.Type &~ LPCP_KERNEL_MESSAGE) - -// -// Waits on an LPC semaphore for a receive operation -// -#define LpcpReceiveWait(s, w) \ -{ \ - LPCTRACE(LPC_REPLY_DEBUG, "Wait: %p\n", s); \ - Status = KeWaitForSingleObject(s, \ - WrLpcReceive, \ - w, \ - FALSE, \ - NULL); \ - LPCTRACE(LPC_REPLY_DEBUG, "Wait done: %lx\n", Status); \ -} - -// -// Waits on an LPC semaphore for a reply operation -// -#define LpcpReplyWait(s, w) \ -{ \ - LPCTRACE(LPC_SEND_DEBUG, "Wait: %p\n", s); \ - Status = KeWaitForSingleObject(s, \ - WrLpcReply, \ - w, \ - FALSE, \ - NULL); \ - LPCTRACE(LPC_SEND_DEBUG, "Wait done: %lx\n", Status); \ - if (Status == STATUS_USER_APC) \ - { \ - /* We were preempted by an APC */ \ - if (KeReadStateSemaphore(s)) \ - { \ - /* It's still signaled, so wait on it */ \ - KeWaitForSingleObject(s, \ - Executive, \ - KernelMode, \ - FALSE, \ - NULL); \ - Status = STATUS_SUCCESS; \ - } \ - } \ -} - -// -// Waits on an LPC semaphore for a connect operation -// -#define LpcpConnectWait(s, w) \ -{ \ - LPCTRACE(LPC_CONNECT_DEBUG, "Wait: %p\n", s); \ - Status = KeWaitForSingleObject(s, \ - Executive, \ - w, \ - FALSE, \ - NULL); \ - LPCTRACE(LPC_CONNECT_DEBUG, "Wait done: %lx\n", Status);\ - if (Status == STATUS_USER_APC) \ - { \ - /* We were preempted by an APC */ \ - if (KeReadStateSemaphore(s)) \ - { \ - /* It's still signaled, so wait on it */ \ - KeWaitForSingleObject(s, \ - Executive, \ - KernelMode, \ - FALSE, \ - NULL); \ - Status = STATUS_SUCCESS; \ - } \ - } \ -} - -// -// Releases an LPC Semaphore to complete a wait -// -#define LpcpCompleteWait(s) \ -{ \ - /* Release the semaphore */ \ - LPCTRACE(LPC_SEND_DEBUG, "Release: %p\n", s); \ - KeReleaseSemaphore(s, 1, 1, FALSE); \ -} - -// -// Internal flag used for Kernel LPC Messages -// -#define LPCP_KERNEL_MESSAGE 0x8000 // // Internal Port Management @@ -214,3 +123,8 @@ extern PAGED_LOOKASIDE_LIST LpcpMessagesLookaside; extern ULONG LpcpMaxMessageSize; extern ULONG LpcpTraceLevel; + +// +// Inlined Functions +// +#include "lpc_x.h" Added: trunk/reactos/ntoskrnl/lpc/ntlpc/lpc_x.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/ntlpc/lpc_x.h…
============================================================================== --- trunk/reactos/ntoskrnl/lpc/ntlpc/lpc_x.h (added) +++ trunk/reactos/ntoskrnl/lpc/ntlpc/lpc_x.h Sun Nov 5 23:31:35 2006 @@ -1,0 +1,122 @@ +/* +* PROJECT: ReactOS Kernel +* LICENSE: GPL - See COPYING in the top level directory +* FILE: ntoskrnl/include/lpc_x.h +* PURPOSE: Intenral Inlined Functions for Local Procedure Call +* PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) +*/ + +// +// Gets the message type, removing the kernel-mode flag +// +#define LpcpGetMessageType(x) \ + ((x)->u2.s2.Type &~ LPC_KERNELMODE_MESSAGE) + +// +// Waits on an LPC semaphore for a receive operation +// +#define LpcpReceiveWait(s, w) \ +{ \ + LPCTRACE(LPC_REPLY_DEBUG, "Wait: %p\n", s); \ + Status = KeWaitForSingleObject(s, \ + WrLpcReceive, \ + w, \ + FALSE, \ + NULL); \ + LPCTRACE(LPC_REPLY_DEBUG, "Wait done: %lx\n", Status); \ +} + +// +// Waits on an LPC semaphore for a reply operation +// +#define LpcpReplyWait(s, w) \ +{ \ + LPCTRACE(LPC_SEND_DEBUG, "Wait: %p\n", s); \ + Status = KeWaitForSingleObject(s, \ + WrLpcReply, \ + w, \ + FALSE, \ + NULL); \ + LPCTRACE(LPC_SEND_DEBUG, "Wait done: %lx\n", Status); \ + if (Status == STATUS_USER_APC) \ + { \ + /* We were preempted by an APC */ \ + if (KeReadStateSemaphore(s)) \ + { \ + /* It's still signaled, so wait on it */ \ + KeWaitForSingleObject(s, \ + Executive, \ + KernelMode, \ + FALSE, \ + NULL); \ + Status = STATUS_SUCCESS; \ + } \ + } \ +} + +// +// Waits on an LPC semaphore for a connect operation +// +#define LpcpConnectWait(s, w) \ +{ \ + LPCTRACE(LPC_CONNECT_DEBUG, "Wait: %p\n", s); \ + Status = KeWaitForSingleObject(s, \ + Executive, \ + w, \ + FALSE, \ + NULL); \ + LPCTRACE(LPC_CONNECT_DEBUG, "Wait done: %lx\n", Status);\ + if (Status == STATUS_USER_APC) \ + { \ + /* We were preempted by an APC */ \ + if (KeReadStateSemaphore(s)) \ + { \ + /* It's still signaled, so wait on it */ \ + KeWaitForSingleObject(s, \ + Executive, \ + KernelMode, \ + FALSE, \ + NULL); \ + Status = STATUS_SUCCESS; \ + } \ + } \ +} + +// +// Releases an LPC Semaphore to complete a wait +// +#define LpcpCompleteWait(s) \ +{ \ + /* Release the semaphore */ \ + LPCTRACE(LPC_SEND_DEBUG, "Release: %p\n", s); \ + KeReleaseSemaphore(s, 1, 1, FALSE); \ +} + +// +// Allocates a new message +// +PLPCP_MESSAGE +FORCEINLINE +LpcpAllocateFromPortZone(VOID) +{ + PLPCP_MESSAGE Message; + + /* Allocate a message from the port zone while holding the lock */ + KeAcquireGuardedMutex(&LpcpLock); + Message = ExAllocateFromPagedLookasideList(&LpcpMessagesLookaside); + if (!Message) + { + /* Fail, and let caller cleanup */ + KeReleaseGuardedMutex(&LpcpLock); + return NULL; + } + + /* Initialize it */ + InitializeListHead(&Message->Entry); + Message->RepliedToThread = NULL; + Message->Request.u2.ZeroInit = 0; + + /* Release the lock */ + KeReleaseGuardedMutex(&LpcpLock); + return Message; +} Modified: trunk/reactos/ntoskrnl/lpc/ntlpc/port.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/ntlpc/port.c?…
============================================================================== --- trunk/reactos/ntoskrnl/lpc/ntlpc/port.c (original) +++ trunk/reactos/ntoskrnl/lpc/ntlpc/port.c Sun Nov 5 23:31:35 2006 @@ -19,7 +19,7 @@ ULONG LpcpMaxMessageSize; PAGED_LOOKASIDE_LIST LpcpMessagesLookaside; KGUARDED_MUTEX LpcpLock; -ULONG LpcpTraceLevel = 0xFFFFFFFF; +ULONG LpcpTraceLevel = LPC_CLOSE_DEBUG; ULONG LpcpNextMessageId = 1, LpcpNextCallbackId = 1; static GENERIC_MAPPING LpcpPortMapping = Modified: trunk/reactos/ntoskrnl/lpc/ntlpc/reply.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/ntlpc/reply.c…
============================================================================== --- trunk/reactos/ntoskrnl/lpc/ntlpc/reply.c (original) +++ trunk/reactos/ntoskrnl/lpc/ntlpc/reply.c Sun Nov 5 23:31:35 2006 @@ -230,24 +230,18 @@ return Status; } - /* Acquire the LPC Lock */ - KeAcquireGuardedMutex(&LpcpLock); - - /* Allocate a new message */ - Message = ExAllocateFromPagedLookasideList(&LpcpMessagesLookaside); + /* Allocate a message from the port zone */ + Message = LpcpAllocateFromPortZone(); if (!Message) { - /* Out of memory, fail */ - KeReleaseGuardedMutex(&LpcpLock); + /* Fail if we couldn't allocate a message */ ObDereferenceObject(WakeupThread); ObDereferenceObject(Port); return STATUS_NO_MEMORY; } - /* Initialize the header */ - InitializeListHead(&Message->Entry); - Message->RepliedToThread = NULL; - Message->Request.u2.ZeroInit = 0; + /* Keep the lock acquired */ + KeAcquireGuardedMutex(&LpcpLock); /* Make sure this is the reply the thread is waiting for */ if (WakeupThread->LpcReplyMessageId != ReplyMessage->MessageId) @@ -284,7 +278,7 @@ if (!(WakeupThread->LpcExitThreadCalled) && !(IsListEmpty(&WakeupThread->LpcReplyChain))) { - /* Remove us from it and reinitiailize it */ + /* Remove us from it and reinitialize it */ RemoveEntryList(&WakeupThread->LpcReplyChain); InitializeListHead(&WakeupThread->LpcReplyChain); } Modified: trunk/reactos/ntoskrnl/lpc/ntlpc/send.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/ntlpc/send.c?…
============================================================================== --- trunk/reactos/ntoskrnl/lpc/ntlpc/send.c (original) +++ trunk/reactos/ntoskrnl/lpc/ntlpc/send.c Sun Nov 5 23:31:35 2006 @@ -16,15 +16,136 @@ /* PUBLIC FUNCTIONS **********************************************************/ /* - * @unimplemented + * @implemented */ NTSTATUS NTAPI -LpcRequestPort(IN PVOID Port, +LpcRequestPort(IN PVOID PortObject, IN PPORT_MESSAGE LpcMessage) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + PLPCP_PORT_OBJECT Port = (PLPCP_PORT_OBJECT)PortObject, QueuePort; + ULONG MessageType; + PLPCP_MESSAGE Message; + KPROCESSOR_MODE PreviousMode = KeGetPreviousMode(); + PAGED_CODE(); + LPCTRACE(LPC_SEND_DEBUG, "Port: %p. Message: %p\n", Port, LpcMessage); + + /* Check if this is a non-datagram message */ + if (LpcMessage->u2.s2.Type) + { + /* Get the message type */ + MessageType = LpcpGetMessageType(LpcMessage); + + /* Validate it */ + if ((MessageType < LPC_DATAGRAM) || (MessageType > LPC_CLIENT_DIED)) + { + /* Fail */ + return STATUS_INVALID_PARAMETER; + } + + /* Mark this as a kernel-mode message only if we really came from there */ + if ((PreviousMode == KernelMode) && + (LpcMessage->u2.s2.Type & LPC_KERNELMODE_MESSAGE)) + { + /* We did, this is a kernel mode message */ + MessageType |= LPC_KERNELMODE_MESSAGE; + } + } + else + { + /* This is a datagram */ + MessageType = LPC_DATAGRAM; + } + + /* Can't have data information on this type of call */ + if (LpcMessage->u2.s2.DataInfoOffset) return STATUS_INVALID_PARAMETER; + + /* Validate message sizes */ + if ((LpcMessage->u1.s1.TotalLength > Port->MaxMessageLength) || + (LpcMessage->u1.s1.TotalLength <= LpcMessage->u1.s1.DataLength)) + { + /* Fail */ + return STATUS_PORT_MESSAGE_TOO_LONG; + } + + /* Allocate a new message */ + Message = LpcpAllocateFromPortZone(); + if (!Message) return STATUS_NO_MEMORY; + + /* Clear the context */ + Message->PortContext = NULL; + + /* Copy the message */ + LpcpMoveMessage(&Message->Request, + LpcMessage, + LpcMessage + 1, + MessageType, + &PsGetCurrentThread()->Cid); + + /* Acquire the LPC lock */ + KeAcquireGuardedMutex(&LpcpLock); + + /* Check if this is anything but a connection port */ + if ((Port->Flags & LPCP_PORT_TYPE_MASK) != LPCP_CONNECTION_PORT) + { + /* The queue port is the connected port */ + QueuePort = Port->ConnectedPort; + if (QueuePort) + { + /* Check if this is a client port */ + if ((Port->Flags & LPCP_PORT_TYPE_MASK) == LPCP_CLIENT_PORT) + { + /* Then copy the context */ + Message->PortContext = QueuePort->PortContext; + QueuePort = Port->ConnectionPort; + } + else if ((Port->Flags & LPCP_PORT_TYPE_MASK) != LPCP_COMMUNICATION_PORT) + { + /* Any other kind of port, use the connection port */ + QueuePort = Port->ConnectionPort; + } + } + } + else + { + /* For connection ports, use the port itself */ + QueuePort = PortObject; + } + + /* Make sure we have a port */ + if (QueuePort) + { + /* Generate the Message ID and set it */ + Message->Request.MessageId = LpcpNextMessageId++; + if (!LpcpNextMessageId) LpcpNextMessageId = 1; + Message->Request.CallbackId = 0; + + /* No Message ID for the thread */ + PsGetCurrentThread()->LpcReplyMessageId = 0; + + /* Insert the message in our chain */ + InsertTailList(&QueuePort->MsgQueue.ReceiveHead, &Message->Entry); + + /* Release the lock and release the semaphore */ + KeReleaseGuardedMutex(&LpcpLock); + LpcpCompleteWait(QueuePort->MsgQueue.Semaphore); + + /* If this is a waitable port, wake it up */ + if (QueuePort->Flags & LPCP_WAITABLE_PORT) + { + /* Wake it */ + KeSetEvent(&QueuePort->WaitEvent, IO_NO_INCREMENT, FALSE); + } + + /* We're done */ + LPCTRACE(LPC_SEND_DEBUG, "Port: %p. Message: %p\n", QueuePort, Message); + return STATUS_SUCCESS; + } + + /* If we got here, then free the message and fail */ + LpcpFreeToPortZone(Message, TRUE); + KeReleaseGuardedMutex(&LpcpLock); + return STATUS_PORT_DISCONNECTED; } /* @@ -127,17 +248,11 @@ return STATUS_PORT_MESSAGE_TOO_LONG; } - /* Acquire the lock */ - KeAcquireGuardedMutex(&LpcpLock); - - /* Allocate a message */ - Message = ExAllocateFromPagedLookasideList(&LpcpMessagesLookaside); - KeReleaseGuardedMutex(&LpcpLock); - - /* Check if allocation worked */ + /* Allocate a message from the port zone */ + Message = LpcpAllocateFromPortZone(); if (!Message) { - /* Fail */ + /* Fail if we couldn't allocate a message */ ObDereferenceObject(Port); return STATUS_NO_MEMORY; } Modified: trunk/reactos/subsystems/win32/csrss/api/process.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/api…
============================================================================== --- trunk/reactos/subsystems/win32/csrss/api/process.c (original) +++ trunk/reactos/subsystems/win32/csrss/api/process.c Sun Nov 5 23:31:35 2006 @@ -260,8 +260,8 @@ CSR_API(CsrTerminateProcess) { - Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE); - Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE); + Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE); + Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE); if (ProcessData == NULL) { Modified: trunk/reactos/subsystems/win32/csrss/api/wapi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/api…
============================================================================== --- trunk/reactos/subsystems/win32/csrss/api/wapi.c (original) +++ trunk/reactos/subsystems/win32/csrss/api/wapi.c Sun Nov 5 23:31:35 2006 @@ -72,9 +72,9 @@ unsigned DefIndex; ULONG Type; - DPRINT("CSR: Calling handler for type: %x.\n", Request->Type); + DPRINT1("CSR: Calling handler for type: %x.\n", Request->Type); Type = Request->Type & 0xFFFF; /* FIXME: USE MACRO */ - DPRINT("CSR: API Number: %x ServerID: %x\n",Type, Request->Type >> 16); + DPRINT1("CSR: API Number: %x ServerID: %x\n",Type, Request->Type >> 16); /* FIXME: Extract DefIndex instead of looping */ for (DefIndex = 0; ! Found && DefIndex < ApiDefinitionsCount; DefIndex++) @@ -218,13 +218,14 @@ &Request->Header); if (!NT_SUCCESS(Status)) { - DPRINT1("NtReplyWaitReceivePort failed\n"); - break; + DPRINT1("NtReplyWaitReceivePort failed: %lx\n", Status); + break; } /* If the connection was closed, handle that */ if (Request->Header.u2.s2.Type == LPC_PORT_CLOSED) { + DPRINT1("Port died, oh well\n"); CsrFreeProcessData( Request->Header.ClientId.UniqueProcess ); break; } @@ -236,9 +237,16 @@ continue; } + if (Request->Header.u2.s2.Type == LPC_CLIENT_DIED) + { + DPRINT1("Clietn died, oh well\n"); + Reply = NULL; + continue; + } + DPRINT("CSR: Got CSR API: %x [Message Origin: %x]\n", - Request->Type, - Request->Header.ClientId.UniqueProcess); + Request->Type, + Request->Header.ClientId.UniqueThread); /* Get the Process Data */ ProcessData = CsrGetProcessData(Request->Header.ClientId.UniqueProcess); @@ -252,7 +260,7 @@ if (ProcessData->Terminated) { DPRINT1("Message %d: process %d already terminated\n", - Request->Type, (ULONG)Request->Header.ClientId.UniqueProcess); + Request->Type, (ULONG)Request->Header.ClientId.UniqueProcess); continue; } @@ -271,7 +279,7 @@ /* Send back the reply */ Reply = Request; } - + /* Close the port and exit the thread */ NtClose(ServerPort); RtlExitUserThread(STATUS_SUCCESS);
18 years, 1 month
1
0
0
0
[ion] 24684: - Fix boot. - Fix GUI boot (bootvid). - Fix cmlib bug.
by ion@svn.reactos.org
Author: ion Date: Sun Nov 5 23:28:59 2006 New Revision: 24684 URL:
http://svn.reactos.org/svn/reactos?rev=24684&view=rev
Log: - Fix boot. - Fix GUI boot (bootvid). - Fix cmlib bug. Modified: trunk/reactos/drivers/base/bootvid/bootvid.c trunk/reactos/drivers/base/bootvid/bootvid.h trunk/reactos/drivers/base/bootvid/vid_vga.c trunk/reactos/drivers/base/bootvid/vid_vgatext.c trunk/reactos/drivers/base/bootvid/vid_xbox.c trunk/reactos/include/ddk/ntifs.h trunk/reactos/lib/cmlib/cmlib.h trunk/reactos/ntoskrnl/ex/init.c trunk/reactos/ntoskrnl/io/iomgr/arcname.c Modified: trunk/reactos/drivers/base/bootvid/bootvid.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/bootvid/bootv…
============================================================================== --- trunk/reactos/drivers/base/bootvid/bootvid.c (original) +++ trunk/reactos/drivers/base/bootvid/bootvid.c Sun Nov 5 23:28:59 2006 @@ -94,6 +94,8 @@ Interval.QuadPart = -PALETTE_FADE_TIME; #else + +#if 0 if (AnimBarPos == 0) { VidSolidColorFill(0x173, 354, 0x178, 354 + 9, 0); @@ -104,14 +106,21 @@ 0xe8 + AnimBarPos * 8, 354 + 9, 0); } - + if (AnimBarPos >= 3) + { VidBufferToScreenBlt(_Square1, 0xeb + AnimBarPos * 8, 354, 6, 9, 4); + } if (AnimBarPos >= 2 && AnimBarPos <= 16) + { VidBufferToScreenBlt(_Square2, 0xf3 + AnimBarPos * 8, 354, 6, 9, 4); + } if (AnimBarPos >= 1 && AnimBarPos <= 15) + { VidBufferToScreenBlt(_Square3, 0xfb + AnimBarPos * 8, 354, 6, 9, 4); - + } +#endif + if (Iteration <= PALETTE_FADE_STEPS) { Interval.QuadPart = -PALETTE_FADE_TIME; @@ -270,7 +279,7 @@ KeWaitForSingleObject(&ShutdownCompleteEvent, Executive, KernelMode, FALSE, NULL); DPRINT1("Bootvid thread to finish.\n"); - VidResetDisplay(); + //VidResetDisplay(); } Modified: trunk/reactos/drivers/base/bootvid/bootvid.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/bootvid/bootv…
============================================================================== --- trunk/reactos/drivers/base/bootvid/bootvid.h (original) +++ trunk/reactos/drivers/base/bootvid/bootvid.h Sun Nov 5 23:28:59 2006 @@ -45,7 +45,7 @@ typedef VOID (NTAPI *PVID_CLEAN_UP)(VOID); typedef VOID (NTAPI *PVID_RESET_DISPLAY)(VOID); typedef VOID (NTAPI *PVID_BUFFER_TO_SCREEN_BLT)(PUCHAR, ULONG, ULONG, ULONG, ULONG, ULONG); -typedef VOID (NTAPI *PVID_SCREEN_TO_BUFFER_BLT)(PUCHAR, ULONG, ULONG, ULONG, ULONG, ULONG); +typedef VOID (NTAPI *PVID_SCREEN_TO_BUFFER_BLT)(PUCHAR, ULONG, ULONG, ULONG, ULONG, LONG); typedef VOID (NTAPI *PVID_BITBLT)(PUCHAR, ULONG, ULONG); typedef VOID (NTAPI *PVID_SOLID_COLOR_FILL)(ULONG, ULONG, ULONG, ULONG, ULONG); typedef VOID (NTAPI *PVID_DISPLAY_STRING)(PCSTR); Modified: trunk/reactos/drivers/base/bootvid/vid_vga.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/bootvid/vid_v…
============================================================================== --- trunk/reactos/drivers/base/bootvid/vid_vga.c (original) +++ trunk/reactos/drivers/base/bootvid/vid_vga.c Sun Nov 5 23:28:59 2006 @@ -282,7 +282,7 @@ IN ULONG Top, IN ULONG Width, IN ULONG Height, - IN ULONG Delta) + IN LONG Delta) { UCHAR Plane; UCHAR b; @@ -321,7 +321,7 @@ ULONG bfOffBits; UCHAR ClrUsed; ULONG Index; - ULONG Delta; + LONG Delta; BitmapInfoHeader = (PBITMAPINFOHEADER)Buffer; Palette = (LPRGBQUAD)(Buffer + BitmapInfoHeader->biSize); @@ -364,7 +364,7 @@ Buffer += bfOffBits; while (InputPos < BitmapInfoHeader->biSizeImage && - OutputPos < Delta * BitmapInfoHeader->biHeight * 2) + OutputPos < (ULONG)Delta * BitmapInfoHeader->biHeight * 2) { Length = Buffer[InputPos++]; if (Length > 0) Modified: trunk/reactos/drivers/base/bootvid/vid_vgatext.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/bootvid/vid_v…
============================================================================== --- trunk/reactos/drivers/base/bootvid/vid_vgatext.c (original) +++ trunk/reactos/drivers/base/bootvid/vid_vgatext.c Sun Nov 5 23:28:59 2006 @@ -141,7 +141,7 @@ IN ULONG Top, IN ULONG Width, IN ULONG Height, - IN ULONG Delta) + IN LONG Delta) { } Modified: trunk/reactos/drivers/base/bootvid/vid_xbox.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/bootvid/vid_x…
============================================================================== --- trunk/reactos/drivers/base/bootvid/vid_xbox.c (original) +++ trunk/reactos/drivers/base/bootvid/vid_xbox.c Sun Nov 5 23:28:59 2006 @@ -61,7 +61,7 @@ IN ULONG Top, IN ULONG Width, IN ULONG Height, - IN ULONG Delta) + IN LONG Delta) { } Modified: trunk/reactos/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=24…
============================================================================== --- trunk/reactos/include/ddk/ntifs.h (original) +++ trunk/reactos/include/ddk/ntifs.h Sun Nov 5 23:28:59 2006 @@ -1578,6 +1578,8 @@ }; } PORT_MESSAGE, *PPORT_MESSAGE; +#define LPC_KERNELMODE_MESSAGE (CSHORT)((USHORT)0x8000) + typedef struct _PORT_VIEW { ULONG Length; Modified: trunk/reactos/lib/cmlib/cmlib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmlib.h?rev=2468…
============================================================================== --- trunk/reactos/lib/cmlib/cmlib.h (original) +++ trunk/reactos/lib/cmlib/cmlib.h Sun Nov 5 23:28:59 2006 @@ -148,10 +148,10 @@ HvInitialize( PHHIVE RegistryHive, ULONG Operation, + ULONG HiveType, + ULONG HiveFlags, ULONG_PTR HiveData OPTIONAL, ULONG Cluster OPTIONAL, - ULONG Flags, - ULONG FileType, PALLOCATE_ROUTINE Allocate, PFREE_ROUTINE Free, PFILE_READ_ROUTINE FileRead, Modified: trunk/reactos/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=246…
============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c (original) +++ trunk/reactos/ntoskrnl/ex/init.c Sun Nov 5 23:28:59 2006 @@ -948,6 +948,7 @@ /* Wait 5 seconds for it to initialize */ Timeout.QuadPart = Int32x32To64(5, -10000000); Status = ZwWaitForSingleObject(ProcessHandle, FALSE, &Timeout); + if (!NoGuiBoot) InbvFinalizeBootLogo(); if (Status == STATUS_SUCCESS) { /* Bugcheck the system if SMSS couldn't initialize */ Modified: trunk/reactos/ntoskrnl/io/iomgr/arcname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/arcname.…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/arcname.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/arcname.c Sun Nov 5 23:28:59 2006 @@ -101,7 +101,14 @@ } /* Return whether this is the CD or not */ - if (DeviceNumber != 1) return TRUE; + if (DeviceNumber != 1) + { + /* Hack until IoAssignDriveLetters is fixed */ + swprintf(SharedUserData->NtSystemRoot, L"D:\\reactos"); + return TRUE; + } + + /* Failed */ return FALSE; }
18 years, 1 month
1
0
0
0
← Newer
1
...
30
31
32
33
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
Results per page:
10
25
50
100
200