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