2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf/*
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * CDDL HEADER START
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf *
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * The contents of this file are subject to the terms of the
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * Common Development and Distribution License (the "License").
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * You may not use this file except in compliance with the License.
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf *
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * or http://www.opensolaris.org/os/licensing.
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * See the License for the specific language governing permissions
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * and limitations under the License.
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf *
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * When distributing Covered Code, include this CDDL HEADER in each
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * If applicable, add the following below this CDDL HEADER, with the
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * fields enclosed by brackets "[]" replaced with your own identifying
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * information: Portions Copyright [yyyy] [name of copyright owner]
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf *
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * CDDL HEADER END
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf */
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf/*
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * Use is subject to license terms.
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf */
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf#pragma ident "%Z%%M% %I% %E% SMI"
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf/*
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * cpr functions for supported sparc platforms
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf */
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf#include <sys/types.h>
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf#include <sys/systm.h>
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf#include <sys/cpr.h>
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf#include <sys/kmem.h>
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf#include <sys/errno.h>
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf/*
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * setup the original and new sets of property names/values
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf * Not relevant to S3, which is all we support for now.
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf */
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf/*ARGSUSED*/
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyfint
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyfcpr_default_setup(int alloc)
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf{
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf return (0);
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf}
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyfvoid
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyfcpr_send_notice(void)
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf{
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf static char cstr[] = "\014" "\033[1P" "\033[18;21H";
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf prom_printf(cstr);
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf prom_printf("Saving System State. Please Wait... ");
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf}
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyfvoid
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyfcpr_spinning_bar(void)
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf{
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf static char *spin_strings[] = { "|\b", "/\b", "-\b", "\\\b" };
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf static int idx;
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf prom_printf(spin_strings[idx]);
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf if (++idx == 4)
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf idx = 0;
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf}
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyfvoid
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyfcpr_resume_notice(void)
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf{
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf static char cstr[] = "\014" "\033[1P" "\033[18;21H";
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf prom_printf(cstr);
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf prom_printf("Restoring System State. Please Wait... ");
2df1fe9ca32bb227b9158c67f5c00b54c20b10fdrandyf}