Subversion Repositories HelenOS-historic

Rev

Rev 1777 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1777 Rev 1784
Line 25... Line 25...
25
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
#
27
#
28
 
28
 
29
#include <arch/boot/boot.h>
29
#include <arch/boot/boot.h>
-
 
30
#include <arch/register.h>
30
 
31
 
31
.register %g2, #scratch
32
.register %g2, #scratch
32
.register %g3, #scratch
33
.register %g3, #scratch
33
.register %g6, #scratch
34
.register %g6, #scratch
34
.register %g7, #scratch
35
.register %g7, #scratch
35
 
36
 
36
.section K_TEXT_START, "ax"
37
.section K_TEXT_START, "ax"
37
 
38
 
38
/*
39
/*
39
 * Here is where the kernel is passed control.
40
 * Here is where the kernel is passed control.
40
 * The code must be position independent until
-
 
41
 * the kernel relocates itself to its VMA.
-
 
42
 */
41
 */
43
 
42
 
44
.global kernel_image_start
43
.global kernel_image_start
45
kernel_image_start:
44
kernel_image_start:
46
	flushw				! flush all but the active register window
45
	flushw				! flush all but the active register window
47
 
46
 
-
 
47
	rdpr %pstate, %l0
-
 
48
	and %l0, ~PSTATE_AM_BIT, %l0
-
 
49
	wrpr %l0, 0, %pstate
-
 
50
 
48
	set ofw, %l0
51
	set ofw_cif, %l0
49
 
52
 
50
	call ofw_init
53
	call ofw_init
51
	stx %o4, [%l0]
54
	stx %o4, [%l0]
52
 
55
 
53
	call ofw_init_memmap
56
	call ofw_init_memmap