1//#include <arch/ppc/arch_cpu.h>
2
3#include <asm_defs.h>
4
5
6	.text
7
8/*
9 * Entry points to the loader that U-Boot passes control to.
10 */
11
12/*
13 * called as Linux kernel entry
14 * *MUST* be first symbol
15 */
16SYMBOL(_start_linux):
17/*
18 * ELF entry
19 */
20SYMBOL(_start):
21
22	li	%r11, 0
23	b	_start_common
24
25SYMBOL_END(_start_linux)
26SYMBOL_END(_start)
27
28
29
30
31
32SYMBOL(_start_common):
33
34	lis		%r12, gUBootGlobalData@ha
35	ori		%r12, %r12, gUBootGlobalData@l
36	stw		%r2, 0(%r12)
37	stw		%r11, gUBootOS-gUBootGlobalData(%r12)	// gUBootOS
38
39	b		start_linux_ppc_fdt
40
41	// return
42	blr
43SYMBOL_END(_start_common)
44
45
46//XXX: doesn't seem to work
47//.data
48
49
50SYMBOL(gUBootGlobalData):
51	.long   0
52SYMBOL_END(gUBootGlobalData)
53SYMBOL(gUBootOS):
54//XXX: bug? Using .byte makes the next asm symbol
55// to be at the same address
56//	.byte	0
57	.long   0
58SYMBOL_END(gUBootOS)
59
60