2010-07-24 01:12:13 +00:00
|
|
|
/*
|
2015-10-04 11:54:25 +00:00
|
|
|
* FILE: ntoskrnl/ke/amd64/boot.S
|
2010-07-24 01:12:13 +00:00
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PURPOSE: FreeLDR Wrapper Bootstrap Code and Bootstrap Trampoline
|
2010-11-27 22:12:15 +00:00
|
|
|
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
|
2010-07-24 01:12:13 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES ******************************************************************/
|
|
|
|
|
2010-11-27 22:12:15 +00:00
|
|
|
#include <asm.inc>
|
|
|
|
#include <ksamd64.inc>
|
2010-07-24 01:12:13 +00:00
|
|
|
|
2011-09-15 19:32:13 +00:00
|
|
|
EXTERN KiSystemStartupBootStack:PROC
|
2010-07-24 01:12:13 +00:00
|
|
|
|
|
|
|
/* GLOBALS *******************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/* FUNCTIONS *****************************************************************/
|
|
|
|
|
|
|
|
.code64
|
|
|
|
|
|
|
|
/**
|
|
|
|
* VOID
|
2011-09-15 19:32:13 +00:00
|
|
|
* KiSwitchToBootStack(
|
|
|
|
* IN ULONG_PTR InitialStack<rcx>)
|
2010-07-24 01:12:13 +00:00
|
|
|
*/
|
2011-09-15 19:32:13 +00:00
|
|
|
PUBLIC KiSwitchToBootStack
|
|
|
|
.PROC KiSwitchToBootStack
|
2010-07-24 01:12:13 +00:00
|
|
|
|
|
|
|
/* Setup the new stack */
|
|
|
|
mov ax, HEX(18)
|
|
|
|
mov ss, ax
|
2011-09-15 19:32:13 +00:00
|
|
|
mov rsp, rcx
|
[NTOSKRNL/KE/AMD64]
- Fix stack alignment in KiSwitchToBootStack
- Handle ExceptionFrame == NULL in KeContextToTrapFrame and KeTrapFrameToContext
- Implement KiSwapContextInternal
- Fix KiSwapContext and KiThreadStartup
- Implement dispatching of user mode exceptions including in-paging of module data used by the kernel-debugger
- Implement KeInitializeInterrupt, KeConnectInterrupt, KeSynchronizeExecution
- Don't zero more than the actual PCR size in KiInitializePcr
- Add asm function KiInitializeSegments to initialize the segment selectors to proper values
- Initialize system call entrypoints in KiInitializeCpu
- Implement KiDpcInterruptHandler, KiIdleLoop, KiInitializeUserApc, KiSwapProcess, KiSystemCallHandler, KiInitializeContextThread, KiSwapContextResume
- Implement asm functions KiRetireDpcList, KiInterruptDispatch, KiSystemCallEntry64, KiZwSystemService
svn path=/trunk/; revision=55405
2012-02-04 11:32:13 +00:00
|
|
|
// Note: 8 bytes extra to compensate for the missing return address on
|
|
|
|
// the stack. On function entry the stack is unaligned by 8!!
|
|
|
|
sub rsp, HEX(308) // FIXME
|
2010-07-24 01:12:13 +00:00
|
|
|
.ENDPROLOG
|
|
|
|
|
2011-09-15 19:32:13 +00:00
|
|
|
jmp KiSystemStartupBootStack
|
2010-07-24 01:12:13 +00:00
|
|
|
|
2011-10-14 08:33:22 +00:00
|
|
|
.ENDP
|
2010-07-24 01:12:13 +00:00
|
|
|
|
|
|
|
END
|
|
|
|
|