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