1*e7cbe64fSgw25295/* 2*e7cbe64fSgw25295 * CDDL HEADER START 3*e7cbe64fSgw25295 * 4*e7cbe64fSgw25295 * The contents of this file are subject to the terms of the 5*e7cbe64fSgw25295 * Common Development and Distribution License (the "License"). 6*e7cbe64fSgw25295 * You may not use this file except in compliance with the License. 7*e7cbe64fSgw25295 * 8*e7cbe64fSgw25295 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*e7cbe64fSgw25295 * or http://www.opensolaris.org/os/licensing. 10*e7cbe64fSgw25295 * See the License for the specific language governing permissions 11*e7cbe64fSgw25295 * and limitations under the License. 12*e7cbe64fSgw25295 * 13*e7cbe64fSgw25295 * When distributing Covered Code, include this CDDL HEADER in each 14*e7cbe64fSgw25295 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*e7cbe64fSgw25295 * If applicable, add the following below this CDDL HEADER, with the 16*e7cbe64fSgw25295 * fields enclosed by brackets "[]" replaced with your own identifying 17*e7cbe64fSgw25295 * information: Portions Copyright [yyyy] [name of copyright owner] 18*e7cbe64fSgw25295 * 19*e7cbe64fSgw25295 * CDDL HEADER END 20*e7cbe64fSgw25295 */ 21*e7cbe64fSgw25295/* 22*e7cbe64fSgw25295 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23*e7cbe64fSgw25295 * Use is subject to license terms. 24*e7cbe64fSgw25295 */ 25*e7cbe64fSgw25295 26*e7cbe64fSgw25295#ident "%Z%%M% %I% %E% SMI" 27*e7cbe64fSgw25295 28*e7cbe64fSgw25295/* 29*e7cbe64fSgw25295 * srt0.s - bootlst startup code 30*e7cbe64fSgw25295 */ 31*e7cbe64fSgw25295#include <sys/asm_linkage.h> 32*e7cbe64fSgw25295#include <sys/machparam.h> 33*e7cbe64fSgw25295 34*e7cbe64fSgw25295#define STKSIZE 0x1000 35*e7cbe64fSgw25295 36*e7cbe64fSgw25295#if defined(lint) 37*e7cbe64fSgw25295void *estack; 38*e7cbe64fSgw25295caddr_t _end; 39*e7cbe64fSgw25295#endif 40*e7cbe64fSgw25295 41*e7cbe64fSgw25295#if defined(lint) 42*e7cbe64fSgw25295 43*e7cbe64fSgw25295/* ARGSUSED */ 44*e7cbe64fSgw25295void 45*e7cbe64fSgw25295_start(void *a, ...) 46*e7cbe64fSgw25295{} 47*e7cbe64fSgw25295 48*e7cbe64fSgw25295#else /* !lint */ 49*e7cbe64fSgw25295 50*e7cbe64fSgw25295 .seg ".bss" 51*e7cbe64fSgw25295 .align MMU_PAGESIZE 52*e7cbe64fSgw25295 .skip STKSIZE 53*e7cbe64fSgw25295estack: ! top of cprboot stack 54*e7cbe64fSgw25295 .global estack 55*e7cbe64fSgw25295 56*e7cbe64fSgw25295 .seg ".data" 57*e7cbe64fSgw25295 .align 8 58*e7cbe64fSgw25295local_cif: 59*e7cbe64fSgw25295 .xword 0 ! space for prom cookie 60*e7cbe64fSgw25295 61*e7cbe64fSgw25295 .seg ".text" 62*e7cbe64fSgw25295 .align 8 63*e7cbe64fSgw25295 64*e7cbe64fSgw25295 ! 65*e7cbe64fSgw25295 ! regs on entry: 66*e7cbe64fSgw25295 ! %o4 = prom cookie 67*e7cbe64fSgw25295 ! 68*e7cbe64fSgw25295 ENTRY(_start) 69*e7cbe64fSgw25295 set estack - STACK_BIAS, %o5 70*e7cbe64fSgw25295 save %o5, -SA(MINFRAME), %sp 71*e7cbe64fSgw25295 72*e7cbe64fSgw25295 ! 73*e7cbe64fSgw25295 ! clear the bss 74*e7cbe64fSgw25295 ! 75*e7cbe64fSgw25295 set _edata, %o0 76*e7cbe64fSgw25295 set _end, %g2 77*e7cbe64fSgw25295 call bzero 78*e7cbe64fSgw25295 sub %g2, %o0, %o1 ! bss size = (_end - _edata) 79*e7cbe64fSgw25295 80*e7cbe64fSgw25295 set local_cif, %g2 81*e7cbe64fSgw25295 stx %i4, [%g2] 82*e7cbe64fSgw25295 call main 83*e7cbe64fSgw25295 mov %i4, %o0 ! SPARCV9/CIF 84*e7cbe64fSgw25295 85*e7cbe64fSgw25295 call prom_exit_to_mon 86*e7cbe64fSgw25295 nop 87*e7cbe64fSgw25295 SET_SIZE(_start) 88*e7cbe64fSgw25295 89*e7cbe64fSgw25295#endif /* lint */ 90*e7cbe64fSgw25295 91*e7cbe64fSgw25295 92*e7cbe64fSgw25295#if defined(lint) 93*e7cbe64fSgw25295 94*e7cbe64fSgw25295/* ARGSUSED */ 95*e7cbe64fSgw25295int 96*e7cbe64fSgw25295client_handler(void *cif_handler, void *arg_array) 97*e7cbe64fSgw25295{ return (0); } 98*e7cbe64fSgw25295 99*e7cbe64fSgw25295#else 100*e7cbe64fSgw25295 101*e7cbe64fSgw25295 ! 102*e7cbe64fSgw25295 ! 64/64 client interface for ieee1275 prom 103*e7cbe64fSgw25295 ! 104*e7cbe64fSgw25295 ENTRY(client_handler) 105*e7cbe64fSgw25295 mov %o7, %g1 106*e7cbe64fSgw25295 mov %o0, %g5 107*e7cbe64fSgw25295 mov %o1, %o0 108*e7cbe64fSgw25295 jmp %g5 109*e7cbe64fSgw25295 mov %g1, %o7 110*e7cbe64fSgw25295 SET_SIZE(client_handler) 111*e7cbe64fSgw25295 112*e7cbe64fSgw25295#endif /* lint */ 113*e7cbe64fSgw25295 114