Annotation of sys/arch/alpha/stand/start.S, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: start.S,v 1.5 2005/08/29 11:20:55 mickey Exp $ */
! 2: /* $NetBSD: start.S,v 1.4 1996/10/17 02:50:40 cgd Exp $ */
! 3:
! 4: /*
! 5: * Mach Operating System
! 6: * Copyright (c) 1992 Carnegie Mellon University
! 7: * All Rights Reserved.
! 8: *
! 9: * Permission to use, copy, modify and distribute this software and its
! 10: * documentation is hereby granted, provided that both the copyright
! 11: * notice and this permission notice appear in all copies of the
! 12: * software, derivative works or modified versions, and any portions
! 13: * thereof, and that both notices appear in supporting documentation.
! 14: *
! 15: * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
! 16: * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
! 17: * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
! 18: *
! 19: * Carnegie Mellon requests users of this software to return to
! 20: *
! 21: * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
! 22: * School of Computer Science
! 23: * Carnegie Mellon University
! 24: * Pittsburgh PA 15213-3890
! 25: *
! 26: * any improvements or extensions that they make and grant Carnegie Mellon
! 27: * the rights to redistribute these changes.
! 28: */
! 29:
! 30: #include "include/asm.h"
! 31:
! 32: /*
! 33: * start --
! 34: * Entry point for boot/standalone programs.
! 35: *
! 36: * Arguments:
! 37: * a0 long (first free physical page)
! 38: *
! 39: * This is where the prom comes to. Leaves all exception and interrupts
! 40: * to prom, runs off prom's stack too. No return values.
! 41: */
! 42: .text
! 43: .set noreorder /* don't reorder instructions */
! 44:
! 45: #define ENTRY_FRAME 32
! 46:
! 47: NESTED(start, 1, ENTRY_FRAME, ra, 0, 0)
! 48: br pv,Lstartgp
! 49: Lstartgp:
! 50: LDGP(pv)
! 51:
! 52: lda sp,start
! 53: #ifdef PRIMARY_BOOTBLOCK
! 54: lda sp,0x30000-ENTRY_FRAME(sp)
! 55: #else
! 56: lda sp,-ENTRY_FRAME(sp) /* start stack below text */
! 57: #endif
! 58:
! 59: lda a0,_edata
! 60: lda a1,_end
! 61: subq a1,a0,a1
! 62: CALL(bzero)
! 63:
! 64: CALL(main) /* transfer to C */
! 65:
! 66: XLEAF(_rtt, 0)
! 67: XLEAF(halt, 0)
! 68: call_pal PAL_halt /* halt if we ever return */
! 69: END(start)
! 70:
! 71: /*
! 72: * Dummy routine for GCC2.
! 73: */
! 74: LEAF(__main,0)
! 75: RET
! 76: END(__main)
! 77:
! 78: /*
! 79: * cpu_number
! 80: * Return the cpu number, using the whami instruction.
! 81: */
! 82: LEAF(cpu_number, 0)
! 83: call_pal PAL_VMS_mfpr_whami
! 84: RET
! 85: END(cpu_number)
CVSweb