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