reactos.git
3 years ago[REACTOS] Cleanup INIT and some PAGE section allocations 3275/head
Victor Perevertkin [Tue, 6 Oct 2020 19:44:01 +0000 (22:44 +0300)]
[REACTOS] Cleanup INIT and some PAGE section allocations

- Change INIT_FUNCTION and INIT_SECTION to CODE_SEG("INIT") and DATA_SEG("INIT") respectively
- Remove INIT_FUNCTION from function prototypes
- Remove alloc_text pragma calls as they are not needed anymore

3 years ago[NDK][CMAKE] Introduce DATA_SEG and CODE_SEG macro
Victor Perevertkin [Tue, 6 Oct 2020 19:36:45 +0000 (22:36 +0300)]
[NDK][CMAKE] Introduce DATA_SEG and CODE_SEG macro
These are for putting code and data to non-default sections
At the same time, move INIT section attributes declaration to cmake files

3 years ago[MOUNTMGR] Move the driver to drivers/storage
Victor Perevertkin [Sun, 1 Nov 2020 09:35:56 +0000 (12:35 +0300)]
[MOUNTMGR] Move the driver to drivers/storage
Effectively mountmgr.sys is an essential part of the storage stack

3 years ago[CRT] Remove duplicated atexit/onexit code
Timo Kreuzer [Thu, 22 Oct 2020 15:11:02 +0000 (17:11 +0200)]
[CRT] Remove duplicated atexit/onexit code

This removes the broken wine version of atexit and onexit. It keeps only dllonexit, which is implemented properly. The previous __call_atexit is moved to where the mingw onexit/atexit code is and adjusts it to work with the existing code. A call to __call_atexit is added in __tmainCRTStartup after the main function was called.

3 years ago[CMAKE] Rename def files for import libraries on MSVC builds to *_implib.de like...
Timo Kreuzer [Thu, 22 Oct 2020 14:25:46 +0000 (16:25 +0200)]
[CMAKE] Rename def files for import libraries on MSVC builds to *_implib.de like on GCC

3 years ago[CRT_APITEST] Add test for atexit
Timo Kreuzer [Thu, 22 Oct 2020 13:13:56 +0000 (15:13 +0200)]
[CRT_APITEST] Add test for atexit

3 years ago[NTOS:MM:X64] Fix MM_WAIT_ENTRY on x64
Timo Kreuzer [Sun, 28 Jul 2019 12:27:51 +0000 (14:27 +0200)]
[NTOS:MM:X64] Fix MM_WAIT_ENTRY on x64

3 years ago[NTOS:MM] Make sure PXEs/PPEs and PDEs are always MM_EXECUTE_READWRITE
Timo Kreuzer [Wed, 21 Mar 2018 20:22:03 +0000 (21:22 +0100)]
[NTOS:MM] Make sure PXEs/PPEs and PDEs are always MM_EXECUTE_READWRITE

This is required since the NX protection proagates from the highest level, enforcing NX on the entire range, independent of whether lower level P*Es have the bit set or not. It might be useful to add a platform specific constant to allow making page tables NX on architectures that have a different behavior.

3 years ago[NTOS:MM:X64] Fix session space initialization on x64
Timo Kreuzer [Sun, 4 Feb 2018 18:19:03 +0000 (19:19 +0100)]
[NTOS:MM:X64] Fix session space initialization on x64

3 years ago[NTOS:MM:X64] Implement MmCreatePageFileMapping and MmDeletePageFileMapping
Timo Kreuzer [Sat, 10 Feb 2018 21:45:45 +0000 (22:45 +0100)]
[NTOS:MM:X64] Implement MmCreatePageFileMapping and MmDeletePageFileMapping

3 years ago[NTOS:MM:X64] Simplify and fix x64 mapping code
Timo Kreuzer [Sun, 4 Feb 2018 12:33:14 +0000 (13:33 +0100)]
[NTOS:MM:X64] Simplify and fix x64 mapping code

- Use demand-zero-ptes in MiGetPteForProcess
- Handle NoExecute in MiSetPteProtection
- Fix MmIsPageSwapEntry
- Fix MmGetPageFileMapping
- remove obsolete functions.

3 years ago[NTOS:MM:X64] Handle PPEs and PXEs as well in MmInitializeProcessAddressSpace()
Timo Kreuzer [Mon, 26 Oct 2020 10:12:04 +0000 (11:12 +0100)]
[NTOS:MM:X64] Handle PPEs and PXEs as well in MmInitializeProcessAddressSpace()

But don't set up the PFNs for the initial process on x64, as these have already been set up.

3 years ago[NTOS:MM:X64] On x64 allocate a VAD for the shared user page
Timo Kreuzer [Sat, 7 Mar 2020 18:35:15 +0000 (19:35 +0100)]
[NTOS:MM:X64] On x64 allocate a VAD for the shared user page

3 years ago[NTOS:MM:X64] On x64 reserve the address range between FFFF800000000000 and FFFFF6800...
Timo Kreuzer [Mon, 29 Jan 2018 11:39:21 +0000 (12:39 +0100)]
[NTOS:MM:X64] On x64 reserve the address range between FFFF800000000000 and FFFFF68000000000 in MiInitSystemMemoryAreas()

3 years ago[NTOS:MM:X64] Improve x64 Mm initialization
Timo Kreuzer [Mon, 29 Jan 2018 11:33:49 +0000 (12:33 +0100)]
[NTOS:MM:X64] Improve x64 Mm initialization

* Move MiBuildPfnDatabaseFromPageTables into MiBuildPfnDatabase
* Make sure to call MmInitializeProcessAddressSpace() from the x64 version of MiInitMachineDependent()
* Handle result of MmInitializeProcessAddressSpace in MiInitMachineDependent (Should do the same for x86)
* Remove obsolete x64 debug print

3 years ago[NTOS:CC] CcMdl*Complete(): Return if FastIO succeeded (#3303)
Serge Gautherie [Sat, 31 Oct 2020 14:18:02 +0000 (15:18 +0100)]
[NTOS:CC] CcMdl*Complete(): Return if FastIO succeeded (#3303)

CORE-17342

3 years ago[GDI32] Fix up GdiFixUpHandle
Timo Kreuzer [Sat, 4 Jan 2020 12:58:06 +0000 (13:58 +0100)]
[GDI32] Fix up GdiFixUpHandle

3 years ago[GDI32_APITEST] Add tests for truncated and extended handle to GetObject test
Timo Kreuzer [Sat, 4 Jan 2020 12:13:45 +0000 (13:13 +0100)]
[GDI32_APITEST] Add tests for truncated and extended handle to GetObject test

3 years ago[NTOS:KE:X64] Set the exception frame as well in KiInitializeContextThread
Timo Kreuzer [Sun, 5 Jan 2020 23:56:20 +0000 (00:56 +0100)]
[NTOS:KE:X64] Set the exception frame as well in KiInitializeContextThread

3 years ago[NTOS:KE:X64] Zero out the context in KiDispatchException
Timo Kreuzer [Sun, 5 Jan 2020 23:51:43 +0000 (00:51 +0100)]
[NTOS:KE:X64] Zero out the context in KiDispatchException

3 years ago[NTOS:KE:X64] Handle pending user APC on syscall exit (should be done on trap exit...
Timo Kreuzer [Thu, 27 Jun 2019 16:07:58 +0000 (18:07 +0200)]
[NTOS:KE:X64] Handle pending user APC on syscall exit (should be done on trap exit, too)

3 years ago[NTOS:KE:X64][NTDLL:X64] Implement KiUserExceptionDispatcher and fix KiDispatchExcept...
Timo Kreuzer [Thu, 18 Apr 2019 14:41:48 +0000 (16:41 +0200)]
[NTOS:KE:X64][NTDLL:X64] Implement KiUserExceptionDispatcher and fix KiDispatchExceptionToUser

3 years ago[NTOS:KE:X64] Zero out volatiles when returning from a system call
Timo Kreuzer [Tue, 15 May 2018 12:07:12 +0000 (14:07 +0200)]
[NTOS:KE:X64] Zero out volatiles when returning from a system call

3 years ago[NTOS:KE:X64][ASM:X64] Fix delivery of APCs
Timo Kreuzer [Mon, 12 Feb 2018 19:53:15 +0000 (20:53 +0100)]
[NTOS:KE:X64][ASM:X64] Fix delivery of APCs

- Deliver pending APCs on trap exit
- Pass the trapframe of KiApcInterrupt to KiDeliverApcs, not NULL.
- Fix parameter passing from KiSwapContext to KiSwapContextInternal and KiSwapContextResume, so that the ApcBypass parameter is not uninitialized
- Fix return value of KiSwapContextResume to correctly indicate whether we want to have APCs directly delivered or not (when there are non, or when delivery is suppressed)

3 years ago[NTOS:KE:X64][NTDLL:X64] Implement x64 version of user callback code
Timo Kreuzer [Mon, 5 Feb 2018 00:26:11 +0000 (01:26 +0100)]
[NTOS:KE:X64][NTDLL:X64] Implement x64 version of user callback code

3 years ago[NTOS:KE:X64] Simplify KiInitializeUserApc
Timo Kreuzer [Sat, 10 Feb 2018 18:52:46 +0000 (19:52 +0100)]
[NTOS:KE:X64] Simplify KiInitializeUserApc

3 years ago[NTOS:KE:X64] Move KiInitializeUserApc to usercall.c
Timo Kreuzer [Sat, 10 Feb 2018 17:47:29 +0000 (18:47 +0100)]
[NTOS:KE:X64] Move KiInitializeUserApc to usercall.c

3 years ago[NTOS:KE:X64] Implement flushing the GDI batch
Timo Kreuzer [Tue, 28 May 2019 09:06:56 +0000 (11:06 +0200)]
[NTOS:KE:X64] Implement flushing the GDI batch

3 years ago[NTOS:KE:X64] Change the logic of KeSwitchKernelStack and friends to be standards...
Timo Kreuzer [Fri, 9 Feb 2018 19:59:33 +0000 (20:59 +0100)]
[NTOS:KE:X64] Change the logic of KeSwitchKernelStack and friends to be standards conforming

The previous version (like the x86 one) used a combination of C and asm code, called from C code to switch the stack. This is problematic, since there is no guarantee what assumptions C code makes about the stack (i.e. it can place any kind of stack pointers into registers or on the stack itself.) The new algorithm returns back to the systemcall entry point in asm, which then calls KiConvertToGuiThread, which is also asm and calls KeSwitchKernelStack ...

3 years ago[NTOS:KE:X64] Improve kernel stack switching on GUI system calls
Timo Kreuzer [Tue, 6 Feb 2018 19:52:16 +0000 (20:52 +0100)]
[NTOS:KE:X64] Improve kernel stack switching on GUI system calls

To be 100% correct and not rely on assumptions, stack switching can only be done when all previous code - starting with the syscall entry point - is pure asm code, since we can't rely on the C compiler to not use stack addresses in a way that is not transparent. Therefore the new code uses the same mechanism as for normal system calls, returning the address of the asm function KiConvertToGuiThread, which is then called like an Nt* function would be called normally. KiConvertToGuiThread then allocated a new stack, switches to it (which is now fine, since all the code is asm), frees the old stack, calls PsConvertToGuiThread (which now will not try to allocate another stack, since we already have one) and then jumps into the middle of KiSystemCallEntry64, where the system call is handled again.
Also simplify KiSystemCallEntry64 a bit by copying the first parameters into the trap frame, avoiding to allocate additional stack space for the call to KiSystemCallHandler, which now overlaps with the space that is allocated for the Nt* function.
Finally fix the locations where r10 and r11 are stored, which is TrapFrame->Rcx and TrapFrame->EFlags, based on the situation in user mode.

3 years ago[NTOS:KE:X64] Implement KiConvertToGuiThread, KeSwitchKernelStack and support for...
Timo Kreuzer [Sun, 4 Feb 2018 22:44:43 +0000 (23:44 +0100)]
[NTOS:KE:X64] Implement KiConvertToGuiThread, KeSwitchKernelStack and support for win32k syscalls in KiSystemCallHandler

3 years ago[NTOS:KE:X64] Fix bugs in KeContextToTrapFrame and KeTrapFrameToContext
Timo Kreuzer [Mon, 12 Feb 2018 18:21:50 +0000 (19:21 +0100)]
[NTOS:KE:X64] Fix bugs in KeContextToTrapFrame and KeTrapFrameToContext

Set valid EFlags, the non-volatiles need to be taken from the exception frame, because the ones from the trap frame might not be set.

3 years ago[NTOS:KE:X64] Silence KiRundownThread, it has nothing to do
Timo Kreuzer [Sun, 11 Feb 2018 11:12:26 +0000 (12:12 +0100)]
[NTOS:KE:X64] Silence KiRundownThread, it has nothing to do

3 years ago[NTOS:KE:X64] Fix KiWriteSystemTime
Timo Kreuzer [Tue, 31 Dec 2019 08:04:11 +0000 (09:04 +0100)]
[NTOS:KE:X64] Fix KiWriteSystemTime

3 years ago[ASM:X64] Save GS base MSR in trap frame
Timo Kreuzer [Sun, 14 Apr 2019 17:18:38 +0000 (19:18 +0200)]
[ASM:X64] Save GS base MSR in trap frame

3 years ago[ASM:X64] ASSERT that interrupts are enabled, when returning to user mode
Timo Kreuzer [Mon, 12 Feb 2018 19:48:11 +0000 (20:48 +0100)]
[ASM:X64] ASSERT that interrupts are enabled, when returning to user mode

3 years ago[ASM:X64] Add initial version of kxamd64.inc, macamd64.inc
Timo Kreuzer [Fri, 9 Feb 2018 20:04:28 +0000 (21:04 +0100)]
[ASM:X64] Add initial version of kxamd64.inc, macamd64.inc

3 years ago[COMPILER_APITEST] Add SEH tests from MS (#2435)
Timo Kreuzer [Sat, 31 Oct 2020 10:08:27 +0000 (11:08 +0100)]
[COMPILER_APITEST] Add SEH tests from MS (#2435)

* [COMPILER_APITEST] Import MS EH/SEH tests

Taken from https://github.com/microsoft/compiler-tests

* [CRT] Add missing declaration of _longjmpex

* [COMPILER_APITEST] Add cmake build files for MS SEH test

It is built as a static library

* [COMPILER_APITEST] Fix GCC build of MS SEH tests

There are a number of hacks in there now. Also the volatile hacks should be separated and sent upstream.

* [COMPILER_APITEST] Fix x64 build of MS SEH tests

* [COMPILER_APITEST] Fix clang build of MS SEH tests

* [COMPILER_APITEST] Include MS SEH tests

3 years ago[DOC] 3rd Party Files.txt: Add 'rdesktop' entry (#3333)
Serge Gautherie [Fri, 30 Oct 2020 12:35:49 +0000 (13:35 +0100)]
[DOC] 3rd Party Files.txt: Add 'rdesktop' entry (#3333)

3 years ago[BASESRV] Re-enable and actually fix the CsrValidateMessageBuffer() checks in BaseSrv... 3304/head
Hermès Bélusca-Maïto [Sat, 17 Oct 2020 14:40:50 +0000 (16:40 +0200)]
[BASESRV] Re-enable and actually fix the CsrValidateMessageBuffer() checks in BaseSrvDefineDosDevice(). (#3304)

Addendum to commit 0a392b18.

The actual problem that existed all along was that the buffers being
validated with CsrValidateMessageBuffer() were not the correct ones!

What had to be checked is the string buffer **INSIDE** the UNICODE_STRING
structures! Indeed, it is these buffers that we are allocating on client side,
see https://github.com/reactos/reactos/blob/9b421af1/dll/win32/kernel32/client/dosdev.c#L324-L336

Dedicated to Pierre Schweitzer.

3 years ago[CSRSRV] Clarify few comments, and use MAXULONG.
Hermès Bélusca-Maïto [Fri, 30 Oct 2020 00:08:23 +0000 (01:08 +0100)]
[CSRSRV] Clarify few comments, and use MAXULONG.

3 years ago[NTDLL_APITEST] Fix LdrEnumResources testdata initialization 3329/head
Mark Jansen [Wed, 28 Oct 2020 19:14:34 +0000 (20:14 +0100)]
[NTDLL_APITEST] Fix LdrEnumResources testdata initialization
ROSTESTS-361

3 years ago[PSDK] Import some SAL headers from MS
Timo Kreuzer [Sat, 24 Oct 2020 12:18:09 +0000 (14:18 +0200)]
[PSDK] Import some SAL headers from MS

Taken from https://github.com/microsoft/ChakraCore/tree/master/pal/inc/rt

* Move _Check_return_opt_ and _Check_return_wat_ to crtdefs.h
* Update sal.h from https://github.com/microsoft/ChakraCore/blob/master/pal/inc/rt/sal.h
* Import no_sal2.h from MS and remove the one in NDK
* Import specstrings.h from MS
* Import specstrings_strict.h from MS
* Add specstrings_undef.h (based on defines in specstrings_strict.h)
* Remove __REACTOS__ hacks from cdfs

3 years ago[CMAKE] Make reactos_cab_inf really depend on reactos.inf
Jérôme Gardou [Wed, 28 Oct 2020 14:09:15 +0000 (15:09 +0100)]
[CMAKE] Make reactos_cab_inf really depend on reactos.inf

Instead of being always out of date & always trigger reactos.cab creation

3 years agoRevert "[CMAKE] Make unattended bootcd configurable via cmake"
Jérôme Gardou [Mon, 26 Oct 2020 17:11:55 +0000 (18:11 +0100)]
Revert "[CMAKE] Make unattended bootcd configurable via cmake"

This reverts commit cfd4ef9384eb1f2b55a5b195ee39475f015c8a7c.
This was way more controversial than I would have thought

3 years ago[RAPPS] Abort screenshot iteration on the first not found
Mark Jansen [Sun, 25 Oct 2020 19:30:03 +0000 (20:30 +0100)]
[RAPPS] Abort screenshot iteration on the first not found
This should decrease startup time / db parse time

3 years ago[RAPPS][RAPPS.COM] Introduce a rapps console shim 3252/head
Mark Jansen [Sun, 20 Sep 2020 20:18:08 +0000 (22:18 +0200)]
[RAPPS][RAPPS.COM] Introduce a rapps console shim
rapps.com will be launched when running 'rapps' from cmd or
from run, and since it is a console application, explorer/ cmd will
wait for it.
This rapps.com passes the commandline to rapps.exe,
and wait for rapps.exe to exit before closing.

CORE-17281

3 years ago[DBGHELP] Add missing support for AMD64. (#3083)
Carlo Bramini [Sun, 25 Oct 2020 11:30:37 +0000 (12:30 +0100)]
[DBGHELP] Add missing support for AMD64. (#3083)

See:
https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-context

3 years ago[WIN32SS] Repaint the whole window frame on some style bits set (#3199)
Doug Lyons [Sat, 24 Oct 2020 19:35:45 +0000 (14:35 -0500)]
[WIN32SS] Repaint the whole window frame on some style bits set (#3199)

This fixes the ReactOS Calculator buttons disappearing in CORE-16827

3 years ago[FASTFAT] Implement the overflow queue. CORE-17344 CORE-17328 3305/head
Thomas Faber [Sun, 18 Oct 2020 13:23:52 +0000 (15:23 +0200)]
[FASTFAT] Implement the overflow queue. CORE-17344 CORE-17328

This avoids blocking all Ex worker threads in fastfat, thereby making Cc
unable to issue the lazy writes that would unblock those workers.
This is more or less directly taken from fastfat_new.

3 years ago[SHELL32] Stub SHGetShellStyleHInstance and SHGetAttributesFromDataObject CORE-17337...
Oleg Dubinskiy [Sat, 24 Oct 2020 15:04:54 +0000 (18:04 +0300)]
[SHELL32] Stub SHGetShellStyleHInstance and SHGetAttributesFromDataObject CORE-17337 (#3295)

They are required by MS Picture and Fax Viewer (shimgvw.dll), together with MS browseui.dll.
CORE-17337

3 years ago[BROWSEUI] CCommonBrowser class should support aggregation (#3308)
Oleg Dubinskiy [Sat, 24 Oct 2020 15:02:18 +0000 (18:02 +0300)]
[BROWSEUI] CCommonBrowser class should support aggregation (#3308)

It will remove the following error from the log when use MS shell32.dll in ReactOS:
`fixme:(dll/win32/ole32/compobj.c:3454) Class {af604efe-8897-11d1-b944-00a0c90312e1} does not support aggregation`.
References:
https://www.geoffchappell.com/studies/windows/ie/browseui/classes/ccommonbrowser.htm
https://docs.microsoft.com/en-us/cpp/atl/reference/aggregation-and-class-factory-macros?view=vs-2019
CORE-17345

3 years ago[DOC] Add more files to "3rd Party Files.txt"
Victor Perevertkin [Sat, 24 Oct 2020 14:07:13 +0000 (17:07 +0300)]
[DOC] Add more files to "3rd Party Files.txt"

3 years ago[COMPILER_APITEST] Add new compiler_apitest, using pseh tests
Timo Kreuzer [Tue, 10 Mar 2020 00:27:59 +0000 (01:27 +0100)]
[COMPILER_APITEST] Add new compiler_apitest, using pseh tests

3 years ago[PSEH2_TEST] Move it to apitests
Timo Kreuzer [Mon, 9 Mar 2020 21:42:51 +0000 (22:42 +0100)]
[PSEH2_TEST] Move it to apitests

The folder name is compiler, because it is going to be part of a new compiler_apitest.

3 years ago[PSEH2_TEST] Fix compilation with MSVC
Timo Kreuzer [Mon, 9 Mar 2020 21:17:22 +0000 (22:17 +0100)]
[PSEH2_TEST] Fix compilation with MSVC

3 years ago[SHELL32] PL-pl Dialogs fix v2
Piotr Hetnarowicz [Thu, 14 May 2020 15:47:44 +0000 (17:47 +0200)]
[SHELL32] PL-pl Dialogs fix v2

shell32.dll PL-pl
-FIXED: invisible icon,text & description

3 years ago[MLANG] Fix scripts values in fnIMLangFontLink2_GetScriptFontInfo()
Serge Gautherie [Wed, 24 Jun 2020 18:41:44 +0000 (20:41 +0200)]
[MLANG] Fix scripts values in fnIMLangFontLink2_GetScriptFontInfo()

MSVC:
'...\mlang.c(3568): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)'

Import
https://source.winehq.org/git/wine.git/commit/2dc0758b5d0fe4ef49b7d0635299e5cb9e0360df

3 years ago[DOC] Make "3rd Party Files.txt" a main source about 3rd party projects
Victor Perevertkin [Sat, 24 Oct 2020 03:34:55 +0000 (06:34 +0300)]
[DOC] Make "3rd Party Files.txt" a main source about 3rd party projects

- Add path and license information to "3rd Party Files.txt"
- Merge README.FSD with it
- Rename README.WINE to WINESYNC.txt

3 years ago[CMAKE] MSVC RUNTIME_CHECKS is a 'Debug'-only feature
Serge Gautherie [Tue, 2 Jun 2020 19:27:07 +0000 (21:27 +0200)]
[CMAKE] MSVC RUNTIME_CHECKS is a 'Debug'-only feature

"cl : Command line error D8016 : '/Ox' and '/RTC1' command-line options are incompatible"

Addendum to 92dfec219d8c53a84c68ca069abbc170fc8bdb49.

3 years ago[CMAKE] Make unattended bootcd configurable via cmake ad00bf49f5
Jérôme Gardou [Fri, 23 Oct 2020 07:24:18 +0000 (09:24 +0200)]
[CMAKE] Make unattended bootcd configurable via cmake

Instead of messing around with a file in the source tree and risk commiting it

use cmake -DUNATTENDED_BOOTCD=yes to enable it, and use the UNATTENDED_BOOTCD_* cache variables to configure

3 years ago[CMAKE] Use an INTERFACE library to perform the msvcrt <-> msvcrtex binding
Jérôme Gardou [Thu, 22 Oct 2020 14:29:40 +0000 (16:29 +0200)]
[CMAKE] Use an INTERFACE library to perform the msvcrt <-> msvcrtex binding

3 years ago[APISETS] Declare them as modules instead of win32dll
Jérôme Gardou [Thu, 22 Oct 2020 13:15:46 +0000 (15:15 +0200)]
[APISETS] Declare them as modules instead of win32dll

3 years ago[CMAKE] Only link msvcrtex to win32cui, win32gui, win32dll, win32ocx and cpl modules
Jérôme Gardou [Thu, 22 Oct 2020 13:12:49 +0000 (15:12 +0200)]
[CMAKE] Only link msvcrtex to win32cui, win32gui, win32dll, win32ocx and cpl modules

3 years ago[CMAKE] Introduce the REACTOS_MODULE_TYPE target property
Jérôme Gardou [Thu, 22 Oct 2020 13:12:02 +0000 (15:12 +0200)]
[CMAKE] Introduce the REACTOS_MODULE_TYPE target property

And set it in set_module_type function

3 years ago[CRTDLL] Make this a stand-alone CRT DLL
Jérôme Gardou [Thu, 22 Oct 2020 10:25:19 +0000 (12:25 +0200)]
[CRTDLL] Make this a stand-alone CRT DLL

Because CRTs must be isolated from each other.
This basically reverts commit f0c91ae

3 years ago[DEVMGR] Avoid buffer overflow when device reg key size is > 100 chars
Victor Perevertkin [Thu, 22 Oct 2020 11:38:55 +0000 (14:38 +0300)]
[DEVMGR] Avoid buffer overflow when device reg key size is > 100 chars

3 years ago|CMAKE] Use ExternalProject for host-tools build
Jérôme Gardou [Thu, 22 Oct 2020 06:47:06 +0000 (08:47 +0200)]
|CMAKE] Use ExternalProject for host-tools build

3 years ago[APISETS] Revert 'Try to fix build of both case of MSVC AND CLANG'
Katayama Hirofumi MZ [Thu, 22 Oct 2020 00:18:32 +0000 (09:18 +0900)]
[APISETS] Revert 'Try to fix build of both case of MSVC AND CLANG'

3 years ago[APISETS] Try to fix build of both case of MSVC AND CLANG
Katayama Hirofumi MZ [Thu, 22 Oct 2020 00:07:15 +0000 (09:07 +0900)]
[APISETS] Try to fix build of both case of MSVC AND CLANG

3 years ago[INCLUDE] Use HeapAlloc/HeapFree in layout.h
Katayama Hirofumi MZ [Wed, 21 Oct 2020 23:07:32 +0000 (08:07 +0900)]
[INCLUDE] Use HeapAlloc/HeapFree in layout.h

CORE-17341

3 years ago[SHELL32] Resizable for SHBrowseForFolder (#3299)
Katayama Hirofumi MZ [Wed, 21 Oct 2020 13:25:16 +0000 (22:25 +0900)]
[SHELL32] Resizable for SHBrowseForFolder (#3299)

Make the dialog box of SHBrowseForFolder function resizable. CORE-17341

3 years ago[PARPORT] Fix I/O port length check
Victor Perevertkin [Wed, 21 Oct 2020 12:24:10 +0000 (15:24 +0300)]
[PARPORT] Fix I/O port length check
The Standard Parallel Port (SPP) has 3 registers, not 4: data, status, control
This fixes the driver on the Compaq N600c laptop

3 years ago[NTOSKRNL] Completely disable optimizations when using GDB
Jérôme Gardou [Wed, 21 Oct 2020 10:32:54 +0000 (12:32 +0200)]
[NTOSKRNL] Completely disable optimizations when using GDB

3 years agoApply suggestions from code review
Jérôme Gardou [Fri, 16 Oct 2020 13:57:20 +0000 (15:57 +0200)]
Apply suggestions from code review

Beautification and clarity

Co-authored-by: Victor Perevertkin <victor@perevertkin.ru>
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
3 years agoApply suggestions from code review
Jérôme Gardou [Fri, 16 Oct 2020 06:41:35 +0000 (08:41 +0200)]
Apply suggestions from code review

Style fixes

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Co-authored-by: Victor Perevertkin <victor@perevertkin.ru>
3 years ago[CMAKE] Get rid of add_compile_flags
Jérôme Gardou [Mon, 21 Sep 2020 10:16:02 +0000 (12:16 +0200)]
[CMAKE] Get rid of add_compile_flags

Use add_compile_options and the like instead

3 years ago[CMAKE] Get rid of replace_compiler_option macro
Jérôme Gardou [Fri, 18 Sep 2020 14:54:21 +0000 (16:54 +0200)]
[CMAKE] Get rid of replace_compiler_option macro

This is not used anymore

3 years ago[CMAKE] Use -ffile-prefix-map for GCC builds
Jérôme Gardou [Fri, 18 Sep 2020 14:19:46 +0000 (16:19 +0200)]
[CMAKE] Use -ffile-prefix-map for GCC builds

And also simplify the __RELFILE__ macro definition for the other cases

3 years ago[CMAKE] Get rid of add_compile_flags_language macro
Jérôme Gardou [Fri, 18 Sep 2020 14:18:24 +0000 (16:18 +0200)]
[CMAKE] Get rid of add_compile_flags_language macro

in favor of add_compile_options and the like with generator expressions
Also take this as an opportunity to remove the C++11 standard hack, GCC 8 now defaults to C++14

3 years ago[CMAKE] Get rid of replace_compile_flags
Jérôme Gardou [Fri, 18 Sep 2020 09:49:18 +0000 (11:49 +0200)]
[CMAKE] Get rid of replace_compile_flags

Introduce a finer-grained remove_target_compile_option instead

3 years ago[CMAKE] Get rid of replace_compile_flags_language macro
Jérôme Gardou [Fri, 18 Sep 2020 09:12:49 +0000 (11:12 +0200)]
[CMAKE] Get rid of replace_compile_flags_language macro

It was only used in the set_cpp macro

3 years ago[CMAKE] Introduce the atl_classes interface library
Jérôme Gardou [Fri, 18 Sep 2020 09:08:58 +0000 (11:08 +0200)]
[CMAKE] Introduce the atl_classes interface library

This takes care of adding the relvant include directory and the _ATL_NO_EXCEPTIONS define, if needed

3 years ago[CMAKE] Allow INTERFACE libraries for MSVC IDEs
Jérôme Gardou [Thu, 15 Oct 2020 09:47:03 +0000 (11:47 +0200)]
[CMAKE] Allow INTERFACE libraries for MSVC IDEs

3 years ago[CMAKE] Get rid of the set_cpp macro
Jérôme Gardou [Fri, 18 Sep 2020 07:34:18 +0000 (09:34 +0200)]
[CMAKE] Get rid of the set_cpp macro

Instead of messing with global variables and the like, we introduce two target properties:
 - WITH_CXX_EXCEPTIONS: if you want to use C++ exceptions
 - WITH_CXX_RTTI: if you need RTTI in your module
You can use the newly introduced set_target_cpp_properties function, with WITH_EXCEPTIONS and WITH_RTTI arguments
We also introduce two libraries :
 - cpprt: for C++ runtime routines
 - cppstl: for the C++ standard template library

NB: On GCC, this requires to create imported libraries with the related built-in libraries:libsupc++, limingwex, libstdc++

Finally, we manage the relevant flags with the ad-hoc generator expressions

So, if you don't need exceptions, nor RTTI, nor use any runtime at all: you simply have nothing else to do than add your C++ file to your module

3 years ago[CMAKE] CMakeParseArguments is not needed anymore, cmake_parse_arguments is a builtin...
Jérôme Gardou [Thu, 17 Sep 2020 08:05:02 +0000 (10:05 +0200)]
[CMAKE] CMakeParseArguments is not needed anymore, cmake_parse_arguments is a builtin since CMake 3.5

3 years agoRevert "[NTOS/MM] Initialize process Working set and start implementing adding entrie...
Jérôme Gardou [Tue, 20 Oct 2020 13:56:53 +0000 (15:56 +0200)]
Revert "[NTOS/MM] Initialize process Working set and start implementing adding entries to it"

This reverts commit 5abc016401a59dfb60944ea1fc8ea5ed27f7f087.
Not ready for prime time

3 years agoRevert "[NTOS/MM]
Jérôme Gardou [Tue, 20 Oct 2020 13:56:21 +0000 (15:56 +0200)]
Revert "[NTOS/MM]
     - Fix PFNs tracing
     - Add private pages to the process working set"

This reverts commit 4c5351bf55527a35bce09446420dd7296eedbe99.
Not ready for prime time

3 years ago[CMAKE] Add target-level dependency between ntdll_apitest and load_notifications
Jérôme Gardou [Tue, 20 Oct 2020 07:32:00 +0000 (09:32 +0200)]
[CMAKE] Add target-level dependency between ntdll_apitest and load_notifications

3 years ago[CMAKE] Use explicit path for "custom.dll" dependency
Jérôme Gardou [Tue, 20 Oct 2020 07:06:26 +0000 (09:06 +0200)]
[CMAKE] Use explicit path for "custom.dll" dependency

3 years ago[CMAKE] Fix generation of UTF-16 inf file
Jérôme Gardou [Tue, 20 Oct 2020 07:05:47 +0000 (09:05 +0200)]
[CMAKE] Fix generation of UTF-16 inf file

3 years ago[NTOS/MM]
Jérôme Gardou [Fri, 16 Oct 2020 13:27:07 +0000 (15:27 +0200)]
[NTOS/MM]
 - Fix PFNs tracing
 - Add private pages to the process working set

3 years ago[NTOS/MM] Initialize process Working set and start implementing adding entries to it
Jérôme Gardou [Thu, 15 Oct 2020 11:09:39 +0000 (13:09 +0200)]
[NTOS/MM] Initialize process Working set and start implementing adding entries to it

3 years ago[USETUP] Work around GCC's complaints (will be fixed properly later on).
Hermès Bélusca-Maïto [Mon, 19 Oct 2020 23:26:49 +0000 (01:26 +0200)]
[USETUP] Work around GCC's complaints (will be fixed properly later on).

3 years ago[USETUP][SETUPLIB] Continue hiding the FAT32 format in the format list, but take...
Hermès Bélusca-Maïto [Mon, 19 Oct 2020 21:49:26 +0000 (23:49 +0200)]
[USETUP][SETUPLIB] Continue hiding the FAT32 format in the format list, but take it into account anyway later on.

The formatter will select it anyway as soon as the partition size
permits it. We make it available internally however so as to "emulate"
FMIFS functionality.

Now rely on the partition filesystem for InstallVBRToPartition() instead
of the unreliable and deprecated partition type.

3 years ago[SETUPLIB] Code re-organization in bootsup.c and fsutil.c.
Hermès Bélusca-Maïto [Sat, 17 Oct 2020 18:29:47 +0000 (20:29 +0200)]
[SETUPLIB] Code re-organization in bootsup.c and fsutil.c.

- Move the actual VBR bootcode installation helpers into fsutil.c
  (they depend on the selected filesystem).

- Introduce InstallBootCodeToDisk() and InstallBootCodeToFile()
  and bootcode.c helpers, in order to replace the several functions
  that were duplicating the same code.

3 years ago[SETUPLIB] Move the filesystem recognition helpers to their own file.
Hermès Bélusca-Maïto [Sun, 11 Oct 2020 21:42:02 +0000 (23:42 +0200)]
[SETUPLIB] Move the filesystem recognition helpers to their own file.

3 years ago[FREELDR] Add variable for default text color 3301/head
Stanislav Motylkov [Fri, 16 Oct 2020 21:46:06 +0000 (00:46 +0300)]
[FREELDR] Add variable for default text color

On PC/AT-compatible machines it's Gray, and on NEC PC-98 series it's White.

3 years ago[FREELDR] Use BIOS font and accelerated text drawing on NEC PC-98
Stanislav Motylkov [Fri, 16 Oct 2020 21:32:38 +0000 (00:32 +0300)]
[FREELDR] Use BIOS font and accelerated text drawing on NEC PC-98

Both features are switchable via global variables.

3 years ago[NTOSKRNL] include/config.h: Sync it to current code (#3263)
Serge Gautherie [Sat, 17 Oct 2020 16:09:11 +0000 (18:09 +0200)]
[NTOSKRNL] include/config.h: Sync it to current code (#3263)

* SERIALIZE_DBGPRINT: Removed on c15e04c (r18078).
* ENABLE_VALIDATE_POOL: Removed on 5899e14 (r42249).
* TAG_STATISTICS_TRACKING: Removed on 5899e14 (r42249).
* POOL_DEBUG_APIS: Removed on 5899e14 (r42249).
* R_RZ: Removed on 7d21cf7 (r48999).
* R_STACK: Removed on 7d21cf7 (r48999).
* WHOLE_PAGE_ALLOCATIONS: Removed on b431563 (r17306).
+
* _GLOBAL_PAGES_ARE_AWESOME_: Move it here.