Commit graph

69 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto 2674e26cbb
[NTOS:IO] Reformat iorsrce.c, no functional code changes.
- Fix whitespace; add SAL annotations, doxygen documentation...

- Deduplicate the array of description strings corresponding to
  IO_QUERY_DEVICE_DATA_FORMAT.

- Unhardcode the "[3]" into 'IoQueryDeviceMaxData': the maximum number
  of device data queried.
2023-06-04 21:40:07 +02:00
Timo Kreuzer 081c637c06 [XDK] Silence some GCC x64 warnings 2022-12-01 15:21:59 +02:00
Justin Miller 4363e74ddc
[REACTOS] Finally get some ARM64 applications building (#4517)
- Add some missing ARM64 exports to ntdll, kernel32 and user32
- Create mmtypes header file based on WoA debug symbols
- Get the remaining headers in order, so we can build ARM64 apps
- Adjust subsystem version for binaries so they can run on WoA host
- Get calc, notepad and more base apps to build for ARM64 platform

CORE-17518

Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2022-05-25 17:06:32 +03:00
Hermès Bélusca-Maïto a849125947
[NDK][XDK] Improve some HAL-related definitions.
- Add more accurate definitions for the values of HAL_DISPATCH_VERSION
  and HAL_PRIVATE_DISPATCH_VERSION.
  See https://www.geoffchappell.com/studies/windows/km/ntoskrnl/inc/ntos/hal/hal_dispatch.htm
  and https://www.geoffchappell.com/studies/windows/km/ntoskrnl/inc/ntos/hal/hal_private_dispatch.htm

- Make the conditionals for HalDispatchTable definition MS-WDK-compatible,
  and do the same for HalPrivateDispatchTable.

- Remove MinGW-only non-MS-WDK-compatible PHAL_DISPATCH_TABLE and
  PHAL_PRIVATE_DISPATCH_TABLE definitions.

- Remove hackish #define _NTSYSTEM_ in the wdm.h header.
2022-05-08 04:15:52 +02:00
George Bișoc bcf0aebb13
[XDK] Move security object related structures to appropriate place
ACCESS_ALLOWED_OBJECT_ACE and ACCESS_DENIED_OBJECT_ACE structures must be in the XDK section of SDK as these will be used in the future in the security subsystem of the kernel.
2022-05-06 10:09:52 +02:00
Justin Miller 2204695f0a
[SDK] Fix some arm64 stuff that was discovered during testing
Addendum to 6dfc13e4. CORE-17518
2022-04-07 19:50:43 +03:00
Justin Miller 3cee1f718b
[XDK] Start define of xdk ke.h for arm64
CORE-17518
2022-04-07 19:50:42 +03:00
Hermès Bélusca-Maïto 0889182d66
[SDK:NDK] Add the NX_SUPPORT_* flags for the SharedUserData.NXSupportPolicy member. (#4111)
And move those in the XDK to a better place, adding versioning as well.
2022-01-14 23:59:14 +01:00
Justin Miller b1fca7ea55
[SDK][XDK] Add more definitions for ARM64 and start fixing PE binaries (#4142)
- Add context structure and definitions, NEON128 structure,
  runtime function entry, dispatcher context, scope table

All definitions are based on the latest SDK for arm64.

[SDK] Use _TARGET_PE64 in the pefixup

[GENINC] Add AA64 identifier for ARM64 PE binaries

CORE-17518
2021-12-09 17:54:16 +03:00
George Bișoc a15e2472b8
[SDK][NDK][XDK] Add the privilege flags needed for token filtering
These are needed for CreateRestrictedToken, NtFilterToken and SeFilterToken respectively. See the link down below for more information.
https://docs.microsoft.com/en-us/windows/win32/api/securitybaseapi/nf-securitybaseapi-createrestrictedtoken
2021-11-07 14:14:18 +01:00
Justin Miller be223b9de7
[SDK] Allow ARM64 MSVC to complete configuration (#4045)
- Add some of the missing CMake adjustments to continue the configure and compile process with ARM64 MSVC
- Created quick stubs for the functions in SDK needed to finish the configuration process
- Put in an ARM64 option for spec2def

CORE-17518 CORE-17615
2021-10-22 18:52:32 +03:00
George Bișoc 58c42afec2
[XDK][KMTESTS:SE] Move the auto inherit ACE flags in the right place
These bit flags are documented in CreatePrivateObjectSecurityEx API routine call in MSDN and their reasonable location should be XDK (NTIFS section more or less) and not Kernel tests suite (KMTESTs). Also assign these flags the right values.

https://docs.microsoft.com/en-us/windows/win32/api/securitybaseapi/nf-securitybaseapi-createprivateobjectsecurityex
2021-09-09 19:29:50 +02:00
Timo Kreuzer 8043628d97 [PSDK] Add some missing ARM definitions 2021-08-04 02:03:07 +02:00
Timo Kreuzer a3763c61dc [PSDK][NDK] Use hex to define MIN/MAX constants like in native SDK
This fixes use of unary minus operator on unsigned type warning.
2021-07-23 22:03:48 +02:00
George Bișoc 506cee3219 [NTOS:SE] Implement logon session termination notification
Note to SELF and EVERYONE: the commit implements the initial logon session termination notification implementation, the SeMarkLogonSessionForTerminationNotification function, but as it currently stands there are several other tasks to be addressed in the future in order for the logon termination notification to be fully completed. The tasks as of which are.

1. Our SepRmDereferenceLogonSession is not fully implemented, as it doesn't inform the LSA and filesystems of logon deletion notification
2. Implement two worker routines that are actually in charge of such tasks of informing LSA and FSDs
3. Perform logon deletion
4. Do further investigations and check whatever that is left to address, if any
2021-07-15 19:31:46 +02:00
Jérôme Gardou a28a34f108 [NDK][XDK] Remove _Must_inspect_result_ from RtlTimeFieldsToTime & RtlTimeToSecondsSince1970
WDK doesn't have it and it causes more mess than anything.
CORE-17637
2021-06-28 10:20:57 +02:00
Dmitry Borisov 999345a4fe [XDK] Update the prototype of IO_COMPLETION_ROUTINE 2021-05-19 20:14:29 +02:00
Jérôme Gardou 3adf450867 [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build
Put data into PAGEDATA or INITDATA sections
Keep section declaration for prototypes

CORE-17540
2021-05-12 11:04:29 +02:00
Katayama Hirofumi MZ 941dfd2dee
[INCLUDE][XDK] Add FILE_ATTRIBUTE_VIRTUAL macro into winnt_old.h (#3649)
PR #3642 needs it. CORE-17443
2021-05-08 21:08:34 +09:00
Jérôme Gardou 523912536e [KERNEL32] Sync NLS RC files with wine 6.7
Mostly for having them UTF-8 encoded
2021-05-03 22:00:57 +02:00
Jérôme Gardou fa74ae571b [XDK] Undefine some defines once they are not needed 2021-03-24 11:07:54 +01:00
Jérôme Gardou 525d19d469 [NDK][XDK] Use decimal literals for MINxxxx defines
Because myLongLong < MINLONG is supposed to behave like you'd expect
2021-03-19 11:04:19 +01:00
Hermès Bélusca-Maïto 9aa73da948
[XDK] Even the DBG_UNREFERENCED_PARAMETER() should use (void)P. Addendum to 46ca069e. 2021-01-18 22:23:24 +01:00
Victor Perevertkin 46ca069e42
[XDK] Remove UNREFERENCE_LOCAL_VARIABLE macro
Change UNREFERENCED_PARAMETER to (VOID)P to support const parameters
2021-01-19 00:15:02 +03:00
Hermès Bélusca-Maïto fb9d8e5239
[PSDK][XDK] Add newer FILE_DEVICE_xxx DEVICE_TYPE defines. 2020-12-27 00:51:57 +01:00
Hermès Bélusca-Maïto 9feab8e95a
[NDK][XDK] Add some missing macros for run-time checks of X86 system architecture (NEC support). 2020-11-26 00:29:34 +01:00
Hermès Bélusca-Maïto c295fb95e9
[XDK] Minor formatting; remove some extra newlines at end of files. 2020-11-26 00:29:20 +01:00
Hermès Bélusca-Maïto be01e6d76f
[XDK] Update the definition of DEBUG_DEVICE_DESCRIPTOR and related structures with Vista,7,8,10 additions.
CORE-17360

Information from:
- https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntddk/ns-ntddk-debug_device_descriptor
- https://www.vergiliusproject.com
- https://codemachine.com
2020-11-09 22:33:02 +01:00
Victor Perevertkin bb94e711ef
[NTOSKRNL_VISTA] Add stubs for functions needed in KMDF 2020-09-25 01:28:55 +03:00
Victor Perevertkin d01518da7c
[XDK] Add definitions required for newer storage class drivers (cdrom)
That introduced some warnings in the current code which were corrected as well

CORE-17129
2020-09-24 22:30:52 +03:00
Victor Perevertkin be276dde28
[XDK][NTOSKRNL_VISTA] Put NTKRNLVISTAAPI to XDK headers
for vista+ APIs implemented in ntoskrnl_vista.
Now if you statically link ntoskrnl_vista into a driver,
NTKERNELAPI will automatically be removed from an API definition
2020-09-24 21:51:57 +03:00
Victor Perevertkin f7c58468f1
[XDK] Move UNREACHABLE macro definition to ntbasedef.h 2020-09-24 05:35:43 +03:00
Victor Perevertkin 87a5311116
[SDK] Fix __forceinline definition for C++ 2020-09-24 05:33:35 +03:00
William Kent 427ea67b9c
[RTL] Add code to SxS manifest parser to parse XML namespaces (#2512)
* [XDK] Typo fix
* [XDK] Add missing ACTIVATION_CONTEXT_SECTION values
* [RTL] Merge changes from Wine
* [ROSTESTS] Fix typo
* [NTDLL] Typo fix
* Add test for new functionality
* [ROSTESTS] Fix path
* [ROSTESTS] Add test to testlist.c
2020-09-20 22:56:42 +02:00
Jérôme Gardou 4084b5f214 [SDK] Add WOW64_CONTEXT structure 2020-09-16 10:35:34 +02:00
Victor Perevertkin d9864ca6c5
[NTOSKRNL_VISTA][XDK] Implement IoSetMasterIrpStatus 2020-08-29 05:44:34 +03:00
Victor Perevertkin 093f377c40
[XDK] HACK: remove dllimport from functions which
will be implemented in ntoskrnl_vista. Remove when we will be NT6

CORE-17129
2020-08-28 05:11:42 +03:00
Victor Perevertkin 01eb9ba8de
[XDK] Add definitions required for newer storage class drivers
Remove duplications in kefuncs and add missing NTKERNELAPI in iofuncs

CORE-17129
2020-08-28 05:04:23 +03:00
Thomas Faber b957229c1b
[XDK] Fix a noisy clang warning in RTL_CONSTANT_STRING. CORE-14306
..\ntoskrnl\vdm\vdmmain.c(91,34): warning: expression does not compute the number of elements in this array; element type is 'unsigned short', not 'char' [-Wsizeof-array-div]
    UNICODE_STRING PhysMemName = RTL_CONSTANT_STRING(L"\\Device\\PhysicalMemory");
                                 ^                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\ROS\reactos\output-clang\sdk\include\psdk\ntdef.h(1542,15): note: expanded from macro 'RTL_CONSTANT_STRING'
    sizeof(s) / sizeof(_RTL_CONSTANT_STRING_type_check(s)), \
           ~  ^
..\ntoskrnl\vdm\vdmmain.c(91,34): note: place parentheses around the 'sizeof (_RTL_CONSTANT_STRING_type_check(L"\\Device\\PhysicalMemory"))' expression to silence this warning
C:\ROS\reactos\output-clang\sdk\include\psdk\ntdef.h(1542,15): note: expanded from macro 'RTL_CONSTANT_STRING'
    sizeof(s) / sizeof(_RTL_CONSTANT_STRING_type_check(s)), \
              ^
1 warning generated.
2020-08-23 12:10:12 +02:00
Thomas Faber 960511094b
[XDK] Avoid defining interlocked intrinsics. CORE-17190
Fixes build with MSVC 19.27+.
2020-08-14 11:08:45 +02:00
Victor Perevertkin 380cd27cf3
[XDK] Introduce ExAllocate*Zero and ExAllocate*Uninitialized functions
These has been first added to DDK 10.0.19041.0 and made backwards-compatible
with all Windows versions since Windows 2000.
Our implementation does not use POOL_ZERO_ALLOCATION flag because it's not
supported by ReactOS yet, and thus erases the memory unconditionally.
2020-07-26 14:10:52 +03:00
Serge Gautherie aa6e11b549
[NDK][XDK] Add 3 CM_RESOURCE_INTERRUPT_* defines (#2755) 2020-05-14 14:31:53 +02:00
Nguyen Trung Khanh 4c37757e81
[NETKVM] Import NetKVM network adapter driver by Red Hat
CORE-15841
2020-04-23 16:33:09 +03:00
Serge Gautherie e7790abb02 [PSDK][XDK] Move 2 aliases to psdk/winbase.h from xdk/winnt_old.h 2020-03-06 18:26:01 +01:00
Timo Kreuzer a22ab61a87 [SDK] Improve x64 definition of DISPATCHER_CONTEXT 2020-02-09 15:56:30 +01:00
Timo Kreuzer e2560a5cad [XDK] Fix x64 version of KeGetCurrentProcessorNumber() and add KeGetCurrentProcessorIndex() 2020-01-18 14:56:17 +01:00
Timo Kreuzer fb0ebac349 [NDK][XDK][RTL] Fix definition of RtlFillMemoryUlong on x64 2020-01-03 13:00:45 +01:00
Pierre Schweitzer b804b7fa9e
[SDK] Define DO_UNLOAD_PENDING
Based on: http://www.perisoft.net/engineer/wdmcard.htm

CORE-13882
2019-09-13 20:08:39 +02:00
Mark Jansen b445fef904
[SDK] Update Int32x32To64 macro for arm 2019-08-20 22:28:11 +02:00
Thomas Faber 6cde208c6b [SDK] Properly define ZwQueryInformationProcess 2019-06-30 23:07:54 +02:00