From 2df1fe9ca32bb227b9158c67f5c00b54c20b10fd Mon Sep 17 00:00:00 2001 From: randyf Date: Sat, 20 Oct 2007 16:00:42 -0700 Subject: 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 --- usr/src/cmd/power/parse.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) (limited to 'usr/src/cmd/power/parse.c') diff --git a/usr/src/cmd/power/parse.c b/usr/src/cmd/power/parse.c index 650e2154cb..e7adff4d18 100644 --- a/usr/src/cmd/power/parse.c +++ b/usr/src/cmd/power/parse.c @@ -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. */ @@ -53,6 +53,8 @@ prmup_t pm_status = { 0, OKUP, "pm" }; * must appear before a substring like "dev". */ static cinfo_t conftab[] = { + "S3-support", S3sup, &pm_status, NULL, 2, 0, 1, + "autoS3", autoS3, &pm_status, NULL, 2, 0, 1, "autopm", autopm, &pm_status, NULL, 2, 0, 1, "autoshutdown", autosd, &cpr_status, as_cmt, 5, 0, 1, "cpu-threshold", cputhr, &pm_status, NULL, 2, 0, 1, @@ -373,6 +375,14 @@ parse_conf_file(char *name, vact_t action) cinfo_t *cip; int linc, cnt; size_t llen; + int dontcare; + + /* + * Do the "implied default" for autoS3 + */ + (void) S3_helper("S3-support-enable", "S3-support-disable", + PM_ENABLE_S3, PM_DISABLE_S3, "S3-support", "default", + &dontcare, -1); file_buf = get_conf_data(name); mesg(MDEBUG, "\nnow parsing \"%s\"...\n", name); @@ -446,4 +456,46 @@ parse_conf_file(char *name, vact_t action) lineno = 0; free(file_buf); + + if (verify) { + int ret = ioctl(pm_fd, PM_GET_PM_STATE, NULL); + if (ret < 0) { + mesg(MDEBUG, "Cannot get PM state: %s\n", + strerror(errno)); + } + switch (ret) { + case PM_SYSTEM_PM_ENABLED: + mesg(MDEBUG, "Autopm Enabled\n"); + break; + case PM_SYSTEM_PM_DISABLED: + mesg(MDEBUG, "Autopm Disabled\n"); + break; + } + ret = ioctl(pm_fd, PM_GET_S3_SUPPORT_STATE, NULL); + if (ret < 0) { + mesg(MDEBUG, "Cannot get PM state: %s\n", + strerror(errno)); + } + switch (ret) { + case PM_S3_SUPPORT_ENABLED: + mesg(MDEBUG, "S3 support Enabled\n"); + break; + case PM_S3_SUPPORT_DISABLED: + mesg(MDEBUG, "S3 support Disabled\n"); + break; + } + ret = ioctl(pm_fd, PM_GET_AUTOS3_STATE, NULL); + if (ret < 0) { + mesg(MDEBUG, "Cannot get PM state: %s\n", + strerror(errno)); + } + switch (ret) { + case PM_AUTOS3_ENABLED: + mesg(MDEBUG, "AutoS3 Enabled\n"); + break; + case PM_AUTOS3_DISABLED: + mesg(MDEBUG, "AutoS3 Disabled\n"); + break; + } + } } -- cgit v1.2.3