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