Commit graph

15 commits

Author SHA1 Message Date
Timo Kreuzer 71fefa32db
[NDK][NTOS] Add global definition of INIT_FUNCTION/INIT_SECTION (#779)
* Add an NDK header to define INIT_FUNCTION/INIT_SECTION globally
* Use _declspec(allocate(x)) and _declspec(code_seg(x)) on MSVC versions that support it
* Use INIT_FUNCTION on functions only and INIT_SECTION on data only (required by MSVC)
* Place INIT_FUNCTION before the return type (required by MSVC)
* Make sure declarations and implementations share the same modifiers (required by MSVC)
* Add a global linker option to suppress warnings about defined but unused INIT section
* Merge INIT section into .text in freeldr
2018-12-30 12:19:11 +01:00
Denis Malikov 0cf5efc14c [NTOS:KE] Fix stub for KeAcquireInStackQueuedSpinLockForDpc (#814)
Error was found when building as 0x600+.
CORE-12596
2018-08-26 15:19:26 +02:00
Timo Kreuzer de1b195837 [NDK] Fix the type of KPROCESS::ActiveProcessors
Also fix related logic in KiSwapProcess
2018-07-01 14:45:21 +02:00
Pierre Schweitzer f15afdbc43
[NTOSKRNL] Implement KeQueryValuesProcess().
And make use of it.
2018-05-25 21:40:39 +02:00
Jason Johnson 054c11a02c Correctly bugcheck if we aren't returning a usermode thread (#506)
Cause a corresponding bug check to occur for the reason of the user context flag being zero (a system thread), instead of using DbgBreakPoint.
2018-04-24 23:07:02 +01:00
Thomas Faber 6b78ff036f
[NTOS:KE] Don't loop indefinitely trying to figure out the CPU frequency. CORE-14419
Previously, we would keep sampling the CPU frequency until two subsequent
samples differed by at most 1 MHz. This could take several seconds, and would
unnecessarily delay boot.
Instead, if sampling is too unreliable, just give up and calculate the average
frequency from 10 samples. This is no worse than picking the frequency that
just happened to be returned twice in a row.

The fact that this method of sampling fails could indicate that there's a
problem with our performance counter implementation or timer interrupt,
but that's a separate issue...
2018-03-01 14:26:44 +01:00
Pierre Schweitzer e26e4445b3
[NTOSKRNL] Revert 6ece4e9fc2 for third tools compatibility 2018-02-08 11:50:45 +01:00
Serge Gautherie 6ece4e9fc2 [NTOS:KE] Replace "Fatal System Error" with "BugCheck" 2018-02-07 22:22:28 +01:00
Timo Kreuzer 3021c2d571 [NTOS:MM] Pass page fault code to MmAccessFault
Note: before we had a BOOLEAN parameter called StoreInstruction, but in reality it was not specifying whether the fault was from a store store instruction, but whether it was an access violation rather than a page-not-present fault. On x86 without PAE there are only 2 kinds of access violations: (1) Access of a kernel mode page from user mode, which is handled early and (2) access of a read-only (or COW) page with a writing instruction. Therefore we could get away with this, even though it relied on the wrong assumption that a fault, which was not a page-not-present-fault, was automatically a write access. This commit only changes one thing: we pass the full fault-code to MmAccessFault and handle the rest from there in exactly the same way as before. More changes are coming to make things clear.
2018-01-06 18:20:24 +01:00
Timo Kreuzer c4d6c2c3f1 [NTOS:KE] Fix pushing of fake error code in KiDoubleFaultAbort (amd64) 2018-01-01 12:09:38 +01:00
Timo Kreuzer a2f7de7ee8
Amd64/misc 64bit fixes (#236)
[REACTOS] Misc 64 bit fixes

* [NTOS:MM] Allow MEM_DOS_LIM in NtMapViewOfSection on x64 as well
* [NTOS:MM] Implement x64 version of MmIsDisabledPage
* [HAL] Remove obsolete code
* [NTOS:KE] Fix amd64 version of KeContextToTrapFrame and KeTrapFrameToContext
* [XDK] Fix CONTEXT_XSTATE definition
* [PCNET] Convert physical address types from pointers to PHYSICAL_ADDRESS
2018-01-01 12:07:50 +01:00
Ivan Labutin ede3f4d449 [NTOS:KE] Improve readability of CPU flag checks and fix error checking wrong register for HT support 2017-12-20 06:56:09 +01:00
Ivan Labutin 1aa70ef6d1 [NTOS:KE] Move RtlpUse16ByteSLists initialization into KiInitializeKernel 2017-12-20 06:56:09 +01:00
Amine Khaldi 631a14ff64 [ASM][NDK][NTOS] Rename Self to SelfPcr in the KIPCR structure. 2017-12-13 13:49:00 +01:00
Colin Finck c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00