[coreboot] Patch set updated for coreboot: b28607c Fix cbmem to work on 64 bit platforms
Stefan Reinauer (email@example.com)
gerrit at coreboot.org
Wed Nov 7 19:58:26 CET 2012
Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1715
Author: Vadim Bendebury <vbendeb at chromium.org>
Date: Wed Aug 29 15:03:09 2012 -0700
Fix cbmem to work on 64 bit platforms
For some reason which I fail to understand, specifying endiannes using
'@' (which means 'native' and should be the same as '<' on x86
platforms) causes cbmem.py to crash the machine on 64 bit systems.
What happens is that the addresses read from various table headers'
struct representations do not make sense, when bogus address gets
passed to get_phys_mem, the crash happens while that function is
dlaurie@ found out that replacing "@" with "<" in fact fixes the
issue. After some investigation I am just submitting this fix without
much understanding of the root cause.
Signed-off-by: Duncan Laurie <dlaurie at chromium.org>
Signed-off-by: Vadim Bendebury <vbendeb at chromium.org>
util/cbmem/cbmem.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/cbmem/cbmem.py b/util/cbmem/cbmem.py
index f4f3e88..839393b 100755
@@ -57,7 +57,7 @@ def get_phys_mem(addr, size):
def __init__(cls, name, bases, dct):
struct_members = dct["struct_members"]
- cls.struct_fmt = "@"
+ cls.struct_fmt = "<"
for char, name in struct_members:
cls.struct_fmt += char
cls.struct_len = struct.calcsize(cls.struct_fmt)
More information about the coreboot