diff options
author | randyf <none@none> | 2007-10-20 16:00:42 -0700 |
---|---|---|
committer | randyf <none@none> | 2007-10-20 16:00:42 -0700 |
commit | 2df1fe9ca32bb227b9158c67f5c00b54c20b10fd (patch) | |
tree | 358c576f885c00d42a760d9e35e5b66e77209fe2 /usr/src/uts/sun4u | |
parent | 10b3fbf593a6678eec9b50a01903ef4eb73111e4 (diff) | |
download | illumos-gate-2df1fe9ca32bb227b9158c67f5c00b54c20b10fd.tar.gz |
PSARC/2005/469 X86 Energy Star compliance
PSARC/2006/632 PSMI extension for state save and restore
6330209 nge needs to support DDI_SUSPEND/DDI_RESUME
6381827 Suspend to RAM on x86
6393154 audio810 needs to support DDI_SUSPEND/DDI_RESUME
6397047 fd, fdc needs to support Suspend/Resume
6401974 cannot enter S3 with ohci PME enable set on Tyan 2865 with Sun or Tyan 2.01 BIOS
6422613 memscrubber doesn't re-acquire lock before CALLB_CPR_EXIT
6455736 ata/dadk/cmdk should support DDI_SUSPEND/DDI_RESUME
6511370 CPR on SPARC regression
6586018 TODOP Macros in i86pc/sys/machclock.h not in sun4u/sun4v equivilent (Sparc only)
6610124 It takes more than 3 minutes after printing "pci_pre_resume nv_sata:0"
6617143 powerd/pmconfig emits a different default message for an existing on or off action.
--HG--
rename : usr/src/cmd/power/power.conf => usr/src/cmd/power/power.conf.sparc
Diffstat (limited to 'usr/src/uts/sun4u')
-rw-r--r-- | usr/src/uts/sun4u/os/cpr_impl.c | 120 | ||||
-rw-r--r-- | usr/src/uts/sun4u/sys/machclock.h | 13 |
2 files changed, 125 insertions, 8 deletions
diff --git a/usr/src/uts/sun4u/os/cpr_impl.c b/usr/src/uts/sun4u/os/cpr_impl.c index 4c5b415b0a..e0c6a4b2d8 100644 --- a/usr/src/uts/sun4u/os/cpr_impl.c +++ b/usr/src/uts/sun4u/os/cpr_impl.c @@ -65,6 +65,10 @@ #include <vm/vm_dep.h> extern void cpr_clear_bitmaps(void); +extern int cpr_setbit(pfn_t ppn, int mapflag); +extern int cpr_clrbit(pfn_t ppn, int mapflag); +extern pgcnt_t cpr_scan_kvseg(int mapflag, bitfunc_t bitfunc, struct seg *seg); +extern pgcnt_t cpr_count_seg_pages(int mapflag, bitfunc_t bitfunc); extern void dtlb_wr_entry(uint_t, tte_t *, uint64_t *); extern void itlb_wr_entry(uint_t, tte_t *, uint64_t *); @@ -641,12 +645,6 @@ i_cpr_save_machdep_info(void) } -void -i_cpr_set_tbr(void) -{ -} - - /* * cpu0 should contain bootcpu info */ @@ -656,6 +654,11 @@ i_cpr_bootcpu(void) return (&cpu0); } +processorid_t +i_cpr_bootcpuid(void) +{ + return (0); +} /* * Return the virtual address of the mapping area @@ -1761,7 +1764,7 @@ i_cpr_dump_setup(vnode_t *vp) int -i_cpr_is_supported(void) +i_cpr_is_supported(int sleeptype) { char es_prop[] = "energystar-v2"; pnode_t node; @@ -1769,6 +1772,9 @@ i_cpr_is_supported(void) extern int cpr_supported_override; extern int cpr_platform_enable; + if (sleeptype != CPR_TODISK) + return (0); + /* * The next statement tests if a specific platform has turned off * cpr support. @@ -1924,3 +1930,103 @@ i_cpr_alloc_bitmaps(void) i_cpr_bitmap_cleanup(); return (err); } + + + +/* + * Power down the system. + */ +int +i_cpr_power_down(int sleeptype) +{ + int is_defined = 0; + char *wordexists = "p\" power-off\" find nip swap l! "; + char *req = "power-off"; + + ASSERT(sleeptype == CPR_TODISK); + + /* + * is_defined has value -1 when defined + */ + prom_interpret(wordexists, (uintptr_t)&is_defined, 0, 0, 0, 0); + if (is_defined) { + CPR_DEBUG(CPR_DEBUG1, "\ncpr: %s...\n", req); + prom_interpret(req, 0, 0, 0, 0, 0); + } + /* + * Only returns if failed + */ + return (EIO); +} + +void +i_cpr_stop_other_cpus(void) +{ + stop_other_cpus(); +} + +/* + * Save context for the specified CPU + */ +/* ARGSUSED */ +void * +i_cpr_save_context(void *arg) +{ + /* + * Not yet + */ + ASSERT(0); + return (NULL); +} + +void +i_cpr_pre_resume_cpus(void) +{ + /* + * Not yet + */ + ASSERT(0); +} + +void +i_cpr_post_resume_cpus(void) +{ + /* + * Not yet + */ + ASSERT(0); +} + +/* + * nothing to do + */ +void +i_cpr_alloc_cpus(void) +{ +} + +/* + * nothing to do + */ +void +i_cpr_free_cpus(void) +{ +} + +/* ARGSUSED */ +void +i_cpr_save_configuration(dev_info_t *dip) +{ + /* + * this is a no-op on sparc + */ +} + +/* ARGSUSED */ +void +i_cpr_restore_configuration(dev_info_t *dip) +{ + /* + * this is a no-op on sparc + */ +} diff --git a/usr/src/uts/sun4u/sys/machclock.h b/usr/src/uts/sun4u/sys/machclock.h index 3bd3ad7e7b..e0bc501de7 100644 --- a/usr/src/uts/sun4u/sys/machclock.h +++ b/usr/src/uts/sun4u/sys/machclock.h @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -104,6 +104,17 @@ struct tod_ops { extern struct tod_ops tod_ops; extern char *tod_module_name; +/* + * These defines allow common code to use TOD functions independant + * of hardware platform. + */ +#define TODOP_GET(top) ((top).tod_get()) +#define TODOP_SET(top, ts) ((top).tod_set(ts)) +#define TODOP_SETWD(top, nsec) ((top).tod_set_watchdog_timer(nsec)) +#define TODOP_CLRWD(top) ((top).tod_clear_watchdog_timer()) +#define TODOP_SETWAKE(top, ts) ((top).tod_set_power_alarm(ts)) +#define TODOP_CLRWAKE(top) ((top).tod_clear_power_alarm()) + #endif /* _KERNEL */ #endif /* _ASM */ |