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
October 2017
----- 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
43 participants
275 discussions
Start a n
N
ew thread
[reactos] 02/03: [NDK] Fix/improve definition of TEB This also changes the default definition for NTDDI_VERSION in sdkddkver.h to NTDDI_WS03SP1, when _WIN32_WINNT is _WIN32_WINNT_WS03.
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=95827a70e66a145889844…
commit 95827a70e66a1458898447bef455ac4af9d913d1 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Mon Aug 14 11:02:07 2017 +0200 [NDK] Fix/improve definition of TEB This also changes the default definition for NTDDI_VERSION in sdkddkver.h to NTDDI_WS03SP1, when _WIN32_WINNT is _WIN32_WINNT_WS03. --- sdk/include/ndk/peb_teb.h | 191 ++++++++++++++++++++++++++++++++++++------- sdk/include/psdk/sdkddkver.h | 4 + 2 files changed, 165 insertions(+), 30 deletions(-) diff --git a/sdk/include/ndk/peb_teb.h b/sdk/include/ndk/peb_teb.h index ba70ebc3fb..c52b161dc7 100644 --- a/sdk/include/ndk/peb_teb.h +++ b/sdk/include/ndk/peb_teb.h @@ -1,3 +1,23 @@ +/*++ NDK Version: 0098 + +Copyright (c) Alex Ionescu. All rights reserved. + +Header Name: + + peb_teb.h + +Abstract: + + Definition of PEB/PEB32/PEB64 and TEB/TEB32/TEB64 + +Author: + + Timo Kreuzer (timo.kreuzer(a)reactos.org) + +--*/ + +#include <rtltypes.h> + #define PASTE2(x,y) x##y #define PASTE(x,y) PASTE2(x,y) @@ -13,8 +33,12 @@ #endif #if (defined(_WIN64) && !defined(EXPLICIT_32BIT)) || defined(EXPLICIT_64BIT) + #define _STRUCT64 + #define _SELECT3264(x32, x64) (x64) #define GDI_HANDLE_BUFFER_SIZE 60 #else + #undef _STRUCT64 + #define _SELECT3264(x32, x64) (x32) #define GDI_HANDLE_BUFFER_SIZE 34 #endif @@ -157,7 +181,7 @@ typedef struct STRUCT(_PEB) #undef PPEB -#if defined(_WIN64) && !defined(EXPLICIT_32BIT) +#ifdef _STRUCT64 C_ASSERT(FIELD_OFFSET(STRUCT(PEB), Mutant) == 0x08); C_ASSERT(FIELD_OFFSET(STRUCT(PEB), Ldr) == 0x18); C_ASSERT(FIELD_OFFSET(STRUCT(PEB), FastPebLock) == 0x038); @@ -220,19 +244,49 @@ typedef struct STRUCT(_TEB) PTR(PVOID) WOW32Reserved; LCID CurrentLocale; ULONG FpSoftwareStatusRegister; + +#if (NTDDI_VERSION >= NTDDI_WIN10) // since 10.0.10240.16384 + PTR(PVOID) ReservedForDebuggerInstrumentation[16]; + PTR(PVOID) SystemReserved1[38]; +#else PTR(PVOID) SystemReserved1[54]; +#endif LONG ExceptionCode; -#if (NTDDI_VERSION >= NTDDI_LONGHORN) - PTR(struct _ACTIVATION_CONTEXT_STACK*) ActivationContextStackPointer; - UCHAR SpareBytes1[0x30 - 3 * sizeof(PTR(PVOID))]; - ULONG TxFsContext; -#elif (NTDDI_VERSION >= NTDDI_WS03) - PTR(struct _ACTIVATION_CONTEXT_STACK*) ActivationContextStackPointer; - UCHAR SpareBytes1[0x34 - 3 * sizeof(PTR(PVOID))]; +#ifdef _STRUCT64 + UCHAR Padding0[4]; +#endif + +#if (NTDDI_VERSION >= NTDDI_WS03SP1) + PTR(PACTIVATION_CONTEXT_STACK) ActivationContextStackPointer; #else - ACTIVATION_CONTEXT_STACK ActivationContextStack; - UCHAR SpareBytes1[24]; + STRUCT(ACTIVATION_CONTEXT_STACK) ActivationContextStack; #endif + +#if (NTDDI_VERSION >= NTDDI_WIN10) // since 10.0.9926.0 + PTR(ULONG_PTR) InstrumentationCallbackSp; + PTR(ULONG_PTR) InstrumentationCallbackPreviousPc; + PTR(ULONG_PTR) InstrumentationCallbackPreviousSp; + #ifdef _STRUCT64 + ULONG TxFsContext; + UCHAR InstrumentationCallbackDisabled; + UCHAR Padding1[3]; + #else + UCHAR InstrumentationCallbackDisabled; + UCHAR SpareBytes[23]; + ULONG TxFsContext; + #endif +#elif (NTDDI_VERSION >= NTDDI_WIN7) + UCHAR SpareBytes[_SELECT3264(36, 24)]; + ULONG TxFsContext; +#elif (NTDDI_VERSION >= NTDDI_VISTA) + UCHAR SpareBytes1[_SELECT3264(36, 24)]; + ULONG TxFsContext; +#elif (NTDDI_VERSION >= NTDDI_WS03SP1) + UCHAR SpareBytes1[_SELECT3264(40, 28)]; +#else // only 32 bit version of 2k3 pre-SP1 exist + UCHAR SpareBytes1[_SELECT3264(24, -1)]; +#endif + STRUCT(GDI_TEB_BATCH) GdiTebBatch; STRUCT(CLIENT_ID) RealClientId; PTR(PVOID) GdiCachedProcessHandle; @@ -248,9 +302,15 @@ typedef struct STRUCT(_TEB) PTR(PVOID) glTable; PTR(PVOID) glCurrentRC; PTR(PVOID) glContext; - NTSTATUS LastStatusValue; + ULONG LastStatusValue; +#ifdef _STRUCT64 + UCHAR Padding2[4]; +#endif STRUCT(UNICODE_STRING) StaticUnicodeString; WCHAR StaticUnicodeBuffer[261]; +#ifdef _STRUCT64 + UCHAR Padding3[6]; +#endif PTR(PVOID) DeallocationStack; PTR(PVOID) TlsSlots[64]; STRUCT(LIST_ENTRY) TlsLinks; @@ -262,42 +322,73 @@ typedef struct STRUCT(_TEB) #else ULONG HardErrorsAreDisabled; #endif +#ifdef _STRUCT64 + UCHAR Padding4[4]; +#endif #if (NTDDI_VERSION >= NTDDI_LONGHORN) PTR(PVOID) Instrumentation[13 - sizeof(GUID)/sizeof(PTR(PVOID))]; GUID ActivityId; PTR(PVOID) SubProcessTag; +#if (NTDDI_VERSION >= NTDDI_WIN8) // since ??? + PTR(PVOID) PerflibData; +#else PTR(PVOID) EtwLocalData; +#endif PTR(PVOID) EtwTraceData; #elif (NTDDI_VERSION >= NTDDI_WS03) PTR(PVOID) Instrumentation[14]; PTR(PVOID) SubProcessTag; - PTR(PVOID) EtwLocalData; + PTR(PVOID) EtwTraceData; #else PTR(PVOID) Instrumentation[16]; #endif PTR(PVOID) WinSockData; ULONG GdiBatchCount; -#if (NTDDI_VERSION >= NTDDI_LONGHORN) +#if (NTDDI_VERSION >= NTDDI_WIN10) + union + { + PROCESSOR_NUMBER CurrentIdealProcessor; + ULONG32 IdealProcessorValue; + struct + { + UCHAR ReservedPad0; + UCHAR ReservedPad1; + UCHAR ReservedPad2; + UCHAR IdealProcessor; + }; + }; +#elif (NTDDI_VERSION >= NTDDI_LONGHORN) BOOLEAN SpareBool0; BOOLEAN SpareBool1; BOOLEAN SpareBool2; + UCHAR IdealProcessor; #else BOOLEAN InDbgPrint; BOOLEAN FreeStackOnTermination; BOOLEAN HasFiberData; -#endif UCHAR IdealProcessor; +#endif #if (NTDDI_VERSION >= NTDDI_WS03) ULONG GuaranteedStackBytes; #else ULONG Spare3; +#endif +#ifdef _STRUCT64 + UCHAR Padding5[4]; #endif PTR(PVOID) ReservedForPerf; PTR(PVOID) ReservedForOle; ULONG WaitingOnLoaderLock; +#ifdef _STRUCT64 + UCHAR Padding6[4]; +#endif #if (NTDDI_VERSION >= NTDDI_LONGHORN) PTR(PVOID) SavedPriorityState; +#if (NTDDI_VERSION >= NTDDI_WIN8) + PTR(ULONG_PTR) ReservedForCodeCoverage; +#else PTR(ULONG_PTR) SoftPatchPtr1; +#endif PTR(ULONG_PTR) ThreadPoolData; #elif (NTDDI_VERSION >= NTDDI_WS03) PTR(ULONG_PTR) SparePointer1; @@ -307,35 +398,49 @@ typedef struct STRUCT(_TEB) Wx86ThreadState Wx86Thread; #endif PTR(PVOID*) TlsExpansionSlots; -#if defined(_WIN64) && !defined(EXPLICIT_32BIT) - PTR(PVOID) DeallocationBStore; - PTR(PVOID) BStoreLimit; +#ifdef _STRUCT64 + PTR(PVOID) DeallocationBStore; + PTR(PVOID) BStoreLimit; #endif +#if (NTDDI_VERSION >= NTDDI_WIN10) + ULONG MuiGeneration; +#else ULONG ImpersonationLocale; +#endif ULONG IsImpersonating; PTR(PVOID) NlsCache; PTR(PVOID) pShimData; +#if (NTDDI_VERSION >= NTDDI_WIN8) + USHORT HeapVirtualAffinity; + USHORT LowFragHeapDataSlot; +#else ULONG HeapVirtualAffinity; +#endif +#ifdef _STRUCT64 + UCHAR Padding7[4]; +#endif PTR(HANDLE) CurrentTransactionHandle; PTR(PTEB_ACTIVE_FRAME) ActiveFrame; #if (NTDDI_VERSION >= NTDDI_WS03) - PVOID FlsData; + PTR(PVOID) FlsData; #endif + #if (NTDDI_VERSION >= NTDDI_LONGHORN) - PVOID PreferredLangauges; - PVOID UserPrefLanguages; - PVOID MergedPrefLanguages; + PTR(PVOID) PreferredLanguages; + PTR(PVOID) UserPrefLanguages; + PTR(PVOID) MergedPrefLanguages; ULONG MuiImpersonation; union { + USHORT CrossTebFlags; struct { - USHORT SpareCrossTebFlags:16; + USHORT SpareCrossTebBits:16; }; - USHORT CrossTebFlags; }; union { + USHORT SameTebFlags; struct { USHORT DbgSafeThunkCall:1; @@ -347,23 +452,45 @@ typedef struct STRUCT(_TEB) USHORT DbgClonedThread:1; USHORT SpareSameTebBits:9; }; - USHORT SameTebFlags; }; - PTR(PVOID) TxnScopeEntercallback; - PTR(PVOID) TxnScopeExitCAllback; + PTR(PVOID) TxnScopeEnterCallback; + PTR(PVOID) TxnScopeExitCallback; PTR(PVOID) TxnScopeContext; ULONG LockCount; +#else + BOOLEAN SafeThunkCall; + BOOLEAN BooleanSpare[3]; +#endif + +#if (NTDDI_VERSION >= NTDDI_WIN10) // since 10.0.10041.0 + LONG WowTebOffset; +#elif (NTDDI_VERSION >= NTDDI_WIN7) + ULONG SpareUlong0; +#elif (NTDDI_VERSION >= NTDDI_LONGHORN) ULONG ProcessRundown; +#endif + +#if (NTDDI_VERSION >= NTDDI_WIN7) + PTR(PVOID) ResourceRetValue; +#elif (NTDDI_VERSION >= NTDDI_LONGHORN) ULONG64 LastSwitchTime; ULONG64 TotalSwitchOutTime; LARGE_INTEGER WaitReasonBitMap; -#else - BOOLEAN SafeThunkCall; - BOOLEAN BooleanSpare[3]; #endif + +#if (NTDDI_VERSION >= NTDDI_WIN8) + PTR(PVOID) ReservedForWdf; +#endif + +#if (NTDDI_VERSION >= NTDDI_WIN10) + ULONG64 ReservedForCrt; + GUID EffectiveContainerId; +#endif + } STRUCT(TEB), *STRUCT(PTEB); -#if defined(_WIN64) && !defined(EXPLICIT_32BIT) +#ifdef _STRUCT64 +C_ASSERT(FIELD_OFFSET(STRUCT(TEB), NtTib) == 0x000); C_ASSERT(FIELD_OFFSET(STRUCT(TEB), EnvironmentPointer) == 0x038); C_ASSERT(FIELD_OFFSET(STRUCT(TEB), ExceptionCode) == 0x2C0); C_ASSERT(FIELD_OFFSET(STRUCT(TEB), GdiTebBatch) == 0x2F0); @@ -377,9 +504,11 @@ C_ASSERT(FIELD_OFFSET(STRUCT(TEB), TlsExpansionSlots) == 0x1780); C_ASSERT(FIELD_OFFSET(STRUCT(TEB), WaitingOnLoaderLock) == 0x1760); C_ASSERT(FIELD_OFFSET(STRUCT(TEB), ActiveFrame) == 0x17C0); #else +C_ASSERT(FIELD_OFFSET(STRUCT(TEB), NtTib) == 0x000); C_ASSERT(FIELD_OFFSET(STRUCT(TEB), EnvironmentPointer) == 0x01C); C_ASSERT(FIELD_OFFSET(STRUCT(TEB), ExceptionCode) == 0x1A4); C_ASSERT(FIELD_OFFSET(STRUCT(TEB), GdiTebBatch) == 0x1D4); +C_ASSERT(FIELD_OFFSET(STRUCT(TEB), RealClientId) == 0x6B4); C_ASSERT(FIELD_OFFSET(STRUCT(TEB), LastStatusValue) == 0xBF4); C_ASSERT(FIELD_OFFSET(STRUCT(TEB), Vdm) == 0xF18); C_ASSERT(FIELD_OFFSET(STRUCT(TEB), GdiBatchCount) == 0xF70); @@ -387,6 +516,8 @@ C_ASSERT(FIELD_OFFSET(STRUCT(TEB), TlsExpansionSlots) == 0xF94); C_ASSERT(FIELD_OFFSET(STRUCT(TEB), ActiveFrame) == 0xFB0); #endif +#undef _STRUCT64 +#undef _SELECT3264 #undef PTR #undef STRUCT #undef PASTE diff --git a/sdk/include/psdk/sdkddkver.h b/sdk/include/psdk/sdkddkver.h index 1b923a2237..58160de7d5 100644 --- a/sdk/include/psdk/sdkddkver.h +++ b/sdk/include/psdk/sdkddkver.h @@ -129,8 +129,12 @@ Abstract: #define SUBVER(Version) (((Version) & SUBVERSION_MASK)) /* Macros to get the NTDDI for a given WIN32 */ +#if (_WIN32_WINNT == _WIN32_WINNT_WS03) +#define NTDDI_VERSION_FROM_WIN32_WINNT(Version) NTDDI_WS03SP1 +#else #define NTDDI_VERSION_FROM_WIN32_WINNT2(Version) Version##0000 #define NTDDI_VERSION_FROM_WIN32_WINNT(Version) NTDDI_VERSION_FROM_WIN32_WINNT2(Version) +#endif /* Select Default _WIN32_WINNT Value */ #if !defined(_WIN32_WINNT) && !defined(_CHICAGO_)
7 years, 2 months
1
0
0
0
[reactos] 01/03: [NDK] fix some rtltypes.h definitions
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=30cd606fe2d3b44ef7bad…
commit 30cd606fe2d3b44ef7badd1efcad31605a031fd6 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Wed Aug 16 09:52:25 2017 +0200 [NDK] fix some rtltypes.h definitions --- sdk/include/ndk/rtltypes.h | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/sdk/include/ndk/rtltypes.h b/sdk/include/ndk/rtltypes.h index 46f1787d35..0ee0eb3d86 100644 --- a/sdk/include/ndk/rtltypes.h +++ b/sdk/include/ndk/rtltypes.h @@ -847,7 +847,6 @@ typedef struct _UNICODE_PREFIX_TABLE PUNICODE_PREFIX_TABLE_ENTRY LastNextEntry; } UNICODE_PREFIX_TABLE, *PUNICODE_PREFIX_TABLE; -#ifdef NTOS_MODE_USER // // Pfx* routines' table structures // @@ -866,7 +865,6 @@ typedef struct _PREFIX_TABLE CSHORT NameLength; PPREFIX_TABLE_ENTRY NextPrefixTree; } PREFIX_TABLE, *PPREFIX_TABLE; -#endif // // Time Structure for RTL Time calls @@ -921,25 +919,6 @@ typedef struct _RTL_HEAP_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME PVOID ActivationStackBackTrace[8]; } RTL_HEAP_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME, *PRTL_HEAP_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME; -#if (NTDDI_VERSION >= NTDDI_WS03) -typedef struct _ACTIVATION_CONTEXT_STACK -{ - PRTL_ACTIVATION_CONTEXT_STACK_FRAME ActiveFrame; - LIST_ENTRY FrameListCache; - ULONG Flags; - ULONG NextCookieSequenceNumber; - ULONG StackId; -} ACTIVATION_CONTEXT_STACK, *PACTIVATION_CONTEXT_STACK; -#else -typedef struct _ACTIVATION_CONTEXT_STACK -{ - ULONG Flags; - ULONG NextCookieSequenceNumber; - PVOID ActiveFrame; - LIST_ENTRY FrameListCache; -} ACTIVATION_CONTEXT_STACK, *PACTIVATION_CONTEXT_STACK; -#endif - typedef struct _ACTIVATION_CONTEXT_DATA { ULONG Magic; @@ -964,6 +943,25 @@ typedef struct _ACTIVATION_CONTEXT_STACK_FRAMELIST #endif /* NTOS_MODE_USER */ +#if (NTDDI_VERSION >= NTDDI_WS03SP1) +typedef struct _ACTIVATION_CONTEXT_STACK +{ + struct _RTL_ACTIVATION_CONTEXT_STACK_FRAME *ActiveFrame; + LIST_ENTRY FrameListCache; + ULONG Flags; + ULONG NextCookieSequenceNumber; + ULONG StackId; +} ACTIVATION_CONTEXT_STACK, *PACTIVATION_CONTEXT_STACK; +#else +typedef struct _ACTIVATION_CONTEXT_STACK +{ + ULONG Flags; + ULONG NextCookieSequenceNumber; + struct _RTL_ACTIVATION_CONTEXT_STACK_FRAME *ActiveFrame; + LIST_ENTRY FrameListCache; +} ACTIVATION_CONTEXT_STACK, *PACTIVATION_CONTEXT_STACK; +#endif + // // ACE Structure //
7 years, 2 months
1
0
0
0
[reactos] 01/01: [STORPORT] Add the InitializeDpc code path to StorPortNotification(). CORE-13866
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9e642ea15b8f1e842b5ec…
commit 9e642ea15b8f1e842b5eccb9a29a68cfcab8cd50 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sun Oct 22 09:25:36 2017 +0200 [STORPORT] Add the InitializeDpc code path to StorPortNotification(). CORE-13866 --- drivers/storage/port/storport/storport.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/storage/port/storport/storport.c b/drivers/storage/port/storport/storport.c index 39c6564c59..61982fcb77 100644 --- a/drivers/storage/port/storport/storport.c +++ b/drivers/storage/port/storport/storport.c @@ -996,6 +996,8 @@ StorPortNotification( PFDO_DEVICE_EXTENSION DeviceExtension = NULL; PHW_PASSIVE_INITIALIZE_ROUTINE HwPassiveInitRoutine; PBOOLEAN Result; + PSTOR_DPC Dpc; + PHW_DPC_ROUTINE HwDpcRoutine; va_list ap; DPRINT1("StorPortNotification(%x %p)\n", @@ -1033,6 +1035,19 @@ StorPortNotification( } break; + case InitializeDpc: + DPRINT1("InitializeDpc\n"); + Dpc = (PSTOR_DPC)va_arg(ap, PSTOR_DPC); + DPRINT1("Dpc %p\n", Dpc); + HwDpcRoutine = (PHW_DPC_ROUTINE)va_arg(ap, PHW_DPC_ROUTINE); + DPRINT1("HwDpcRoutine %p\n", HwDpcRoutine); + + KeInitializeDpc((PRKDPC)&Dpc->Dpc, + (PKDEFERRED_ROUTINE)HwDpcRoutine, + (PVOID)DeviceExtension); + KeInitializeSpinLock(&Dpc->Lock); + break; + default: DPRINT1("Unsupported Notification %lx\n", NotificationType); break;
7 years, 2 months
1
0
0
0
[reactos] 01/01: [STORPORT] Implement StorPortNotification() / EnablePassiveInitialization and call the passive initialization routine. CORE-13866
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cc95d3ece3dd1f94bfe80…
commit cc95d3ece3dd1f94bfe804ec025fec85648388f5 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sat Oct 21 23:58:42 2017 +0200 [STORPORT] Implement StorPortNotification() / EnablePassiveInitialization and call the passive initialization routine. CORE-13866 --- drivers/storage/port/storport/fdo.c | 11 ++++++++ drivers/storage/port/storport/precomp.h | 2 +- drivers/storage/port/storport/storport.c | 48 +++++++++++++++++++++++++++++++- 3 files changed, 59 insertions(+), 2 deletions(-) diff --git a/drivers/storage/port/storport/fdo.c b/drivers/storage/port/storport/fdo.c index 70b6a30dd3..9072971a91 100644 --- a/drivers/storage/port/storport/fdo.c +++ b/drivers/storage/port/storport/fdo.c @@ -63,6 +63,17 @@ PortFdoStartMiniport( return Status; } + /* Call the HwPassiveInitRoutine function, if available */ + if (DeviceExtension->HwPassiveInitRoutine != NULL) + { + DPRINT1("Calling HwPassiveInitRoutine()\n"); + if (!DeviceExtension->HwPassiveInitRoutine(&DeviceExtension->Miniport.MiniportExtension->HwDeviceExtension)) + { + DPRINT1("HwPassiveInitRoutine() failed\n"); + return STATUS_UNSUCCESSFUL; + } + } + return STATUS_SUCCESS; } diff --git a/drivers/storage/port/storport/precomp.h b/drivers/storage/port/storport/precomp.h index bd2bc91daf..168c318544 100644 --- a/drivers/storage/port/storport/precomp.h +++ b/drivers/storage/port/storport/precomp.h @@ -100,7 +100,7 @@ typedef struct _FDO_DEVICE_EXTENSION PVOID UncachedExtensionVirtualBase; PHYSICAL_ADDRESS UncachedExtensionPhysicalBase; ULONG UncachedExtensionSize; - + PHW_PASSIVE_INITIALIZE_ROUTINE HwPassiveInitRoutine; } FDO_DEVICE_EXTENSION, *PFDO_DEVICE_EXTENSION; diff --git a/drivers/storage/port/storport/storport.c b/drivers/storage/port/storport/storport.c index b105722c09..39c6564c59 100644 --- a/drivers/storage/port/storport/storport.c +++ b/drivers/storage/port/storport/storport.c @@ -992,7 +992,53 @@ StorPortNotification( _In_ PVOID HwDeviceExtension, ...) { - DPRINT1("StorPortNotification()\n"); + PMINIPORT_DEVICE_EXTENSION MiniportExtension = NULL; + PFDO_DEVICE_EXTENSION DeviceExtension = NULL; + PHW_PASSIVE_INITIALIZE_ROUTINE HwPassiveInitRoutine; + PBOOLEAN Result; + va_list ap; + + DPRINT1("StorPortNotification(%x %p)\n", + NotificationType, HwDeviceExtension); + + /* Get the miniport extension */ + if (HwDeviceExtension != NULL) + { + MiniportExtension = CONTAINING_RECORD(HwDeviceExtension, + MINIPORT_DEVICE_EXTENSION, + HwDeviceExtension); + DPRINT1("HwDeviceExtension %p MiniportExtension %p\n", + HwDeviceExtension, MiniportExtension); + + DeviceExtension = MiniportExtension->Miniport->DeviceExtension; + } + + va_start(ap, HwDeviceExtension); + + switch (NotificationType) + { + case EnablePassiveInitialization: + DPRINT1("EnablePassiveInitialization\n"); + HwPassiveInitRoutine = (PHW_PASSIVE_INITIALIZE_ROUTINE)va_arg(ap, PHW_PASSIVE_INITIALIZE_ROUTINE); + DPRINT1("HwPassiveInitRoutine %p\n", HwPassiveInitRoutine); + Result = (PBOOLEAN)va_arg(ap, PBOOLEAN); + + *Result = FALSE; + + if ((DeviceExtension != NULL) && + (DeviceExtension->HwPassiveInitRoutine == NULL)) + { + DeviceExtension->HwPassiveInitRoutine = HwPassiveInitRoutine; + *Result = TRUE; + } + break; + + default: + DPRINT1("Unsupported Notification %lx\n", NotificationType); + break; + } + + va_end(ap); }
7 years, 2 months
1
0
0
0
[reactos] 02/02: [STORPORT] Implement parts of StorPortGetPhysicalAddress() that handle the uncached extension. CORE-13866
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f9f21574babe9ced9ffd7…
commit f9f21574babe9ced9ffd7bbaff9182fc55025839 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sat Oct 21 21:55:42 2017 +0200 [STORPORT] Implement parts of StorPortGetPhysicalAddress() that handle the uncached extension. CORE-13866 --- drivers/storage/port/storport/precomp.h | 4 +-- drivers/storage/port/storport/storport.c | 48 +++++++++++++++++++++++++------- 2 files changed, 40 insertions(+), 12 deletions(-) diff --git a/drivers/storage/port/storport/precomp.h b/drivers/storage/port/storport/precomp.h index b64190d114..bd2bc91daf 100644 --- a/drivers/storage/port/storport/precomp.h +++ b/drivers/storage/port/storport/precomp.h @@ -97,8 +97,8 @@ typedef struct _FDO_DEVICE_EXTENSION BUS_INTERFACE_STANDARD BusInterface; BOOLEAN BusInitialized; PMAPPED_ADDRESS MappedAddressList; - - PVOID UncachedExtensionBase; + PVOID UncachedExtensionVirtualBase; + PHYSICAL_ADDRESS UncachedExtensionPhysicalBase; ULONG UncachedExtensionSize; } FDO_DEVICE_EXTENSION, *PFDO_DEVICE_EXTENSION; diff --git a/drivers/storage/port/storport/storport.c b/drivers/storage/port/storport/storport.c index 7ee36051bf..b105722c09 100644 --- a/drivers/storage/port/storport/storport.c +++ b/drivers/storage/port/storport/storport.c @@ -683,7 +683,7 @@ StorPortGetLogicalUnit( /* - * @unimplemented + * @implemented */ STORPORT_API STOR_PHYSICAL_ADDRESS @@ -694,10 +694,37 @@ StorPortGetPhysicalAddress( _In_ PVOID VirtualAddress, _Out_ ULONG *Length) { + PMINIPORT_DEVICE_EXTENSION MiniportExtension; + PFDO_DEVICE_EXTENSION DeviceExtension; STOR_PHYSICAL_ADDRESS PhysicalAddress; + ULONG_PTR Offset; DPRINT1("StorPortGetPhysicalAddress(%p %p %p %p)\n", HwDeviceExtension, Srb, VirtualAddress, Length); + + /* Get the miniport extension */ + MiniportExtension = CONTAINING_RECORD(HwDeviceExtension, + MINIPORT_DEVICE_EXTENSION, + HwDeviceExtension); + DPRINT1("HwDeviceExtension %p MiniportExtension %p\n", + HwDeviceExtension, MiniportExtension); + + DeviceExtension = MiniportExtension->Miniport->DeviceExtension; + + /* Inside of the uncached extension? */ + if (((ULONG_PTR)VirtualAddress >= (ULONG_PTR)DeviceExtension->UncachedExtensionVirtualBase) && + ((ULONG_PTR)VirtualAddress <= (ULONG_PTR)DeviceExtension->UncachedExtensionVirtualBase + DeviceExtension->UncachedExtensionSize)) + { + Offset = (ULONG_PTR)VirtualAddress - (ULONG_PTR)DeviceExtension->UncachedExtensionVirtualBase; + + PhysicalAddress.QuadPart = DeviceExtension->UncachedExtensionPhysicalBase.QuadPart + Offset; + *Length = DeviceExtension->UncachedExtensionSize - Offset; + + return PhysicalAddress; + } + + // FIXME + UNIMPLEMENTED; *Length = 0; @@ -769,8 +796,8 @@ StorPortGetUncachedExtension( DeviceExtension = MiniportExtension->Miniport->DeviceExtension; /* Return the uncached extension base address if we already have one */ - if (DeviceExtension->UncachedExtensionBase != NULL) - return DeviceExtension->UncachedExtensionBase; + if (DeviceExtension->UncachedExtensionVirtualBase != NULL) + return DeviceExtension->UncachedExtensionVirtualBase; // FIXME: Set DMA stuff here? @@ -778,17 +805,18 @@ StorPortGetUncachedExtension( Alignment.QuadPart = 0; LowestAddress.QuadPart = 0; HighestAddress.QuadPart = 0x00000000FFFFFFFF; - DeviceExtension->UncachedExtensionBase = MmAllocateContiguousMemorySpecifyCache(NumberOfBytes, - LowestAddress, - HighestAddress, - Alignment, - MmCached); - if (DeviceExtension->UncachedExtensionBase == NULL) + DeviceExtension->UncachedExtensionVirtualBase = MmAllocateContiguousMemorySpecifyCache(NumberOfBytes, + LowestAddress, + HighestAddress, + Alignment, + MmCached); + if (DeviceExtension->UncachedExtensionVirtualBase == NULL) return NULL; + DeviceExtension->UncachedExtensionPhysicalBase = MmGetPhysicalAddress(DeviceExtension->UncachedExtensionVirtualBase); DeviceExtension->UncachedExtensionSize = NumberOfBytes; - return DeviceExtension->UncachedExtensionBase; + return DeviceExtension->UncachedExtensionVirtualBase; }
7 years, 2 months
1
0
0
0
[reactos] 01/02: [STORPORT] The miniport drivers HwInitialize routine returns a BOOLEAN. Handle this properly. CORE-13866
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ec4fe621186fb21ca06e5…
commit ec4fe621186fb21ca06e54cdb05f79fa5a793084 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sat Oct 21 21:51:25 2017 +0200 [STORPORT] The miniport drivers HwInitialize routine returns a BOOLEAN. Handle this properly. CORE-13866 --- drivers/storage/port/storport/miniport.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/storage/port/storport/miniport.c b/drivers/storage/port/storport/miniport.c index 852ef426a4..c13a3f37a5 100644 --- a/drivers/storage/port/storport/miniport.c +++ b/drivers/storage/port/storport/miniport.c @@ -335,15 +335,15 @@ NTSTATUS MiniportHwInitialize( _In_ PMINIPORT Miniport) { - NTSTATUS Status; + BOOLEAN Result; DPRINT1("MiniportHwInitialize(%p)\n", Miniport); /* Call the miniport HwInitialize routine */ - Status = Miniport->InitData->HwInitialize(&Miniport->MiniportExtension->HwDeviceExtension); - DPRINT1("HwInitialize() returned 0x%08lx\n", Status); + Result = Miniport->InitData->HwInitialize(&Miniport->MiniportExtension->HwDeviceExtension); + DPRINT1("HwInitialize() returned %u\n", Result); - return Status; + return Result ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL; } /* EOF */
7 years, 2 months
1
0
0
0
[reactos] 01/01: [BOOTDATA] This was not meant to be committed.
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=dc16ad20a9f5837d4bced…
commit dc16ad20a9f5837d4bcedb02bce3687f33ce65c2 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sat Oct 21 18:00:10 2017 +0200 [BOOTDATA] This was not meant to be committed. --- boot/bootdata/txtsetup.sif | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boot/bootdata/txtsetup.sif b/boot/bootdata/txtsetup.sif index 0600c098a8..3ea62974b5 100644 --- a/boot/bootdata/txtsetup.sif +++ b/boot/bootdata/txtsetup.sif @@ -87,8 +87,8 @@ PCI\VEN_104B&CC_0100 = buslogic PCI\CC_0101 = pciide PCI\CC_0104 = uniata PCI\CC_0105 = uniata -;PCI\CC_0106 = uniata -PCI\CC_0106 = storahci +PCI\CC_0106 = uniata +;PCI\CC_0106 = storahci *PNP0600 = uniata ;USB\CLASS_09 = usbhub USB\ROOT_HUB = usbhub
7 years, 2 months
1
0
0
0
[reactos] 01/01: [STORPORT] Implement StorPortGetUncachedExtension(). CORE-13866
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=45cc5c0e37ff6033c80b7…
commit 45cc5c0e37ff6033c80b767529c05576451718f3 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sat Oct 21 17:55:35 2017 +0200 [STORPORT] Implement StorPortGetUncachedExtension(). CORE-13866 --- boot/bootdata/txtsetup.sif | 4 ++-- drivers/storage/port/storport/precomp.h | 4 ++++ drivers/storage/port/storport/storport.c | 40 ++++++++++++++++++++++++++++---- 3 files changed, 42 insertions(+), 6 deletions(-) diff --git a/boot/bootdata/txtsetup.sif b/boot/bootdata/txtsetup.sif index 3ea62974b5..0600c098a8 100644 --- a/boot/bootdata/txtsetup.sif +++ b/boot/bootdata/txtsetup.sif @@ -87,8 +87,8 @@ PCI\VEN_104B&CC_0100 = buslogic PCI\CC_0101 = pciide PCI\CC_0104 = uniata PCI\CC_0105 = uniata -PCI\CC_0106 = uniata -;PCI\CC_0106 = storahci +;PCI\CC_0106 = uniata +PCI\CC_0106 = storahci *PNP0600 = uniata ;USB\CLASS_09 = usbhub USB\ROOT_HUB = usbhub diff --git a/drivers/storage/port/storport/precomp.h b/drivers/storage/port/storport/precomp.h index 30ca7fe78d..b64190d114 100644 --- a/drivers/storage/port/storport/precomp.h +++ b/drivers/storage/port/storport/precomp.h @@ -97,6 +97,10 @@ typedef struct _FDO_DEVICE_EXTENSION BUS_INTERFACE_STANDARD BusInterface; BOOLEAN BusInitialized; PMAPPED_ADDRESS MappedAddressList; + + PVOID UncachedExtensionBase; + ULONG UncachedExtensionSize; + } FDO_DEVICE_EXTENSION, *PFDO_DEVICE_EXTENSION; diff --git a/drivers/storage/port/storport/storport.c b/drivers/storage/port/storport/storport.c index d25064bba1..7ee36051bf 100644 --- a/drivers/storage/port/storport/storport.c +++ b/drivers/storage/port/storport/storport.c @@ -607,7 +607,6 @@ StorPortGetDeviceBase( _In_ BOOLEAN InIoSpace) { PMINIPORT_DEVICE_EXTENSION MiniportExtension; - PHYSICAL_ADDRESS TranslatedAddress; PVOID MappedAddress; NTSTATUS Status; @@ -743,7 +742,7 @@ StorPortGetSrb( /* - * @unimplemented + * @implemented */ STORPORT_API PVOID @@ -753,10 +752,43 @@ StorPortGetUncachedExtension( _In_ PPORT_CONFIGURATION_INFORMATION ConfigInfo, _In_ ULONG NumberOfBytes) { + PMINIPORT_DEVICE_EXTENSION MiniportExtension; + PFDO_DEVICE_EXTENSION DeviceExtension; + PHYSICAL_ADDRESS LowestAddress, HighestAddress, Alignment; + DPRINT1("StorPortGetUncachedExtension(%p %p %lu)\n", HwDeviceExtension, ConfigInfo, NumberOfBytes); - UNIMPLEMENTED; - return NULL; + + /* Get the miniport extension */ + MiniportExtension = CONTAINING_RECORD(HwDeviceExtension, + MINIPORT_DEVICE_EXTENSION, + HwDeviceExtension); + DPRINT1("HwDeviceExtension %p MiniportExtension %p\n", + HwDeviceExtension, MiniportExtension); + + DeviceExtension = MiniportExtension->Miniport->DeviceExtension; + + /* Return the uncached extension base address if we already have one */ + if (DeviceExtension->UncachedExtensionBase != NULL) + return DeviceExtension->UncachedExtensionBase; + + // FIXME: Set DMA stuff here? + + /* Allocate the uncached extension */ + Alignment.QuadPart = 0; + LowestAddress.QuadPart = 0; + HighestAddress.QuadPart = 0x00000000FFFFFFFF; + DeviceExtension->UncachedExtensionBase = MmAllocateContiguousMemorySpecifyCache(NumberOfBytes, + LowestAddress, + HighestAddress, + Alignment, + MmCached); + if (DeviceExtension->UncachedExtensionBase == NULL) + return NULL; + + DeviceExtension->UncachedExtensionSize = NumberOfBytes; + + return DeviceExtension->UncachedExtensionBase; }
7 years, 2 months
1
0
0
0
[reactos] 01/01: [RDBSS] Make it clear that we want to zero all the create parameters CID 1411975
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8eb66fa1b6ad7b5231ca0…
commit 8eb66fa1b6ad7b5231ca0c37d3fe0c568f684dcb Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sat Oct 21 15:06:04 2017 +0200 [RDBSS] Make it clear that we want to zero all the create parameters CID 1411975 --- sdk/lib/drivers/rdbsslib/rdbss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/lib/drivers/rdbsslib/rdbss.c b/sdk/lib/drivers/rdbsslib/rdbss.c index 4591f3bd72..4f888c8c13 100644 --- a/sdk/lib/drivers/rdbsslib/rdbss.c +++ b/sdk/lib/drivers/rdbsslib/rdbss.c @@ -7492,7 +7492,7 @@ RxPrefixClaim( RxContext->PrefixClaim.SuppliedPathName.MaximumLength = QueryRequest->PathNameLength; /* Zero the create parameters */ - RtlZeroMemory(&RxContext->Create.NtCreateParameters, + RtlZeroMemory(&RxContext->Create, FIELD_OFFSET(RX_CONTEXT, AlsoCanonicalNameBuffer) - FIELD_OFFSET(RX_CONTEXT, Create.NtCreateParameters)); RxContext->Create.ThisIsATreeConnectOpen = TRUE; RxContext->Create.NtCreateParameters.SecurityContext = QueryRequest->SecurityContext;
7 years, 2 months
1
0
0
0
[reactos] 01/01: [MMDEVAPI_WINETEST] Sync with Wine Staging 2.16. CORE-13762
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b8549aef08361cf404c6e…
commit b8549aef08361cf404c6e69d3d3c8b05218f55a6 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Oct 21 14:10:14 2017 +0100 [MMDEVAPI_WINETEST] Sync with Wine Staging 2.16. CORE-13762 --- modules/rostests/winetests/mmdevapi/CMakeLists.txt | 2 ++ modules/rostests/winetests/mmdevapi/render.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/rostests/winetests/mmdevapi/CMakeLists.txt b/modules/rostests/winetests/mmdevapi/CMakeLists.txt index 569915d16f..12652fd61a 100644 --- a/modules/rostests/winetests/mmdevapi/CMakeLists.txt +++ b/modules/rostests/winetests/mmdevapi/CMakeLists.txt @@ -1,4 +1,6 @@ +add_definitions(-DWINETEST_USE_DBGSTR_LONGLONG) + remove_definitions(-D_WIN32_WINNT=0x502) add_definitions(-D_WIN32_WINNT=0x600) diff --git a/modules/rostests/winetests/mmdevapi/render.c b/modules/rostests/winetests/mmdevapi/render.c index c7fb7c1d15..040ec7f587 100644 --- a/modules/rostests/winetests/mmdevapi/render.c +++ b/modules/rostests/winetests/mmdevapi/render.c @@ -335,8 +335,8 @@ static void test_audioclient(void) (UINT)(t2/10000), (UINT)(t2 % 10000)); ok(t2 >= t1 || broken(t2 >= t1/2 && pwfx->nSamplesPerSec > 48000) || broken(t2 == 0) /* (!) win10 */, - "Latency < default period, delta %dus (%x%08x vs %x%08x)\n", - (LONG)((t2-t1)/10), (DWORD)(t2 >> 32), (DWORD)t2, (DWORD)(t1 >> 32), (DWORD)t1); + "Latency < default period, delta %dus (%s vs %s)\n", + (LONG)((t2-t1)/10), wine_dbgstr_longlong(t2), wine_dbgstr_longlong(t1)); /* Native appears to add the engine period to the HW latency in shared mode */ if(t2 == 0) win10 = TRUE;
7 years, 2 months
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
28
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
Results per page:
10
25
50
100
200