1*52132Smckusick/* 2*52132Smckusick * Copyright (c) 1992 Regents of the University of California. 3*52132Smckusick * All rights reserved. 4*52132Smckusick * 5*52132Smckusick * This code is derived from software contributed to Berkeley by 6*52132Smckusick * Ralph Campbell. 7*52132Smckusick * 8*52132Smckusick * %sccs.include.redist.c% 9*52132Smckusick * 10*52132Smckusick * @(#)start.s 7.1 (Berkeley) 01/07/92 11*52132Smckusick * 12*52132Smckusick * start.s - 13*52132Smckusick * 14*52132Smckusick * Contains code that is the first executed at boot time. 15*52132Smckusick * 16*52132Smckusick * Copyright (C) 1989 Digital Equipment Corporation. 17*52132Smckusick * Permission to use, copy, modify, and distribute this software and 18*52132Smckusick * its documentation for any purpose and without fee is hereby granted, 19*52132Smckusick * provided that the above copyright notice appears in all copies. 20*52132Smckusick * Digital Equipment Corporation makes no representations about the 21*52132Smckusick * suitability of this software for any purpose. It is provided "as is" 22*52132Smckusick * without express or implied warranty. 23*52132Smckusick * 24*52132Smckusick * from: $Header: /sprite/src/boot/decprom/ds3100.md/RCS/start.s, 25*52132Smckusick * v 1.1 90/02/16 16:19:39 shirriff Exp $ SPRITE (DECWRL) 26*52132Smckusick */ 27*52132Smckusick 28*52132Smckusick#include <regdef.h> 29*52132Smckusick#include "../include/machConst.h" 30*52132Smckusick 31*52132Smckusick/* 32*52132Smckusick * Amount to take off of the stack for the benefit of the debugger. 33*52132Smckusick */ 34*52132Smckusick#define START_FRAME ((4 * 4) + 4 + 4) 35*52132Smckusick#define Init 0xbfc00018 36*52132Smckusick 37*52132Smckusick .globl start 38*52132Smckusickstart: 39*52132Smckusick .set noreorder 40*52132Smckusick mtc0 zero, MACH_COP_0_STATUS_REG # Disable interrupts 41*52132Smckusick li sp, MACH_CODE_START - START_FRAME 42*52132Smckusick la gp, _gp 43*52132Smckusick sw zero, START_FRAME - 4(sp) # Zero out old ra for debugger 44*52132Smckusick sw zero, START_FRAME - 8(sp) # Zero out old fp for debugger 45*52132Smckusick jal main # main(argc, argv, envp) 46*52132Smckusick nop 47*52132Smckusick li a0, Init # done, so call prom 48*52132Smckusick j a0 49*52132Smckusick 50*52132Smckusick .globl Boot_Transfer 51*52132SmckusickBoot_Transfer: 52*52132Smckusick mtc0 zero, MACH_COP_0_STATUS_REG # Disable interrupts 53*52132Smckusick li sp, MACH_CODE_START - START_FRAME 54*52132Smckusick la gp, _gp 55*52132Smckusick sw zero, START_FRAME - 4(sp) # Zero out old ra for debugger 56*52132Smckusick sw zero, START_FRAME - 8(sp) # Zero out old fp for debugger 57*52132Smckusick jal a3 # Jump to routine 58*52132Smckusick nop 59