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