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