- Kernel's entry point is called KiSystemStartup, not NtProcessStartup (now it's...
[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 KiSystemStartup
37 .globl KiRosPrepareForSystemStartup
38 .globl DrawNumber
39
40 KiSystemStartup:
41 /*
42 * Set a normal MSR value
43 */
44 xor 0,0,0
45 ori 30,0,0x3030
46 mtmsr 30
47
48 /*
49 * Reserve space for the floating point save area.
50 */
51 addi 1,1,-SIZEOF_FX_SAVE_AREA
52
53 /* Bye bye asm land! */
54 mr 4,3
55
56 /* Load the initial kernel stack */
57 lis 1,_kernel_stack_top@ha
58 ori 1,1,_kernel_stack_top@l
59 addi 1,1,-SIZEOF_FX_SAVE_AREA
60
61 /* Call the main kernel initialization */
62 bl KiRosPrepareForSystemStartup
63
64 .global NtCurrentTeb
65 NtCurrentTeb:
66 mr 3,12
67 blr
68
69 .globl KeSynchronizeExecution
70
71 KeSynchronizeExecution:
72 blr
73
74 .globl PearPCDebug
75 PearPCDebug:
76 // .long 0x00333303
77 blr