ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
June 2005
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
22 participants
649 discussions
Start a n
N
ew thread
[navaraf] 16049: Move non-DDK Ps* function prototypes and types from ROS DDK to NTOS headers.
by navaraf@svn.reactos.com
Move non-DDK Ps* function prototypes and types from ROS DDK to NTOS headers. Modified: trunk/reactos/include/ddk/psfuncs.h Modified: trunk/reactos/include/ddk/pstypes.h Modified: trunk/reactos/include/ntos/ps.h Modified: trunk/reactos/subsys/win32k/main/dllmain.c _____ Modified: trunk/reactos/include/ddk/psfuncs.h --- trunk/reactos/include/ddk/psfuncs.h 2005-06-18 16:21:46 UTC (rev 16048) +++ trunk/reactos/include/ddk/psfuncs.h 2005-06-18 16:53:34 UTC (rev 16049) @@ -45,14 +45,6 @@ NTSTATUS STDCALL PsTerminateSystemThread (NTSTATUS ExitStatus); -NTSTATUS STDCALL -PsCreateSystemProcess (PHANDLE ProcessHandle, - ACCESS_MASK DesiredAccess, - POBJECT_ATTRIBUTES ObjectAttributes); - -NTSTATUS STDCALL PsCreateWin32Process(struct _EPROCESS* Process); -NTSTATUS STDCALL PsCreateWin32Thread(struct _ETHREAD* Thread); - VOID STDCALL PsChargePoolQuota( IN PEPROCESS Process, @@ -61,18 +53,6 @@ ); NTSTATUS -STDCALL PsChargeProcessNonPagedPoolQuota ( - IN PEPROCESS Process, - IN ULONG_PTR Amount - ); - -NTSTATUS -STDCALL PsChargeProcessPagedPoolQuota ( - IN PEPROCESS Process, - IN ULONG_PTR Amount - ); - -NTSTATUS STDCALL PsChargeProcessPoolQuota( IN PEPROCESS Process, IN POOL_TYPE PoolType, @@ -95,174 +75,11 @@ IN PSE_IMPERSONATION_STATE ImpersonationState ); -ULONG -STDCALL PsGetCurrentProcessSessionId ( - VOID - ); - -KPROCESSOR_MODE -STDCALL PsGetCurrentThreadPreviousMode ( - VOID - ); - - -PVOID -STDCALL PsGetCurrentThreadStackBase ( - VOID - ); - -PVOID -STDCALL PsGetCurrentThreadStackLimit ( - VOID - ); - -PVOID -STDCALL PsGetJobLock( - PEJOB Job - ); - -PVOID -STDCALL PsGetJobSessionId( - PEJOB Job - ); - -ULONG -STDCALL PsGetJobUIRestrictionsClass( - PEJOB Job - ); - -LONGLONG -STDCALL PsGetProcessCreateTimeQuadPart( - PEPROCESS Process - ); - -PVOID -STDCALL PsGetProcessDebugPort( - PEPROCESS Process - ); - - -BOOLEAN -STDCALL PsGetProcessExitProcessCalled( - PEPROCESS Process - ); - -NTSTATUS -STDCALL PsGetProcessExitStatus( - PEPROCESS Process - ); - -HANDLE -STDCALL PsGetProcessId( - PEPROCESS Process - ); - -LPSTR -STDCALL PsGetProcessImageFileName( - PEPROCESS Process - ); - -HANDLE -STDCALL PsGetProcessInheritedFromUniqueProcessId( - PEPROCESS Process - ); - -PEJOB -STDCALL PsGetProcessJob( - PEPROCESS Process - ); - -PPEB -STDCALL PsGetProcessPeb( - PEPROCESS Process - ); - -ULONG -STDCALL PsGetProcessPriorityClass( - PEPROCESS Process - ); - -PVOID -STDCALL PsGetProcessSectionBaseAddress( - PEPROCESS Process - ); - -PVOID -STDCALL PsGetProcessSecurityPort( - PEPROCESS Process - ); - -HANDLE -STDCALL PsGetProcessSessionId( - PEPROCESS Process - ); - -PVOID -STDCALL PsGetProcessWin32Process( - PEPROCESS Process - ); - -PVOID -STDCALL PsGetProcessWin32WindowStation( - PEPROCESS Process - ); - -ULONG -STDCALL PsGetThreadFreezeCount( - struct _ETHREAD* Thread - ); - -BOOLEAN -STDCALL PsGetThreadHardErrorsAreDisabled( - struct _ETHREAD* Thread - ); - -HANDLE -STDCALL PsGetThreadId( - struct _ETHREAD* Thread - ); - -PEPROCESS -STDCALL PsGetThreadProcess( - struct _ETHREAD* Thread - ); - -HANDLE -STDCALL PsGetThreadProcessId( - struct _ETHREAD* Thread - ); - -HANDLE -STDCALL PsGetThreadSessionId( - struct _ETHREAD* Thread - ); - -PTEB -STDCALL PsGetThreadTeb( - struct _ETHREAD* Thread - ); - -PVOID -STDCALL PsGetThreadWin32Thread( - struct _ETHREAD* Thread - ); - -BOOLEAN -STDCALL PsIsProcessBeingDebugged( - PEPROCESS Process - ); - - BOOLEAN STDCALL PsIsSystemThread( struct _ETHREAD* Thread ); -BOOLEAN -STDCALL PsIsThreadImpersonating( - struct _ETHREAD* Thread - ); - NTSTATUS STDCALL PsRemoveCreateThreadNotifyRoutine ( IN PCREATE_THREAD_NOTIFY_ROUTINE NotifyRoutine @@ -286,86 +103,11 @@ IN ULONG_PTR Amount ); -VOID -STDCALL PsReturnProcessNonPagedPoolQuota( - IN PEPROCESS Process, - IN ULONG_PTR Amount - ); - -VOID -STDCALL PsReturnProcessPagedPoolQuota( - IN PEPROCESS Process, - IN ULONG_PTR Amount - ); - VOID STDCALL PsRevertToSelf( VOID ); -VOID -STDCALL -PsRevertThreadToSelf( - IN struct _ETHREAD* Thread - ); - -VOID -STDCALL PsSetJobUIRestrictionsClass( - PEJOB Job, - ULONG UIRestrictionsClass - ); - -ULONG -STDCALL PsSetLegoNotifyRoutine( - PVOID LegoNotifyRoutine - ); - -VOID -STDCALL PsSetProcessPriorityClass( - PEPROCESS Process, - ULONG PriorityClass - ); - -VOID -STDCALL PsSetProcessSecurityPort( - PEPROCESS Process, - PVOID SecurityPort - ); - -VOID -STDCALL PsSetProcessWin32Process( - PEPROCESS Process, - PVOID Win32Process - ); - -VOID -STDCALL PsSetProcessWin32WindowStation( - PEPROCESS Process, - PVOID WindowStation - ); - -VOID -STDCALL PsSetThreadHardErrorsAreDisabled( - struct _ETHREAD* Thread, - BOOLEAN HardErrorsAreDisabled - ); - -VOID -STDCALL PsSetThreadWin32Thread( - struct _ETHREAD* Thread, - PVOID Win32Thread - ); - -struct _W32_OBJECT_CALLBACK; - -VOID STDCALL -STDCALL PsEstablishWin32Callouts (PW32_PROCESS_CALLBACK W32ProcessCallback, - PW32_THREAD_CALLBACK W32ThreadCallback, - struct _W32_OBJECT_CALLBACK *W32ObjectCallback, - PVOID Param4, - ULONG W32ThreadSize, - ULONG W32ProcessSize); - #define PsGetCurrentProcess() IoGetCurrentProcess() #define PsGetCurrentThread() ((struct _ETHREAD*) (KeGetCurrentThread())) @@ -385,9 +127,6 @@ IN BOOLEAN EffectiveOnly, IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel); -VOID STDCALL -PsRevertToSelf (VOID); - BOOLEAN STDCALL PsGetVersion (PULONG MajorVersion OPTIONAL, PULONG MinorVersion OPTIONAL, PULONG BuildNumber OPTIONAL, @@ -396,18 +135,6 @@ LARGE_INTEGER STDCALL PsGetProcessExitTime(VOID); BOOLEAN STDCALL PsIsThreadTerminating(struct _ETHREAD* Thread); -NTSTATUS STDCALL PsLookupProcessByProcessId(IN HANDLE ProcessId, - OUT PEPROCESS *Process); - -NTSTATUS STDCALL PsLookupProcessThreadByCid(IN PCLIENT_ID Cid, - OUT PEPROCESS *Process OPTIONAL, - OUT struct _ETHREAD **Thread); - /* OUT PETHREAD *Thread); */ - -NTSTATUS STDCALL PsLookupThreadByThreadId(IN HANDLE ThreadId, - OUT struct _ETHREAD **Thread); - /* OUT PETHREAD *Thread); */ - NTSTATUS STDCALL PsSetCreateProcessNotifyRoutine(IN PCREATE_PROCESS_NOTIFY_ROUTINE NotifyRoutine, IN BOOLEAN Remove); _____ Modified: trunk/reactos/include/ddk/pstypes.h --- trunk/reactos/include/ddk/pstypes.h 2005-06-18 16:21:46 UTC (rev 16048) +++ trunk/reactos/include/ddk/pstypes.h 2005-06-18 16:53:34 UTC (rev 16049) @@ -22,7 +22,6 @@ struct _KTHREAD; struct _EJOB; -typedef struct _EJOB *PEJOB; typedef struct _KTHREAD *PKTHREAD, *PRKTHREAD; typedef struct _IMAGE_INFO { @@ -59,14 +58,6 @@ HANDLE ProcessId, PIMAGE_INFO ImageInfo); -typedef NTSTATUS STDCALL_FUNC -(*PW32_PROCESS_CALLBACK)(struct _EPROCESS *Process, - BOOLEAN Create); - -typedef NTSTATUS STDCALL_FUNC -(*PW32_THREAD_CALLBACK)(struct _ETHREAD *Thread, - BOOLEAN Create); - typedef struct _STACK_INFORMATION { PVOID BaseAddress; _____ Modified: trunk/reactos/include/ntos/ps.h --- trunk/reactos/include/ntos/ps.h 2005-06-18 16:21:46 UTC (rev 16048) +++ trunk/reactos/include/ntos/ps.h 2005-06-18 16:53:34 UTC (rev 16049) @@ -13,6 +13,8 @@ #ifndef __INCLUDE_PS_H #define __INCLUDE_PS_H +#include <napi/teb.h> + #define THREAD_READ (0x020048L) #define THREAD_WRITE (0x020037L) #define THREAD_EXECUTE (0x120000L) @@ -42,12 +44,14 @@ #define JOB_OBJECT_SET_SECURITY_ATTRIBUTES (16) #define JOB_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|31) +/* Thread access rights */ +#define THREAD_ALERT (0x0004L) + #ifndef __USE_W32API /* Thread access rights */ #define THREAD_TERMINATE (0x0001L) #define THREAD_SUSPEND_RESUME (0x0002L) -#define THREAD_ALERT (0x0004L) #define THREAD_GET_CONTEXT (0x0008L) #define THREAD_SET_CONTEXT (0x0010L) #define THREAD_SET_INFORMATION (0x0020L) @@ -103,6 +107,8 @@ #endif /* !__USE_W32API */ +#ifdef NTOS_MODE_KERNEL + #ifdef __NTOSKRNL__ #ifdef __GNUC__ extern struct _EPROCESS* EXPORTED PsInitialSystemProcess; @@ -122,4 +128,334 @@ #endif #endif +typedef NTSTATUS +(STDCALL *PW32_PROCESS_CALLBACK)(struct _EPROCESS *Process, + BOOLEAN Create); + +typedef NTSTATUS +(STDCALL *PW32_THREAD_CALLBACK)(struct _ETHREAD *Thread, + BOOLEAN Create); + +typedef struct _EJOB *PEJOB; + +NTSTATUS STDCALL +PsCreateSystemProcess (PHANDLE ProcessHandle, + ACCESS_MASK DesiredAccess, + POBJECT_ATTRIBUTES ObjectAttributes); + + +NTSTATUS STDCALL PsCreateWin32Process(struct _EPROCESS* Process); + +NTSTATUS STDCALL PsCreateWin32Thread(struct _ETHREAD* Thread); + + +NTSTATUS +STDCALL PsChargeProcessNonPagedPoolQuota ( + IN PEPROCESS Process, + IN ULONG_PTR Amount + ); + + +NTSTATUS +STDCALL PsChargeProcessPagedPoolQuota ( + IN PEPROCESS Process, + IN ULONG_PTR Amount + ); + + +ULONG +STDCALL PsGetCurrentProcessSessionId ( + VOID + ); + + +KPROCESSOR_MODE +STDCALL PsGetCurrentThreadPreviousMode ( + VOID + ); + + +PVOID +STDCALL PsGetCurrentThreadStackBase ( + VOID + ); + + +PVOID +STDCALL PsGetCurrentThreadStackLimit ( + VOID + ); + + +PVOID +STDCALL PsGetJobLock( + PEJOB Job + ); + + +PVOID +STDCALL PsGetJobSessionId( + PEJOB Job + ); + + +ULONG +STDCALL PsGetJobUIRestrictionsClass( + PEJOB Job + ); + + +LONGLONG +STDCALL PsGetProcessCreateTimeQuadPart( + PEPROCESS Process + ); + + +PVOID +STDCALL PsGetProcessDebugPort( + PEPROCESS Process + ); + + +BOOLEAN +STDCALL PsGetProcessExitProcessCalled( + PEPROCESS Process + ); + + +NTSTATUS +STDCALL PsGetProcessExitStatus( + PEPROCESS Process + ); + + +HANDLE +STDCALL PsGetProcessId( + PEPROCESS Process + ); + + +LPSTR +STDCALL PsGetProcessImageFileName( + PEPROCESS Process + ); + + +HANDLE +STDCALL PsGetProcessInheritedFromUniqueProcessId( + PEPROCESS Process + ); + + +PEJOB +STDCALL PsGetProcessJob( + PEPROCESS Process + ); + + +PPEB +STDCALL PsGetProcessPeb( + PEPROCESS Process + ); + + +ULONG +STDCALL PsGetProcessPriorityClass( + PEPROCESS Process + ); + + +PVOID +STDCALL PsGetProcessSectionBaseAddress( + PEPROCESS Process + ); + + +PVOID +STDCALL PsGetProcessSecurityPort( + PEPROCESS Process + ); + + +HANDLE +STDCALL PsGetProcessSessionId( + PEPROCESS Process + ); + + +PVOID +STDCALL PsGetProcessWin32Process( + PEPROCESS Process + ); + + +PVOID +STDCALL PsGetProcessWin32WindowStation( + PEPROCESS Process + ); + + +ULONG +STDCALL PsGetThreadFreezeCount( + struct _ETHREAD* Thread + ); + + +BOOLEAN +STDCALL PsGetThreadHardErrorsAreDisabled( + struct _ETHREAD* Thread + ); + + +HANDLE +STDCALL PsGetThreadId( + struct _ETHREAD* Thread + ); + + +PEPROCESS +STDCALL PsGetThreadProcess( + struct _ETHREAD* Thread + ); + + +HANDLE +STDCALL PsGetThreadProcessId( + struct _ETHREAD* Thread + ); + + +HANDLE +STDCALL PsGetThreadSessionId( + struct _ETHREAD* Thread + ); + + +PTEB +STDCALL PsGetThreadTeb( + struct _ETHREAD* Thread + ); + + +PVOID +STDCALL PsGetThreadWin32Thread( + struct _ETHREAD* Thread + ); + + +BOOLEAN +STDCALL PsIsProcessBeingDebugged( + PEPROCESS Process + ); + + +BOOLEAN +STDCALL PsIsThreadImpersonating( + struct _ETHREAD* Thread + ); + + +VOID +STDCALL PsReturnProcessNonPagedPoolQuota( + IN PEPROCESS Process, + IN ULONG_PTR Amount + ); + + +VOID +STDCALL PsReturnProcessPagedPoolQuota( + IN PEPROCESS Process, + IN ULONG_PTR Amount + ); + + +VOID +STDCALL +PsRevertThreadToSelf( + IN struct _ETHREAD* Thread + ); + + +VOID +STDCALL PsSetJobUIRestrictionsClass( + PEJOB Job, + ULONG UIRestrictionsClass + ); + + +ULONG +STDCALL PsSetLegoNotifyRoutine( + PVOID LegoNotifyRoutine + ); + + +VOID +STDCALL PsSetProcessPriorityClass( + PEPROCESS Process, + ULONG PriorityClass + ); + + +VOID +STDCALL PsSetProcessSecurityPort( + PEPROCESS Process, + PVOID SecurityPort + ); + + +VOID +STDCALL PsSetProcessWin32Process( + PEPROCESS Process, + PVOID Win32Process + ); + + +VOID +STDCALL PsSetProcessWin32WindowStation( + PEPROCESS Process, + PVOID WindowStation + ); + + +VOID +STDCALL PsSetThreadHardErrorsAreDisabled( + struct _ETHREAD* Thread, + BOOLEAN HardErrorsAreDisabled + ); + + +VOID +STDCALL PsSetThreadWin32Thread( + struct _ETHREAD* Thread, + PVOID Win32Thread + ); + + +struct _W32_OBJECT_CALLBACK; + + +VOID STDCALL +STDCALL PsEstablishWin32Callouts (PW32_PROCESS_CALLBACK W32ProcessCallback, + PW32_THREAD_CALLBACK W32ThreadCallback, + struct _W32_OBJECT_CALLBACK *W32ObjectCallback, + PVOID Param4, + ULONG W32ThreadSize, + ULONG W32ProcessSize); + + +NTSTATUS STDCALL PsLookupProcessByProcessId(IN HANDLE ProcessId, + OUT PEPROCESS *Process); + + +NTSTATUS STDCALL PsLookupProcessThreadByCid(IN PCLIENT_ID Cid, + OUT PEPROCESS *Process OPTIONAL, + OUT struct _ETHREAD **Thread); + /* OUT PETHREAD *Thread); */ + +NTSTATUS STDCALL PsLookupThreadByThreadId(IN HANDLE ThreadId, + OUT struct _ETHREAD **Thread); + /* OUT PETHREAD *Thread); */ + +#endif /* NTOS_MODE_KERNEL */ + #endif /* __INCLUDE_PS_H */ _____ Modified: trunk/reactos/subsys/win32k/main/dllmain.c --- trunk/reactos/subsys/win32k/main/dllmain.c 2005-06-18 16:21:46 UTC (rev 16048) +++ trunk/reactos/subsys/win32k/main/dllmain.c 2005-06-18 16:53:34 UTC (rev 16049) @@ -26,25 +26,6 @@ #include <win32k/debug1.h> #include <debug.h> -#ifdef __USE_W32API -typedef NTSTATUS (STDCALL *PW32_PROCESS_CALLBACK)( - struct _EPROCESS *Process, - BOOLEAN Create); - -typedef NTSTATUS (STDCALL *PW32_THREAD_CALLBACK)( - struct _ETHREAD *Thread, - BOOLEAN Create); - -VOID STDCALL -PsEstablishWin32Callouts( - PW32_PROCESS_CALLBACK W32ProcessCallback, - PW32_THREAD_CALLBACK W32ThreadCallback, - PW32_OBJECT_CALLBACK W32ObjectCallback, - PVOID Param4, - ULONG W32ThreadSize, - ULONG W32ProcessSize); -#endif - BOOL INTERNAL_CALL GDI_CleanupForProcess (struct _EPROCESS *Process); extern SSDT Win32kSSDT[];
19 years, 6 months
1
0
0
0
[navaraf] 16048: Move non-DDK Se* function prototypes and types from ROS DDK to NTOS headers.
by navaraf@svn.reactos.com
Move non-DDK Se* function prototypes and types from ROS DDK to NTOS headers. Modified: trunk/reactos/include/ddk/sefuncs.h Modified: trunk/reactos/include/ddk/setypes.h Modified: trunk/reactos/include/ntos/security.h Added: trunk/reactos/include/ntos/sefuncs.h Added: trunk/reactos/include/ntos/setypes.h Modified: trunk/reactos/include/ntos.h _____ Modified: trunk/reactos/include/ddk/sefuncs.h --- trunk/reactos/include/ddk/sefuncs.h 2005-06-18 15:58:39 UTC (rev 16047) +++ trunk/reactos/include/ddk/sefuncs.h 2005-06-18 16:21:46 UTC (rev 16048) @@ -96,37 +96,9 @@ IN PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext ); -NTSTATUS -STDCALL -SeCaptureSecurityDescriptor( - IN PSECURITY_DESCRIPTOR OriginalSecurityDescriptor, - IN KPROCESSOR_MODE CurrentMode, - IN POOL_TYPE PoolType, - IN BOOLEAN CaptureIfKernel, - OUT PSECURITY_DESCRIPTOR *CapturedSecurityDescriptor - ); - - VOID STDCALL SeCaptureSubjectContext(OUT PSECURITY_SUBJECT_CONTEXT SubjectContext); -VOID -STDCALL -SeCloseObjectAuditAlarm( - IN PVOID Object, - IN HANDLE Handle, - IN BOOLEAN PerformAction - ); - -NTSTATUS -STDCALL -SeCreateAccessState( - PACCESS_STATE AccessState, - PAUX_DATA AuxData, - ACCESS_MASK Access, - PGENERIC_MAPPING GenericMapping - ); - NTSTATUS STDCALL SeCreateClientSecurity(IN struct _ETHREAD *Thread, IN PSECURITY_QUALITY_OF_SERVICE Qos, @@ -146,9 +118,6 @@ SeDeassignSecurity(IN OUT PSECURITY_DESCRIPTOR* SecurityDescriptor); VOID STDCALL -SeDeleteAccessState(IN PACCESS_STATE AccessState); - -VOID STDCALL SeDeleteObjectAuditAlarm(IN PVOID Object, IN HANDLE Handle); @@ -211,17 +180,6 @@ IN PSECURITY_SUBJECT_CONTEXT SubjectContext, IN KPROCESSOR_MODE AccessMode); -VOID -STDCALL -SePrivilegeObjectAuditAlarm( - IN HANDLE Handle, - IN PSECURITY_SUBJECT_CONTEXT SubjectContext, - IN ACCESS_MASK DesiredAccess, - IN PPRIVILEGE_SET Privileges, - IN BOOLEAN AccessGranted, - IN KPROCESSOR_MODE CurrentMode - ); - NTSTATUS STDCALL SeQueryAuthenticationIdToken(IN PACCESS_TOKEN Token, OUT PLUID LogonId); @@ -251,14 +209,6 @@ NTSTATUS STDCALL SeRegisterLogonSessionTerminatedRoutine(IN PSE_LOGON_SESSION_TERMINATED_ROUTINE CallbackRoutine); -NTSTATUS -STDCALL -SeReleaseSecurityDescriptor( - IN PSECURITY_DESCRIPTOR CapturedSecurityDescriptor, - IN KPROCESSOR_MODE CurrentMode, - IN BOOLEAN CaptureIfKernelMode - ); - VOID STDCALL SeReleaseSubjectContext(IN PSECURITY_SUBJECT_CONTEXT SubjectContext); @@ -290,9 +240,6 @@ SeSinglePrivilegeCheck(IN LUID PrivilegeValue, IN KPROCESSOR_MODE PreviousMode); -SECURITY_IMPERSONATION_LEVEL STDCALL -SeTokenImpersonationLevel(IN PACCESS_TOKEN Token); - BOOLEAN STDCALL SeTokenIsAdmin( @@ -305,12 +252,6 @@ IN PACCESS_TOKEN Token ); -BOOLEAN -STDCALL -SeTokenIsWriteRestricted( - IN PACCESS_TOKEN Token - ); - TOKEN_TYPE STDCALL SeTokenType(IN PACCESS_TOKEN Token); _____ Modified: trunk/reactos/include/ddk/setypes.h --- trunk/reactos/include/ddk/setypes.h 2005-06-18 15:58:39 UTC (rev 16047) +++ trunk/reactos/include/ddk/setypes.h 2005-06-18 16:21:46 UTC (rev 16048) @@ -14,13 +14,6 @@ #include <ntos/security.h> -/* TOKEN_GROUPS structure */ -#define SE_GROUP_MANDATORY (0x1L) -#define SE_GROUP_ENABLED_BY_DEFAULT (0x2L) -#define SE_GROUP_ENABLED (0x4L) -#define SE_GROUP_OWNER (0x8L) -#define SE_GROUP_LOGON_ID (0xC0000000L) - /* ACL Defines */ #define ACL_REVISION1 (1) #define ACL_REVISION2 (2) @@ -72,65 +65,6 @@ #define SID_REVISION (1) #define SID_MAX_SUB_AUTHORITIES (15) -typedef struct _SEP_AUDIT_POLICY_CATEGORIES { - UCHAR System:4; - UCHAR Logon:4; - UCHAR ObjectAccess:4; - UCHAR PrivilegeUse:4; - UCHAR DetailedTracking:4; - UCHAR PolicyChange:4; - UCHAR AccountManagement:4; - UCHAR DirectoryServiceAccess:4; - UCHAR AccountLogon:4; -} SEP_AUDIT_POLICY_CATEGORIES, *PSEP_AUDIT_POLICY_CATEGORIES; - -typedef struct _SEP_AUDIT_POLICY_OVERLAY { - ULONGLONG PolicyBits:36; - UCHAR SetBit:1; -} SEP_AUDIT_POLICY_OVERLAY, *PSEP_AUDIT_POLICY_OVERLAY; - -typedef struct _SEP_AUDIT_POLICY { - union { - SEP_AUDIT_POLICY_CATEGORIES PolicyElements; - SEP_AUDIT_POLICY_OVERLAY PolicyOverlay; - ULONGLONG Overlay; - }; -} SEP_AUDIT_POLICY, *PSEP_AUDIT_POLICY; - -#define TOKEN_HAS_TRAVERSE_PRIVILEGE 0x01 -typedef struct _TOKEN { - TOKEN_SOURCE TokenSource; /* 0x00 */ - LUID TokenId; /* 0x10 */ - LUID AuthenticationId; /* 0x18 */ - LUID ParentTokenId; /* 0x20 */ - LARGE_INTEGER ExpirationTime; /* 0x28 */ - struct _ERESOURCE *TokenLock; /* 0x30 */ - SEP_AUDIT_POLICY AuditPolicy; /* 0x38 */ - LUID ModifiedId; /* 0x40 */ - ULONG SessionId; /* 0x48 */ - ULONG UserAndGroupCount; /* 0x4C */ - ULONG RestrictedSidCount; /* 0x50 */ - ULONG PrivilegeCount; /* 0x54 */ - ULONG VariableLength; /* 0x58 */ - ULONG DynamicCharged; /* 0x5C */ - ULONG DynamicAvailable; /* 0x60 */ - ULONG DefaultOwnerIndex; /* 0x64 */ - PSID_AND_ATTRIBUTES UserAndGroups; /* 0x68 */ - PSID_AND_ATTRIBUTES RestrictedSids; /* 0x6C */ - PSID PrimaryGroup; /* 0x70 */ - PLUID_AND_ATTRIBUTES Privileges; /* 0x74 */ - PULONG DynamicPart; /* 0x78 */ - PACL DefaultDacl; /* 0x7C */ - TOKEN_TYPE TokenType; /* 0x80 */ - SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; /* 0x84 */ - ULONG TokenFlags; /* 0x88 */ - BOOLEAN TokenInUse; /* 0x8C */ - PVOID ProxyData; /* 0x90 */ - PVOID AuditData; /* 0x94 */ - LUID OriginatingLogonSession; /* 0x98 */ - ULONG VariablePart; /* 0xA0 */ -} TOKEN, *PTOKEN; - typedef PVOID PACCESS_TOKEN; typedef struct _SECURITY_SUBJECT_CONTEXT @@ -223,13 +157,6 @@ AssignSecurityDescriptor } SECURITY_OPERATION_CODE, *PSECURITY_OPERATION_CODE; -typedef struct _AUX_DATA -{ - PPRIVILEGE_SET PrivilegeSet; - GENERIC_MAPPING GenericMapping; - ULONG Reserved; -} AUX_DATA, *PAUX_DATA; - typedef struct _ACCESS_STATE { LUID OperationID; _____ Modified: trunk/reactos/include/ntos/security.h --- trunk/reactos/include/ntos/security.h 2005-06-18 15:58:39 UTC (rev 16047) +++ trunk/reactos/include/ntos/security.h 2005-06-18 16:21:46 UTC (rev 16048) @@ -32,6 +32,15 @@ #define SE_REMOTE_SHUTDOWN_PRIVILEGE (24L) #define SE_MAX_WELL_KNOWN_PRIVILEGE SE_REMOTE_SHUTDOWN_PRIVILEGE +/* TOKEN_GROUPS structure */ +#ifndef SE_GROUP_MANDATORY +#define SE_GROUP_MANDATORY (0x1L) +#define SE_GROUP_ENABLED_BY_DEFAULT (0x2L) +#define SE_GROUP_ENABLED (0x4L) +#define SE_GROUP_OWNER (0x8L) +#define SE_GROUP_LOGON_ID (0xC0000000L) +#endif + #if 0 /* Security descriptor control. */ #define SECURITY_DESCRIPTOR_REVISION (1) _____ Added: trunk/reactos/include/ntos/sefuncs.h --- trunk/reactos/include/ntos/sefuncs.h 2005-06-18 15:58:39 UTC (rev 16047) +++ trunk/reactos/include/ntos/sefuncs.h 2005-06-18 16:21:46 UTC (rev 16048) @@ -0,0 +1,63 @@ +#ifndef _INCLUDE_NTOS_SEFUNCS_H +#define _INCLUDE_NTOS_SEFUNCS_H + +NTSTATUS +STDCALL +SeCaptureSecurityDescriptor( + IN PSECURITY_DESCRIPTOR OriginalSecurityDescriptor, + IN KPROCESSOR_MODE CurrentMode, + IN POOL_TYPE PoolType, + IN BOOLEAN CaptureIfKernel, + OUT PSECURITY_DESCRIPTOR *CapturedSecurityDescriptor + ); + +VOID +STDCALL +SeCloseObjectAuditAlarm( + IN PVOID Object, + IN HANDLE Handle, + IN BOOLEAN PerformAction + ); + +NTSTATUS +STDCALL +SeCreateAccessState( + PACCESS_STATE AccessState, + PAUX_DATA AuxData, + ACCESS_MASK Access, + PGENERIC_MAPPING GenericMapping + ); + +VOID STDCALL +SeDeleteAccessState(IN PACCESS_STATE AccessState); + +VOID +STDCALL +SePrivilegeObjectAuditAlarm( + IN HANDLE Handle, + IN PSECURITY_SUBJECT_CONTEXT SubjectContext, + IN ACCESS_MASK DesiredAccess, + IN PPRIVILEGE_SET Privileges, + IN BOOLEAN AccessGranted, + IN KPROCESSOR_MODE CurrentMode + ); + +NTSTATUS +STDCALL +SeReleaseSecurityDescriptor( + IN PSECURITY_DESCRIPTOR CapturedSecurityDescriptor, + IN KPROCESSOR_MODE CurrentMode, + IN BOOLEAN CaptureIfKernelMode + ); + +SECURITY_IMPERSONATION_LEVEL STDCALL +SeTokenImpersonationLevel(IN PACCESS_TOKEN Token); + +BOOLEAN +STDCALL +SeTokenIsWriteRestricted( + IN PACCESS_TOKEN Token + ); + +#endif /* _INCLUDE_NTOS_SEFUNCS_H */ + _____ Added: trunk/reactos/include/ntos/setypes.h --- trunk/reactos/include/ntos/setypes.h 2005-06-18 15:58:39 UTC (rev 16047) +++ trunk/reactos/include/ntos/setypes.h 2005-06-18 16:21:46 UTC (rev 16048) @@ -0,0 +1,70 @@ +#ifndef __INCLUDE_NTOS_SETYPES_H +#define __INCLUDE_NTOS_SETYPES_H + +typedef struct _SEP_AUDIT_POLICY_CATEGORIES { + UCHAR System:4; + UCHAR Logon:4; + UCHAR ObjectAccess:4; + UCHAR PrivilegeUse:4; + UCHAR DetailedTracking:4; + UCHAR PolicyChange:4; + UCHAR AccountManagement:4; + UCHAR DirectoryServiceAccess:4; + UCHAR AccountLogon:4; +} SEP_AUDIT_POLICY_CATEGORIES, *PSEP_AUDIT_POLICY_CATEGORIES; + +typedef struct _SEP_AUDIT_POLICY_OVERLAY { + ULONGLONG PolicyBits:36; + UCHAR SetBit:1; +} SEP_AUDIT_POLICY_OVERLAY, *PSEP_AUDIT_POLICY_OVERLAY; + +typedef struct _SEP_AUDIT_POLICY { + union { + SEP_AUDIT_POLICY_CATEGORIES PolicyElements; + SEP_AUDIT_POLICY_OVERLAY PolicyOverlay; + ULONGLONG Overlay; + }; +} SEP_AUDIT_POLICY, *PSEP_AUDIT_POLICY; + +#define TOKEN_HAS_TRAVERSE_PRIVILEGE 0x01 +typedef struct _TOKEN { + TOKEN_SOURCE TokenSource; /* 0x00 */ + LUID TokenId; /* 0x10 */ + LUID AuthenticationId; /* 0x18 */ + LUID ParentTokenId; /* 0x20 */ + LARGE_INTEGER ExpirationTime; /* 0x28 */ + struct _ERESOURCE *TokenLock; /* 0x30 */ + SEP_AUDIT_POLICY AuditPolicy; /* 0x38 */ + LUID ModifiedId; /* 0x40 */ + ULONG SessionId; /* 0x48 */ + ULONG UserAndGroupCount; /* 0x4C */ + ULONG RestrictedSidCount; /* 0x50 */ + ULONG PrivilegeCount; /* 0x54 */ + ULONG VariableLength; /* 0x58 */ + ULONG DynamicCharged; /* 0x5C */ + ULONG DynamicAvailable; /* 0x60 */ + ULONG DefaultOwnerIndex; /* 0x64 */ + PSID_AND_ATTRIBUTES UserAndGroups; /* 0x68 */ + PSID_AND_ATTRIBUTES RestrictedSids; /* 0x6C */ + PSID PrimaryGroup; /* 0x70 */ + PLUID_AND_ATTRIBUTES Privileges; /* 0x74 */ + PULONG DynamicPart; /* 0x78 */ + PACL DefaultDacl; /* 0x7C */ + TOKEN_TYPE TokenType; /* 0x80 */ + SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; /* 0x84 */ + ULONG TokenFlags; /* 0x88 */ + BOOLEAN TokenInUse; /* 0x8C */ + PVOID ProxyData; /* 0x90 */ + PVOID AuditData; /* 0x94 */ + LUID OriginatingLogonSession; /* 0x98 */ + ULONG VariablePart; /* 0xA0 */ +} TOKEN, *PTOKEN; + +typedef struct _AUX_DATA +{ + PPRIVILEGE_SET PrivilegeSet; + GENERIC_MAPPING GenericMapping; + ULONG Reserved; +} AUX_DATA, *PAUX_DATA; + +#endif /* __INCLUDE_NTOS_SETYPES_H */ _____ Modified: trunk/reactos/include/ntos.h --- trunk/reactos/include/ntos.h 2005-06-18 15:58:39 UTC (rev 16047) +++ trunk/reactos/include/ntos.h 2005-06-18 16:21:46 UTC (rev 16048) @@ -88,6 +88,8 @@ #include "ntos/kefuncs.h" /* AG */ #include "ntos/fstypes.h" /* AG */ #include "ntos/obtypes.h" +#include "ntos/setypes.h" +#include "ntos/sefuncs.h" #include "ntos/tss.h" #include "rosrtl/thread.h" #endif
19 years, 6 months
1
0
0
0
[navaraf] 16047: Move InsertAscendingListFIFO, InsertDescendingListFIFO, InsertAscendingList and InsertDescendingList out of the __USE_W32API guarded region.
by navaraf@svn.reactos.com
Move InsertAscendingListFIFO, InsertDescendingListFIFO, InsertAscendingList and InsertDescendingList out of the __USE_W32API guarded region. Modified: trunk/reactos/include/ntos/rtl.h _____ Modified: trunk/reactos/include/ntos/rtl.h --- trunk/reactos/include/ntos/rtl.h 2005-06-18 15:55:23 UTC (rev 16046) +++ trunk/reactos/include/ntos/rtl.h 2005-06-18 15:58:39 UTC (rev 16047) @@ -282,89 +282,7 @@ return Entry; } - /* - * FIFO versions are slower but ensures that entries with equal SortField value - * are placed in FIFO order (assuming that entries are removed from Head). - */ - -#define InsertAscendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\ -{\ - PLIST_ENTRY current;\ -\ - current = (ListHead)->Flink;\ - while (current != (ListHead))\ - {\ - if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >\ - (NewEntry)->SortField)\ - {\ - break;\ - }\ - current = current->Flink;\ - }\ -\ - InsertTailList(current, &((NewEntry)->ListEntryField));\ -} - - -#define InsertDescendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\ -{\ - PLIST_ENTRY current;\ -\ - current = (ListHead)->Flink;\ - while (current != (ListHead))\ - {\ - if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <\ - (NewEntry)->SortField)\ - {\ - break;\ - }\ - current = current->Flink;\ - }\ -\ - InsertTailList(current, &((NewEntry)->ListEntryField));\ -} - - -#define InsertAscendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\ -{\ - PLIST_ENTRY current;\ -\ - current = (ListHead)->Flink;\ - while (current != (ListHead))\ - {\ - if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\ - (NewEntry)->SortField)\ - {\ - break;\ - }\ - current = current->Flink;\ - }\ -\ - InsertTailList(current, &((NewEntry)->ListEntryField));\ -} - - -#define InsertDescendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\ -{\ - PLIST_ENTRY current;\ -\ - current = (ListHead)->Flink;\ - while (current != (ListHead))\ - {\ - if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <=\ - (NewEntry)->SortField)\ - {\ - break;\ - }\ - current = current->Flink;\ - }\ -\ - InsertTailList(current, &((NewEntry)->ListEntryField));\ -} - - -/* * BOOLEAN * IsXstEntry ( * PLIST_ENTRY ListHead, @@ -462,7 +380,86 @@ #endif /* __USE_W32API */ +/* + * FIFO versions are slower but ensures that entries with equal SortField value + * are placed in FIFO order (assuming that entries are removed from Head). + */ +#define InsertAscendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\ +{\ + PLIST_ENTRY current;\ +\ + current = (ListHead)->Flink;\ + while (current != (ListHead))\ + {\ + if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >\ + (NewEntry)->SortField)\ + {\ + break;\ + }\ + current = current->Flink;\ + }\ +\ + InsertTailList(current, &((NewEntry)->ListEntryField));\ +} + + +#define InsertDescendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\ +{\ + PLIST_ENTRY current;\ +\ + current = (ListHead)->Flink;\ + while (current != (ListHead))\ + {\ + if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <\ + (NewEntry)->SortField)\ + {\ + break;\ + }\ + current = current->Flink;\ + }\ +\ + InsertTailList(current, &((NewEntry)->ListEntryField));\ +} + + +#define InsertAscendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\ +{\ + PLIST_ENTRY current;\ +\ + current = (ListHead)->Flink;\ + while (current != (ListHead))\ + {\ + if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\ + (NewEntry)->SortField)\ + {\ + break;\ + }\ + current = current->Flink;\ + }\ +\ + InsertTailList(current, &((NewEntry)->ListEntryField));\ +} + + +#define InsertDescendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\ +{\ + PLIST_ENTRY current;\ +\ + current = (ListHead)->Flink;\ + while (current != (ListHead))\ + {\ + if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <=\ + (NewEntry)->SortField)\ + {\ + break;\ + }\ + current = current->Flink;\ + }\ +\ + InsertTailList(current, &((NewEntry)->ListEntryField));\ +} + /* * PURPOSE: Used with RtlCheckRegistryKey, RtlCreateRegistryKey, * RtlDeleteRegistryKey
19 years, 6 months
1
0
0
0
[navaraf] 16046: - Move non-DDK HAL function prototypes from ROS DDK to NTOS headers.
by navaraf@svn.reactos.com
- Move non-DDK HAL function prototypes from ROS DDK to NTOS headers. Modified: trunk/reactos/include/ddk/halfuncs.h Modified: trunk/reactos/include/ntos/halfuncs.h _____ Modified: trunk/reactos/include/ddk/halfuncs.h --- trunk/reactos/include/ddk/halfuncs.h 2005-06-18 15:50:23 UTC (rev 16045) +++ trunk/reactos/include/ddk/halfuncs.h 2005-06-18 15:55:23 UTC (rev 16046) @@ -9,9 +9,6 @@ HalAcquireDisplayOwnership(IN PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters); NTSTATUS STDCALL -HalAdjustResourceList(PCM_RESOURCE_LIST Resources); - -NTSTATUS STDCALL HalAllocateAdapterChannel(IN PADAPTER_OBJECT AdapterObject, IN PWAIT_CONTEXT_BLOCK WaitContextBlock, IN ULONG NumberOfMapRegisters, @@ -39,17 +36,11 @@ PCM_RESOURCE_LIST *AllocatedResources ); -VOID STDCALL -HalCalibratePerformanceCounter(ULONG Count); - /* FASTCALL HalClearSoftwareInterrupt */ -VOID STDCALL -HalDisplayString(IN PCH String); - /* * HalExamineMBR() is not exported explicitly. * It is exported by the HalDispatchTable. @@ -61,16 +52,6 @@ * PVOID Buffer); */ -BOOLEAN STDCALL -HalFlushCommonBuffer(ULONG Unknown1, - ULONG Unknown2, - ULONG Unknown3, - ULONG Unknown4, - ULONG Unknown5, - ULONG Unknown6, - ULONG Unknown7, - ULONG Unknown8); - VOID STDCALL HalFreeCommonBuffer(PADAPTER_OBJECT AdapterObject, ULONG Length, @@ -97,23 +78,11 @@ ULONG Offset, ULONG Length); -/* Is this function really exported ?? -ULONG -HalGetDmaAlignmentRequirement(VOID); -NTOSAPI -DDKAPI -*/ - ULONG STDCALL HalGetDmaAlignmentRequirement( VOID); -BOOLEAN STDCALL -HalGetEnvironmentVariable(IN PCH Name, - OUT PCH Value, - IN USHORT ValueLength); - ULONG STDCALL HalGetInterruptVector(INTERFACE_TYPE InterfaceType, ULONG BusNumber, @@ -125,15 +94,6 @@ BOOLEAN STDCALL HalMakeBeep(ULONG Frequency); -VOID STDCALL -HalQueryDisplayParameters(PULONG DispSizeX, - PULONG DispSizeY, - PULONG CursorPosX, - PULONG CursorPosY); - -VOID STDCALL -HalQueryRealTimeClock(PTIME_FIELDS Time); - /* * HalQuerySystemInformation() is not exported explicitly. * It is exported by the HalDispatchTable. @@ -145,9 +105,6 @@ ULONG STDCALL HalReadDmaCounter(PADAPTER_OBJECT AdapterObject); -VOID STDCALL -HalRequestIpi(ULONG Unknown); - /* FASTCALL HalRequestSoftwareInterrupt @@ -168,14 +125,6 @@ ULONG Offset, ULONG Length); -VOID STDCALL -HalSetDisplayParameters(ULONG CursorPosX, - ULONG CursorPosY); - -BOOLEAN STDCALL -HalSetEnvironmentVariable(IN PCH Name, - IN PCH Value); - /* HalSetProfileInterval */ @@ -199,10 +148,6 @@ HalStopProfileInterrupt */ -ULONG FASTCALL -HalSystemVectorDispatchEntry(ULONG Unknown1, - ULONG Unknown2, - ULONG Unknown3); BOOLEAN STDCALL HalTranslateBusAddress(INTERFACE_TYPE InterfaceType, @@ -213,25 +158,6 @@ /* - * Kernel debugger support functions - */ - -BOOLEAN STDCALL -KdPortInitialize(PKD_PORT_INFORMATION PortInformation, - DWORD Unknown1, - DWORD Unknown2); - -BOOLEAN STDCALL -KdPortGetByte(PUCHAR ByteRecieved); - -BOOLEAN STDCALL -KdPortPollByte(PUCHAR ByteRecieved); - -VOID STDCALL -KdPortPutByte(UCHAR ByteToSend); - - -/* * Port I/O functions */ _____ Modified: trunk/reactos/include/ntos/halfuncs.h --- trunk/reactos/include/ntos/halfuncs.h 2005-06-18 15:50:23 UTC (rev 16045) +++ trunk/reactos/include/ntos/halfuncs.h 2005-06-18 15:55:23 UTC (rev 16046) @@ -3,6 +3,9 @@ #include <ntos/haltypes.h> +NTSTATUS STDCALL +HalAdjustResourceList(PCM_RESOURCE_LIST Resources); + BOOLEAN STDCALL HalAllProcessorsStarted(VOID); @@ -17,10 +20,16 @@ KIRQL Irql, PKIRQL OldIrql); +VOID STDCALL +HalCalibratePerformanceCounter(ULONG Count); + BOOLEAN STDCALL HalDisableSystemInterrupt(ULONG Vector, KIRQL Irql); +VOID STDCALL +HalDisplayString(IN PCH String); + BOOLEAN STDCALL HalEnableSystemInterrupt(ULONG Vector, KIRQL Irql, @@ -30,6 +39,21 @@ HalEndSystemInterrupt(KIRQL Irql, ULONG Unknown2); +BOOLEAN STDCALL +HalFlushCommonBuffer(ULONG Unknown1, + ULONG Unknown2, + ULONG Unknown3, + ULONG Unknown4, + ULONG Unknown5, + ULONG Unknown6, + ULONG Unknown7, + ULONG Unknown8); + +BOOLEAN STDCALL +HalGetEnvironmentVariable(IN PCH Name, + OUT PCH Value, + IN USHORT ValueLength); + VOID STDCALL HalInitializeProcessor(ULONG ProcessorNumber, PVOID ProcessorStack); @@ -39,8 +63,33 @@ PLOADER_PARAMETER_BLOCK LoaderBlock); VOID STDCALL +HalQueryDisplayParameters(PULONG DispSizeX, + PULONG DispSizeY, + PULONG CursorPosX, + PULONG CursorPosY); + +VOID STDCALL +HalQueryRealTimeClock(PTIME_FIELDS Time); + +VOID STDCALL HalReportResourceUsage(VOID); +VOID STDCALL +HalRequestIpi(ULONG Unknown); + +VOID STDCALL +HalSetDisplayParameters(ULONG CursorPosX, + ULONG CursorPosY); + +BOOLEAN STDCALL +HalSetEnvironmentVariable(IN PCH Name, + IN PCH Value); + +ULONG FASTCALL +HalSystemVectorDispatchEntry(ULONG Unknown1, + ULONG Unknown2, + ULONG Unknown3); + VOID STDCALL IoAssignDriveLetters(IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock, @@ -58,6 +107,24 @@ VOID FASTCALL HalRequestSoftwareInterrupt(KIRQL SoftwareInterruptRequested); +/* + * Kernel debugger support functions + */ + +BOOLEAN STDCALL +KdPortInitialize(PKD_PORT_INFORMATION PortInformation, + DWORD Unknown1, + DWORD Unknown2); + +BOOLEAN STDCALL +KdPortGetByte(PUCHAR ByteRecieved); + +BOOLEAN STDCALL +KdPortPollByte(PUCHAR ByteRecieved); + +VOID STDCALL +KdPortPutByte(UCHAR ByteToSend); + /* Non-standard functions */ VOID STDCALL HalReleaseDisplayOwnership();
19 years, 6 months
1
0
0
0
[navaraf] 16045: Fix build.
by navaraf@svn.reactos.com
Fix build. Modified: trunk/reactos/lib/crt/include/internal/tls.h Modified: trunk/reactos/lib/crt/stdlib/rand.c _____ Modified: trunk/reactos/lib/crt/include/internal/tls.h --- trunk/reactos/lib/crt/include/internal/tls.h 2005-06-18 15:24:30 UTC (rev 16044) +++ trunk/reactos/lib/crt/include/internal/tls.h 2005-06-18 15:50:23 UTC (rev 16045) @@ -9,14 +9,13 @@ #include <winbase.h> #include <winnt.h> -#include <msvcrt/crttypes.h> #include <stddef.h> typedef struct _ThreadData { int terrno; /* *nix error code */ unsigned long tdoserrno; /* Win32 error code (for I/O only) */ - unsigned LONGLONG tnext; /* used by rand/srand */ + unsigned __int64 tnext; /* used by rand/srand */ char *lasttoken; /* used by strtok */ wchar_t *wlasttoken; /* used by wcstok */ _____ Modified: trunk/reactos/lib/crt/stdlib/rand.c --- trunk/reactos/lib/crt/stdlib/rand.c 2005-06-18 15:24:30 UTC (rev 16044) +++ trunk/reactos/lib/crt/stdlib/rand.c 2005-06-18 15:50:23 UTC (rev 16045) @@ -11,11 +11,7 @@ { PTHREADDATA ThreadData = GetThreadData(); -#ifdef HAVE_LONGLONG ThreadData->tnext = ThreadData->tnext * 0x5deece66dLL + 11; -#else - ThreadData->tnext = ThreadData->tnext * 0x5deece66dL + 11; -#endif return (int)((ThreadData->tnext >> 16) & RAND_MAX); }
19 years, 6 months
1
0
0
0
[ion] 16044: Fix XML bug in hal makefiles
by ion@svn.reactos.com
Fix XML bug in hal makefiles Modified: trunk/reactos/hal/hal/hal.xml Modified: trunk/reactos/hal/halx86/up/halup.xml _____ Modified: trunk/reactos/hal/hal/hal.xml --- trunk/reactos/hal/hal/hal.xml 2005-06-18 15:15:25 UTC (rev 16043) +++ trunk/reactos/hal/hal/hal.xml 2005-06-18 15:24:30 UTC (rev 16044) @@ -2,7 +2,7 @@ <importlibrary basename="hal" definition="hal.def" /> <include base="ntoskrnl">include</include> <library>ntoskrnl</library> - <define name="_NTOSKRNL_" /> + <define name="_NTHAL_" /> <define name="__USE_W32API" /> <file>hal.c</file> <file>hal.rc</file> _____ Modified: trunk/reactos/hal/halx86/up/halup.xml --- trunk/reactos/hal/halx86/up/halup.xml 2005-06-18 15:15:25 UTC (rev 16043) +++ trunk/reactos/hal/halx86/up/halup.xml 2005-06-18 15:24:30 UTC (rev 16044) @@ -5,8 +5,7 @@ <include base="ntoskrnl">include</include> <define name="_DISABLE_TIDENTS" /> <define name="__USE_W32API" /> - <define name="__NTHAL__" /> - <define name="_NTOSKRNL_" /> + <define name="_NTHAL_" /> <library>hal_generic</library> <library>hal_generic_up</library> <library>hal_generic_pc</library>
19 years, 6 months
1
0
0
0
[navaraf] 16043: - Move non-DDK Ke* function prototypes from ROS DDK to NTOS headers.
by navaraf@svn.reactos.com
- Move non-DDK Ke* function prototypes from ROS DDK to NTOS headers. - Fix calling convention for KeI386* functions. Modified: trunk/reactos/include/ddk/kefuncs.h Modified: trunk/reactos/include/ddk/ketypes.h Modified: trunk/reactos/include/ntos/kefuncs.h Modified: trunk/reactos/ntoskrnl/ke/i386/gdt.c Modified: trunk/reactos/ntoskrnl/ke/i386/ldt.c Modified: trunk/reactos/ntoskrnl/ntoskrnl.def _____ Modified: trunk/reactos/include/ddk/kefuncs.h --- trunk/reactos/include/ddk/kefuncs.h 2005-06-18 14:37:43 UTC (rev 16042) +++ trunk/reactos/include/ddk/kefuncs.h 2005-06-18 15:15:25 UTC (rev 16043) @@ -22,16 +22,6 @@ VOID STDCALL KeAttachProcess(struct _KPROCESS *Process); -BOOLEAN -STDCALL -KeIsAttachedProcess(VOID); - -VOID FASTCALL KiAcquireSpinLock(PKSPIN_LOCK SpinLock); - -VOID FASTCALL KiReleaseSpinLock(PKSPIN_LOCK SpinLock); - -VOID KeDrainApcQueue(VOID); - struct _KPROCESS* STDCALL KeGetCurrentProcess(VOID); /* @@ -99,8 +89,6 @@ VOID STDCALL KeClearEvent (PKEVENT Event); -BOOLEAN STDCALL KeConnectInterrupt(PKINTERRUPT InterruptObject); - NTSTATUS STDCALL KeDelayExecutionThread (KPROCESSOR_MODE WaitMode, BOOLEAN Alertable, PLARGE_INTEGER Internal); @@ -110,17 +98,8 @@ VOID STDCALL KeDetachProcess (VOID); -VOID STDCALL KeDisconnectInterrupt(PKINTERRUPT InterruptObject); - VOID STDCALL KeEnterCriticalRegion (VOID); -/* - * FUNCTION: Enters the kernel debugger - * ARGUMENTS: - * None - */ -VOID STDCALL KeEnterKernelDebugger (VOID); - KIRQL STDCALL KeGetCurrentIrql (VOID); #ifndef __USE_W32API @@ -131,16 +110,6 @@ struct _KTHREAD* STDCALL KeGetCurrentThread (VOID); -VOID STDCALL KeInitializeApc (IN PKAPC Apc, - IN PKTHREAD Thread, - IN KAPC_ENVIRONMENT TargetEnvironment, - IN PKKERNEL_ROUTINE KernelRoutine, - IN PKRUNDOWN_ROUTINE RundownRoutine, - IN PKNORMAL_ROUTINE NormalRoutine, - IN KPROCESSOR_MODE Mode, - IN PVOID Context); - - /* * VOID * KeInitializeCallbackRecord ( @@ -162,18 +131,6 @@ EVENT_TYPE Type, BOOLEAN State); -VOID STDCALL KeInitializeInterrupt(PKINTERRUPT InterruptObject, - PKSERVICE_ROUTINE ServiceRoutine, - PVOID ServiceContext, - PKSPIN_LOCK SpinLock, - ULONG Vector, - KIRQL Irql, - KIRQL SynchronizeIrql, - KINTERRUPT_MODE InterruptMode, - BOOLEAN ShareVector, - CHAR ProcessorNumber, - BOOLEAN FloatingSave); - VOID STDCALL KeInitializeMutant(IN PKMUTANT Mutant, IN BOOLEAN InitialOwner); @@ -218,11 +175,6 @@ KeInsertQueue(IN PKQUEUE Queue, IN PLIST_ENTRY Entry); -BOOLEAN STDCALL KeInsertQueueApc (PKAPC Apc, - PVOID SystemArgument1, - PVOID SystemArgument2, - KPRIORITY PriorityBoost); - BOOLEAN STDCALL KeInsertQueueDpc (PKDPC Dpc, PVOID SystemArgument1, PVOID SystemArgument2); @@ -377,16 +329,6 @@ LONG STDCALL KeResetEvent(IN PKEVENT Event); -VOID STDCALL -KeRosDumpStackFrames ( PULONG Frame, ULONG FrameCount ); - -ULONG STDCALL -KeRosGetStackFrames ( PULONG Frames, ULONG FrameCount ); - -NTSTATUS STDCALL -KeSetAffinityThread(PKTHREAD Thread, - KAFFINITY Affinity); - LONG STDCALL KeSetBasePriorityThread(struct _KTHREAD* Thread, LONG Increment); @@ -447,92 +389,6 @@ ); - -/* io permission map has a 8k size - * Each bit in the IOPM corresponds to an io port byte address. The bitmap - * is initialized to allow IO at any port. [ all bits set ]. - */ -typedef struct _IOPM -{ - UCHAR Bitmap[8192]; -} IOPM, *PIOPM; - -/* - * FUNCTION: Provides the kernel with a new access map for a driver - * ARGUMENTS: - * NewMap: = If FALSE the kernel's map is set to all disabled. If TRUE - * the kernel disables access to a particular port. - * IoPortMap = Caller supplies storage for the io permission map. - * REMARKS - * Each bit in the IOPM corresponds to an io port byte address. The bitmap - * is initialized to allow IO at any port. [ all bits set ]. The IOPL determines - * the minium privilege level required to perform IO prior to checking the permission map. - */ -BOOL STDCALL -Ke386SetIoAccessMap(ULONG NewMap, PULONG IoPermissionMap); - -/* - * FUNCTION: Queries the io permission map. - * ARGUMENTS: - * NewMap: = If FALSE the kernel's map is set to all disabled. If TRUE - * the kernel disables access to a particular port. - * IoPortMap = Caller supplies storage for the io permission map. - * REMARKS - * Each bit in the IOPM corresponds to an io port byte address. The bitmap - * is initialized to allow IO at any port. [ all bits set ]. The IOPL determines - * the minium privilege level required to perform IO prior to checking the permission map. - */ -BOOL STDCALL -Ke386QueryIoAccessMap(ULONG NewMap, PULONG IoPermissionMap); - -/* - * FUNCTION: Set the process IOPL - * ARGUMENTS: - * Eprocess = Pointer to a executive process object - * EnableIo = Specify TRUE to enable IO and FALSE to disable - */ -BOOL STDCALL -Ke386IoSetAccessProcess(struct _EPROCESS* Eprocess, BOOL EnableIo); - -/* - * FUNCTION: Sets the contents of a gdt descriptor. - * ARGUMENTS: - * Entry = The selector to set. - * Value1 = The value of the low dword of the descriptor. - * Value2 = The value of the high dword of the descriptor. - */ -VOID -KeSetGdtSelector( - ULONG Entry, - ULONG Value1, - ULONG Value2 -); - -/* - * FUNCTION: Releases a set of Global Descriptor Table Selectors - * ARGUMENTS: - * SelArray = - * NumOfSelectors = - */ -NTSTATUS -KeI386ReleaseGdtSelectors( - OUT PULONG SelArray, - IN ULONG NumOfSelectors -); - -/* - * FUNCTION: Allocates a set of Global Descriptor Table Selectors - * ARGUMENTS: - * SelArray = - * NumOfSelectors = - */ -NTSTATUS -KeI386AllocateGdtSelectors( - OUT PULONG SelArray, - IN ULONG NumOfSelectors -); - - KIRQL FASTCALL KfAcquireSpinLock ( @@ -560,8 +416,6 @@ ); -VOID STDCALL KiDispatchInterrupt(VOID); - /* Stubs Start here */ VOID @@ -617,129 +471,13 @@ IN PUCHAR Component ); -VOID -STDCALL -KeTerminateThread( - IN KPRIORITY Increment -); - -BOOLEAN -STDCALL -KeIsExecutingDpc( - VOID -); - VOID STDCALL -KeSetEventBoostPriority( - IN PKEVENT Event, - IN PKTHREAD *Thread OPTIONAL -); - -PCONFIGURATION_COMPONENT_DATA -STDCALL -KeFindConfigurationNextEntry( - IN PCONFIGURATION_COMPONENT_DATA Child, - IN CONFIGURATION_CLASS Class, - IN CONFIGURATION_TYPE Type, - IN PULONG ComponentKey OPTIONAL, - IN PCONFIGURATION_COMPONENT_DATA *NextLink -); - -PCONFIGURATION_COMPONENT_DATA -STDCALL -KeFindConfigurationEntry( - IN PCONFIGURATION_COMPONENT_DATA Child, - IN CONFIGURATION_CLASS Class, - IN CONFIGURATION_TYPE Type, - IN PULONG ComponentKey OPTIONAL -); - -VOID -STDCALL -KeFlushEntireTb( - IN BOOLEAN Unknown, - IN BOOLEAN CurrentCpuOnly -); - -VOID -STDCALL -KeRevertToUserAffinityThread( - VOID -); - -VOID -STDCALL -KiCoprocessorError( - VOID -); - -VOID -STDCALL -KiUnexpectedInterrupt( - VOID -); - -VOID -STDCALL -KeSetDmaIoCoherency( - IN ULONG Coherency -); - -VOID -STDCALL -KeSetProfileIrql( - IN KIRQL ProfileIrql -); - -VOID -STDCALL -KeSetSystemAffinityThread( - IN KAFFINITY Affinity -); - -NTSTATUS -STDCALL -KeUserModeCallback( - IN ULONG FunctionID, - IN PVOID InputBuffer, - IN ULONG InputLength, - OUT PVOID *OutputBuffer, - OUT PULONG OutputLength -); - -VOID -STDCALL KeSetTimeIncrement( IN ULONG MaxIncrement, IN ULONG MinIncrement ); -VOID -STDCALL -KeCapturePersistentThreadState( - IN PVOID CurrentThread, - IN ULONG Setting1, - IN ULONG Setting2, - IN ULONG Setting3, - IN ULONG Setting4, - IN ULONG Setting5, - IN PVOID ThreadState -); - -BOOLEAN -STDCALL -KeRemoveSystemServiceTable( - IN ULONG TableIndex -); - -NTSTATUS -KeI386FlatToGdtSelector( - IN ULONG Base, - IN USHORT Length, - IN USHORT Selector -); - CCHAR STDCALL KeSetIdealProcessorThread ( @@ -804,12 +542,6 @@ IN PVOID State ); -NTSTATUS -STDCALL -KeRaiseUserException( - IN NTSTATUS ExceptionCode -); - VOID FASTCALL KeAcquireGuardedMutex( _____ Modified: trunk/reactos/include/ddk/ketypes.h --- trunk/reactos/include/ddk/ketypes.h 2005-06-18 14:37:43 UTC (rev 16042) +++ trunk/reactos/include/ddk/ketypes.h 2005-06-18 15:15:25 UTC (rev 16043) @@ -341,14 +341,6 @@ LONGLONG High; } M128, *PM128; -typedef struct _CONFIGURATION_COMPONENT_DATA -{ - struct _CONFIGURATION_COMPONENT_DATA *Parent; - struct _CONFIGURATION_COMPONENT_DATA *Child; - struct _CONFIGURATION_COMPONENT_DATA *Sibling; - CONFIGURATION_COMPONENT Component; -} CONFIGURATION_COMPONENT_DATA, *PCONFIGURATION_COMPONENT_DATA; - typedef struct _KEXCEPTION_FRAME { ULONG64 P1Home; ULONG64 P2Home; _____ Modified: trunk/reactos/include/ntos/kefuncs.h --- trunk/reactos/include/ntos/kefuncs.h 2005-06-18 14:37:43 UTC (rev 16042) +++ trunk/reactos/include/ntos/kefuncs.h 2005-06-18 15:15:25 UTC (rev 16043) @@ -9,6 +9,7 @@ #define KEBUGCHECK(a) DbgPrint("KeBugCheck (0x%X) at %s:%i\n", a, __FILE__,__LINE__), KeBugCheck(a) #define KEBUGCHECKEX(a,b,c,d,e) DbgPrint("KeBugCheckEx (0x%X, 0x%X, 0x%X, 0x%X, 0x%X) at %s:%i\n", a, b, c, d, e, __FILE__,__LINE__), KeBugCheckEx(a,b,c,d,e) +#include <arc/arc.h> #ifdef __NTOSKRNL__ extern CHAR EXPORTED KeNumberProcessors; @@ -30,7 +31,249 @@ extern ULONG IMPORTED KeMinimumIncrement; #endif +/* io permission map has a 8k size + * Each bit in the IOPM corresponds to an io port byte address. The bitmap + * is initialized to allow IO at any port. [ all bits set ]. + */ +typedef struct _IOPM +{ + UCHAR Bitmap[8192]; +} IOPM, *PIOPM; -VOID STDCALL KeFlushWriteBuffer (VOID); +typedef struct _CONFIGURATION_COMPONENT_DATA +{ + struct _CONFIGURATION_COMPONENT_DATA *Parent; + struct _CONFIGURATION_COMPONENT_DATA *Child; + struct _CONFIGURATION_COMPONENT_DATA *Sibling; + CONFIGURATION_COMPONENT Component; +} CONFIGURATION_COMPONENT_DATA, *PCONFIGURATION_COMPONENT_DATA; +VOID STDCALL +KeCapturePersistentThreadState( + IN PVOID CurrentThread, + IN ULONG Setting1, + IN ULONG Setting2, + IN ULONG Setting3, + IN ULONG Setting4, + IN ULONG Setting5, + IN PVOID ThreadState); + +BOOLEAN STDCALL +KeConnectInterrupt( + PKINTERRUPT InterruptObject); + +VOID STDCALL +KeDisconnectInterrupt( + PKINTERRUPT InterruptObject); + +VOID STDCALL +KeDrainApcQueue( + VOID); + +VOID STDCALL +KeEnterKernelDebugger( + VOID); + +PCONFIGURATION_COMPONENT_DATA STDCALL +KeFindConfigurationNextEntry( + IN PCONFIGURATION_COMPONENT_DATA Child, + IN CONFIGURATION_CLASS Class, + IN CONFIGURATION_TYPE Type, + IN PULONG ComponentKey OPTIONAL, + IN PCONFIGURATION_COMPONENT_DATA *NextLink); + +PCONFIGURATION_COMPONENT_DATA STDCALL +KeFindConfigurationEntry( + IN PCONFIGURATION_COMPONENT_DATA Child, + IN CONFIGURATION_CLASS Class, + IN CONFIGURATION_TYPE Type, + IN PULONG ComponentKey OPTIONAL); + +VOID STDCALL +KeFlushEntireTb( + IN BOOLEAN Unknown, + IN BOOLEAN CurrentCpuOnly); + +VOID STDCALL +KeFlushWriteBuffer( + VOID); + +VOID STDCALL +KeInitializeApc( + IN PKAPC Apc, + IN PKTHREAD Thread, + IN KAPC_ENVIRONMENT TargetEnvironment, + IN PKKERNEL_ROUTINE KernelRoutine, + IN PKRUNDOWN_ROUTINE RundownRoutine, + IN PKNORMAL_ROUTINE NormalRoutine, + IN KPROCESSOR_MODE Mode, + IN PVOID Context); + +VOID STDCALL +KeInitializeInterrupt( + PKINTERRUPT InterruptObject, + PKSERVICE_ROUTINE ServiceRoutine, + PVOID ServiceContext, + PKSPIN_LOCK SpinLock, + ULONG Vector, + KIRQL Irql, + KIRQL SynchronizeIrql, + KINTERRUPT_MODE InterruptMode, + BOOLEAN ShareVector, + CHAR ProcessorNumber, + BOOLEAN FloatingSave); + +BOOLEAN STDCALL +KeInsertQueueApc( + PKAPC Apc, + PVOID SystemArgument1, + PVOID SystemArgument2, + KPRIORITY PriorityBoost); + +BOOLEAN STDCALL +KeIsAttachedProcess( + VOID); + +BOOLEAN STDCALL +KeIsExecutingDpc( + VOID); + +VOID STDCALL +KeRevertToUserAffinityThread( + VOID); + +BOOLEAN STDCALL +KeRemoveSystemServiceTable( + IN ULONG TableIndex); + +NTSTATUS STDCALL +KeSetAffinityThread( + PKTHREAD Thread, + KAFFINITY Affinity); + +VOID STDCALL +KeSetDmaIoCoherency( + IN ULONG Coherency); + +VOID STDCALL +KeSetEventBoostPriority( + IN PKEVENT Event, + IN PKTHREAD *Thread OPTIONAL); + +VOID STDCALL +KeSetProfileIrql( + IN KIRQL ProfileIrql); + +VOID STDCALL +KeSetSystemAffinityThread( + IN KAFFINITY Affinity); + +VOID STDCALL +KeTerminateThread( + IN KPRIORITY Increment); + +NTSTATUS STDCALL +KeUserModeCallback( + IN ULONG FunctionID, + IN PVOID InputBuffer, + IN ULONG InputLength, + OUT PVOID *OutputBuffer, + OUT PULONG OutputLength); + +NTSTATUS STDCALL +KeRaiseUserException( + IN NTSTATUS ExceptionCode); + +/* + * FUNCTION: Provides the kernel with a new access map for a driver + * ARGUMENTS: + * NewMap: = If FALSE the kernel's map is set to all disabled. If TRUE + * the kernel disables access to a particular port. + * IoPortMap = Caller supplies storage for the io permission map. + * REMARKS + * Each bit in the IOPM corresponds to an io port byte address. The bitmap + * is initialized to allow IO at any port. [ all bits set ]. The IOPL determines + * the minium privilege level required to perform IO prior to checking the permission map. + */ +BOOL STDCALL +Ke386SetIoAccessMap( + ULONG NewMap, + PULONG IoPermissionMap); + +/* + * FUNCTION: Queries the io permission map. + * ARGUMENTS: + * NewMap: = If FALSE the kernel's map is set to all disabled. If TRUE + * the kernel disables access to a particular port. + * IoPortMap = Caller supplies storage for the io permission map. + * REMARKS + * Each bit in the IOPM corresponds to an io port byte address. The bitmap + * is initialized to allow IO at any port. [ all bits set ]. The IOPL determines + * the minium privilege level required to perform IO prior to checking the permission map. + */ +BOOL STDCALL +Ke386QueryIoAccessMap( + ULONG NewMap, + PULONG IoPermissionMap); + +/* Set the process IOPL. */ +BOOL STDCALL +Ke386IoSetAccessProcess( + struct _EPROCESS *Process, + BOOL EnableIo); + +NTSTATUS STDCALL +KeI386FlatToGdtSelector( + IN ULONG Base, + IN USHORT Length, + IN USHORT Selector); + +/* Releases a set of Global Descriptor Table Selectors. */ +NTSTATUS STDCALL +KeI386ReleaseGdtSelectors( + OUT PULONG SelArray, + IN ULONG NumOfSelectors); + +/* Allocates a set of Global Descriptor Table Selectors. */ +NTSTATUS STDCALL +KeI386AllocateGdtSelectors( + OUT PULONG SelArray, + IN ULONG NumOfSelectors); + +VOID FASTCALL +KiAcquireSpinLock( + PKSPIN_LOCK SpinLock); + +VOID STDCALL +KiCoprocessorError( + VOID); + +VOID STDCALL +KiDispatchInterrupt( + VOID); + +NTSTATUS STDCALL +KeRaiseUserException( + IN NTSTATUS ExceptionCode); + +VOID FASTCALL +KiReleaseSpinLock( + PKSPIN_LOCK SpinLock); + +VOID STDCALL +KiUnexpectedInterrupt( + VOID); + +/* REACTOS SPECIFIC */ + +VOID STDCALL +KeRosDumpStackFrames( + PULONG Frame, + ULONG FrameCount); + +ULONG STDCALL +KeRosGetStackFrames( + PULONG Frames, + ULONG FrameCount); + #endif /* __INCLUDE_NTOS_KEFUNCS_H */ _____ Modified: trunk/reactos/ntoskrnl/ke/i386/gdt.c --- trunk/reactos/ntoskrnl/ke/i386/gdt.c 2005-06-18 14:37:43 UTC (rev 16042) +++ trunk/reactos/ntoskrnl/ke/i386/gdt.c 2005-06-18 15:15:25 UTC (rev 16043) @@ -148,7 +148,7 @@ /* * @unimplemented */ -NTSTATUS +NTSTATUS STDCALL KeI386FlatToGdtSelector( IN ULONG Base, IN USHORT Length, @@ -162,7 +162,7 @@ /* * @unimplemented */ -NTSTATUS +NTSTATUS STDCALL KeI386ReleaseGdtSelectors( OUT PULONG SelArray, IN ULONG NumOfSelectors @@ -175,10 +175,10 @@ /* * @unimplemented */ -NTSTATUS +NTSTATUS STDCALL KeI386AllocateGdtSelectors( OUT PULONG SelArray, - IN ULONG NumOfSelectors + IN ULONG NumOfSelectors ) { UNIMPLEMENTED; _____ Modified: trunk/reactos/ntoskrnl/ke/i386/ldt.c --- trunk/reactos/ntoskrnl/ke/i386/ldt.c 2005-06-18 14:37:43 UTC (rev 16042) +++ trunk/reactos/ntoskrnl/ke/i386/ldt.c 2005-06-18 15:15:25 UTC (rev 16043) @@ -20,6 +20,9 @@ /* FUNCTIONS *****************************************************************/ +/* gdt.c */ +extern VOID KeSetGdtSelector(ULONG Entry, ULONG Value1, ULONG Value2); + BOOL PspIsDescriptorValid(PLDT_ENTRY ldt_entry) { ULONG Base, SegLimit; _____ Modified: trunk/reactos/ntoskrnl/ntoskrnl.def --- trunk/reactos/ntoskrnl/ntoskrnl.def 2005-06-18 14:37:43 UTC (rev 16042) +++ trunk/reactos/ntoskrnl/ntoskrnl.def 2005-06-18 15:15:25 UTC (rev 16043) @@ -541,13 +541,13 @@ KeGetPreviousMode@0 KeGetRecommendedSharedDataAlignment@0 ;KeI386AbiosCall -KeI386AllocateGdtSelectors +KeI386AllocateGdtSelectors@8 ;KeI386Call16BitCStyleFunction ;KeI386Call16BitFunction -KeI386FlatToGdtSelector +KeI386FlatToGdtSelector@12 ;KeI386GetLid ;KeI386MachineType DATA -KeI386ReleaseGdtSelectors +KeI386ReleaseGdtSelectors@8 ;KeI386ReleaseLid ;KeI386SetGdtSelector KeIcacheFlushCount DATA
19 years, 6 months
1
0
0
0
[ion] 16042: Thanks to Filip Navara for helping out with the HAL patch
by ion@svn.reactos.com
Thanks to Filip Navara for helping out with the HAL patch Property changes on: trunk/reactos/hal/halx86/include ___________________________________________________________________ Name: svn:ignore + *.gch
19 years, 6 months
1
0
0
0
[ion] 16041: Ignore PCH
by ion@svn.reactos.com
Ignore PCH Property changes on: trunk/reactos/lib/ntdll/inc ___________________________________________________________________ Name: svn:ignore + *.gch Property changes on: trunk/reactos/lib/rtl ___________________________________________________________________ Name: svn:ignore - *.o *.a *.d *.sym *.map makefile + *.o *.a *.d *.sym *.map *.gch makefile
19 years, 6 months
1
0
0
0
[ion] 16040: Use generic HAL header
by ion@svn.reactos.com
Use generic HAL header Modified: trunk/reactos/hal/halx86/include/bus.h Deleted: trunk/reactos/hal/halx86/include/hal.h Added: trunk/reactos/hal/halx86/include/hal.h Added: trunk/reactos/hal/halx86/include/halp.h _____ Modified: trunk/reactos/hal/halx86/include/bus.h --- trunk/reactos/hal/halx86/include/bus.h 2005-06-18 14:29:31 UTC (rev 16039) +++ trunk/reactos/hal/halx86/include/bus.h 2005-06-18 14:30:09 UTC (rev 16040) @@ -6,13 +6,13 @@ #define __INTERNAL_HAL_BUS_H -typedef NTSTATUS STDCALL_FUNC -(*pAdjustResourceList)(IN PBUS_HANDLER BusHandler, +typedef NTSTATUS +(STDCALL *pAdjustResourceList)(IN PBUS_HANDLER BusHandler, IN ULONG BusNumber, IN OUT PCM_RESOURCE_LIST Resources); -typedef NTSTATUS STDCALL_FUNC -(*pAssignSlotResources)(IN PBUS_HANDLER BusHandler, +typedef NTSTATUS +(STDCALL *pAssignSlotResources)(IN PBUS_HANDLER BusHandler, IN ULONG BusNumber, IN PUNICODE_STRING RegistryPath, IN PUNICODE_STRING DriverClassName, @@ -21,24 +21,24 @@ IN ULONG SlotNumber, IN OUT PCM_RESOURCE_LIST *AllocatedResources); -typedef ULONG STDCALL_FUNC -(*pGetSetBusData)(IN PBUS_HANDLER BusHandler, +typedef ULONG +(STDCALL *pGetSetBusData)(IN PBUS_HANDLER BusHandler, IN ULONG BusNumber, IN ULONG SlotNumber, OUT PVOID Buffer, IN ULONG Offset, IN ULONG Length); -typedef ULONG STDCALL_FUNC -(*pGetInterruptVector)(IN PBUS_HANDLER BusHandler, +typedef ULONG +(STDCALL *pGetInterruptVector)(IN PBUS_HANDLER BusHandler, IN ULONG BusNumber, IN ULONG BusInterruptLevel, IN ULONG BusInterruptVector, OUT PKIRQL Irql, OUT PKAFFINITY Affinity); -typedef ULONG STDCALL_FUNC -(*pTranslateBusAddress)(IN PBUS_HANDLER BusHandler, +typedef ULONG +(STDCALL *pTranslateBusAddress)(IN PBUS_HANDLER BusHandler, IN ULONG BusNumber, IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, _____ Deleted: trunk/reactos/hal/halx86/include/hal.h --- trunk/reactos/hal/halx86/include/hal.h 2005-06-18 14:29:31 UTC (rev 16039) +++ trunk/reactos/hal/halx86/include/hal.h 2005-06-18 14:30:09 UTC (rev 16040) @@ -1,448 +0,0 @@ -/* - * - */ - -#ifndef __INTERNAL_HAL_HAL_H -#define __INTERNAL_HAL_HAL_H - -#define HAL_APC_REQUEST 0 -#define HAL_DPC_REQUEST 1 - -/* display.c */ -VOID FASTCALL HalInitializeDisplay (PLOADER_PARAMETER_BLOCK LoaderBlock); -VOID FASTCALL HalClearDisplay (UCHAR CharAttribute); - -/* adapter.c */ -PADAPTER_OBJECT STDCALL HalpAllocateAdapterEx(ULONG NumberOfMapRegisters,BOOLEAN IsMaster, BOOLEAN Dma32BitAddresses); - -/* bus.c */ -VOID HalpInitBusHandlers (VOID); - -/* irql.c */ -VOID HalpInitPICs(VOID); - -/* udelay.c */ -VOID HalpCalibrateStallExecution(VOID); - -/* pci.c */ -VOID HalpInitPciBus (VOID); - -/* enum.c */ -VOID HalpStartEnumerator (VOID); - -/* dma.c */ -VOID HalpInitDma (VOID); - -/* mem.c */ -PVOID HalpMapPhysMemory(ULONG PhysAddr, ULONG Size); - -/* Non-generic initialization */ -VOID HalpInitPhase0 (VOID); - -/* DMA Page Register Structure - 080 DMA RESERVED - 081 DMA Page Register (channel 2) - 082 DMA Page Register (channel 3) - 083 DMA Page Register (channel 1) - 084 DMA RESERVED - 085 DMA RESERVED - 086 DMA RESERVED - 087 DMA Page Register (channel 0) - 088 DMA RESERVED - 089 PS/2-DMA Page Register (channel 6) - 08A PS/2-DMA Page Register (channel 7) - 08B PS/2-DMA Page Register (channel 5) - 08C PS/2-DMA RESERVED - 08D PS/2-DMA RESERVED - 08E PS/2-DMA RESERVED - 08F PS/2-DMA Page Register (channel 4) -*/ - typedef struct _DMA_PAGE{ - UCHAR Reserved1; - UCHAR Channel2; - UCHAR Channel3; - UCHAR Channel1; - UCHAR Reserved2[3]; - UCHAR Channel0; - UCHAR Reserved3; - UCHAR Channel6; - UCHAR Channel7; - UCHAR Channel5; - UCHAR Reserved4[3]; - UCHAR Channel4; -} DMA_PAGE, *PDMA_PAGE; - -/* DMA Channel Mask Register Structure - -MSB LSB - x x x x x x x x - ------------------- - ----- - | | | 00 - Select channel 0 mask bit - | | \---- 01 - Select channel 1 mask bit - | | 10 - Select channel 2 mask bit - | | 11 - Select channel 3 mask bit - | | - | \---------- 0 - Clear mask bit - | 1 - Set mask bit - | - \----------------------- xx - Reserved -*/ -typedef struct _DMA_CHANNEL_MASK { - UCHAR Channel : 2; - UCHAR SetMask : 1; - UCHAR Reserved : 5; -} DMA_CHANNEL_MASK, *PDMA_CHANNEL_MASK; - -/* DMA Mask Register Structure - - MSB LSB - x x x x x x x x - \---/ - - ----- ----- - | | | | | 00 - Channel 0 select - | | | | \---- 01 - Channel 1 select - | | | | 10 - Channel 2 select - | | | | 11 - Channel 3 select - | | | | - | | | | 00 - Verify transfer - | | | \------------ 01 - Write transfer - | | | 10 - Read transfer - | | | - | | \-------------------- 0 - Autoinitialized - | | 1 - Non-autoinitialized - | | - | \------------------------ 0 - Address increment select - | - | 00 - Demand mode - \------------------------------ 01 - Single mode - 10 - Block mode - 11 - Cascade mode -*/ -typedef struct _DMA_MODE { - UCHAR Channel : 2; - UCHAR TransferType : 2; - UCHAR AutoInitialize : 1; - UCHAR AddressDecrement : 1; - UCHAR RequestMode : 2; -} DMA_MODE, *PDMA_MODE; - - -/* DMA Extended Mode Register Structure - - MSB LSB - x x x x x x x x - - - ----- ----- ----- - | | | | | 00 - Channel 0 select - | | | | \---- 01 - Channel 1 select - | | | | 10 - Channel 2 select - | | | | 11 - Channel 3 select - | | | | - | | | | 00 - 8-bit I/O, by bytes - | | | \------------ 01 - 16-bit I/O, by words, address shifted - | | | 10 - 32-bit I/O, by bytes - | | | 11 - 16-bit I/O, by bytes - | | | - | | \---------------------- 00 - Compatible - | | 01 - Type A - | | 10 - Type B - | | 11 - Burst - | | - | \---------------------------- 0 - Terminal Count is Output - | - \---------------------------------0 - Disable Stop Register - 1 - Enable Stop Register -*/ -typedef struct _DMA_EXTENDED_MODE { - UCHAR ChannelNumber : 2; - UCHAR TransferSize : 2; - UCHAR TimingMode : 2; - UCHAR TerminalCountIsOutput : 1; - UCHAR EnableStopRegister : 1; -}DMA_EXTENDED_MODE, *PDMA_EXTENDED_MODE; - -/* DMA Extended Mode Register Transfer Sizes */ -#define B_8BITS 0 -#define W_16BITS 1 -#define B_32BITS 2 -#define B_16BITS 3 - -/* DMA Extended Mode Register Timing */ -#define COMPATIBLE_TIMING 0 -#define TYPE_A_TIMING 1 -#define TYPE_B_TIMING 2 -#define BURST_TIMING 3 - -/* Channel Stop Registers for each Channel */ -typedef struct _DMA_CHANNEL_STOP { - UCHAR ChannelLow; - UCHAR ChannelMid; - UCHAR ChannelHigh; - UCHAR Reserved; -} DMA_CHANNEL_STOP, *PDMA_CHANNEL_STOP; - -/* Transfer Types */ -#define VERIFY_TRANSFER 0x00 -#define READ_TRANSFER 0x01 -#define WRITE_TRANSFER 0x02 - -/* Request Modes */ -#define DEMAND_REQUEST_MODE 0x00 -#define SINGLE_REQUEST_MODE 0x01 -#define BLOCK_REQUEST_MODE 0x02 -#define CASCADE_REQUEST_MODE 0x03 - -#define DMA_SETMASK 4 -#define DMA_CLEARMASK 0 -#define DMA_READ 4 -#define DMA_WRITE 8 -#define DMA_SINGLE_TRANSFER 0x40 -#define DMA_AUTO_INIT 0x10 - -typedef struct _DMA1_ADDRESS_COUNT { - UCHAR DmaBaseAddress; - UCHAR DmaBaseCount; -} DMA1_ADDRESS_COUNT, *PDMA1_ADDRESS_COUNT; - -typedef struct _DMA2_ADDRESS_COUNT { - UCHAR DmaBaseAddress; - UCHAR Reserved1; - UCHAR DmaBaseCount; - UCHAR Reserved2; -} DMA2_ADDRESS_COUNT, *PDMA2_ADDRESS_COUNT; - -typedef struct _DMA1_CONTROL { - DMA1_ADDRESS_COUNT DmaAddressCount[4]; - UCHAR DmaStatus; - UCHAR DmaRequest; - UCHAR SingleMask; - UCHAR Mode; - UCHAR ClearBytePointer; - UCHAR MasterClear; - UCHAR ClearMask; - UCHAR AllMask; -} DMA1_CONTROL, *PDMA1_CONTROL; - -typedef struct _DMA2_CONTROL { - DMA2_ADDRESS_COUNT DmaAddressCount[4]; - UCHAR DmaStatus; - UCHAR Reserved1; - UCHAR DmaRequest; - UCHAR Reserved2; - UCHAR SingleMask; - UCHAR Reserved3; - UCHAR Mode; - UCHAR Reserved4; - UCHAR ClearBytePointer; - UCHAR Reserved5; - UCHAR MasterClear; - UCHAR Reserved6; - UCHAR ClearMask; - UCHAR Reserved7; - UCHAR AllMask; - UCHAR Reserved8; -} DMA2_CONTROL, *PDMA2_CONTROL; - -/* This Structure Defines the I/O Map of the 82537 Controller - I've only defined the registers which are likely to be useful to us */ -typedef struct _EISA_CONTROL { - /* DMA Controller 1 */ - DMA1_CONTROL DmaController1; /* 00h-0Fh */ - UCHAR Reserved1[16]; /* 0Fh-1Fh */ - - /* Interrupt Controller 1 (PIC) */ - UCHAR Pic1Operation; /* 20h */ - UCHAR Pic1Interrupt; /* 21h */ - UCHAR Reserved2[30]; /* 22h-3Fh */ - - /* Timer */ - UCHAR TimerCounter; /* 40h */ - UCHAR TimerMemoryRefresh; /* 41h */ - UCHAR Speaker; /* 42h */ - UCHAR TimerOperation; /* 43h */ - UCHAR TimerMisc; /* 44h */ - UCHAR Reserved3[2]; /* 45-46h */ - UCHAR TimerCounterControl; /* 47h */ - UCHAR TimerFailSafeCounter; /* 48h */ - UCHAR Reserved4; /* 49h */ - UCHAR TimerCounter2; /* 4Ah */ - UCHAR TimerOperation2; /* 4Bh */ - UCHAR Reserved5[20]; /* 4Ch-5Fh */ - - /* NMI / Keyboard / RTC */ - UCHAR Keyboard; /* 60h */ - UCHAR NmiStatus; /* 61h */ - UCHAR Reserved6[14]; /* 62h-6Fh */ - UCHAR NmiEnable; /* 70h */ - UCHAR Reserved7[15]; /* 71h-7Fh */ - - /* DMA Page Registers Controller 1 */ - DMA_PAGE DmaController1Pages; /* 80h-8Fh */ - UCHAR Reserved8[16]; /* 90h-9Fh */ - - /* Interrupt Controller 2 (PIC) */ - UCHAR Pic2Operation; /* 0A0h */ - UCHAR Pic2Interrupt; /* 0A1h */ - UCHAR Reserved9[30]; /* 0A2h-0BFh */ - - /* DMA Controller 2 */ - DMA1_CONTROL DmaController2; /* 0C0h-0CFh */ - - /* System Reserved Ports */ - UCHAR SystemReserved[816]; /* 0D0h-3FFh */ - - /* Extended DMA Registers, Controller 1 */ - UCHAR DmaHighByteCount1[8]; /* 400h-407h */ - UCHAR Reserved10[2]; /* 408h-409h */ - UCHAR DmaChainMode1; /* 40Ah */ - UCHAR DmaExtendedMode1; /* 40Bh */ - UCHAR DmaBufferControl; /* 40Ch */ - UCHAR Reserved11[84]; /* 40Dh-460h */ - UCHAR ExtendedNmiControl; /* 461h */ - UCHAR NmiCommand; /* 462h */ - UCHAR Reserved12; /* 463h */ - UCHAR BusMaster; /* 464h */ - UCHAR Reserved13[27]; /* 465h-47Fh */ - - /* DMA Page Registers Controller 2 */ - DMA_PAGE DmaController2Pages; /* 480h-48Fh */ - UCHAR Reserved14[48]; /* 490h-4BFh */ - - /* Extended DMA Registers, Controller 2 */ - UCHAR DmaHighByteCount2[16]; /* 4C0h-4CFh */ - - /* Edge/Level Control Registers */ - UCHAR Pic1EdgeLevel; /* 4D0h */ - UCHAR Pic2EdgeLevel; /* 4D1h */ - UCHAR Reserved15[2]; /* 4D2h-4D3h */ - - /* Extended DMA Registers, Controller 2 */ - UCHAR DmaChainMode2; /* 4D4h */ - UCHAR Reserved16; /* 4D5h */ - UCHAR DmaExtendedMode2; /* 4D6h */ - UCHAR Reserved17[9]; /* 4D7h-4DFh */ - - /* DMA Stop Registers */ - DMA_CHANNEL_STOP DmaChannelStop[8]; /* 4E0h-4FFh */ -} EISA_CONTROL, *PEISA_CONTROL; - -extern ULONG HalpEisaDma; -extern PADAPTER_OBJECT MasterAdapter; - -EXPORTED ULONG HalpEisaDma; -EXPORTED PADAPTER_OBJECT MasterAdapter; - -/* - * ADAPTER_OBJECT - Track a busmaster DMA adapter and its associated resources - * - * NOTES: - * - I've updated this to the Windows Object Defintion. - */ -struct _ADAPTER_OBJECT { - DMA_ADAPTER DmaHeader; - struct _ADAPTER_OBJECT *MasterAdapter; - ULONG MapRegistersPerChannel; - PVOID AdapterBaseVa; - PVOID MapRegisterBase; - ULONG NumberOfMapRegisters; - ULONG CommittedMapRegisters; - PWAIT_CONTEXT_BLOCK CurrentWcb; - KDEVICE_QUEUE ChannelWaitQueue; - PKDEVICE_QUEUE RegisterWaitQueue; - LIST_ENTRY AdapterQueue; - ULONG SpinLock; - PRTL_BITMAP MapRegisters; - PUCHAR PagePort; - UCHAR ChannelNumber; - UCHAR AdapterNumber; - USHORT DmaPortAddress; - union { - DMA_MODE AdapterMode; - UCHAR AdapterModeByte; - }; - BOOLEAN NeedsMapRegisters; - BOOLEAN MasterDevice; - UCHAR Width16Bits; - UCHAR ScatterGather; - UCHAR IgnoreCount; - UCHAR Dma32BitAddresses; - UCHAR Dma64BitAddresses; - BOOLEAN LegacyAdapter; - LIST_ENTRY AdapterList; -}; - -/* -struct _ADAPTER_OBJECT { - INTERFACE_TYPE InterfaceType; - BOOLEAN Master; - int Channel; - PVOID PagePort; - PVOID CountPort; - PVOID OffsetPort; - KSPIN_LOCK SpinLock; - PVOID Buffer; - BOOLEAN Inuse; - ULONG AvailableMapRegisters; - PVOID MapRegisterBase; - ULONG AllocatedMapRegisters; - PWAIT_CONTEXT_BLOCK WaitContextBlock; - KDEVICE_QUEUE DeviceQueue; - BOOLEAN ScatterGather; - BOOLEAN DemandMode; - BOOLEAN AutoInitialize; -}; -*/ - -/* sysinfo.c */ -NTSTATUS STDCALL -HalpQuerySystemInformation(IN HAL_QUERY_INFORMATION_CLASS InformationClass, - IN ULONG BufferSize, - IN OUT PVOID Buffer, - OUT PULONG ReturnedLength); - - -/* Non-standard functions */ -VOID STDCALL -HalReleaseDisplayOwnership(); - -BOOLEAN STDCALL -HalQueryDisplayOwnership(); - -#if defined(__GNUC__) -#define Ki386SaveFlags(x) __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */) -#define Ki386RestoreFlags(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory") -#define Ki386DisableInterrupts() __asm__ __volatile__("cli\n\t") -#define Ki386EnableInterrupts() __asm__ __volatile__("sti\n\t") -#define Ki386HaltProcessor() __asm__ __volatile__("hlt\n\t") -#define Ki386RdTSC(x) __asm__ __volatile__("rdtsc\n\t" : "=A" (x.u.LowPart), "=d" (x.u.HighPart)); -#define Ki386Rdmsr(msr,val1,val2) __asm__ __volatile__("rdmsr" : "=a" (val1), "=d" (val2) : "c" (msr)) -#define Ki386Wrmsr(msr,val1,val2) __asm__ __volatile__("wrmsr" : /* no outputs */ : "c" (msr), "a" (val1), "d" (val2)) - -static inline BYTE Ki386ReadFsByte(ULONG offset) -{ - BYTE b; - __asm__ __volatile__("movb %%fs:(%1),%0":"=q" (b):"r" (offset)); - return b; -} - -static inline VOID Ki386WriteFsByte(ULONG offset, BYTE value) -{ - __asm__ __volatile__("movb %0,%%fs:(%1)"::"r" (value), "r" (offset)); -} - -#elif defined(_MSC_VER) -#define Ki386SaveFlags(x) __asm pushfd __asm pop x; -#define Ki386RestoreFlags(x) __asm push x __asm popfd; -#define Ki386DisableInterrupts() __asm cli -#define Ki386EnableInterrupts() __asm sti -#define Ki386HaltProcessor() __asm hlt -#else -#error Unknown compiler for inline assembler -#endif - -typedef struct tagHALP_HOOKS -{ - void (*InitPciBus)(ULONG BusNumber, PBUS_HANDLER BusHandler); -} HALP_HOOKS, *PHALP_HOOKS; - -extern HALP_HOOKS HalpHooks; - -#endif /* __INTERNAL_HAL_HAL_H */ _____ Added: trunk/reactos/hal/halx86/include/hal.h --- trunk/reactos/hal/halx86/include/hal.h 2005-06-18 14:29:31 UTC (rev 16039) +++ trunk/reactos/hal/halx86/include/hal.h 2005-06-18 14:30:09 UTC (rev 16040) @@ -0,0 +1,74 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Hardware Abstraction Layer + * FILE: hal/halx86/include/hal.h + * PURPOSE: HAL Header + * PROGRAMMER: Alex Ionescu (alex(a)relsoft.net) + */ + +/* INCLUDES ******************************************************************/ + +/* SDK/DDK/NDK Headers. */ +#include <ddk/ntddk.h> +#include <stdio.h> + +/* FIXME: NDK Headers */ +#include <ntos/types.h> +#include <ntos/haltypes.h> +#include <ntos/halfuncs.h> + +/* Internal Kernel Headers */ +//#include <internal/mm.h> +#include <internal/ke.h> +#include <internal/i386/ps.h> + +//Temporary hack below. +PVOID STDCALL +MmAllocateContiguousAlignedMemory(IN ULONG NumberOfBytes, + IN PHYSICAL_ADDRESS LowestAcceptableAddress, + IN PHYSICAL_ADDRESS HighestAcceptableAddress, + IN PHYSICAL_ADDRESS BoundaryAddressMultiple OPTIONAL, + IN MEMORY_CACHING_TYPE CacheType OPTIONAL, + IN ULONG Alignment); + +/* FIXME: NDK */ +VOID STDCALL KeEnterKernelDebugger (VOID); +VOID FASTCALL KiAcquireSpinLock(PKSPIN_LOCK SpinLock); +VOID FASTCALL KiReleaseSpinLock(PKSPIN_LOCK SpinLock); +VOID STDCALL KiDispatchInterrupt(VOID); +NTSTATUS +STDCALL +ObCreateObject ( + IN KPROCESSOR_MODE ObjectAttributesAccessMode OPTIONAL, + IN POBJECT_TYPE ObjectType, + IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, + IN KPROCESSOR_MODE AccessMode, + IN OUT PVOID ParseContext OPTIONAL, + IN ULONG ObjectSize, + IN ULONG PagedPoolCharge OPTIONAL, + IN ULONG NonPagedPoolCharge OPTIONAL, + OUT PVOID *Object +); + +/* Debug Header */ +#include <debug.h> + +/* Internal HAL Headers */ +#include "apic.h" +#include "bus.h" +#include "halirq.h" +#include "halp.h" +#include "mps.h" +#include "ioapic.h" + +/* Helper Macros FIXME: NDK */ +#define ROUNDUP(a,b) ((((a)+(b)-1)/(b))*(b)) +#define ROUND_DOWN(N, S) ((N) - ((N) % (S))) +#ifndef HIWORD +#define HIWORD(l) ((WORD)(((DWORD)(l) >> 16) & 0xFFFF)) +#endif +#ifndef LOWORD +#define LOWORD(l) ((WORD)(l)) +#endif + +/* EOF */ _____ Copied: trunk/reactos/hal/halx86/include/halp.h (from rev 15988, trunk/reactos/hal/halx86/include/hal.h) --- trunk/reactos/hal/halx86/include/hal.h 2005-06-17 16:12:33 UTC (rev 15988) +++ trunk/reactos/hal/halx86/include/halp.h 2005-06-18 14:30:09 UTC (rev 16040) @@ -0,0 +1,449 @@ +/* + * + */ + +#ifndef __INTERNAL_HAL_HAL_H +#define __INTERNAL_HAL_HAL_H + +#define HAL_APC_REQUEST 0 +#define HAL_DPC_REQUEST 1 + +/* display.c */ +struct _LOADER_PARAMETER_BLOCK; +VOID FASTCALL HalInitializeDisplay (struct _LOADER_PARAMETER_BLOCK *LoaderBlock); +VOID FASTCALL HalClearDisplay (UCHAR CharAttribute); + +/* adapter.c */ +PADAPTER_OBJECT STDCALL HalpAllocateAdapterEx(ULONG NumberOfMapRegisters,BOOLEAN IsMaster, BOOLEAN Dma32BitAddresses); + +/* bus.c */ +VOID HalpInitBusHandlers (VOID); + +/* irql.c */ +VOID HalpInitPICs(VOID); + +/* udelay.c */ +VOID HalpCalibrateStallExecution(VOID); + +/* pci.c */ +VOID HalpInitPciBus (VOID); + +/* enum.c */ +VOID HalpStartEnumerator (VOID); + +/* dma.c */ +VOID HalpInitDma (VOID); + +/* mem.c */ +PVOID HalpMapPhysMemory(ULONG PhysAddr, ULONG Size); + +/* Non-generic initialization */ +VOID HalpInitPhase0 (VOID); + +/* DMA Page Register Structure + 080 DMA RESERVED + 081 DMA Page Register (channel 2) + 082 DMA Page Register (channel 3) + 083 DMA Page Register (channel 1) + 084 DMA RESERVED + 085 DMA RESERVED + 086 DMA RESERVED + 087 DMA Page Register (channel 0) + 088 DMA RESERVED + 089 PS/2-DMA Page Register (channel 6) + 08A PS/2-DMA Page Register (channel 7) + 08B PS/2-DMA Page Register (channel 5) + 08C PS/2-DMA RESERVED + 08D PS/2-DMA RESERVED + 08E PS/2-DMA RESERVED + 08F PS/2-DMA Page Register (channel 4) +*/ + typedef struct _DMA_PAGE{ + UCHAR Reserved1; + UCHAR Channel2; + UCHAR Channel3; + UCHAR Channel1; + UCHAR Reserved2[3]; + UCHAR Channel0; + UCHAR Reserved3; + UCHAR Channel6; + UCHAR Channel7; + UCHAR Channel5; + UCHAR Reserved4[3]; + UCHAR Channel4; +} DMA_PAGE, *PDMA_PAGE; + +/* DMA Channel Mask Register Structure + +MSB LSB + x x x x x x x x + ------------------- - ----- + | | | 00 - Select channel 0 mask bit + | | \---- 01 - Select channel 1 mask bit + | | 10 - Select channel 2 mask bit + | | 11 - Select channel 3 mask bit + | | + | \---------- 0 - Clear mask bit + | 1 - Set mask bit + | + \----------------------- xx - Reserved +*/ +typedef struct _DMA_CHANNEL_MASK { + UCHAR Channel : 2; + UCHAR SetMask : 1; + UCHAR Reserved : 5; +} DMA_CHANNEL_MASK, *PDMA_CHANNEL_MASK; + +/* DMA Mask Register Structure + + MSB LSB + x x x x x x x x + \---/ - - ----- ----- + | | | | | 00 - Channel 0 select + | | | | \---- 01 - Channel 1 select + | | | | 10 - Channel 2 select + | | | | 11 - Channel 3 select + | | | | + | | | | 00 - Verify transfer + | | | \------------ 01 - Write transfer + | | | 10 - Read transfer + | | | + | | \-------------------- 0 - Autoinitialized + | | 1 - Non-autoinitialized + | | + | \------------------------ 0 - Address increment select + | + | 00 - Demand mode + \------------------------------ 01 - Single mode + 10 - Block mode + 11 - Cascade mode +*/ +typedef struct _DMA_MODE { + UCHAR Channel : 2; + UCHAR TransferType : 2; + UCHAR AutoInitialize : 1; + UCHAR AddressDecrement : 1; + UCHAR RequestMode : 2; +} DMA_MODE, *PDMA_MODE; + + +/* DMA Extended Mode Register Structure + + MSB LSB + x x x x x x x x + - - ----- ----- ----- + | | | | | 00 - Channel 0 select + | | | | \---- 01 - Channel 1 select + | | | | 10 - Channel 2 select + | | | | 11 - Channel 3 select + | | | | + | | | | 00 - 8-bit I/O, by bytes + | | | \------------ 01 - 16-bit I/O, by words, address shifted + | | | 10 - 32-bit I/O, by bytes + | | | 11 - 16-bit I/O, by bytes + | | | + | | \---------------------- 00 - Compatible + | | 01 - Type A + | | 10 - Type B + | | 11 - Burst + | | + | \---------------------------- 0 - Terminal Count is Output + | + \---------------------------------0 - Disable Stop Register + 1 - Enable Stop Register +*/ +typedef struct _DMA_EXTENDED_MODE { + UCHAR ChannelNumber : 2; + UCHAR TransferSize : 2; + UCHAR TimingMode : 2; + UCHAR TerminalCountIsOutput : 1; + UCHAR EnableStopRegister : 1; +}DMA_EXTENDED_MODE, *PDMA_EXTENDED_MODE; + +/* DMA Extended Mode Register Transfer Sizes */ +#define B_8BITS 0 +#define W_16BITS 1 +#define B_32BITS 2 +#define B_16BITS 3 + +/* DMA Extended Mode Register Timing */ +#define COMPATIBLE_TIMING 0 +#define TYPE_A_TIMING 1 +#define TYPE_B_TIMING 2 +#define BURST_TIMING 3 + +/* Channel Stop Registers for each Channel */ +typedef struct _DMA_CHANNEL_STOP { + UCHAR ChannelLow; + UCHAR ChannelMid; + UCHAR ChannelHigh; + UCHAR Reserved; +} DMA_CHANNEL_STOP, *PDMA_CHANNEL_STOP; + +/* Transfer Types */ +#define VERIFY_TRANSFER 0x00 +#define READ_TRANSFER 0x01 +#define WRITE_TRANSFER 0x02 + +/* Request Modes */ +#define DEMAND_REQUEST_MODE 0x00 +#define SINGLE_REQUEST_MODE 0x01 +#define BLOCK_REQUEST_MODE 0x02 +#define CASCADE_REQUEST_MODE 0x03 + +#define DMA_SETMASK 4 +#define DMA_CLEARMASK 0 +#define DMA_READ 4 +#define DMA_WRITE 8 +#define DMA_SINGLE_TRANSFER 0x40 +#define DMA_AUTO_INIT 0x10 + +typedef struct _DMA1_ADDRESS_COUNT { + UCHAR DmaBaseAddress; + UCHAR DmaBaseCount; +} DMA1_ADDRESS_COUNT, *PDMA1_ADDRESS_COUNT; + +typedef struct _DMA2_ADDRESS_COUNT { + UCHAR DmaBaseAddress; + UCHAR Reserved1; + UCHAR DmaBaseCount; + UCHAR Reserved2; +} DMA2_ADDRESS_COUNT, *PDMA2_ADDRESS_COUNT; + +typedef struct _DMA1_CONTROL { + DMA1_ADDRESS_COUNT DmaAddressCount[4]; + UCHAR DmaStatus; + UCHAR DmaRequest; + UCHAR SingleMask; + UCHAR Mode; + UCHAR ClearBytePointer; + UCHAR MasterClear; + UCHAR ClearMask; + UCHAR AllMask; +} DMA1_CONTROL, *PDMA1_CONTROL; + +typedef struct _DMA2_CONTROL { + DMA2_ADDRESS_COUNT DmaAddressCount[4]; + UCHAR DmaStatus; + UCHAR Reserved1; + UCHAR DmaRequest; + UCHAR Reserved2; + UCHAR SingleMask; + UCHAR Reserved3; + UCHAR Mode; + UCHAR Reserved4; + UCHAR ClearBytePointer; + UCHAR Reserved5; + UCHAR MasterClear; + UCHAR Reserved6; + UCHAR ClearMask; + UCHAR Reserved7; + UCHAR AllMask; + UCHAR Reserved8; +} DMA2_CONTROL, *PDMA2_CONTROL; + +/* This Structure Defines the I/O Map of the 82537 Controller + I've only defined the registers which are likely to be useful to us */ +typedef struct _EISA_CONTROL { + /* DMA Controller 1 */ + DMA1_CONTROL DmaController1; /* 00h-0Fh */ + UCHAR Reserved1[16]; /* 0Fh-1Fh */ + + /* Interrupt Controller 1 (PIC) */ + UCHAR Pic1Operation; /* 20h */ + UCHAR Pic1Interrupt; /* 21h */ + UCHAR Reserved2[30]; /* 22h-3Fh */ + + /* Timer */ + UCHAR TimerCounter; /* 40h */ + UCHAR TimerMemoryRefresh; /* 41h */ + UCHAR Speaker; /* 42h */ + UCHAR TimerOperation; /* 43h */ + UCHAR TimerMisc; /* 44h */ + UCHAR Reserved3[2]; /* 45-46h */ + UCHAR TimerCounterControl; /* 47h */ + UCHAR TimerFailSafeCounter; /* 48h */ + UCHAR Reserved4; /* 49h */ + UCHAR TimerCounter2; /* 4Ah */ + UCHAR TimerOperation2; /* 4Bh */ + UCHAR Reserved5[20]; /* 4Ch-5Fh */ + + /* NMI / Keyboard / RTC */ + UCHAR Keyboard; /* 60h */ + UCHAR NmiStatus; /* 61h */ + UCHAR Reserved6[14]; /* 62h-6Fh */ + UCHAR NmiEnable; /* 70h */ + UCHAR Reserved7[15]; /* 71h-7Fh */ + + /* DMA Page Registers Controller 1 */ + DMA_PAGE DmaController1Pages; /* 80h-8Fh */ + UCHAR Reserved8[16]; /* 90h-9Fh */ + + /* Interrupt Controller 2 (PIC) */ + UCHAR Pic2Operation; /* 0A0h */ + UCHAR Pic2Interrupt; /* 0A1h */ + UCHAR Reserved9[30]; /* 0A2h-0BFh */ + + /* DMA Controller 2 */ + DMA1_CONTROL DmaController2; /* 0C0h-0CFh */ + + /* System Reserved Ports */ + UCHAR SystemReserved[816]; /* 0D0h-3FFh */ + + /* Extended DMA Registers, Controller 1 */ + UCHAR DmaHighByteCount1[8]; /* 400h-407h */ + UCHAR Reserved10[2]; /* 408h-409h */ + UCHAR DmaChainMode1; /* 40Ah */ + UCHAR DmaExtendedMode1; /* 40Bh */ + UCHAR DmaBufferControl; /* 40Ch */ + UCHAR Reserved11[84]; /* 40Dh-460h */ + UCHAR ExtendedNmiControl; /* 461h */ + UCHAR NmiCommand; /* 462h */ + UCHAR Reserved12; /* 463h */ + UCHAR BusMaster; /* 464h */ + UCHAR Reserved13[27]; /* 465h-47Fh */ + + /* DMA Page Registers Controller 2 */ + DMA_PAGE DmaController2Pages; /* 480h-48Fh */ + UCHAR Reserved14[48]; /* 490h-4BFh */ + + /* Extended DMA Registers, Controller 2 */ + UCHAR DmaHighByteCount2[16]; /* 4C0h-4CFh */ + + /* Edge/Level Control Registers */ + UCHAR Pic1EdgeLevel; /* 4D0h */ + UCHAR Pic2EdgeLevel; /* 4D1h */ + UCHAR Reserved15[2]; /* 4D2h-4D3h */ + + /* Extended DMA Registers, Controller 2 */ + UCHAR DmaChainMode2; /* 4D4h */ + UCHAR Reserved16; /* 4D5h */ + UCHAR DmaExtendedMode2; /* 4D6h */ + UCHAR Reserved17[9]; /* 4D7h-4DFh */ + + /* DMA Stop Registers */ + DMA_CHANNEL_STOP DmaChannelStop[8]; /* 4E0h-4FFh */ +} EISA_CONTROL, *PEISA_CONTROL; + +extern ULONG HalpEisaDma; +extern PADAPTER_OBJECT MasterAdapter; + +ULONG HalpEisaDma; +PADAPTER_OBJECT MasterAdapter; + +/* + * ADAPTER_OBJECT - Track a busmaster DMA adapter and its associated resources + * + * NOTES: + * - I've updated this to the Windows Object Defintion. + */ +struct _ADAPTER_OBJECT { + DMA_ADAPTER DmaHeader; + struct _ADAPTER_OBJECT *MasterAdapter; + ULONG MapRegistersPerChannel; + PVOID AdapterBaseVa; + PVOID MapRegisterBase; + ULONG NumberOfMapRegisters; + ULONG CommittedMapRegisters; + PWAIT_CONTEXT_BLOCK CurrentWcb; + KDEVICE_QUEUE ChannelWaitQueue; + PKDEVICE_QUEUE RegisterWaitQueue; + LIST_ENTRY AdapterQueue; + ULONG SpinLock; + PRTL_BITMAP MapRegisters; + PUCHAR PagePort; + UCHAR ChannelNumber; + UCHAR AdapterNumber; + USHORT DmaPortAddress; + union { + DMA_MODE AdapterMode; + UCHAR AdapterModeByte; + }; + BOOLEAN NeedsMapRegisters; + BOOLEAN MasterDevice; + UCHAR Width16Bits; + UCHAR ScatterGather; + UCHAR IgnoreCount; + UCHAR Dma32BitAddresses; + UCHAR Dma64BitAddresses; + BOOLEAN LegacyAdapter; + LIST_ENTRY AdapterList; +} ADAPTER_OBJECT; + +/* +struct _ADAPTER_OBJECT { + INTERFACE_TYPE InterfaceType; + BOOLEAN Master; + int Channel; + PVOID PagePort; + PVOID CountPort; + PVOID OffsetPort; + KSPIN_LOCK SpinLock; + PVOID Buffer; + BOOLEAN Inuse; + ULONG AvailableMapRegisters; + PVOID MapRegisterBase; + ULONG AllocatedMapRegisters; + PWAIT_CONTEXT_BLOCK WaitContextBlock; + KDEVICE_QUEUE DeviceQueue; + BOOLEAN ScatterGather; + BOOLEAN DemandMode; + BOOLEAN AutoInitialize; +}; +*/ + +/* sysinfo.c */ +NTSTATUS STDCALL +HalpQuerySystemInformation(IN HAL_QUERY_INFORMATION_CLASS InformationClass, + IN ULONG BufferSize, + IN OUT PVOID Buffer, + OUT PULONG ReturnedLength); + + +/* Non-standard functions */ +VOID STDCALL +HalReleaseDisplayOwnership(); + +BOOLEAN STDCALL +HalQueryDisplayOwnership(); + +#if defined(__GNUC__) [truncated at 1000 lines; 39 more skipped]
19 years, 6 months
1
0
0
0
← Newer
1
...
29
30
31
32
33
34
35
...
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