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 2009
----- 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
26 participants
641 discussions
Start a n
N
ew thread
[sserapion] 43840: Fix LOGBRUSH definition.
by sserapion@svn.reactos.org
Author: sserapion Date: Fri Oct 30 00:25:11 2009 New Revision: 43840 URL:
http://svn.reactos.org/svn/reactos?rev=43840&view=rev
Log: Fix LOGBRUSH definition. Modified: branches/ros-amd64-bringup/reactos/include/psdk/wingdi.h Modified: branches/ros-amd64-bringup/reactos/include/psdk/wingdi.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/psdk/wingdi.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/psdk/wingdi.h [iso-8859-1] Fri Oct 30 00:25:11 2009 @@ -1655,7 +1655,7 @@ typedef struct tagLOGBRUSH { UINT lbStyle; COLORREF lbColor; - LONG lbHatch; + ULONG_PTR lbHatch; } LOGBRUSH,*PLOGBRUSH,*LPLOGBRUSH; typedef LOGBRUSH PATTERN,*PPATTERN,*LPPATTERN; typedef struct tagLOGBRUSH32 {
15 years, 1 month
1
0
0
0
[sserapion] 43839: Fix Build.
by sserapion@svn.reactos.org
Author: sserapion Date: Thu Oct 29 23:44:55 2009 New Revision: 43839 URL:
http://svn.reactos.org/svn/reactos?rev=43839&view=rev
Log: Fix Build. Modified: branches/ros-amd64-bringup/reactos/dll/directx/d3d9/d3d9_device.c branches/ros-amd64-bringup/reactos/dll/directx/ddraw/Surface/callbacks_surf_hel.c Modified: branches/ros-amd64-bringup/reactos/dll/directx/d3d9/d3d9_device.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/d…
============================================================================== --- branches/ros-amd64-bringup/reactos/dll/directx/d3d9/d3d9_device.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/directx/d3d9/d3d9_device.c [iso-8859-1] Thu Oct 29 23:44:55 2009 @@ -26,7 +26,7 @@ static HRESULT InvalidCall(LPDIRECT3DDEVICE9_INT This, LPSTR ErrorMsg) { - DPRINT1(ErrorMsg); + DPRINT1("%s",ErrorMsg); UNLOCK_D3DDEVICE9(); return D3DERR_INVALIDCALL; } Modified: branches/ros-amd64-bringup/reactos/dll/directx/ddraw/Surface/callbacks_surf_hel.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/d…
============================================================================== --- branches/ros-amd64-bringup/reactos/dll/directx/ddraw/Surface/callbacks_surf_hel.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/directx/ddraw/Surface/callbacks_surf_hel.c [iso-8859-1] Thu Oct 29 23:44:55 2009 @@ -84,7 +84,7 @@ /* Get our hdc for the active window */ - hDC = GetDC(lpLockData->lpDDSurface->lpSurfMore->lpDD_lcl->hFocusWnd); + hDC = GetDC((HWND)lpLockData->lpDDSurface->lpSurfMore->lpDD_lcl->hFocusWnd); if (hDC != NULL) { @@ -200,7 +200,7 @@ DX_WINDBG_trace(); /* Get our hdc for the active window */ - hDC = GetDC(lpUnLockData->lpDDSurface->lpSurfMore->lpDD_lcl->hFocusWnd); + hDC = GetDC((HWND)lpUnLockData->lpDDSurface->lpSurfMore->lpDD_lcl->hFocusWnd); if (hDC != NULL) {
15 years, 1 month
1
0
0
0
[sserapion] 43838: Fix csrss build.
by sserapion@svn.reactos.org
Author: sserapion Date: Thu Oct 29 23:41:26 2009 New Revision: 43838 URL:
http://svn.reactos.org/svn/reactos?rev=43838&view=rev
Log: Fix csrss build. Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/handle.c Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/handle.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
============================================================================== --- branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/handle.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/handle.c [iso-8859-1] Thu Oct 29 23:41:26 2009 @@ -188,7 +188,7 @@ ProcessData->HandleTable[i].Object = Object; ProcessData->HandleTable[i].Access = Access; ProcessData->HandleTable[i].Inheritable = Inheritable; - *Handle = (HANDLE)((i << 2) | 0x3); + *Handle = ULongToHandle(((i << 2) | 0x3)); _InterlockedIncrement( &Object->ReferenceCount ); RtlLeaveCriticalSection(&ProcessData->HandleTableLock); return(STATUS_SUCCESS);
15 years, 1 month
1
0
0
0
[sserapion] 43837: Fix comctl32 build and potential bug.
by sserapion@svn.reactos.org
Author: sserapion Date: Thu Oct 29 23:36:15 2009 New Revision: 43837 URL:
http://svn.reactos.org/svn/reactos?rev=43837&view=rev
Log: Fix comctl32 build and potential bug. Modified: branches/ros-amd64-bringup/reactos/dll/win32/comctl32/tooltips.c Modified: branches/ros-amd64-bringup/reactos/dll/win32/comctl32/tooltips.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/comctl32/tooltips.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/comctl32/tooltips.c [iso-8859-1] Thu Oct 29 23:36:15 2009 @@ -2402,13 +2402,12 @@ static LRESULT -TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam) -{ - TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); +TOOLTIPS_NotifyFormat (TOOLTIPS_INFO *infoPtr, WPARAM wParam, LPARAM lParam) +{ TTTOOL_INFO *toolPtr = infoPtr->tools; INT nResult; - TRACE("hwnd=%p wParam=%lx lParam=%lx\n", hwnd, wParam, lParam); + TRACE("hwnd=%p wParam=%lx lParam=%lx\n", infoPtr->hwndSelf, wParam, lParam); if (lParam == NF_QUERY) { if (toolPtr->bNotifyUnicode) { @@ -2418,8 +2417,8 @@ } } else if (lParam == NF_REQUERY) { - nResult = (INT) SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT, - (WPARAM)hwnd, (LPARAM)NF_QUERY); + nResult = SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT, + (WPARAM)infoPtr->hwndSelf, (LPARAM)NF_QUERY); if (nResult == NFR_ANSI) { toolPtr->bNotifyUnicode = FALSE; TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
15 years, 1 month
1
0
0
0
[sserapion] 43836: Fix avicap32 build.
by sserapion@svn.reactos.org
Author: sserapion Date: Thu Oct 29 23:15:19 2009 New Revision: 43836 URL:
http://svn.reactos.org/svn/reactos?rev=43836&view=rev
Log: Fix avicap32 build. Modified: branches/ros-amd64-bringup/reactos/dll/win32/avicap32/avicap32.c Modified: branches/ros-amd64-bringup/reactos/dll/win32/avicap32/avicap32.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
============================================================================== --- branches/ros-amd64-bringup/reactos/dll/win32/avicap32/avicap32.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/win32/avicap32/avicap32.c [iso-8859-1] Thu Oct 29 23:15:19 2009 @@ -86,7 +86,7 @@ nWidth, nHeight, hWnd, - (HMENU)nID, + ULongToHandle(nID), hInstance, NULL); }
15 years, 1 month
1
0
0
0
[tkreuzer] 43835: Fix merge artifact, spotted by encoded
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu Oct 29 22:49:28 2009 New Revision: 43835 URL:
http://svn.reactos.org/svn/reactos?rev=43835&view=rev
Log: Fix merge artifact, spotted by encoded Modified: branches/ros-amd64-bringup/reactos/include/ndk/pstypes.h Modified: branches/ros-amd64-bringup/reactos/include/ndk/pstypes.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/ndk/pstypes.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/ndk/pstypes.h [iso-8859-1] Thu Oct 29 22:49:28 2009 @@ -627,23 +627,19 @@ #if (NTDDI_VERSION >= NTDDI_WS03) union { - BOOLEAN ImageUsesLargePages:1; BOOLEAN BitField; struct { UCHAR ImageUsesLargePages:1; - #if (NTDDI_VERSION >= NTDDI_LONGHORN) - BOOLEAN IsProtectedProcess:1; - BOOLEAN IsLegacyProcess:1; - BOOLEAN SpareBits:5; +#if (NTDDI_VERSION >= NTDDI_LONGHORN) BOOLEAN IsProtectedProcess:1; BOOLEAN IsLegacyProcess:1; BOOLEAN IsImageDynamicallyRelocated:1; BOOLEAN SkipPatchingUser32Forwarders:1; BOOLEAN SpareBits:3; - #else +#else BOOLEAN SpareBits:7; - #endif +#endif }; }; #else
15 years, 1 month
1
0
0
0
[cgutman] 43834: - Header updates for winsock rewrite
by cgutman@svn.reactos.org
Author: cgutman Date: Thu Oct 29 21:56:47 2009 New Revision: 43834 URL:
http://svn.reactos.org/svn/reactos?rev=43834&view=rev
Log: - Header updates for winsock rewrite Modified: trunk/reactos/include/psdk/mswsock.h trunk/reactos/include/psdk/svcguid.h trunk/reactos/include/psdk/windns.h trunk/reactos/include/psdk/winsock2.h Modified: trunk/reactos/include/psdk/mswsock.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/mswsock.h?rev…
============================================================================== --- trunk/reactos/include/psdk/mswsock.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/mswsock.h [iso-8859-1] Thu Oct 29 21:56:47 2009 @@ -55,6 +55,8 @@ #define WSAID_ACCEPTEX { 0xB5367DF0, 0xCBAC, 0x11CF, { 0x95, 0xCA, 0x00, 0x80, 0x5F, 0x48, 0xA1, 0x92 } } #define WSAID_TRANSMITFILE { 0xB5367DF1, 0xCBAC, 0x11CF, { 0x95, 0xCA, 0x00, 0x80, 0x5F, 0x48, 0xA1, 0x92 } } #define WSAID_GETACCEPTEXSOCKADDRS { 0xB5367DF2, 0xCBAC, 0x11CF, { 0x95, 0xCA, 0x00, 0x80, 0x5F, 0x48, 0xA1, 0x92 } } + +#define NLA_NAMESPACE_GUID { 0x6642243A, 0x3BA8, 0x4AA6, { 0xBA, 0xA5, 0x2E, 0xB, 0xD7, 0x1F, 0xDD, 0x83 } } typedef BOOL (PASCAL *LPFN_TRANSMITFILE)(SOCKET,HANDLE,DWORD,DWORD,LPOVERLAPPED,LPTRANSMIT_FILE_BUFFERS,DWORD); typedef BOOL (PASCAL *LPFN_ACCEPTEX)(SOCKET,SOCKET,PVOID,DWORD,DWORD,DWORD,LPDWORD,LPOVERLAPPED); Modified: trunk/reactos/include/psdk/svcguid.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/svcguid.h?rev…
============================================================================== --- trunk/reactos/include/psdk/svcguid.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/svcguid.h [iso-8859-1] Thu Oct 29 21:56:47 2009 @@ -5,236 +5,228 @@ extern "C" { #endif -#define SVCID_HOSTNAME { 0x0002a800, 0, 0, { 0xC0,0,0,0,0,0,0,0x46 } } -#define SVCID_INET_HOSTADDRBYINETSTRING { 0x0002a801, 0, 0, { 0xC0,0,0,0,0,0,0,0x46 } } -#define SVCID_INET_HOSTADDRBYNAME { 0x0002a803, 0, 0, { 0xC0,0,0,0,0,0,0,0x46 } } -#define SVCID_INET_SERVICEBYNAME { 0x0002a802, 0, 0, { 0xC0,0,0,0,0,0,0,0x46 } } - -#define SVCID_NETWARE(_SapId) \ - { (0x000B << 16) | (_SapId), 0, 0, { 0xC0,0,0,0,0,0,0,0x46 } } - -#define SAPID_FROM_SVCID_NETWARE(_g) \ - ((WORD)(_g->Data1 & 0xFFFF)) - -#define SET_NETWARE_SVCID(_g,_SapId) { \ - (_g)->Data1 = (0x000B << 16 ) | (_SapId); \ - (_g)->Data2 = 0; \ - (_g)->Data3 = 0; \ - (_g)->Data4[0] = 0xC0; \ - (_g)->Data4[1] = 0x0; \ - (_g)->Data4[2] = 0x0; \ - (_g)->Data4[3] = 0x0; \ - (_g)->Data4[4] = 0x0; \ - (_g)->Data4[5] = 0x0; \ - (_g)->Data4[6] = 0x0; \ - (_g)->Data4[7] = 0x46; } - -#define SVCID_PRINT_QUEUE SVCID_NETWARE(0x3) -#define SVCID_FILE_SERVER SVCID_NETWARE(0x4) -#define SVCID_JOB_SERVER SVCID_NETWARE(0x5) -#define SVCID_GATEWAY SVCID_NETWARE(0x6) -#define SVCID_PRINT_SERVER SVCID_NETWARE(0x7) -#define SVCID_ARCHIVE_QUEUE SVCID_NETWARE(0x8) -#define SVCID_ARCHIVE_SERVER SVCID_NETWARE(0x9) -#define SVCID_JOB_QUEUE SVCID_NETWARE(0xA) -#define SVCID_ADMINISTRATION SVCID_NETWARE(0xB) -#define SVCID_NAS_SNA_GATEWAY SVCID_NETWARE(0x21) -#define SVCID_REMOTE_BRIDGE_SERVER SVCID_NETWARE(0x24) +#define SVCID_HOSTNAME { 0x0002a800,0,0,{ 0xC0,0,0,0,0,0,0,0x46 } } +#define SVCID_INET_HOSTADDRBYINETSTRING { 0x0002a801,0,0,{ 0xC0,0,0,0,0,0,0,0x46 } } +#define SVCID_INET_SERVICEBYNAME { 0x0002a802,0,0,{ 0xC0,0,0,0,0,0,0,0x46 } } +#define SVCID_INET_HOSTADDRBYNAME { 0x0002a803,0,0,{ 0xC0,0,0,0,0,0,0,0x46 } } + +#define SVCID_TCP_RR(_Port,_RR) { (0x0009 << 16) | (_Port),0,_RR,{ 0xC0,0,0,0,0,0,0,0x46 } } +#define SVCID_TCP(_Port) SVCID_TCP_RR(_Port,0) +#define SVCID_DNS(_RecordType) SVCID_TCP_RR(53,_RecordType) +#define IS_SVCID_DNS(_g) ((((_g)->Data1)==0x00090035) && (((_g)->Data2)==0) && (((_g)->Data4[0])==0xC0) && (((_g)->Data4[1])==0) && (((_g)->Data4[2])==0) && (((_g)->Data4[3])==0) && (((_g)->Data4[4])==0) && (((_g)->Data4[5])==0) && (((_g)->Data4[6])==0) && (((_g)->Data4[7])==0x46)) +#define IS_SVCID_TCP(_g) (((((_g)->Data1) & 0xFFFF0000)==0x00090000) && (((_g)->Data2)==0) && (((_g)->Data4[0])==0xC0) && (((_g)->Data4[1])==0) && (((_g)->Data4[2])==0) && (((_g)->Data4[3])==0) && (((_g)->Data4[4])==0) && (((_g)->Data4[5])==0) && (((_g)->Data4[6])==0) && (((_g)->Data4[7])==0x46)) +#define PORT_FROM_SVCID_TCP(_g) ((WORD)(_g->Data1 & 0xFFFF)) +#define RR_FROM_SVCID(_RR) (_RR->Data3) +#define SET_TCP_SVCID_RR(_g,_Port,_RR) { (_g)->Data1 = (0x0009 << 16) | (_Port); (_g)->Data2 = 0; (_g)->Data3 = _RR; (_g)->Data4[0] = 0xC0; (_g)->Data4[1] = 0x0; (_g)->Data4[2] = 0x0; (_g)->Data4[3] = 0x0; (_g)->Data4[4] = 0x0; (_g)->Data4[5] = 0x0; (_g)->Data4[6] = 0x0; (_g)->Data4[7] = 0x46; } +#define SET_TCP_SVCID(_g,_Port) SET_TCP_SVCID_RR(_g,_Port,0) +#define SVCID_UDP_RR(_Port,_RR) { (0x000A << 16) | (_Port),0,_RR,{ 0xC0,0,0,0,0,0,0,0x46 } } +#define SVCID_UDP(_Port) SVCID_UDP_RR(_Port,0) +#define IS_SVCID_UDP(_g) (((((_g)->Data1) & 0xFFFF0000)==0x000A0000) && (((_g)->Data2)==0) && (((_g)->Data4[0])==0xC0) && (((_g)->Data4[1])==0) && (((_g)->Data4[2])==0) && (((_g)->Data4[3])==0) && (((_g)->Data4[4])==0) && (((_g)->Data4[5])==0) && (((_g)->Data4[6])==0) && (((_g)->Data4[7])==0x46)) +#define PORT_FROM_SVCID_UDP(_g) ((WORD)(_g->Data1 & 0xFFFF)) +#define SET_UDP_SVCID_RR(_g,_Port,_RR) { (_g)->Data1 = (0x000A << 16) | (_Port); (_g)->Data2 = 0; (_g)->Data3 = _RR; (_g)->Data4[0] = 0xC0; (_g)->Data4[1] = 0x0; (_g)->Data4[2] = 0x0; (_g)->Data4[3] = 0x0; (_g)->Data4[4] = 0x0; (_g)->Data4[5] = 0x0; (_g)->Data4[6] = 0x0; (_g)->Data4[7] = 0x46; } +#define SET_UDP_SVCID(_g,_Port) SET_UDP_SVCID_RR(_g,_Port,0) +#define SVCID_NETWARE(_SapId) { (0x000B << 16) | (_SapId),0,0,{ 0xC0,0,0,0,0,0,0,0x46 } } +#define IS_SVCID_NETWARE(_g) (((((_g)->Data1) & 0xFFFF0000)==0x000B0000) && (((_g)->Data2)==0) && (((_g)->Data3)==0) && (((_g)->Data4[0])==0xC0) && (((_g)->Data4[1])==0) && (((_g)->Data4[2])==0) && (((_g)->Data4[3])==0) && (((_g)->Data4[4])==0) && (((_g)->Data4[5])==0) && (((_g)->Data4[6])==0) && (((_g)->Data4[7])==0x46)) +#define SAPID_FROM_SVCID_NETWARE(_g) ((WORD)(_g->Data1 & 0xFFFF)) +#define SET_NETWARE_SVCID(_g,_SapId) { (_g)->Data1 = (0x000B << 16) | (_SapId); (_g)->Data2 = 0; (_g)->Data3 = 0; (_g)->Data4[0] = 0xC0; (_g)->Data4[1] = 0x0; (_g)->Data4[2] = 0x0; (_g)->Data4[3] = 0x0; (_g)->Data4[4] = 0x0; (_g)->Data4[5] = 0x0; (_g)->Data4[6] = 0x0; (_g)->Data4[7] = 0x46; } + +#define SVCID_ECHO_TCP SVCID_TCP(7) +#define SVCID_DISCARD_TCP SVCID_TCP(9) +#define SVCID_SYSTAT_TCP SVCID_TCP(11) +#define SVCID_SYSTAT_TCP SVCID_TCP(11) +#define SVCID_DAYTIME_TCP SVCID_TCP(13) +#define SVCID_NETSTAT_TCP SVCID_TCP(15) +#define SVCID_QOTD_TCP SVCID_TCP(17) +#define SVCID_CHARGEN_TCP SVCID_TCP(19) +#define SVCID_FTP_DATA_TCP SVCID_TCP(20) +#define SVCID_FTP_TCP SVCID_TCP(21) +#define SVCID_TELNET_TCP SVCID_TCP(23) +#define SVCID_SMTP_TCP SVCID_TCP(25) +#define SVCID_TIME_TCP SVCID_TCP(37) +#define SVCID_NAME_TCP SVCID_TCP(42) +#define SVCID_WHOIS_TCP SVCID_TCP(43) +#define SVCID_DOMAIN_TCP SVCID_TCP(53) +#define SVCID_NAMESERVER_TCP SVCID_TCP(53) +#define SVCID_MTP_TCP SVCID_TCP(57) +#define SVCID_RJE_TCP SVCID_TCP(77) +#define SVCID_FINGER_TCP SVCID_TCP(79) +#define SVCID_LINK_TCP SVCID_TCP(87) +#define SVCID_SUPDUP_TCP SVCID_TCP(95) +#define SVCID_HOSTNAMES_TCP SVCID_TCP(101) +#define SVCID_ISO_TSAP_TCP SVCID_TCP(102) +#define SVCID_DICTIONARY_TCP SVCID_TCP(103) +#define SVCID_X400_TCP SVCID_TCP(103) +#define SVCID_X400_SND_TCP SVCID_TCP(104) +#define SVCID_CSNET_NS_TCP SVCID_TCP(105) +#define SVCID_POP_TCP SVCID_TCP(109) +#define SVCID_POP2_TCP SVCID_TCP(109) +#define SVCID_POP3_TCP SVCID_TCP(110) +#define SVCID_PORTMAP_TCP SVCID_TCP(111) +#define SVCID_SUNRPC_TCP SVCID_TCP(111) +#define SVCID_AUTH_TCP SVCID_TCP(113) +#define SVCID_SFTP_TCP SVCID_TCP(115) +#define SVCID_PATH_TCP SVCID_TCP(117) +#define SVCID_UUCP_PATH_TCP SVCID_TCP(117) +#define SVCID_NNTP_TCP SVCID_TCP(119) +#define SVCID_NBSESSION_TCP SVCID_TCP(139) +#define SVCID_NEWS_TCP SVCID_TCP(144) +#define SVCID_TCPREPO_TCP SVCID_TCP(158) +#define SVCID_PRINT_SRV_TCP SVCID_TCP(170) +#define SVCID_VMNET_TCP SVCID_TCP(175) +#define SVCID_VMNET0_TCP SVCID_TCP(400) +#define SVCID_EXEC_TCP SVCID_TCP(512) +#define SVCID_LOGIN_TCP SVCID_TCP(513) +#define SVCID_SHELL_TCP SVCID_TCP(514) +#define SVCID_PRINTER_TCP SVCID_TCP(515) +#define SVCID_EFS_TCP SVCID_TCP(520) +#define SVCID_TEMPO_TCP SVCID_TCP(526) +#define SVCID_COURIER_TCP SVCID_TCP(530) +#define SVCID_CONFERENCE_TCP SVCID_TCP(531) +#define SVCID_NETNEWS_TCP SVCID_TCP(532) +#define SVCID_UUCP_TCP SVCID_TCP(540) +#define SVCID_KLOGIN_TCP SVCID_TCP(543) +#define SVCID_KSHELL_TCP SVCID_TCP(544) +#define SVCID_REMOTEFS_TCP SVCID_TCP(556) +#define SVCID_GARCON_TCP SVCID_TCP(600) +#define SVCID_MAITRD_TCP SVCID_TCP(601) +#define SVCID_BUSBOY_TCP SVCID_TCP(602) +#define SVCID_KERBEROS_TCP SVCID_TCP(750) +#define SVCID_KERBEROS_MASTER_TCP SVCID_TCP(751) +#define SVCID_KRB_PROP_TCP SVCID_TCP(754) +#define SVCID_ERLOGIN_TCP SVCID_TCP(888) +#define SVCID_KPOP_TCP SVCID_TCP(1109) +#define SVCID_INGRESLOCK_TCP SVCID_TCP(1524) +#define SVCID_KNETD_TCP SVCID_TCP(2053) +#define SVCID_EKLOGIN_TCP SVCID_TCP(2105) +#define SVCID_RMT_TCP SVCID_TCP(5555) +#define SVCID_MTB_TCP SVCID_TCP(5556) +#define SVCID_MAN_TCP SVCID_TCP(9535) +#define SVCID_W_TCP SVCID_TCP(9536) +#define SVCID_MANTST_TCP SVCID_TCP(9537) +#define SVCID_BNEWS_TCP SVCID_TCP(10000) +#define SVCID_QUEUE_TCP SVCID_TCP(10001) +#define SVCID_POKER_TCP SVCID_TCP(10002) +#define SVCID_GATEWAY_TCP SVCID_TCP(10003) +#define SVCID_REMP_TCP SVCID_TCP(10004) +#define SVCID_QMASTER_TCP SVCID_TCP(10012) + +#define SVCID_ECHO_UDP SVCID_UDP(7) +#define SVCID_DISCARD_UDP SVCID_UDP(9) +#define SVCID_DAYTIME_UDP SVCID_UDP(13) +#define SVCID_QOTD_UDP SVCID_UDP(17) +#define SVCID_CHARGEN_UDP SVCID_UDP(19) +#define SVCID_TIME_UDP SVCID_UDP(37) +#define SVCID_RLP_UDP SVCID_UDP(39) +#define SVCID_NAME_UDP SVCID_UDP(42) +#define SVCID_DOMAIN_UDP SVCID_UDP(53) +#define SVCID_NAMESERVER_UDP SVCID_UDP(53) +#define SVCID_BOOTP_UDP SVCID_UDP(67) +#define SVCID_TFTP_UDP SVCID_UDP(69) +#define SVCID_PORTMAP_UDP SVCID_UDP(111) +#define SVCID_SUNRPC_UDP SVCID_UDP(111) +#define SVCID_NTP_UDP SVCID_UDP(123) +#define SVCID_NBNAME_UDP SVCID_UDP(137) +#define SVCID_NBDATAGRAM_UDP SVCID_UDP(138) +#define SVCID_SGMP_UDP SVCID_UDP(153) +#define SVCID_SNMP_UDP SVCID_UDP(161) +#define SVCID_SNMP_TRAP_UDP SVCID_UDP(162) +#define SVCID_LOAD_UDP SVCID_UDP(315) +#define SVCID_SYTEK_UDP SVCID_UDP(500) +#define SVCID_BIFF_UDP SVCID_UDP(512) +#define SVCID_WHO_UDP SVCID_UDP(513) +#define SVCID_SYSLOG_UDP SVCID_UDP(514) +#define SVCID_TALK_UDP SVCID_UDP(517) +#define SVCID_NTALK_UDP SVCID_UDP(518) +#define SVCID_ROUTE_UDP SVCID_UDP(520) +#define SVCID_TIMED_UDP SVCID_UDP(525) +#define SVCID_RVD_CONTROL_UDP SVCID_UDP(531) +#define SVCID_NETWALL_UDP SVCID_UDP(533) +#define SVCID_NEW_RWHO_UDP SVCID_UDP(550) +#define SVCID_RMONITOR_UDP SVCID_UDP(560) +#define SVCID_MONITOR_UDP SVCID_UDP(561) +#define SVCID_ACCTMASTER_UDP SVCID_UDP(700) +#define SVCID_ACCTSLAVE_UDP SVCID_UDP(701) +#define SVCID_ACCT_UDP SVCID_UDP(702) +#define SVCID_ACCTLOGIN_UDP SVCID_UDP(703) +#define SVCID_ACCTPRINTER_UDP SVCID_UDP(704) +#define SVCID_ELCSD_UDP SVCID_UDP(704) +#define SVCID_ACCTINFO_UDP SVCID_UDP(705) +#define SVCID_ACCTSLAVE2_UDP SVCID_UDP(706) +#define SVCID_ACCTDISK_UDP SVCID_UDP(707) +#define SVCID_KERBEROS_UDP SVCID_UDP(750) +#define SVCID_KERBEROS_MASTER_UDP SVCID_UDP(751) +#define SVCID_PASSWD_SERVER_UDP SVCID_UDP(752) +#define SVCID_USERREG_SERVER_UDP SVCID_UDP(753) +#define SVCID_PHONE_UDP SVCID_UDP(1167) +#define SVCID_MAZE_UDP SVCID_UDP(1666) +#define SVCID_NFS_UDP SVCID_UDP(2049) +#define SVCID_RSCS0_UDP SVCID_UDP(10000) +#define SVCID_RSCS1_UDP SVCID_UDP(10001) +#define SVCID_RSCS2_UDP SVCID_UDP(10002) +#define SVCID_RSCS3_UDP SVCID_UDP(10003) +#define SVCID_RSCS4_UDP SVCID_UDP(10004) +#define SVCID_RSCS5_UDP SVCID_UDP(10005) +#define SVCID_RSCS6_UDP SVCID_UDP(10006) +#define SVCID_RSCS7_UDP SVCID_UDP(10007) +#define SVCID_RSCS8_UDP SVCID_UDP(10008) +#define SVCID_RSCS9_UDP SVCID_UDP(10009) +#define SVCID_RSCSA_UDP SVCID_UDP(10010) +#define SVCID_RSCSB_UDP SVCID_UDP(10011) +#define SVCID_QMASTER_UDP SVCID_UDP(10012) + +#define SVCID_PRINT_QUEUE SVCID_NETWARE(0x3) +#define SVCID_FILE_SERVER SVCID_NETWARE(0x4) +#define SVCID_JOB_SERVER SVCID_NETWARE(0x5) +#define SVCID_GATEWAY SVCID_NETWARE(0x6) +#define SVCID_PRINT_SERVER SVCID_NETWARE(0x7) +#define SVCID_ARCHIVE_QUEUE SVCID_NETWARE(0x8) +#define SVCID_ARCHIVE_SERVER SVCID_NETWARE(0x9) +#define SVCID_JOB_QUEUE SVCID_NETWARE(0xA) +#define SVCID_ADMINISTRATION SVCID_NETWARE(0xB) +#define SVCID_NAS_SNA_GATEWAY SVCID_NETWARE(0x21) +#define SVCID_REMOTE_BRIDGE_SERVER SVCID_NETWARE(0x24) #define SVCID_TIME_SYNCHRONIZATION_SERVER SVCID_NETWARE(0x2D) -#define SVCID_ARCHIVE_SERVER_DYNAMIC_SAP SVCID_NETWARE(0x2E) -#define SVCID_ADVERTISING_PRINT_SERVER SVCID_NETWARE(0x47) -#define SVCID_BTRIEVE_VAP SVCID_NETWARE(0x4B) -#define SVCID_DIRECTORY_SERVER SVCID_NETWARE(0x278) -#define SVCID_NETWARE_386 SVCID_NETWARE(0x107) -#define SVCID_HP_PRINT_SERVER SVCID_NETWARE(0x30C) -#define SVCID_SNA_SERVER SVCID_NETWARE(0x444) -#define SVCID_SAA_SERVER SVCID_NETWARE(0x130) - -#define SVCID_TCP_RR(Port, Type) { (0x0009 << 16) | (Port), 0, Type, { 0xC0,0,0,0,0,0,0,0x46 } } - -#define SVCID_DNS(Type) SVCID_TCP_RR(53, Type) - -#define SVCID_DNS_TYPE_A SVCID_DNS(0x0001) -#define SVCID_DNS_TYPE_NS SVCID_DNS(0x0002) -#define SVCID_DNS_TYPE_MD SVCID_DNS(0x0003) -#define SVCID_DNS_TYPE_MF SVCID_DNS(0x0004) -#define SVCID_DNS_TYPE_CNAME SVCID_DNS(0x0005) -#define SVCID_DNS_TYPE_SOA SVCID_DNS(0x0006) -#define SVCID_DNS_TYPE_MB SVCID_DNS(0x0007) -#define SVCID_DNS_TYPE_MG SVCID_DNS(0x0008) -#define SVCID_DNS_TYPE_MR SVCID_DNS(0x0009) -#define SVCID_DNS_TYPE_NULL SVCID_DNS(0x000a) -#define SVCID_DNS_TYPE_WKS SVCID_DNS(0x000b) -#define SVCID_DNS_TYPE_PTR SVCID_DNS(0x000c) -#define SVCID_DNS_TYPE_HINFO SVCID_DNS(0x000d) -#define SVCID_DNS_TYPE_MINFO SVCID_DNS(0x000e) -#define SVCID_DNS_TYPE_MX SVCID_DNS(0x000f) -#define SVCID_DNS_TYPE_TEXT SVCID_DNS(0x0010) -#define SVCID_DNS_TYPE_RP SVCID_DNS(0x0011) -#define SVCID_DNS_TYPE_AFSDB SVCID_DNS(0x0012) -#define SVCID_DNS_TYPE_X25 SVCID_DNS(0x0013) -#define SVCID_DNS_TYPE_ISDN SVCID_DNS(0x0014) -#define SVCID_DNS_TYPE_RT SVCID_DNS(0x0015) -#define SVCID_DNS_TYPE_NSAP SVCID_DNS(0x0016) +#define SVCID_ARCHIVE_SERVER_DYNAMIC_SAP SVCID_NETWARE(0x2E) +#define SVCID_ADVERTISING_PRINT_SERVER SVCID_NETWARE(0x47) +#define SVCID_BTRIEVE_VAP SVCID_NETWARE(0x4B) +#define SVCID_DIRECTORY_SERVER SVCID_NETWARE(0x278) +#define SVCID_NETWARE_386 SVCID_NETWARE(0x107) +#define SVCID_HP_PRINT_SERVER SVCID_NETWARE(0x30C) +#define SVCID_SNA_SERVER SVCID_NETWARE(0x444) +#define SVCID_SAA_SERVER SVCID_NETWARE(0x130) + +#define SVCID_DNS_TYPE_A SVCID_DNS(0x0001) +#define SVCID_DNS_TYPE_NS SVCID_DNS(0x0002) +#define SVCID_DNS_TYPE_MD SVCID_DNS(0x0003) +#define SVCID_DNS_TYPE_MF SVCID_DNS(0x0004) +#define SVCID_DNS_TYPE_CNAME SVCID_DNS(0x0005) +#define SVCID_DNS_TYPE_SOA SVCID_DNS(0x0006) +#define SVCID_DNS_TYPE_MB SVCID_DNS(0x0007) +#define SVCID_DNS_TYPE_MG SVCID_DNS(0x0008) +#define SVCID_DNS_TYPE_MR SVCID_DNS(0x0009) +#define SVCID_DNS_TYPE_NULL SVCID_DNS(0x000a) +#define SVCID_DNS_TYPE_WKS SVCID_DNS(0x000b) +#define SVCID_DNS_TYPE_PTR SVCID_DNS(0x000c) +#define SVCID_DNS_TYPE_HINFO SVCID_DNS(0x000d) +#define SVCID_DNS_TYPE_MINFO SVCID_DNS(0x000e) +#define SVCID_DNS_TYPE_MX SVCID_DNS(0x000f) +#define SVCID_DNS_TYPE_TEXT SVCID_DNS(0x0010) +#define SVCID_DNS_TYPE_RP SVCID_DNS(0x0011) +#define SVCID_DNS_TYPE_AFSDB SVCID_DNS(0x0012) +#define SVCID_DNS_TYPE_X25 SVCID_DNS(0x0013) +#define SVCID_DNS_TYPE_ISDN SVCID_DNS(0x0014) +#define SVCID_DNS_TYPE_RT SVCID_DNS(0x0015) +#define SVCID_DNS_TYPE_NSAP SVCID_DNS(0x0016) #define SVCID_DNS_TYPE_NSAPPTR SVCID_DNS(0x0017) -#define SVCID_DNS_TYPE_SIG SVCID_DNS(0x0018) -#define SVCID_DNS_TYPE_KEY SVCID_DNS(0x0019) -#define SVCID_DNS_TYPE_PX SVCID_DNS(0x001a) -#define SVCID_DNS_TYPE_GPOS SVCID_DNS(0x001b) -#define SVCID_DNS_TYPE_AAAA SVCID_DNS(0x001c) -#define SVCID_DNS_TYPE_LOC SVCID_DNS(0x001d) -#define SVCID_DNS_TYPE_NXT SVCID_DNS(0x001e) -#define SVCID_DNS_TYPE_SRV SVCID_DNS(0x0021) -#define SVCID_DNS_TYPE_ATMA SVCID_DNS(0x0022) - -#define SVCID_TCP(Port) SVCID_TCP_RR(Port, 0) - -#define SVCID_ECHO_TCP SVCID_TCP(7) -#define SVCID_DISCARD_TCP SVCID_TCP(9) -#define SVCID_SYSTAT_TCP SVCID_TCP(11) -#define SVCID_SYSTAT_TCP SVCID_TCP(11) -#define SVCID_DAYTIME_TCP SVCID_TCP(13) -#define SVCID_NETSTAT_TCP SVCID_TCP(15) -#define SVCID_QOTD_TCP SVCID_TCP(17) -#define SVCID_CHARGEN_TCP SVCID_TCP(19) -#define SVCID_FTP_DATA_TCP SVCID_TCP(20) -#define SVCID_FTP_TCP SVCID_TCP(21) -#define SVCID_TELNET_TCP SVCID_TCP(23) -#define SVCID_SMTP_TCP SVCID_TCP(25) -#define SVCID_TIME_TCP SVCID_TCP(37) -#define SVCID_NAME_TCP SVCID_TCP(42) -#define SVCID_WHOIS_TCP SVCID_TCP(43) -#define SVCID_DOMAIN_TCP SVCID_TCP(53) -#define SVCID_NAMESERVER_TCP SVCID_TCP(53) -#define SVCID_MTP_TCP SVCID_TCP(57) -#define SVCID_RJE_TCP SVCID_TCP(77) -#define SVCID_FINGER_TCP SVCID_TCP(79) -#define SVCID_LINK_TCP SVCID_TCP(87) -#define SVCID_SUPDUP_TCP SVCID_TCP(95) -#define SVCID_HOSTNAMES_TCP SVCID_TCP(101) -#define SVCID_ISO_TSAP_TCP SVCID_TCP(102) -#define SVCID_DICTIONARY_TCP SVCID_TCP(103) -#define SVCID_X400_TCP SVCID_TCP(103) -#define SVCID_X400_SND_TCP SVCID_TCP(104) -#define SVCID_CSNET_NS_TCP SVCID_TCP(105) -#define SVCID_POP_TCP SVCID_TCP(109) -#define SVCID_POP2_TCP SVCID_TCP(109) -#define SVCID_POP3_TCP SVCID_TCP(110) -#define SVCID_PORTMAP_TCP SVCID_TCP(111) -#define SVCID_SUNRPC_TCP SVCID_TCP(111) -#define SVCID_AUTH_TCP SVCID_TCP(113) -#define SVCID_SFTP_TCP SVCID_TCP(115) -#define SVCID_PATH_TCP SVCID_TCP(117) -#define SVCID_UUCP_PATH_TCP SVCID_TCP(117) -#define SVCID_NNTP_TCP SVCID_TCP(119) -#define SVCID_NBSESSION_TCP SVCID_TCP(139) -#define SVCID_NEWS_TCP SVCID_TCP(144) -#define SVCID_TCPREPO_TCP SVCID_TCP(158) -#define SVCID_PRINT_SRV_TCP SVCID_TCP(170) -#define SVCID_VMNET_TCP SVCID_TCP(175) -#define SVCID_VMNET0_TCP SVCID_TCP(400) -#define SVCID_EXEC_TCP SVCID_TCP(512) -#define SVCID_LOGIN_TCP SVCID_TCP(513) -#define SVCID_SHELL_TCP SVCID_TCP(514) -#define SVCID_PRINTER_TCP SVCID_TCP(515) -#define SVCID_EFS_TCP SVCID_TCP(520) -#define SVCID_TEMPO_TCP SVCID_TCP(526) -#define SVCID_COURIER_TCP SVCID_TCP(530) -#define SVCID_CONFERENCE_TCP SVCID_TCP(531) -#define SVCID_NETNEWS_TCP SVCID_TCP(532) -#define SVCID_UUCP_TCP SVCID_TCP(540) -#define SVCID_KLOGIN_TCP SVCID_TCP(543) -#define SVCID_KSHELL_TCP SVCID_TCP(544) -#define SVCID_REMOTEFS_TCP SVCID_TCP(556) -#define SVCID_GARCON_TCP SVCID_TCP(600) -#define SVCID_MAITRD_TCP SVCID_TCP(601) -#define SVCID_BUSBOY_TCP SVCID_TCP(602) -#define SVCID_KERBEROS_TCP SVCID_TCP(750) -#define SVCID_KERBEROS_MASTER_TCP SVCID_TCP(751) -#define SVCID_KRB_PROP_TCP SVCID_TCP(754) -#define SVCID_ERLOGIN_TCP SVCID_TCP(888) -#define SVCID_KPOP_TCP SVCID_TCP(1109) -#define SVCID_INGRESLOCK_TCP SVCID_TCP(1524) -#define SVCID_KNETD_TCP SVCID_TCP(2053) -#define SVCID_EKLOGIN_TCP SVCID_TCP(2105) -#define SVCID_RMT_TCP SVCID_TCP(5555) -#define SVCID_MTB_TCP SVCID_TCP(5556) -#define SVCID_MAN_TCP SVCID_TCP(9535) -#define SVCID_W_TCP SVCID_TCP(9536) -#define SVCID_MANTST_TCP SVCID_TCP(9537) -#define SVCID_BNEWS_TCP SVCID_TCP(10000) -#define SVCID_QUEUE_TCP SVCID_TCP(10001) -#define SVCID_POKER_TCP SVCID_TCP(10002) -#define SVCID_GATEWAY_TCP SVCID_TCP(10003) -#define SVCID_REMP_TCP SVCID_TCP(10004) -#define SVCID_QMASTER_TCP SVCID_TCP(10012) - -#define SVCID_UDP_RR(Port, Type) { (0x000A << 16) | (Port), 0, Type, { 0xC0,0,0,0,0,0,0,0x46 } } -#define SVCID_UDP(Port) SVCID_UDP_RR(Port, 0) - -#define SVCID_ECHO_UDP SVCID_UDP(7) -#define SVCID_DISCARD_UDP SVCID_UDP(9) -#define SVCID_DAYTIME_UDP SVCID_UDP(13) -#define SVCID_QOTD_UDP SVCID_UDP(17) -#define SVCID_CHARGEN_UDP SVCID_UDP(19) -#define SVCID_TIME_UDP SVCID_UDP(37) -#define SVCID_RLP_UDP SVCID_UDP(39) -#define SVCID_NAME_UDP SVCID_UDP(42) -#define SVCID_DOMAIN_UDP SVCID_UDP(53) -#define SVCID_NAMESERVER_UDP SVCID_UDP(53) -#define SVCID_BOOTP_UDP SVCID_UDP(67) -#define SVCID_TFTP_UDP SVCID_UDP(69) -#define SVCID_PORTMAP_UDP SVCID_UDP(111) -#define SVCID_SUNRPC_UDP SVCID_UDP(111) -#define SVCID_NTP_UDP SVCID_UDP(123) -#define SVCID_NBNAME_UDP SVCID_UDP(137) -#define SVCID_NBDATAGRAM_UDP SVCID_UDP(138) -#define SVCID_SGMP_UDP SVCID_UDP(153) -#define SVCID_SNMP_UDP SVCID_UDP(161) -#define SVCID_SNMP_TRAP_UDP SVCID_UDP(162) -#define SVCID_LOAD_UDP SVCID_UDP(315) -#define SVCID_SYTEK_UDP SVCID_UDP(500) -#define SVCID_BIFF_UDP SVCID_UDP(512) -#define SVCID_WHO_UDP SVCID_UDP(513) -#define SVCID_SYSLOG_UDP SVCID_UDP(514) -#define SVCID_TALK_UDP SVCID_UDP(517) -#define SVCID_NTALK_UDP SVCID_UDP(518) -#define SVCID_ROUTE_UDP SVCID_UDP(520) -#define SVCID_TIMED_UDP SVCID_UDP(525) -#define SVCID_RVD_CONTROL_UDP SVCID_UDP(531) -#define SVCID_NETWALL_UDP SVCID_UDP(533) -#define SVCID_NEW_RWHO_UDP SVCID_UDP(550) -#define SVCID_RMONITOR_UDP SVCID_UDP(560) -#define SVCID_MONITOR_UDP SVCID_UDP(561) -#define SVCID_ACCTMASTER_UDP SVCID_UDP(700) -#define SVCID_ACCTSLAVE_UDP SVCID_UDP(701) -#define SVCID_ACCT_UDP SVCID_UDP(702) -#define SVCID_ACCTLOGIN_UDP SVCID_UDP(703) -#define SVCID_ACCTPRINTER_UDP SVCID_UDP(704) -#define SVCID_ELCSD_UDP SVCID_UDP(704) -#define SVCID_ACCTINFO_UDP SVCID_UDP(705) -#define SVCID_ACCTSLAVE2_UDP SVCID_UDP(706) -#define SVCID_ACCTDISK_UDP SVCID_UDP(707) -#define SVCID_KERBEROS_UDP SVCID_UDP(750) -#define SVCID_KERBEROS_MASTER_UDP SVCID_UDP(751) -#define SVCID_PASSWD_SERVER_UDP SVCID_UDP(752) -#define SVCID_USERREG_SERVER_UDP SVCID_UDP(753) -#define SVCID_PHONE_UDP SVCID_UDP(1167) -#define SVCID_MAZE_UDP SVCID_UDP(1666) -#define SVCID_NFS_UDP SVCID_UDP(2049) -#define SVCID_RSCS0_UDP SVCID_UDP(10000) -#define SVCID_RSCS1_UDP SVCID_UDP(10001) -#define SVCID_RSCS2_UDP SVCID_UDP(10002) -#define SVCID_RSCS3_UDP SVCID_UDP(10003) -#define SVCID_RSCS4_UDP SVCID_UDP(10004) -#define SVCID_RSCS5_UDP SVCID_UDP(10005) -#define SVCID_RSCS6_UDP SVCID_UDP(10006) -#define SVCID_RSCS7_UDP SVCID_UDP(10007) -#define SVCID_RSCS8_UDP SVCID_UDP(10008) -#define SVCID_RSCS9_UDP SVCID_UDP(10009) -#define SVCID_RSCSA_UDP SVCID_UDP(10010) -#define SVCID_RSCSB_UDP SVCID_UDP(10011) -#define SVCID_QMASTER_UDP SVCID_UDP(10012) +#define SVCID_DNS_TYPE_SIG SVCID_DNS(0x0018) +#define SVCID_DNS_TYPE_KEY SVCID_DNS(0x0019) +#define SVCID_DNS_TYPE_PX SVCID_DNS(0x001a) +#define SVCID_DNS_TYPE_GPOS SVCID_DNS(0x001b) +#define SVCID_DNS_TYPE_AAAA SVCID_DNS(0x001c) +#define SVCID_DNS_TYPE_LOC SVCID_DNS(0x001d) +#define SVCID_DNS_TYPE_NXT SVCID_DNS(0x001e) +#define SVCID_DNS_TYPE_SRV SVCID_DNS(0x0021) +#define SVCID_DNS_TYPE_ATMA SVCID_DNS(0x0022) #ifdef __cplusplus } Modified: trunk/reactos/include/psdk/windns.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/windns.h?rev=…
============================================================================== --- trunk/reactos/include/psdk/windns.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/windns.h [iso-8859-1] Thu Oct 29 21:56:47 2009 @@ -28,6 +28,8 @@ #define DNS_UPDATE_TEST_USE_LOCAL_SYS_ACCT 0x400 #define DNS_UPDATE_FORCE_SECURITY_NEGO 0x800 #define DNS_UPDATE_RESERVED 0xffff0000 + +#define DNS_CONFIG_FLAG_ALLOC TRUE #ifndef RC_INVOKE typedef DWORD IP4_ADDRESS; Modified: trunk/reactos/include/psdk/winsock2.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winsock2.h?re…
============================================================================== --- trunk/reactos/include/psdk/winsock2.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winsock2.h [iso-8859-1] Thu Oct 29 21:56:47 2009 @@ -291,6 +291,7 @@ #define SO_LINGER 128 #define SO_OOBINLINE 256 #define SO_DONTLINGER (u_int)(~SO_LINGER) +#define SO_EXCLUSIVEADDRUSE ((u_int)(~SO_REUSEADDR)) #define SO_SNDBUF 0x1001 #define SO_RCVBUF 0x1002 #define SO_SNDLOWAT 0x1003 @@ -299,6 +300,7 @@ #define SO_RCVTIMEO 0x1006 #define SO_ERROR 0x1007 #define SO_TYPE 0x1008 +#define SO_CONDITIONAL_ACCEPT 0x3002 #endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */ #define INVALID_SOCKET (SOCKET)(~0)
15 years, 1 month
1
0
0
0
[sginsberg] 43833: - Missed this file
by sginsberg@svn.reactos.org
Author: sginsberg Date: Thu Oct 29 21:10:29 2009 New Revision: 43833 URL:
http://svn.reactos.org/svn/reactos?rev=43833&view=rev
Log: - Missed this file Modified: trunk/reactos/hal/hal/hal.c Modified: trunk/reactos/hal/hal/hal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/hal/hal.c?rev=43833&r1…
============================================================================== --- trunk/reactos/hal/hal/hal.c [iso-8859-1] (original) +++ trunk/reactos/hal/hal/hal.c [iso-8859-1] Thu Oct 29 21:10:29 2009 @@ -584,15 +584,13 @@ } -ULONG -FASTCALL -HalSystemVectorDispatchEntry( - ULONG Unknown1, - ULONG Unknown2, - ULONG Unknown3) -{ - UNIMPLEMENTED; - +UCHAR +FASTCALL +HalSystemVectorDispatchEntry(IN ULONG Vector, + OUT PKINTERRUPT_ROUTINE **FlatDispatch, + OUT PKINTERRUPT_ROUTINE *NoConnection) +{ + UNIMPLEMENTED; return 0; }
15 years, 1 month
1
0
0
0
[sginsberg] 43832: - INITIAL_STALL_COUNT makes more sense in decimal (100) than hex (0x64) so define it that way. - Protect CMOS access with the CMOS spinlock. - Add CMOS initialization to set up the default value of the CMOS century byte offset (not used yet). - Stub out profile interrupt support in HAL. Register and stub out the profile interrupt handler, but don't handle it yet as vital parts of the rest of the implementation is missing. - Fix several bugs in the kernel profile implementation
by sginsberg@svn.reactos.org
Author: sginsberg Date: Thu Oct 29 20:58:41 2009 New Revision: 43832 URL:
http://svn.reactos.org/svn/reactos?rev=43832&view=rev
Log: - INITIAL_STALL_COUNT makes more sense in decimal (100) than hex (0x64) so define it that way. - Protect CMOS access with the CMOS spinlock. - Add CMOS initialization to set up the default value of the CMOS century byte offset (not used yet). - Stub out profile interrupt support in HAL. Register and stub out the profile interrupt handler, but don't handle it yet as vital parts of the rest of the implementation is missing. - Fix several bugs in the kernel profile implementation: - Don't hardcode to PROFILE_LEVEL when raising IRQL : HAL can override this, so use KiProfileIrql. Also, starting/stopping profile interrupts must be done at the profile IRQL, so don't lower it back before calling HAL, which is now enabled. - Fix KeSet/QueryIntervalProfile to properly set/query profile intervals through HAL -- pass the correct structures and handle the ProfileAlignmentFixup case properly, and call HAL when setting the timer interval as the interval may be overridden by it. - KeStartProfile returns BOOLEAN to tell if the profile was started or not, just like KeStopProfile. - Make the interrupt implementation more portable for non-PIC architectures. - Fix HalSystemVectorDispatchEntry; it returns a type (UCHAR), not TRUE/FALSE (BOOLEAN). - Begin implementing the framework for querying HAL resource usage (keeping track of internal address space and vector registrations/usage). Modified: trunk/reactos/hal/halamd64/generic/misc.c trunk/reactos/hal/halarm/generic/hal.c trunk/reactos/hal/halppc/generic/misc.c trunk/reactos/hal/halx86/generic/beep.c trunk/reactos/hal/halx86/generic/cmos.c trunk/reactos/hal/halx86/generic/halinit.c trunk/reactos/hal/halx86/generic/misc.c trunk/reactos/hal/halx86/generic/reboot.c trunk/reactos/hal/halx86/generic/sysinfo.c trunk/reactos/hal/halx86/generic/systimer.S trunk/reactos/hal/halx86/include/halp.h trunk/reactos/include/ddk/winddk.h trunk/reactos/include/ndk/amd64/ketypes.h trunk/reactos/include/ndk/arm/ketypes.h trunk/reactos/include/ndk/halfuncs.h trunk/reactos/include/ndk/i386/asm.h trunk/reactos/include/ndk/i386/ketypes.h trunk/reactos/ntoskrnl/fstub/halstub.c trunk/reactos/ntoskrnl/include/internal/hal.h trunk/reactos/ntoskrnl/include/internal/ke.h trunk/reactos/ntoskrnl/ke/i386/irqobj.c trunk/reactos/ntoskrnl/ke/profobj.c Modified: trunk/reactos/hal/halamd64/generic/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halamd64/generic/misc.…
============================================================================== --- trunk/reactos/hal/halamd64/generic/misc.c [iso-8859-1] (original) +++ trunk/reactos/hal/halamd64/generic/misc.c [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -83,7 +83,7 @@ /* * @implemented */ -BOOLEAN +UCHAR FASTCALL HalSystemVectorDispatchEntry(IN ULONG Vector, OUT PKINTERRUPT_ROUTINE **FlatDispatch, Modified: trunk/reactos/hal/halarm/generic/hal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halarm/generic/hal.c?r…
============================================================================== --- trunk/reactos/hal/halarm/generic/hal.c [iso-8859-1] (original) +++ trunk/reactos/hal/halarm/generic/hal.c [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -857,12 +857,11 @@ } -ULONG -FASTCALL -HalSystemVectorDispatchEntry( - ULONG Unknown1, - ULONG Unknown2, - ULONG Unknown3) +UCHAR +FASTCALL +HalSystemVectorDispatchEntry(IN ULONG Vector, + OUT PKINTERRUPT_ROUTINE **FlatDispatch, + OUT PKINTERRUPT_ROUTINE *NoConnection) { UNIMPLEMENTED; Modified: trunk/reactos/hal/halppc/generic/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halppc/generic/misc.c?…
============================================================================== --- trunk/reactos/hal/halppc/generic/misc.c [iso-8859-1] (original) +++ trunk/reactos/hal/halppc/generic/misc.c [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -83,7 +83,7 @@ /* * @implemented */ -BOOLEAN +UCHAR FASTCALL HalSystemVectorDispatchEntry(IN ULONG Vector, OUT PKINTERRUPT_ROUTINE **FlatDispatch, Modified: trunk/reactos/hal/halx86/generic/beep.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/beep.c?…
============================================================================== --- trunk/reactos/hal/halx86/generic/beep.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/beep.c [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -31,9 +31,9 @@ { UCHAR Data; ULONG Divider; - BOOLEAN Result = TRUE; - /* FIXME: Acquire CMOS Lock */ + /* Acquire CMOS Lock */ + HalpAcquireSystemHardwareSpinLock(); /* Turn the register off */ Data = READ_PORT_UCHAR(PORT_B); @@ -49,8 +49,8 @@ if (Divider > 0x10000) { /* Fail */ - Result = FALSE; - goto Cleanup; + HalpReleaseCmosSpinLock(); + return FALSE; } /* Set timer divider */ @@ -62,11 +62,9 @@ WRITE_PORT_UCHAR(PORT_B, READ_PORT_UCHAR(PORT_B) | 0x03); } -Cleanup: - /* FIXME: Release hardware lock */ + /* Release CMOS lock */ + HalpReleaseCmosSpinLock(); - /* Return result */ - return Result; + /* Return success */ + return TRUE; } - - Modified: trunk/reactos/hal/halx86/generic/cmos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/cmos.c?…
============================================================================== --- trunk/reactos/hal/halx86/generic/cmos.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/cmos.c [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -16,6 +16,7 @@ /* GLOBALS *******************************************************************/ KSPIN_LOCK HalpSystemHardwareLock; +UCHAR HalpCmosCenturyOffset; /* PRIVATE FUNCTIONS *********************************************************/ @@ -53,13 +54,14 @@ ULONG Address = SlotNumber; ULONG Len = Length; - /* FIXME: Acquire CMOS Lock */ - /* Do nothing if we don't have a length */ if (!Length) return 0; + /* Acquire CMOS Lock */ + HalpAcquireSystemHardwareSpinLock(); + /* Check if this is simple CMOS */ - if (!BusNumber) + if (BusNumber == 0) { /* Loop the buffer up to 0xFF */ while ((Len > 0) && (Address < 0x100)) @@ -88,7 +90,8 @@ } } - /* FIXME: Release the CMOS Lock */ + /* Release CMOS Lock */ + HalpReleaseCmosSpinLock(); /* Return length read */ return Length - Len; @@ -105,13 +108,14 @@ ULONG Address = SlotNumber; ULONG Len = Length; - /* FIXME: Acquire CMOS Lock */ - /* Do nothing if we don't have a length */ if (!Length) return 0; + /* Acquire CMOS Lock */ + HalpAcquireSystemHardwareSpinLock(); + /* Check if this is simple CMOS */ - if (!BusNumber) + if (BusNumber == 0) { /* Loop the buffer up to 0xFF */ while ((Len > 0) && (Address < 0x100)) @@ -140,10 +144,22 @@ } } - /* FIXME: Release the CMOS Lock */ + /* Release CMOS Lock */ + HalpReleaseCmosSpinLock(); /* Return length read */ return Length - Len; +} + +VOID +NTAPI +HalpInitializeCmos(VOID) +{ + /* Set default century offset byte */ + HalpCmosCenturyOffset = 50; + + /* No support for EISA or MCA */ + ASSERT(HalpBusType == MACHINE_TYPE_ISA); } /* PUBLIC FUNCTIONS **********************************************************/ @@ -162,12 +178,14 @@ /* Only variable supported on x86 */ if (_stricmp(Name, "LastKnownGood")) return ENOENT; - /* FIXME: Acquire CMOS Lock */ + /* Acquire CMOS Lock */ + HalpAcquireSystemHardwareSpinLock(); /* Query the current value */ Val = HalpReadCmos(RTC_REGISTER_B) & 0x01; - /* FIXME: Release CMOS lock */ + /* Release CMOS lock */ + HalpReleaseCmosSpinLock(); /* Check the flag */ if (Val) @@ -201,14 +219,16 @@ /* Check if this is true or false */ if (!_stricmp(Value, "TRUE")) { - /* It's true, acquire CMOS lock (FIXME) */ + /* It's true, acquire CMOS lock */ + HalpAcquireSystemHardwareSpinLock(); /* Read the current value and add the flag */ Val = HalpReadCmos(RTC_REGISTER_B) | 1; } else if (!_stricmp(Value, "FALSE")) { - /* It's false, acquire CMOS lock (FIXME) */ + /* It's false, acquire CMOS lock */ + HalpAcquireSystemHardwareSpinLock(); /* Read the current value and mask out the flag */ Val = HalpReadCmos(RTC_REGISTER_B) & ~1; @@ -223,6 +243,7 @@ HalpWriteCmos(RTC_REGISTER_B, Val); /* Release the lock and return success */ + HalpReleaseCmosSpinLock(); return ESUCCESS; } @@ -233,7 +254,8 @@ NTAPI HalQueryRealTimeClock(OUT PTIME_FIELDS Time) { - /* FIXME: Acquire CMOS Lock */ + /* Acquire CMOS Lock */ + HalpAcquireSystemHardwareSpinLock(); /* Loop while update is in progress */ while ((HalpReadCmos(RTC_REGISTER_A)) & RTC_REG_A_UIP); @@ -253,7 +275,8 @@ /* Compensate for the century field */ Time->Year += (Time->Year > 80) ? 1900: 2000; - /* FIXME: Release CMOS Lock */ + /* Release CMOS lock */ + HalpReleaseCmosSpinLock(); /* Always return TRUE */ return TRUE; @@ -266,7 +289,8 @@ NTAPI HalSetRealTimeClock(IN PTIME_FIELDS Time) { - /* FIXME: Acquire CMOS Lock */ + /* Acquire CMOS Lock */ + HalpAcquireSystemHardwareSpinLock(); /* Loop while update is in progress */ while ((HalpReadCmos(RTC_REGISTER_A)) & RTC_REG_A_UIP); @@ -282,10 +306,9 @@ /* FIXME: Set the century byte */ - /* FIXME: Release the CMOS Lock */ + /* Release CMOS lock */ + HalpReleaseCmosSpinLock(); /* Always return TRUE */ return TRUE; } - -/* EOF */ Modified: trunk/reactos/hal/halx86/generic/halinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/halinit…
============================================================================== --- trunk/reactos/hal/halx86/generic/halinit.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/halinit.c [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -97,11 +97,11 @@ /* Force initial PIC state */ KfRaiseIrql(KeGetCurrentIrql()); - /* Setup busy waiting */ - HalpCalibrateStallExecution(); + /* Initialize CMOS lock */ + KeInitializeSpinLock(&HalpSystemHardwareLock); - /* Initialize the clock */ - HalpInitializeClock(); + /* Initialize CMOS */ + HalpInitializeCmos(); /* Fill out the dispatch tables */ HalQuerySystemInformation = HaliQuerySystemInformation; @@ -112,8 +112,27 @@ HalResetDisplay = HalpBiosDisplayReset; HalHaltSystem = HaliHaltSystem; - /* Initialize the hardware lock (CMOS) */ - KeInitializeSpinLock(&HalpSystemHardwareLock); + /* Register IRQ 2 */ + HalpRegisterVector(IDT_INTERNAL, + PRIMARY_VECTOR_BASE + 2, + PRIMARY_VECTOR_BASE + 2, + HIGH_LEVEL); + + /* Setup I/O space */ + HalpDefaultIoSpace.Next = HalpAddressUsageList; + HalpAddressUsageList = &HalpDefaultIoSpace; + + /* Setup busy waiting */ + HalpCalibrateStallExecution(); + + /* Initialize the clock */ + HalpInitializeClock(); + + /* + * We could be rebooting with a pending profile interrupt, + * so clear it here before interrupts are enabled + */ + HalStopProfileInterrupt(ProfileTime); /* Do some HAL-specific initialization */ HalpInitPhase0(LoaderBlock); @@ -123,12 +142,21 @@ /* Initialize the default HAL stubs for bus handling functions */ HalpInitNonBusHandler(); - /* Enable the clock interrupt */ - ((PKIPCR)KeGetPcr())->IDT[0x30].ExtendedOffset = - (USHORT)(((ULONG_PTR)HalpClockInterrupt >> 16) & 0xFFFF); - ((PKIPCR)KeGetPcr())->IDT[0x30].Offset = - (USHORT)((ULONG_PTR)HalpClockInterrupt); - HalEnableSystemInterrupt(0x30, CLOCK2_LEVEL, Latched); + /* Enable IRQ 0 */ + HalpEnableInterruptHandler(IDT_DEVICE, + 0, + PRIMARY_VECTOR_BASE, + CLOCK2_LEVEL, + HalpClockInterrupt, + Latched); + + /* Enable IRQ 8 */ + HalpEnableInterruptHandler(IDT_DEVICE, + 0, + PRIMARY_VECTOR_BASE + 8, + PROFILE_LEVEL, + HalpProfileInterrupt, + Latched); /* Initialize DMA. NT does this in Phase 0 */ HalpInitDma(); Modified: trunk/reactos/hal/halx86/generic/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/misc.c?…
============================================================================== --- trunk/reactos/hal/halx86/generic/misc.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/misc.c [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -83,14 +83,14 @@ /* * @implemented */ -BOOLEAN +UCHAR FASTCALL HalSystemVectorDispatchEntry(IN ULONG Vector, OUT PKINTERRUPT_ROUTINE **FlatDispatch, OUT PKINTERRUPT_ROUTINE *NoConnection) { /* Not implemented on x86 */ - return FALSE; + return 0; } /* Modified: trunk/reactos/hal/halx86/generic/reboot.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/reboot.…
============================================================================== --- trunk/reactos/hal/halx86/generic/reboot.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/reboot.c [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -49,10 +49,8 @@ /* Enable warm reboot */ ((PUSHORT)ZeroPageMapping)[0x239] = 0x1234; - /* FIXME: Lock CMOS Access */ - - /* Disable interrupts */ - _disable(); + /* Lock CMOS Access */ + HalpAcquireSystemHardwareSpinLock(); /* Setup control register B */ WRITE_PORT_UCHAR((PUCHAR)0x70, 0x0B); Modified: trunk/reactos/hal/halx86/generic/sysinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/sysinfo…
============================================================================== --- trunk/reactos/hal/halx86/generic/sysinfo.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/sysinfo.c [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -13,15 +13,37 @@ #include <debug.h> PUCHAR KdComPortInUse; +PADDRESS_USAGE HalpAddressUsageList; +IDTUsageFlags HalpIDTUsageFlags[MAXIMUM_IDTVECTOR]; +IDTUsage HalpIDTUsage[MAXIMUM_IDTVECTOR]; + +ADDRESS_USAGE HalpDefaultIoSpace = +{ + NULL, CmResourceTypePort, IDT_INTERNAL, + { + {0x2000, 0xC000}, /* PIC?? */ + {0xC000, 0x1000}, /* DMA 2 */ + {0x8000, 0x1000}, /* DMA 1 */ + {0x2000, 0x200}, /* PIC 1 */ + {0xA000, 0x200}, /* PIC 2 */ + {0x4000, 0x400}, /* PIT 1 */ + {0x4800, 0x400}, /* PIT 2 */ + {0x9200, 0x100}, /* ????? */ + {0x7000, 0x200}, /* CMOS */ + {0xF000, 0x1000}, /* ????? */ + {0xCF800, 0x800}, /* PCI 0 */ + {0,0}, + } +}; /* FUNCTIONS *****************************************************************/ NTSTATUS NTAPI -HaliQuerySystemInformation(IN HAL_QUERY_INFORMATION_CLASS InformationClass, - IN ULONG BufferSize, - IN OUT PVOID Buffer, - OUT PULONG ReturnedLength) +HaliQuerySystemInformation(IN HAL_QUERY_INFORMATION_CLASS InformationClass, + IN ULONG BufferSize, + IN OUT PVOID Buffer, + OUT PULONG ReturnedLength) { #define REPORT_THIS_CASE(X) case X: DPRINT1("Unhandled case: %s\n", #X); break switch (InformationClass) @@ -68,4 +90,44 @@ return STATUS_NOT_IMPLEMENTED; } +VOID +NTAPI +HalpRegisterVector(IN UCHAR Flags, + IN ULONG BusVector, + IN ULONG SystemVector, + IN KIRQL Irql) +{ + /* Save the vector flags */ + HalpIDTUsageFlags[SystemVector].Flags = Flags; + + /* Save the vector data */ + HalpIDTUsage[SystemVector].Irql = Irql; + HalpIDTUsage[SystemVector].BusReleativeVector = BusVector; +} + +VOID +NTAPI +HalpEnableInterruptHandler(IN UCHAR Flags, + IN ULONG BusVector, + IN ULONG SystemVector, + IN KIRQL Irql, + IN PVOID Handler, + IN KINTERRUPT_MODE Mode) +{ + UCHAR Entry; + + /* Convert the vector into the IDT entry */ + Entry = HalVectorToIDTEntry(SystemVector); + + /* Register the vector */ + HalpRegisterVector(Flags, BusVector, SystemVector, Irql); + + /* Connect the interrupt */ + ((PKIPCR)KeGetPcr())->IDT[Entry].ExtendedOffset = (USHORT)(((ULONG_PTR)Handler >> 16) & 0xFFFF); + ((PKIPCR)KeGetPcr())->IDT[Entry].Offset = (USHORT)((ULONG_PTR)Handler); + + /* Enable the interrupt */ + HalEnableSystemInterrupt(SystemVector, Irql, Mode); +} + /* EOF */ Modified: trunk/reactos/hal/halx86/generic/systimer.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/systime…
============================================================================== --- trunk/reactos/hal/halx86/generic/systimer.S [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/systimer.S [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -17,7 +17,6 @@ _HalpLastPerfCounterHigh: .long 0 _HalpPerfCounterLow: .long 0 _HalpPerfCounterHigh: .long 0 -_HalpSystemHardwareLock: .long 0 _HalpSystemHardwareFlags: .long 0 _UnhandledMsg: @@ -52,6 +51,7 @@ popf ret #endif + .endfunc .global _HalpAcquireSystemHardwareSpinLock@0 @@ -84,7 +84,6 @@ /* Spin */ SPIN_ON_LOCK(eax, HardwareLock) - #else /* Save EFLAGS, disable interrupts and return */ pushf @@ -92,6 +91,7 @@ pop _HalpSystemHardwareFlags ret #endif + .endfunc .global _HalpCalibrateStallExecution@0 @@ -632,3 +632,28 @@ jmp _Kei386EoiHelper@0 .endfunc +.globl _HalpProfileInterrupt@0 +.func HalpProfileInterrupt@0 +TRAP_FIXUPS hpi_a, hpi_t, DoFixupV86, DoFixupAbios +_HalpProfileInterrupt@0: + + /* Enter trap */ + INT_PROLOG hpi_a, hpi_t, DoPushFakeErrorCode + + /* Push vector and make stack for IRQL */ + push 0x38 + sub esp, 4 + + /* Begin the interrupt */ + push esp + push 0x38 + push PROFILE_LEVEL + call _HalBeginSystemInterrupt@12 + + /* Check if it's spurious */ + or al, al + jz Spurious + + /* FIXME: We should not be getting profile interrupts yet! */ + int 3 +.endfunc Modified: trunk/reactos/hal/halx86/include/halp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/include/halp.h?…
============================================================================== --- trunk/reactos/hal/halx86/include/halp.h [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/include/halp.h [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -23,18 +23,64 @@ #define TIMER_BOTH 0x30 #define TIMER_MD2 0x4 +/* Usage flags */ +#define IDT_REGISTERED 0x01 +#define IDT_LATCHED 0x02 +#define IDT_INTERNAL 0x11 +#define IDT_DEVICE 0x21 + /* Conversion functions */ #define BCD_INT(bcd) \ (((bcd & 0xF0) >> 4) * 10 + (bcd & 0x0F)) #define INT_BCD(int) \ (UCHAR)(((int / 10) << 4) + (int % 10)) +typedef struct _IDTUsageFlags +{ + UCHAR Flags; +} IDTUsageFlags; + +typedef struct +{ + KIRQL Irql; + UCHAR BusReleativeVector; +} IDTUsage; + +typedef struct _HalAddressUsage +{ + struct _HalAddressUsage *Next; + CM_RESOURCE_TYPE Type; + UCHAR Flags; + struct + { + ULONG Start; + ULONG Length; + } Element[]; +} ADDRESS_USAGE, *PADDRESS_USAGE; + /* adapter.c */ PADAPTER_OBJECT NTAPI HalpAllocateAdapterEx(ULONG NumberOfMapRegisters,BOOLEAN IsMaster, BOOLEAN Dma32BitAddresses); /* bus.c */ VOID NTAPI HalpInitNonBusHandler (VOID); +/* sysinfo.c */ +VOID +NTAPI +HalpRegisterVector(IN UCHAR Flags, + IN ULONG BusVector, + IN ULONG SystemVector, + IN KIRQL Irql); + +VOID +NTAPI +HalpEnableInterruptHandler(IN UCHAR Flags, + IN ULONG BusVector, + IN ULONG SystemVector, + IN KIRQL Irql, + IN PVOID Handler, + IN KINTERRUPT_MODE Mode); + /* irql.c */ VOID NTAPI HalpInitPICs(VOID); @@ -44,12 +90,6 @@ VOID NTAPI HalpCalibrateStallExecution(VOID); - -ULONG -NTAPI -HalpQuery8254Counter( - VOID -); /* pci.c */ VOID HalpInitPciBus (VOID); @@ -61,6 +101,7 @@ VOID HalpInitPhase0 (PLOADER_PARAMETER_BLOCK LoaderBlock); VOID HalpInitPhase1(VOID); VOID NTAPI HalpClockInterrupt(VOID); +VOID NTAPI HalpProfileInterrupt(VOID); // // KD Support @@ -170,6 +211,30 @@ VOID NTAPI HaliHaltSystem( + VOID +); + +// +// CMOS initialization +// +VOID +NTAPI +HalpInitializeCmos( + VOID +); + +// +// Spinlock for protecting CMOS access +// +VOID +NTAPI +HalpAcquireSystemHardwareSpinLock( + VOID +); + +VOID +NTAPI +HalpReleaseCmosSpinLock( VOID ); @@ -187,6 +252,10 @@ extern PVOID HalpRealModeStart; extern PVOID HalpRealModeEnd; +extern ADDRESS_USAGE HalpDefaultIoSpace; + extern KSPIN_LOCK HalpSystemHardwareLock; +extern PADDRESS_USAGE HalpAddressUsageList; + #endif /* __INTERNAL_HAL_HAL_H */ Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=4…
============================================================================== --- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -2433,6 +2433,34 @@ ULONG Flags; } ARBITER_INTERFACE, *PARBITER_INTERFACE; +typedef enum _KPROFILE_SOURCE { + ProfileTime, + ProfileAlignmentFixup, + ProfileTotalIssues, + ProfilePipelineDry, + ProfileLoadInstructions, + ProfilePipelineFrozen, + ProfileBranchInstructions, + ProfileTotalNonissues, + ProfileDcacheMisses, + ProfileIcacheMisses, + ProfileCacheMisses, + ProfileBranchMispredictions, + ProfileStoreInstructions, + ProfileFpInstructions, + ProfileIntegerInstructions, + Profile2Issue, + Profile3Issue, + Profile4Issue, + ProfileSpecialInstructions, + ProfileTotalCycles, + ProfileIcacheIssues, + ProfileDcacheAccesses, + ProfileMemoryBarrierCycles, + ProfileLoadLinkedIssues, + ProfileMaximum +} KPROFILE_SOURCE; + typedef enum _HAL_QUERY_INFORMATION_CLASS { HalInstalledBusInformation, HalProfileSourceInformation, @@ -2469,6 +2497,19 @@ HalCpeLog, HalGenerateCmcInterrupt } HAL_SET_INFORMATION_CLASS, *PHAL_SET_INFORMATION_CLASS; + +typedef struct _HAL_PROFILE_SOURCE_INTERVAL +{ + KPROFILE_SOURCE Source; + ULONG_PTR Interval; +} HAL_PROFILE_SOURCE_INTERVAL, *PHAL_PROFILE_SOURCE_INTERVAL; + +typedef struct _HAL_PROFILE_SOURCE_INFORMATION +{ + KPROFILE_SOURCE Source; + BOOLEAN Supported; + ULONG Interval; +} HAL_PROFILE_SOURCE_INFORMATION, *PHAL_PROFILE_SOURCE_INFORMATION; typedef struct _MAP_REGISTER_ENTRY { @@ -4269,34 +4310,6 @@ (DDKAPI *PKINTERRUPT_ROUTINE)( VOID); -typedef enum _KPROFILE_SOURCE { - ProfileTime, - ProfileAlignmentFixup, - ProfileTotalIssues, - ProfilePipelineDry, - ProfileLoadInstructions, - ProfilePipelineFrozen, - ProfileBranchInstructions, - ProfileTotalNonissues, - ProfileDcacheMisses, - ProfileIcacheMisses, - ProfileCacheMisses, - ProfileBranchMispredictions, - ProfileStoreInstructions, - ProfileFpInstructions, - ProfileIntegerInstructions, - Profile2Issue, - Profile3Issue, - Profile4Issue, - ProfileSpecialInstructions, - ProfileTotalCycles, - ProfileIcacheIssues, - ProfileDcacheAccesses, - ProfileMemoryBarrierCycles, - ProfileLoadLinkedIssues, - ProfileMaximum -} KPROFILE_SOURCE; - typedef enum _CREATE_FILE_TYPE { CreateFileTypeNone, CreateFileTypeNamedPipe, Modified: trunk/reactos/include/ndk/amd64/ketypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/amd64/ketypes.…
============================================================================== --- trunk/reactos/include/ndk/amd64/ketypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/amd64/ketypes.h [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -116,7 +116,7 @@ // // HAL Variables // -#define INITIAL_STALL_COUNT 0x64 +#define INITIAL_STALL_COUNT 100 // // IOPM Definitions Modified: trunk/reactos/include/ndk/arm/ketypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/arm/ketypes.h?…
============================================================================== --- trunk/reactos/include/ndk/arm/ketypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/arm/ketypes.h [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -47,7 +47,7 @@ // // HAL Variables // -#define INITIAL_STALL_COUNT 0x64 +#define INITIAL_STALL_COUNT 100 // // Static Kernel-Mode Address start (use MM_KSEG0_BASE for actual) Modified: trunk/reactos/include/ndk/halfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/halfuncs.h?rev…
============================================================================== --- trunk/reactos/include/ndk/halfuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/halfuncs.h [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -203,6 +203,15 @@ PVOID NmiInfo ); +NTHALAPI +UCHAR +FASTCALL +HalSystemVectorDispatchEntry( + IN ULONG Vector, + OUT PKINTERRUPT_ROUTINE **FlatDispatch, + OUT PKINTERRUPT_ROUTINE *NoConnection +); + // // Environment Functions // @@ -226,6 +235,29 @@ #endif // +// Profiling Functions +// +VOID +NTAPI +HalStartProfileInterrupt( + IN KPROFILE_SOURCE ProfileSource +); + +NTHALAPI +VOID +NTAPI +HalStopProfileInterrupt( + IN KPROFILE_SOURCE ProfileSource +); + +NTHALAPI +ULONG_PTR +NTAPI +HalSetProfileInterval( + IN ULONG_PTR Interval +); + +// // Time Functions // NTHALAPI Modified: trunk/reactos/include/ndk/i386/asm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/i386/asm.h?rev…
============================================================================== --- trunk/reactos/include/ndk/i386/asm.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/i386/asm.h [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -588,6 +588,7 @@ #define PASSIVE_LEVEL 0x0 #define APC_LEVEL 0x1 #define DISPATCH_LEVEL 0x2 +#define PROFILE_LEVEL 0x1B #define CLOCK2_LEVEL 0x1C #define IPI_LEVEL 0x1D #define HIGH_LEVEL 0x1F Modified: trunk/reactos/include/ndk/i386/ketypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/i386/ketypes.h…
============================================================================== --- trunk/reactos/include/ndk/i386/ketypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/i386/ketypes.h [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -124,7 +124,7 @@ // // HAL Variables // -#define INITIAL_STALL_COUNT 0x64 +#define INITIAL_STALL_COUNT 100 // // IOPM Definitions Modified: trunk/reactos/ntoskrnl/fstub/halstub.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fstub/halstub.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/fstub/halstub.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fstub/halstub.c [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -59,12 +59,20 @@ (pKdReleasePciDeviceForDebugging)NULL, (pKdGetAcpiTablePhase0)NULL, (pKdCheckPowerButton)NULL, - (pHalVectorToIDTEntry)NULL, + (pHalVectorToIDTEntry)xHalVectorToIDTEntry, (pKdMapPhysicalMemory64)NULL, (pKdUnmapVirtualAddress)NULL }; /* FUNCTIONS *****************************************************************/ + +UCHAR +NTAPI +xHalVectorToIDTEntry(IN ULONG Vector) +{ + /* Return the vector */ + return Vector; +} VOID NTAPI Modified: trunk/reactos/ntoskrnl/include/internal/hal.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/hal.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/hal.h [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -51,6 +51,12 @@ NTAPI xHalHaltSystem( VOID +); + +UCHAR +NTAPI +xHalVectorToIDTEntry( + IN ULONG Vector ); Modified: trunk/reactos/ntoskrnl/include/internal/ke.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ke.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/ke.h [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -403,7 +403,7 @@ KAFFINITY Affinity ); -VOID +BOOLEAN NTAPI KeStartProfile( struct _KPROFILE* Profile, Modified: trunk/reactos/ntoskrnl/ke/i386/irqobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/irqobj.c?…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/irqobj.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/irqobj.c [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -46,10 +46,21 @@ { PKINTERRUPT_ROUTINE Handler; ULONG Current; + UCHAR Type; + UCHAR Entry; + + /* Check if this is a primary or 2nd-level dispatch */ + Type = HalSystemVectorDispatchEntry(Vector, + &Dispatch->FlatDispatch, + &Dispatch->NoDispatch); + ASSERT(Type == 0); + + /* Get the IDT entry for this vector */ + Entry = HalVectorToIDTEntry(Vector); /* Setup the unhandled dispatch */ Dispatch->NoDispatch = (PVOID)(((ULONG_PTR)&KiStartUnexpectedRange) + - (Vector - PRIMARY_VECTOR_BASE) * + (Entry - PRIMARY_VECTOR_BASE) * KiUnexpectedEntrySize); /* Setup the handlers */ @@ -59,9 +70,9 @@ Dispatch->FlatDispatch = NULL; /* Get the current handler */ - Current = ((((PKIPCR)KeGetPcr())->IDT[Vector].ExtendedOffset << 16) + Current = ((((PKIPCR)KeGetPcr())->IDT[Entry].ExtendedOffset << 16) & 0xFFFF0000) | - (((PKIPCR)KeGetPcr())->IDT[Vector].Offset & 0xFFFF); + (((PKIPCR)KeGetPcr())->IDT[Entry].Offset & 0xFFFF); /* Set the interrupt */ Dispatch->Interrupt = CONTAINING_RECORD(Current, @@ -105,6 +116,7 @@ DISPATCH_INFO Dispatch; PKINTERRUPT_ROUTINE Handler; PULONG Patch = &Interrupt->DispatchCode[0]; + UCHAR Entry; /* Get vector data */ KiGetVectorDispatch(Interrupt->Vector, &Dispatch); @@ -139,10 +151,13 @@ Handler = (PVOID)&Interrupt->DispatchCode; } + /* Get the IDT entry for this vector */ + Entry = HalVectorToIDTEntry(Interrupt->Vector); + /* Set the pointer in the IDT */ - ((PKIPCR)KeGetPcr())->IDT[Interrupt->Vector].ExtendedOffset = + ((PKIPCR)KeGetPcr())->IDT[Entry].ExtendedOffset = (USHORT)(((ULONG_PTR)Handler >> 16) & 0xFFFF); - ((PKIPCR)KeGetPcr())->IDT[Interrupt->Vector].Offset = + ((PKIPCR)KeGetPcr())->IDT[Entry].Offset = (USHORT)PtrToUlong(Handler); } Modified: trunk/reactos/ntoskrnl/ke/profobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/profobj.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ke/profobj.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/profobj.c [iso-8859-1] Thu Oct 29 20:58:41 2009 @@ -19,6 +19,7 @@ LIST_ENTRY KiProfileSourceListHead; KSPIN_LOCK KiProfileLock; ULONG KiProfileTimeInterval = 78125; /* Default resolution 7.8ms (sysinternals) */ +ULONG KiProfileAlignmentFixupInterval; /* FUNCTIONS *****************************************************************/ @@ -46,27 +47,27 @@ Profile->Affinity = Affinity; } -VOID -NTAPI -KeStartProfile(PKPROFILE Profile, - PVOID Buffer) +BOOLEAN +NTAPI +KeStartProfile(IN PKPROFILE Profile, + IN PVOID Buffer) { KIRQL OldIrql; PKPROFILE_SOURCE_OBJECT SourceBuffer; PKPROFILE_SOURCE_OBJECT CurrentSource; - BOOLEAN FreeBuffer = TRUE, SourceFound = FALSE; + BOOLEAN FreeBuffer = TRUE, SourceFound = FALSE, StartedProfile; PKPROCESS ProfileProcess; PLIST_ENTRY NextEntry; /* Allocate a buffer first, before we raise IRQL */ SourceBuffer = ExAllocatePoolWithTag(NonPagedPool, - sizeof(KPROFILE_SOURCE_OBJECT), - 'forP'); - if (!SourceBuffer) return; + sizeof(KPROFILE_SOURCE_OBJECT), + 'forP'); + if (!SourceBuffer) return FALSE; RtlZeroMemory(SourceBuffer, sizeof(KPROFILE_SOURCE_OBJECT)); - /* Raise to PROFILE_LEVEL */ - KeRaiseIrql(PROFILE_LEVEL, &OldIrql); + /* Raise to profile IRQL and acquire the profile lock */ + KeRaiseIrql(KiProfileIrql, &OldIrql); KeAcquireSpinLockAtDpcLevel(&KiProfileLock); /* Make sure it's not running */ @@ -75,6 +76,7 @@ /* Set it as Started */ Profile->Buffer = Buffer; Profile->Started = TRUE; + StartedProfile = TRUE; /* Get the process, if any */ ProfileProcess = Profile->Process; @@ -124,29 +126,39 @@ FreeBuffer = FALSE; } } - - /* Lower the IRQL */ + else + { + /* Already running so nothing to start */ + StartedProfile = FALSE; + } + + /* Release the profile lock */ KeReleaseSpinLockFromDpcLevel(&KiProfileLock); + + /* Tell HAL to start the profile interrupt */ + HalStartProfileInterrupt(Profile->Source); + + /* Lower back to original IRQL */ KeLowerIrql(OldIrql); - - /* FIXME: Tell HAL to Start the Profile Interrupt */ - //HalStartProfileInterrupt(Profile->Source); /* Free the pool */ if (FreeBuffer) ExFreePool(SourceBuffer); + + /* Return whether we could start the profile */ + return StartedProfile; } BOOLEAN NTAPI -KeStopProfile(PKPROFILE Profile) +KeStopProfile(IN PKPROFILE Profile) { KIRQL OldIrql; PKPROFILE_SOURCE_OBJECT CurrentSource = NULL; PLIST_ENTRY NextEntry; - BOOLEAN SourceFound = FALSE; - - /* Raise to PROFILE_LEVEL and acquire spinlock */ - KeRaiseIrql(PROFILE_LEVEL, &OldIrql); + BOOLEAN SourceFound = FALSE, StoppedProfile; + + /* Raise to profile IRQL and acquire the profile lock */ + KeRaiseIrql(KiProfileIrql, &OldIrql); KeAcquireSpinLockAtDpcLevel(&KiProfileLock); /* Make sure it's running */ @@ -155,6 +167,7 @@ /* Remove it from the list and disable */ RemoveEntryList(&Profile->ProfileListEntry); Profile->Started = FALSE; + StoppedProfile = TRUE; /* Start looping */ for (NextEntry = KiProfileSourceListHead.Flink; @@ -179,60 +192,99 @@ } } - - /* Lower IRQL */ + else + { + /* It wasn't! */ + StoppedProfile = FALSE; + } + + /* Release the profile lock */ KeReleaseSpinLockFromDpcLevel(&KiProfileLock); + + /* Stop the profile interrupt */ + HalStopProfileInterrupt(Profile->Source); + + /* Lower back to original IRQL */ KeLowerIrql(OldIrql); - - /* Stop Profiling. FIXME: Implement in HAL */ - //HalStopProfileInterrupt(Profile->Source); /* Free the Source Object */ if (SourceFound) ExFreePool(CurrentSource); - /* FIXME */ - return FALSE; + /* Return whether we could stop the profile */ + return StoppedProfile; } ULONG NTAPI -KeQueryIntervalProfile(KPROFILE_SOURCE ProfileSource) -{ - /* Check if this is the timer profile */ +KeQueryIntervalProfile(IN KPROFILE_SOURCE ProfileSource) +{ + HAL_PROFILE_SOURCE_INFORMATION ProfileSourceInformation; + ULONG ReturnLength, Interval; + NTSTATUS Status; + + /* Check what profile this is */ if (ProfileSource == ProfileTime) { - /* Return the good old 100ns sampling interval */ - return KiProfileTimeInterval; + /* Return the time interval */ + Interval = KiProfileTimeInterval; + } + else if (ProfileSource == ProfileAlignmentFixup) + { + /* Return the alignment interval */ + Interval = KiProfileAlignmentFixupInterval; } else { - /* Request it from HAL. FIXME: What structure is used? */ - HalQuerySystemInformation(HalProfileSourceInformation, - sizeof(NULL), - NULL, - NULL); - - return 0; - } -} - -VOID -NTAPI -KeSetIntervalProfile(KPROFILE_SOURCE ProfileSource, - ULONG Interval) -{ - /* Check if this is the timer profile */ + /* Request it from HAL */ + ProfileSourceInformation.Source = ProfileSource; + Status = HalQuerySystemInformation(HalProfileSourceInformation, + sizeof(HAL_PROFILE_SOURCE_INFORMATION), + &ProfileSourceInformation, + &ReturnLength); + + /* Check if HAL handled it and supports this profile */ + if (NT_SUCCESS(Status) && (ProfileSourceInformation.Supported)) + { + /* Get the interval */ + Interval = ProfileSourceInformation.Interval; + } + else + { + /* Unsupported or invalid source, fail */ + Interval = 0; + } + } + + /* Return the interval we got */ + return Interval; +} + +VOID +NTAPI +KeSetIntervalProfile(IN KPROFILE_SOURCE ProfileSource, + IN ULONG Interval) +{ + HAL_PROFILE_SOURCE_INTERVAL ProfileSourceInterval; + + /* Check what profile this is */ if (ProfileSource == ProfileTime) { - /* Set the good old 100ns sampling interval */ - KiProfileTimeInterval = Interval; + /* Set the interval through HAL */ + KiProfileTimeInterval = HalSetProfileInterval(Interval); + } + else if (ProfileSource == ProfileAlignmentFixup) + { + /* Set the alignment interval */ + KiProfileAlignmentFixupInterval = Interval; } else { - /* Set it with HAL. FIXME: What structure is used? */ - HalSetSystemInformation(HalProfileSourceInformation, - sizeof(NULL), - NULL); + /* HAL handles any other interval */ + ProfileSourceInterval.Source = ProfileSource; + ProfileSourceInterval.Interval = Interval; + HalSetSystemInformation(HalProfileSourceInterval, + sizeof(HAL_PROFILE_SOURCE_INTERVAL), + &ProfileSourceInterval); } } @@ -241,7 +293,7 @@ */ VOID NTAPI -KeProfileInterrupt(PKTRAP_FRAME TrapFrame) +KeProfileInterrupt(IN PKTRAP_FRAME TrapFrame) { /* Called from HAL for Timer Profiling */ KeProfileInterruptWithSource(TrapFrame, ProfileTime);
15 years, 1 month
1
0
0
0
[gedmurphy] 43831: undef min & max so they don't override the numeric_limits template methods
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Thu Oct 29 19:54:21 2009 New Revision: 43831 URL:
http://svn.reactos.org/svn/reactos?rev=43831&view=rev
Log: undef min & max so they don't override the numeric_limits template methods Modified: trunk/reactos/tools/rbuild/backend/mingw/mstools_detection.cpp Modified: trunk/reactos/tools/rbuild/backend/mingw/mstools_detection.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/mstools_detection.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/mingw/mstools_detection.cpp [iso-8859-1] Thu Oct 29 19:54:21 2009 @@ -21,6 +21,8 @@ #define UNICODE #define _UNICODE +#define NOMINMAX + #include "../../pch.h" #include "mingw.h" @@ -57,6 +59,8 @@ #else #error Unknown or unsupported C++ standard library #endif + + namespace {
15 years, 1 month
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
65
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Results per page:
10
25
50
100
200