1*5295Srandyf /* 2*5295Srandyf * CDDL HEADER START 3*5295Srandyf * 4*5295Srandyf * The contents of this file are subject to the terms of the 5*5295Srandyf * Common Development and Distribution License (the "License"). 6*5295Srandyf * You may not use this file except in compliance with the License. 7*5295Srandyf * 8*5295Srandyf * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*5295Srandyf * or http://www.opensolaris.org/os/licensing. 10*5295Srandyf * See the License for the specific language governing permissions 11*5295Srandyf * and limitations under the License. 12*5295Srandyf * 13*5295Srandyf * When distributing Covered Code, include this CDDL HEADER in each 14*5295Srandyf * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*5295Srandyf * If applicable, add the following below this CDDL HEADER, with the 16*5295Srandyf * fields enclosed by brackets "[]" replaced with your own identifying 17*5295Srandyf * information: Portions Copyright [yyyy] [name of copyright owner] 18*5295Srandyf * 19*5295Srandyf * CDDL HEADER END 20*5295Srandyf */ 21*5295Srandyf /* 22*5295Srandyf * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23*5295Srandyf * Use is subject to license terms. 24*5295Srandyf */ 25*5295Srandyf 26*5295Srandyf #pragma ident "%Z%%M% %I% %E% SMI" 27*5295Srandyf 28*5295Srandyf /* 29*5295Srandyf * cpr functions for supported sparc platforms 30*5295Srandyf */ 31*5295Srandyf #include <sys/types.h> 32*5295Srandyf #include <sys/systm.h> 33*5295Srandyf #include <sys/cpr.h> 34*5295Srandyf #include <sys/kmem.h> 35*5295Srandyf #include <sys/errno.h> 36*5295Srandyf 37*5295Srandyf /* 38*5295Srandyf * setup the original and new sets of property names/values 39*5295Srandyf * Not relevant to S3, which is all we support for now. 40*5295Srandyf */ 41*5295Srandyf /*ARGSUSED*/ 42*5295Srandyf int cpr_default_setup(int alloc)43*5295Srandyfcpr_default_setup(int alloc) 44*5295Srandyf { 45*5295Srandyf return (0); 46*5295Srandyf } 47*5295Srandyf 48*5295Srandyf void cpr_send_notice(void)49*5295Srandyfcpr_send_notice(void) 50*5295Srandyf { 51*5295Srandyf static char cstr[] = "\014" "\033[1P" "\033[18;21H"; 52*5295Srandyf 53*5295Srandyf prom_printf(cstr); 54*5295Srandyf prom_printf("Saving System State. Please Wait... "); 55*5295Srandyf } 56*5295Srandyf 57*5295Srandyf void cpr_spinning_bar(void)58*5295Srandyfcpr_spinning_bar(void) 59*5295Srandyf { 60*5295Srandyf static char *spin_strings[] = { "|\b", "/\b", "-\b", "\\\b" }; 61*5295Srandyf static int idx; 62*5295Srandyf 63*5295Srandyf prom_printf(spin_strings[idx]); 64*5295Srandyf if (++idx == 4) 65*5295Srandyf idx = 0; 66*5295Srandyf } 67*5295Srandyf 68*5295Srandyf void cpr_resume_notice(void)69*5295Srandyfcpr_resume_notice(void) 70*5295Srandyf { 71*5295Srandyf static char cstr[] = "\014" "\033[1P" "\033[18;21H"; 72*5295Srandyf 73*5295Srandyf prom_printf(cstr); 74*5295Srandyf prom_printf("Restoring System State. Please Wait... "); 75*5295Srandyf } 76