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