Commit graph

8 commits

Author SHA1 Message Date
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