Subversion Repositories HelenOS

Rev

Rev 1887 | Rev 1900 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1887 Rev 1899
Line 41... Line 41...
41
/*
41
/*
42
 * Here is where the kernel is passed control
42
 * Here is where the kernel is passed control
43
 * from the boot loader.
43
 * from the boot loader.
44
 * 
44
 * 
45
 * The registers are expected to be in this state:
45
 * The registers are expected to be in this state:
-
 
46
 * - %o0 non-zero for the bootstrup processor, zero for application/secondary processors
46
 * - %o0 bootinfo structure address
47
 * - %o1 bootinfo structure address
47
 * - %o1 bootinfo structure size
48
 * - %o2 bootinfo structure size
48
 *
49
 *
49
 * Moreover, we depend on boot having established the
50
 * Moreover, we depend on boot having established the
50
 * following environment:
51
 * following environment:
51
 * - TLBs are on
52
 * - TLBs are on
52
 * - identity mapping for the kernel image
53
 * - identity mapping for the kernel image
53
 * - identity mapping for memory stack
54
 * - identity mapping for memory stack
54
 */
55
 */
55
 
56
 
56
.global kernel_image_start
57
.global kernel_image_start
57
kernel_image_start:
58
kernel_image_start:
-
 
59
	brz %o0, kernel_image_start		! block secondary processors
-
 
60
	nop
58
 
61
 
59
	/*
62
	/*
60
	 * Setup basic runtime environment.
63
	 * Setup basic runtime environment.
61
	 */
64
	 */
62
 
65
 
Line 70... Line 73...
70
 
73
 
71
	/*
74
	/*
72
	 * Copy the bootinfo structure passed from the boot loader
75
	 * Copy the bootinfo structure passed from the boot loader
73
	 * to the kernel bootinfo structure.
76
	 * to the kernel bootinfo structure.
74
	 */
77
	 */
75
	mov %o1, %o2
-
 
76
	mov %o0, %o1
-
 
77
	sethi %hi(bootinfo), %o0
78
	sethi %hi(bootinfo), %o0
78
	call memcpy
79
	call memcpy
79
	or %o0, %lo(bootinfo), %o0
80
	or %o0, %lo(bootinfo), %o0
80
 
81
 
81
	/*
82
	/*