xref: /haiku/src/system/boot/platform/u-boot/arch/ppc/shell.S (revision 23d878482ed22e55dad6d1fca1df7bea42eb157c)
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, 8(%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(gUImage):
54	.long   0
55SYMBOL_END(gUImage)
56SYMBOL(gUBootOS):
57//XXX: bug? Using .byte makes the next asm symbol
58// to be at the same address
59//	.byte	0
60	.long   0
61SYMBOL_END(gUBootOS)
62SYMBOL(gFDT):
63	.long   0
64SYMBOL_END(gFDT)
65
66