coreboot-kgpe-d16/util/nvramtool
Andrew Engelbrecht e8905312f0 nvramtool: cmos_read(): Use malloc() instead of alloca()
Fixes crash occurring when 'nvramtool -a' tried to free a prematurely
freed pointer. (Tested on x60)

malloc() is correct because the pointer is accessed outside the calling
function. The pointer is freed in the parent function list_cmos_entry().

Change-Id: I1723f09740657f0f0d9e6954bd6d11c0a3820a42
Signed-off-by: Andrew Engelbrecht <sudoman@ninthfloor.org>
Reviewed-on: http://review.coreboot.org/7620
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2014-12-02 10:15:00 +01:00
..
accessors nvramtool: write size field more obviously 2013-11-19 00:59:55 +01:00
cli nvramtool: check for successful seek 2014-08-10 08:20:09 +02:00
COPYING
ChangeLog
DISCLAIMER
Makefile utils: Install man pages as non-executable (chmod 644) 2014-01-31 20:14:58 +01:00
Makefile.inc GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
README
cbfs.c nvramtool: Close file after use 2014-08-03 15:19:27 +02:00
cbfs.h Change "VERSION*" to more determined name "CBFS_HEADER_VERSION*". 2013-01-04 06:27:33 +01:00
cmos_lowlevel.c nvramtool: cmos_read(): Use malloc() instead of alloca() 2014-12-02 10:15:00 +01:00
cmos_lowlevel.h
cmos_ops.c nvramtool: plug some memory leaks 2014-08-12 22:15:20 +02:00
cmos_ops.h
common.c nvramtool: Unify nvramtool and build_opt_tbl 2012-04-21 09:36:24 +02:00
common.h build: build coreboot on mingw. 2012-10-22 21:49:54 +02:00
compute_ip_checksum.c
coreboot_tables.h
hexdump.c hexdump: fix compiler warning 2012-04-07 19:57:42 +02:00
hexdump.h
input_file.c
input_file.h
ip_checksum.h
layout.c
layout.h nvramtool: Unify nvramtool and build_opt_tbl 2012-04-21 09:36:24 +02:00
lbtable.c nvramtool: reduce memory mapping 2013-02-22 16:04:03 +01:00
lbtable.h
nvramtool.spec
reg_expr.c
reg_expr.h
win32mmap.c build: build coreboot on mingw. 2012-10-22 21:49:54 +02:00

README

Summary of Operation
--------------------
nvramtool is a utility for reading/writing coreboot parameters and
displaying information from the coreboot table.  It is intended for x86-based
systems (both 32-bit and 64-bit) that use coreboot.

The coreboot table resides in low physical memory, and may be accessed
through the /dev/mem interface.  It is created at boot time by coreboot, and
contains various system information such as the type of mainboard in use.  It
specifies locations in the CMOS (nonvolatile RAM) where the coreboot
parameters are stored.

For information about coreboot, see http://www.coreboot.org/.

Ideas for Future Improvements
-----------------------------
1.  Move the core functionality of this program into a shared library.
2.  Consider adding options for displaying other BIOS-provided information
    such as the MP table, ACPI table, PCI IRQ routing table, etc.