2 * $FreeBSD: src/sys/boot/alpha/libalpha/start.S,v 1.6.2.2 2001/03/04 05:23:01 obrien Exp $
3 * From: $NetBSD: start.S,v 1.4 1998/03/28 00:54:15 cgd Exp $
7 * Mach Operating System
8 * Copyright (c) 1992 Carnegie Mellon University
11 * Permission to use, copy, modify and distribute this software and its
12 * documentation is hereby granted, provided that both the copyright
13 * notice and this permission notice appear in all copies of the
14 * software, derivative works or modified versions, and any portions
15 * thereof, and that both notices appear in supporting documentation.
17 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
18 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
19 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
21 * Carnegie Mellon requests users of this software to return to
23 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
24 * School of Computer Science
25 * Carnegie Mellon University
26 * Pittsburgh PA 15213-3890
28 * any improvements or extensions that they make and grant Carnegie Mellon
29 * the rights to redistribute these changes.
32 #include <machine/asm.h>
36 * Entry point for boot/standalone programs.
39 * a0 long (first free physical page)
41 * This is where the prom comes to. Leaves all exception and interrupts
42 * to prom, runs off prom's stack too. No return values.
45 .set noreorder /* don't reorder instructions */
47 #define ENTRY_FRAME 32
48 #define STACK_SIZE 12288
50 NESTED(start, 1, ENTRY_FRAME, ra, 0, 0)
65 lda sp,stackbase + STACK_SIZE - ENTRY_FRAME
68 CALL(main) /* transfer to C */
72 call_pal PAL_halt /* halt if we ever return */
76 * Dummy routine for GCC2.
84 * Return the cpu number, using the whami instruction.
87 call_pal PAL_VMS_mfpr_whami
92 BSS(stackbase, STACK_SIZE)