[USER32] Load IMM table (#3215)
[reactos.git] / ntoskrnl / ke / amd64 / boot.S
1 /*
2 * FILE: ntoskrnl/ke/amd64/boot.S
3 * COPYRIGHT: See COPYING in the top level directory
4 * PURPOSE: FreeLDR Wrapper Bootstrap Code and Bootstrap Trampoline
5 * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
6 */
7
8 /* INCLUDES ******************************************************************/
9
10 #include <asm.inc>
11 #include <ksamd64.inc>
12
13 EXTERN KiSystemStartupBootStack:PROC
14
15 /* GLOBALS *******************************************************************/
16
17
18 /* FUNCTIONS *****************************************************************/
19
20 .code64
21
22 /**
23 * VOID
24 * KiSwitchToBootStack(
25 * IN ULONG_PTR InitialStack<rcx>)
26 */
27 PUBLIC KiSwitchToBootStack
28 .PROC KiSwitchToBootStack
29
30 /* Setup the new stack */
31 mov ax, HEX(18)
32 mov ss, ax
33 mov rsp, rcx
34 // Note: 8 bytes extra to compensate for the missing return address on
35 // the stack. On function entry the stack is unaligned by 8!!
36 sub rsp, HEX(308) // FIXME
37 .ENDPROLOG
38
39 jmp KiSystemStartupBootStack
40
41 .ENDP
42
43 END
44