[coreboot-gerrit] Patch set updated for coreboot: cbfstool: don't rewrite param.baseaddress in cbfs_add
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Thu Jan 21 15:19:08 CET 2016
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13063
-gerrit
commit 7e23b16f5f57fbf555c6a1afc166944a6e19e656
Author: Patrick Georgi <pgeorgi at chromium.org>
Date: Wed Jan 20 18:45:07 2016 +0100
cbfstool: don't rewrite param.baseaddress in cbfs_add
cbfs_add calculated a base address out of the alignment specification
and stored it in param.baseaddress.
This worked when every cbfstool invocation only added a single file, but
with -r REGION1,REGION2,... multiple additions can happen.
In that case, the second (and later) additions would have both alignment
and baseaddress set, which isn't allowed, aborting the process.
Change-Id: I8c5a512dbe3c97e08c5bcd92b5541b58f65c63b3
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
---
util/cbfstool/cbfstool.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c
index 8ad66c4..6d887d8 100644
--- a/util/cbfstool/cbfstool.c
+++ b/util/cbfstool/cbfstool.c
@@ -520,6 +520,7 @@ static int cbfs_add(void)
{
int32_t address;
convert_buffer_t convert;
+ uint32_t local_baseaddress = param.baseaddress;
if (param.alignment && param.baseaddress) {
ERROR("Cannot specify both alignment and base address\n");
@@ -541,13 +542,13 @@ static int cbfs_add(void)
size_t metadata_sz = sizeof(struct cbfs_file_attr_compression);
if (do_cbfs_locate(&address, metadata_sz))
return 1;
- param.baseaddress = address;
+ local_baseaddress = address;
}
return cbfs_add_component(param.filename,
param.name,
param.type,
- param.baseaddress,
+ local_baseaddress,
param.headeroffset,
convert);
}
More information about the coreboot-gerrit
mailing list