/ util / nvramtool / cli / nvramtool.8
nvramtool.8
  1  .\"***************************************************************************\
  2  .\" nvramtool.8
  3  .\"***************************************************************************
  4  .\"  Please also read the file DISCLAIMER which is included in this software
  5  .\"  distribution.
  6  .\"
  7  .\"  This program is free software; you can redistribute it and/or modify it
  8  .\"  under the terms of the GNU General Public License (as published by the
  9  .\"  Free Software Foundation) version 2, dated June 1991.
 10  .\"
 11  .\"  This program is distributed in the hope that it will be useful, but
 12  .\"  WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
 13  .\"  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the terms and
 14  .\"  conditions of the GNU General Public License for more details.
 15  .\"***************************************************************************/
 16  .TH NVRAMTOOL 8 "September 2008"
 17  .SH NAME
 18  nvramtool \- read/write coreboot-related information
 19  .SH SYNOPSIS
 20  .B "nvramtool [OPTS] [-n] -r NAME"
 21  .br
 22  .B "nvramtool [OPTS] -e NAME"
 23  .br
 24  .B "nvramtool [OPTS] -a"
 25  .br
 26  .B "nvramtool [OPTS] -w NAME=VALUE"
 27  .br
 28  .B "nvramtool [OPTS] -p INPUT_FILE"
 29  .br
 30  .B "nvramtool [OPTS] -i"
 31  .br
 32  .B "nvramtool [OPTS] -c [VALUE]"
 33  .br
 34  .B "nvramtool [OPTS] -l [ARG]"
 35  .br
 36  .B "nvramtool [OPTS] -d"
 37  .br
 38  .B "nvramtool [OPTS] -Y"
 39  .br
 40  .B "nvramtool [OPTS] -b OUTPUT_FILE"
 41  .br
 42  .B "nvramtool [OPTS] -B INPUT_FILE"
 43  .br
 44  .B "nvramtool [OPTS] -x"
 45  .br
 46  .B "nvramtool [OPTS] -X DUMPFILE"
 47  .br
 48  .B "nvramtool [OPTS] -v"
 49  .br
 50  .B "nvramtool [OPTS] -h"
 51  .SH DESCRIPTION
 52  .B "nvramtool"
 53  is a utility for reading/writing coreboot parameters and displaying
 54  information from the coreboot table.
 55  
 56  The coreboot table resides in low physical memory.  It is created at boot
 57  time by coreboot, and contains various system information such as the type
 58  of mainboard in use.  It specifies locations in the CMOS (nonvolatile RAM)
 59  where the coreboot parameters are stored.
 60  
 61  This program is intended for (x86-based) systems that use coreboot.  For
 62  information about coreboot, see
 63  .br
 64  https://www.coreboot.org/.
 65  .SH PARAMETERS
 66  .TP
 67  .B "[-n] -r NAME"
 68  Show the value of the coreboot parameter given by
 69  .B "NAME."
 70  If
 71  .B "-n"
 72  is specified, show only the value.  Otherwise show both parameter name and
 73  value.
 74  .TP
 75  .B "-e NAME"
 76  Show all possible values for parameter given by
 77  .B "NAME."
 78  .TP
 79  .B "-a"
 80  Show the names and values for all coreboot parameters.
 81  .TP
 82  .B "-w NAME=VALUE"
 83  Assign
 84  .B "VALUE"
 85  to coreboot parameter given by
 86  .B "NAME."
 87  .TP
 88  .B "-p INPUT_FILE"
 89  Assign values to coreboot parameters according to the contents of
 90  .B "INPUT_FILE."
 91  The format of this file is described below.
 92  .TP
 93  .B "-i"
 94  This is similar to the
 95  .B "-p"
 96  option, except that the contents of the input file are taken from standard
 97  input.
 98  .TP
 99  .B "-c [VALUE]"
100  If
101  .B "VALUE"
102  is present then set the CMOS checksum for the coreboot parameters to
103  .B "VALUE."
104  Otherwise, show the checksum value.
105  .TP
106  .B "-l [ARG]"
107  If
108  .B "ARG"
109  is present then show information from the coreboot table as specified by
110  .B "ARG."
111  Otherwise show all possible values for
112  .B "ARG."
113  .TP
114  .B "-d"
115  Do a low-level dump of the coreboot table.
116  .TP
117  .B "-Y"
118  Write CMOS layout information to standard output.  If redirected to a file,
119  the layout information may be used as input for the
120  .B "'-y LAYOUT_FILE'"
121  option (see below).
122  .TP
123  .B "-b OUTPUT_FILE"
124  Write the contents of CMOS memory to the binary file
125  .B "OUTPUT_FILE."
126  The first 14 bytes of
127  .B "OUTPUT_FILE"
128  do not contain actual CMOS data, and are always written as zeros.  This is
129  because the first 14 bytes of the CMOS area do not contain CMOS memory.  These
130  bytes are involved with the functioning of the real time clock.
131  .TP
132  .B "-B INPUT_FILE"
133  Read binary data from
134  .B "INPUT_FILE"
135  and write the data to CMOS memory.  The first 14 bytes of
136  .B "INPUT_FILE"
137  are skipped and data is written to CMOS starting at the 15th byte of the CMOS
138  area.  This is because the first 14 bytes of the CMOS area do not contain CMOS
139  memory.  These bytes are involved with the functioning of the real time clock.
140  .TP
141  .B "-x"
142  Show a hex dump of all CMOS data.  The first 14 bytes of the dump do not
143  contain actual CMOS data, and are always shown as zeros.  This is because the
144  first 14 bytes of the CMOS area do not contain CMOS memory.  These bytes are
145  involved with the functioning of the real time clock.
146  .TP
147  .B "-X DUMPFILE"
148  Read binary data from
149  .B "DUMPFILE"
150  (presumably a CMOS dumpfile created using the
151  .B "-b OUTPUT_FILE"
152  option) and show a hex dump of the data.
153  .TP
154  .B "-v"
155  Show version information for this program.
156  .TP
157  .B "-h"
158  Show a help message for this program.
159  .SH "OPTIONS"
160  In all cases above,
161  .B "[OPTS]"
162  evaluates to the following:
163  
164  .B "    [-y LAYOUT_FILE | -t]"
165  
166  The
167  .B "'-y LAYOUT_FILE'"
168  option tells nvramtool to obtain CMOS layout information from the contents of
169  .B "LAYOUT_FILE."
170  Likewise, the
171  .B "'-t'"
172  option tells nvramtool to obtain CMOS layout information from the CMOS option
173  table (contained within the coreboot table).  If neither option is
174  specified, the CMOS option table is used by default.
175  .B "LAYOUT_FILE"
176  follows the format of the
177  .B "cmos.layout"
178  files provided by coreboot.
179  
180  If the coreboot installed on your system was built without specifying
181  .B "CONFIG_HAVE_OPTION_TABLE,"
182  then the coreboot table will not contain a CMOS option table.  In this case,
183  the
184  .B "'-y LAYOUT_FILE'"
185  option must be used.
186  
187  These two options are silently ignored when used in combination with other
188  options (such as
189  .B "-h,"
190  for instance) for which they are not applicable.
191  .SH FILE FORMAT
192  For the
193  .B "-p"
194  option,
195  .B "INPUT_FILE"
196  must consist of a sequence of lines such that each line is either a blank
197  line, a comment, or an assignment.  A blank line consists only of zero or
198  more whitespace characters (spaces and tabs).  A comment is constructed as
199  follows:
200  
201  .B "    [ws]#[text]"
202  
203  Here,
204  .B "[ws]"
205  indicates optional whitespace characters and
206  .B "[text]"
207  indicates optional text.  Blank lines and comments are both ignored.  An
208  assignment is constructed as follows:
209  
210  .B "    [ws]NAME[ws]=[ws]VALUE[ws]"
211  
212  Here,
213  .B "NAME"
214  is the name of a coreboot parameter and
215  .B "VALUE"
216  is the value that will be assigned to
217  .B "NAME."
218  .B "VALUE"
219  is allowed to contain whitespace characters, but it must begin and end with
220  nonwhitespace characters.  Note that each comment must appear on a line by
221  itself.  If you attempt to add a comment to the end of an assignment, then the
222  comment will be interpreted as part of
223  .B "VALUE."
224  It is useful to observe that the output produced by both the
225  .B "-a"
226  and the
227  .B "'[-n] NAME'"
228  options (without
229  .B "-n"
230  specified) adheres to this file format.
231  .SH BUGS
232  This program does not implement any type of synchronization to ensure that
233  different processes don't stomp on each other when trying to access the
234  nonvolatile RAM simultaneously.  Therefore, corruption of the BIOS parameter
235  values may occur if multiple instances of this program are executed
236  concurrently.
237  .SH AUTHORS
238  David S. Peterson <dsp@llnl.gov> <dave_peterson@pobox.com>
239  .br
240  Stefan Reinauer <stepan@coresystems.de>