ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
May 2015
----- 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
15 participants
500 discussions
Start a n
N
ew thread
[tkreuzer] 67714: [NTOSKRNL] Fix some Interlocked exports for non-x86, export some ARM specific functions [NTDLL] Export some ARM specific functions [SCSIPORT] Fix ARM exports
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu May 14 14:49:41 2015 New Revision: 67714 URL:
http://svn.reactos.org/svn/reactos?rev=67714&view=rev
Log: [NTOSKRNL] Fix some Interlocked exports for non-x86, export some ARM specific functions [NTDLL] Export some ARM specific functions [SCSIPORT] Fix ARM exports Modified: trunk/reactos/dll/ntdll/def/ntdll.spec trunk/reactos/drivers/storage/scsiport/scsiport.spec trunk/reactos/ntoskrnl/ntoskrnl.spec Modified: trunk/reactos/dll/ntdll/def/ntdll.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/def/ntdll.spec?r…
============================================================================== --- trunk/reactos/dll/ntdll/def/ntdll.spec [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/def/ntdll.spec [iso-8859-1] Thu May 14 14:49:41 2015 @@ -716,9 +716,9 @@ @ stdcall RtlIntegerToChar(long long long ptr) @ stdcall RtlIntegerToUnicodeString(long long ptr) @ stdcall -arch=win32 -ret64 RtlInterlockedCompareExchange64(ptr double double) -@ stdcall -arch=i386,x86_64 RtlInterlockedFlushSList(ptr) -@ stdcall -arch=i386,x86_64 RtlInterlockedPopEntrySList(ptr) -@ stdcall -arch=i386,x86_64 RtlInterlockedPushEntrySList(ptr ptr) +@ stdcall RtlInterlockedFlushSList(ptr) +@ stdcall RtlInterlockedPopEntrySList(ptr) +@ stdcall RtlInterlockedPushEntrySList(ptr ptr) @ stdcall RtlIpv4AddressToStringA(ptr ptr) @ stdcall RtlIpv4AddressToStringExA(ptr long ptr ptr) @ stdcall RtlIpv4AddressToStringExW(ptr long ptr ptr) @@ -1272,7 +1272,8 @@ @ cdecl -arch=i386 _CIpow() @ cdecl -arch=i386 _CIsin() @ cdecl -arch=i386 _CIsqrt() -@ cdecl -arch=x86_64 __C_specific_handler(ptr long ptr ptr) +@ cdecl -arch=x86_64,arm __C_specific_handler(ptr long ptr ptr) +@ cdecl -arch=arm __jump_unwind() @ cdecl __isascii(long) @ cdecl __iscsym(long) @ cdecl __iscsymf(long) @@ -1290,7 +1291,7 @@ @ cdecl -arch=i386 -ret64 _aullrem(double double) @ cdecl -arch=i386 _aullshr() @ extern -arch=i386 _chkstk -@ cdecl -arch=i386,x86_64 _fltused() +@ cdecl -arch=i386,x86_64,arm _fltused() @ cdecl -arch=i386 -ret64 _ftol() @ cdecl _i64toa(double ptr long) @ cdecl _i64tow(double ptr long) @@ -1334,10 +1335,10 @@ @ cdecl atoi(str) @ cdecl atol(str) @ cdecl bsearch(ptr ptr long long ptr) -@ cdecl -arch=i386,x86_64 ceil(double) -@ cdecl -arch=i386,x86_64 cos(double) -@ cdecl -arch=i386,x86_64 fabs(double) -@ cdecl -arch=i386,x86_64 floor(double) +@ cdecl ceil(double) +@ cdecl cos(double) +@ cdecl fabs(double) +@ cdecl floor(double) @ cdecl isalnum(long) @ cdecl isalpha(long) @ cdecl iscntrl(long) @@ -1366,7 +1367,7 @@ @ cdecl memset(ptr long long) @ cdecl -arch=i386,x86_64 pow(double double) @ cdecl qsort(ptr long long ptr) -@ cdecl -arch=i386,x86_64 sin(double) +@ cdecl sin(double) @ varargs sprintf(ptr str) @ cdecl -arch=i386,x86_64 sqrt(double) @ varargs sscanf(str str) @@ -1410,3 +1411,14 @@ @ cdecl wcstol(wstr ptr long) @ cdecl wcstombs(ptr ptr long) @ cdecl wcstoul(wstr ptr long) + +# FIXME: check if this is correct +@ stdcall -arch=arm __dtoi64() +@ stdcall -arch=arm __dtou64() +@ stdcall -arch=arm __i64tod() +@ stdcall -arch=arm __u64tod() +@ stdcall -arch=arm __rt_sdiv() +@ stdcall -arch=arm __rt_sdiv64() +@ stdcall -arch=arm __rt_udiv() +@ stdcall -arch=arm __rt_udiv64() +@ stdcall -arch=arm __rt_srsh() Modified: trunk/reactos/drivers/storage/scsiport/scsiport.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/scsiport/s…
============================================================================== --- trunk/reactos/drivers/storage/scsiport/scsiport.spec [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/scsiport/scsiport.spec [iso-8859-1] Thu May 14 14:49:41 2015 @@ -1,7 +1,7 @@ @ cdecl ScsiDebugPrint() @ stdcall ScsiPortCompleteRequest(ptr long long long long) @ stdcall ScsiPortConvertPhysicalAddressToUlong(long long) -@ stdcall -arch=i386 ScsiPortConvertUlongToPhysicalAddress(long) NTOSKRNL.RtlConvertUlongToLargeInteger +@ stdcall -arch=i386,arm ScsiPortConvertUlongToPhysicalAddress(long) NTOSKRNL.RtlConvertUlongToLargeInteger @ stdcall -arch=x86_64 ScsiPortConvertUlongToPhysicalAddress(long) @ stdcall ScsiPortFlushDma(ptr) @ stdcall ScsiPortFreeDeviceBase(ptr ptr) @@ -17,18 +17,18 @@ @ stdcall ScsiPortLogError(ptr ptr long long long long long) @ stdcall ScsiPortMoveMemory(ptr ptr long) @ cdecl ScsiPortNotification() -@ stdcall -arch=i386 ScsiPortReadPortBufferUchar(ptr ptr long) HAL.READ_PORT_BUFFER_UCHAR -@ stdcall -arch=i386 ScsiPortReadPortBufferUshort(ptr ptr long) HAL.READ_PORT_BUFFER_USHORT -@ stdcall -arch=i386 ScsiPortReadPortBufferUlong(ptr ptr long) HAL.READ_PORT_BUFFER_ULONG -@ stdcall -arch=i386 ScsiPortReadPortUchar(ptr) HAL.READ_PORT_UCHAR -@ stdcall -arch=i386 ScsiPortReadPortUshort(ptr) HAL.READ_PORT_USHORT -@ stdcall -arch=i386 ScsiPortReadPortUlong(ptr) HAL.READ_PORT_ULONG -@ stdcall -arch=i386 ScsiPortReadRegisterBufferUchar(ptr ptr long) NTOSKRNL.READ_REGISTER_BUFFER_UCHAR -@ stdcall -arch=i386 ScsiPortReadRegisterBufferUshort(ptr ptr long) NTOSKRNL.READ_REGISTER_BUFFER_USHORT -@ stdcall -arch=i386 ScsiPortReadRegisterBufferUlong(ptr ptr long) NTOSKRNL.READ_REGISTER_BUFFER_ULONG -@ stdcall -arch=i386 ScsiPortReadRegisterUchar(ptr) NTOSKRNL.READ_REGISTER_UCHAR -@ stdcall -arch=i386 ScsiPortReadRegisterUshort(ptr) NTOSKRNL.READ_REGISTER_USHORT -@ stdcall -arch=i386 ScsiPortReadRegisterUlong(ptr) NTOSKRNL.READ_REGISTER_ULONG +@ stdcall -arch=i386,arm ScsiPortReadPortBufferUchar(ptr ptr long) HAL.READ_PORT_BUFFER_UCHAR +@ stdcall -arch=i386,arm ScsiPortReadPortBufferUshort(ptr ptr long) HAL.READ_PORT_BUFFER_USHORT +@ stdcall -arch=i386,arm ScsiPortReadPortBufferUlong(ptr ptr long) HAL.READ_PORT_BUFFER_ULONG +@ stdcall -arch=i386,arm ScsiPortReadPortUchar(ptr) HAL.READ_PORT_UCHAR +@ stdcall -arch=i386,arm ScsiPortReadPortUshort(ptr) HAL.READ_PORT_USHORT +@ stdcall -arch=i386,arm ScsiPortReadPortUlong(ptr) HAL.READ_PORT_ULONG +@ stdcall -arch=i386,arm ScsiPortReadRegisterBufferUchar(ptr ptr long) NTOSKRNL.READ_REGISTER_BUFFER_UCHAR +@ stdcall -arch=i386,arm ScsiPortReadRegisterBufferUshort(ptr ptr long) NTOSKRNL.READ_REGISTER_BUFFER_USHORT +@ stdcall -arch=i386,arm ScsiPortReadRegisterBufferUlong(ptr ptr long) NTOSKRNL.READ_REGISTER_BUFFER_ULONG +@ stdcall -arch=i386,arm ScsiPortReadRegisterUchar(ptr) NTOSKRNL.READ_REGISTER_UCHAR +@ stdcall -arch=i386,arm ScsiPortReadRegisterUshort(ptr) NTOSKRNL.READ_REGISTER_USHORT +@ stdcall -arch=i386,arm ScsiPortReadRegisterUlong(ptr) NTOSKRNL.READ_REGISTER_ULONG @ stdcall -arch=x86_64 ScsiPortReadPortBufferUchar(ptr ptr long) @ stdcall -arch=x86_64 ScsiPortReadPortBufferUshort(ptr ptr long) @ stdcall -arch=x86_64 ScsiPortReadPortBufferUlong(ptr ptr long) @@ -44,18 +44,18 @@ @ stdcall ScsiPortSetBusDataByOffset(ptr long long long ptr long long) @ stdcall ScsiPortStallExecution(long) HAL.KeStallExecutionProcessor @ stdcall ScsiPortValidateRange(ptr long long long long long long) -@ stdcall -arch=i386 ScsiPortWritePortBufferUchar(ptr ptr long) HAL.WRITE_PORT_BUFFER_UCHAR -@ stdcall -arch=i386 ScsiPortWritePortBufferUshort(ptr ptr long) HAL.WRITE_PORT_BUFFER_USHORT -@ stdcall -arch=i386 ScsiPortWritePortBufferUlong(ptr ptr long) HAL.WRITE_PORT_BUFFER_ULONG -@ stdcall -arch=i386 ScsiPortWritePortUchar(ptr long) HAL.WRITE_PORT_UCHAR -@ stdcall -arch=i386 ScsiPortWritePortUshort(ptr long) HAL.WRITE_PORT_USHORT -@ stdcall -arch=i386 ScsiPortWritePortUlong(ptr long) HAL.WRITE_PORT_ULONG -@ stdcall -arch=i386 ScsiPortWriteRegisterBufferUchar(ptr ptr long) NTOSKRNL.WRITE_REGISTER_BUFFER_UCHAR -@ stdcall -arch=i386 ScsiPortWriteRegisterBufferUshort(ptr ptr long) NTOSKRNL.WRITE_REGISTER_BUFFER_USHORT -@ stdcall -arch=i386 ScsiPortWriteRegisterBufferUlong(ptr ptr long) NTOSKRNL.WRITE_REGISTER_BUFFER_ULONG -@ stdcall -arch=i386 ScsiPortWriteRegisterUchar(ptr long) NTOSKRNL.WRITE_REGISTER_UCHAR -@ stdcall -arch=i386 ScsiPortWriteRegisterUshort(ptr long) NTOSKRNL.WRITE_REGISTER_USHORT -@ stdcall -arch=i386 ScsiPortWriteRegisterUlong(ptr long) NTOSKRNL.WRITE_REGISTER_ULONG +@ stdcall -arch=i386,arm ScsiPortWritePortBufferUchar(ptr ptr long) HAL.WRITE_PORT_BUFFER_UCHAR +@ stdcall -arch=i386,arm ScsiPortWritePortBufferUshort(ptr ptr long) HAL.WRITE_PORT_BUFFER_USHORT +@ stdcall -arch=i386,arm ScsiPortWritePortBufferUlong(ptr ptr long) HAL.WRITE_PORT_BUFFER_ULONG +@ stdcall -arch=i386,arm ScsiPortWritePortUchar(ptr long) HAL.WRITE_PORT_UCHAR +@ stdcall -arch=i386,arm ScsiPortWritePortUshort(ptr long) HAL.WRITE_PORT_USHORT +@ stdcall -arch=i386,arm ScsiPortWritePortUlong(ptr long) HAL.WRITE_PORT_ULONG +@ stdcall -arch=i386,arm ScsiPortWriteRegisterBufferUchar(ptr ptr long) NTOSKRNL.WRITE_REGISTER_BUFFER_UCHAR +@ stdcall -arch=i386,arm ScsiPortWriteRegisterBufferUshort(ptr ptr long) NTOSKRNL.WRITE_REGISTER_BUFFER_USHORT +@ stdcall -arch=i386,arm ScsiPortWriteRegisterBufferUlong(ptr ptr long) NTOSKRNL.WRITE_REGISTER_BUFFER_ULONG +@ stdcall -arch=i386,arm ScsiPortWriteRegisterUchar(ptr long) NTOSKRNL.WRITE_REGISTER_UCHAR +@ stdcall -arch=i386,arm ScsiPortWriteRegisterUshort(ptr long) NTOSKRNL.WRITE_REGISTER_USHORT +@ stdcall -arch=i386,arm ScsiPortWriteRegisterUlong(ptr long) NTOSKRNL.WRITE_REGISTER_ULONG @ stdcall -arch=x86_64 ScsiPortWritePortBufferUchar(ptr ptr long) @ stdcall -arch=x86_64 ScsiPortWritePortBufferUshort(ptr ptr long) @ stdcall -arch=x86_64 ScsiPortWritePortBufferUlong(ptr ptr long) Modified: trunk/reactos/ntoskrnl/ntoskrnl.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.spec?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ntoskrnl.spec [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ntoskrnl.spec [iso-8859-1] Thu May 14 14:49:41 2015 @@ -100,27 +100,27 @@ @ stdcall ExInitializeRundownProtectionCacheAware(ptr long) @ stdcall ExInitializeZone(ptr long ptr long) @ stdcall ExInterlockedAddLargeInteger(ptr long long ptr) -@ fastcall -arch=i386,arm ExInterlockedAddLargeStatistic(ptr long) +@ fastcall -arch=i386 ExInterlockedAddLargeStatistic(ptr long) @ stdcall ExInterlockedAddUlong(ptr long ptr) @ fastcall -arch=i386 ExInterlockedCompareExchange64(ptr ptr ptr ptr) @ stdcall -arch=i386 ExInterlockedDecrementLong(ptr ptr) @ stdcall -arch=i386 ExInterlockedExchangeUlong(ptr long ptr) @ stdcall ExInterlockedExtendZone(ptr ptr long ptr) -@ fastcall -arch=i386,arm ExInterlockedFlushSList(ptr) -@ stdcall -arch=i386,arm ExInterlockedIncrementLong(ptr ptr) +@ fastcall -arch=i386 ExInterlockedFlushSList(ptr) +@ stdcall -arch=i386 ExInterlockedIncrementLong(ptr ptr) @ stdcall ExInterlockedInsertHeadList(ptr ptr ptr) @ stdcall ExInterlockedInsertTailList(ptr ptr ptr) @ stdcall ExInterlockedPopEntryList(ptr ptr) -@ fastcall -arch=i386,arm ExInterlockedPopEntrySList(ptr ptr) +@ fastcall -arch=i386 ExInterlockedPopEntrySList(ptr ptr) @ stdcall ExInterlockedPushEntryList(ptr ptr ptr) -@ fastcall -arch=i386,arm ExInterlockedPushEntrySList(ptr ptr ptr) +@ fastcall -arch=i386 ExInterlockedPushEntrySList(ptr ptr ptr) @ stdcall ExInterlockedRemoveHeadList(ptr ptr) @ stdcall ExIsProcessorFeaturePresent(long) @ stdcall ExIsResourceAcquiredExclusiveLite(ptr) @ stdcall ExIsResourceAcquiredSharedLite(ptr) @ stdcall ExLocalTimeToSystemTime(ptr ptr) @ stdcall ExNotifyCallback(ptr ptr ptr) -@ stdcall -arch=x86_64 ExQueryDepthSList(ptr) +@ stdcall -arch=x86_64,arm ExQueryDepthSList(ptr) RtlQueryDepthSList @ stdcall ExQueryPoolBlockSize(ptr ptr) @ stdcall ExQueueWorkItem(ptr long) @ stdcall ExRaiseAccessViolation() @@ -159,21 +159,21 @@ @ extern ExWindowStationObjectType @ fastcall ExfAcquirePushLockExclusive(ptr) @ fastcall ExfAcquirePushLockShared(ptr) -@ fastcall -arch=i386,arm ExfInterlockedAddUlong(ptr long ptr) -@ fastcall -arch=i386,arm ExfInterlockedCompareExchange64(ptr ptr ptr) -@ fastcall -arch=i386,arm ExfInterlockedInsertHeadList(ptr ptr ptr) -@ fastcall -arch=i386,arm ExfInterlockedInsertTailList(ptr ptr ptr) -@ fastcall -arch=i386,arm ExfInterlockedPopEntryList(ptr ptr) -@ fastcall -arch=i386,arm ExfInterlockedPushEntryList(ptr ptr ptr) -@ fastcall -arch=i386,arm ExfInterlockedRemoveHeadList(ptr ptr) +@ fastcall -arch=i386 ExfInterlockedAddUlong(ptr long ptr) +@ fastcall -arch=i386 ExfInterlockedCompareExchange64(ptr ptr ptr) +@ fastcall -arch=i386 ExfInterlockedInsertHeadList(ptr ptr ptr) +@ fastcall -arch=i386 ExfInterlockedInsertTailList(ptr ptr ptr) +@ fastcall -arch=i386 ExfInterlockedPopEntryList(ptr ptr) +@ fastcall -arch=i386 ExfInterlockedPushEntryList(ptr ptr ptr) +@ fastcall -arch=i386 ExfInterlockedRemoveHeadList(ptr ptr) @ fastcall ExfReleasePushLock(ptr) @ fastcall ExfReleasePushLockExclusive(ptr) @ fastcall ExfReleasePushLockShared(ptr) @ fastcall ExfTryToWakePushLock(ptr) @ fastcall ExfUnblockPushLock(ptr ptr) -@ stdcall -arch=x86_64 ExpInterlockedFlushSList(ptr) -@ stdcall -arch=x86_64 ExpInterlockedPopEntrySList(ptr ptr) -@ stdcall -arch=x86_64 ExpInterlockedPushEntrySList(ptr ptr) +@ stdcall -arch=x86_64,arm ExpInterlockedFlushSList(ptr) RtlInterlockedFlushSList +@ stdcall -arch=x86_64,arm ExpInterlockedPopEntrySList(ptr ptr) RtlInterlockedPopEntrySList +@ stdcall -arch=x86_64,arm ExpInterlockedPushEntrySList(ptr ptr) RtlInterlockedPushEntrySList @ fastcall -arch=i386 Exfi386InterlockedDecrementLong(ptr) @ fastcall -arch=i386 Exfi386InterlockedExchangeUlong(ptr long) @ fastcall -arch=i386 Exfi386InterlockedIncrementLong(ptr) @@ -324,8 +324,10 @@ @ fastcall -arch=i386,arm InterlockedExchange(ptr long) @ fastcall -arch=i386,arm InterlockedExchangeAdd(ptr long) @ fastcall -arch=i386,arm InterlockedIncrement(ptr) -@ fastcall -arch=i386,arm InterlockedPopEntrySList(ptr) -@ fastcall -arch=i386,arm InterlockedPushEntrySList(ptr ptr) +@ fastcall -arch=i386 InterlockedPopEntrySList(ptr) +@ fastcall -arch=i386 InterlockedPushEntrySList(ptr ptr) +@ stdcall -arch=arm InterlockedPopEntrySList(ptr) RtlInterlockedPopEntrySList +@ stdcall -arch=arm InterlockedPushEntrySList(ptr ptr) RtlInterlockedPushEntrySList @ stdcall -arch=x86_64 InitializeSListHead(ptr) RtlInitializeSListHead @ stdcall IoAcquireCancelSpinLock(ptr) @ stdcall IoAcquireRemoveLockEx(ptr ptr str long long) @@ -582,6 +584,7 @@ @ stdcall KeFindConfigurationEntry(ptr long long ptr) @ stdcall KeFindConfigurationNextEntry(ptr long long ptr ptr) @ stdcall KeFlushEntireTb(long long) +@ stdcall -arch=arm KeFlushIoBuffers(ptr long long) @ stdcall KeFlushQueuedDpcs() @ stdcall KeGenericCallDpc(ptr ptr) @ stdcall KeGetCurrentThread() @@ -1535,7 +1538,8 @@ @ stdcall ZwWaitForSingleObject(ptr long ptr) @ stdcall ZwWriteFile(ptr ptr ptr ptr ptr ptr long ptr ptr) @ stdcall ZwYieldExecution() -@ cdecl -arch=x86_64 __C_specific_handler(ptr long ptr ptr) +@ cdecl -arch=x86_64,arm __C_specific_handler(ptr long ptr ptr) +@ cdecl -arch=arm __jump_unwind() @ cdecl -arch=x86_64 __chkstk() ;@ cdecl -arch=x86_64 __misaligned_access() ;@ cdecl -arch=i386 _CIcos @@ -1561,7 +1565,7 @@ @ cdecl -arch=i386,arm _local_unwind2() @ cdecl -arch=x86_64 _local_unwind() @ cdecl _purecall() -@ cdecl -arch=x86_64 _setjmp(ptr ptr) +@ cdecl -arch=x86_64,arm _setjmp(ptr ptr) @ cdecl -arch=x86_64 _setjmpex(ptr ptr) @ cdecl _snprintf() @ cdecl _snwprintf() @@ -1588,7 +1592,7 @@ @ cdecl isspace() @ cdecl isupper() @ cdecl isxdigit() -@ cdecl -arch=x86_64 longjmp(ptr long) +@ cdecl -arch=x86_64,arm longjmp(ptr long) @ cdecl mbstowcs() @ cdecl mbtowc() @ cdecl memchr() @@ -1633,3 +1637,14 @@ @ cdecl wcsstr() @ cdecl wcstombs() @ cdecl wctomb() + +# FIXME: check if this is correct +@ stdcall -arch=arm __dtoi64() +@ stdcall -arch=arm __dtou64() +@ stdcall -arch=arm __i64tod() +@ stdcall -arch=arm __u64tod() +@ stdcall -arch=arm __rt_sdiv() +@ stdcall -arch=arm __rt_sdiv64() +@ stdcall -arch=arm __rt_udiv() +@ stdcall -arch=arm __rt_udiv64() +@ stdcall -arch=arm __rt_srsh()
9 years, 7 months
1
0
0
0
[ekohl] 67713: [PARPORT] Implement basic funtions of the parallel port driver. It supports Centronics-Mode only. You can print files using: copy <filename> lpt1:
by ekohl@svn.reactos.org
Author: ekohl Date: Thu May 14 14:42:05 2015 New Revision: 67713 URL:
http://svn.reactos.org/svn/reactos?rev=67713&view=rev
Log: [PARPORT] Implement basic funtions of the parallel port driver. It supports Centronics-Mode only. You can print files using: copy <filename> lpt1: Added: trunk/reactos/drivers/parallel/parport/fdo.c (with props) trunk/reactos/drivers/parallel/parport/misc.c (with props) trunk/reactos/drivers/parallel/parport/pdo.c (with props) Modified: trunk/reactos/drivers/parallel/parport/CMakeLists.txt trunk/reactos/drivers/parallel/parport/parport.c trunk/reactos/drivers/parallel/parport/parport.h Modified: trunk/reactos/drivers/parallel/parport/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/parallel/parport/C…
============================================================================== --- trunk/reactos/drivers/parallel/parport/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/drivers/parallel/parport/CMakeLists.txt [iso-8859-1] Thu May 14 14:42:05 2015 @@ -1,5 +1,16 @@ -add_library(parport SHARED parport.c parport.rc) +list(APPEND SOURCE + fdo.c + misc.c + pdo.c + parport.c + parport.h) + +add_library(parport SHARED + ${SOURCE} + parport.rc) + set_module_type(parport kernelmodedriver) +add_pch(parport parport.h SOURCE) add_importlibs(parport ntoskrnl hal) add_cd_file(TARGET parport DESTINATION reactos/system32/drivers FOR all) Added: trunk/reactos/drivers/parallel/parport/fdo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/parallel/parport/f…
============================================================================== --- trunk/reactos/drivers/parallel/parport/fdo.c (added) +++ trunk/reactos/drivers/parallel/parport/fdo.c [iso-8859-1] Thu May 14 14:42:05 2015 @@ -0,0 +1,572 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: Parallel Port Function Driver + * FILE: drivers/parallel/parport/fdo.c + * PURPOSE: FDO functions + */ + +#include "parport.h" + +/* + * The following constants describe the various signals of the printer port + * hardware. Note that the hardware inverts some signals and that some + * signals are active low. An example is LP_STROBE, which must be programmed + * with 1 for being active and 0 for being inactive, because the strobe signal + * gets inverted, but it is also active low. + */ + +/* + * bit defines for 8255 status port + * base + 1 + * accessed with LP_S(minor), which gets the byte... + */ +#define LP_PBUSY 0x80 /* inverted input, active high */ +#define LP_PACK 0x40 /* unchanged input, active low */ +#define LP_POUTPA 0x20 /* unchanged input, active high */ +#define LP_PSELECD 0x10 /* unchanged input, active high */ +#define LP_PERRORP 0x08 /* unchanged input, active low */ + +/* + * defines for 8255 control port + * base + 2 + * accessed with LP_C(minor) + */ +#define LP_PINTEN 0x10 +#define LP_PSELECP 0x08 /* inverted output, active low */ +#define LP_PINITP 0x04 /* unchanged output, active low */ +#define LP_PAUTOLF 0x02 /* inverted output, active low */ +#define LP_PSTROBE 0x01 /* inverted output, active low */ + + +/* FUNCTIONS ****************************************************************/ + +NTSTATUS +NTAPI +AddDeviceInternal(IN PDRIVER_OBJECT DriverObject, + IN PDEVICE_OBJECT Pdo, + IN PULONG pLptPortNumber OPTIONAL, + OUT PDEVICE_OBJECT* pFdo OPTIONAL) +{ + PFDO_DEVICE_EXTENSION DeviceExtension = NULL; + PDEVICE_OBJECT Fdo = NULL; + WCHAR DeviceNameBuffer[32]; + UNICODE_STRING DeviceName; + NTSTATUS Status; + + DPRINT("AddDeviceInternal()\n"); + + ASSERT(DriverObject); + ASSERT(Pdo); + + /* Create new device object */ + swprintf(DeviceNameBuffer, + L"\\Device\\ParallelPort%lu", + IoGetConfigurationInformation()->ParallelCount); + RtlInitUnicodeString(&DeviceName, + DeviceNameBuffer); + + Status = IoCreateDevice(DriverObject, + sizeof(FDO_DEVICE_EXTENSION), + &DeviceName, + FILE_DEVICE_PARALLEL_PORT, + FILE_DEVICE_SECURE_OPEN, + FALSE, + &Fdo); + if (!NT_SUCCESS(Status)) + { + DPRINT1("IoCreateDevice() failed (Status 0x%08lx)\n", Status); + Fdo = NULL; + goto done; + } + + DeviceExtension = (PFDO_DEVICE_EXTENSION)Fdo->DeviceExtension; + RtlZeroMemory(DeviceExtension, + sizeof(FDO_DEVICE_EXTENSION)); + + DeviceExtension->Common.IsFDO = TRUE; + DeviceExtension->Common.PnpState = dsStopped; + + DeviceExtension->ParallelPortNumber = IoGetConfigurationInformation()->ParallelCount++; + if (pLptPortNumber == NULL) + DeviceExtension->LptPort = DeviceExtension->ParallelPortNumber + 1; + else + DeviceExtension->LptPort = *pLptPortNumber; + DeviceExtension->Pdo = Pdo; + + Status = IoAttachDeviceToDeviceStackSafe(Fdo, + Pdo, + &DeviceExtension->LowerDevice); + if (!NT_SUCCESS(Status)) + { + DPRINT1("IoAttachDeviceToDeviceStackSafe() failed (Status 0x%08lx)\n", Status); + goto done; + } + + if (DeviceExtension->LowerDevice->Flags & DO_POWER_PAGABLE) + Fdo->Flags |= DO_POWER_PAGABLE; + + if (DeviceExtension->LowerDevice->Flags & DO_BUFFERED_IO) + Fdo->Flags |= DO_BUFFERED_IO; + + if (DeviceExtension->LowerDevice->Flags & DO_DIRECT_IO) + Fdo->Flags |= DO_DIRECT_IO; + + /* Choose default strategy */ + if ((Fdo->Flags & (DO_BUFFERED_IO | DO_DIRECT_IO)) == 0) + Fdo->Flags |= DO_BUFFERED_IO; + + Fdo->Flags &= ~DO_DEVICE_INITIALIZING; + + if (pFdo) + { + *pFdo = Fdo; + } + + return STATUS_SUCCESS; + +done: + if (Fdo) + { + IoDeleteDevice(Fdo); + } + + return Status; +} + + +NTSTATUS +NTAPI +FdoStartDevice(IN PDEVICE_OBJECT DeviceObject, + IN PCM_RESOURCE_LIST ResourceList, + IN PCM_RESOURCE_LIST ResourceListTranslated) +{ + PFDO_DEVICE_EXTENSION DeviceExtension; + WCHAR DeviceNameBuffer[32]; + WCHAR LinkNameBuffer[32]; + WCHAR LptPortBuffer[32]; + UNICODE_STRING DeviceName; + UNICODE_STRING LinkName; + UNICODE_STRING LptPort; + ULONG i; +// ULONG Vector = 0; +// KIRQL Dirql = 0; +// KAFFINITY Affinity = 0; +// KINTERRUPT_MODE InterruptMode = Latched; +// BOOLEAN ShareInterrupt = TRUE; + OBJECT_ATTRIBUTES ObjectAttributes; + UNICODE_STRING KeyName; + HANDLE KeyHandle; + NTSTATUS Status; + + DPRINT("FdoStartDevice ()\n"); + + DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + + ASSERT(DeviceExtension); + ASSERT(DeviceExtension->Common.IsFDO == TRUE); + + if (!ResourceList) + { + DPRINT1("No allocated resources sent to driver\n"); + return STATUS_INSUFFICIENT_RESOURCES; + } + + if (ResourceList->Count != 1) + { + DPRINT1("Wrong number of allocated resources sent to driver\n"); + return STATUS_INSUFFICIENT_RESOURCES; + } + + if ((ResourceList->List[0].PartialResourceList.Version != 1) || + (ResourceList->List[0].PartialResourceList.Revision != 1) || + (ResourceListTranslated->List[0].PartialResourceList.Version != 1) || + (ResourceListTranslated->List[0].PartialResourceList.Revision != 1)) + { + DPRINT1("Revision mismatch: %u.%u != 1.1 or %u.%u != 1.1\n", + ResourceList->List[0].PartialResourceList.Version, + ResourceList->List[0].PartialResourceList.Revision, + ResourceListTranslated->List[0].PartialResourceList.Version, + ResourceListTranslated->List[0].PartialResourceList.Revision); + return STATUS_REVISION_MISMATCH; + } + + DeviceExtension->BaseAddress = 0; + + for (i = 0; i < ResourceList->List[0].PartialResourceList.Count; i++) + { + PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor = &ResourceList->List[0].PartialResourceList.PartialDescriptors[i]; + PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptorTranslated = &ResourceListTranslated->List[0].PartialResourceList.PartialDescriptors[i]; + + switch (PartialDescriptor->Type) + { + case CmResourceTypePort: + DPRINT("Port: BaseAddress 0x%lx Length %lu\n", + PartialDescriptor->u.Port.Start.u.LowPart, + PartialDescriptor->u.Port.Length); + + if (DeviceExtension->BaseAddress == 0) + { + if (PartialDescriptor->u.Port.Length < 8) + return STATUS_INSUFFICIENT_RESOURCES; + + DeviceExtension->BaseAddress = PartialDescriptor->u.Port.Start.u.LowPart; + } + break; + + case CmResourceTypeInterrupt: + DPRINT("Interrupt: Level %lu Vector %lu\n", + PartialDescriptorTranslated->u.Interrupt.Level, + PartialDescriptorTranslated->u.Interrupt.Vector); + +// Dirql = (KIRQL)PartialDescriptorTranslated->u.Interrupt.Level; +// Vector = PartialDescriptorTranslated->u.Interrupt.Vector; +// Affinity = PartialDescriptorTranslated->u.Interrupt.Affinity; + +// if (PartialDescriptorTranslated->Flags & CM_RESOURCE_INTERRUPT_LATCHED) +// InterruptMode = Latched; +// else +// InterruptMode = LevelSensitive; + +// ShareInterrupt = (PartialDescriptorTranslated->ShareDisposition == CmResourceShareShared); + break; + + default: + DPRINT1("Other ressource: \n"); + break; + } + } + + DPRINT("New LPT port: Base 0x%lx\n", + DeviceExtension->BaseAddress); + + if (!DeviceExtension->BaseAddress) + return STATUS_INSUFFICIENT_RESOURCES; + +#if 0 + if (!Dirql) + return STATUS_INSUFFICIENT_RESOURCES; +#endif + + /* Create link \DosDevices\LPTX -> \Device\ParallelPortX */ + swprintf(DeviceNameBuffer, L"\\Device\\ParallelPort%lu", DeviceExtension->ParallelPortNumber); + swprintf(LinkNameBuffer, L"\\DosDevices\\LPT%lu", DeviceExtension->LptPort); + swprintf(LptPortBuffer, L"LPT%lu", DeviceExtension->LptPort); + RtlInitUnicodeString(&DeviceName, DeviceNameBuffer); + RtlInitUnicodeString(&LinkName, LinkNameBuffer); + RtlInitUnicodeString(&LptPort, LptPortBuffer); + Status = IoCreateSymbolicLink(&LinkName, + &DeviceName); + if (!NT_SUCCESS(Status)) + { + DPRINT1("IoCreateSymbolicLink() failed with status 0x%08x\n", Status); + return Status; + } + + + /* Write an entry value under HKLM\HARDWARE\DeviceMap\PARALLEL PORTS. */ + /* This step is not mandatory, so do not exit in case of error. */ + RtlInitUnicodeString(&KeyName, + L"\\Registry\\Machine\\HARDWARE\\DeviceMap\\PARALLEL PORTS"); + InitializeObjectAttributes(&ObjectAttributes, + &KeyName, + OBJ_CASE_INSENSITIVE, + NULL, + NULL); + + Status = ZwCreateKey(&KeyHandle, + KEY_SET_VALUE, + &ObjectAttributes, + 0, + NULL, + REG_OPTION_VOLATILE, + NULL); + if (NT_SUCCESS(Status)) + { + /* Key = \Device\Parallelx, Value = LPTx */ + ZwSetValueKey(KeyHandle, + &DeviceName, + 0, + REG_SZ, + LptPortBuffer, + LptPort.Length + sizeof(WCHAR)); + ZwClose(KeyHandle); + } + + DeviceExtension->Common.PnpState = dsStarted; + + + /* We don't really care if the call succeeded or not... */ + + return STATUS_SUCCESS; +} + + +/* PUBLIC FUNCTIONS *********************************************************/ + +NTSTATUS +NTAPI +AddDevice(IN PDRIVER_OBJECT DriverObject, + IN PDEVICE_OBJECT Pdo) +{ + DPRINT("AddDevice(%p %p)\n", DriverObject, Pdo); + + /* Serial.sys is a legacy driver. AddDevice is called once + * with a NULL Pdo just after the driver initialization. + * Detect this case and return success. + */ + if (Pdo == NULL) + return STATUS_SUCCESS; + + /* We have here a PDO not null. It represents a real serial + * port. So call the internal AddDevice function. + */ + return AddDeviceInternal(DriverObject, Pdo, NULL, NULL); +} + + +NTSTATUS +NTAPI +FdoCreate(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + PFDO_DEVICE_EXTENSION DeviceExtension; + PIO_STACK_LOCATION Stack; + NTSTATUS Status = STATUS_SUCCESS; + + DPRINT("FdoCreate()\n"); + + Stack = IoGetCurrentIrpStackLocation(Irp); + DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + + if (Stack->Parameters.Create.Options & FILE_DIRECTORY_FILE) + { + DPRINT1("Not a directory\n"); + Status = STATUS_NOT_A_DIRECTORY; + goto done; + } + + DPRINT("Open LPT%lu: successful\n", DeviceExtension->LptPort); + DeviceExtension->OpenCount++; + +done: + Irp->IoStatus.Status = Status; + Irp->IoStatus.Information = 0; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + + return Status; +} + + +NTSTATUS +NTAPI +FdoClose(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + PFDO_DEVICE_EXTENSION pDeviceExtension; + + DPRINT("FdoClose()\n"); + + pDeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + pDeviceExtension->OpenCount--; + + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + + return STATUS_SUCCESS; +} + + +NTSTATUS +NTAPI +FdoCleanup(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT("FdoCleanup()\n"); + + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + + return STATUS_SUCCESS; +} + + +NTSTATUS +NTAPI +FdoWrite(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + PFDO_DEVICE_EXTENSION DeviceExtension; + PIO_STACK_LOCATION IoStack; + PUCHAR Buffer; + ULONG i; + UCHAR PortStatus; + ULONG ulCount; + + DPRINT("FdoWrite()\n"); + + DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + IoStack = IoGetCurrentIrpStackLocation(Irp); + + Buffer = GetUserBuffer(Irp); + DPRINT("Length: %lu\n", IoStack->Parameters.Write.Length); + DPRINT("Buffer: %p\n", Buffer); + + if (Buffer != NULL) + { + DPRINT("%s\n", Buffer); + } + + for (i = 0; i < IoStack->Parameters.Write.Length; i++) + { + DPRINT("%lu: %c\n", i, Buffer[i]); + + ulCount = 0; + + do + { + KeStallExecutionProcessor(10); + PortStatus = READ_PORT_UCHAR((PUCHAR)(DeviceExtension->BaseAddress + 1)); + ulCount++; + } + while (ulCount < 500000 && !(PortStatus & LP_PBUSY)); + + if (ulCount == 500000) + { + DPRINT1("Timed out\n"); + + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_TIMEOUT; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + + return STATUS_TIMEOUT; + } + + /* Write character */ + WRITE_PORT_UCHAR((PUCHAR)DeviceExtension->BaseAddress, Buffer[i]); + + KeStallExecutionProcessor(10); + + WRITE_PORT_UCHAR((PUCHAR)(DeviceExtension->BaseAddress + 2), (LP_PSELECP | LP_PINITP | LP_PSTROBE)); + + KeStallExecutionProcessor(10); + + WRITE_PORT_UCHAR((PUCHAR)(DeviceExtension->BaseAddress + 2), (LP_PSELECP | LP_PINITP)); + } + + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + + return STATUS_SUCCESS; +} + + +NTSTATUS +NTAPI +FdoPnp(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + ULONG MinorFunction; + PIO_STACK_LOCATION Stack; + ULONG_PTR Information = 0; + NTSTATUS Status; + + DPRINT("FdoPnp()\n"); + + Stack = IoGetCurrentIrpStackLocation(Irp); + MinorFunction = Stack->MinorFunction; + + switch (MinorFunction) + { + /* FIXME: do all these minor functions + IRP_MN_QUERY_REMOVE_DEVICE 0x1 + IRP_MN_REMOVE_DEVICE 0x2 + { + TRACE_(SERIAL, "IRP_MJ_PNP / IRP_MN_REMOVE_DEVICE\n"); + IoAcquireRemoveLock + IoReleaseRemoveLockAndWait + pass request to DeviceExtension-LowerDriver + disable interface + IoDeleteDevice(Fdo) and/or IoDetachDevice + break; + } + IRP_MN_CANCEL_REMOVE_DEVICE 0x3 + IRP_MN_STOP_DEVICE 0x4 + IRP_MN_QUERY_STOP_DEVICE 0x5 + IRP_MN_CANCEL_STOP_DEVICE 0x6 + IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations (optional) 0x7 + IRP_MN_QUERY_DEVICE_RELATIONS / RemovalRelations (optional) 0x7 + IRP_MN_QUERY_INTERFACE (optional) 0x8 + IRP_MN_QUERY_CAPABILITIES (optional) 0x9 + IRP_MN_FILTER_RESOURCE_REQUIREMENTS (optional) 0xd + IRP_MN_QUERY_PNP_DEVICE_STATE (optional) 0x14 + IRP_MN_DEVICE_USAGE_NOTIFICATION (required or optional) 0x16 + IRP_MN_SURPRISE_REMOVAL 0x17 + */ + case IRP_MN_START_DEVICE: /* 0x0 */ + DPRINT("IRP_MJ_PNP / IRP_MN_START_DEVICE\n"); + + ASSERT(((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.PnpState == dsStopped); + + /* Call lower driver */ + Status = ForwardIrpAndWait(DeviceObject, Irp); + if (NT_SUCCESS(Status)) + { + Status = FdoStartDevice(DeviceObject, + Stack->Parameters.StartDevice.AllocatedResources, + Stack->Parameters.StartDevice.AllocatedResourcesTranslated); + } + break; + + case IRP_MN_QUERY_DEVICE_RELATIONS: /* (optional) 0x7 */ + switch (Stack->Parameters.QueryDeviceRelations.Type) + { + case BusRelations: + DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations\n"); + return ForwardIrpAndForget(DeviceObject, Irp); + + case RemovalRelations: + DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / RemovalRelations\n"); + return ForwardIrpAndForget(DeviceObject, Irp); + + default: + DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / Unknown type 0x%lx\n", + Stack->Parameters.QueryDeviceRelations.Type); + return ForwardIrpAndForget(DeviceObject, Irp); + } + break; + + case IRP_MN_FILTER_RESOURCE_REQUIREMENTS: /* (optional) 0xd */ + DPRINT1("IRP_MJ_PNP / IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n"); + return ForwardIrpAndForget(DeviceObject, Irp); + + default: + DPRINT1("Unknown minor function 0x%x\n", MinorFunction); + return ForwardIrpAndForget(DeviceObject, Irp); + } + + Irp->IoStatus.Information = Information; + Irp->IoStatus.Status = Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + + return Status; +} + + +NTSTATUS +NTAPI +FdoPower(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT("FdoPower()\n"); + + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + + return STATUS_SUCCESS; +} + +/* EOF */ Propchange: trunk/reactos/drivers/parallel/parport/fdo.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/drivers/parallel/parport/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/parallel/parport/m…
============================================================================== --- trunk/reactos/drivers/parallel/parport/misc.c (added) +++ trunk/reactos/drivers/parallel/parport/misc.c [iso-8859-1] Thu May 14 14:42:05 2015 @@ -0,0 +1,83 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: Parallel Port Function Driver + * FILE: drivers/parallel/parport/misc.c + * PURPOSE: Miscellaneous functions + */ + +#include "parport.h" + + +static IO_COMPLETION_ROUTINE ForwardIrpAndWaitCompletion; + +/* FUNCTIONS ****************************************************************/ + +static +NTSTATUS +NTAPI +ForwardIrpAndWaitCompletion(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp, + IN PVOID Context) +{ + if (Irp->PendingReturned) + KeSetEvent((PKEVENT)Context, IO_NO_INCREMENT, FALSE); + return STATUS_MORE_PROCESSING_REQUIRED; +} + + +NTSTATUS +ForwardIrpAndWait(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + PDEVICE_OBJECT LowerDevice; + KEVENT Event; + NTSTATUS Status; + + LowerDevice = ((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->LowerDevice; + ASSERT(LowerDevice); + + KeInitializeEvent(&Event, NotificationEvent, FALSE); + IoCopyCurrentIrpStackLocationToNext(Irp); + + DPRINT("Calling lower device %p\n", LowerDevice); + IoSetCompletionRoutine(Irp, ForwardIrpAndWaitCompletion, &Event, TRUE, TRUE, TRUE); + + Status = IoCallDriver(LowerDevice, Irp); + if (Status == STATUS_PENDING) + { + Status = KeWaitForSingleObject(&Event, Suspended, KernelMode, FALSE, NULL); + if (NT_SUCCESS(Status)) + Status = Irp->IoStatus.Status; + } + + return Status; +} + + +NTSTATUS +NTAPI +ForwardIrpAndForget(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + PDEVICE_OBJECT LowerDevice; + + LowerDevice = ((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->LowerDevice; + ASSERT(LowerDevice); + + IoSkipCurrentIrpStackLocation(Irp); + return IoCallDriver(LowerDevice, Irp); +} + + +PVOID +GetUserBuffer(IN PIRP Irp) +{ + ASSERT(Irp); + + if (Irp->MdlAddress) + return Irp->MdlAddress; + else + return Irp->AssociatedIrp.SystemBuffer; +} + +/* EOF */ Propchange: trunk/reactos/drivers/parallel/parport/misc.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/drivers/parallel/parport/parport.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/parallel/parport/p…
============================================================================== --- trunk/reactos/drivers/parallel/parport/parport.c [iso-8859-1] (original) +++ trunk/reactos/drivers/parallel/parport/parport.c [iso-8859-1] Thu May 14 14:42:05 2015 @@ -7,7 +7,15 @@ #include "parport.h" static DRIVER_UNLOAD DriverUnload; +static DRIVER_DISPATCH DispatchCreate; +static DRIVER_DISPATCH DispatchClose; +static DRIVER_DISPATCH DispatchCleanup; +static DRIVER_DISPATCH DispatchPnp; +static DRIVER_DISPATCH DispatchPower; DRIVER_INITIALIZE DriverEntry; + + +/* FUNCTIONS ****************************************************************/ static VOID @@ -17,14 +25,109 @@ DPRINT("Parport DriverUnload\n"); } + +static +NTSTATUS +NTAPI +DispatchCreate(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + if (((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.IsFDO) + return FdoCreate(DeviceObject, Irp); + else + return PdoCreate(DeviceObject, Irp); +} + + +static +NTSTATUS +NTAPI +DispatchClose(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + if (((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.IsFDO) + return FdoClose(DeviceObject, Irp); + else + return PdoClose(DeviceObject, Irp); +} + + +static +NTSTATUS +NTAPI +DispatchCleanup(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + if (((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.IsFDO) + return FdoCleanup(DeviceObject, Irp); + else + return PdoCleanup(DeviceObject, Irp); +} + + +static +NTSTATUS +NTAPI +DispatchWrite(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + if (((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.IsFDO) + return FdoWrite(DeviceObject, Irp); + else + return PdoWrite(DeviceObject, Irp); +} + + +static +NTSTATUS +NTAPI +DispatchPnp(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + if (((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.IsFDO) + return FdoPnp(DeviceObject, Irp); + else + return PdoPnp(DeviceObject, Irp); +} + + +static +NTSTATUS +NTAPI +DispatchPower(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + if (((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.IsFDO) + return FdoPower(DeviceObject, Irp); + else + return PdoPower(DeviceObject, Irp); +} + + NTSTATUS NTAPI DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegPath) { + ULONG i; + DPRINT("Parport DriverEntry\n"); DriverObject->DriverUnload = DriverUnload; + DriverObject->DriverExtension->AddDevice = AddDevice; + + for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++) + DriverObject->MajorFunction[i] = ForwardIrpAndForget; + + DriverObject->MajorFunction[IRP_MJ_CREATE] = DispatchCreate; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = DispatchClose; + DriverObject->MajorFunction[IRP_MJ_CLEANUP] = DispatchCleanup; +// DriverObject->MajorFunction[IRP_MJ_READ] = DispatchRead; + DriverObject->MajorFunction[IRP_MJ_WRITE] = DispatchWrite; +// DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = DispatchDeviceControl; +// DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = DispatchQueryInformation; + DriverObject->MajorFunction[IRP_MJ_PNP] = DispatchPnp; + DriverObject->MajorFunction[IRP_MJ_POWER] = DispatchPower; return STATUS_SUCCESS; } Modified: trunk/reactos/drivers/parallel/parport/parport.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/parallel/parport/p…
============================================================================== --- trunk/reactos/drivers/parallel/parport/parport.h [iso-8859-1] (original) +++ trunk/reactos/drivers/parallel/parport/parport.h [iso-8859-1] Thu May 14 14:42:05 2015 @@ -8,9 +8,131 @@ #define _PARPORT_PCH_ #include <ntddk.h> -#include <ntddser.h> +#include <ndk/haltypes.h> +#include <ntddpar.h> +#include <stdio.h> //#define NDEBUG #include <debug.h> +typedef enum +{ + dsStopped, + dsStarted, + dsPaused, + dsRemoved, + dsSurpriseRemoved +} DEVICE_STATE; + +typedef struct _COMMON_DEVICE_EXTENSION +{ + BOOLEAN IsFDO; + DEVICE_STATE PnpState; +} COMMON_DEVICE_EXTENSION, *PCOMMON_DEVICE_EXTENSION; + +typedef struct _FDO_DEVICE_EXTENSION +{ + COMMON_DEVICE_EXTENSION Common; + + PDEVICE_OBJECT Pdo; + PDEVICE_OBJECT LowerDevice; + + ULONG ParallelPortNumber; + + ULONG LptPort; + ULONG OpenCount; + + ULONG BaseAddress; + PKINTERRUPT Interrupt; + +} FDO_DEVICE_EXTENSION, *PFDO_DEVICE_EXTENSION; + +typedef struct _PDO_DEVICE_EXTENSION +{ + COMMON_DEVICE_EXTENSION Common; + +} PDO_DEVICE_EXTENSION, *PPDO_DEVICE_EXTENSION; + + +/* fdo.c */ + +DRIVER_ADD_DEVICE AddDevice; + +NTSTATUS +NTAPI +FdoCreate(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +NTSTATUS +NTAPI +FdoClose(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +NTSTATUS +NTAPI +FdoCleanup(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +NTSTATUS +NTAPI +FdoWrite(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +NTSTATUS +NTAPI +FdoPnp(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +NTSTATUS +NTAPI +FdoPower(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + + +/* misc.c */ + +NTSTATUS +ForwardIrpAndWait(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +DRIVER_DISPATCH ForwardIrpAndForget; + +PVOID +GetUserBuffer(IN PIRP Irp); + +//KSERVICE_ROUTINE ParportInterruptService; + + +/* pdo.c */ + +NTSTATUS +NTAPI +PdoCreate(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +NTSTATUS +NTAPI +PdoClose(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +NTSTATUS +NTAPI +PdoCleanup(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +NTSTATUS +NTAPI +PdoWrite(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +NTSTATUS +NTAPI +PdoPnp(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +NTSTATUS +NTAPI +PdoPower(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + #endif /* _PARPORT_PCH_ */ Added: trunk/reactos/drivers/parallel/parport/pdo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/parallel/parport/p…
============================================================================== --- trunk/reactos/drivers/parallel/parport/pdo.c (added) +++ trunk/reactos/drivers/parallel/parport/pdo.c [iso-8859-1] Thu May 14 14:42:05 2015 @@ -0,0 +1,95 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: Parallel Port Function Driver + * FILE: drivers/parallel/parport/pdo.c + * PURPOSE: PDO functions + */ + +#include "parport.h" + +/* FUNCTIONS ****************************************************************/ + +NTSTATUS +NTAPI +PdoCreate(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT("PdoCreate()\n"); + + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_SUCCESS; +} + + +NTSTATUS +NTAPI +PdoClose(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT("PdoClose()\n"); + + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_SUCCESS; +} + + +NTSTATUS +NTAPI +PdoCleanup(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT("PdoCleanup()\n"); + + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_SUCCESS; +} + + +NTSTATUS +NTAPI +PdoWrite(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT("PdoWrite()\n"); + + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_SUCCESS; +} + + +NTSTATUS +NTAPI +PdoPnp(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT("PdoPnp()\n"); + + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_SUCCESS; +} + + +NTSTATUS +NTAPI +PdoPower(IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + DPRINT("PdoPower()\n"); + + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_SUCCESS; +} + +/* EOF */ Propchange: trunk/reactos/drivers/parallel/parport/pdo.c ------------------------------------------------------------------------------ svn:eol-style = native
9 years, 7 months
1
0
0
0
[tfaber] 67712: [ADVAPI32_WINETEST] - Replace test_reg_query_info with the upstream version as promised in r67424. CORE-6976
by tfaber@svn.reactos.org
Author: tfaber Date: Thu May 14 13:08:07 2015 New Revision: 67712 URL:
http://svn.reactos.org/svn/reactos?rev=67712&view=rev
Log: [ADVAPI32_WINETEST] - Replace test_reg_query_info with the upstream version as promised in r67424. CORE-6976 Modified: trunk/rostests/winetests/advapi32/registry.c Modified: trunk/rostests/winetests/advapi32/registry.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/regist…
============================================================================== --- trunk/rostests/winetests/advapi32/registry.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/registry.c [iso-8859-1] Thu May 14 13:08:07 2015 @@ -1676,6 +1676,8 @@ LONG ret; char classbuffer[32]; WCHAR classbufferW[32]; + char expectbuffer[32]; + WCHAR expectbufferW[32]; char subkey_class[] = "subkey class"; WCHAR subkey_classW[] = {'s','u','b','k','e','y',' ','c','l','a','s','s',0}; char subsubkey_class[] = "subsubkey class"; @@ -1688,12 +1690,30 @@ ret = RegCreateKeyExA(hkey_main, "subkey", 0, subkey_class, 0, KEY_ALL_ACCESS, NULL, &subkey, NULL); ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - /* invalid parameters */ + /* all parameters NULL */ ret = RegQueryInfoKeyA(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); ok(ret == ERROR_INVALID_HANDLE, "ret = %d\n", ret); + ret = RegQueryInfoKeyW(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + ok(ret == ERROR_INVALID_HANDLE, "ret = %d\n", ret); + + /* not requesting any information */ ret = RegQueryInfoKeyA(subkey, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); + + ret = RegQueryInfoKeyW(subkey, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); + + /* class without length is invalid */ + memset(classbuffer, 0x55, sizeof(classbuffer)); + ret = RegQueryInfoKeyA(subkey, classbuffer, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + ok(ret == ERROR_INVALID_PARAMETER, "ret = %d\n", ret); + ok(classbuffer[0] == 0x55, "classbuffer[0] = 0x%x\n", classbuffer[0]); + + memset(classbufferW, 0x55, sizeof(classbufferW)); + ret = RegQueryInfoKeyW(subkey, classbufferW, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + ok(ret == ERROR_INVALID_PARAMETER, "ret = %d\n", ret); + ok(classbufferW[0] == 0x5555, "classbufferW[0] = 0x%x\n", classbufferW[0]); /* empty key */ ret = RegQueryInfoKeyA(subkey, NULL, &classlen, NULL, &subkeys, &maxsubkeylen, &maxclasslen, &values, &maxvaluenamelen, &maxvaluelen, &sdlen, &lastwrite); @@ -1725,12 +1745,12 @@ ret = RegCreateKeyExA(subkey, "subsubkey", 0, subsubkey_class, 0, KEY_ALL_ACCESS, NULL, &subsubkey, NULL); ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ret = RegSetValueExA(subkey, NULL, 0, REG_SZ, (BYTE*)"data", 5); + ret = RegSetValueExA(subkey, NULL, 0, REG_SZ, (const BYTE*)"data", 5); ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); /* with subkey & default value */ ret = RegQueryInfoKeyA(subkey, NULL, &classlen, NULL, &subkeys, &maxsubkeylen, &maxclasslen, &values, &maxvaluenamelen, &maxvaluelen, &sdlen, &lastwrite); - ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); + todo_wine ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); ok(classlen == strlen(subkey_class), "classlen = %u\n", classlen); ok(subkeys == 1, "subkeys = %u\n", subkeys); ok(maxsubkeylen == strlen("subsubkey"), "maxsubkeylen = %u\n", maxsubkeylen); @@ -1755,15 +1775,15 @@ ok(lastwrite.dwLowDateTime != 0, "lastwrite.dwLowDateTime = %u\n", lastwrite.dwLowDateTime); ok(lastwrite.dwHighDateTime != 0, "lastwrite.dwHighDateTime = %u\n", lastwrite.dwHighDateTime); - ret = RegSetValueExA(subkey, "value one", 0, REG_SZ, (BYTE*)"first value data", 17); + ret = RegSetValueExA(subkey, "value one", 0, REG_SZ, (const BYTE*)"first value data", 17); ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); - ret = RegSetValueExA(subkey, "value 2", 0, REG_SZ, (BYTE*)"second value data", 18); + ret = RegSetValueExA(subkey, "value 2", 0, REG_SZ, (const BYTE*)"second value data", 18); ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret); /* with named value */ ret = RegQueryInfoKeyA(subkey, NULL, &classlen, NULL, &subkeys, &maxsubkeylen, &maxclasslen, &values, &maxvaluenamelen, &maxvaluelen, &sdlen, &lastwrite); - ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); + todo_wine ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); ok(values == 3, "values = %u\n", values); ok(maxvaluenamelen == strlen("value one"), "maxvaluenamelen = %u\n", maxvaluenamelen); ok(maxvaluelen == sizeof("second value data") * sizeof(WCHAR), "maxvaluelen = %u\n", maxvaluelen); @@ -1778,56 +1798,62 @@ memset(classbuffer, 0x55, sizeof(classbuffer)); classlen = 0; ret = RegQueryInfoKeyA(subkey, classbuffer, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); - ok(classlen == 0, "classlen = %u\n", classlen); - ok(classbuffer[0] == 0x55, "classbuffer[0] = 0x%x\n", classbuffer[0]); + todo_wine ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); + ok(classlen == strlen(subkey_class) /* win2k */ || + classlen == 0, "classlen = %u\n", classlen); + memset(expectbuffer, 0x55, sizeof(expectbuffer)); + ok(!memcmp(classbuffer, expectbuffer, sizeof(classbuffer)), "classbuffer was modified\n"); memset(classbufferW, 0x55, sizeof(classbufferW)); classlen = 0; ret = RegQueryInfoKeyW(subkey, classbufferW, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); - ok(classlen == 0, "classlen = %u\n", classlen); - ok(classbufferW[0] == 0x5555, "classbufferW[0] = 0x%x\n", classbufferW[0]); + todo_wine ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); + ok(classlen == strlen(subkey_class) /* win2k */ || + classlen == 0, "classlen = %u\n", classlen); + memset(expectbufferW, 0x55, sizeof(expectbufferW)); + ok(!memcmp(classbufferW, expectbufferW, sizeof(classbufferW)), "classbufferW was modified\n"); /* class name with one char buffer */ memset(classbuffer, 0x55, sizeof(classbuffer)); classlen = 1; ret = RegQueryInfoKeyA(subkey, classbuffer, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); ok(ret == ERROR_MORE_DATA, "ret = %d\n", ret); - ok(classlen == 0, "classlen = %u\n", classlen); - ok(classbuffer[0] == 0, "classbuffer[0] = 0x%x\n", classbuffer[0]); - ok(classbuffer[1] == 0x55, "classbuffer[1] = 0x%x\n", classbuffer[1]); + todo_wine ok(classlen == 0, "classlen = %u\n", classlen); + memset(expectbuffer, 0x55, sizeof(expectbuffer)); + expectbuffer[0] = 0; + todo_wine ok(!memcmp(classbuffer, expectbuffer, sizeof(classbuffer)), "classbuffer was modified\n"); memset(classbufferW, 0x55, sizeof(classbufferW)); classlen = 1; ret = RegQueryInfoKeyW(subkey, classbufferW, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_INSUFFICIENT_BUFFER, "ret = %d\n", ret); - ok(classlen == strlen(subkey_class), "classlen = %u\n", classlen); - ok(classbufferW[0] == 0x5555, "classbufferW[0] = 0x%x\n", classbufferW[0]); - ok(classbufferW[1] == 0x5555, "classbufferW[1] = 0x%x\n", classbufferW[1]); + todo_wine ok(ret == ERROR_INSUFFICIENT_BUFFER, "ret = %d\n", ret); + ok(classlen == 0 /* win8 */ || + classlen == strlen(subkey_class), "classlen = %u\n", classlen); + memset(expectbufferW, 0x55, sizeof(expectbufferW)); + ok(!memcmp(classbufferW, expectbufferW, sizeof(classbufferW)), "classbufferW was modified\n"); /* class name with buffer one char too small */ memset(classbuffer, 0x55, sizeof(classbuffer)); classlen = sizeof(subkey_class) - 1; ret = RegQueryInfoKeyA(subkey, classbuffer, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); ok(ret == ERROR_MORE_DATA, "ret = %d\n", ret); - ok(classlen == sizeof(subkey_class) - 2, "classlen = %u\n", classlen); - ok(classbuffer[0] == 's', "classbuffer[0] = 0x%x\n", classbuffer[0]); - ok(classbuffer[1] == 'u', "classbuffer[1] = 0x%x\n", classbuffer[1]); - ok(classbuffer[10] == 's', "classbuffer[10] = 0x%x\n", classbuffer[10]); - ok(classbuffer[11] == 0, "classbuffer[11] = 0x%x\n", classbuffer[11]); - ok(classbuffer[12] == 0x55, "classbuffer[12] = 0x%x\n", classbuffer[12]); + todo_wine ok(classlen == sizeof(subkey_class) - 2, "classlen = %u\n", classlen); + memset(expectbuffer, 0x55, sizeof(expectbuffer)); + strcpy(expectbuffer, subkey_class); + expectbuffer[sizeof(subkey_class) - 2] = 0; + expectbuffer[sizeof(subkey_class) - 1] = 0x55; + todo_wine ok(!memcmp(classbuffer, expectbuffer, sizeof(classbuffer)), + "classbuffer = %.*s, expected %s\n", + (int)sizeof(classbuffer), classbuffer, expectbuffer); memset(classbufferW, 0x55, sizeof(classbufferW)); classlen = sizeof(subkey_class) - 1; ret = RegQueryInfoKeyW(subkey, classbufferW, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); - ok(ret == ERROR_INSUFFICIENT_BUFFER, "ret = %d\n", ret); - ok(classlen == strlen(subkey_class), "classlen = %u\n", classlen); - ok(classbufferW[0] == 0x5555, "classbufferW[0] = 0x%x\n", classbufferW[0]); - ok(classbufferW[1] == 0x5555, "classbufferW[1] = 0x%x\n", classbufferW[1]); - ok(classbufferW[10] == 0x5555, "classbufferW[10] = 0x%x\n", classbufferW[10]); - ok(classbufferW[11] == 0x5555, "classbufferW[11] = 0x%x\n", classbufferW[11]); - ok(classbufferW[12] == 0x5555, "classbufferW[12] = 0x%x\n", classbufferW[12]); + todo_wine ok(ret == ERROR_INSUFFICIENT_BUFFER, "ret = %d\n", ret); + ok(classlen == sizeof(subkey_class) - 2 /* win8 */ || + classlen == strlen(subkey_class), "classlen = %u\n", classlen); + memset(expectbufferW, 0x55, sizeof(expectbufferW)); + ok(!memcmp(classbufferW, expectbufferW, sizeof(classbufferW)), "classbufferW was modified\n"); /* class name with large enough buffer */ memset(classbuffer, 0x55, sizeof(classbuffer)); @@ -1835,18 +1861,22 @@ ret = RegQueryInfoKeyA(subkey, classbuffer, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); ok(classlen == sizeof(subkey_class) - 1, "classlen = %u\n", classlen); - ok(!strcmp(classbuffer, subkey_class), "classbuffer = %s\n", classbuffer); - ok(classbuffer[12] == 0, "classbuffer[12] = 0x%x\n", classbuffer[12]); - ok(classbuffer[13] == 0x55, "classbuffer[13] = 0x%x\n", classbuffer[13]); + memset(expectbuffer, 0x55, sizeof(expectbuffer)); + strcpy(expectbuffer, subkey_class); + ok(!memcmp(classbuffer, expectbuffer, sizeof(classbuffer)), + "classbuffer = \"%.*s\", expected %s\n", + (int)sizeof(classbuffer), classbuffer, expectbuffer); memset(classbufferW, 0x55, sizeof(classbufferW)); classlen = sizeof(subkey_class); ret = RegQueryInfoKeyW(subkey, classbufferW, &classlen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); ok(ret == ERROR_SUCCESS, "ret = %d\n", ret); ok(classlen == sizeof(subkey_class) - 1, "classlen = %u\n", classlen); - ok(!lstrcmpW(classbufferW, subkey_classW), "classbufferW = %s\n", wine_dbgstr_w(classbufferW)); - ok(classbufferW[12] == 0, "classbufferW[12] = 0x%x\n", classbufferW[12]); - ok(classbufferW[13] == 0x5555, "classbufferW[13] = 0x%x\n", classbufferW[13]); + memset(expectbufferW, 0x55, sizeof(expectbufferW)); + lstrcpyW(expectbufferW, subkey_classW); + ok(!memcmp(classbufferW, expectbufferW, sizeof(classbufferW)), + "classbufferW = %s, expected %s\n", + wine_dbgstr_wn(classbufferW, sizeof(classbufferW) / sizeof(WCHAR)), wine_dbgstr_w(expectbufferW)); RegDeleteKeyA(subsubkey, ""); RegCloseKey(subsubkey);
9 years, 7 months
1
0
0
0
[tfaber] 67711: [ADVAPI32] - Add parameter check to RegQueryInfoKeyA CORE-6976
by tfaber@svn.reactos.org
Author: tfaber Date: Thu May 14 13:02:49 2015 New Revision: 67711 URL:
http://svn.reactos.org/svn/reactos?rev=67711&view=rev
Log: [ADVAPI32] - Add parameter check to RegQueryInfoKeyA CORE-6976 Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg…
============================================================================== --- trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] Thu May 14 13:02:49 2015 @@ -3604,6 +3604,11 @@ NTSTATUS Status; DWORD cClass = 0; + if ((lpClass) && (!lpcClass)) + { + return ERROR_INVALID_PARAMETER; + } + RtlInitUnicodeString(&UnicodeString, NULL); if (lpClass != NULL)
9 years, 7 months
1
0
0
0
[tkreuzer] 67710: [CRT] Add stubs for __stoi64 and __stou64
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu May 14 10:20:08 2015 New Revision: 67710 URL:
http://svn.reactos.org/svn/reactos?rev=67710&view=rev
Log: [CRT] Add stubs for __stoi64 and __stou64 Added: trunk/reactos/lib/sdk/crt/math/arm/__stoi64.s (with props) trunk/reactos/lib/sdk/crt/math/arm/__stou64.s (with props) Added: trunk/reactos/lib/sdk/crt/math/arm/__stoi64.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/arm/__sto…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/arm/__stoi64.s (added) +++ trunk/reactos/lib/sdk/crt/math/arm/__stoi64.s [iso-8859-1] Thu May 14 10:20:08 2015 @@ -0,0 +1,24 @@ +/* + * COPYRIGHT: BSD - See COPYING.ARM in the top level directory + * PROJECT: ReactOS CRT library + * PURPOSE: Implementation of __stoi64 + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <kxarm.h> + +/* CODE **********************************************************************/ + + TEXTAREA + + LEAF_ENTRY __stoi64 + + __assertfail + bx lr + + LEAF_END __stoi64 + + END +/* EOF */ Propchange: trunk/reactos/lib/sdk/crt/math/arm/__stoi64.s ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/lib/sdk/crt/math/arm/__stou64.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/arm/__sto…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/arm/__stou64.s (added) +++ trunk/reactos/lib/sdk/crt/math/arm/__stou64.s [iso-8859-1] Thu May 14 10:20:08 2015 @@ -0,0 +1,24 @@ +/* + * COPYRIGHT: BSD - See COPYING.ARM in the top level directory + * PROJECT: ReactOS CRT library + * PURPOSE: Implementation of __stou64 + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <kxarm.h> + +/* CODE **********************************************************************/ + + TEXTAREA + + LEAF_ENTRY __stou64 + + __assertfail + bx lr + + LEAF_END __stou64 + + END +/* EOF */ Propchange: trunk/reactos/lib/sdk/crt/math/arm/__stou64.s ------------------------------------------------------------------------------ svn:eol-style = native
9 years, 7 months
1
0
0
0
[tkreuzer] 67709: [D3DX9_36/WINED3D] - Remove useless copysignf invocation and the wrong defines for it - BrokenHacksOnTopOfBrokenCode--; - Should be sent upstream
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu May 14 10:00:37 2015 New Revision: 67709 URL:
http://svn.reactos.org/svn/reactos?rev=67709&view=rev
Log: [D3DX9_36/WINED3D] - Remove useless copysignf invocation and the wrong defines for it - BrokenHacksOnTopOfBrokenCode--; - Should be sent upstream Modified: trunk/reactos/dll/directx/wine/d3dx9_36/math.c trunk/reactos/dll/directx/wine/wined3d/utils.c Modified: trunk/reactos/dll/directx/wine/d3dx9_36/math.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3dx9_36/…
============================================================================== --- trunk/reactos/dll/directx/wine/d3dx9_36/math.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/d3dx9_36/math.c [iso-8859-1] Thu May 14 10:00:37 2015 @@ -24,10 +24,6 @@ #include "d3dx9_36_private.h" -#ifdef _MSC_VER -#define copysignf(x, y) ((x) < 0.0f ? -fabsf(y) : fabsf(y)) -#endif - struct ID3DXMatrixStackImpl { ID3DXMatrixStack ID3DXMatrixStack_iface; @@ -2122,7 +2118,7 @@ { int exp = 0, origexp; float tmp = fabsf(in); - int sign = (copysignf(1, in) < 0); + int sign = (in < 0); unsigned int mantissa; unsigned short ret; Modified: trunk/reactos/dll/directx/wine/wined3d/utils.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/wined3d/u…
============================================================================== --- trunk/reactos/dll/directx/wine/wined3d/utils.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/wined3d/utils.c [iso-8859-1] Thu May 14 10:00:37 2015 @@ -25,10 +25,6 @@ */ #include "wined3d_private.h" - -#ifdef _MSC_VER -#define copysignf(x, y) ((x) < 0.0f ? -fabsf(y) : fabsf(y)) -#endif WINE_DEFAULT_DEBUG_CHANNEL(d3d); @@ -3991,7 +3987,7 @@ { int idx = 1; - if (copysignf(1.0f, value) < 0.0f) + if (value < 0.0f) ++idx; /* Be sure to allocate a buffer of at least 17 characters for the result
9 years, 7 months
1
0
0
0
[aandrejevic] 67708: [FAST486] - Make Fast486ReadMemory and Fast486WriteMemory FASTCALL. - Fix build when FAST486_NO_FPU is defined.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Wed May 13 23:26:25 2015 New Revision: 67708 URL:
http://svn.reactos.org/svn/reactos?rev=67708&view=rev
Log: [FAST486] - Make Fast486ReadMemory and Fast486WriteMemory FASTCALL. - Fix build when FAST486_NO_FPU is defined. Modified: trunk/reactos/lib/fast486/common.c trunk/reactos/lib/fast486/common.h trunk/reactos/lib/fast486/fpu.c Modified: trunk/reactos/lib/fast486/common.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fast486/common.c?rev=6…
============================================================================== --- trunk/reactos/lib/fast486/common.c [iso-8859-1] (original) +++ trunk/reactos/lib/fast486/common.c [iso-8859-1] Wed May 13 23:26:25 2015 @@ -32,6 +32,7 @@ /* PUBLIC FUNCTIONS ***********************************************************/ BOOLEAN +FASTCALL Fast486ReadMemory(PFAST486_STATE State, FAST486_SEG_REGS SegmentReg, ULONG Offset, @@ -156,6 +157,7 @@ } BOOLEAN +FASTCALL Fast486WriteMemory(PFAST486_STATE State, FAST486_SEG_REGS SegmentReg, ULONG Offset, Modified: trunk/reactos/lib/fast486/common.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fast486/common.h?rev=6…
============================================================================== --- trunk/reactos/lib/fast486/common.h [iso-8859-1] (original) +++ trunk/reactos/lib/fast486/common.h [iso-8859-1] Wed May 13 23:26:25 2015 @@ -137,6 +137,7 @@ /* FUNCTIONS ******************************************************************/ BOOLEAN +FASTCALL Fast486ReadMemory ( PFAST486_STATE State, @@ -148,6 +149,7 @@ ); BOOLEAN +FASTCALL Fast486WriteMemory ( PFAST486_STATE State, Modified: trunk/reactos/lib/fast486/fpu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fast486/fpu.c?rev=6770…
============================================================================== --- trunk/reactos/lib/fast486/fpu.c [iso-8859-1] (original) +++ trunk/reactos/lib/fast486/fpu.c [iso-8859-1] Wed May 13 23:26:25 2015 @@ -1044,8 +1044,10 @@ { FAST486_MOD_REG_RM ModRegRm; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; +#ifndef FAST486_NO_FPU PFAST486_FPU_DATA_REG SourceOperand, DestOperand; FAST486_FPU_DATA_REG MemoryData; +#endif TOGGLE_ADSIZE(AddressSize); @@ -1692,9 +1694,11 @@ { FAST486_MOD_REG_RM ModRegRm; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; +#ifndef FAST486_NO_FPU PFAST486_FPU_DATA_REG SourceOperand, DestOperand; LONG Value; FAST486_FPU_DATA_REG MemoryData; +#endif TOGGLE_ADSIZE(AddressSize); @@ -2013,8 +2017,10 @@ { FAST486_MOD_REG_RM ModRegRm; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; +#ifndef FAST486_NO_FPU PFAST486_FPU_DATA_REG SourceOperand, DestOperand; FAST486_FPU_DATA_REG MemoryData; +#endif TOGGLE_ADSIZE(AddressSize); @@ -2389,7 +2395,9 @@ { FAST486_MOD_REG_RM ModRegRm; BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; +#ifndef FAST486_NO_FPU PFAST486_FPU_DATA_REG SourceOperand, DestOperand; +#endif TOGGLE_ADSIZE(AddressSize);
9 years, 7 months
1
0
0
0
[aandrejevic] 67707: [NTVDM] Fill the part of the buffer that was supposed to receive memory data above the MAX_ADDRESS with 0xFF.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Wed May 13 23:23:17 2015 New Revision: 67707 URL:
http://svn.reactos.org/svn/reactos?rev=67707&view=rev
Log: [NTVDM] Fill the part of the buffer that was supposed to receive memory data above the MAX_ADDRESS with 0xFF. Modified: trunk/reactos/subsystems/mvdm/ntvdm/emulator.c Modified: trunk/reactos/subsystems/mvdm/ntvdm/emulator.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/emul…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/emulator.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/emulator.c [iso-8859-1] Wed May 13 23:23:17 2015 @@ -73,8 +73,16 @@ /* If the A20 line is disabled, mask bit 20 */ if (!A20Line) Address &= ~(1 << 20); - if (Address >= MAX_ADDRESS) return; - Size = min(Size, MAX_ADDRESS - Address); + if ((Address + Size - 1) >= MAX_ADDRESS) + { + ULONG ExtraStart = (Address < MAX_ADDRESS) ? MAX_ADDRESS - Address : 0; + + /* Fill the memory that was above the limit with 0xFF */ + RtlFillMemory((PVOID)((ULONG_PTR)Buffer + ExtraStart), Size - ExtraStart, 0xFF); + + if (Address < MAX_ADDRESS) Size = MAX_ADDRESS - Address; + else return; + } /* Read while calling fast memory hooks */ MemRead(Address, Buffer, Size);
9 years, 7 months
1
0
0
0
[akhaldi] 67706: [CMAKE] Add a minimum major/minor subsystem version number for ARM. Dedicated to Timo.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed May 13 12:12:20 2015 New Revision: 67706 URL:
http://svn.reactos.org/svn/reactos?rev=67706&view=rev
Log: [CMAKE] Add a minimum major/minor subsystem version number for ARM. Dedicated to Timo. Modified: trunk/reactos/cmake/msvc.cmake Modified: trunk/reactos/cmake/msvc.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=67706…
============================================================================== --- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Wed May 13 12:12:20 2015 @@ -213,6 +213,8 @@ string(TOUPPER ${SUBSYSTEM} _subsystem) if(ARCH STREQUAL "amd64") add_target_link_flags(${MODULE} "/SUBSYSTEM:${_subsystem},5.02") + elseif(ARCH STREQUAL "arm") + add_target_link_flags(${MODULE} "/SUBSYSTEM:${_subsystem},6.02") else() add_target_link_flags(${MODULE} "/SUBSYSTEM:${_subsystem},5.01") endif()
9 years, 7 months
1
0
0
0
[cfinck] 67705: spec2def requires the DLL filename and not the module name in its parameters. Fixes delay-importing spoolss.dll.
by cfinck@svn.reactos.org
Author: cfinck Date: Wed May 13 07:03:05 2015 New Revision: 67705 URL:
http://svn.reactos.org/svn/reactos?rev=67705&view=rev
Log: spec2def requires the DLL filename and not the module name in its parameters. Fixes delay-importing spoolss.dll. Modified: branches/colins-printing-for-freedom/reactos/win32ss/printing/base/spoolss/CMakeLists.txt Modified: branches/colins-printing-for-freedom/reactos/win32ss/printing/base/spoolss/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/colins-printing-for-freedom/rea…
============================================================================== --- branches/colins-printing-for-freedom/reactos/win32ss/printing/base/spoolss/CMakeLists.txt [iso-8859-1] (original) +++ branches/colins-printing-for-freedom/reactos/win32ss/printing/base/spoolss/CMakeLists.txt [iso-8859-1] Wed May 13 07:03:05 2015 @@ -1,5 +1,5 @@ -spec2def(spoolss spoolss.spec ADD_IMPORTLIB) +spec2def(spoolss.dll spoolss.spec ADD_IMPORTLIB) list(APPEND SOURCE context.c
9 years, 7 months
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
50
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Results per page:
10
25
50
100
200