/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
* Copyright 2016, Joyent, Inc.
*/
#include <sys/smp_impldefs.h>
#include <sys/archsystm.h>
#include <vm/seg_kmem.h>
#include <sys/machsystm.h>
#include <sys/cpr_wakecode.h>
#ifdef OLDPMCODE
#include "acpi.h"
#endif
#include <sys/x86_archext.h>
#include <sys/cpu_module.h>
/*
* S3 stuff
*/
#if 0 /* debug */
#endif /* debug */
extern int boothowto;
extern void kernel_wc_code(void);
extern int flushes_require_xcalls;
extern int tsc_gethrtime_enable;
extern cpuset_t cpu_ready_set;
/*
* This is what we've all been waiting for!
*/
int
{
/*LINTED*/
/* Set waking vector */
(long)wakephys))
goto insomnia;
}
/* Enable wake events */
}
if (acpi_rtc_wake > 0) {
/* clear the RTC bit first */
}
/*
* Set RTC to wake us in a wee while.
*/
}
/*
* Prepare for sleep ... could've done this earlier?
*/
goto insomnia;
}
switch (s3ap->s3a_test_point) {
case DEVICE_SUSPEND_TO_RAM:
case FORCE_SUSPEND_TO_RAM:
case LOOP_BACK_PASS:
return (0);
case LOOP_BACK_FAIL:
return (1);
default:
}
/*
* Tell the hardware to sleep.
*/
}
/* cleanup is done in the caller */
return (1);
}
int
{
}
}
}
if (acpi_rtc_wake > 0 &&
}
return (0);
}