/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* System-resumption code. kaif_resume is called whenever the world, as a whole
* or merely a single CPU, is to be resumed.
*/
#if !defined(__lint)
#include <sys/asm_linkage.h>
#include <sys/machtrap.h>
#define _KERNEL
#include <sys/privregs.h>
#include <sys/machthread.h>
#include <sys/machparam.h>
#endif
#if defined(__lint)
#endif
#include <mdb/mdb_kreg.h>
#include <kmdb/kaif_asmutil.h>
#include <kmdb/kaif_off.h>
#if defined(__lint)
/*ARGSUSED*/
void
kaif_resume(int work_required)
{
}
#else /* __lint */
/*
* Used to start the world back up, as a whole or in part (single-step).
* Arguments:
* %l5 - the CPU-specific gregs save area
* %l6 - the CPU-specific save area
*/
/* globals only from here on out */
/*
* To resume the world, we reverse what we did in startup
*/
/* FP state */
1:
/* Register windows */
1:
ble 1b
/* Restore various privileged registers */
/* Set up the return from the trap */
/*
* Restore the MMU primary context.
*/
/*
* If we're here because of the debugger trap (most likely from
* kaif_entry), we don't want to jump back to %tpc, since it
* is likely to be the ta that brought us here in the first place.
* We'll test for it here, and we'll leave %xcc untouched until
* the end when we're about to return.
*/
/* Restore saved globals */
1:
#endif /* __lint */