blob: a1e4a6c6e94a5797086ffb91b45c619a7a32f6af [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
Patrick Georgib890a122015-03-26 15:17:45 +010027.\" with this program; if not, write to the Free Software Foundation, Inc.
Stefan Reinauer6540ae52007-07-12 16:35:42 +000028.\"***************************************************************************/
Uwe Hermann50f37b02008-10-31 05:40:04 +000029.TH NVRAMTOOL 8 "September 2008"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000030.SH NAME
Uwe Hermann6e565942008-03-01 19:06:32 +000031nvramtool \- read/write coreboot-related information
Stefan Reinauer6540ae52007-07-12 16:35:42 +000032.SH SYNOPSIS
Uwe Hermann6e565942008-03-01 19:06:32 +000033.B "nvramtool [OPTS] [-n] -r NAME"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000034.br
Uwe Hermann6e565942008-03-01 19:06:32 +000035.B "nvramtool [OPTS] -e NAME"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000036.br
Uwe Hermann6e565942008-03-01 19:06:32 +000037.B "nvramtool [OPTS] -a"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000038.br
Uwe Hermann6e565942008-03-01 19:06:32 +000039.B "nvramtool [OPTS] -w NAME=VALUE"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000040.br
Uwe Hermann6e565942008-03-01 19:06:32 +000041.B "nvramtool [OPTS] -p INPUT_FILE"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000042.br
Uwe Hermann6e565942008-03-01 19:06:32 +000043.B "nvramtool [OPTS] -i"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000044.br
Uwe Hermann6e565942008-03-01 19:06:32 +000045.B "nvramtool [OPTS] -c [VALUE]"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000046.br
Uwe Hermann6e565942008-03-01 19:06:32 +000047.B "nvramtool [OPTS] -l [ARG]"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000048.br
Uwe Hermann6e565942008-03-01 19:06:32 +000049.B "nvramtool [OPTS] -d"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000050.br
Uwe Hermann6e565942008-03-01 19:06:32 +000051.B "nvramtool [OPTS] -Y"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000052.br
Uwe Hermann6e565942008-03-01 19:06:32 +000053.B "nvramtool [OPTS] -b OUTPUT_FILE"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000054.br
Uwe Hermann6e565942008-03-01 19:06:32 +000055.B "nvramtool [OPTS] -B INPUT_FILE"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000056.br
Uwe Hermann6e565942008-03-01 19:06:32 +000057.B "nvramtool [OPTS] -x"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000058.br
Uwe Hermann6e565942008-03-01 19:06:32 +000059.B "nvramtool [OPTS] -X DUMPFILE"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000060.br
Uwe Hermann6e565942008-03-01 19:06:32 +000061.B "nvramtool [OPTS] -v"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000062.br
Uwe Hermann6e565942008-03-01 19:06:32 +000063.B "nvramtool [OPTS] -h"
Stefan Reinauer6540ae52007-07-12 16:35:42 +000064.SH DESCRIPTION
Uwe Hermann6e565942008-03-01 19:06:32 +000065.B "nvramtool"
Stefan Reinauerf527e702008-01-18 15:33:49 +000066is a utility for reading/writing coreboot parameters and displaying
67information from the coreboot table.
Stefan Reinauer6540ae52007-07-12 16:35:42 +000068
Stefan Reinauerf527e702008-01-18 15:33:49 +000069The coreboot table resides in low physical memory. It is created at boot
70time by coreboot, and contains various system information such as the type
Stefan Reinauer6540ae52007-07-12 16:35:42 +000071of mainboard in use. It specifies locations in the CMOS (nonvolatile RAM)
Stefan Reinauerf527e702008-01-18 15:33:49 +000072where the coreboot parameters are stored.
Stefan Reinauer6540ae52007-07-12 16:35:42 +000073
Stefan Reinauerf527e702008-01-18 15:33:49 +000074This program is intended for (x86-based) systems that use coreboot. For
75information about coreboot, see
Stefan Reinauer6540ae52007-07-12 16:35:42 +000076.br
Stefan Reinauerf527e702008-01-18 15:33:49 +000077http://www.coreboot.org/.
Stefan Reinauer6540ae52007-07-12 16:35:42 +000078.SH PARAMETERS
79.TP
80.B "[-n] -r NAME"
Stefan Reinauerf527e702008-01-18 15:33:49 +000081Show the value of the coreboot parameter given by
Stefan Reinauer6540ae52007-07-12 16:35:42 +000082.B "NAME."
83If
84.B "-n"
85is specified, show only the value. Otherwise show both parameter name and
86value.
87.TP
88.B "-e NAME"
89Show all possible values for parameter given by
90.B "NAME."
91.TP
92.B "-a"
Stefan Reinauerf527e702008-01-18 15:33:49 +000093Show the names and values for all coreboot parameters.
Stefan Reinauer6540ae52007-07-12 16:35:42 +000094.TP
95.B "-w NAME=VALUE"
96Assign
97.B "VALUE"
Stefan Reinauerf527e702008-01-18 15:33:49 +000098to coreboot parameter given by
Stefan Reinauer6540ae52007-07-12 16:35:42 +000099.B "NAME."
100.TP
101.B "-p INPUT_FILE"
Stefan Reinauerf527e702008-01-18 15:33:49 +0000102Assign values to coreboot parameters according to the contents of
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000103.B "INPUT_FILE."
104The format of this file is described below.
105.TP
106.B "-i"
107This is similar to the
108.B "-p"
109option, except that the contents of the input file are taken from standard
110input.
111.TP
112.B "-c [VALUE]"
113If
114.B "VALUE"
Stefan Reinauerf527e702008-01-18 15:33:49 +0000115is present then set the CMOS checksum for the coreboot parameters to
Stefan Reinauer14e22772010-04-27 06:56:47 +0000116.B "VALUE."
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000117Otherwise, show the checksum value.
118.TP
119.B "-l [ARG]"
120If
121.B "ARG"
Stefan Reinauerf527e702008-01-18 15:33:49 +0000122is present then show information from the coreboot table as specified by
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000123.B "ARG."
124Otherwise show all possible values for
125.B "ARG."
126.TP
127.B "-d"
Stefan Reinauerf527e702008-01-18 15:33:49 +0000128Do a low-level dump of the coreboot table.
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000129.TP
130.B "-Y"
131Write CMOS layout information to standard output. If redirected to a file,
132the layout information may be used as input for the
133.B "'-y LAYOUT_FILE'"
134option (see below).
135.TP
136.B "-b OUTPUT_FILE"
137Write the contents of CMOS memory to the binary file
138.B "OUTPUT_FILE."
139The first 14 bytes of
140.B "OUTPUT_FILE"
141do not contain actual CMOS data, and are always written as zeros. This is
142because the first 14 bytes of the CMOS area do not contain CMOS memory. These
143bytes are involved with the functioning of the real time clock.
144.TP
145.B "-B INPUT_FILE"
146Read binary data from
147.B "INPUT_FILE"
148and write the data to CMOS memory. The first 14 bytes of
149.B "INPUT_FILE"
150are skipped and data is written to CMOS starting at the 15th byte of the CMOS
151area. This is because the first 14 bytes of the CMOS area do not contain CMOS
152memory. These bytes are involved with the functioning of the real time clock.
153.TP
154.B "-x"
155Show a hex dump of all CMOS data. The first 14 bytes of the dump do not
156contain actual CMOS data, and are always shown as zeros. This is because the
157first 14 bytes of the CMOS area do not contain CMOS memory. These bytes are
158involved with the functioning of the real time clock.
159.TP
160.B "-X DUMPFILE"
161Read binary data from
162.B "DUMPFILE"
163(presumably a CMOS dumpfile created using the
164.B "-b OUTPUT_FILE"
165option) and show a hex dump of the data.
166.TP
167.B "-v"
168Show version information for this program.
169.TP
170.B "-h"
171Show a help message for this program.
172.SH "OPTIONS"
173In all cases above,
174.B "[OPTS]"
175evaluates to the following:
176
177.B " [-y LAYOUT_FILE | -t]"
178
179The
180.B "'-y LAYOUT_FILE'"
Uwe Hermann6e565942008-03-01 19:06:32 +0000181option tells nvramtool to obtain CMOS layout information from the contents of
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000182.B "LAYOUT_FILE."
183Likewise, the
184.B "'-t'"
Uwe Hermann6e565942008-03-01 19:06:32 +0000185option tells nvramtool to obtain CMOS layout information from the CMOS option
Stefan Reinauerf527e702008-01-18 15:33:49 +0000186table (contained within the coreboot table). If neither option is
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000187specified, the CMOS option table is used by default.
188.B "LAYOUT_FILE"
189follows the format of the
190.B "cmos.layout"
Stefan Reinauerf527e702008-01-18 15:33:49 +0000191files provided by coreboot.
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000192
Stefan Reinauerf527e702008-01-18 15:33:49 +0000193If the coreboot installed on your system was built without specifying
Stefan Reinauer775c04e2009-06-30 15:23:20 +0000194.B "CONFIG_HAVE_OPTION_TABLE,"
Stefan Reinauerf527e702008-01-18 15:33:49 +0000195then the coreboot table will not contain a CMOS option table. In this case,
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000196the
197.B "'-y LAYOUT_FILE'"
198option must be used.
199
200These two options are silently ignored when used in combination with other
201options (such as
202.B "-h,"
203for instance) for which they are not applicable.
204.SH FILE FORMAT
205For the
206.B "-p"
207option,
208.B "INPUT_FILE"
209must consist of a sequence of lines such that each line is either a blank
210line, a comment, or an assignment. A blank line consists only of zero or
211more whitespace characters (spaces and tabs). A comment is constructed as
212follows:
213
214.B " [ws]#[text]"
215
216Here,
217.B "[ws]"
218indicates optional whitespace characters and
219.B "[text]"
220indicates optional text. Blank lines and comments are both ignored. An
221assignment is constructed as follows:
222
223.B " [ws]NAME[ws]=[ws]VALUE[ws]"
224
225Here,
226.B "NAME"
Stefan Reinauerf527e702008-01-18 15:33:49 +0000227is the name of a coreboot parameter and
Stefan Reinauer6540ae52007-07-12 16:35:42 +0000228.B "VALUE"
229is the value that will be assigned to
230.B "NAME."
231.B "VALUE"
232is allowed to contain whitespace characters, but it must begin and end with
233nonwhitespace characters. Note that each comment must appear on a line by
234itself. If you attempt to add a comment to the end of an assignment, then the
235comment will be interpreted as part of
236.B "VALUE."
237It is useful to observe that the output produced by both the
238.B "-a"
239and the
240.B "'[-n] NAME'"
241options (without
242.B "-n"
243specified) adheres to this file format.
244.SH BUGS
245This program does not implement any type of synchronization to ensure that
246different processes don't stomp on each other when trying to access the
247nonvolatile RAM simultaneously. Therefore, corruption of the BIOS parameter
248values may occur if multiple instances of this program are executed
249concurrently.
250.SH AUTHORS
251David S. Peterson <dsp@llnl.gov> <dave_peterson@pobox.com>
252.br
Stefan Reinauera67aab72008-09-27 10:08:28 +0000253Stefan Reinauer <stepan@coresystems.de>