30 /* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
31 /* All Rights Reserved */
32
33 /* Copyright (c) 1987, 1988 Microsoft Corporation */
34 /* All Rights Reserved */
35
36 #include <sys/param.h>
37 #include <sys/time.h>
38 #include <sys/systm.h>
39
40 #include <sys/cpuvar.h>
41 #include <sys/clock.h>
42 #include <sys/debug.h>
43 #include <sys/rtc.h>
44 #include <sys/archsystm.h>
45 #include <sys/sysmacros.h>
46 #include <sys/lockstat.h>
47 #include <sys/stat.h>
48 #include <sys/sunddi.h>
49
50 #include <sys/acpi/acpi.h>
51 #include <sys/acpica.h>
52
53 static int todpc_rtcget(unsigned char *buf);
54 static void todpc_rtcput(unsigned char *buf);
55
56 #define CLOCK_RES 1000 /* 1 microsec in nanosecs */
57
58 int clock_res = CLOCK_RES;
59
60 /*
61 * The minimum sleep time till an alarm can be fired.
62 * This can be tuned in /etc/system, but if the value is too small,
63 * there is a danger that it will be missed if it takes too long to
64 * get from the set point to sleep. Or that it can fire quickly, and
65 * generate a power spike on the hardware. And small values are
66 * probably only usefull for test setups.
67 */
68 int clock_min_alarm = 4;
69
70 /*
|
30 /* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
31 /* All Rights Reserved */
32
33 /* Copyright (c) 1987, 1988 Microsoft Corporation */
34 /* All Rights Reserved */
35
36 #include <sys/param.h>
37 #include <sys/time.h>
38 #include <sys/systm.h>
39
40 #include <sys/cpuvar.h>
41 #include <sys/clock.h>
42 #include <sys/debug.h>
43 #include <sys/rtc.h>
44 #include <sys/archsystm.h>
45 #include <sys/sysmacros.h>
46 #include <sys/lockstat.h>
47 #include <sys/stat.h>
48 #include <sys/sunddi.h>
49
50 #include <acpica/include/acpi.h>
51 #include <sys/acpica.h>
52
53 static int todpc_rtcget(unsigned char *buf);
54 static void todpc_rtcput(unsigned char *buf);
55
56 #define CLOCK_RES 1000 /* 1 microsec in nanosecs */
57
58 int clock_res = CLOCK_RES;
59
60 /*
61 * The minimum sleep time till an alarm can be fired.
62 * This can be tuned in /etc/system, but if the value is too small,
63 * there is a danger that it will be missed if it takes too long to
64 * get from the set point to sleep. Or that it can fire quickly, and
65 * generate a power spike on the hardware. And small values are
66 * probably only usefull for test setups.
67 */
68 int clock_min_alarm = 4;
69
70 /*
|