2 * From: $NetBSD: start.S,v 1.4 1998/03/28 00:54:15 cgd Exp $
3 * $FreeBSD: src/sys/boot/alpha/libalpha/start.S,v 1.9 2001/03/04 04:38:14 obrien Exp $
4 * $DragonFly: src/sys/boot/alpha/libalpha/Attic/start.S,v 1.3 2003/11/10 06:08:30 dillon Exp $
8 * Mach Operating System
9 * Copyright (c) 1992 Carnegie Mellon University
10 * All Rights Reserved.
12 * Permission to use, copy, modify and distribute this software and its
13 * documentation is hereby granted, provided that both the copyright
14 * notice and this permission notice appear in all copies of the
15 * software, derivative works or modified versions, and any portions
16 * thereof, and that both notices appear in supporting documentation.
18 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
19 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
20 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
22 * Carnegie Mellon requests users of this software to return to
24 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
25 * School of Computer Science
26 * Carnegie Mellon University
27 * Pittsburgh PA 15213-3890
29 * any improvements or extensions that they make and grant Carnegie Mellon
30 * the rights to redistribute these changes.
33 #include <machine/asm.h>
37 * Entry point for boot/standalone programs.
40 * a0 long (first free physical page)
42 * This is where the prom comes to. Leaves all exception and interrupts
43 * to prom, runs off prom's stack too. No return values.
46 .set noreorder /* don't reorder instructions */
48 #define ENTRY_FRAME 32
49 #define STACK_SIZE 12288
51 NESTED(start, 1, ENTRY_FRAME, ra, 0, 0)
66 lda sp,stackbase + STACK_SIZE - ENTRY_FRAME
69 CALL(main) /* transfer to C */
73 call_pal PAL_halt /* halt if we ever return */
77 * Dummy routine for GCC2.
85 * Return the cpu number, using the whami instruction.
88 call_pal PAL_VMS_mfpr_whami
93 BSS(stackbase, STACK_SIZE)