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
2025
January
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
April 2009
----- 2025 -----
January 2025
----- 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
25 participants
476 discussions
Start a n
N
ew thread
[janderwald] 40715: - Remove test code which should never have come into trunk
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Apr 28 02:43:08 2009 New Revision: 40715 URL:
http://svn.reactos.org/svn/reactos?rev=40715&view=rev
Log: - Remove test code which should never have come into trunk Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.c Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.c [iso-8859-1] Tue Apr 28 02:43:08 2009 @@ -124,8 +124,6 @@ ULONG BufferSize; PUCHAR Buffer; NTSTATUS Status; - PUSHORT Data; - ULONG Index; BufferLength = Position - This->CommonBufferOffset; while(BufferLength) @@ -146,10 +144,6 @@ } else { - Data = (PUSHORT)Buffer; - for(Index = 0; Index < BytesToCopy / sizeof(USHORT); Index++) - Data[Index] = Data[Index] + 32768; - This->DmaChannel->lpVtbl->CopyTo(This->DmaChannel, (PUCHAR)This->CommonBuffer + This->CommonBufferOffset, Buffer, @@ -174,8 +168,7 @@ ULONG BufferSize; PUCHAR Buffer; NTSTATUS Status; - PUSHORT Data; - ULONG Index; + BufferLength = This->CommonBufferSize - This->CommonBufferOffset; while(BufferLength) @@ -195,10 +188,6 @@ } else { - Data = (PUSHORT)Buffer; - for(Index = 0; Index < BytesToCopy / sizeof(USHORT); Index++) - Data[Index] = Data[Index] + 32768; - This->DmaChannel->lpVtbl->CopyTo(This->DmaChannel, (PUCHAR)This->CommonBuffer + This->CommonBufferOffset, Buffer,
15 years, 9 months
1
0
0
0
[janderwald] 40714: - Fix IPortWavePci_Notify routine - Add debug traces
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Apr 27 22:57:41 2009 New Revision: 40714 URL:
http://svn.reactos.org/svn/reactos?rev=40714&view=rev
Log: - Fix IPortWavePci_Notify routine - Add debug traces Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.c trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepcistream.c Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.c [iso-8859-1] Mon Apr 27 22:57:41 2009 @@ -578,15 +578,12 @@ { IPortWavePciImpl * This = (IPortWavePciImpl*)iface; - - DPRINT1("IPortWavePci_fnNotify entered %p, ServiceGroup %p\n", This, ServiceGroup); - - //if (This->ServiceGroup) - //{ - // ServiceGroup->lpVtbl->RequestService (ServiceGroup); - //} - - // KeInsertQueueDpc(&This->Dpc, NULL, NULL); + DPRINT("IPortWavePci_fnNotify entered %p, ServiceGroup %p\n", This, ServiceGroup); + + if (ServiceGroup) + { + ServiceGroup->lpVtbl->RequestService (ServiceGroup); + } } static IPortWavePciVtbl vt_IPortWavePci = Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepcistream.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepcistream.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepcistream.c [iso-8859-1] Mon Apr 27 22:57:41 2009 @@ -86,10 +86,12 @@ OUT PULONG Flags) { IPortWavePciStreamImpl * This = (IPortWavePciStreamImpl*)iface; + NTSTATUS Status; + ASSERT_IRQL(DISPATCH_LEVEL); + Status = This->Queue->lpVtbl->GetMappingWithTag(This->Queue, Tag, PhysicalAddress, VirtualAddress, ByteCount, Flags); - ASSERT_IRQL(DISPATCH_LEVEL); - - return This->Queue->lpVtbl->GetMappingWithTag(This->Queue, Tag, PhysicalAddress, VirtualAddress, ByteCount, Flags); + DPRINT("IPortWavePciStream_fnGetMapping Tag %p Status %x\n", Tag, Status); + return Status; } static @@ -102,7 +104,7 @@ IPortWavePciStreamImpl * This = (IPortWavePciStreamImpl*)iface; ASSERT_IRQL(DISPATCH_LEVEL); - + DPRINT("IPortWavePciStream_fnReleaseMapping Tag %p\n", Tag); This->Queue->lpVtbl->ReleaseMappingWithTag(This->Queue, Tag); return STATUS_SUCCESS; } @@ -115,6 +117,7 @@ { UNIMPLEMENTED ASSERT_IRQL(DISPATCH_LEVEL); + DPRINT("IPortWavePciStream_fnTerminatePacket\n"); return STATUS_SUCCESS; }
15 years, 9 months
1
0
0
0
[dgoette] 393: * get overview to show something again * start to implement a new entry detail view
by dgoette@svn.reactos.org
Author: dgoette Date: Mon Apr 27 20:44:12 2009 New Revision: 393 URL:
http://svn.reactos.org/svn/reactos?rev=393&view=rev
Log: * get overview to show something again * start to implement a new entry detail view Added:
branches/danny-web/www/www.reactos.org/compat/lib/view/Entry_Details.class.…
- copied, changed from r385,
branches/danny-web/www/www.reactos.org/compat/lib/view/Item_Details.class.p…
branches/danny-web/www/www.reactos.org/compat/lib/view/HTML_Home.class.php
- copied, changed from r378,
branches/danny-web/www/www.reactos.org/compat/lib/view/Home.class.php
Removed:
branches/danny-web/www/www.reactos.org/compat/lib/HTML_Item.class.php
branches/danny-web/www/www.reactos.org/compat/lib/view/Home.class.php
branches/danny-web/www/www.reactos.org/compat/lib/view/Item_Details.class.p…
Modified:
branches/danny-web/www/www.reactos.org/compat/css/style.css
branches/danny-web/www/www.reactos.org/compat/index.php
[This mail would be too long, it was shortened to contain the URLs only.] Modified:
branches/danny-web/www/www.reactos.org/compat/css/style.css
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
Modified:
branches/danny-web/www/www.reactos.org/compat/index.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
Removed:
branches/danny-web/www/www.reactos.org/compat/lib/HTML_Item.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
Copied:
branches/danny-web/www/www.reactos.org/compat/lib/view/Entry_Details.class.…
(from r385,
branches/danny-web/www/www.reactos.org/compat/lib/view/Item_Details.class.p…
) URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
Copied:
branches/danny-web/www/www.reactos.org/compat/lib/view/HTML_Home.class.php
(from r378,
branches/danny-web/www/www.reactos.org/compat/lib/view/Home.class.php
) URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
Removed:
branches/danny-web/www/www.reactos.org/compat/lib/view/Home.class.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
Removed:
branches/danny-web/www/www.reactos.org/compat/lib/view/Item_Details.class.p…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/c…
15 years, 9 months
1
0
0
0
[fireball] 40713: - Change storage of ReactOS-specific virtual address space from VadRoot to Vm EPROCESS structure member. Change containing "structure" from MM_AVL_TABLE to MMSUPPORT respectively .
by fireball@svn.reactos.org
Author: fireball Date: Mon Apr 27 14:12:57 2009 New Revision: 40713 URL:
http://svn.reactos.org/svn/reactos?rev=40713&view=rev
Log: - Change storage of ReactOS-specific virtual address space from VadRoot to Vm EPROCESS structure member. Change containing "structure" from MM_AVL_TABLE to MMSUPPORT respectively . Modified: trunk/reactos/ntoskrnl/include/internal/mm.h trunk/reactos/ntoskrnl/mm/anonmem.c trunk/reactos/ntoskrnl/mm/i386/page.c trunk/reactos/ntoskrnl/mm/marea.c trunk/reactos/ntoskrnl/mm/mdlsup.c trunk/reactos/ntoskrnl/mm/mm.c trunk/reactos/ntoskrnl/mm/procsup.c trunk/reactos/ntoskrnl/mm/region.c trunk/reactos/ntoskrnl/mm/rmap.c trunk/reactos/ntoskrnl/mm/section.c trunk/reactos/ntoskrnl/mm/virtual.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] Mon Apr 27 14:12:57 2009 @@ -388,7 +388,7 @@ typedef VOID (*PMM_ALTER_REGION_FUNC)( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PVOID BaseAddress, ULONG Length, ULONG OldType, @@ -412,7 +412,7 @@ NTSTATUS NTAPI MmCreateMemoryArea( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, ULONG Type, PVOID *BaseAddress, ULONG_PTR Length, @@ -426,21 +426,21 @@ PMEMORY_AREA NTAPI MmLocateMemoryAreaByAddress( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PVOID Address ); ULONG_PTR NTAPI MmFindGapAtAddress( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PVOID Address ); NTSTATUS NTAPI MmFreeMemoryArea( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PMEMORY_AREA MemoryArea, PMM_FREE_PAGE_FUNC FreePage, PVOID FreePageContext @@ -449,7 +449,7 @@ NTSTATUS NTAPI MmFreeMemoryAreaByPtr( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PVOID BaseAddress, PMM_FREE_PAGE_FUNC FreePage, PVOID FreePageContext @@ -457,12 +457,12 @@ VOID NTAPI -MmDumpMemoryAreas(PMM_AVL_TABLE AddressSpace); +MmDumpMemoryAreas(PMMSUPPORT AddressSpace); PMEMORY_AREA NTAPI MmLocateMemoryAreaByRegion( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PVOID Address, ULONG_PTR Length ); @@ -470,7 +470,7 @@ PVOID NTAPI MmFindGap( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, ULONG_PTR Length, ULONG_PTR Granularity, BOOLEAN TopDown @@ -480,7 +480,7 @@ NTAPI MmReleaseMemoryAreaIfDecommitted( struct _EPROCESS *Process, - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PVOID BaseAddress ); @@ -746,7 +746,7 @@ NTSTATUS NTAPI MmNotPresentFaultVirtualMemory( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, MEMORY_AREA* MemoryArea, PVOID Address, BOOLEAN Locked @@ -755,7 +755,7 @@ NTSTATUS NTAPI MmPageOutVirtualMemory( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PMEMORY_AREA MemoryArea, PVOID Address, struct _MM_PAGEOP* PageOp @@ -780,7 +780,7 @@ NTSTATUS NTAPI MmProtectAnonMem( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PMEMORY_AREA MemoryArea, PVOID BaseAddress, ULONG Length, @@ -791,7 +791,7 @@ NTSTATUS NTAPI MmWritePageVirtualMemory( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PMEMORY_AREA MArea, PVOID Address, PMM_PAGEOP PageOp @@ -1390,7 +1390,7 @@ NTSTATUS NTAPI MmAlterRegion( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PVOID BaseAddress, PLIST_ENTRY RegionListHead, PVOID StartAddress, @@ -1458,7 +1458,7 @@ NTSTATUS NTAPI MmProtectSectionView( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PMEMORY_AREA MemoryArea, PVOID BaseAddress, ULONG Length, @@ -1469,7 +1469,7 @@ NTSTATUS NTAPI MmWritePageSectionView( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PMEMORY_AREA MArea, PVOID Address, PMM_PAGEOP PageOp @@ -1482,7 +1482,7 @@ NTSTATUS NTAPI MmNotPresentFaultSectionView( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, MEMORY_AREA* MemoryArea, PVOID Address, BOOLEAN Locked @@ -1491,7 +1491,7 @@ NTSTATUS NTAPI MmPageOutSectionView( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PMEMORY_AREA MemoryArea, PVOID Address, struct _MM_PAGEOP *PageOp @@ -1504,7 +1504,7 @@ NTSTATUS NTAPI MmAccessFaultSectionView( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, MEMORY_AREA* MemoryArea, PVOID Address, BOOLEAN Locked @@ -1608,39 +1608,39 @@ IN PKTHREAD Thread ); -extern PMM_AVL_TABLE MmKernelAddressSpace; +extern PMMSUPPORT MmKernelAddressSpace; FORCEINLINE VOID -MmLockAddressSpace(PMM_AVL_TABLE AddressSpace) -{ - KeAcquireGuardedMutex(&CONTAINING_RECORD(AddressSpace, EPROCESS, VadRoot)->AddressCreationLock); +MmLockAddressSpace(PMMSUPPORT AddressSpace) +{ + KeAcquireGuardedMutex(&CONTAINING_RECORD(AddressSpace, EPROCESS, Vm)->AddressCreationLock); } FORCEINLINE VOID -MmUnlockAddressSpace(PMM_AVL_TABLE AddressSpace) -{ - KeReleaseGuardedMutex(&CONTAINING_RECORD(AddressSpace, EPROCESS, VadRoot)->AddressCreationLock); +MmUnlockAddressSpace(PMMSUPPORT AddressSpace) +{ + KeReleaseGuardedMutex(&CONTAINING_RECORD(AddressSpace, EPROCESS, Vm)->AddressCreationLock); } FORCEINLINE PEPROCESS -MmGetAddressSpaceOwner(IN PMM_AVL_TABLE AddressSpace) +MmGetAddressSpaceOwner(IN PMMSUPPORT AddressSpace) { if (AddressSpace == MmKernelAddressSpace) return NULL; - return CONTAINING_RECORD(AddressSpace, EPROCESS, VadRoot); + return CONTAINING_RECORD(AddressSpace, EPROCESS, Vm); } FORCEINLINE -PMM_AVL_TABLE +PMMSUPPORT MmGetCurrentAddressSpace(VOID) { - return &((PEPROCESS)KeGetCurrentThread()->ApcState.Process)->VadRoot; + return &((PEPROCESS)KeGetCurrentThread()->ApcState.Process)->Vm; } FORCEINLINE -PMM_AVL_TABLE +PMMSUPPORT MmGetKernelAddressSpace(VOID) { return MmKernelAddressSpace; Modified: trunk/reactos/ntoskrnl/mm/anonmem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/anonmem.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/mm/anonmem.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/anonmem.c [iso-8859-1] Mon Apr 27 14:12:57 2009 @@ -47,7 +47,7 @@ NTSTATUS NTAPI -MmWritePageVirtualMemory(PMM_AVL_TABLE AddressSpace, +MmWritePageVirtualMemory(PMMSUPPORT AddressSpace, PMEMORY_AREA MemoryArea, PVOID Address, PMM_PAGEOP PageOp) @@ -130,7 +130,7 @@ NTSTATUS NTAPI -MmPageOutVirtualMemory(PMM_AVL_TABLE AddressSpace, +MmPageOutVirtualMemory(PMMSUPPORT AddressSpace, PMEMORY_AREA MemoryArea, PVOID Address, PMM_PAGEOP PageOp) @@ -239,7 +239,7 @@ NTSTATUS NTAPI -MmNotPresentFaultVirtualMemory(PMM_AVL_TABLE AddressSpace, +MmNotPresentFaultVirtualMemory(PMMSUPPORT AddressSpace, MEMORY_AREA* MemoryArea, PVOID Address, BOOLEAN Locked) @@ -446,7 +446,7 @@ } static VOID -MmModifyAttributes(PMM_AVL_TABLE AddressSpace, +MmModifyAttributes(PMMSUPPORT AddressSpace, PVOID BaseAddress, ULONG RegionSize, ULONG OldType, @@ -562,7 +562,7 @@ ULONG_PTR MemoryAreaLength; ULONG Type; NTSTATUS Status; - PMM_AVL_TABLE AddressSpace; + PMMSUPPORT AddressSpace; PVOID BaseAddress; ULONG RegionSize; PVOID PBaseAddress; @@ -713,7 +713,7 @@ Type = (AllocationType & MEM_COMMIT) ? MEM_COMMIT : MEM_RESERVE; DPRINT("Type %x\n", Type); - AddressSpace = &Process->VadRoot; + AddressSpace = &Process->Vm; MmLockAddressSpace(AddressSpace); if (PBaseAddress != 0) @@ -888,7 +888,7 @@ if (PageOp != NULL) { NTSTATUS Status; - MmUnlockAddressSpace(&Process->VadRoot); + MmUnlockAddressSpace(&Process->Vm); Status = KeWaitForSingleObject(&PageOp->CompletionEvent, 0, KernelMode, @@ -899,7 +899,7 @@ DPRINT1("Failed to wait for page op\n"); KeBugCheck(MEMORY_MANAGEMENT); } - MmLockAddressSpace(&Process->VadRoot); + MmLockAddressSpace(&Process->Vm); MmReleasePageOp(PageOp); } } @@ -915,7 +915,7 @@ } /* Actually free the memory area. */ - MmFreeMemoryArea(&Process->VadRoot, + MmFreeMemoryArea(&Process->Vm, MemoryArea, MmFreeVirtualMemoryPage, (PVOID)Process); @@ -945,7 +945,7 @@ MEMORY_AREA* MemoryArea; NTSTATUS Status; PEPROCESS Process; - PMM_AVL_TABLE AddressSpace; + PMMSUPPORT AddressSpace; PVOID BaseAddress; ULONG RegionSize; @@ -974,7 +974,7 @@ return(Status); } - AddressSpace = &Process->VadRoot; + AddressSpace = &Process->Vm; MmLockAddressSpace(AddressSpace); MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, BaseAddress); @@ -1024,7 +1024,7 @@ NTSTATUS NTAPI -MmProtectAnonMem(PMM_AVL_TABLE AddressSpace, +MmProtectAnonMem(PMMSUPPORT AddressSpace, PMEMORY_AREA MemoryArea, PVOID BaseAddress, ULONG Length, 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] Mon Apr 27 14:12:57 2009 @@ -172,7 +172,7 @@ /* Initialize the Addresss Space */ KeInitializeGuardedMutex(&Process->AddressCreationLock); - Process->VadRoot.BalancedRoot.u1.Parent = NULL; + Process->Vm.WorkingSetExpansionLinks.Flink = NULL; /* The process now has an address space */ Process->HasAddressSpace = TRUE; Modified: trunk/reactos/ntoskrnl/mm/marea.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/marea.c?rev=40…
============================================================================== --- trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] Mon Apr 27 14:12:57 2009 @@ -160,18 +160,18 @@ } #ifdef VALIDATE_MEMORY_AREAS -static VOID MmVerifyMemoryAreas(PMM_AVL_TABLE AddressSpace) +static VOID MmVerifyMemoryAreas(PMMSUPPORT AddressSpace) { PMEMORY_AREA Node; ASSERT(AddressSpace != NULL); /* Special case for empty tree. */ - if (AddressSpace->BalancedRoot.u1.Parent == NULL) + if (AddressSpace->WorkingSetExpansionLinks.Flink == NULL) return; /* Traverse the tree from left to right. */ - for (Node = MmIterateFirstNode(AddressSpace->BalancedRoot.u1.Parent); + for (Node = MmIterateFirstNode(AddressSpace->WorkingSetExpansionLinks.Flink); Node != NULL; Node = MmIterateNextNode(Node)) { @@ -186,18 +186,18 @@ #endif VOID NTAPI -MmDumpMemoryAreas(PMM_AVL_TABLE AddressSpace) +MmDumpMemoryAreas(PMMSUPPORT AddressSpace) { PMEMORY_AREA Node; DbgPrint("MmDumpMemoryAreas()\n"); /* Special case for empty tree. */ - if (AddressSpace->BalancedRoot.u1.Parent == NULL) + if (AddressSpace->WorkingSetExpansionLinks.Flink == NULL) return; /* Traverse the tree from left to right. */ - for (Node = MmIterateFirstNode((PMEMORY_AREA)AddressSpace->BalancedRoot.u1.Parent); + for (Node = MmIterateFirstNode((PMEMORY_AREA)AddressSpace->WorkingSetExpansionLinks.Flink); Node != NULL; Node = MmIterateNextNode(Node)) { @@ -211,10 +211,10 @@ PMEMORY_AREA NTAPI MmLocateMemoryAreaByAddress( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PVOID Address) { - PMEMORY_AREA Node = (PMEMORY_AREA)AddressSpace->BalancedRoot.u1.Parent; + PMEMORY_AREA Node = (PMEMORY_AREA)AddressSpace->WorkingSetExpansionLinks.Flink; DPRINT("MmLocateMemoryAreaByAddress(AddressSpace %p, Address %p)\n", AddressSpace, Address); @@ -241,7 +241,7 @@ PMEMORY_AREA NTAPI MmLocateMemoryAreaByRegion( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PVOID Address, ULONG_PTR Length) { @@ -251,11 +251,11 @@ MmVerifyMemoryAreas(AddressSpace); /* Special case for empty tree. */ - if (AddressSpace->BalancedRoot.u1.Parent == NULL) + if (AddressSpace->WorkingSetExpansionLinks.Flink == NULL) return NULL; /* Traverse the tree from left to right. */ - for (Node = MmIterateFirstNode((PMEMORY_AREA)AddressSpace->BalancedRoot.u1.Parent); + for (Node = MmIterateFirstNode((PMEMORY_AREA)AddressSpace->WorkingSetExpansionLinks.Flink); Node != NULL; Node = MmIterateNextNode(Node)) { @@ -302,11 +302,11 @@ static VOID MmCompressHelper( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, ULONG Count) { PMEMORY_AREA Root = NULL; - PMEMORY_AREA Red = (PMEMORY_AREA)AddressSpace->BalancedRoot.u1.Parent; + PMEMORY_AREA Red = (PMEMORY_AREA)AddressSpace->WorkingSetExpansionLinks.Flink; PMEMORY_AREA Black = Red->LeftChild; while (Count--) @@ -314,7 +314,7 @@ if (Root) Root->LeftChild = Black; else - AddressSpace->BalancedRoot.u1.Parent = (PVOID)Black; + AddressSpace->WorkingSetExpansionLinks.Flink = (PVOID)Black; Black->Parent = Root; Red->LeftChild = Black->RightChild; if (Black->RightChild) @@ -341,7 +341,7 @@ static VOID MmRebalanceTree( - PMM_AVL_TABLE AddressSpace) + PMMSUPPORT AddressSpace) { PMEMORY_AREA PreviousNode; PMEMORY_AREA CurrentNode; @@ -354,7 +354,7 @@ /* Transform the tree into Vine. */ PreviousNode = NULL; - CurrentNode = (PMEMORY_AREA)AddressSpace->BalancedRoot.u1.Parent; + CurrentNode = (PMEMORY_AREA)AddressSpace->WorkingSetExpansionLinks.Flink; while (CurrentNode != NULL) { if (CurrentNode->RightChild == NULL) @@ -379,7 +379,7 @@ if (PreviousNode != NULL) PreviousNode->LeftChild = TempNode; else - AddressSpace->BalancedRoot.u1.Parent = (PVOID)TempNode; + AddressSpace->WorkingSetExpansionLinks.Flink = (PVOID)TempNode; TempNode->Parent = PreviousNode; } } @@ -410,7 +410,7 @@ static VOID MmInsertMemoryArea( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PMEMORY_AREA marea) { PMEMORY_AREA Node; @@ -419,14 +419,14 @@ MmVerifyMemoryAreas(AddressSpace); - if (AddressSpace->BalancedRoot.u1.Parent == NULL) - { - AddressSpace->BalancedRoot.u1.Parent = (PVOID)marea; + if (AddressSpace->WorkingSetExpansionLinks.Flink == NULL) + { + AddressSpace->WorkingSetExpansionLinks.Flink = (PVOID)marea; marea->LeftChild = marea->RightChild = marea->Parent = NULL; return; } - Node = (PMEMORY_AREA)AddressSpace->BalancedRoot.u1.Parent; + Node = (PMEMORY_AREA)AddressSpace->WorkingSetExpansionLinks.Flink; do { DPRINT("marea->EndingAddress: %p Node->StartingAddress: %p\n", @@ -466,7 +466,7 @@ static PVOID MmFindGapBottomUp( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, ULONG_PTR Length, ULONG_PTR Granularity) { @@ -486,7 +486,7 @@ AlignedAddress = MM_ROUND_UP(LowestAddress, Granularity); /* Special case for empty tree. */ - if (AddressSpace->BalancedRoot.u1.Parent == NULL) + if (AddressSpace->WorkingSetExpansionLinks.Flink == NULL) { if ((ULONG_PTR)HighestAddress - (ULONG_PTR)AlignedAddress >= Length) { @@ -498,7 +498,7 @@ } /* Go to the node with lowest address in the tree. */ - FirstNode = Node = MmIterateFirstNode((PMEMORY_AREA)AddressSpace->BalancedRoot.u1.Parent); + FirstNode = Node = MmIterateFirstNode((PMEMORY_AREA)AddressSpace->WorkingSetExpansionLinks.Flink); /* Traverse the tree from left to right. */ PreviousNode = Node; @@ -544,7 +544,7 @@ static PVOID MmFindGapTopDown( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, ULONG_PTR Length, ULONG_PTR Granularity) { @@ -567,7 +567,7 @@ return NULL; /* Special case for empty tree. */ - if (AddressSpace->BalancedRoot.u1.Parent == NULL) + if (AddressSpace->WorkingSetExpansionLinks.Flink == NULL) { if (AlignedAddress >= LowestAddress) { @@ -579,7 +579,7 @@ } /* Go to the node with highest address in the tree. */ - Node = MmIterateLastNode((PMEMORY_AREA)AddressSpace->BalancedRoot.u1.Parent); + Node = MmIterateLastNode((PMEMORY_AREA)AddressSpace->WorkingSetExpansionLinks.Flink); /* Check if there is enough space after the last memory area. */ if (Node->EndingAddress <= AlignedAddress) @@ -630,7 +630,7 @@ PVOID NTAPI MmFindGap( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, ULONG_PTR Length, ULONG_PTR Granularity, BOOLEAN TopDown) @@ -643,10 +643,10 @@ ULONG_PTR NTAPI MmFindGapAtAddress( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PVOID Address) { - PMEMORY_AREA Node = (PMEMORY_AREA)AddressSpace->BalancedRoot.u1.Parent; + PMEMORY_AREA Node = (PMEMORY_AREA)AddressSpace->WorkingSetExpansionLinks.Flink; PMEMORY_AREA RightNeighbour = NULL; PVOID LowestAddress = MmGetAddressSpaceOwner(AddressSpace) ? MM_LOWEST_USER_ADDRESS : MmSystemRangeStart; PVOID HighestAddress = MmGetAddressSpaceOwner(AddressSpace) ? @@ -725,7 +725,7 @@ NTSTATUS NTAPI MmFreeMemoryArea( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PMEMORY_AREA MemoryArea, PMM_FREE_PAGE_FUNC FreePage, PVOID FreePageContext) @@ -789,7 +789,7 @@ ParentReplace = &MemoryArea->Parent->RightChild; } else - ParentReplace = (PMEMORY_AREA*)&AddressSpace->BalancedRoot.u1.Parent; + ParentReplace = (PMEMORY_AREA*)&AddressSpace->WorkingSetExpansionLinks.Flink; if (MemoryArea->RightChild == NULL) { @@ -867,7 +867,7 @@ NTSTATUS NTAPI MmFreeMemoryAreaByPtr( - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PVOID BaseAddress, PMM_FREE_PAGE_FUNC FreePage, PVOID FreePageContext) @@ -918,7 +918,7 @@ */ NTSTATUS NTAPI -MmCreateMemoryArea(PMM_AVL_TABLE AddressSpace, +MmCreateMemoryArea(PMMSUPPORT AddressSpace, ULONG Type, PVOID *BaseAddress, ULONG_PTR Length, @@ -1042,7 +1042,7 @@ VOID NTAPI MmReleaseMemoryAreaIfDecommitted(PEPROCESS Process, - PMM_AVL_TABLE AddressSpace, + PMMSUPPORT AddressSpace, PVOID BaseAddress) { PMEMORY_AREA MemoryArea; Modified: trunk/reactos/ntoskrnl/mm/mdlsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mdlsup.c?rev=4…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mdlsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/mdlsup.c [iso-8859-1] Mon Apr 27 14:12:57 2009 @@ -366,12 +366,12 @@ ASSERT(Mdl->Process == PsGetCurrentProcess()); /* Find the memory area */ - MemoryArea = MmLocateMemoryAreaByAddress(&Mdl->Process->VadRoot, + MemoryArea = MmLocateMemoryAreaByAddress(&Mdl->Process->Vm, BaseAddress); ASSERT(MemoryArea); /* Free it */ - MmFreeMemoryArea(&Mdl->Process->VadRoot, + MmFreeMemoryArea(&Mdl->Process->Vm, MemoryArea, NULL, NULL); @@ -395,7 +395,7 @@ PFN_TYPE Page; PEPROCESS CurrentProcess; PETHREAD Thread; - PMM_AVL_TABLE AddressSpace; + PMMSUPPORT AddressSpace; KIRQL OldIrql = KeGetCurrentIrql(); DPRINT("Probing MDL: %p\n", Mdl); @@ -480,7 +480,7 @@ Mdl->Process = CurrentProcess; /* Use the process lock */ - AddressSpace = &CurrentProcess->VadRoot; + AddressSpace = &CurrentProcess->Vm; } @@ -758,8 +758,8 @@ CurrentProcess = PsGetCurrentProcess(); - MmLockAddressSpace(&CurrentProcess->VadRoot); - Status = MmCreateMemoryArea(&CurrentProcess->VadRoot, + MmLockAddressSpace(&CurrentProcess->Vm); + Status = MmCreateMemoryArea(&CurrentProcess->Vm, MEMORY_AREA_MDL_MAPPING, &Base, PageCount * PAGE_SIZE, @@ -768,7 +768,7 @@ (Base != NULL), 0, BoundaryAddressMultiple); - MmUnlockAddressSpace(&CurrentProcess->VadRoot); + MmUnlockAddressSpace(&CurrentProcess->Vm); if (!NT_SUCCESS(Status)) { if (Mdl->MdlFlags & MDL_MAPPING_CAN_FAIL) Modified: trunk/reactos/ntoskrnl/mm/mm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mm.c?rev=40713…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mm.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/mm.c [iso-8859-1] Mon Apr 27 14:12:57 2009 @@ -22,7 +22,7 @@ MM_STATS MmStats; -PMM_AVL_TABLE MmKernelAddressSpace; +PMMSUPPORT MmKernelAddressSpace; /* FUNCTIONS ****************************************************************/ @@ -81,7 +81,7 @@ */ { MEMORY_AREA* MemoryArea; - PMM_AVL_TABLE AddressSpace; + PMMSUPPORT AddressSpace; if (VirtualAddress >= MmSystemRangeStart) { @@ -89,7 +89,7 @@ } else { - AddressSpace = &PsGetCurrentProcess()->VadRoot; + AddressSpace = &PsGetCurrentProcess()->Vm; } MmLockAddressSpace(AddressSpace); @@ -111,7 +111,7 @@ ULONG_PTR Address, BOOLEAN FromMdl) { - PMM_AVL_TABLE AddressSpace; + PMMSUPPORT AddressSpace; MEMORY_AREA* MemoryArea; NTSTATUS Status; BOOLEAN Locked = FromMdl; @@ -146,7 +146,7 @@ } else { - AddressSpace = &PsGetCurrentProcess()->VadRoot; + AddressSpace = &PsGetCurrentProcess()->Vm; } if (!FromMdl) @@ -211,7 +211,7 @@ ULONG_PTR Address, BOOLEAN FromMdl) { - PMM_AVL_TABLE AddressSpace; + PMMSUPPORT AddressSpace; MEMORY_AREA* MemoryArea; NTSTATUS Status; BOOLEAN Locked = FromMdl; @@ -242,7 +242,7 @@ } else { - AddressSpace = &PsGetCurrentProcess()->VadRoot; + AddressSpace = &PsGetCurrentProcess()->Vm; } if (!FromMdl) Modified: trunk/reactos/ntoskrnl/mm/procsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/procsup.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/mm/procsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/procsup.c [iso-8859-1] Mon Apr 27 14:12:57 2009 @@ -80,7 +80,7 @@ PVOID BaseAddress) { NTSTATUS Status; - PMM_AVL_TABLE ProcessAddressSpace = &Process->VadRoot; + PMMSUPPORT ProcessAddressSpace = &Process->Vm; PMEMORY_AREA MemoryArea; PHYSICAL_ADDRESS BoundaryAddressMultiple; PVOID AllocatedBase = BaseAddress; @@ -163,7 +163,7 @@ MmDeleteTeb(PEPROCESS Process, PTEB Teb) { - PMM_AVL_TABLE ProcessAddressSpace = &Process->VadRoot; + PMMSUPPORT ProcessAddressSpace = &Process->Vm; PMEMORY_AREA MemoryArea; /* Lock the Address Space */ @@ -486,7 +486,7 @@ PMEMORY_AREA MemoryArea; PHYSICAL_ADDRESS BoundaryAddressMultiple; NTSTATUS Status; - PMM_AVL_TABLE ProcessAddressSpace = &Process->VadRoot; + PMMSUPPORT ProcessAddressSpace = &Process->Vm; BoundaryAddressMultiple.QuadPart = 0; /* Create the shared data page */ @@ -512,7 +512,7 @@ IN POBJECT_NAME_INFORMATION *AuditName OPTIONAL) { NTSTATUS Status; - PMM_AVL_TABLE ProcessAddressSpace = &Process->VadRoot; + PMMSUPPORT ProcessAddressSpace = &Process->Vm; PVOID BaseAddress; PMEMORY_AREA MemoryArea; PHYSICAL_ADDRESS BoundaryAddressMultiple; @@ -523,7 +523,7 @@ /* Initialize the Addresss Space lock */ KeInitializeGuardedMutex(&Process->AddressCreationLock); - Process->VadRoot.BalancedRoot.u1.Parent = NULL; + Process->Vm.WorkingSetExpansionLinks.Flink = NULL; /* Acquire the Lock */ MmLockAddressSpace(ProcessAddressSpace); @@ -684,17 +684,17 @@ DPRINT("MmDeleteProcessAddressSpace(Process %x (%s))\n", Process, Process->ImageFileName); - MmLockAddressSpace(&Process->VadRoot); - - while ((MemoryArea = (PMEMORY_AREA)Process->VadRoot.BalancedRoot.u1.Parent) != NULL) + MmLockAddressSpace(&Process->Vm); + + while ((MemoryArea = (PMEMORY_AREA)Process->Vm.WorkingSetExpansionLinks.Flink) != NULL) { switch (MemoryArea->Type) { case MEMORY_AREA_SECTION_VIEW: Address = (PVOID)MemoryArea->StartingAddress; - MmUnlockAddressSpace(&Process->VadRoot); + MmUnlockAddressSpace(&Process->Vm); MmUnmapViewOfSection(Process, Address); - MmLockAddressSpace(&Process->VadRoot); + MmLockAddressSpace(&Process->Vm); break; case MEMORY_AREA_VIRTUAL_MEMORY: @@ -704,7 +704,7 @@ case MEMORY_AREA_SHARED_DATA: case MEMORY_AREA_NO_ACCESS: - MmFreeMemoryArea(&Process->VadRoot, + MmFreeMemoryArea(&Process->Vm, MemoryArea, NULL, NULL); @@ -721,7 +721,7 @@ Mmi386ReleaseMmInfo(Process); - MmUnlockAddressSpace(&Process->VadRoot); + MmUnlockAddressSpace(&Process->Vm); DPRINT("Finished MmReleaseMmInfo()\n"); return(STATUS_SUCCESS); Modified: trunk/reactos/ntoskrnl/mm/region.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/region.c?rev=4…
============================================================================== --- trunk/reactos/ntoskrnl/mm/region.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/region.c [iso-8859-1] Mon Apr 27 14:12:57 2009 @@ -33,7 +33,7 @@ static PMM_REGION MmSplitRegion(PMM_REGION InitialRegion, PVOID InitialBaseAddress, PVOID StartAddress, ULONG Length, ULONG NewType, - ULONG NewProtect, PMM_AVL_TABLE AddressSpace, + ULONG NewProtect, PMMSUPPORT AddressSpace, PMM_ALTER_REGION_FUNC AlterFunc) { PMM_REGION NewRegion1; @@ -105,7 +105,7 @@ NTSTATUS NTAPI -MmAlterRegion(PMM_AVL_TABLE AddressSpace, PVOID BaseAddress, +MmAlterRegion(PMMSUPPORT AddressSpace, PVOID BaseAddress, PLIST_ENTRY RegionListHead, PVOID StartAddress, ULONG Length, ULONG NewType, ULONG NewProtect, PMM_ALTER_REGION_FUNC AlterFunc) { Modified: trunk/reactos/ntoskrnl/mm/rmap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/rmap.c?rev=407…
============================================================================== --- trunk/reactos/ntoskrnl/mm/rmap.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/rmap.c [iso-8859-1] Mon Apr 27 14:12:57 2009 @@ -58,7 +58,7 @@ { PMM_RMAP_ENTRY entry; PMEMORY_AREA MemoryArea; - PMM_AVL_TABLE AddressSpace; + PMMSUPPORT AddressSpace; ULONG Type; PVOID Address; PEPROCESS Process; @@ -91,7 +91,7 @@ { return Status; } - AddressSpace = &Process->VadRoot; + AddressSpace = &Process->Vm; } else { @@ -192,7 +192,7 @@ { PMM_RMAP_ENTRY entry; PMEMORY_AREA MemoryArea; - PMM_AVL_TABLE AddressSpace; + PMMSUPPORT AddressSpace; ULONG Type; PVOID Address; PEPROCESS Process; @@ -222,7 +222,7 @@ { return Status; } - AddressSpace = &Process->VadRoot; + AddressSpace = &Process->Vm; } else { Modified: trunk/reactos/ntoskrnl/mm/section.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Mon Apr 27 14:12:57 2009 @@ -152,7 +152,7 @@ { PROS_SECTION_OBJECT Section; PMEMORY_AREA MemoryArea; - PMM_AVL_TABLE AddressSpace; + PMMSUPPORT AddressSpace; POBJECT_NAME_INFORMATION ModuleNameInformation; NTSTATUS Status = STATUS_ADDRESS_NOT_ASSOCIATED; @@ -163,7 +163,7 @@ } else { - AddressSpace = &PsGetCurrentProcess()->VadRoot; + AddressSpace = &PsGetCurrentProcess()->Vm; } /* Lock address space */ @@ -753,7 +753,7 @@ NTSTATUS NTAPI -MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace, +MmNotPresentFaultSectionView(PMMSUPPORT AddressSpace, MEMORY_AREA* MemoryArea, PVOID Address, BOOLEAN Locked) @@ -1273,7 +1273,7 @@ NTSTATUS NTAPI -MmAccessFaultSectionView(PMM_AVL_TABLE AddressSpace, +MmAccessFaultSectionView(PMMSUPPORT AddressSpace, MEMORY_AREA* MemoryArea, PVOID Address, BOOLEAN Locked) @@ -1458,7 +1458,7 @@ PageOutContext = (MM_SECTION_PAGEOUT_CONTEXT*)Context; if (Process) { - MmLockAddressSpace(&Process->VadRoot); + MmLockAddressSpace(&Process->Vm); } MmDeleteVirtualMapping(Process, @@ -1482,7 +1482,7 @@ } if (Process) { - MmUnlockAddressSpace(&Process->VadRoot); + MmUnlockAddressSpace(&Process->Vm); } if (PageOutContext->Private) @@ -1495,7 +1495,7 @@ NTSTATUS NTAPI -MmPageOutSectionView(PMM_AVL_TABLE AddressSpace, +MmPageOutSectionView(PMMSUPPORT AddressSpace, MEMORY_AREA* MemoryArea, PVOID Address, PMM_PAGEOP PageOp) @@ -1849,7 +1849,7 @@ NTSTATUS NTAPI -MmWritePageSectionView(PMM_AVL_TABLE AddressSpace, +MmWritePageSectionView(PMMSUPPORT AddressSpace, PMEMORY_AREA MemoryArea, PVOID Address, PMM_PAGEOP PageOp) @@ -1996,7 +1996,7 @@ } static VOID -MmAlterViewAttributes(PMM_AVL_TABLE AddressSpace, +MmAlterViewAttributes(PMMSUPPORT AddressSpace, PVOID BaseAddress, ULONG RegionSize, ULONG OldType, @@ -2061,7 +2061,7 @@ NTSTATUS NTAPI -MmProtectSectionView(PMM_AVL_TABLE AddressSpace, +MmProtectSectionView(PMMSUPPORT AddressSpace, PMEMORY_AREA MemoryArea, PVOID BaseAddress, ULONG Length, @@ -3611,7 +3611,7 @@ } static NTSTATUS -MmMapViewOfSegment(PMM_AVL_TABLE AddressSpace, +MmMapViewOfSegment(PMMSUPPORT AddressSpace, PROS_SECTION_OBJECT Section, PMM_SECTION_SEGMENT Segment, PVOID* BaseAddress, @@ -3722,7 +3722,7 @@ PROS_SECTION_OBJECT Section; PEPROCESS Process; KPROCESSOR_MODE PreviousMode; - PMM_AVL_TABLE AddressSpace; + PMMSUPPORT AddressSpace; NTSTATUS Status = STATUS_SUCCESS; ULONG tmpProtect; @@ -3801,7 +3801,7 @@ return(Status); } - AddressSpace = &Process->VadRoot; + AddressSpace = &Process->Vm; Status = ObReferenceObjectByHandle(SectionHandle, SECTION_MAP_READ, @@ -3883,10 +3883,10 @@ NTSTATUS Status; PROS_SECTION_OBJECT Section; PMM_SECTION_SEGMENT Segment; - PMM_AVL_TABLE AddressSpace; + PMMSUPPORT AddressSpace; PEPROCESS Process; - AddressSpace = (PMM_AVL_TABLE)Context; + AddressSpace = (PMMSUPPORT)Context; Process = MmGetAddressSpaceOwner(AddressSpace); Address = (PVOID)PAGE_ROUND_DOWN(Address); @@ -3980,7 +3980,7 @@ } static NTSTATUS -MmUnmapViewOfSegment(PMM_AVL_TABLE AddressSpace, +MmUnmapViewOfSegment(PMMSUPPORT AddressSpace, PVOID BaseAddress) { NTSTATUS Status; @@ -4040,7 +4040,7 @@ { NTSTATUS Status; PMEMORY_AREA MemoryArea; - PMM_AVL_TABLE AddressSpace; + PMMSUPPORT AddressSpace; PROS_SECTION_OBJECT Section; PMM_PAGEOP PageOp; ULONG_PTR Offset; @@ -4051,7 +4051,7 @@ ASSERT(Process); - AddressSpace = &Process->VadRoot; + AddressSpace = &Process->Vm; MmLockAddressSpace(AddressSpace); MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, @@ -4441,7 +4441,7 @@ PVOID Result; MEMORY_AREA* marea; NTSTATUS Status; - PMM_AVL_TABLE AddressSpace; + PMMSUPPORT AddressSpace; PHYSICAL_ADDRESS BoundaryAddressMultiple; DPRINT("MmAllocateSection(Length %x)\n",Length); @@ -4537,7 +4537,7 @@ IN ULONG Protect) { PROS_SECTION_OBJECT Section; - PMM_AVL_TABLE AddressSpace; + PMMSUPPORT AddressSpace; ULONG ViewOffset; NTSTATUS Status = STATUS_SUCCESS; @@ -4550,7 +4550,7 @@ Section = (PROS_SECTION_OBJECT)SectionObject; - AddressSpace = &Process->VadRoot; + AddressSpace = &Process->Vm; AllocationType |= (Section->AllocationAttributes & SEC_NO_CHANGE); @@ -4815,7 +4815,7 @@ IN OUT PULONG ViewSize) { PROS_SECTION_OBJECT Section; - PMM_AVL_TABLE AddressSpace; + PMMSUPPORT AddressSpace; NTSTATUS Status; DPRINT("MmMapViewInSystemSpace() called\n"); @@ -4875,7 +4875,7 @@ NTSTATUS NTAPI MmUnmapViewInSystemSpace (IN PVOID MappedBase) { - PMM_AVL_TABLE AddressSpace; + PMMSUPPORT AddressSpace; NTSTATUS Status; DPRINT("MmUnmapViewInSystemSpace() called\n"); Modified: trunk/reactos/ntoskrnl/mm/virtual.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/virtual.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/mm/virtual.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/virtual.c [iso-8859-1] Mon Apr 27 14:12:57 2009 @@ -421,7 +421,7 @@ NTSTATUS Status; PEPROCESS Process; MEMORY_AREA* MemoryArea; - PMM_AVL_TABLE AddressSpace; + PMMSUPPORT AddressSpace; Status = ObReferenceObjectByHandle(ProcessHandle, PROCESS_QUERY_INFORMATION, @@ -436,7 +436,7 @@ return(Status); } - AddressSpace = &Process->VadRoot; + AddressSpace = &Process->Vm; MmLockAddressSpace(AddressSpace); MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, Address); @@ -576,7 +576,7 @@ OUT PULONG OldAccessProtection OPTIONAL) { PMEMORY_AREA MemoryArea; - PMM_AVL_TABLE AddressSpace; + PMMSUPPORT AddressSpace; ULONG OldAccessProtection_; NTSTATUS Status; @@ -585,7 +585,7 @@ PAGE_ROUND_DOWN(*BaseAddress); *BaseAddress = (PVOID)PAGE_ROUND_DOWN(*BaseAddress); - AddressSpace = &Process->VadRoot; + AddressSpace = &Process->Vm; MmLockAddressSpace(AddressSpace); MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, *BaseAddress);
15 years, 9 months
1
0
0
0
[janderwald] 40712: - Experimental IPortPinWavePci implementation - Refactor IPortWavePciStream initilization - Add test code for IDrmAudioStream
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Apr 27 04:33:49 2009 New Revision: 40712 URL:
http://svn.reactos.org/svn/reactos?rev=40712&view=rev
Log: - Experimental IPortPinWavePci implementation - Refactor IPortWavePciStream initilization - Add test code for IDrmAudioStream Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavepci.c trunk/reactos/drivers/wdm/audio/backpln/portcls/guids.c trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.c trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.c trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavepci.c trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.c trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepcistream.c trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavepci.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavepci.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavepci.c [iso-8859-1] Mon Apr 27 04:33:49 2009 @@ -131,7 +131,7 @@ } /* initialize the pin */ - Status = Pin->lpVtbl->Init(Pin, This->Port, iface, ConnectDetails, &This->Descriptor->Factory.KsPinDescriptor[ConnectDetails->PinId], GetDeviceObjectFromWaveCyclic(This->Port)); + Status = Pin->lpVtbl->Init(Pin, This->Port, iface, ConnectDetails, &This->Descriptor->Factory.KsPinDescriptor[ConnectDetails->PinId], GetDeviceObjectFromPortWavePci(This->Port)); if (!NT_SUCCESS(Status)) { Pin->lpVtbl->Release(Pin); Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/guids.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/guids.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/guids.c [iso-8859-1] Mon Apr 27 04:33:49 2009 @@ -51,7 +51,7 @@ const GUID IID_IPortEvents = {0xA80F29C4L, 0x5498, 0x11D2, {0x95, 0xD9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}}; const GUID KSNAME_PIN = {0x146F1A80, 0x4791, 0x11D0, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}}; - +const GUID IID_IDrmAudioStream = {0x1915c967, 0x3299, 0x48cb, {0xa3, 0xe4, 0x69, 0xfd, 0x1d, 0x1b, 0x30, 0x6e}}; //FIXME // Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h [iso-8859-1] Mon Apr 27 04:33:49 2009 @@ -230,6 +230,7 @@ STDMETHOD_(VOID, ReleaseMappingWithTag)(THIS_ IN PVOID Tag); + STDMETHOD_(BOOL, HasLastMappingFailed)(THIS); }; Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.c [iso-8859-1] Mon Apr 27 04:33:49 2009 @@ -43,6 +43,8 @@ BOOL OutOfMapping; ULONG MaxFrameSize; + BOOL LastMappingFailed; + }IIrpQueueImpl; VOID @@ -189,11 +191,14 @@ IIrpQueueImpl * This = (IIrpQueueImpl*)iface; if (!This->FirstMap) + { + This->LastMappingFailed = TRUE; return STATUS_UNSUCCESSFUL; + } *Buffer = (PUCHAR)This->FirstMap->Header->Data + This->CurrentOffset; *BufferSize = This->FirstMap->Header->DataUsed - This->CurrentOffset; - + This->LastMappingFailed = FALSE; return STATUS_SUCCESS; } @@ -365,13 +370,17 @@ KeReleaseSpinLock(&This->Lock, OldIrql); if (!Result) + { + This->LastMappingFailed = TRUE; return STATUS_UNSUCCESSFUL; + } Result->Tag = Tag; *PhysicalAddress = MmGetPhysicalAddress(Result->Header->Data); *VirtualAddress = Result->Header->Data; *ByteCount = Result->Header->DataUsed; This->LastTag = Tag; + This->LastMappingFailed = FALSE; return STATUS_SUCCESS; } @@ -421,6 +430,15 @@ KeReleaseSpinLock(&This->Lock, OldIrql); } +BOOL +NTAPI +IIrpQueue_fnHasLastMappingFailed( + IN IIrpQueue *iface) +{ + IIrpQueueImpl * This = (IIrpQueueImpl*)iface; + return This->LastMappingFailed; +} + static IIrpQueueVtbl vt_IIrpQueue = { IIrpQueue_fnQueryInterface, @@ -436,7 +454,9 @@ IIrpQueue_fnCancelBuffers, IIrpQueue_fnUpdateFormat, IIrpQueue_fnGetMappingWithTag, - IIrpQueue_fnReleaseMappingWithTag + IIrpQueue_fnReleaseMappingWithTag, + IIrpQueue_fnHasLastMappingFailed + }; Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.c [iso-8859-1] Mon Apr 27 04:33:49 2009 @@ -37,6 +37,10 @@ ULONG FrameSize; BOOL Capture; + ULONG TotalPackets; + ULONG PreCompleted; + ULONG PostCompleted; + }IPortPinWaveCyclicImpl; @@ -120,6 +124,8 @@ ULONG BufferSize; PUCHAR Buffer; NTSTATUS Status; + PUSHORT Data; + ULONG Index; BufferLength = Position - This->CommonBufferOffset; while(BufferLength) @@ -140,6 +146,10 @@ } else { + Data = (PUSHORT)Buffer; + for(Index = 0; Index < BytesToCopy / sizeof(USHORT); Index++) + Data[Index] = Data[Index] + 32768; + This->DmaChannel->lpVtbl->CopyTo(This->DmaChannel, (PUCHAR)This->CommonBuffer + This->CommonBufferOffset, Buffer, @@ -164,6 +174,8 @@ ULONG BufferSize; PUCHAR Buffer; NTSTATUS Status; + PUSHORT Data; + ULONG Index; BufferLength = This->CommonBufferSize - This->CommonBufferOffset; while(BufferLength) @@ -183,6 +195,10 @@ } else { + Data = (PUSHORT)Buffer; + for(Index = 0; Index < BytesToCopy / sizeof(USHORT); Index++) + Data[Index] = Data[Index] + 32768; + This->DmaChannel->lpVtbl->CopyTo(This->DmaChannel, (PUCHAR)This->CommonBuffer + This->CommonBufferOffset, Buffer, @@ -228,7 +244,7 @@ { /* reset start stream */ This->IrpQueue->lpVtbl->CancelBuffers(This->IrpQueue); //FIX function name - DPRINT1("Stopping %u Irql %u\n", This, This->IrpQueue->lpVtbl->NumMappings(This->IrpQueue), KeGetCurrentIrql()); + DPRINT1("Stopping PreCompleted %u PostCompleted %u\n", This->PreCompleted, This->PostCompleted); } } } @@ -908,7 +924,9 @@ PIRP Irp; IPortPinWaveCyclicImpl * This = (IPortPinWaveCyclicImpl*)iface; - DPRINT("IPortPinWaveCyclic_fnFastWrite entered\n"); + InterlockedIncrement((PLONG)&This->TotalPackets); + + DPRINT("IPortPinWaveCyclic_fnFastWrite entered Total %u Pre %u Post %u\n", This->TotalPackets, This->PreCompleted, This->PostCompleted); Packet = (PCONTEXT_WRITE)Buffer; @@ -917,6 +935,7 @@ { Irp = Packet->Irp; StatusBlock->Status = STATUS_PENDING; + InterlockedIncrement((PLONG)&This->PostCompleted); } else { @@ -925,6 +944,7 @@ Packet->Irp->IoStatus.Information = Packet->Header.FrameExtent; IoCompleteRequest(Packet->Irp, IO_SOUND_INCREMENT); StatusBlock->Status = STATUS_SUCCESS; + InterlockedIncrement((PLONG)&This->PreCompleted); } Status = This->IrpQueue->lpVtbl->AddMapping(This->IrpQueue, Buffer, Length, Irp); @@ -958,6 +978,7 @@ PKSDATAFORMAT DataFormat; PDEVICE_OBJECT DeviceObject; BOOL Capture; + //IDrmAudioStream * DrmAudio = NULL; IPortPinWaveCyclicImpl * This = (IPortPinWaveCyclicImpl*)iface; @@ -1016,6 +1037,21 @@ This->Format, &This->DmaChannel, &This->ServiceGroup); +#if 0 + Status = This->Stream->lpVtbl->QueryInterface(This->Stream, &IID_IDrmAudioStream, (PVOID*)&DrmAudio); + if (NT_SUCCESS(Status)) + { + DRMRIGHTS DrmRights; + DPRINT1("Got IID_IDrmAudioStream interface %p\n", DrmAudio); + + DrmRights.CopyProtect = FALSE; + DrmRights.Reserved = 0; + DrmRights.DigitalOutputDisable = FALSE; + + Status = DrmAudio->lpVtbl->SetContentId(DrmAudio, 1, &DrmRights); + DPRINT("Status %x\n", Status); + } +#endif DPRINT("IPortPinWaveCyclic_fnInit Status %x\n", Status); @@ -1033,7 +1069,7 @@ This->ServiceGroup->lpVtbl->SupportDelayedService(This->ServiceGroup); //This->DmaChannel->lpVtbl->AddRef(This->DmaChannel); - + This->Stream->lpVtbl->SetState(This->Stream, KSSTATE_STOP); This->State = KSSTATE_STOP; This->CommonBufferOffset = 0; This->CommonBufferSize = This->DmaChannel->lpVtbl->AllocatedBufferSize(This->DmaChannel); Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavepci.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavepci.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavepci.c [iso-8859-1] Mon Apr 27 04:33:49 2009 @@ -1,16 +1,829 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Kernel Streaming - * FILE: drivers/wdm/audio/backpln/portcls/pin_wavecyclic.c - * PURPOSE: WaveCyclic IRP Audio Pin + * FILE: drivers/wdm/audio/backpln/portcls/pin_WavePci.c + * PURPOSE: WavePci IRP Audio Pin * PROGRAMMER: Johannes Anderwald */ #include "private.h" -NTSTATUS -NewPortPinWavePci( +#include "private.h" + +typedef struct +{ + IPortPinWavePciVtbl *lpVtbl; + IServiceSinkVtbl *lpVtblServiceSink; + + LONG ref; + IPortWavePci * Port; + IPortFilterWavePci * Filter; + KSPIN_DESCRIPTOR * KsPinDescriptor; + PMINIPORTWAVEPCI Miniport; + PSERVICEGROUP ServiceGroup; + PDMACHANNEL DmaChannel; + PMINIPORTWAVEPCISTREAM Stream; + KSSTATE State; + PKSDATAFORMAT Format; + KSPIN_CONNECT * ConnectDetails; + + BOOL Capture; + PDEVICE_OBJECT DeviceObject; + PPORTWAVEPCISTREAM WaveStream; + IIrpQueue * IrpQueue; + + ULONG TotalPackets; + ULONG PreCompleted; + ULONG PostCompleted; + +}IPortPinWavePciImpl; + + +typedef struct +{ + IPortPinWavePciImpl *Pin; + PIO_WORKITEM WorkItem; + KSSTATE State; +}SETSTREAM_CONTEXT, *PSETSTREAM_CONTEXT; + +NTSTATUS +NTAPI +IPortWavePci_fnProcessNewIrp( + IPortPinWavePciImpl * This); + +//================================================================================================================================== + +static +NTSTATUS +NTAPI +IServiceSink_fnQueryInterface( + IServiceSink* iface, + IN REFIID refiid, + OUT PVOID* Output) +{ + IPortPinWavePciImpl * This = (IPortPinWavePciImpl*)CONTAINING_RECORD(iface, IPortPinWavePciImpl, lpVtblServiceSink); + + DPRINT("IServiceSink_fnQueryInterface entered\n"); + + if (IsEqualGUIDAligned(refiid, &IID_IServiceSink) || + IsEqualGUIDAligned(refiid, &IID_IUnknown)) + { + *Output = &This->lpVtblServiceSink; + InterlockedIncrement(&This->ref); + return STATUS_SUCCESS; + } + return STATUS_UNSUCCESSFUL; +} + +static +ULONG +NTAPI +IServiceSink_fnAddRef( + IServiceSink* iface) +{ + IPortPinWavePciImpl * This = (IPortPinWavePciImpl*)CONTAINING_RECORD(iface, IPortPinWavePciImpl, lpVtblServiceSink); + DPRINT("IServiceSink_fnAddRef entered\n"); + + return InterlockedIncrement(&This->ref); +} + +static +ULONG +NTAPI +IServiceSink_fnRelease( + IServiceSink* iface) +{ + IPortPinWavePciImpl * This = (IPortPinWavePciImpl*)CONTAINING_RECORD(iface, IPortPinWavePciImpl, lpVtblServiceSink); + + InterlockedDecrement(&This->ref); + + DPRINT("IServiceSink_fnRelease entered %u\n", This->ref); + + if (This->ref == 0) + { + FreeItem(This, TAG_PORTCLASS); + return 0; + } + /* Return new reference count */ + return This->ref; +} +static +VOID +NTAPI +SetStreamWorkerRoutine( + IN PDEVICE_OBJECT DeviceObject, + IN PVOID Context) +{ + IPortPinWavePciImpl * This; + PSETSTREAM_CONTEXT Ctx = (PSETSTREAM_CONTEXT)Context; + KSSTATE State; + + This = Ctx->Pin; + State = Ctx->State; + + IoFreeWorkItem(Ctx->WorkItem); + FreeItem(Ctx, TAG_PORTCLASS); + + /* Has the audio stream resumed? */ + if (This->IrpQueue->lpVtbl->NumMappings(This->IrpQueue) && State == KSSTATE_STOP) + return; + + /* Set the state */ + if (NT_SUCCESS(This->Stream->lpVtbl->SetState(This->Stream, State))) + { + /* Set internal state to stop */ + This->State = State; + + if (This->State == KSSTATE_STOP) + { + /* reset start stream */ + This->IrpQueue->lpVtbl->CancelBuffers(This->IrpQueue); //FIX function name + DPRINT1("Stopping PreCompleted %u PostCompleted %u\n", This->PreCompleted, This->PostCompleted); + } + } +} +static +VOID +NTAPI +SetStreamState( + IN IPortPinWavePciImpl * This, + IN KSSTATE State) +{ + PDEVICE_OBJECT DeviceObject; + PIO_WORKITEM WorkItem; + PSETSTREAM_CONTEXT Context; + + ASSERT(KeGetCurrentIrql() <= DISPATCH_LEVEL); + + /* Has the audio stream resumed? */ + if (This->IrpQueue->lpVtbl->NumMappings(This->IrpQueue) && State == KSSTATE_STOP) + return; + + /* Has the audio state already been set? */ + if (This->State == State) + return; + + /* Get device object */ + DeviceObject = GetDeviceObjectFromPortWavePci(This->Port); + + /* allocate set state context */ + Context = AllocateItem(NonPagedPool, sizeof(SETSTREAM_CONTEXT), TAG_PORTCLASS); + + if (!Context) + return; + + /* allocate work item */ + WorkItem = IoAllocateWorkItem(DeviceObject); + + if (!WorkItem) + { + ExFreePool(Context); + return; + } + + Context->Pin = (PVOID)This; + Context->WorkItem = WorkItem; + Context->State = State; + + /* queue the work item */ + IoQueueWorkItem(WorkItem, SetStreamWorkerRoutine, DelayedWorkQueue, (PVOID)Context); +} + +static +VOID +NTAPI +IServiceSink_fnRequestService( + IServiceSink* iface) +{ + ULONGLONG Position; + NTSTATUS Status; + IPortPinWavePciImpl * This = (IPortPinWavePciImpl*)CONTAINING_RECORD(iface, IPortPinWavePciImpl, lpVtblServiceSink); + + ASSERT_IRQL(DISPATCH_LEVEL); + + Status = This->Stream->lpVtbl->GetPosition(This->Stream, &Position); + DPRINT("Position %llu Status %x\n", Position, Status); + + This->Stream->lpVtbl->Service(This->Stream); +} + +static IServiceSinkVtbl vt_IServiceSink = +{ + IServiceSink_fnQueryInterface, + IServiceSink_fnAddRef, + IServiceSink_fnRelease, + IServiceSink_fnRequestService +}; + +//================================================================================================================================== +/* + * @implemented + */ +NTSTATUS +NTAPI +IPortPinWavePci_fnQueryInterface( + IPortPinWavePci* iface, + IN REFIID refiid, + OUT PVOID* Output) +{ + IPortPinWavePciImpl * This = (IPortPinWavePciImpl*)iface; + + if (IsEqualGUIDAligned(refiid, &IID_IIrpTarget) || + IsEqualGUIDAligned(refiid, &IID_IUnknown)) + { + *Output = &This->lpVtbl; + InterlockedIncrement(&This->ref); + return STATUS_SUCCESS; + } + + return STATUS_UNSUCCESSFUL; +} + +/* + * @implemented + */ +ULONG +NTAPI +IPortPinWavePci_fnAddRef( + IPortPinWavePci* iface) +{ + IPortPinWavePciImpl * This = (IPortPinWavePciImpl*)iface; + + return InterlockedIncrement(&This->ref); +} + +/* + * @implemented + */ +ULONG +NTAPI +IPortPinWavePci_fnRelease( + IPortPinWavePci* iface) +{ + IPortPinWavePciImpl * This = (IPortPinWavePciImpl*)iface; + + InterlockedDecrement(&This->ref); + + if (This->ref == 0) + { + FreeItem(This, TAG_PORTCLASS); + return 0; + } + return This->ref; +} + +/* + * @unimplemented + */ +NTSTATUS +NTAPI +IPortPinWavePci_fnNewIrpTarget( + IN IPortPinWavePci* iface, + OUT struct IIrpTarget **OutTarget, + IN WCHAR * Name, + IN PUNKNOWN Unknown, + IN POOL_TYPE PoolType, + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp, + IN KSOBJECT_CREATE *CreateObject) +{ + UNIMPLEMENTED + + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_UNSUCCESSFUL; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + + return STATUS_UNSUCCESSFUL; +} + +/* + * @unimplemented + */ +NTSTATUS +NTAPI +IPortPinWavePci_fnDeviceIoControl( + IN IPortPinWavePci* iface, + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + UNIMPLEMENTED + + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_UNSUCCESSFUL; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + + return STATUS_UNSUCCESSFUL; +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +IPortPinWavePci_fnRead( + IN IPortPinWavePci* iface, + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + return KsDispatchInvalidDeviceRequest(DeviceObject, Irp); +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +IPortPinWavePci_fnWrite( + IN IPortPinWavePci* iface, + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + return KsDispatchInvalidDeviceRequest(DeviceObject, Irp); +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +IPortPinWavePci_fnFlush( + IN IPortPinWavePci* iface, + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + return KsDispatchInvalidDeviceRequest(DeviceObject, Irp); +} + +static +VOID +NTAPI +CloseStreamRoutine( + IN PDEVICE_OBJECT DeviceObject, + IN PVOID Context) +{ + PMINIPORTWAVEPCISTREAM Stream; + NTSTATUS Status; + ISubdevice *ISubDevice; + PSUBDEVICE_DESCRIPTOR Descriptor; + IPortPinWavePciImpl * This; + PCLOSESTREAM_CONTEXT Ctx = (PCLOSESTREAM_CONTEXT)Context; + + This = (IPortPinWavePciImpl*)Ctx->Pin; + + if (This->Stream) + { + if (This->State != KSSTATE_STOP) + { + This->Stream->lpVtbl->SetState(This->Stream, KSSTATE_STOP); + KeStallExecutionProcessor(10); + } + } + + if (This->ServiceGroup) + { + This->ServiceGroup->lpVtbl->RemoveMember(This->ServiceGroup, (PSERVICESINK)&This->lpVtblServiceSink); + This->ServiceGroup->lpVtbl->Release(This->ServiceGroup); + } + + Status = This->Port->lpVtbl->QueryInterface(This->Port, &IID_ISubdevice, (PVOID*)&ISubDevice); + if (NT_SUCCESS(Status)) + { + Status = ISubDevice->lpVtbl->GetDescriptor(ISubDevice, &Descriptor); + if (NT_SUCCESS(Status)) + { + ISubDevice->lpVtbl->Release(ISubDevice); + Descriptor->Factory.Instances[This->ConnectDetails->PinId].CurrentPinInstanceCount--; + } + } + + if (This->Format) + { + ExFreePool(This->Format); + This->Format = NULL; + } + + if (This->WaveStream) + { + This->WaveStream->lpVtbl->Release(This->WaveStream); + } + + /* complete the irp */ + Ctx->Irp->IoStatus.Information = 0; + Ctx->Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Ctx->Irp, IO_NO_INCREMENT); + + /* free the work item */ + IoFreeWorkItem(Ctx->WorkItem); + + /* free work item ctx */ + FreeItem(Ctx, TAG_PORTCLASS); + + if (This->Stream) + { + Stream = This->Stream; + This->Stream = NULL; + DPRINT1("Closing stream at Irql %u\n", KeGetCurrentIrql()); + Stream->lpVtbl->Release(Stream); + /* this line is never reached */ + } +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +IPortPinWavePci_fnClose( + IN IPortPinWavePci* iface, + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + PCLOSESTREAM_CONTEXT Ctx; + IPortPinWavePciImpl * This = (IPortPinWavePciImpl*)iface; + + if (This->Stream) + { + Ctx = AllocateItem(NonPagedPool, sizeof(CLOSESTREAM_CONTEXT), TAG_PORTCLASS); + if (!Ctx) + { + DPRINT1("Failed to allocate stream context\n"); + goto cleanup; + } + + Ctx->WorkItem = IoAllocateWorkItem(DeviceObject); + if (!Ctx->WorkItem) + { + DPRINT1("Failed to allocate work item\n"); + goto cleanup; + } + + Ctx->Irp = Irp; + Ctx->Pin = (PVOID)This; + + IoMarkIrpPending(Irp); + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_PENDING; + + /* defer work item */ + IoQueueWorkItem(Ctx->WorkItem, CloseStreamRoutine, DelayedWorkQueue, (PVOID)Ctx); + /* Return result */ + return STATUS_PENDING; + } + + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + + return STATUS_SUCCESS; + +cleanup: + + if (Ctx) + FreeItem(Ctx, TAG_PORTCLASS); + + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_UNSUCCESSFUL; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_UNSUCCESSFUL; + +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +IPortPinWavePci_fnQuerySecurity( + IN IPortPinWavePci* iface, + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + return KsDispatchInvalidDeviceRequest(DeviceObject, Irp); +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +IPortPinWavePci_fnSetSecurity( + IN IPortPinWavePci* iface, + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + return KsDispatchInvalidDeviceRequest(DeviceObject, Irp); +} + +/* + * @implemented + */ +BOOLEAN +NTAPI +IPortPinWavePci_fnFastDeviceIoControl( + IN IPortPinWavePci* iface, + IN PFILE_OBJECT FileObject, + IN BOOLEAN Wait, + IN PVOID InputBuffer, + IN ULONG InputBufferLength, + OUT PVOID OutputBuffer, + IN ULONG OutputBufferLength, + IN ULONG IoControlCode, + OUT PIO_STATUS_BLOCK StatusBlock, + IN PDEVICE_OBJECT DeviceObject) +{ + UNIMPLEMENTED + return FALSE; +} + +/* + * @implemented + */ +BOOLEAN +NTAPI +IPortPinWavePci_fnFastRead( + IN IPortPinWavePci* iface, + IN PFILE_OBJECT FileObject, + IN PLARGE_INTEGER FileOffset, + IN ULONG Length, + IN BOOLEAN Wait, + IN ULONG LockKey, + IN PVOID Buffer, + OUT PIO_STATUS_BLOCK StatusBlock, + IN PDEVICE_OBJECT DeviceObject) +{ + NTSTATUS Status; + PCONTEXT_WRITE Packet; + PIRP Irp; + IPortPinWavePciImpl * This = (IPortPinWavePciImpl*)iface; + + DPRINT("IPortPinWavePci_fnFastRead entered\n"); + + Packet = (PCONTEXT_WRITE)Buffer; + + Irp = Packet->Irp; + StatusBlock->Status = STATUS_PENDING; + + Status = This->IrpQueue->lpVtbl->AddMapping(This->IrpQueue, Buffer, Length, Irp); + + if (!NT_SUCCESS(Status)) + return FALSE; + + if (This->IrpQueue->lpVtbl->MinimumDataAvailable(This->IrpQueue) == TRUE && This->State != KSSTATE_RUN) + { + /* some should initiate a state request but didnt do it */ + DPRINT1("Starting stream with %lu mappings\n", This->IrpQueue->lpVtbl->NumMappings(This->IrpQueue)); + + This->Stream->lpVtbl->SetState(This->Stream, KSSTATE_RUN); + This->State = KSSTATE_RUN; + } + return TRUE; +} + +/* + * @implemented + */ +BOOLEAN +NTAPI +IPortPinWavePci_fnFastWrite( + IN IPortPinWavePci* iface, + IN PFILE_OBJECT FileObject, + IN PLARGE_INTEGER FileOffset, + IN ULONG Length, + IN BOOLEAN Wait, + IN ULONG LockKey, + IN PVOID Buffer, + OUT PIO_STATUS_BLOCK StatusBlock, + IN PDEVICE_OBJECT DeviceObject) +{ + NTSTATUS Status; + PCONTEXT_WRITE Packet; + PIRP Irp; + IPortPinWavePciImpl * This = (IPortPinWavePciImpl*)iface; + + InterlockedIncrement((PLONG)&This->TotalPackets); + + DPRINT("IPortPinWavePci_fnFastWrite entered Total %u Pre %u Post %u\n", This->TotalPackets, This->PreCompleted, This->PostCompleted); + + Packet = (PCONTEXT_WRITE)Buffer; + + + if (This->IrpQueue->lpVtbl->MinimumDataAvailable(This->IrpQueue)) + { + Irp = Packet->Irp; + StatusBlock->Status = STATUS_PENDING; + InterlockedIncrement((PLONG)&This->PostCompleted); + } + else + { + Irp = NULL; + Packet->Irp->IoStatus.Status = STATUS_SUCCESS; + Packet->Irp->IoStatus.Information = Packet->Header.FrameExtent; + IoCompleteRequest(Packet->Irp, IO_SOUND_INCREMENT); + StatusBlock->Status = STATUS_SUCCESS; + InterlockedIncrement((PLONG)&This->PreCompleted); + } + + Status = This->IrpQueue->lpVtbl->AddMapping(This->IrpQueue, Buffer, Length, Irp); + + if (!NT_SUCCESS(Status)) + return FALSE; + + if (This->IrpQueue->lpVtbl->MinimumDataAvailable(This->IrpQueue) == TRUE && This->State != KSSTATE_RUN) + { + SetStreamState(This, KSSTATE_RUN); + /* some should initiate a state request but didnt do it */ + DPRINT1("Starting stream with %lu mappings Status %x\n", This->IrpQueue->lpVtbl->NumMappings(This->IrpQueue), Status); + } + + if (This->IrpQueue->lpVtbl->HasLastMappingFailed(This->IrpQueue)) + { + /* notify port driver that new mapping is available */ + This->Stream->lpVtbl->MappingAvailable(This->Stream); + } + + return TRUE; +} + +/* + * @unimplemented + */ +NTSTATUS +NTAPI +IPortPinWavePci_fnInit( + IN IPortPinWavePci* iface, + IN PPORTWAVEPCI Port, + IN PPORTFILTERWAVEPCI Filter, + IN KSPIN_CONNECT * ConnectDetails, + IN KSPIN_DESCRIPTOR * KsPinDescriptor, + IN PDEVICE_OBJECT DeviceObject) +{ + NTSTATUS Status; + PKSDATAFORMAT DataFormat; + BOOL Capture; + KSALLOCATOR_FRAMING AllocatorFraming; + + IPortPinWavePciImpl * This = (IPortPinWavePciImpl*)iface; + + Port->lpVtbl->AddRef(Port); + Filter->lpVtbl->AddRef(Filter); + + This->Port = Port; + This->Filter = Filter; + This->KsPinDescriptor = KsPinDescriptor; + This->ConnectDetails = ConnectDetails; + This->Miniport = GetWavePciMiniport(Port); + This->DeviceObject = DeviceObject; + + DataFormat = (PKSDATAFORMAT)(ConnectDetails + 1); + + DPRINT("IPortPinWavePci_fnInit entered\n"); + + This->Format = ExAllocatePoolWithTag(NonPagedPool, DataFormat->FormatSize, TAG_PORTCLASS); + if (!This->Format) + return STATUS_INSUFFICIENT_RESOURCES; + + RtlMoveMemory(This->Format, DataFormat, DataFormat->FormatSize); + + Status = NewIPortWavePciStream(&This->WaveStream); + if (!NT_SUCCESS(Status)) + { + ExFreePool(This->Format); + This->Format = NULL; + return Status; + } + + if (KsPinDescriptor->Communication == KSPIN_COMMUNICATION_SINK && KsPinDescriptor->DataFlow == KSPIN_DATAFLOW_IN) + { + Capture = FALSE; + } + else if (KsPinDescriptor->Communication == KSPIN_COMMUNICATION_SINK && KsPinDescriptor->DataFlow == KSPIN_DATAFLOW_OUT) + { + Capture = TRUE; + } + else + { + DPRINT1("Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow); + KeBugCheck(0); + } + + Status = This->Miniport->lpVtbl->NewStream(This->Miniport, + &This->Stream, + NULL, + NonPagedPool, + This->WaveStream, + Capture, + ConnectDetails->PinId, + This->Format, + &This->DmaChannel, + &This->ServiceGroup); + + DPRINT("IPortPinWavePci_fnInit Status %x\n", Status); + + if (!NT_SUCCESS(Status)) + return Status; + + if (This->ServiceGroup) + { + Status = This->ServiceGroup->lpVtbl->AddMember(This->ServiceGroup, + (PSERVICESINK)&This->lpVtblServiceSink); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to add pin to service group\n"); + return Status; + } + This->ServiceGroup->lpVtbl->SupportDelayedService(This->ServiceGroup); + } + + This->IrpQueue = IPortWavePciStream_GetIrpQueue(This->WaveStream); + + Status = This->Stream->lpVtbl->GetAllocatorFraming(This->Stream, &AllocatorFraming); + if (!NT_SUCCESS(Status)) + { + DPRINT1("GetAllocatorFraming failed with %x\n", Status); + return Status; + } + + Status = This->IrpQueue->lpVtbl->Init(This->IrpQueue, ConnectDetails, This->Format, DeviceObject, AllocatorFraming.FrameSize); + if (!NT_SUCCESS(Status)) + { + DPRINT1("IrpQueue_Init failed with %x\n", Status); + return Status; + } + + This->State = KSSTATE_STOP; + This->Capture = Capture; + + return STATUS_SUCCESS; +} + +/* + * @implemented + */ +PVOID +NTAPI +IPortPinWavePci_fnGetIrpStream( + IN IPortPinWavePci* iface) +{ + IPortPinWavePciImpl * This = (IPortPinWavePciImpl*)iface; + + return (PVOID)This->IrpQueue; +} + + +/* + * @implemented + */ +PMINIPORT +NTAPI +IPortPinWavePci_fnGetMiniport( + IN IPortPinWavePci* iface) +{ + IPortPinWavePciImpl * This = (IPortPinWavePciImpl*)iface; + + return (PMINIPORT)This->Miniport; +} + +static IPortPinWavePciVtbl vt_IPortPinWavePci = +{ + IPortPinWavePci_fnQueryInterface, + IPortPinWavePci_fnAddRef, + IPortPinWavePci_fnRelease, + IPortPinWavePci_fnNewIrpTarget, + IPortPinWavePci_fnDeviceIoControl, + IPortPinWavePci_fnRead, + IPortPinWavePci_fnWrite, + IPortPinWavePci_fnFlush, + IPortPinWavePci_fnClose, + IPortPinWavePci_fnQuerySecurity, + IPortPinWavePci_fnSetSecurity, + IPortPinWavePci_fnFastDeviceIoControl, + IPortPinWavePci_fnFastRead, + IPortPinWavePci_fnFastWrite, + IPortPinWavePci_fnInit, + IPortPinWavePci_fnGetIrpStream, + IPortPinWavePci_fnGetMiniport +}; + + + + +NTSTATUS NewPortPinWavePci( OUT IPortPinWavePci ** OutPin) { - return STATUS_UNSUCCESSFUL; -} + IPortPinWavePciImpl * This; + + This = AllocateItem(NonPagedPool, sizeof(IPortPinWavePciImpl), TAG_PORTCLASS); + if (!This) + return STATUS_INSUFFICIENT_RESOURCES; + + /* initialize IPortPinWavePci */ + This->ref = 1; + This->lpVtbl = &vt_IPortPinWavePci; + This->lpVtblServiceSink = &vt_IServiceSink; + + + /* store result */ + *OutPin = (IPortPinWavePci*)&This->lpVtbl; + + return STATUS_SUCCESS; +} Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.c [iso-8859-1] Mon Apr 27 04:33:49 2009 @@ -813,10 +813,17 @@ } PDEVICE_OBJECT -GetDeviceObjectFromWaveCyclic( +GetDeviceObjectFromPortWavePci( IPortWavePci* iface) { IPortWavePciImpl * This = (IPortWavePciImpl*)iface; return This->pDeviceObject; } +PMINIPORTWAVEPCI +GetWavePciMiniport( + PPORTWAVEPCI iface) +{ + IPortWavePciImpl * This = (IPortWavePciImpl*)iface; + return This->Miniport; +} Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepcistream.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepcistream.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepcistream.c [iso-8859-1] Mon Apr 27 04:33:49 2009 @@ -66,6 +66,7 @@ if (This->ref == 0) { + This->Queue->lpVtbl->Release(This->Queue); FreeItem(This, TAG_PORTCLASS); return 0; } @@ -131,11 +132,7 @@ NTSTATUS NTAPI NewIPortWavePciStream( - OUT PPORTWAVEPCISTREAM *Stream, - IN KSPIN_CONNECT *ConnectDetails, - IN PKSDATAFORMAT DataFormat, - IN PDEVICE_OBJECT DeviceObject, - IN ULONG FrameSize) + OUT PPORTWAVEPCISTREAM *Stream) { IIrpQueue * Queue; IPortWavePciStreamImpl * This; @@ -144,13 +141,6 @@ Status = NewIrpQueue(&Queue); if (!NT_SUCCESS(Status)) return Status; - - Status = Queue->lpVtbl->Init(Queue, ConnectDetails, DataFormat, DeviceObject, FrameSize); - if (!NT_SUCCESS(Status)) - { - Queue->lpVtbl->Release(Queue); - return Status; - } This = AllocateItem(NonPagedPool, sizeof(IPortWavePciStreamImpl), TAG_PORTCLASS); if (!This) @@ -167,15 +157,12 @@ return STATUS_SUCCESS; } -NTSTATUS +IIrpQueue* NTAPI -IPortWavePciStream_AddMapping( - IN IPortWavePciStream *iface, - IN PUCHAR Buffer, - IN ULONG BufferSize, - IN PIRP Irp) +IPortWavePciStream_GetIrpQueue( + IN IPortWavePciStream *iface) { IPortWavePciStreamImpl * This = (IPortWavePciStreamImpl*)iface; - return This->Queue->lpVtbl->AddMapping(This->Queue, Buffer, BufferSize, Irp); + return This->Queue; } Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h [iso-8859-1] Mon Apr 27 04:33:49 2009 @@ -101,6 +101,13 @@ GetDeviceObjectFromWaveCyclic( IPortWavePci* iface); +PDEVICE_OBJECT +GetDeviceObjectFromPortWavePci( + IPortWavePci* iface); + +PMINIPORTWAVEPCI +GetWavePciMiniport( + PPORTWAVEPCI Port); NTSTATUS NTAPI @@ -272,22 +279,15 @@ GetDeviceObject( IPortWaveCyclic* iface); -NTSTATUS -NTAPI -IPortWavePciStream_AddMapping( - IN IPortWavePciStream *iface, - IN PUCHAR Buffer, - IN ULONG BufferSize, - IN PIRP Irp); +IIrpQueue* +NTAPI +IPortWavePciStream_GetIrpQueue( + IN IPortWavePciStream *iface); NTSTATUS NTAPI NewIPortWavePciStream( - OUT PPORTWAVEPCISTREAM *Stream, - IN KSPIN_CONNECT *ConnectDetails, - IN PKSDATAFORMAT DataFormat, - IN PDEVICE_OBJECT DeviceObject, - IN ULONG FrameSize); + OUT PPORTWAVEPCISTREAM *Stream); #define DEFINE_KSPROPERTY_PINPROPOSEDATAFORMAT(PinSet,\ PropGeneral, PropInstances, PropIntersection)\
15 years, 9 months
1
0
0
0
[janderwald] 40711: - Fix warning - Fix KSALLOCATOR_FRAMING structure
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Apr 27 04:15:52 2009 New Revision: 40711 URL:
http://svn.reactos.org/svn/reactos?rev=40711&view=rev
Log: - Fix warning - Fix KSALLOCATOR_FRAMING structure Modified: trunk/reactos/include/ddk/drmk.h trunk/reactos/include/psdk/ks.h Modified: trunk/reactos/include/ddk/drmk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/drmk.h?rev=407…
============================================================================== --- trunk/reactos/include/ddk/drmk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/drmk.h [iso-8859-1] Mon Apr 27 04:15:52 2009 @@ -82,6 +82,9 @@ DEFINE_GUID(IID_IDrmAudioStream, 0x1915c967, 0x3299, 0x48cb, 0xa3, 0xe4, 0x69, 0xfd, 0x1d, 0x1b, 0x30, 0x6e); +#undef INTERFACE +#define INTERFACE IDrmAudioStream + DECLARE_INTERFACE_(IDrmAudioStream, IUnknown) { STDMETHOD_(NTSTATUS, QueryInterface)(THIS_ Modified: trunk/reactos/include/psdk/ks.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ks.h?rev=4071…
============================================================================== --- trunk/reactos/include/psdk/ks.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ks.h [iso-8859-1] Mon Apr 27 04:15:52 2009 @@ -1417,6 +1417,19 @@ typedef struct { + union { + ULONG OptionsFlags; + ULONG RequirementsFlags; + }; +#if defined(_NTDDK_) + POOL_TYPE PoolType; +#else + ULONG PoolType; +#endif + ULONG Frames; + ULONG FrameSize; + ULONG FileAlignment; + ULONG Reserved; } KSALLOCATOR_FRAMING, *PKSALLOCATOR_FRAMING; typedef struct
15 years, 9 months
1
0
0
0
[hpoussin] 40710: Remove MachGetMemoryMap() and replace it by ArcGetMemoryDescriptor(). Rework memory initialization to use it. As a bonus, we're not limited anymore to 32 memory descriptors, and having more than 4GB of RAM doesn't lead to out of bounds accesses
by hpoussin@svn.reactos.org
Author: hpoussin Date: Mon Apr 27 00:22:16 2009 New Revision: 40710 URL:
http://svn.reactos.org/svn/reactos?rev=40710&view=rev
Log: Remove MachGetMemoryMap() and replace it by ArcGetMemoryDescriptor(). Rework memory initialization to use it. As a bonus, we're not limited anymore to 32 memory descriptors, and having more than 4GB of RAM doesn't lead to out of bounds accesses Modified: trunk/reactos/boot/freeldr/freeldr/arch/amd64/hwacpi.c trunk/reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c trunk/reactos/boot/freeldr/freeldr/include/machine.h trunk/reactos/boot/freeldr/freeldr/include/mm.h trunk/reactos/boot/freeldr/freeldr/machine.c trunk/reactos/boot/freeldr/freeldr/mm/meminit.c trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c trunk/reactos/boot/freeldr/freeldr/windows/peloader.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/amd64/hwacpi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/amd64/hwacpi.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/amd64/hwacpi.c [iso-8859-1] Mon Apr 27 00:22:16 2009 @@ -1,130 +1,5 @@ -/* - * FreeLoader - * - * Copyright (C) 2004 Eric Kohl - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ +/* No need to duplicate code ; import the i386 version */ -#include <freeldr.h> -#include <debug.h> - -BOOLEAN AcpiPresent = FALSE; - -static PRSDP_DESCRIPTOR -FindAcpiBios(VOID) -{ - PUCHAR Ptr; - - /* Find the 'Root System Descriptor Table Pointer' */ - Ptr = (PUCHAR)0xE0000; - while ((ULONG_PTR)Ptr < 0x100000) - { - if (!memcmp(Ptr, "RSD PTR ", 8)) - { - DbgPrint((DPRINT_HWDETECT, "ACPI supported\n")); - - return (PRSDP_DESCRIPTOR)Ptr; - } - - Ptr = (PUCHAR)((ULONG_PTR)Ptr + 0x10); - } - - DbgPrint((DPRINT_HWDETECT, "ACPI not supported\n")); - - return NULL; -} - - -VOID -DetectAcpiBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber) -{ - PCONFIGURATION_COMPONENT_DATA BiosKey; - PCM_PARTIAL_RESOURCE_LIST PartialResourceList; - PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor; - PRSDP_DESCRIPTOR Rsdp; - PACPI_BIOS_DATA AcpiBiosData; - BIOS_MEMORY_MAP BiosMemoryMap[32]; - ULONG BiosMemoryMapEntryCount, TableSize; - - Rsdp = FindAcpiBios(); - - if (Rsdp) - { - /* Set up the flag in the loader block */ - AcpiPresent = TRUE; - LoaderBlock.Flags |= MB_FLAGS_ACPI_TABLE; - - /* Create new bus key */ - FldrCreateComponentKey(SystemKey, - L"MultifunctionAdapter", - *BusNumber, - AdapterClass, - MultiFunctionAdapter, - &BiosKey); - - /* Set 'Component Information' */ - FldrSetComponentInformation(BiosKey, - 0x0, - 0x0, - 0xFFFFFFFF); - - /* Get BIOS memory map */ - RtlZeroMemory(BiosMemoryMap, sizeof(BIOS_MEMORY_MAP) * 32); - BiosMemoryMapEntryCount = MachGetMemoryMap(BiosMemoryMap, - sizeof(BiosMemoryMap) / sizeof(BIOS_MEMORY_MAP)); - - /* Calculate the table size */ - TableSize = BiosMemoryMapEntryCount * sizeof(BIOS_MEMORY_MAP) + - sizeof(ACPI_BIOS_DATA) - sizeof(BIOS_MEMORY_MAP); - - /* Set 'Configuration Data' value */ - PartialResourceList = - MmHeapAlloc(sizeof(CM_PARTIAL_RESOURCE_LIST) + TableSize); - memset(PartialResourceList, 0, sizeof(CM_PARTIAL_RESOURCE_LIST) + TableSize); - PartialResourceList->Version = 0; - PartialResourceList->Revision = 0; - PartialResourceList->Count = 1; - - PartialDescriptor = &PartialResourceList->PartialDescriptors[0]; - PartialDescriptor->Type = CmResourceTypeDeviceSpecific; - PartialDescriptor->ShareDisposition = CmResourceShareUndetermined; - PartialDescriptor->u.DeviceSpecificData.DataSize = TableSize; - - /* Fill the table */ - AcpiBiosData = (PACPI_BIOS_DATA)&PartialResourceList->PartialDescriptors[1]; - AcpiBiosData->RSDTAddress.LowPart = Rsdp->rsdt_physical_address; - AcpiBiosData->Count = BiosMemoryMapEntryCount; - memcpy(AcpiBiosData->MemoryMap, BiosMemoryMap, - BiosMemoryMapEntryCount * sizeof(BIOS_MEMORY_MAP)); - - DbgPrint((DPRINT_HWDETECT, "RSDT %p, data size %x\n", Rsdp->rsdt_physical_address, - TableSize)); - - FldrSetConfigurationData(BiosKey, - PartialResourceList, - sizeof(CM_PARTIAL_RESOURCE_LIST) + TableSize - ); - - /* Increment bus number */ - (*BusNumber)++; - - /* Set 'Identifier' value */ - FldrSetIdentifier(BiosKey, "ACPI BIOS"); - MmFreeMemory(PartialResourceList); - } -} +#include "../i386/hwacpi.c" /* EOF */ Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c [iso-8859-1] Mon Apr 27 00:22:16 2009 @@ -83,7 +83,7 @@ /* Get BIOS memory map */ RtlZeroMemory(BiosMemoryMap, sizeof(BIOS_MEMORY_MAP) * 32); - BiosMemoryMapEntryCount = MachGetMemoryMap(BiosMemoryMap, + BiosMemoryMapEntryCount = PcMemGetMemoryMap(BiosMemoryMap, sizeof(BiosMemoryMap) / sizeof(BIOS_MEMORY_MAP)); /* Calculate the table size */ Modified: trunk/reactos/boot/freeldr/freeldr/include/machine.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] Mon Apr 27 00:22:16 2009 @@ -59,6 +59,7 @@ VOID (*Beep)(VOID); VOID (*PrepareForReactOS)(IN BOOLEAN Setup); + MEMORY_DESCRIPTOR* (*GetMemoryDescriptor)(MEMORY_DESCRIPTOR* Current); ULONG (*GetMemoryMap)(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize); BOOLEAN (*DiskGetBootVolume)(PULONG DriveNumber, PULONGLONG StartSector, PULONGLONG SectorCount, int *FsType); @@ -98,7 +99,7 @@ VOID MachVideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue); VOID MachVideoSync(VOID); VOID MachBeep(VOID); -ULONG MachGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize); +MEMORY_DESCRIPTOR* ArcGetMemoryDescriptor(MEMORY_DESCRIPTOR* Current); BOOLEAN MachDiskGetBootVolume(PULONG DriveNumber, PULONGLONG StartSector, PULONGLONG SectorCount, int *FsType); BOOLEAN MachDiskGetSystemVolume(char *SystemPath, @@ -138,7 +139,6 @@ #define MachVideoSync() MachVtbl.VideoSync() #define MachBeep() MachVtbl.Beep() #define MachPrepareForReactOS(a) MachVtbl.PrepareForReactOS(a) -#define MachGetMemoryMap(MMap, Size) MachVtbl.GetMemoryMap((MMap), (Size)) #define MachDiskGetBootVolume(Drv, Start, Cnt, FsType) MachVtbl.DiskGetBootVolume((Drv), (Start), (Cnt), (FsType)) #define MachDiskGetSystemVolume(SysPath, RemPath, Dev, Drv, Start, Cnt, FsType) MachVtbl.DiskGetSystemVolume((SysPath), (RemPath), (Dev), (Drv), (Start), (Cnt), (FsType)) #define MachDiskGetBootPath(Path, Size) MachVtbl.DiskGetBootPath((Path), (Size)) Modified: trunk/reactos/boot/freeldr/freeldr/include/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/mm.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/mm.h [iso-8859-1] Mon Apr 27 00:22:16 2009 @@ -88,21 +88,18 @@ extern ULONG LastFreePageHint; #ifdef DBG -PUCHAR MmGetSystemMemoryMapTypeString(ULONG Type); +PCSTR MmGetSystemMemoryMapTypeString(MEMORY_TYPE Type); #endif ULONG MmGetPageNumberFromAddress(PVOID Address); // Returns the page number that contains a linear address -PVOID MmGetEndAddressOfAnyMemory(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Returns the last address of memory from the memory map -ULONG MmGetAddressablePageCountIncludingHoles(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Returns the count of addressable pages from address zero including any memory holes and reserved memory regions -PVOID MmFindLocationForPageLookupTable(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Returns the address for a memory chunk big enough to hold the page lookup table (starts search from end of memory) -VOID MmSortBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Sorts the BIOS_MEMORY_MAP array so the first element corresponds to the first address in memory -VOID MmInitPageLookupTable(PVOID PageLookupTable, ULONG TotalPageCount, PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Inits the page lookup table according to the memory types in the memory map +ULONG MmGetAddressablePageCountIncludingHoles(VOID); // Returns the count of addressable pages from address zero including any memory holes and reserved memory regions +PVOID MmFindLocationForPageLookupTable(ULONG TotalPageCount); // Returns the address for a memory chunk big enough to hold the page lookup table (starts search from end of memory) +VOID MmInitPageLookupTable(PVOID PageLookupTable, ULONG TotalPageCount); // Inits the page lookup table according to the memory types in the memory map VOID MmMarkPagesInLookupTable(PVOID PageLookupTable, ULONG StartPage, ULONG PageCount, TYPE_OF_MEMORY PageAllocated); // Marks the specified pages as allocated or free in the lookup table VOID MmAllocatePagesInLookupTable(PVOID PageLookupTable, ULONG StartPage, ULONG PageCount, TYPE_OF_MEMORY MemoryType); // Allocates the specified pages in the lookup table ULONG MmCountFreePagesInLookupTable(PVOID PageLookupTable, ULONG TotalPageCount); // Returns the number of free pages in the lookup table ULONG MmFindAvailablePages(PVOID PageLookupTable, ULONG TotalPageCount, ULONG PagesNeeded, BOOLEAN FromEnd); // Returns the page number of the first available page range from the beginning or end of memory ULONG MmFindAvailablePagesBeforePage(PVOID PageLookupTable, ULONG TotalPageCount, ULONG PagesNeeded, ULONG LastPage); // Returns the page number of the first available page range before the specified page -VOID MmFixupSystemMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG* MapCount); // Removes entries in the memory map that describe memory above 4G VOID MmUpdateLastFreePageHint(PVOID PageLookupTable, ULONG TotalPageCount); // Sets the LastFreePageHint to the last usable page of memory BOOLEAN MmAreMemoryPagesAvailable(PVOID PageLookupTable, ULONG TotalPageCount, PVOID PageAddress, ULONG PageCount); // Returns TRUE if the specified pages of memory are available, otherwise FALSE VOID MmSetMemoryType(PVOID MemoryAddress, ULONG MemorySize, TYPE_OF_MEMORY NewType); // Use with EXTREME caution! Modified: trunk/reactos/boot/freeldr/freeldr/machine.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/machi…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/machine.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/machine.c [iso-8859-1] Mon Apr 27 00:22:16 2009 @@ -36,7 +36,6 @@ #undef MachVideoSync #undef MachBeep #undef MachPrepareForReactOS -#undef MachGetMemoryMap #undef MachDiskGetBootVolume #undef MachDiskGetSystemVolume #undef MachDiskGetBootPath @@ -153,10 +152,176 @@ MachVtbl.PrepareForReactOS(Setup); } -ULONG -MachGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize) -{ - return MachVtbl.GetMemoryMap(BiosMemoryMap, MaxMemoryMapSize); +typedef struct +{ + MEMORY_DESCRIPTOR m; + ULONG Index; + BOOLEAN GeneratedDescriptor; +} MEMORY_DESCRIPTOR_INT; +static const MEMORY_DESCRIPTOR_INT MemoryDescriptors[] = +{ +#if defined (__i386__) || defined (_M_AMD64) + { { MemoryFirmwarePermanent, 0x00, 1 }, 0, }, // realmode int vectors + { { MemoryFirmwareTemporary, 0x01, 7 }, 1, }, // freeldr stack + cmdline + { { MemoryLoadedProgram, 0x08, 0x70 }, 2, }, // freeldr image (roughly max. 0x64 pages) + { { MemorySpecialMemory, 0x78, 8 }, 3, }, // prot mode stack. BIOSCALLBUFFER + { { MemoryFirmwareTemporary, 0x80, 0x10 }, 4, }, // File system read buffer. FILESYSBUFFER + { { MemoryFirmwareTemporary, 0x90, 0x10 }, 5, }, // Disk read buffer for int 13h. DISKREADBUFFER + { { MemoryFirmwarePermanent, 0xA0, 0x60 }, 6, }, // ROM / Video + { { MemorySpecialMemory, 0xFFF, 1 }, 7, }, // unusable memory +#elif __arm__ + { { MemoryFirmwarePermanent, 0x00, 1 }, 0, }, // arm exception handlers + { { MemoryFirmwareTemporary, 0x01, 7 }, 1, }, // arm board block + freeldr stack + cmdline + { { MemoryLoadedProgram, 0x08, 0x70 }, 2, }, // freeldr image (roughly max. 0x64 pages) +#endif +}; +MEMORY_DESCRIPTOR* +ArcGetMemoryDescriptor(MEMORY_DESCRIPTOR* Current) +{ + MEMORY_DESCRIPTOR_INT* CurrentDescriptor; + BIOS_MEMORY_MAP BiosMemoryMap[32]; + static ULONG BiosMemoryMapEntryCount; + static MEMORY_DESCRIPTOR_INT BiosMemoryDescriptors[32]; + static BOOLEAN MemoryMapInitialized = FALSE; + ULONG i, j; + + // + // Does machine provide an override for this function? + // + if (MachVtbl.GetMemoryDescriptor) + { + // + // Yes. Use it instead + // + return MachVtbl.GetMemoryDescriptor(Current); + } + + // + // Check if it is the first time we're called + // + if (!MemoryMapInitialized) + { + // + // Get the machine generated memory map + // + RtlZeroMemory(BiosMemoryMap, sizeof(BIOS_MEMORY_MAP) * 32); + BiosMemoryMapEntryCount = MachVtbl.GetMemoryMap(BiosMemoryMap, + sizeof(BiosMemoryMap) / sizeof(BIOS_MEMORY_MAP)); + + // + // Copy the entries to our structure + // + for (i = 0, j = 0; i < BiosMemoryMapEntryCount; i++) + { + // + // Is it suitable memory? + // + if (BiosMemoryMap[i].Type != BiosMemoryUsable) + { + // + // No. Process next descriptor + // + continue; + } + + // + // Copy this memory descriptor + // + BiosMemoryDescriptors[j].m.MemoryType = MemoryFree; + BiosMemoryDescriptors[j].m.BasePage = BiosMemoryMap[i].BaseAddress / MM_PAGE_SIZE; + BiosMemoryDescriptors[j].m.PageCount = BiosMemoryMap[i].Length / MM_PAGE_SIZE; + BiosMemoryDescriptors[j].Index = j; + BiosMemoryDescriptors[j].GeneratedDescriptor = TRUE; + j++; + } + + // + // Remember how much descriptors we found + // + BiosMemoryMapEntryCount = j; + + // + // Mark memory map as already retrieved and initialized + // + MemoryMapInitialized = TRUE; + } + + CurrentDescriptor = CONTAINING_RECORD(Current, MEMORY_DESCRIPTOR_INT, m); + + if (Current == NULL) + { + // + // First descriptor requested + // + if (BiosMemoryMapEntryCount > 0) + { + // + // Return first generated memory descriptor + // + return &BiosMemoryDescriptors[0].m; + } + else if (sizeof(MemoryDescriptors) > 0) + { + // + // Return first fixed memory descriptor + // + return (MEMORY_DESCRIPTOR*)&MemoryDescriptors[0].m; + } + else + { + // + // Strange case, we have no memory descriptor + // + return NULL; + } + } + else if (CurrentDescriptor->GeneratedDescriptor) + { + // + // Current entry is a generated descriptor + // + if (CurrentDescriptor->Index + 1 < BiosMemoryMapEntryCount) + { + // + // Return next generated descriptor + // + return &BiosMemoryDescriptors[CurrentDescriptor->Index + 1].m; + } + else if (sizeof(MemoryDescriptors) > 0) + { + // + // Return first fixed memory descriptor + // + return (MEMORY_DESCRIPTOR*)&MemoryDescriptors[0].m; + } + else + { + // + // No fixed memory descriptor; end of memory map + // + return NULL; + } + } + else + { + // + // Current entry is a fixed descriptor + // + if (CurrentDescriptor->Index + 1 < sizeof(MemoryDescriptors) / sizeof(MemoryDescriptors[0])) + { + // + // Return next fixed descriptor + // + return (MEMORY_DESCRIPTOR*)&MemoryDescriptors[CurrentDescriptor->Index + 1].m; + } + else + { + // + // No more fixed memory descriptor; end of memory map + // + return NULL; + } + } } BOOLEAN Modified: trunk/reactos/boot/freeldr/freeldr/mm/meminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/mm/me…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/mm/meminit.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/mm/meminit.c [iso-8859-1] Mon Apr 27 00:22:16 2009 @@ -1,6 +1,7 @@ /* * FreeLoader * Copyright (C) 2006-2008 Aleksey Bragin <aleksey(a)reactos.org> + * Copyright (C) 2006-2009 Hervé Poussineau <hpoussin(a)reactos.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,19 +24,24 @@ #ifdef DBG typedef struct { - ULONG Type; - UCHAR TypeString[20]; + MEMORY_TYPE Type; + PCSTR TypeString; } FREELDR_MEMORY_TYPE, *PFREELDR_MEMORY_TYPE; -ULONG MemoryTypeCount = 5; -FREELDR_MEMORY_TYPE MemoryTypeArray[] = -{ - { 0, "Unknown Memory" }, - { BiosMemoryUsable, "Usable Memory" }, - { BiosMemoryReserved, "Reserved Memory" }, - { BiosMemoryAcpiReclaim, "ACPI Reclaim Memory" }, - { BiosMemoryAcpiNvs, "ACPI NVS Memory" }, +FREELDR_MEMORY_TYPE MemoryTypeArray[] = +{ + { MemoryMaximum, "Unknown memory" }, + { MemoryExceptionBlock, "Exception block" }, + { MemorySystemBlock, "System block" }, + { MemoryFree, "Free memory" }, + { MemoryBad, "Bad memory" }, + { MemoryLoadedProgram, "Loaded program" }, + { MemoryFirmwareTemporary, "Firmware temporary" }, + { MemoryFirmwarePermanent, "Firmware permanent" }, + { MemoryFreeContiguous, "Free contiguous memory" }, + { MemorySpecialMemory, "Special memory" }, }; +ULONG MemoryTypeCount = sizeof(MemoryTypeArray) / sizeof(MemoryTypeArray[0]); #endif PVOID PageLookupTableAddress = NULL; @@ -48,39 +54,27 @@ BOOLEAN MmInitializeMemoryManager(VOID) { - BIOS_MEMORY_MAP BiosMemoryMap[32]; - ULONG BiosMemoryMapEntryCount; #ifdef DBG - ULONG Index; + MEMORY_DESCRIPTOR* MemoryDescriptor = NULL; #endif DPRINTM(DPRINT_MEMORY, "Initializing Memory Manager.\n"); - - RtlZeroMemory(BiosMemoryMap, sizeof(BIOS_MEMORY_MAP) * 32); - - BiosMemoryMapEntryCount = MachGetMemoryMap(BiosMemoryMap, sizeof(BiosMemoryMap) / sizeof(BIOS_MEMORY_MAP)); #ifdef DBG // Dump the system memory map - if (BiosMemoryMapEntryCount != 0) - { - DPRINTM(DPRINT_MEMORY, "System Memory Map (Base Address, Length, Type):\n"); - for (Index=0; Index<BiosMemoryMapEntryCount; Index++) - { - DPRINTM(DPRINT_MEMORY, "%x%x\t %x%x\t %s\n", BiosMemoryMap[Index].BaseAddress, BiosMemoryMap[Index].Length, MmGetSystemMemoryMapTypeString(BiosMemoryMap[Index].Type)); - } + DPRINTM(DPRINT_MEMORY, "System Memory Map (Base Address, Length, Type):\n"); + while ((MemoryDescriptor = ArcGetMemoryDescriptor(MemoryDescriptor)) != NULL) + { + DPRINTM(DPRINT_MEMORY, "%x\t %x\t %s\n", + MemoryDescriptor->BasePage * MM_PAGE_SIZE, + MemoryDescriptor->PageCount * MM_PAGE_SIZE, + MmGetSystemMemoryMapTypeString(MemoryDescriptor->MemoryType)); } #endif - // If we got the system memory map then fixup invalid entries - if (BiosMemoryMapEntryCount != 0) - { - MmFixupSystemMemoryMap(BiosMemoryMap, &BiosMemoryMapEntryCount); - } - // Find address for the page lookup table - TotalPagesInLookupTable = MmGetAddressablePageCountIncludingHoles(BiosMemoryMap, BiosMemoryMapEntryCount); - PageLookupTableAddress = MmFindLocationForPageLookupTable(BiosMemoryMap, BiosMemoryMapEntryCount); + TotalPagesInLookupTable = MmGetAddressablePageCountIncludingHoles(); + PageLookupTableAddress = MmFindLocationForPageLookupTable(TotalPagesInLookupTable); LastFreePageHint = TotalPagesInLookupTable; if (PageLookupTableAddress == 0) @@ -93,24 +87,8 @@ } // Initialize the page lookup table - MmInitPageLookupTable(PageLookupTableAddress, TotalPagesInLookupTable, BiosMemoryMap, BiosMemoryMapEntryCount); + MmInitPageLookupTable(PageLookupTableAddress, TotalPagesInLookupTable); MmUpdateLastFreePageHint(PageLookupTableAddress, TotalPagesInLookupTable); - - // Add machine-dependent stuff -#if defined (__i386__) || defined (_M_AMD64) - MmMarkPagesInLookupTable(PageLookupTableAddress, 0x00, 1, LoaderFirmwarePermanent); // realmode int vectors - MmMarkPagesInLookupTable(PageLookupTableAddress, 0x01, 7, LoaderFirmwareTemporary); // freeldr stack + cmdline - MmMarkPagesInLookupTable(PageLookupTableAddress, 0x08, 0x70, LoaderLoadedProgram); // freeldr image (roughly max. 0x64 pages) - MmMarkPagesInLookupTable(PageLookupTableAddress, 0x78, 8, LoaderOsloaderStack); // prot mode stack. BIOSCALLBUFFER - MmMarkPagesInLookupTable(PageLookupTableAddress, 0x80, 0x10, LoaderOsloaderHeap); // File system read buffer. FILESYSBUFFER - MmMarkPagesInLookupTable(PageLookupTableAddress, 0x90, 0x10, LoaderOsloaderHeap); // Disk read buffer for int 13h. DISKREADBUFFER - MmMarkPagesInLookupTable(PageLookupTableAddress, 0xA0, 0x60, LoaderFirmwarePermanent); // ROM / Video - MmMarkPagesInLookupTable(PageLookupTableAddress, 0xFFF, 1, LoaderSpecialMemory); // unusable memory -#elif __arm__ - MmMarkPagesInLookupTable(PageLookupTableAddress, 0x00, 1, LoaderFirmwarePermanent); // arm exception handlers - MmMarkPagesInLookupTable(PageLookupTableAddress, 0x01, 7, LoaderFirmwareTemporary); // arm board block + freeldr stack + cmdline - MmMarkPagesInLookupTable(PageLookupTableAddress, 0x08, 0x70, LoaderLoadedProgram); // freeldr image (roughly max. 0x64 pages) -#endif FreePagesInLookupTable = MmCountFreePagesInLookupTable(PageLookupTableAddress, TotalPagesInLookupTable); @@ -151,7 +129,7 @@ } #ifdef DBG -PUCHAR MmGetSystemMemoryMapTypeString(ULONG Type) +PCSTR MmGetSystemMemoryMapTypeString(MEMORY_TYPE Type) { ULONG Index; @@ -172,165 +150,157 @@ return ((ULONG_PTR)Address) / MM_PAGE_SIZE; } -PVOID MmGetEndAddressOfAnyMemory(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount) -{ - ULONGLONG MaxStartAddressSoFar; - ULONGLONG EndAddressOfMemory; - ULONG Index; - - MaxStartAddressSoFar = 0; - EndAddressOfMemory = 0; - for (Index=0; Index<MapCount; Index++) - { - if (MaxStartAddressSoFar <= BiosMemoryMap[Index].BaseAddress) - { - MaxStartAddressSoFar = BiosMemoryMap[Index].BaseAddress; - EndAddressOfMemory = (MaxStartAddressSoFar + BiosMemoryMap[Index].Length); - if (EndAddressOfMemory > 0xFFFFFFFF) - { - EndAddressOfMemory = 0xFFFFFFFF; - } - } - } - - DPRINTM(DPRINT_MEMORY, "MmGetEndAddressOfAnyMemory() returning 0x%x\n", (ULONG)EndAddressOfMemory); - - return (PVOID)(ULONG_PTR)EndAddressOfMemory; -} - -ULONG MmGetAddressablePageCountIncludingHoles(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount) -{ - ULONG PageCount; - ULONGLONG EndAddress; - - EndAddress = (ULONGLONG)(ULONG_PTR)MmGetEndAddressOfAnyMemory(BiosMemoryMap, MapCount); - - // Since MmGetEndAddressOfAnyMemory() won't - // return addresses higher than 0xFFFFFFFF - // then we need to adjust the end address - // to 0x100000000 so we don't get an - // off-by-one error - if (EndAddress >= 0xFFFFFFFF) - { - EndAddress = 0x100000000LL; - - DPRINTM(DPRINT_MEMORY, "MmGetEndAddressOfAnyMemory() returned 0xFFFFFFFF, correcting to be 0x100000000.\n"); - } - - PageCount = (EndAddress / MM_PAGE_SIZE); - - DPRINTM(DPRINT_MEMORY, "MmGetAddressablePageCountIncludingHoles() returning %d\n", PageCount); - - return PageCount; -} - -PVOID MmFindLocationForPageLookupTable(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount) -{ - ULONG TotalPageCount; - ULONG PageLookupTableSize; - PVOID PageLookupTableMemAddress; - int Index; - BIOS_MEMORY_MAP TempBiosMemoryMap[32]; - - TotalPageCount = MmGetAddressablePageCountIncludingHoles(BiosMemoryMap, MapCount); - PageLookupTableSize = TotalPageCount * sizeof(PAGE_LOOKUP_TABLE_ITEM); - PageLookupTableMemAddress = 0; - - RtlCopyMemory(TempBiosMemoryMap, BiosMemoryMap, sizeof(BIOS_MEMORY_MAP) * 32); - MmSortBiosMemoryMap(TempBiosMemoryMap, MapCount); - - // Find a place, starting from the highest memory - // (thus leaving low memory for kernel/drivers) - for (Index=(MapCount-1); Index>=0; Index--) - { - // If this is usable memory with a big enough length - // then we'll put our page lookup table here - - // skip if this is not usable region - if (TempBiosMemoryMap[Index].Type != BiosMemoryUsable) - continue; - - if (TempBiosMemoryMap[Index].Length >= PageLookupTableSize) - { - PageLookupTableMemAddress = (PVOID)(ULONG_PTR) - (TempBiosMemoryMap[Index].BaseAddress + (TempBiosMemoryMap[Index].Length - PageLookupTableSize)); - break; - } - } - - DPRINTM(DPRINT_MEMORY, "MmFindLocationForPageLookupTable() returning 0x%x\n", PageLookupTableMemAddress); - - return PageLookupTableMemAddress; -} - -VOID MmSortBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount) -{ - ULONG Index; - ULONG LoopCount; - BIOS_MEMORY_MAP TempMapItem; - - // Loop once for each entry in the memory map minus one - // On each loop iteration go through and sort the memory map - for (LoopCount=0; LoopCount<(MapCount-1); LoopCount++) - { - for (Index=0; Index<(MapCount-1); Index++) - { - if (BiosMemoryMap[Index].BaseAddress > BiosMemoryMap[Index+1].BaseAddress) - { - TempMapItem = BiosMemoryMap[Index]; - BiosMemoryMap[Index] = BiosMemoryMap[Index+1]; - BiosMemoryMap[Index+1] = TempMapItem; - } - } - } -} - -VOID MmInitPageLookupTable(PVOID PageLookupTable, ULONG TotalPageCount, PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount) -{ - ULONG MemoryMapStartPage; - ULONG MemoryMapEndPage; - ULONG MemoryMapPageCount; - ULONG MemoryMapPageAllocated; - ULONG PageLookupTableStartPage; - ULONG PageLookupTablePageCount; - ULONG Index; - - DPRINTM(DPRINT_MEMORY, "MmInitPageLookupTable()\n"); - - // Mark every page as allocated initially - // We will go through and mark pages again according to the memory map - // But this will mark any holes not described in the map as allocated - MmMarkPagesInLookupTable(PageLookupTable, 0, TotalPageCount, LoaderFirmwarePermanent); - - for (Index=0; Index<MapCount; Index++) - { - MemoryMapStartPage = MmGetPageNumberFromAddress((PVOID)(ULONG_PTR)BiosMemoryMap[Index].BaseAddress); - MemoryMapEndPage = MmGetPageNumberFromAddress((PVOID)(ULONG_PTR)(BiosMemoryMap[Index].BaseAddress + BiosMemoryMap[Index].Length - 1)); - MemoryMapPageCount = (MemoryMapEndPage - MemoryMapStartPage) + 1; - - switch (BiosMemoryMap[Index].Type) - { - case BiosMemoryUsable: - MemoryMapPageAllocated = LoaderFree; - break; - - case BiosMemoryAcpiReclaim: - case BiosMemoryAcpiNvs: - MemoryMapPageAllocated = LoaderSpecialMemory; - break; - - default: - MemoryMapPageAllocated = LoaderSpecialMemory; - } - DPRINTM(DPRINT_MEMORY, "Marking pages as type %d: StartPage: %d PageCount: %d\n", MemoryMapPageAllocated, MemoryMapStartPage, MemoryMapPageCount); - MmMarkPagesInLookupTable(PageLookupTable, MemoryMapStartPage, MemoryMapPageCount, MemoryMapPageAllocated); - } - - // Mark the pages that the lookup table occupies as reserved - PageLookupTableStartPage = MmGetPageNumberFromAddress(PageLookupTable); - PageLookupTablePageCount = MmGetPageNumberFromAddress((PVOID)((ULONG_PTR)PageLookupTable + ROUND_UP(TotalPageCount * sizeof(PAGE_LOOKUP_TABLE_ITEM), MM_PAGE_SIZE))) - PageLookupTableStartPage; - DPRINTM(DPRINT_MEMORY, "Marking the page lookup table pages as reserved StartPage: %d PageCount: %d\n", PageLookupTableStartPage, PageLookupTablePageCount); - MmMarkPagesInLookupTable(PageLookupTable, PageLookupTableStartPage, PageLookupTablePageCount, LoaderFirmwareTemporary); +ULONG MmGetAddressablePageCountIncludingHoles(VOID) +{ + MEMORY_DESCRIPTOR* MemoryDescriptor = NULL; + ULONG EndPage = 0; + + // + // Go through the whole memory map to get max address + // + while ((MemoryDescriptor = ArcGetMemoryDescriptor(MemoryDescriptor)) != NULL) + { + // + // Check if we got a higher end page address + // + if (MemoryDescriptor->BasePage + MemoryDescriptor->PageCount > EndPage) + { + // + // Yes, remember it + // + EndPage = MemoryDescriptor->BasePage + MemoryDescriptor->PageCount; + } + } + + DPRINTM(DPRINT_MEMORY, "MmGetAddressablePageCountIncludingHoles() returning 0x%x\n", EndPage); + + return EndPage; +} + +PVOID MmFindLocationForPageLookupTable(ULONG TotalPageCount) +{ + MEMORY_DESCRIPTOR* MemoryDescriptor = NULL; + ULONG PageLookupTableSize; + ULONG PageLookupTablePages; + ULONG PageLookupTableStartPage = 0; + PVOID PageLookupTableMemAddress = NULL; + + // + // Calculate how much pages we need to keep the page lookup table + // + PageLookupTableSize = TotalPageCount * sizeof(PAGE_LOOKUP_TABLE_ITEM); + PageLookupTablePages = PageLookupTableSize / MM_PAGE_SIZE; + + // + // Search the highest memory block big enough to contain lookup table + // + while ((MemoryDescriptor = ArcGetMemoryDescriptor(MemoryDescriptor)) != NULL) + { + // + // Is it suitable memory? + // + if (MemoryDescriptor->MemoryType != MemoryFree) + { + // + // No. Process next descriptor + // + continue; + } + + // + // Is the block big enough? + // + if (MemoryDescriptor->PageCount < PageLookupTablePages) + { + // + // No. Process next descriptor + // + continue; + } + + // + // Is it at a higher address than previous suitable address? + // + if (MemoryDescriptor->BasePage < PageLookupTableStartPage) + { + // + // No. Process next descriptor + // + continue; + } + + // + // Memory block is more suitable than the previous one + // + PageLookupTableStartPage = MemoryDescriptor->BasePage; + PageLookupTableMemAddress = (PVOID)((ULONG_PTR) + (MemoryDescriptor->BasePage + MemoryDescriptor->PageCount) * MM_PAGE_SIZE + - PageLookupTableSize); + } + + DPRINTM(DPRINT_MEMORY, "MmFindLocationForPageLookupTable() returning 0x%x\n", PageLookupTableMemAddress); + + return PageLookupTableMemAddress; +} + +VOID MmInitPageLookupTable(PVOID PageLookupTable, ULONG TotalPageCount) +{ + MEMORY_DESCRIPTOR* MemoryDescriptor = NULL; + TYPE_OF_MEMORY MemoryMapPageAllocated; + ULONG PageLookupTableStartPage; + ULONG PageLookupTablePageCount; + + DPRINTM(DPRINT_MEMORY, "MmInitPageLookupTable()\n"); + + // + // Mark every page as allocated initially + // We will go through and mark pages again according to the memory map + // But this will mark any holes not described in the map as allocated + // + MmMarkPagesInLookupTable(PageLookupTable, 0, TotalPageCount, LoaderFirmwarePermanent); + + // + // Parse the whole memory map + // + while ((MemoryDescriptor = ArcGetMemoryDescriptor(MemoryDescriptor)) != NULL) + { + // + // Convert ARC memory type to loader memory type + // + switch (MemoryDescriptor->MemoryType) + { + case MemoryFree: + { + // + // Allocatable memory + // + MemoryMapPageAllocated = LoaderFree; + break; + } + default: + { + // + // Put something sensible here, which won't be overwritten + // + MemoryMapPageAllocated = LoaderSpecialMemory; + break; + } + } + + // + // Mark used pages in the lookup table + // + DPRINTM(DPRINT_MEMORY, "Marking pages as type %d: StartPage: %d PageCount: %d\n", MemoryMapPageAllocated, MemoryDescriptor->BasePage, MemoryDescriptor->PageCount); + MmMarkPagesInLookupTable(PageLookupTable, MemoryDescriptor->BasePage, MemoryDescriptor->PageCount, MemoryMapPageAllocated); + } + + // + // Mark the pages that the lookup table occupies as reserved + // + PageLookupTableStartPage = MmGetPageNumberFromAddress(PageLookupTable); + PageLookupTablePageCount = MmGetPageNumberFromAddress((PVOID)((ULONG_PTR)PageLookupTable + ROUND_UP(TotalPageCount * sizeof(PAGE_LOOKUP_TABLE_ITEM), MM_PAGE_SIZE))) - PageLookupTableStartPage; + DPRINTM(DPRINT_MEMORY, "Marking the page lookup table pages as reserved StartPage: %d PageCount: %d\n", PageLookupTableStartPage, PageLookupTablePageCount); + MmMarkPagesInLookupTable(PageLookupTable, PageLookupTableStartPage, PageLookupTablePageCount, LoaderFirmwareTemporary); } VOID MmMarkPagesInLookupTable(PVOID PageLookupTable, ULONG StartPage, ULONG PageCount, TYPE_OF_MEMORY PageAllocated) @@ -474,30 +444,6 @@ return 0; } -VOID MmFixupSystemMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG* MapCount) -{ - UINT32 Index; - UINT32 Index2; - - // Loop through each entry in the array - for (Index=0; Index<*MapCount; Index++) - { - // If the entry type isn't usable then remove - // it from the memory map (this will help reduce - // the size of our lookup table) - if (BiosMemoryMap[Index].Type != BiosMemoryUsable) - { - // Slide every entry after this down one - for (Index2=Index; Index2<(*MapCount - 1); Index2++) - { - BiosMemoryMap[Index2] = BiosMemoryMap[Index2 + 1]; - } - (*MapCount)--; - Index--; - } - } -} - VOID MmUpdateLastFreePageHint(PVOID PageLookupTable, ULONG TotalPageCount) { PPAGE_LOOKUP_TABLE_ITEM RealPageLookupTable = (PPAGE_LOOKUP_TABLE_ITEM)PageLookupTable; Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c [iso-8859-1] Mon Apr 27 00:22:16 2009 @@ -642,7 +642,7 @@ LoaderBlock.DrivesAddr = reactos_arc_disk_info; LoaderBlock.RdAddr = (ULONG_PTR)gRamDiskBase; LoaderBlock.RdLength = gRamDiskSize; - LoaderBlock.MmapLength = (SIZE_T)MachGetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t); + LoaderBlock.MmapLength = (SIZE_T)MachVtbl.GetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t); if (LoaderBlock.MmapLength) { ULONG i; Modified: trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c [iso-8859-1] Mon Apr 27 00:22:16 2009 @@ -72,7 +72,7 @@ LoaderBlock.PageDirectoryEnd = (ULONG_PTR)&PageDirectoryEnd; LoaderBlock.ModsCount = 0; LoaderBlock.ModsAddr = reactos_modules; - LoaderBlock.MmapLength = (unsigned long)MachGetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t); + LoaderBlock.MmapLength = (unsigned long)MachVtbl.GetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t); if (LoaderBlock.MmapLength) { #if defined (_M_IX86) || defined (_M_AMD64) Modified: trunk/reactos/boot/freeldr/freeldr/windows/peloader.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/peloader.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/peloader.c [iso-8859-1] Mon Apr 27 00:22:16 2009 @@ -269,7 +269,7 @@ CHAR ProgressString[256]; /* Inform user we are loading files */ - sprintf(ProgressString, "Loading %s...", FileName); + sprintf(ProgressString, "Loading %s...", strchr(FileName, '\\') + 1); UiDrawProgressBarCenter(1, 100, ProgressString); /* Open the image file */
15 years, 9 months
1
0
0
0
[dgorbachev] 40709: Romanian translations by Petru Dimitriu (petrimetri-at-gmail-dot-com), bug #4422.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Sun Apr 26 21:31:56 2009 New Revision: 40709 URL:
http://svn.reactos.org/svn/reactos?rev=40709&view=rev
Log: Romanian translations by Petru Dimitriu (petrimetri-at-gmail-dot-com), bug #4422. Added: trunk/reactos/base/setup/reactos/lang/ro-RO.rc (with props) trunk/reactos/dll/win32/user32/lang/ro-RO.rc (with props) Modified: trunk/reactos/base/setup/reactos/rsrc.rc trunk/reactos/dll/win32/user32/user32.rc Added: trunk/reactos/base/setup/reactos/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/lang/ro…
============================================================================== --- trunk/reactos/base/setup/reactos/lang/ro-RO.rc (added) +++ trunk/reactos/base/setup/reactos/lang/ro-RO.rc [iso-8859-1] Sun Apr 26 21:31:56 2009 @@ -1,0 +1,151 @@ +LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL + +IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Instalare ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Bun venit la Instalarea ReactOS", IDC_STARTTITLE, 115, 8, 195, 24 + LTEXT "Nu puteti inca instala ReactOS direct de pe acest CD! Reporniti computerul si alegeti", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Clic pe Terminare pentru a iesi.", IDC_STATIC, 115, 169, 195, 17 +END + +IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Instalare ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "IDB_LOGO", IDB_ROSLOGO, "Static", WS_CHILD | WS_VISIBLE | SS_OWNERDRAW, 18, 0, 290, 99 + CONTROL "Limba de instalare:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 109, 106, 11 + CONTROL "", IDC_LANGUAGES, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 132, 107, 176, 142 + CONTROL "Metoda de introducere:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 142, 106, 11 + CONTROL "", IDC_KEYLAYOUT, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 132, 141, 176, 81 + LTEXT "Clic pe Urmatorul pentru a alege tipul instalarii.", IDC_STATIC, 10, 180 ,297, 10 +END + +IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Instalare ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "Tip instalare", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 + CONTROL "Instalare ReactOS", IDC_INSTALL, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 20, 15, 277, 10 + CONTROL "Reparare sau actualizare ReactOS", IDC_SETUP, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 20, 30, 277, 10 + LTEXT "Clic pe Urmator pentru a instala.", IDC_STATIC, 10, 180 ,297, 10 +END + +IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Instalare ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "Setari dispozitiv", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "Computer:", IDC_STATIC, 20,15, 80, 10 + CONTROL "", IDC_COMPUTER, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 15, 180, 80 + LTEXT "Ecran:", IDC_STATIC, 20,35, 80, 10 + CONTROL "", IDC_DISPLAY, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 35, 180, 80 + LTEXT "Tastatura:", IDC_STATIC, 20,55, 80, 10 + CONTROL "", IDC_KEYBOARD, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 55, 180, 80 + LTEXT "Clic pe Urmatorul pentru a instala dispozitivele.", IDC_STATIC, 10, 180 ,277, 20 +END + +IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Instalare ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "Partitia pentru instalarea ReactOS", IDC_STATIC, "Button", BS_GROUPBOX, 10,1,298,176 + LISTBOX IDC_PARTITION, 20,12,278,142,LBS_HASSTRINGS | WS_VSCROLL + PUSHBUTTON "&Creare", IDC_PARTCREATE, 20,155,50,15 + PUSHBUTTON "&Stergere", IDC_PARTDELETE, 76,155,50,15 + PUSHBUTTON "D&river", IDC_DEVICEDRIVER, 162,155,50,15, WS_DISABLED + PUSHBUTTON "&Optiuni avansate...", IDC_PARTMOREOPTS, 218,155,80,15 + LTEXT "Clic pe Urmatorul pentru a afisa sumarul", IDC_STATIC, 10, 180 ,277, 20 +END + +IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +CAPTION "Creare partitie" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "",IDC_UPDOWN1,"msctls_updown32", WS_VISIBLE,104,22,9,13 + CONTROL "Creare si formatare partitie",IDC_STATIC,"Button",BS_GROUPBOX,7,5,129,57 + LTEXT "Marime:",IDC_STATIC, 13,24,27,9 + EDITTEXT IDC_PARTSIZE,52,23,53,13, WS_VISIBLE|WS_TABSTOP + LTEXT "GB",IDC_UNIT, 117,24,14,9 + LTEXT "Sistem de fisiere:",IDC_STATIC,13,46,35,9 + CONTROL "",IDC_FSTYPE,"ComboBox",WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,52,42,79,50 + PUSHBUTTON "&OK",IDOK,35,68,47,15, WS_VISIBLE|WS_TABSTOP + PUSHBUTTON "&Revocare",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP +END + +IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 105 +STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +CAPTION "Setari avansate partitie" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "Folder instalare", IDC_STATIC, "Button", BS_GROUPBOX, 4,1,298,30 + EDITTEXT IDC_PATH, 10,11,278,13, WS_VISIBLE + + CONTROL "Instalare incarcator", IDC_STATIC, "Button", BS_GROUPBOX, 4,36,298,41 + + CONTROL "Instalare incarcator pe hard disc (MBR)", IDC_INSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11 + CONTROL "Nu se instaleaza incarcator", IDC_NOINSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,57,278,11 + PUSHBUTTON "&OK", IDOK, 180,83,50,15, WS_TABSTOP | WS_VISIBLE + PUSHBUTTON "&Revocare", IDCANCEL, 240,83,50,15, WS_TABSTOP | WS_VISIBLE +END + +IDD_SUMMARYPAGE DIALOGEX 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Instalare ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "Rezumat", IDC_ACTION, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "Clic pe Urmatorul pentru a incepe procesul de instalare.", IDC_STATIC, 10, 180 ,277, 20 +END + +IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Instalare ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "Actiune instalare", IDC_ACTION, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "Instalare fisiere...", IDC_ACTIVITY, 20, 50, 277, 10 + LTEXT "test.txt", IDC_ITEM, 30, 80, 257, 10 + CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", + PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 +END + +IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Terminare instalare ReactOS" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "Finalizare prima faza", IDC_FINISHTITLE, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "Ati finalizat cu succes prima faza a instalarii ReactOS", IDC_STATIC, 20, 50, 277, 10 + + LTEXT "Cand veti da clic pe Terminare, computerul va reporni.", IDC_STATIC, 20, 80, 277, 10 + CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 + LTEXT "Daca aveti vreun CD in computer, scoateti-l, dupa care apasati Terminare pentru a reporni.", IDC_STATIC, 10, 180, 297, 20 +END + +STRINGTABLE +BEGIN + IDS_LANGTITLE "Selectie limba" + IDS_LANGSUBTITLE "Alegeti limba pentru instalare si sistem." + IDS_TYPETITLE "Bun venit la instalarea ReactOS" + IDS_TYPESUBTITLE "Alegeti tipul de instalare." + IDS_DEVICETITLE "Instalare dispozitive de baza" + IDS_DEVICESUBTITLE "Instalare tastatura si maus" + IDS_DRIVETITLE "Setare partitie de instalare si folder de sistem" + IDS_DRIVESUBTITLE "Pregatire partitie instalare, folder de sistem si incarcator" + IDS_PROCESSTITLE "Pregatire partitie, copiere fisiere sistem" + IDS_PROCESSSUBTITLE "Creare si formatare partitie, copiere fisiere, instalare incarcator" + IDS_RESTARTTITLE "Prima faza a instalarii terminata" + IDS_RESTARTSUBTITLE "Prima faza a instalarii a fost terminata cu succes, reporniti pentru a incepe a doua faza." + IDS_SUMMARYTITLE "Rezumat instalare" + IDS_SUMMARYSUBTITLE "Afisare rezumat instalare inainte de confirmarea inceperii instalarii" + IDS_ABORTSETUP "ReactOS nu s-a instalat inca complet. Daca parasiti acum procesul de instalare va trebui sa reporniti programul de instalare mai tarziu. Sigur iesiti?" + IDS_ABORTSETUP2 "Parasire instalare?" +END +/* EOF */ Propchange: trunk/reactos/base/setup/reactos/lang/ro-RO.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/base/setup/reactos/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/rsrc.rc…
============================================================================== --- trunk/reactos/base/setup/reactos/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/setup/reactos/rsrc.rc [iso-8859-1] Sun Apr 26 21:31:56 2009 @@ -19,6 +19,7 @@ #include "lang/no-NO.rc" #include "lang/pl-PL.rc" #include "lang/pt-BR.rc" +#include "lang/ro-RO.rc" #include "lang/ru-RU.rc" #include "lang/sk-SK.rc" /*#include "lang/sv-SE.rc" Added: trunk/reactos/dll/win32/user32/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/lang/ro-R…
============================================================================== --- trunk/reactos/dll/win32/user32/lang/ro-RO.rc (added) +++ trunk/reactos/dll/win32/user32/lang/ro-RO.rc [iso-8859-1] Sun Apr 26 21:31:56 2009 @@ -1,0 +1,74 @@ +LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL + +///////////////////////////////////////////////////////////////////////////// +// +// Dialogs +// + +SELWINDOW DIALOGEX DISCARDABLE 20, 20, 220, 140 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU +FONT 8, "MS Shell Dlg" +CAPTION "Alegeti fereastra" +BEGIN + LISTBOX 100, 5, 5, 210, 110, LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL + PUSHBUTTON "&OK", 1, 60, 120, 40, 15, BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "&Revocare", 2, 120, 120, 40, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP +END + +///////////////////////////////////////////////////////////////////////////// +// +// Menus +// + +EDITMENU MENU LOADONCALL MOVEABLE DISCARDABLE +BEGIN + POPUP "DUMMY" + BEGIN + MENUITEM "&Anulare", EM_UNDO + MENUITEM SEPARATOR + MENUITEM "D&ecupare", WM_CUT + MENUITEM "&Copiere", WM_COPY + MENUITEM "&Lipire", WM_PASTE + MENUITEM "&ªtergere", WM_CLEAR + MENUITEM SEPARATOR + MENUITEM "Selectare &totalã", EM_SETSEL + END +END + + +SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE +BEGIN + MENUITEM "&Restabilire", SC_RESTORE + MENUITEM "&Mutare", SC_MOVE + MENUITEM "&Redimensionare", SC_SIZE + MENUITEM "Mi&nimizare", SC_MINIMIZE + MENUITEM "Ma&ximizare", SC_MAXIMIZE + MENUITEM SEPARATOR + MENUITEM "&Închidere\tAlt-F4", SC_CLOSE +END + +///////////////////////////////////////////////////////////////////////////// +// +// Strings +// + +STRINGTABLE +BEGIN + IDS_ERROR, "Eroare" + IDS_OK, "OK" + IDS_CANCEL, "Revocare" + IDS_ABORT, "&Abandon" + IDS_RETRY, "&Reîncercare" + IDS_IGNORE, "&Ignorare" + IDS_YES, "&Da" + IDS_NO, "&Nu" + IDS_HELP, "Ajutor" + IDS_TRYAGAIN, "&Reîncercare" + IDS_CONTINUE, "&Continuare" +END + +STRINGTABLE +BEGIN + IDS_MDI_MOREWINDOWS, "&Mai multe ferestre..." +END Propchange: trunk/reactos/dll/win32/user32/lang/ro-RO.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/user32/user32.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/user32.rc…
============================================================================== --- trunk/reactos/dll/win32/user32/user32.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/user32.rc [iso-8859-1] Sun Apr 26 21:31:56 2009 @@ -92,13 +92,14 @@ #include "lang/fr-FR.rc" #include "lang/hu-HU.rc" #include "lang/id-ID.rc" +#include "lang/it-IT.rc" #include "lang/ja-JP.rc" #include "lang/lt-LT.rc" #include "lang/nl-NL.rc" #include "lang/no-NO.rc" #include "lang/pl-PL.rc" +#include "lang/ro-RO.rc" #include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc" #include "lang/uk-UA.rc" -#include "lang/it-IT.rc"
15 years, 9 months
1
0
0
0
[janderwald] 40708: - Implement KSPROPERTY_PIN_DATARANGES handler- Always return TRUE in FastDeviceHandler (faciliates testing with Vortex AU8820 WDM Driver)
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Apr 26 15:19:12 2009 New Revision: 40708 URL:
http://svn.reactos.org/svn/reactos?rev=40708&view=rev
Log: - Implement KSPROPERTY_PIN_DATARANGES handler- Always return TRUE in FastDeviceHandler (faciliates testing with Vortex AU8820 WDM Driver) Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavepci.c trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.c Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavepci.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavepci.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavepci.c [iso-8859-1] Sun Apr 26 15:19:12 2009 @@ -323,23 +323,17 @@ return FALSE; } - Status = STATUS_UNSUCCESSFUL; for(Index = 0; Index < Descriptor->FilterPropertySet.FreeKsPropertySetOffset; Index++) { if (IsEqualGUIDAligned(&Property->Set, Descriptor->FilterPropertySet.Properties[Index].Set)) { - Status = FastPropertyHandler(FileObject, (PKSPROPERTY)InputBuffer, InputBufferLength, OutputBuffer, OutputBufferLength, StatusBlock, - 1, - &Descriptor->FilterPropertySet.Properties[Index], - Descriptor, SubDevice); - break; + FastPropertyHandler(FileObject, (PKSPROPERTY)InputBuffer, InputBufferLength, OutputBuffer, OutputBufferLength, StatusBlock, + 1, + &Descriptor->FilterPropertySet.Properties[Index], + Descriptor, SubDevice); } } - - if (NT_SUCCESS(Status)) - return TRUE; - else - return FALSE; + return TRUE; } /* Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.c [iso-8859-1] Sun Apr 26 15:19:12 2009 @@ -216,15 +216,19 @@ IN ISubdevice *SubDevice) { PFNKSHANDLER PropertyHandler = NULL; - NTSTATUS Status = STATUS_UNSUCCESSFUL; + NTSTATUS Status; KSP_PIN * Pin; + ULONG Size, Index; + PKSMULTIPLE_ITEM Item; ASSERT(Descriptor); if (!IsEqualGUIDAligned(&Property->Set, &KSPROPSETID_Pin)) { - /* the fast handler only supports pin properties */ + /* the fast handler only supports pin properties atm*/ DPRINT("Only KSPROPSETID_Pin is supported\n"); + IoStatus->Status = Status = STATUS_NOT_IMPLEMENTED; + IoStatus->Information = 0; return Status; } @@ -233,6 +237,8 @@ if (!NT_SUCCESS(Status)) { DPRINT("FindPropertyHandler failed with %x\n", Status); + IoStatus->Status = Status = Status; + IoStatus->Information = 0; return Status; } @@ -269,6 +275,41 @@ IoStatus->Status = Status = STATUS_SUCCESS; IoStatus->Information = sizeof(KSPIN_COMMUNICATION); break; + case KSPROPERTY_PIN_DATARANGES: + Pin = (KSP_PIN*)Property; + if (Pin->PinId >= Descriptor->Factory.PinDescriptorCount) + { + IoStatus->Status = Status = STATUS_INVALID_PARAMETER; + IoStatus->Information = 0; + break; + } + Size = sizeof(KSMULTIPLE_ITEM); + for (Index = 0; Index < Descriptor->Factory.KsPinDescriptor[Pin->PinId].DataRangesCount; Index++) + { + Size += Descriptor->Factory.KsPinDescriptor[Pin->PinId].DataRanges[Index]->FormatSize; + } + + if (DataLength < Size) + { + IoStatus->Information = Size; + IoStatus->Status = STATUS_BUFFER_TOO_SMALL; + break; + } + + Item = (KSMULTIPLE_ITEM*)Data; + Item->Size = Size; + Item->Count = Descriptor->Factory.KsPinDescriptor[Pin->PinId].DataRangesCount; + + Data = (PUCHAR)(Item +1); + for (Index = 0; Index < Descriptor->Factory.KsPinDescriptor[Pin->PinId].DataRangesCount; Index++) + { + RtlMoveMemory(Data, Descriptor->Factory.KsPinDescriptor[Pin->PinId].DataRanges[Index], Descriptor->Factory.KsPinDescriptor[Pin->PinId].DataRanges[Index]->FormatSize); + Data = ((PUCHAR)Data + Descriptor->Factory.KsPinDescriptor[Pin->PinId].DataRanges[Index]->FormatSize); + } + + IoStatus->Status = Status = STATUS_SUCCESS; + IoStatus->Information = Size; + break; case KSPROPERTY_PIN_GLOBALCINSTANCES: Status = HandlePropertyInstances(IoStatus, Property, Data, Descriptor, TRUE); @@ -285,22 +326,22 @@ break; case KSPROPERTY_PIN_PHYSICALCONNECTION: case KSPROPERTY_PIN_CONSTRAINEDDATARANGES: - case KSPROPERTY_PIN_DATARANGES: case KSPROPERTY_PIN_INTERFACES: case KSPROPERTY_PIN_MEDIUMS: case KSPROPERTY_PIN_CATEGORY: case KSPROPERTY_PIN_NAME: case KSPROPERTY_PIN_PROPOSEDATAFORMAT: UNIMPLEMENTED - Status = STATUS_NOT_IMPLEMENTED; + IoStatus->Status = Status = STATUS_NOT_IMPLEMENTED; + IoStatus->Information = 0; break; default: UNIMPLEMENTED - Status = STATUS_NOT_IMPLEMENTED; + IoStatus->Status = Status = STATUS_NOT_IMPLEMENTED; + IoStatus->Information = 0; } return Status; } - NTSTATUS NTAPI
15 years, 9 months
1
0
0
0
[cgutman] 40707: - Free NdisMiniportBlock.Resources when we receive a stop irp
by cgutman@svn.reactos.org
Author: cgutman Date: Sun Apr 26 09:43:06 2009 New Revision: 40707 URL:
http://svn.reactos.org/svn/reactos?rev=40707&view=rev
Log: - Free NdisMiniportBlock.Resources when we receive a stop irp Modified: trunk/reactos/drivers/network/ndis/ndis/miniport.c Modified: trunk/reactos/drivers/network/ndis/ndis/miniport.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] Sun Apr 26 09:43:06 2009 @@ -1971,6 +1971,12 @@ Adapter->NdisMiniportBlock.AllocatedResourcesTranslated = NULL; } + if (Adapter->NdisMiniportBlock.Resources) + { + ExFreePool(Adapter->NdisMiniportBlock.Resources); + Adapter->NdisMiniportBlock.Resources = NULL; + } + if (Adapter->NdisMiniportBlock.EthDB) { EthDeleteFilter(Adapter->NdisMiniportBlock.EthDB);
15 years, 9 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
...
48
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
Results per page:
10
25
50
100
200