Commit graph

78855 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto d829bcc629
[WINDOWSCODECS] It turns out that /wd4133 is not enough to demote the error; we need to use remove_target_compile_option() to completely remove the /we4133 flag.
Addendum to commits 7e116f0e and 00ed72d7.

This removes the "error C4133: 'function': incompatible types - from
'WICPixelFormatNumericRepresentation *' to 'DWORD *'"
message that still remains even when using /wd4133 .
2020-11-06 01:06:13 +01:00
Hermès Bélusca-Maïto ce2c1f6321
[RAPPS.COM] Use HeapAlloc/Free instead of the deprecated LocalAlloc/Free.
And fix my build.
2020-11-06 01:06:12 +01:00
Hermès Bélusca-Maïto ce55fef1e5
[NTOS:EX] Move the C_ASSERT UUID_CACHED_VALUES_STRUCT.GuidInit to a better place, where the structure is defined. 2020-11-06 01:06:12 +01:00
Hermès Bélusca-Maïto 3c722e35b1
[CMD][SERVMAN][SHELL32][WINSPOOL][ROSAPPS][NTOS:PNP] Fix my build. 2020-11-06 01:06:11 +01:00
Hermès Bélusca-Maïto ec0853ba70
[SERVMAN] Fix trailing whitespace. 2020-11-06 01:06:10 +01:00
Hermès Bélusca-Maïto f1a4a6e704
[USETUP] Introduce two helpers for formatting displayed disk and partition sizes in order to reduce code duplication. 2020-11-04 23:26:54 +01:00
Hermès Bélusca-Maïto 13dd01b44c
[USETUP] Use pointers to const strings where meaningful. 2020-11-04 23:26:53 +01:00
Dmitry Borisov 4dc3125450
[PC98VID] Fix build for PC-98 target (#3352)
- Some prototypes are not needed anymore.

Addendum to 5c7ce4475e.
2020-11-05 00:26:37 +03:00
Mark Jansen cf869e3444
[DNSAPI_APITEST] Fix null-reference in case of failure 2020-11-04 21:13:42 +01:00
Hermès Bélusca-Maïto 4792c007aa
[FREELDR] Add the possibility to change the boot load options from TXTSETUP.SIF
at runtime from the boot selection menu or from FREELDR.INI.

CORE-17350, CORE-9023

For a proper override of the options by new user options, specify the
/SIFOPTIONSOVERRIDE switch in addition. Otherwise, user options are
merged with those retrieved from TXTSETUP.SIF, with priority given to
the former ones.

- Update the documentation for the 'ReactOSSetup' OS type in the
  FREELDR.INI file template.

- Use a different prompt in the custom boot options editor for the
  'ReactOSSetup' OS type, with adequate explanation.

- Get rid of the ReactOS-specific TXTSETUP.SIF 'DbgOsLoadOptions' value,
  and use instead the Windows-compatible 'SetupDebugOptions' value that
  is added to the other load options when debugging is to be enabled.
2020-11-04 19:59:28 +01:00
Hermès Bélusca-Maïto d45b268127
[FREELDR] Fix x64 compilation warning (addendum to commit d887308b). 2020-11-04 19:59:27 +01:00
Victor Perevertkin 7c734db034
[WDF] Enable Resource and Interrupt APIs 2020-11-04 19:34:14 +03:00
Victor Perevertkin ae72f18b55
[UNIATA] Add an inf file for UniATA Management Port 2020-11-03 23:23:35 +03:00
Victor Perevertkin 48b3c61b5d
[HDAUDBUS] Add a timeout into HDA_SendVerbs
This function may stuck during device installation if there are issues
with interrupts (or with a device itself).

This fixes the boot on my testing ThinkPad x60s
2020-11-03 23:18:14 +03:00
Victor Perevertkin da4ee18cc9
[STORPROP][CDROM_NEW][DISK_NEW] Improve disk and cdrom device installation
- Take a proper inf file for disk.sys
- Add class information into cdrom.inf
- Make a correct stub for storprop!DvdClassInstaller
2020-11-03 23:12:40 +03:00
Hermès Bélusca-Maïto d887308b2f
[FREELDR] Parse NT kernel load options in a consistent manner.
- Introduce a set of NtLdrGet(Next)Option(Ex) helpers that allow
  retrieving respectively, the "next" option in an options string,
  and retrieving a given named option in such an options string,
  by correctly parsing that string.

  Valid syntaxes:
      /OPTION1 /OPTION2/OPTION3 OPTION4 /OPTION5(=...) ...

  Options separators are slashes, or whitespace (space, tab), mandatory
  if no slash is used, and otherwise optional.

- Use these functions wherever NT load options are being parsed.

- Simplify the parsing of /DEBUGPORT=... using these functions.

- When parsing the /HAL=... or /KERNEL=... options, only the first
  encountered one is taken into account, any other ones are discarded.

- When parsing the other load options, only their first occurrences are
  taken into account, any other repetitions are discarded.
  * The NOPAE option overrides any previous PAE option.
  * Any NOEXECUTE(=) option should override any previous
    NOEXECUTE=ALWAYSOFF (or equivalently, EXECUTE) option.
2020-11-03 01:52:47 +01:00
Hermès Bélusca-Maïto d8547a8f20
[FREELDR] In LoadReactOSSetup(), verify that our BootType is really ReactOSSetup. 2020-11-03 01:52:47 +01:00
Hermès Bélusca-Maïto 3033580c1a
[FREELDR] Minor code formatting / renaming some variables. 2020-11-03 01:52:46 +01:00
Hermès Bélusca-Maïto 04b4e3b05d
[FREELDR] Fix the parameter type of WinLdrSetupEms()
It's a NULL-terminated string. And thus avoid an unelegant cast.
2020-11-03 01:52:36 +01:00
Hermès Bélusca-Maïto 58866a112a
[FREELDR] Remove the 'Setup' parameter of the LoadAndBootWindowsCommon() function.
This parameter is not needed since it's possible to determine, from
within this function, whether or not we are in Setup mode, by just
looking for the presence of a non NULL LoaderBlock->SetupLdrBlock.
2020-11-03 01:51:48 +01:00
Hermès Bélusca-Maïto 64ca7f6427
[FREELDR] Remove trailing whitespace. 2020-11-03 01:51:47 +01:00
Victor Perevertkin 1f377076d7
[WDF] Fix KMDF so it can compile with ReactOS SDK
Not all files are included, but these are necessary to compile cdrom driver.
So far it can only be statically linked with drivers, a proper
implementation requires wdfldr helper driver
2020-11-03 00:06:27 +03:00
Victor Perevertkin 8a978a179f
[WDF] Add Windows Driver Framework files
Takern from Microsoft GitHub repo:
d9c6040fe9

Licensed under MIT
2020-11-03 00:06:26 +03:00
Victor Perevertkin 545df81502
[KMDF] Make KMDF headers compatible with our SDK and compilers 2020-11-03 00:06:25 +03:00
Victor Perevertkin 40462c924e
[KMDF] Add Kernel-Mode Driver Framework headers v1.17
Taken from Microsoft GitHub repo:
d9c6040fe9

Licensed under MIT
2020-11-02 22:07:15 +03:00
Victor Perevertkin 5c7ce4475e
[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
2020-11-02 21:45:31 +03:00
Victor Perevertkin 658f742c2d
[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
2020-11-02 21:27:06 +03:00
Victor Perevertkin ba447018c8
[MOUNTMGR] Move the driver to drivers/storage
Effectively mountmgr.sys is an essential part of the storage stack
2020-11-01 12:35:56 +03:00
Timo Kreuzer 2c791cdde7 [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.
2020-11-01 09:33:14 +01:00
Timo Kreuzer d685dcee9b [CMAKE] Rename def files for import libraries on MSVC builds to *_implib.de like on GCC 2020-11-01 09:33:14 +01:00
Timo Kreuzer 935280bf14 [CRT_APITEST] Add test for atexit 2020-11-01 09:33:14 +01:00
Timo Kreuzer 17fa04f10b [NTOS:MM:X64] Fix MM_WAIT_ENTRY on x64 2020-11-01 09:32:27 +01:00
Timo Kreuzer d4b4cf7448 [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.
2020-11-01 09:32:27 +01:00
Timo Kreuzer d55811f160 [NTOS:MM:X64] Fix session space initialization on x64 2020-11-01 09:32:27 +01:00
Timo Kreuzer 9095dbf5a5 [NTOS:MM:X64] Implement MmCreatePageFileMapping and MmDeletePageFileMapping 2020-11-01 09:32:27 +01:00
Timo Kreuzer 8980850d56 [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.
2020-11-01 09:32:27 +01:00
Timo Kreuzer 0726cfce10 [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.
2020-11-01 09:32:27 +01:00
Timo Kreuzer 48d1bd2c88 [NTOS:MM:X64] On x64 allocate a VAD for the shared user page 2020-11-01 09:32:27 +01:00
Timo Kreuzer a5d47ff72b [NTOS:MM:X64] On x64 reserve the address range between FFFF800000000000 and FFFFF68000000000 in MiInitSystemMemoryAreas() 2020-11-01 09:32:27 +01:00
Timo Kreuzer a8ba58fbb0 [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
2020-11-01 09:32:27 +01:00
Serge Gautherie 81be201d98
[NTOS:CC] CcMdl*Complete(): Return if FastIO succeeded (#3303)
CORE-17342
2020-10-31 15:18:02 +01:00
Timo Kreuzer cef57d3c44 [GDI32] Fix up GdiFixUpHandle 2020-10-31 14:24:09 +01:00
Timo Kreuzer 4048935988 [GDI32_APITEST] Add tests for truncated and extended handle to GetObject test 2020-10-31 14:24:09 +01:00
Timo Kreuzer bdd4d5d8d8 [NTOS:KE:X64] Set the exception frame as well in KiInitializeContextThread 2020-10-31 14:23:16 +01:00
Timo Kreuzer f66a7e2e48 [NTOS:KE:X64] Zero out the context in KiDispatchException 2020-10-31 14:23:16 +01:00
Timo Kreuzer 637183a12c [NTOS:KE:X64] Handle pending user APC on syscall exit (should be done on trap exit, too) 2020-10-31 14:23:16 +01:00
Timo Kreuzer 2a8c680dbe [NTOS:KE:X64][NTDLL:X64] Implement KiUserExceptionDispatcher and fix KiDispatchExceptionToUser 2020-10-31 14:23:16 +01:00
Timo Kreuzer 1bfacf06f7 [NTOS:KE:X64] Zero out volatiles when returning from a system call 2020-10-31 14:23:16 +01:00
Timo Kreuzer a016ccd117 [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)
2020-10-31 14:23:16 +01:00
Timo Kreuzer fdc1261fb7 [NTOS:KE:X64][NTDLL:X64] Implement x64 version of user callback code 2020-10-31 14:23:16 +01:00