coreboot/util/cbmem
Stefan Reinauer d13688a7b8 cbmem utility: compatibility with older coreboot versions
Commit b8ad224 changed the memory address in lb_cbmem_ref coreboot
table entries from a pointer to a uint64_t. This change was introduced
to make the cbmem utility work on both 32bit and 64bit userland.
Unfortunately, this broke the cbmem utility running on older versions
of coreboot because they were still providing a 32bit only field for
the address while the cbmem utility would now take the following 4
bytes as upper 32bits of a pointer that can obviously not be
mmapped. This change checks if the size of the lb_cbmem_ref structure
provided by coreboot is smaller than expected, and if so, ignore the
upper 32bit of the address read.

BUG=chrome-os-partner:18638
TEST=Build image, boot image on Link with original firmware,
     See it not rebooting.
BRANCH=none

Signed-off-by: Stefan Reinauer <reinauer@google.com>

Change-Id: I9dff766a89663322b1854b425ca5fd32e9e502d7
Reviewed-on: https://gerrit.chromium.org/gerrit/48725
Commit-Queue: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2013-04-25 15:49:49 -07:00
..
cbmem.c cbmem utility: compatibility with older coreboot versions 2013-04-25 15:49:49 -07:00
Makefile cbmem: Fix dependency generation 2013-04-16 17:33:47 -07:00