File: nvram-wakeup.conf.5

package info (click to toggle)
nvram-wakeup 1.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 2,052 kB
  • ctags: 242
  • sloc: ansic: 1,943; sh: 309; ruby: 190; makefile: 102
file content (516 lines) | stat: -rw-r--r-- 13,456 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
'\" t
.\" ** The above line should force tbl to be a preprocessor **
.\" 
.\"   Man page for NVRAM WakeUp
.\"   Copyright (C) 2001-2005, Sergei Haller.
.\" 
.\"   $Id: nvram-wakeup.conf.5 809 2005-01-16 19:18:53Z bistr-o-math $
.\" 
.\"   This program is free software; you can redistribute it and/or modify
.\"   it under the terms of the GNU General Public License as published by
.\"   the Free Software Foundation; either version 2 of the License, or
.\"   (at your option) any later version.
.\" 
.\"   This program is distributed in the hope that it will be useful,
.\"   but WITHOUT ANY WARRANTY; without even the implied warranty of
.\"   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\"   GNU General Public License for more details.
.\" 
.\"   You should have received a copy of the GNU General Public License
.\"   along with this program; if not, write to the Free Software
.\"   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
.\" 
.TH nvram-wakeup.conf 5 "Jan 16 2004" Linux "NVRAM WakeUp"
.SH NAME
nvram-wakeup.conf \- the configuration file for NVRAM WakeUp.
.\" ********************************************************************
.SH DESCRIPTION
This  file can be passed to the program NVRAM WakeUp (see
.BR nvram-wakeup "(8)"
for more information) via the 
.B \-\-configfile
option.
.LP
It might look as follows:
.IP
.RS
.nf
.if n # nvram-wakeup.conf
.if n #
.if n #  This is an example configuration for MSI MS-6351
.if n 
.if n   need_reboot = ON_ANY_CHANGE # All changes take effect 
.if n   \                            # after a reboot
.if n 
.if n   addr_chk_h  = 0x30          # These are adresses of 
.if n   addr_chk_l  = 0x31          # the checksum bytes
.if n 
.if n   addr_stat   = 0x55          # Status byte
.if n   shift_stat  = 3             # The position of the 
.if n   \                            # status bit in the byte
.if n 
.if n   addr_day    = 0x56          # Day and time
.if n   addr_hour   = 0x57
.if n   addr_min    = 0x58
.if n   addr_sec    = 0x59
.if t \f(CW# nvram-wakeup.conf\fP
.if t \f(CW#\fP
.if t \f(CW#  This is an example configuration for MSI MS-6351\fP
.if t \f(CW\fP
.if t \f(CW  need_reboot = ON_ANY_CHANGE # All changes take effect \fP
.if t \f(CW  \                            # after a reboot\fP
.if t \f(CW\fP
.if t \f(CW  addr_chk_h  = 0x30          # These are adresses of \fP
.if t \f(CW  addr_chk_l  = 0x31          # the checksum bytes\fP
.if t \f(CW\fP
.if t \f(CW  addr_stat   = 0x55          # Status byte\fP
.if t \f(CW  shift_stat  = 3             # The position of the \fP
.if t \f(CW  \                            # status bit in the byte\fP
.if t \f(CW\fP
.if t \f(CW  addr_day    = 0x56          # Day and time\fP
.if t \f(CW  addr_hour   = 0x57\fP
.if t \f(CW  addr_min    = 0x58\fP
.if t \f(CW  addr_sec    = 0x59\fP
.fi
.RE

.LP
.\" ********************************************************************
.SH SYNTAX
Any empty line or a line containing only space characters is ignored.
.LP
Anything after and including a 
.if n #
.if t \f(CW # \fP
character is treated as a comment and
is ignored.
.LP
The options must have the form  
.IR NAME " = " VALUE
with or without spaces
before 
.IR NAME ", after " VALUE
or around the equal sign.
Valid options are described below.
.LP
The options may appear in any order. The same option must not appear twice.
.\" ********************************************************************
.SH OPTIONS
.P
.br
.B   bcd
.RI "        = (" ON|OFF "), default " OFF
.RS

indicates if the board uses BCD notation for storing values.

BCD  is the  so called Binary  Coded Decimal  notation (actually, it is
`packed BCD', in the plain BCD they waste whole byte per digit.) in this
notation the decimal numbers 0..99 are stored using four bits for  every
digit,  e.g. 24 would be stored as 0x24  (the  4 is stored in  the lower
four bits and the 2 is stored in the upper four bits).
.RE
.P 
.br 
.B addr_chk_h
.RI " = (" 0x00 |...| 0x71 "), default: " undefined
.br 
.B addr_chk_l
.RI " = (" 0x00 |...| 0x71 "), default: " undefined
.br 
.B addr_stat
.RI "  = (" 0x00 |...| 0x71 "), default: " undefined
.br 
.B addr_mon
.RI "   = (" 0x00 |...| 0x71 "), default: " undefined
.br 
.B addr_day
.RI "   = (" 0x00 |...| 0x71 "), default: " undefined
.br 
.B addr_hour
.RI "  = (" 0x00 |...| 0x71 "), default: " undefined
.br 
.B addr_min
.RI "   = (" 0x00 |...| 0x71 "), default: " undefined
.br 
.B addr_sec
.RI "   = (" 0x00 |...| 0x71 "), default: " undefined
.RS

Addresses of the  bytes  where the checksum  (lower resp. higher bytes),
status  (enabled/disabled), month, day,  hour,  minute  and second  are
stored in the nvram.

.BR addr_chk_h ", " addr_chk_l " and " addr_stat
must be defined. All other may stay
undefined.  That  means, the board  doesn't store them (e.g.  because it
stores that value in RTC alarm registers)

.RE
.P 
.br 
.B addr_chk_h2
.RI "= (" 0x00 |...| 0x71 "), default: " undefined
.br 
.B addr_chk_l2
.RI "= (" 0x00 |...| 0x71 "), default: " undefined
.RS

There are some boards which have two checksums. 
Since I haven't seen many of them yet, 
I don't know if they need special handling

.RE
.P 
.br 
.B addr_wdays
.RI " = (" 0x00 |...| 0x71 " ), default: " undefined
.RS

The address of the byte  containing a weekday vector.
Currently,  I  know  of  only  two boards,  which store a weekday vector
(Asus SP98-X and SP97-X).
.RE
.P 
.br
.B rtc_time
.RI "   = (" ON | OFF "), default: " OFF
.RS

indicates if we have to set the the RTC alarm time accordingly.
.RE
.P 
.br
.B rtc_mon
.RI "    = (" 0x00 |...| 0x71 | 0x7F "), default: " undefined
.br
.B rtc_day
.RI "    = (" 0x00 |...| 0x71 | 0x7F "), default: " undefined
.RS

similar to 
.BR addr_mon / addr_day ,
but   stored  in  BCD and not affecting the
checksum. In  most cases, the day is stored in the RTC register D 
.RI ( 0x7F ),
but there are  also  some  boards,  which  store  it somewhere  in the nvram
(address <= 
.IR 0x71 ).

If 
.B rtc_day 
is >= 
.IR 0x72 ,
you will need a kernel patch:
in <kernel-src>/drivers/char/nvram.c change the line
.RS
.if t \f(CW #define NVRAM_BYTES 128-RTC_FIRST_BYTE\fP
.if n #define NVRAM_BYTES 128-RTC_FIRST_BYTE
.RE
to
.RS
.if t \f(CW #define NVRAM_BYTES 128\fP
.if n #define NVRAM_BYTES 128
.RE
in newer kernels (beginning with 2.4.20) it is the line
.RS
.if t \f(CW #define NVRAM_BYTES (128-NVRAM_FIRST_BYTE)\fP
.if n #define NVRAM_BYTES (128-NVRAM_FIRST_BYTE)
.RE
which must be changed to
.RS
.if t \f(CW #define NVRAM_BYTES 128\fP
.if n #define NVRAM_BYTES 128
.RE
.RE
.P 
.br
.B reset_mon
.RI "  = (" ON | OFF "), default: " OFF
.br
.B reset_day
.RI "  = (" ON | OFF "), default: " OFF
.RS

on some boards  we have to set the value of 
.BR rtc_mon " resp. " rtc_day
to
.I 0
when disabling the wakeup feature.
.RE
.P 
.br
.B nr_stat
.RI "    = " 1 " (just on/off)"
.br
.B nr_mon
.RI "     = " 4 " (   0..12   )"
.br
.B nr_day
.RI "     = " 5 " (   0..31   )"
.br
.B nr_rtc_mon
.RI " = " 5 " (0x00...0x12)"
.br
.B nr_rtc_day
.RI " = " 6 " (0x00...0x31)"
.br
.B nr_wdays
.RI "   = " 7 " ( 1 per day )"
.br
.B nr_hour
.RI "    = " 5 " (   0..23   )"
.br
.B nr_min
.RI "     = " 6 " (   0..59   )"
.br
.B nr_sec
.RI "     = " 6 " (   0..59   )"
.RS

Number  of bits  needed for  the status,  month, day,  rtc_day, weekday
vector,   hour,   minute  and  second.   These  values  are  
a priori motherboard
independent but depend on the BCD/non-BCD notation.
.RE
.P
.br
.B shift_stat
.RI " = (" 0 |...| 7 "), default: " 0
.br
.B shift_mon
.RI "  = (" 0 |...| 4 "), default: " 0
.br
.B shift_day
.RI "  = (" 0 |...| 3 "), default: " 0
.br
.B shift_wdays
.RI "= (" 0 |...| 1 "), default: " 0
.br
.B shift_hour
.RI " = (" 0 |...| 3 "), default: " 0
.br
.B shift_min
.RI "  = (" 0 |...| 2 "), default: " 0
.br
.B shift_sec 
.RI "  = (" 0 |...| 2 "), default: " 0
.RS

Indicates,  by how many  bits the value is  shifted  to the left in  the
byte, e.g.  the  value of the day (5 bits)  could be stored in the bits
marked with an "x" of a byte:
    000xxxxx  -> 
.B shift_day
= 
.I 0
    00xxxxx0  -> 
.B shift_day
= 
.I 1
    0xxxxx00  -> 
.B shift_day
= 
.I 2
    xxxxx000  -> 
.B shift_day
= 
.I 3
.RE
.P
.br
.B need_reboot
.RI " = (" OFF | ON_STAT | ON_SEC | ON_MIN | ON_HOUR
.br
.RI "                   |" ON_DAY  | ON_MON | ON_WDAYS | ON_ANY_CHANGE |...),
.br
.RI "                default: " OFF
.RS

Here "..." means any or-ed combination of multiple
.I ON_XXX 
values.

Some boards need a reboot  for changes in nvram to take effect.  Some of
them  need  a  reboot  after _any_ change,  some  of them only after the
status  bit  was changed. Anyway, now we are able to define when a board
needs a reboot:
.TP
.I OFF
means, the board never needs it
.TP
.I ON_ANY_CHANGE
means, the board needs it after _any_ change on nvram.
.TP
.I ON_STAT
means, reboot only if the status bit is changed
.TP
.IR ON_STAT | ON_SEC
means, reboot whenever the status or the second are changed.
.RE
.RS

The idea behind this is  if 
.B nvram-wakeup 
decides that we need to reboot,
it will exit with exit status 
.I 1
(instead of 
.IR 0 ).
So the script which runs
.B nvram-wakeup  
could  react  on  this.  We also print it to 
.BR stderr ,
so if
.B nvram-wakeup
is run directly on the command line, the user  could  react
appropriately.
.RE
.P 
.br
.B upper_method
.RI "   = (" OFF | INTEL | DS1685 | VT82Cxxx | VT8235_37 "), default: " OFF
.RS

indicates if upper nvram must be used and if yes, 
which method to use to access it. 
Note that upper nvram can only be read if --directisa parameter 
is specified.
Possible values:
.TP
.I OFF
upper nvram disabled (default)
.TP
.I INTEL
access upper nvram by a method used by most (if not all) Intel chipsets with
ICH, ICH2, C-ICH, ... 

(datasheets at http://intel.com/design/chipsets/datashts/)
.TP
.I DS1685
access upper nvram by a method used by the Dallas Semiconductor DS1685/DS1687
chips. 

(datasheet at http://www.farnell.com/datasheets/4182.pdf)
.TP
.I VT82Cxxx
access upper nvram by a method used by VIA's VT82C686A "Super South" South Bridge.
Reported to work with VT82C686A, VT82C686B, VT82C596, nVidia nForce2, 
ATI RADEON 9100 IGP (= RS300), AMD-8111.

(datasheet at http://www.viatech.com/pdf/productinfo/686a.pdf)
.br
(datasheet at http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/24674.pdf)
.TP
.I VT8235_37
access upper nvram by a method used by VIA's VT8235/37 South Bridges.
Reported to work with VT8233 as well.

(no official source)

.RE
.P 
.br
.B chk_method
.RI "   = ("  DELL | FSC "), default: " undefined
.RS

indicates which algorithm for calculation of the checksum must be used. 
Possible values:
.TP
.I undefined
Majority of mainboards use the same algorithm (just addition of values).
This algorithm is used if no 
.B chk_method
option is specified.
.TP
.I DELL
This method is used by many Dell mainboards (addition of negative values).
.TP
.I FSC
Fujitsu-Siemens uses  yet another algorithm. I don't know it and they 
consider it as a company secret. Thus this method is not implemented.


.RE

.LP
.\" ********************************************************************
.SH OBSCURE OPTIONS
.P 
.br
.B rtc_mon_0_is_c0
.RI "  = (" ON | OFF "), default: " OFF
.br
.B rtc_day_0_is_c0
.RI "  = (" ON | OFF "), default: " OFF
.RS

on some boards  we have to store the value
.I 0xC0
instead of 
.I 0
in 
.BR rtc_mon " resp. " rtc_day .
If you use one of this two options, don't forget to set
.BR nr_rtc_mon " resp. " nr_rtc_day
to
.IR 8 .
.RE
.P 
.br
.B day_hack
.RI "         = (" 1 |...| 4 "), default: " undefined
.RS

on some boards the value of
.B addr_day
is split over the day and the status byte. In those cases the lower
.B day_hack
bits of the day value are stored in the highest bits of the status byte
and the rest is stored in the day byte.
.RE
.P 
.br
.B day_no_bcd
.RI "       = (" ON | OFF "), default: " OFF
.RS
on some boards the value of
.B addr_day
is not stored in BCD, although everything else is.
This option has no effect is the option
.B bcd
is not enabled.
.RE

.LP
.\" ********************************************************************
.SH SEE ALSO
.BR nvram-wakeup "(8)"
.\" ********************************************************************
.SH HOMEPAGE
http://sf.net/projects/nvram-wakeup/
.\" ********************************************************************
.SH AUTHOR
Written by Sergei Haller <Sergei.Haller@math.uni-giessen.de>.
.\" ********************************************************************
.SH "REPORTING BUGS"
Report bugs at the bug tracking system (see HOMEPAGE) or on the mailing list
.B nvram-wakeup-devel@lists.sourceforge.net
.\" ********************************************************************
.SH COPYRIGHT
Copyright \(co 2001-2004 Sergei Haller.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA