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
January 2012
----- 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
19 participants
559 discussions
Start a n
N
ew thread
[ion] 55227: Laa-a-a-a-dies and gentlemen..... For your unique, viewing and executing pleasure.. For one time only....by popular demand.... The one... The only... The unforgettable, unforgivable......
by ion@svn.reactos.org
Author: ion Date: Thu Jan 26 21:16:59 2012 New Revision: 55227 URL:
http://svn.reactos.org/svn/reactos?rev=55227&view=rev
Log: Laa-a-a-a-dies and gentlemen..... For your unique, viewing and executing pleasure.. For one time only....by popular demand.... The one... The only... The unforgettable, unforgivable... Meanest, baddest, piece of code around... He's back..... with a vengeance... The ultimate... Mega... Uber.. Amazing... HACK OF DOOOOOOOOOOOOOOOOOOOOOOOOOOOOOM </applause> Modified: trunk/reactos/ntoskrnl/include/internal/mm.h trunk/reactos/ntoskrnl/ke/i386/thrdini.c trunk/reactos/ntoskrnl/ke/procobj.c trunk/reactos/ntoskrnl/ke/thrdobj.c trunk/reactos/ntoskrnl/ke/thrdschd.c trunk/reactos/ntoskrnl/mm/i386/page.c trunk/reactos/ntoskrnl/mm/mmfault.c Modified: trunk/reactos/ntoskrnl/include/internal/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Thu Jan 26 21:16:59 2012 @@ -5,6 +5,20 @@ /* TYPES *********************************************************************/ struct _EPROCESS; + +/* ReactOS Mm Hacks */ +VOID +FASTCALL +MiSyncForProcessAttach( + IN PKTHREAD NextThread, + IN PEPROCESS Process +); + +VOID +FASTCALL +MiSyncForContextSwitch( + IN PKTHREAD Thread +); extern PMMSUPPORT MmKernelAddressSpace; extern PFN_COUNT MiFreeSwapPages; Modified: trunk/reactos/ntoskrnl/ke/i386/thrdini.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/thrdini.c…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/thrdini.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/thrdini.c [iso-8859-1] Thu Jan 26 21:16:59 2012 @@ -433,6 +433,9 @@ /* Get thread pointers */ OldThread = (PKTHREAD)(OldThreadAndApcFlag & ~3); NewThread = Pcr->PrcbData.CurrentThread; + + /* ReactOS Mm Hack */ + MiSyncForContextSwitch(NewThread); /* Get the old thread and set its kernel stack */ OldThread->KernelStack = SwitchFrame; Modified: trunk/reactos/ntoskrnl/ke/procobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/procobj.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ke/procobj.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/procobj.c [iso-8859-1] Thu Jan 26 21:16:59 2012 @@ -97,6 +97,9 @@ /* Release lock */ KiReleaseApcLockFromDpcLevel(ApcLock); + /* Make sure that we are in the right page directory (ReactOS Mm Hack) */ + MiSyncForProcessAttach(Thread, (PEPROCESS)Process); + /* Swap Processes */ KiSwapProcess(Process, SavedApcState->Process); @@ -615,6 +618,9 @@ /* Release lock */ KiReleaseApcLockFromDpcLevel(&ApcLock); + /* Make sure that we are in the right page directory (ReactOS Mm Hack) */ + MiSyncForProcessAttach(Thread, (PEPROCESS)Process); + /* Swap Processes */ KiSwapProcess(Thread->ApcState.Process, Process); @@ -782,6 +788,9 @@ /* Release lock */ KiReleaseApcLockFromDpcLevel(&ApcLock); + /* Make sure that we are in the right page directory (ReactOS Mm Hack) */ + MiSyncForProcessAttach(Thread, (PEPROCESS)Process); + /* Swap Processes */ KiSwapProcess(Thread->ApcState.Process, Process); Modified: trunk/reactos/ntoskrnl/ke/thrdobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/thrdobj.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ke/thrdobj.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/thrdobj.c [iso-8859-1] Thu Jan 26 21:16:59 2012 @@ -856,6 +856,9 @@ Thread->StackBase = KernelStack; Thread->StackLimit = (ULONG_PTR)KernelStack - KERNEL_STACK_SIZE; Thread->KernelStackResident = TRUE; + + /* Make sure that we are in the right page directory (ReactOS Mm Hack) */ + MiSyncForProcessAttach(Thread, (PEPROCESS)Process); /* Enter SEH to avoid crashes due to user mode */ Status = STATUS_SUCCESS; Modified: trunk/reactos/ntoskrnl/ke/thrdschd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/thrdschd.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ke/thrdschd.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/thrdschd.c [iso-8859-1] Thu Jan 26 21:16:59 2012 @@ -394,6 +394,9 @@ /* Save the wait IRQL */ WaitIrql = CurrentThread->WaitIrql; + /* REACTOS Mm Hack of Doom */ + MiSyncForContextSwitch(NextThread); + /* Swap contexts */ ApcState = KiSwapContext(WaitIrql, CurrentThread); @@ -790,6 +793,9 @@ /* Sanity check */ ASSERT(OldIrql <= DISPATCH_LEVEL); + /* REACTOS Mm Hack of Doom */ + MiSyncForContextSwitch(NextThread); + /* Swap to new thread */ KiSwapContext(APC_LEVEL, Thread); Status = STATUS_SUCCESS; Modified: trunk/reactos/ntoskrnl/mm/i386/page.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/i386/page.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] Thu Jan 26 21:16:59 2012 @@ -1029,6 +1029,54 @@ } VOID +NTAPI +MmUpdatePageDir(PEPROCESS Process, PVOID Address, ULONG Size) +{ + ULONG StartOffset, EndOffset, Offset; + PULONG Pde; + + // + // Check if the process isn't there anymore + // This is probably a bad sign, since it means the caller is setting cr3 to + // 0 or something... + // + if ((PTE_TO_PFN(Process->Pcb.DirectoryTableBase[0]) == 0) && (Process != PsGetCurrentProcess())) + { + DPRINT1("Process: %16s is dead: %p\n", Process->ImageFileName, Process->Pcb.DirectoryTableBase[0]); + ASSERT(FALSE); + return; + } + + if (Address < MmSystemRangeStart) + { + KeBugCheck(MEMORY_MANAGEMENT); + } + + StartOffset = ADDR_TO_PDE_OFFSET(Address); + EndOffset = ADDR_TO_PDE_OFFSET((PVOID)((ULONG_PTR)Address + Size)); + + if (Process != NULL && Process != PsGetCurrentProcess()) + { + Pde = MmCreateHyperspaceMapping(PTE_TO_PFN(Process->Pcb.DirectoryTableBase[0])); + } + else + { + Pde = (PULONG)PAGEDIRECTORY_MAP; + } + for (Offset = StartOffset; Offset <= EndOffset; Offset++) + { + if (Offset != ADDR_TO_PDE_OFFSET(PAGETABLE_MAP)) + { + InterlockedCompareExchangePte(&Pde[Offset], MmGlobalKernelPageDirectory[Offset], 0); + } + } + if (Pde != (PULONG)PAGEDIRECTORY_MAP) + { + MmDeleteHyperspaceMapping(Pde); + } +} + +VOID INIT_FUNCTION NTAPI MmInitGlobalKernelPageDirectory(VOID) Modified: trunk/reactos/ntoskrnl/mm/mmfault.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mmfault.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mmfault.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/mmfault.c [iso-8859-1] Thu Jan 26 21:16:59 2012 @@ -19,6 +19,41 @@ #include "ARM3/miarm.h" /* PRIVATE FUNCTIONS **********************************************************/ + +VOID +FASTCALL +MiSyncForProcessAttach(IN PKTHREAD Thread, + IN PEPROCESS Process) +{ + PETHREAD Ethread = CONTAINING_RECORD(Thread, ETHREAD, Tcb); + //DPRINT1("Hack sync for process: %p and thread: %p\n", Process, Thread); + //DPRINT1("Thread stack hack: %p %d\n", Thread->StackLimit, Thread->LargeStack); + + /* Hack Sync because Mm is broken */ + MmUpdatePageDir(Process, Ethread, sizeof(ETHREAD)); + MmUpdatePageDir(Process, Ethread->ThreadsProcess, sizeof(EPROCESS)); + MmUpdatePageDir(Process, + (PVOID)Thread->StackLimit, + Thread->LargeStack ? + KERNEL_LARGE_STACK_SIZE : KERNEL_STACK_SIZE); +} + +VOID +FASTCALL +MiSyncForContextSwitch(IN PKTHREAD Thread) +{ + PVOID Process = PsGetCurrentProcess(); + PETHREAD Ethread = CONTAINING_RECORD(Thread, ETHREAD, Tcb); + //DPRINT1("Hack sync for thread: %p and process: %p\n", Thread, Process); + //DPRINT1("Thread stack hack: %p %d\n", Thread->StackLimit, Thread->LargeStack); + + /* Hack Sync because Mm is broken */ + MmUpdatePageDir(Process, Ethread->ThreadsProcess, sizeof(EPROCESS)); + MmUpdatePageDir(Process, + (PVOID)Thread->StackLimit, + Thread->LargeStack ? + KERNEL_LARGE_STACK_SIZE : KERNEL_STACK_SIZE); +} NTSTATUS NTAPI
12 years, 11 months
1
0
0
0
[akhaldi] 55226: [MSADP32.ACM] * Sync to Wine 1.3.37.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Jan 26 20:59:35 2012 New Revision: 55226 URL:
http://svn.reactos.org/svn/reactos?rev=55226&view=rev
Log: [MSADP32.ACM] * Sync to Wine 1.3.37. Modified: trunk/reactos/dll/win32/msadp32.acm/msadp32.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/msadp32.acm/msadp32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msadp32.acm/msad…
============================================================================== --- trunk/reactos/dll/win32/msadp32.acm/msadp32.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msadp32.acm/msadp32.c [iso-8859-1] Thu Jan 26 20:59:35 2012 @@ -180,7 +180,7 @@ /*********************************************************************** * R16 * - * Read a 16 bit sample (correctly handles endianess) + * Read a 16 bit sample (correctly handles endianness) */ static inline short R16(const unsigned char* src) { @@ -190,7 +190,7 @@ /*********************************************************************** * W16 * - * Write a 16 bit sample (correctly handles endianess) + * Write a 16 bit sample (correctly handles endianness) */ static inline void W16(unsigned char* dst, short s) { Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Thu Jan 26 20:59:35 2012 @@ -92,7 +92,7 @@ reactos/dll/win32/mpr # Autosync reactos/dll/win32/mprapi # Autosync reactos/dll/win32/msacm32 # Autosync -reactos/dll/win32/msadp32.acm # Autosync +reactos/dll/win32/msadp32.acm # Synced to Wine-1.3.37 reactos/dll/win32/mscat32 # Autosync reactos/dll/win32/mscms # Autosync reactos/dll/win32/mscoree # Autosync
12 years, 11 months
1
0
0
0
[cgutman] 55225: [USBEHCI_NEW] - Disable debug spam
by cgutman@svn.reactos.org
Author: cgutman Date: Thu Jan 26 20:25:12 2012 New Revision: 55225 URL:
http://svn.reactos.org/svn/reactos?rev=55225&view=rev
Log: [USBEHCI_NEW] - Disable debug spam Modified: branches/usb-bringup-trunk/drivers/usb/usbehci_new/usb_request.cpp Modified: branches/usb-bringup-trunk/drivers/usb/usbehci_new/usb_request.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbehci_new/usb_request.cpp [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbehci_new/usb_request.cpp [iso-8859-1] Thu Jan 26 20:25:12 2012 @@ -1542,7 +1542,7 @@ if (USB_ENDPOINT_DIRECTION_IN(m_EndpointDescriptor->bEndpointAddress)) { - DPRINT1("m_TotalBytesTransferred %x, %x - %x\n", + DPRINT("m_TotalBytesTransferred %x, %x - %x\n", m_TotalBytesTransferred, m_TransferDescriptors[DescriptorCount]->TotalBytesToTransfer, m_TransferDescriptors[DescriptorCount]->Token.Bits.TotalBytesToTransfer);
12 years, 11 months
1
0
0
0
[akhaldi] 55224: [NTOSKRNL] * Remove some redundant definitions now that they've been added in r55220. Fixes build.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Jan 26 20:06:08 2012 New Revision: 55224 URL:
http://svn.reactos.org/svn/reactos?rev=55224&view=rev
Log: [NTOSKRNL] * Remove some redundant definitions now that they've been added in r55220. Fixes build. Modified: trunk/reactos/ntoskrnl/fstub/fstubex.c Modified: trunk/reactos/ntoskrnl/fstub/fstubex.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fstub/fstubex.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/fstub/fstubex.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fstub/fstubex.c [iso-8859-1] Thu Jan 26 20:06:08 2012 @@ -52,27 +52,6 @@ ULONGLONG Attributes; // 48 WCHAR Name[0x24]; // 56 } EFI_PARTITION_ENTRY, *PEFI_PARTITION_ENTRY; - -typedef struct _CREATE_DISK_MBR -{ - ULONG Signature; -} CREATE_DISK_MBR, *PCREATE_DISK_MBR; - -typedef struct _CREATE_DISK_GPT -{ - GUID DiskId; - ULONG MaxPartitionCount; -} CREATE_DISK_GPT, *PCREATE_DISK_GPT; - -typedef struct _CREATE_DISK -{ - PARTITION_STYLE PartitionStyle; - union - { - CREATE_DISK_MBR Mbr; - CREATE_DISK_GPT Gpt; - }; -} CREATE_DISK, *PCREATE_DISK; typedef struct _PARTITION_TABLE_ENTRY {
12 years, 11 months
1
0
0
0
[cgutman] 55223: [USBSTOR] - Set the correct transfer direction value in the CBW - Fixes the infamous system hang that occurred when writing to a USB drive
by cgutman@svn.reactos.org
Author: cgutman Date: Thu Jan 26 20:02:42 2012 New Revision: 55223 URL:
http://svn.reactos.org/svn/reactos?rev=55223&view=rev
Log: [USBSTOR] - Set the correct transfer direction value in the CBW - Fixes the infamous system hang that occurred when writing to a USB drive Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c [iso-8859-1] Thu Jan 26 20:02:42 2012 @@ -31,7 +31,7 @@ Control->Signature = CBW_SIGNATURE; Control->Tag = Tag; Control->DataTransferLength = DataTransferLength; - Control->Flags = 0x80; + Control->Flags = (CommandBlock[0] != SCSIOP_WRITE) ? 0x80 : 0x00; Control->LUN = (LUN & MAX_LUN); Control->CommandBlockLength = CommandBlockLength;
12 years, 11 months
1
0
0
0
[cgutman] 55222: [USBSTOR] - USBD_SHORT_TRANSFER_OK is only a valid flag if USBD_TRANSFER_DIRECTION_IN is also set
by cgutman@svn.reactos.org
Author: cgutman Date: Thu Jan 26 19:30:46 2012 New Revision: 55222 URL:
http://svn.reactos.org/svn/reactos?rev=55222&view=rev
Log: [USBSTOR] - USBD_SHORT_TRANSFER_OK is only a valid flag if USBD_TRANSFER_DIRECTION_IN is also set Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c [iso-8859-1] Thu Jan 26 19:30:46 2012 @@ -447,7 +447,7 @@ NULL, Context->TransferBufferMDL, Context->TransferDataLength, - ((Code == SCSIOP_WRITE) ? USBD_TRANSFER_DIRECTION_OUT : USBD_TRANSFER_DIRECTION_IN) | USBD_SHORT_TRANSFER_OK, + ((Code == SCSIOP_WRITE) ? USBD_TRANSFER_DIRECTION_OUT : (USBD_TRANSFER_DIRECTION_IN | USBD_SHORT_TRANSFER_OK)), NULL); // @@ -551,7 +551,7 @@ Context->cbw, NULL, sizeof(CBW), - USBD_TRANSFER_DIRECTION_OUT | USBD_SHORT_TRANSFER_OK, + USBD_TRANSFER_DIRECTION_OUT, NULL); //
12 years, 11 months
1
0
0
0
[akhaldi] 55221: [DDK] * portcls.h: Don't check for non existing NTDDI_WIN2003.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Jan 26 19:18:19 2012 New Revision: 55221 URL:
http://svn.reactos.org/svn/reactos?rev=55221&view=rev
Log: [DDK] * portcls.h: Don't check for non existing NTDDI_WIN2003. Modified: trunk/reactos/include/ddk/portcls.h Modified: trunk/reactos/include/ddk/portcls.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/portcls.h?rev=…
============================================================================== --- trunk/reactos/include/ddk/portcls.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/portcls.h [iso-8859-1] Thu Jan 26 19:18:19 2012 @@ -614,7 +614,7 @@ typedef IServiceGroup *PSERVICEGROUP; -#if (NTDDI_VERSION >= NTDDI_WIN2003) +#if (NTDDI_VERSION >= NTDDI_WS03) /* =============================================================== IUnregisterSubdevice Interface */
12 years, 11 months
1
0
0
0
[ion] 55220: [SDK]: Some fixes/additions to this header.
by ion@svn.reactos.org
Author: ion Date: Thu Jan 26 19:15:07 2012 New Revision: 55220 URL:
http://svn.reactos.org/svn/reactos?rev=55220&view=rev
Log: [SDK]: Some fixes/additions to this header. Modified: trunk/reactos/include/psdk/ntdddisk.h Modified: trunk/reactos/include/psdk/ntdddisk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntdddisk.h?re…
============================================================================== --- trunk/reactos/include/psdk/ntdddisk.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ntdddisk.h [iso-8859-1] Thu Jan 26 19:15:07 2012 @@ -150,6 +150,19 @@ #define IOCTL_DISK_SET_CACHE_INFORMATION \ CTL_CODE(IOCTL_DISK_BASE, 0x0036, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) + +// +// NTDDI_WIN2003 was an older define used in the early beta builds, which +// Microsoft forgot to fix in a few headers. +// NTDDI_WS03 is the correct term. +// +#if (NTDDI_VERSION < NTDDI_WS03) +#define IOCTL_DISK_GET_WRITE_CACHE_STATE \ + CTL_CODE(IOCTL_DISK_BASE, 0x0037, METHOD_BUFFERED, FILE_READ_ACCESS) +#else +#define OBSOLETE_DISK_GET_WRITE_CACHE_STATE \ + CTL_CODE(IOCTL_DISK_BASE, 0x0037, METHOD_BUFFERED, FILE_READ_ACCESS) +#endif #define IOCTL_DISK_SET_DRIVE_LAYOUT \ CTL_CODE(IOCTL_DISK_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) @@ -460,10 +473,35 @@ } DUMMYUNIONNAME; } SET_PARTITION_INFORMATION_EX, *PSET_PARTITION_INFORMATION_EX; +typedef struct _CREATE_DISK_GPT { + GUID DiskId; + ULONG MaxPartitionCount; +} CREATE_DISK_GPT, *PCREATE_DISK_GPT; + +typedef struct _CREATE_DISK_MBR { + ULONG Signature; +} CREATE_DISK_MBR, *PCREATE_DISK_MBR; + +typedef struct _CREATE_DISK { + PARTITION_STYLE PartitionStyle; + _ANONYMOUS_UNION union { + CREATE_DISK_MBR Mbr; + CREATE_DISK_GPT Gpt; + } DUMMYUNIONNAME; +} CREATE_DISK, *PCREATE_DISK; + typedef struct _VERIFY_INFORMATION { LARGE_INTEGER StartingOffset; ULONG Length; } VERIFY_INFORMATION, *PVERIFY_INFORMATION; + +#if (OSVER(NTDDI_VERSION) == NTDDI_WINXP) +typedef enum _DISK_WRITE_CACHE_STATE { + DiskWriteCacheNormal, + DiskWriteCacheForceDisable, + DiskWriteCacheDisableNotSupported +} DISK_WRITE_CACHE_STATE, *PDISK_WRITE_CACHE_STATE; +#endif typedef enum { EqualPriority,
12 years, 11 months
1
0
0
0
[janderwald] 55219: [USBCCGP] - Implement querying device relations for FDO - Implement creating device objects for each discovered function - Invalidate device relations after the child pdo have b...
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Jan 26 19:11:44 2012 New Revision: 55219 URL:
http://svn.reactos.org/svn/reactos?rev=55219&view=rev
Log: [USBCCGP] - Implement querying device relations for FDO - Implement creating device objects for each discovered function - Invalidate device relations after the child pdo have been created - Implement PDO device relations, most of query id, query device capabilities, start device - USBCCGP should now initialize and create the child pdos - Next is device control handling - WIP, untested Modified: branches/usb-bringup-trunk/drivers/usb/usbccgp/fdo.c branches/usb-bringup-trunk/drivers/usb/usbccgp/pdo.c branches/usb-bringup-trunk/drivers/usb/usbccgp/usbccgp.h Modified: branches/usb-bringup-trunk/drivers/usb/usbccgp/fdo.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbccgp/fdo.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbccgp/fdo.c [iso-8859-1] Thu Jan 26 19:11:44 2012 @@ -127,9 +127,181 @@ PDEVICE_OBJECT DeviceObject, PIRP Irp) { - UNIMPLEMENTED - ASSERT(FALSE); - return STATUS_NOT_IMPLEMENTED; + ULONG DeviceCount = 0; + ULONG Index; + PDEVICE_RELATIONS DeviceRelations; + PIO_STACK_LOCATION IoStack; + PFDO_DEVICE_EXTENSION FDODeviceExtension; + + // + // get device extension + // + FDODeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + + + // + // get current irp stack location + // + IoStack = IoGetCurrentIrpStackLocation(Irp); + + // + // check if relation type is BusRelations + // + if (IoStack->Parameters.QueryDeviceRelations.Type != BusRelations) + { + // + // FDO always only handles bus relations + // + return USBCCGP_SyncForwardIrp(FDODeviceExtension->NextDeviceObject, Irp); + } + + // + // go through array and count device objects + // + for(Index = 0; Index < FDODeviceExtension->FunctionDescriptorCount; Index++) + { + if (FDODeviceExtension->ChildPDO[Index]) + { + // + // child pdo + // + DeviceCount++; + } + } + + // + // allocate device relations + // + DeviceRelations = (PDEVICE_RELATIONS)AllocateItem(PagedPool, sizeof(DEVICE_RELATIONS) + (DeviceCount > 1 ? (DeviceCount-1) * sizeof(PDEVICE_OBJECT) : 0)); + if (!DeviceRelations) + { + // + // no memory + // + return STATUS_INSUFFICIENT_RESOURCES; + } + + // + // add device objects + // + for(Index = 0; Index < FDODeviceExtension->FunctionDescriptorCount; Index++) + { + if (FDODeviceExtension->ChildPDO[Index]) + { + // + // store child pdo + // + DeviceRelations->Objects[DeviceRelations->Count] = FDODeviceExtension->ChildPDO[Index]; + + // + // add reference + // + ObReferenceObject(FDODeviceExtension->ChildPDO[Index]); + + // + // increment count + // + DeviceRelations->Count++; + } + } + + // + // store result + // + Irp->IoStatus.Information = (ULONG_PTR)DeviceRelations; + + // + // request completed successfully + // + return STATUS_SUCCESS; +} + +NTSTATUS +FDO_CreateChildPdo( + IN PDEVICE_OBJECT DeviceObject) +{ + NTSTATUS Status; + PDEVICE_OBJECT PDODeviceObject; + PPDO_DEVICE_EXTENSION PDODeviceExtension; + PFDO_DEVICE_EXTENSION FDODeviceExtension; + ULONG Index; + + // + // get device extension + // + FDODeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + ASSERT(FDODeviceExtension->Common.IsFDO); + + // + // lets create array for the child PDO + // + FDODeviceExtension->ChildPDO = AllocateItem(NonPagedPool, sizeof(PDEVICE_OBJECT) * FDODeviceExtension->FunctionDescriptorCount); + if (!FDODeviceExtension->ChildPDO) + { + // + // no memory + // + return STATUS_INSUFFICIENT_RESOURCES; + } + + // + // create pdo for each function + // + for(Index = 0; Index < FDODeviceExtension->FunctionDescriptorCount; Index++) + { + // + // create the PDO + // + Status = IoCreateDevice(FDODeviceExtension->DriverObject, sizeof(PDO_DEVICE_EXTENSION), NULL, FILE_DEVICE_USB, FILE_AUTOGENERATED_DEVICE_NAME, FALSE, &PDODeviceObject); + if (!NT_SUCCESS(Status)) + { + // + // failed to create device object + // + DPRINT1("IoCreateDevice failed with %x\n", Status); + return Status; + } + + // + // store in array + // + FDODeviceExtension->ChildPDO[Index] = PDODeviceObject; + + // + // get device extension + // + PDODeviceExtension = (PPDO_DEVICE_EXTENSION)PDODeviceObject->DeviceExtension; + RtlZeroMemory(PDODeviceExtension, sizeof(PDO_DEVICE_EXTENSION)); + + // + // init device extension + // + PDODeviceExtension->Common.IsFDO = FALSE; + PDODeviceExtension->FunctionDescriptor = &FDODeviceExtension->FunctionDescriptor[Index]; + PDODeviceExtension->NextDeviceObject = DeviceObject; + PDODeviceExtension->FunctionIndex = Index; + RtlCopyMemory(&PDODeviceExtension->Capabilities, &FDODeviceExtension->Capabilities, sizeof(DEVICE_CAPABILITIES)); + + // + // patch the stack size + // + PDODeviceObject->StackSize = DeviceObject->StackSize + 1; + + // + // set device flags + // + PDODeviceObject->Flags |= DO_DIRECT_IO | DO_MAP_IO_BUFFER; + + // + // device is initialized + // + PDODeviceObject->Flags &= ~DO_DEVICE_INITIALIZING; + } + + // + // done + // + return STATUS_SUCCESS; } NTSTATUS @@ -206,12 +378,29 @@ ASSERT(FDODeviceExtension->FunctionDescriptor); // - // FIXME:create PDO for each function - // - ASSERT(FALSE); + // now create the pdo + // + Status = FDO_CreateChildPdo(DeviceObject); + if (!NT_SUCCESS(Status)) + { + // + // failed + // + DPRINT1("FDO_CreateChildPdo failed with %x\n", Status); + return Status; + } + + // + // inform pnp manager of new device objects + // + IoInvalidateDeviceRelations(FDODeviceExtension->PhysicalDeviceObject, BusRelations); + + // + // done + // + DPRINT1("[USBCCGP] FDO initialized successfully\n"); return Status; } - NTSTATUS FDO_HandlePnp( @@ -234,11 +423,17 @@ { case IRP_MN_START_DEVICE: { + // + // start the device + // Status = FDO_StartDevice(DeviceObject, Irp); break; } case IRP_MN_QUERY_DEVICE_RELATIONS: { + // + // handle device relations + // Status = FDO_DeviceRelations(DeviceObject, Irp); break; } @@ -301,6 +496,7 @@ IoCompleteRequest(Irp, IO_NO_INCREMENT); return Status; } -} - - + +} + + Modified: branches/usb-bringup-trunk/drivers/usb/usbccgp/pdo.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbccgp/pdo.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbccgp/pdo.c [iso-8859-1] Thu Jan 26 19:11:44 2012 @@ -11,6 +11,306 @@ #include "usbccgp.h" +NTSTATUS +USBCCGP_PdoHandleQueryDeviceText( + IN PDEVICE_OBJECT DeviceObject, + IN OUT PIRP Irp) +{ + LPWSTR Buffer; + PPDO_DEVICE_EXTENSION PDODeviceExtension; + + // + // get device extension + // + PDODeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + + // + // is there a device description + // + if (PDODeviceExtension->FunctionDescriptor->FunctionDescription.Length) + { + // + // allocate buffer + // + Buffer = AllocateItem(NonPagedPool, PDODeviceExtension->FunctionDescriptor->FunctionDescription.Length + sizeof(WCHAR)); + if (!Buffer) + { + // + // no memory + // + return STATUS_INSUFFICIENT_RESOURCES; + } + + // + // copy buffer + // + Irp->IoStatus.Information = (ULONG_PTR)Buffer; + RtlCopyMemory(Buffer, PDODeviceExtension->FunctionDescriptor->FunctionDescription.Buffer, PDODeviceExtension->FunctionDescriptor->FunctionDescription.Length); + return STATUS_SUCCESS; + } + + // + // FIXME use GenericCompositeUSBDeviceString + // + UNIMPLEMENTED + return Irp->IoStatus.Status; +} + +NTSTATUS +USBCCGP_PdoHandleDeviceRelations( + IN PDEVICE_OBJECT DeviceObject, + IN OUT PIRP Irp) +{ + PDEVICE_RELATIONS DeviceRelations; + PIO_STACK_LOCATION IoStack; + + DPRINT1("USBCCGP_PdoHandleDeviceRelations\n"); + + // + // get current irp stack location + // + IoStack = IoGetCurrentIrpStackLocation(Irp); + + // + // check if relation type is BusRelations + // + if (IoStack->Parameters.QueryDeviceRelations.Type != TargetDeviceRelation) + { + // + // PDO handles only target device relation + // + return Irp->IoStatus.Status; + } + + // + // allocate device relations + // + DeviceRelations = (PDEVICE_RELATIONS)AllocateItem(PagedPool, sizeof(DEVICE_RELATIONS)); + if (!DeviceRelations) + { + // + // no memory + // + return STATUS_INSUFFICIENT_RESOURCES; + } + + // + // initialize device relations + // + DeviceRelations->Count = 1; + DeviceRelations->Objects[0] = DeviceObject; + ObReferenceObject(DeviceObject); + + // + // store result + // + Irp->IoStatus.Information = (ULONG_PTR)DeviceRelations; + + // + // completed successfully + // + return STATUS_SUCCESS; +} + +NTSTATUS +USBCCGP_PdoHandleQueryId( + PDEVICE_OBJECT DeviceObject, + PIRP Irp) +{ + PIO_STACK_LOCATION IoStack; + PUNICODE_STRING DeviceString = NULL; + UNICODE_STRING TempString; + PPDO_DEVICE_EXTENSION PDODeviceExtension; + NTSTATUS Status; + LPWSTR Buffer; + + // + // get current irp stack location + // + IoStack = IoGetCurrentIrpStackLocation(Irp); + + // + // get device extension + // + PDODeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + + + if (IoStack->Parameters.QueryId.IdType == BusQueryDeviceID) + { + // + // handle query device id + // + Status = USBCCGP_SyncForwardIrp(PDODeviceExtension->NextDeviceObject, Irp); + + // + // FIXME append interface id + // + ASSERT(FALSE); + return Status; + } + else if (IoStack->Parameters.QueryId.IdType == BusQueryHardwareIDs) + { + // + // handle instance id + // + DeviceString = &PDODeviceExtension->FunctionDescriptor->HardwareId; + } + else if (IoStack->Parameters.QueryId.IdType == BusQueryInstanceID) + { + // + // handle instance id + // + RtlInitUnicodeString(&TempString, L"0000"); + DeviceString = &TempString; + } + else if (IoStack->Parameters.QueryId.IdType == BusQueryCompatibleIDs) + { + // + // handle instance id + // + DeviceString = &PDODeviceExtension->FunctionDescriptor->CompatibleId; + } + + // + // sanity check + // + ASSERT(DeviceString != NULL); + + // + // allocate buffer + // + Buffer = AllocateItem(NonPagedPool, DeviceString->Length + sizeof(WCHAR)); + if (!Buffer) + { + // + // no memory + // + return STATUS_INSUFFICIENT_RESOURCES; + } + + // + // copy buffer + // + Irp->IoStatus.Information = (ULONG_PTR)Buffer; + RtlCopyMemory(Buffer, DeviceString->Buffer, DeviceString->Length); + return STATUS_SUCCESS; +} + +NTSTATUS +PDO_HandlePnp( + PDEVICE_OBJECT DeviceObject, + PIRP Irp) +{ + PIO_STACK_LOCATION IoStack; + PPDO_DEVICE_EXTENSION PDODeviceExtension; + NTSTATUS Status; + + // + // get current stack location + // + IoStack = IoGetCurrentIrpStackLocation(Irp); + + // + // get device extension + // + PDODeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + + // + // sanity check + // + ASSERT(PDODeviceExtension->Common.IsFDO == FALSE); + + switch(IoStack->MinorFunction) + { + case IRP_MN_QUERY_DEVICE_RELATIONS: + { + // + // handle device relations + // + Status = USBCCGP_PdoHandleDeviceRelations(DeviceObject, Irp); + break; + } + case IRP_MN_QUERY_DEVICE_TEXT: + { + // + // handle query device text + // + Status = USBCCGP_PdoHandleQueryDeviceText(DeviceObject, Irp); + break; + } + case IRP_MN_QUERY_ID: + { + // + // handle request + // + Status = USBCCGP_PdoHandleQueryId(DeviceObject, Irp); + break; + } + case IRP_MN_REMOVE_DEVICE: + { + DPRINT1("IRP_MN_REMOVE_DEVICE\n"); + + /* Complete the IRP */ + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + + /* Delete the device object */ + IoDeleteDevice(DeviceObject); + + return STATUS_SUCCESS; + } + case IRP_MN_QUERY_CAPABILITIES: + { + // + // copy device capabilities + // + RtlCopyMemory(IoStack->Parameters.DeviceCapabilities.Capabilities, &PDODeviceExtension->Capabilities, sizeof(DEVICE_CAPABILITIES)); + + /* Complete the IRP */ + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_SUCCESS; + } + case IRP_MN_START_DEVICE: + { + // + // no-op for PDO + // + DPRINT1("[USBCCGP] PDO IRP_MN_START\n"); + Status = STATUS_SUCCESS; + break; + } + default: + { + // + // do nothing + // + Status = Irp->IoStatus.Status; + } + } + + // + // complete request + // + if (Status != STATUS_PENDING) + { + // + // store result + // + Irp->IoStatus.Status = Status; + + // + // complete request + // + IoCompleteRequest(Irp, IO_NO_INCREMENT); + } + + // + // done processing + // + return Status; + +} NTSTATUS @@ -18,7 +318,22 @@ PDEVICE_OBJECT DeviceObject, PIRP Irp) { - UNIMPLEMENTED - ASSERT(FALSE); - return STATUS_NOT_IMPLEMENTED; -} + PIO_STACK_LOCATION IoStack; + NTSTATUS Status; + + /* get stack location */ + IoStack = IoGetCurrentIrpStackLocation(Irp); + + switch(IoStack->MajorFunction) + { + case IRP_MJ_PNP: + return PDO_HandlePnp(DeviceObject, Irp); + default: + DPRINT1("PDO_Dispatch Function %x not implemented\n", IoStack->MajorFunction); + ASSERT(FALSE); + Status = Irp->IoStatus.Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; + } + +} Modified: branches/usb-bringup-trunk/drivers/usb/usbccgp/usbccgp.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbccgp/usbccgp.h [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbccgp/usbccgp.h [iso-8859-1] Thu Jan 26 19:11:44 2012 @@ -38,6 +38,7 @@ USBC_DEVICE_CONFIGURATION_INTERFACE_V1 BusInterface; // bus custom enumeration interface PUSBC_FUNCTION_DESCRIPTOR FunctionDescriptor; // usb function descriptor ULONG FunctionDescriptorCount; // number of function descriptor + PDEVICE_OBJECT * ChildPDO; // child pdos }FDO_DEVICE_EXTENSION, *PFDO_DEVICE_EXTENSION; #define USBCCPG_TAG 'cbsu' @@ -45,7 +46,10 @@ typedef struct { COMMON_DEVICE_EXTENSION Common; // shared with FDO - + PUSBC_FUNCTION_DESCRIPTOR FunctionDescriptor; // function descriptor + PDEVICE_OBJECT NextDeviceObject; // next device object + DEVICE_CAPABILITIES Capabilities; // device capabilities + ULONG FunctionIndex; // function index }PDO_DEVICE_EXTENSION, *PPDO_DEVICE_EXTENSION; /* descriptor.c */
12 years, 11 months
1
0
0
0
[akhaldi] 55218: [CMAKE] * Define _inline to __inline when cross compiling. Dedicated to Alex.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Jan 26 19:09:02 2012 New Revision: 55218 URL:
http://svn.reactos.org/svn/reactos?rev=55218&view=rev
Log: [CMAKE] * Define _inline to __inline when cross compiling. Dedicated to Alex. Modified: trunk/reactos/cmake/gcc.cmake Modified: trunk/reactos/cmake/gcc.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/gcc.cmake?rev=55218&…
============================================================================== --- trunk/reactos/cmake/gcc.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Thu Jan 26 19:09:02 2012 @@ -73,6 +73,8 @@ add_definitions(-U_UNICODE -UUNICODE) add_definitions(-D__MSVCRT__) # DUBIOUS endif() + +add_definitions(-D_inline=__inline) # alternative arch name if(ARCH MATCHES amd64)
12 years, 11 months
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
56
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
Results per page:
10
25
50
100
200