Commit graph

14 commits

Author SHA1 Message Date
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
Timo Kreuzer 2aca4b2795 [ASM] Fix boot with VS 16.7.3 / MSVC 19.27
See https://developercommunity.visualstudio.com/content/problem/1180800/ml-x86-assume-directive-causes-invalid-code-genera.html
2020-09-12 15:01:04 +02:00
Dmitry Borisov b36018ff26
[HALPC98] Add Hardware Abstraction Layer for NEC PC-98 series (#3002) 2020-07-25 15:31:02 +02:00
Colin Finck db7ee3a756
[HAL] Remove duplicated IRQL mask tables
With the minimum Visual Studio version now being 2015, we no longer need to maintain two variants of the same code, and can stick to the commented and better understandable version.
2020-05-15 23:46:22 +02:00
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
Serge Gautherie e01f935f0e
[HALX86] Fix a Clang-Cl warning about KiUnexpectedInterrupt
"warning: cast between incompatible calling conventions 'cdecl' and 'fastcall'; calls through this pointer may abort at runtime [-Wcast-calling-convention]"

CORE-14306
2018-06-13 10:48:55 +02:00
Thomas Faber fc9bc9390d
[HAL] Reset the stack pointer to the stack frame when calling second-entry interrupt handlers. CORE-14449
Because we can encounter pending interrupts repeatedly,
HalpEndSoftwareInterrupt and HalEndSystemInterrupt already clean up the stack
space for their arguments (done for CORE-11123/CORE-14076).
However these functions are called from C functions such as KiInterruptDispatch
and HalpDispatchInterrupt2[ndEntry]. These callers also use up stack space,
and it is unknown how much.
To fix this, we simply reset the stack pointer to the location of the trap
frame, which is where it points during a first-level dispatch. This cleans
up the stack usage of any callers higher up, and is okay because a return
will happen through the trap frame anyway.

Dedicated to Pierre.
2018-04-13 09:04:52 +02:00
Thomas Faber 888ace4397
[HAL] Eliminate tail calls from HalpHardwareInterruptLevel. CORE-14076 2018-02-18 13:06:44 +01:00
Thomas Faber b4453242f7
[HAL] Eliminate tail calls from HalpDispatchInterrupt[2]. CORE-14076 2018-02-18 13:06:42 +01:00
Thomas Faber ade345427f
[HAL] Eliminate tail calls from HalEndSystemInterrupt. CORE-14076 2018-02-18 13:06:41 +01:00
Thomas Faber 7a9474a6bb
[HAL] Create a macro for the HalpEndSoftwareInterrupt to allow reuse. CORE-14076 2018-02-18 13:06:39 +01:00
Thomas Faber 040d78354e
[HAL] Convert HalpEndSoftwareInterrupt2 to fastcall. CORE-14076 2018-02-18 13:06:37 +01:00
Colin Finck 361b6e39e3
[HALX86] Deduplicate initialization of legacy PICs and remove EOI in I/O APIC initialization, which causes an unexpected interrupt 2017-12-17 09:51:37 +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