1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-26 22:52:34 +02:00

45 Commits

Author SHA1 Message Date
Thomas Heijligen
90286fe643 printf: Use inttype.h macros for format strings
DJGPP for compiling DOS has other sizes for the normal int types and
therefore throwing errors when using %i %d or %x with uint32_t.

Fix these warnings by using the macros created for it and provided in
inttypes.h.

Change-Id: Ia75b6df981ce60c891161fe553c7ceab8570178d
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/73040
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-04-27 09:36:46 +00:00
Felix Singer
8390d73806 cbtables.c/search_lb_records: Drop unused variable count
Clang 15 complains about it. Remove it.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
Change-Id: I340208f513bed57a9cc2bba880a2400352c5cc42
Reviewed-on: https://review.coreboot.org/c/flashrom/+/70247
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-06 21:22:00 +00:00
Thomas Heijligen
b8f364bece physmap: rename to hwaccess_physmap, create own header
Line up physmap with the other hwaccess related code.

Change-Id: Ieba6f4e94cfc3e668fcb8b3c978de5908aed2592
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/60113
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-12-22 22:53:47 +00:00
Angel Pons
dc7c99b99e cbtable.c: Use correct format specifier for size_t
Fixes building on 32-bit x86 systems.

Change-Id: I8d798804f8055cdaff45f123e4f0d6ab4b71ba60
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/51478
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
2021-03-16 10:06:59 +00:00
Edward O'Callaghan
a2d9a40ec4 cbtable.c: don't assume high addresses can fully map 1 MiB
Forward port the downstream `commit b17e9e41838`.

When using a forwarding table entry for finding the coreboot table
don't assume one has access to a full 1 MiB where the forwarding
table entry points to. The reason is that the 1 MiB may cover address
regions that have differing cacheability type. As such the kernel will
complain and the mapping will fail. Instead, check the header first then
map in the bytes that it indicates after sanity validation. That way
there is no attempt at requesting an invalid mapping that spans different
memory cacheability attributes.

V.2: Incorperate Nico's and Angels comments from upstream.

BUG=b:66681446
BRANCH=None
TEST=Can successfully run 'flashrom -p host --wp-status' on kahlee
     without generating PAT errors.

Original-Change-Id: Ic6c5832b069300cced66e11f4ca4a0bbc6e496de
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/685608
Original-Reviewed-by: Martin Roth <martinroth@chromium.org>
Original-Reviewed-by: Justin TerAvest <teravest@chromium.org>

Change-Id: I43705c19dd7c816098d03f528bde6f180c4c8f24
Signed-off-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/37240
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sam McNally <sammc@google.com>
2021-01-25 22:39:13 +00:00
David Hendricks
17d463718d tree: Remove unneeded semicolons after loops
Trivial cleanup

Change-Id: Id93a019a39b765c70b1a4eaeb25d9b582c3e4141
Signed-off-by: David Hendricks <david.hendricks@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/42742
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-06-24 19:24:57 +00:00
Edward O'Callaghan
1d80d64587 cbtable.c: Factor out lb_table_validation logic
Write a pure function for the table validation logic, it is
easier to unit-test.

Change-Id: I07b0f95ec0443fa6a8f54eb93f4a7ea1875cccad
Signed-off-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/37239
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2019-11-28 10:00:21 +00:00
Edward O'Callaghan
4a55e68858 cbtable.c: Factor out lb_header_validation logic
Write a pure function for the header validation logic, it is
easier to unit-test.

Change-Id: Ia288bcbc5c371329952a6efba30ccf0e18965a3d
Signed-off-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/37238
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2019-11-28 10:00:11 +00:00
Nico Huber
519be66fc5 Fix -Wsign-compare trouble
Mostly by changing to `unsigned` types where applicable, sometimes
`signed` types, and casting as a last resort.

Change-Id: I08895543ffb7a48058bcf91ef6500ca113f2d305
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/30409
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jacob Garber <jgarber1@ualberta.ca>
2019-07-31 08:26:59 +00:00
Elyes HAOUAS
ac01baa073 Remove unneeded white spaces
Change-Id: I90f171924790ced74a62ca344fee8607607aa480
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26652
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-06-24 13:44:51 +00:00
Elyes HAOUAS
e083880279 Remove address from GPLv2 headers
Change-Id: I7bfc339673cbf5ee2d2ff7564c4db04ca088d0a4
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/25381
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-04-24 20:21:41 +00:00
Elyes HAOUAS
124ef38f7a Fix whitespace errors
Change-Id: Ic2d3bb9d8581a0471a8568a130f893b34dddf113
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/25380
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-04-24 20:18:58 +00:00
Nico Huber
441d2a4f33 Make image parameter of cb_check_image const
Change-Id: I811b3d6f1710154e055b03d5f27b1a8d9b3c0a43
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/17943
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-01-13 17:32:32 +01:00
Paul Menzel
592d99c98f cbtable.c: Do not unnecessarily duplicate strings
The strdup calls were a leftover that slipped through the cleanup in
r1577.

Found-by: Valgrind 3.10.0

Corresponding to flashrom svn r1854.

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2014-11-01 23:12:33 +00:00
Carl-Daniel Hailfinger
43eac03945 Clean up physmap, fix unaligned mapping problems
Convert all physmaps in dmi.c to use aligned readonly maps.
Convert all physmaps in cbtable.c to use unaligned readonly maps.
Make physunmap() a generic architecture-independent wrapper.
Add physunmap_unaligned() to complement physmap*_unaligned().

Corresponding to flashrom svn r1765.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2014-03-05 00:16:16 +00:00
Niklas Söderlund
5d3072030a Remove exit call and mayfail parameter from physmap_common()
The only call path where exit was reached was from physmap functions.

Callers of physmap() et al. which were not prepared to handle
ERROR_PTR return values have been adjusted.
physmap_try_ro() has been renamed to physmap_ro() and physmap_common()
slightly refactored due to the now removed *FAIL parameters.

Corresponding to flashrom svn r1745.

Signed-off-by: Niklas Söderlund <niso@kth.se>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2013-09-14 09:02:27 +00:00
Stefan Tauner
c6fa32d2b5 Introduce msg_*warn
Also, unify all outputs of "Warning:" and "Error:" to use normal
capitalization instead of mixing it with all capitals.

Corresponding to flashrom svn r1643.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Idwer Vollering <vidwer@gmail.com>
2013-01-04 22:54:07 +00:00
Carl-Daniel Hailfinger
1c6d2ff03d Some ISO C fixes
This patch just fixes a limited number of bits not conforming to c99 by using
 - __asm__ instead of just asm
 - {0} instead of {} for struct initialization
 - h_addr_list[0] instead of h_addr to access the host address in
   struct hostent
 - #include <strings.h> where needed (for ffs and strcasecmp)

Based on a previous patch by Carl-Daniel.

Corresponding to flashrom svn r1585.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2012-08-27 00:44:42 +00:00
Stefan Tauner
b4e06bde9b Refactor the -p internal:mainboard handling
This patch gets rid of some global variables and makes lots of bits along
the code path that control the board enable execution more generic and
clearer. From now on flashrom aborts on a few more occasions that should be
safer for the user. For example it aborts if the enable function for the
specified mainboard (enable) can not be found.

Parts of the board_match_cbname refactoring were done by Carl-Daniel.

Corresponding to flashrom svn r1577.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2012-08-20 00:24:22 +00:00
Stefan Tauner
37e8686284 Move show_id to where it belongs
And remove the unused force parameter.

Corresponding to flashrom svn r1569.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2012-08-11 16:07:08 +00:00
Carl-Daniel Hailfinger
60d9bd267e Portability fixes and cleanups
Move Mac OS X IOKit/DirectHW availability checks in the Makefile from
compiler check to pciutils check.

Print the compiler error messages for feature detection.

Add DOS libpci in the Makefile includes only if a PCI-based programmer
was requested.

Restrict mmap usage in ich_descriptors_tool to Unix style systems.

Build ich_descriptors_tool with the correct .exe extension on
DOS/Windows.

Build ich_descriptors_tool by default on x86. (Patch by Stefan Tauner)

Print the Windows version instead of "unknown machine" on Windows.

Don't #define our own __DARWIN__, use the standard OS X detection
method.

Update the README.

Add more generated files to svn:ignore

Corresponding to flashrom svn r1567.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2012-08-09 23:34:41 +00:00
Carl-Daniel Hailfinger
2d927fbd7b Replace --mainboard with -p internal:mainboard
NOTE:
The --list-supported-wiki output changed to use -p internal:mainboard=
instead of -m
The --list-supported output changed the heading of the mainboard list
from

Vendor Board   Status  Required option
to
Vendor Board   Status  Required value for
                       -p internal:mainboard=

Fix lb_vendor_dev_from_string() not to write to the supplied string.

Corresponding to flashrom svn r1483.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2012-01-04 00:48:27 +00:00
Stefan Reinauer
12a04eb5d6 Coreboot table handling: make debug message msg_pdbg
Corresponding to flashrom svn r1284.

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2011-04-01 18:05:20 +00:00
Peter Huewe
73f8ec8b1e Fix sparse warning: Using plain integer as NULL pointer
This patch fixes the "using plain integer as NULL pointer" warnings
generated by running sparse on the flashrom source.

Corresponding to flashrom svn r1255.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Mathias Krause <mathias.krause@secunet.com>
Acked-by: Stefan Reinauer <stepan@coreboot.org>
2011-01-24 19:15:51 +00:00
Carl-Daniel Hailfinger
f992c19fca Rename Direct I/O library to DirectHW
The Direct I/O library for Mac OS X is now called DirectHW to make sure
people can find it via an internet search.

DirectIO was a generic name for a concept and thus not a good
distinguisher for a library.

Corresponding to flashrom svn r1198.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Idwer Vollering <vidwer@gmail.com>
2010-10-06 23:16:10 +00:00
Stefan Reinauer
18430a08aa Remove duplicate includes from the code
Corresponding to flashrom svn r1196.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-10-06 02:56:44 +00:00
Patrick Georgi
ed7a964786 Implement libpayload support and improve life for DOS based flashrom, too
Corresponding to flashrom svn r1181.

Change the physmap* behaviour to use (void*)-1 as error code instead
of NULL. That way, 1:1 mapped memory can be supported properly
because (void*)0 is not a magic pointer anymore.
(void*)-1 on the other hand is a rather unlikely memory offset, so that
should be safe.
  
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-09-25 22:53:44 +00:00
Carl-Daniel Hailfinger
5b997c3ed6 Split off programmer.h from flash.h
Programmer specific functions are of absolutely no interest to any file
except those dealing with programmer specific actions (special SPI
commands and the generic core).

The new header structure is as follows (and yes, improvements are
possible):
flashchips.h  flash chip IDs
chipdrivers.h  chip-specific read/write/... functions
flash.h  common header for all stuff that doesn't fit elsewhere
hwaccess.h hardware access functions
programmer.h  programmer specific functions
coreboot_tables.h  header from coreboot, internal programmer only
spi.h SPI command definitions

Corresponding to flashrom svn r1112.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2010-07-27 22:41:39 +00:00
Carl-Daniel Hailfinger
831e8f4abb Remove unneeded #include statements completely
Unistd.h was only used to get a definition of NULL in all files. Add our
own NULL #define and remove unistd.h from flash.h
stdio.h has no place in flash.h, it should be included only in files
which really need it.
Add #include statements in individual .c files where needed.

Replace a few printf with msg_* to eliminate the need for stdio.h.

Corresponding to flashrom svn r1021.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2010-05-30 22:24:40 +00:00
Sean Nelson
316a29f33f Convert various prints to use msg_p* and msg_g* respectively
Convert programmer print messages to msg_p* convert general print messages to msg_g* a few fixes as suggested by Carl-Daniel.

Corresponding to flashrom svn r997.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-05-07 20:09:04 +00:00
Carl-Daniel Hailfinger
baaffe0831 Create a physical memory mapping function which requests cached readonly memory
This should take care of picky Linux kernels which do not allow uncached
mappings to cached areas. Handle mapping failure gracefully (no forced
exit()) if the caller specifies it.

Such cached areas which can handle mapping failure are DMI tables and
coreboot tables. On failure we just ignore those tables. That is not
perfect, but a lot better than aborting flashrom due to an error in
nonessential functionality.

This should fix flashrom on a sizable number of machines where it
currently aborts early.

Yes, I could have exploited a Linux kernel bug to "solve" this, but
relying on such bugs is not exactly the best idea.

Corresponding to flashrom svn r889.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Vincent Pelletier <plr.vincent@gmail.com>
2010-02-02 11:09:03 +00:00
Michael Karcher
e7f3209487 Enable -Wshadow, clean code for that
This is not just for fun. We hit a real bug on BSD with the outl macros.
The macro variable tmp collided with the tmp from outer scope.

second revision, now also taking care of inb/inw/inl. While that shadowing
did not introduce bugs (yet), of course it breaks the build on BSD when
-Wshadow is enabled.

Corresponding to flashrom svn r860.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Luc Verhaegen <libv@skynet.be>
2010-01-12 15:36:24 +00:00
Carl-Daniel Hailfinger
66ef4e5ff3 Internal (onboard) programming was the only feature which could not be disabled
Make various pieces of code conditional on support for internal
programming. Code shared between PCI device programmers and onboard
programming is now conditional as well.

It is now possible to build only with dummy support:
make CONFIG_INTERNAL=no CONFIG_NIC3COM=no CONFIG_SATASII=no
CONFIG_DRKAISER=no CONFIG_SERPROG=no CONFIG_FT2232SPI=no

This allows building for a specific use case only, and it also
facilitates porting to a new architecture because it is possible to
focus on highlevel code only.

Note: Either internal or dummy programmer needs to be compiled in due to
the current behaviour of always picking a default programmer if -p is
not specified. Picking an arbitrary external programmer as default  
wouldn't make sense.

Build and runtime tested in all 1024 possible build combinations. The
only failures are by design as mentioned above.

Corresponding to flashrom svn r797.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2009-12-13 22:28:00 +00:00
Carl-Daniel Hailfinger
be726817f7 Remove unnecessary #include files
Serprog compilation is now controlled by a Makefile variable.
Replace munmap with physunmap where appropriate.

Corresponding to flashrom svn r671.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2009-08-09 12:44:08 +00:00
Carl-Daniel Hailfinger
bc25f947fe Boards with coreboot have a cbtable containing vendor and board name
Flashrom tries to match these with board enable entries in its database.
If no such board enable entry exists because the board doesn't need one,
flashrom complains. Silence that complaint.

Corresponding to flashrom svn r668.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Slightly updated and
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2009-07-30 13:30:17 +00:00
Uwe Hermann
2cac6860c3 Drop unused/duplicated #includes and some dead code
Build-tested on 32bit x86.

Corresponding to flashrom svn r521.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2009-05-16 22:05:42 +00:00
Daniel McLellan
d02b73f9e9 Fix spelling error in comment
Author: raijin

Corresponding to flashrom svn r506.

Signed-off-by: Daniel McLellan <daniel.mclellan@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>
2009-05-14 12:41:00 +00:00
Uwe Hermann
7b2969be53 Some coding style and consistency fixes
Corresponding to flashrom svn r429 and coreboot v2 svn r4117.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2009-04-15 10:52:49 +00:00
Stefan Reinauer
2d853bb587 This patch adds "high coreboot table support" to coreboot version 2
Some bootloaders seem to overwrite memory starting at 0x600, thus destroying
the coreboot table integrity, rendering the table useless.

By moving the table to the high tables area (if it's activated), this problem
is fixed.

In order to move the table, a 40 bytes mini coreboot table with a single sub
table is placed at 0x500/0x530 that points to the real coreboot table. This is
comparable to the ACPI RSDT or the MP floating table.

This patch also adds "table forward" support to flashrom and nvramtool.

Corresponding to flashrom svn r421 and coreboot v2 svn r4012.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>
2009-03-17 14:39:25 +00:00
Stefan Reinauer
f79edb9a11 Darwin / Mac OS X
Through DirectIO from coresystems GmbH we now support Darwin/Mac OS X.
DirectIO is available at http://www.coresystems.de/en/directio

Corresponding to flashrom svn r399 and coreboot v2 svn r3905.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2009-01-26 01:23:31 +00:00
Stefan Reinauer
0593f21f10 Abstract mmap() in physmap.c and only open /dev/mem on the first physmap() call
Corresponding to flashrom svn r397 and coreboot v2 svn r3903.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2009-01-26 01:10:48 +00:00
Peter Stuge
a0d75a07b4 Forgot some things in r3899
Corresponding to flashrom svn r395 and coreboot v2 svn r3900.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2009-01-26 00:19:36 +00:00
Peter Stuge
2dc3aaac4c Little readability improvement in cbtable.c:coreboot_init()
Corresponding to flashrom svn r394 and coreboot v2 svn r3899.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2009-01-26 00:15:56 +00:00
Peter Stuge
ccf8c6c794 Check all mmap() calls and print helpful Linux error message
Corresponding to flashrom svn r386 and coreboot v2 svn r3890.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2009-01-23 05:23:06 +00:00
Stefan Reinauer
2fbe6247a9 Rename linuxbios_* files in utils repository
Corresponding to flashrom svn r179 and coreboot v2 svn r3058.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-01-18 16:17:44 +00:00