Synchronize with trunk revision 59636 (just before Alex's CreateProcess revamp).
[reactos.git] / ntoskrnl / ke / powerpc / main_asm.S
1 #include <ndk/asm.h>
2
3 #define AP_MAGIC (0x12481020)
4
5 .global P0BootStack
6 .global KiDoubleFaultStack
7 .global _kernel_stack
8 .global _kernel_stack_top
9 .global _kernel_trap_stack
10 .global _kernel_trap_stack_top
11
12 .section .bss
13 .align 12
14
15
16 /* guard page for the kernel stack */
17 .fill 4096, 1, 0
18
19 _kernel_stack:
20 .fill 3*4096, 1, 0
21 P0BootStack:
22 _kernel_stack_top:
23
24 /* guard page for the trap stack */
25 .fill 4096, 1, 0
26
27 _kernel_trap_stack:
28 .fill 3*4096, 1, 0
29 _kernel_trap_stack_top:
30
31 .fill 3*4096, 1, 0
32 KiDoubleFaultStack:
33
34 .text
35 .globl KiSystemStartup
36 .globl KiRosPrepareForSystemStartup
37 .globl DrawNumber
38
39 KiSystemStartup:
40 /*
41 * Set a normal MSR value
42 */
43 xor 0,0,0
44 ori 30,0,0x3030
45 mtmsr 30
46
47 /*
48 * Reserve space for the floating point save area.
49 */
50 addi 1,1,-SIZEOF_FX_SAVE_AREA
51
52 /* Bye bye asm land! */
53 mr 4,3
54
55 /* Load the initial kernel stack */
56 lis 1,_kernel_stack_top@ha
57 ori 1,1,_kernel_stack_top@l
58 addi 1,1,-SIZEOF_FX_SAVE_AREA
59
60 /* Call the main kernel initialization */
61 bl KiRosPrepareForSystemStartup
62
63 .global NtCurrentTeb
64 NtCurrentTeb:
65 mr 3,12
66 blr
67
68 .globl KeSynchronizeExecution
69
70 KeSynchronizeExecution:
71 blr
72
73 .globl PearPCDebug
74 PearPCDebug:
75 // .long 0x00333303
76 blr