blob: 5d4764c08bb6c6c5ca52f2df249d658a9549aaec [file] [log] [blame]
Stefan Reinauer6540ae52007-07-12 16:35:42 +00001/*****************************************************************************\
2 * input_file.h
Uwe Hermann1a6177b2008-01-25 15:08:37 +00003 * $Id$
Stefan Reinauer6540ae52007-07-12 16:35:42 +00004 *****************************************************************************
5 * Copyright (C) 2002-2005 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\*****************************************************************************/
31
Uwe Hermann6e565942008-03-01 19:06:32 +000032#ifndef INPUT_FILE_H
33#define INPUT_FILE_H
Stefan Reinauer6540ae52007-07-12 16:35:42 +000034
35#include "common.h"
36
37typedef struct cmos_write_t cmos_write_t;
38
39/* This represents a pending CMOS write operation. When changing multiple
40 * CMOS parameter values, we first represent the changes as a list of pending
41 * write operations. This allows us to sanity check all write operations
42 * before any of them are performed.
43 */
44struct cmos_write_t
45 { unsigned bit;
46 unsigned length;
47 unsigned long long value;
48 cmos_write_t *next;
49 };
50
51cmos_write_t * process_input_file (FILE *f);
52void do_cmos_writes (cmos_write_t *list);
53
54extern const char assignment_regex[];
55
Uwe Hermann6e565942008-03-01 19:06:32 +000056#endif /* INPUT_FILE_H */