blob: 2b9ff496badd5e29c9527a4ca3cbade43b3fd669 [file] [log] [blame]
Stefan Reinauer6540ae52007-07-12 16:35:42 +00001.\"***************************************************************************\
Uwe Hermann50f37b02008-10-31 05:40:04 +00002.\" nvramtool.8
Stefan Reinauer6540ae52007-07-12 16:35:42 +00003.\"***************************************************************************
4.\" Copyright (C) 2002, 2003 The Regents of the University of California.
5.\" Produced at the Lawrence Livermore National Laboratory.
6.\" Written by David S. Peterson <dsp@llnl.gov> <dave_peterson@pobox.com>.
7.\" UCRL-CODE-2003-012
8.\" All rights reserved.
9.\"
Uwe Hermann6e565942008-03-01 19:06:32 +000010.\" This file is part of nvramtool, a utility for reading/writing coreboot
Stefan Reinauerf527e702008-01-18 15:33:49 +000011.\" parameters and displaying information from the coreboot table.
Uwe Hermann6e565942008-03-01 19:06:32 +000012.\" For details, see http://coreboot.org/nvramtool.
Stefan Reinauer6540ae52007-07-12 16:35:42 +000013.\"
14.\" Please also read the file DISCLAIMER which is included in this software
15.\" distribution.
16.\"
17.\" This program is free software; you can redistribute it and/or modify it
18.\" under the terms of the GNU General Public License (as published by the
19.\" Free Software Foundation) version 2, dated June 1991.
20.\"
21.\" This program is distributed in the hope that it will be useful, but
22.\" WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
23.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
24.\" conditions of the GNU General Public License for more details.
25.\"
26.\" You should have received a copy of the GNU General Public License along
27.\" with this program; if not, write to the Free Software Foundation, Inc.,
28.\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
29.\"***************************************************************************/
Uwe Hermann50f37b02008-10-31 05:40:04 +000030.TH NVRAMTOOL 8 "September 2008"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000031.SH NAME
Uwe Hermann6e565942008-03-01 19:06:32 +000032nvramtool \- read/write coreboot-related information
Stefan Reinauer6540ae52007-07-12 16:35:42 +000033.SH SYNOPSIS
Uwe Hermann6e565942008-03-01 19:06:32 +000034.B "nvramtool [OPTS] [-n] -r NAME"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000035.br
Uwe Hermann6e565942008-03-01 19:06:32 +000036.B "nvramtool [OPTS] -e NAME"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000037.br
Uwe Hermann6e565942008-03-01 19:06:32 +000038.B "nvramtool [OPTS] -a"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000039.br
Uwe Hermann6e565942008-03-01 19:06:32 +000040.B "nvramtool [OPTS] -w NAME=VALUE"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000041.br
Uwe Hermann6e565942008-03-01 19:06:32 +000042.B "nvramtool [OPTS] -p INPUT_FILE"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000043.br
Uwe Hermann6e565942008-03-01 19:06:32 +000044.B "nvramtool [OPTS] -i"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000045.br
Uwe Hermann6e565942008-03-01 19:06:32 +000046.B "nvramtool [OPTS] -c [VALUE]"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000047.br
Uwe Hermann6e565942008-03-01 19:06:32 +000048.B "nvramtool [OPTS] -l [ARG]"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000049.br
Uwe Hermann6e565942008-03-01 19:06:32 +000050.B "nvramtool [OPTS] -d"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000051.br
Uwe Hermann6e565942008-03-01 19:06:32 +000052.B "nvramtool [OPTS] -Y"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000053.br
Uwe Hermann6e565942008-03-01 19:06:32 +000054.B "nvramtool [OPTS] -b OUTPUT_FILE"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000055.br
Uwe Hermann6e565942008-03-01 19:06:32 +000056.B "nvramtool [OPTS] -B INPUT_FILE"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000057.br
Uwe Hermann6e565942008-03-01 19:06:32 +000058.B "nvramtool [OPTS] -x"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000059.br
Uwe Hermann6e565942008-03-01 19:06:32 +000060.B "nvramtool [OPTS] -X DUMPFILE"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000061.br
Uwe Hermann6e565942008-03-01 19:06:32 +000062.B "nvramtool [OPTS] -v"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000063.br
Uwe Hermann6e565942008-03-01 19:06:32 +000064.B "nvramtool [OPTS] -h"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000065.SH DESCRIPTION
Uwe Hermann6e565942008-03-01 19:06:32 +000066.B "nvramtool"
Stefan Reinauerf527e702008-01-18 15:33:49 +000067is a utility for reading/writing coreboot parameters and displaying
68information from the coreboot table.
Stefan Reinauer6540ae52007-07-12 16:35:42 +000069
Stefan Reinauerf527e702008-01-18 15:33:49 +000070The coreboot table resides in low physical memory. It is created at boot
71time by coreboot, and contains various system information such as the type
Stefan Reinauer6540ae52007-07-12 16:35:42 +000072of mainboard in use. It specifies locations in the CMOS (nonvolatile RAM)
Stefan Reinauerf527e702008-01-18 15:33:49 +000073where the coreboot parameters are stored.
Stefan Reinauer6540ae52007-07-12 16:35:42 +000074
Stefan Reinauerf527e702008-01-18 15:33:49 +000075This program is intended for (x86-based) systems that use coreboot. For
76information about coreboot, see
Stefan Reinauer6540ae52007-07-12 16:35:42 +000077.br
Stefan Reinauerf527e702008-01-18 15:33:49 +000078http://www.coreboot.org/.
Stefan Reinauer6540ae52007-07-12 16:35:42 +000079.SH PARAMETERS
80.TP
81.B "[-n] -r NAME"
Stefan Reinauerf527e702008-01-18 15:33:49 +000082Show the value of the coreboot parameter given by
Stefan Reinauer6540ae52007-07-12 16:35:42 +000083.B "NAME."
84If
85.B "-n"
86is specified, show only the value. Otherwise show both parameter name and
87value.
88.TP
89.B "-e NAME"
90Show all possible values for parameter given by
91.B "NAME."
92.TP
93.B "-a"
Stefan Reinauerf527e702008-01-18 15:33:49 +000094Show the names and values for all coreboot parameters.
Stefan Reinauer6540ae52007-07-12 16:35:42 +000095.TP
96.B "-w NAME=VALUE"
97Assign
98.B "VALUE"
Stefan Reinauerf527e702008-01-18 15:33:49 +000099to coreboot parameter given by
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000100.B "NAME."
101.TP
102.B "-p INPUT_FILE"
Stefan Reinauerf527e702008-01-18 15:33:49 +0000103Assign values to coreboot parameters according to the contents of
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000104.B "INPUT_FILE."
105The format of this file is described below.
106.TP
107.B "-i"
108This is similar to the
109.B "-p"
110option, except that the contents of the input file are taken from standard
111input.
112.TP
113.B "-c [VALUE]"
114If
115.B "VALUE"
Stefan Reinauerf527e702008-01-18 15:33:49 +0000116is present then set the CMOS checksum for the coreboot parameters to
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000117.B "VALUE."
118Otherwise, show the checksum value.
119.TP
120.B "-l [ARG]"
121If
122.B "ARG"
Stefan Reinauerf527e702008-01-18 15:33:49 +0000123is present then show information from the coreboot table as specified by
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000124.B "ARG."
125Otherwise show all possible values for
126.B "ARG."
127.TP
128.B "-d"
Stefan Reinauerf527e702008-01-18 15:33:49 +0000129Do a low-level dump of the coreboot table.
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000130.TP
131.B "-Y"
132Write CMOS layout information to standard output. If redirected to a file,
133the layout information may be used as input for the
134.B "'-y LAYOUT_FILE'"
135option (see below).
136.TP
137.B "-b OUTPUT_FILE"
138Write the contents of CMOS memory to the binary file
139.B "OUTPUT_FILE."
140The first 14 bytes of
141.B "OUTPUT_FILE"
142do not contain actual CMOS data, and are always written as zeros. This is
143because the first 14 bytes of the CMOS area do not contain CMOS memory. These
144bytes are involved with the functioning of the real time clock.
145.TP
146.B "-B INPUT_FILE"
147Read binary data from
148.B "INPUT_FILE"
149and write the data to CMOS memory. The first 14 bytes of
150.B "INPUT_FILE"
151are skipped and data is written to CMOS starting at the 15th byte of the CMOS
152area. This is because the first 14 bytes of the CMOS area do not contain CMOS
153memory. These bytes are involved with the functioning of the real time clock.
154.TP
155.B "-x"
156Show a hex dump of all CMOS data. The first 14 bytes of the dump do not
157contain actual CMOS data, and are always shown as zeros. This is because the
158first 14 bytes of the CMOS area do not contain CMOS memory. These bytes are
159involved with the functioning of the real time clock.
160.TP
161.B "-X DUMPFILE"
162Read binary data from
163.B "DUMPFILE"
164(presumably a CMOS dumpfile created using the
165.B "-b OUTPUT_FILE"
166option) and show a hex dump of the data.
167.TP
168.B "-v"
169Show version information for this program.
170.TP
171.B "-h"
172Show a help message for this program.
173.SH "OPTIONS"
174In all cases above,
175.B "[OPTS]"
176evaluates to the following:
177
178.B " [-y LAYOUT_FILE | -t]"
179
180The
181.B "'-y LAYOUT_FILE'"
Uwe Hermann6e565942008-03-01 19:06:32 +0000182option tells nvramtool to obtain CMOS layout information from the contents of
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000183.B "LAYOUT_FILE."
184Likewise, the
185.B "'-t'"
Uwe Hermann6e565942008-03-01 19:06:32 +0000186option tells nvramtool to obtain CMOS layout information from the CMOS option
Stefan Reinauerf527e702008-01-18 15:33:49 +0000187table (contained within the coreboot table). If neither option is
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000188specified, the CMOS option table is used by default.
189.B "LAYOUT_FILE"
190follows the format of the
191.B "cmos.layout"
Stefan Reinauerf527e702008-01-18 15:33:49 +0000192files provided by coreboot.
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000193
Stefan Reinauerf527e702008-01-18 15:33:49 +0000194If the coreboot installed on your system was built without specifying
Stefan Reinauer775c04e2009-06-30 15:23:20 +0000195.B "CONFIG_HAVE_OPTION_TABLE,"
Stefan Reinauerf527e702008-01-18 15:33:49 +0000196then the coreboot table will not contain a CMOS option table. In this case,
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000197the
198.B "'-y LAYOUT_FILE'"
199option must be used.
200
201These two options are silently ignored when used in combination with other
202options (such as
203.B "-h,"
204for instance) for which they are not applicable.
205.SH FILE FORMAT
206For the
207.B "-p"
208option,
209.B "INPUT_FILE"
210must consist of a sequence of lines such that each line is either a blank
211line, a comment, or an assignment. A blank line consists only of zero or
212more whitespace characters (spaces and tabs). A comment is constructed as
213follows:
214
215.B " [ws]#[text]"
216
217Here,
218.B "[ws]"
219indicates optional whitespace characters and
220.B "[text]"
221indicates optional text. Blank lines and comments are both ignored. An
222assignment is constructed as follows:
223
224.B " [ws]NAME[ws]=[ws]VALUE[ws]"
225
226Here,
227.B "NAME"
Stefan Reinauerf527e702008-01-18 15:33:49 +0000228is the name of a coreboot parameter and
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000229.B "VALUE"
230is the value that will be assigned to
231.B "NAME."
232.B "VALUE"
233is allowed to contain whitespace characters, but it must begin and end with
234nonwhitespace characters. Note that each comment must appear on a line by
235itself. If you attempt to add a comment to the end of an assignment, then the
236comment will be interpreted as part of
237.B "VALUE."
238It is useful to observe that the output produced by both the
239.B "-a"
240and the
241.B "'[-n] NAME'"
242options (without
243.B "-n"
244specified) adheres to this file format.
245.SH BUGS
246This program does not implement any type of synchronization to ensure that
247different processes don't stomp on each other when trying to access the
248nonvolatile RAM simultaneously. Therefore, corruption of the BIOS parameter
249values may occur if multiple instances of this program are executed
250concurrently.
251.SH AUTHORS
252David S. Peterson <dsp@llnl.gov> <dave_peterson@pobox.com>
253.br
Stefan Reinauera67aab72008-09-27 10:08:28 +0000254Stefan Reinauer <stepan@coresystems.de>