[coreboot-gerrit] New patch to review for coreboot: cbfstool: fix alignment to 64 byte
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Tue Jul 14 22:34:59 CEST 2015
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10918
-gerrit
commit 7536f69603348b60c6ea13973027dd9dd544478e
Author: Patrick Georgi <pgeorgi at chromium.org>
Date: Tue Jul 14 22:18:23 2015 +0200
cbfstool: fix alignment to 64 byte
It's not like we _ever_ changed it, so drop the option and make cbfstool
use the default. always.
Change-Id: Ia1b99fda03d5852137a362422e979f4a4dffc5ed
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
---
Makefile.inc | 2 +-
util/cbfstool/cbfstool.c | 23 +++++++----------------
2 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc
index 347e07b..14fa990 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -573,7 +573,7 @@ prebuilt-files = $(foreach file,$(cbfs-files), $(call extract_nth,1,$(file)))
$(obj)/coreboot.pre1: $(objcbfs)/bootblock.bin $$(prebuilt-files) $(FMAPTOOL) $(CBFSTOOL) $$(cpu_ucode_cbfs_file)
$(CBFSTOOL) $@.tmp create \
- -B $(objcbfs)/bootblock.bin -a 64 \
+ -B $(objcbfs)/bootblock.bin \
$(CBFSTOOL_PRE1_OPTS)
$(prebuild-files) true
$(call add-cpu-microcode-to-cbfs,$@.tmp)
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c
index 06d0cef..4469cb4 100644
--- a/util/cbfstool/cbfstool.c
+++ b/util/cbfstool/cbfstool.c
@@ -65,7 +65,6 @@ static struct param {
uint32_t headeroffset_assigned;
uint32_t entrypoint;
uint32_t size;
- uint32_t alignment;
uint32_t pagesize;
uint32_t cbfsoffset;
uint32_t cbfsoffset_assigned;
@@ -372,9 +371,8 @@ static int cbfs_create(void)
param.baseaddress_assigned ||
param.headeroffset_assigned ||
param.cbfsoffset_assigned ||
- param.alignment ||
param.bootblock) {
- ERROR("Since -M was provided, -m, -s, -b, -o, -H, -a, and -B should be omitted\n");
+ ERROR("Since -M was provided, -m, -s, -b, -o, -H, and -B should be omitted\n");
return 1;
}
@@ -394,9 +392,6 @@ static int cbfs_create(void)
return 1;
}
- if (!param.alignment)
- param.alignment = 64; // default CBFS entry alignment
-
// Set default offsets. x86, as usual, needs to be a special snowflake.
if (!param.baseaddress_assigned) {
if (param.arch == CBFS_ARCHITECTURE_X86) {
@@ -430,7 +425,7 @@ static int cbfs_create(void)
} else {
param.cbfsoffset = align_up(param.headeroffset +
sizeof(struct cbfs_header),
- param.alignment);
+ 64);
DEBUG("CBFS entries start beind master header (%#x).\n",
param.cbfsoffset);
}
@@ -438,7 +433,7 @@ static int cbfs_create(void)
int ret = cbfs_legacy_image_create(&image,
param.arch,
- param.alignment,
+ 64,
&bootblock,
param.baseaddress,
param.headeroffset,
@@ -474,12 +469,12 @@ static int cbfs_locate(void)
}
int32_t address = cbfs_locate_entry(&image, param.name, buffer.size,
- param.pagesize, param.alignment);
+ param.pagesize, 64);
buffer_delete(&buffer);
if (address == -1) {
ERROR("'%s' can't fit in CBFS for page-size %#x, align %#x.\n",
- param.name, param.pagesize, param.alignment);
+ param.name, param.pagesize, 64);
return 1;
}
@@ -743,9 +738,9 @@ static const struct command commands[] = {
{"add-stage", "H:r:f:n:t:c:b:S:vh?", cbfs_add_stage, true, true},
{"add-int", "H:r:i:n:b:vh?", cbfs_add_integer, true, true},
{"copy", "H:D:s:h?", cbfs_copy, true, true},
- {"create", "M:r:s:B:b:H:a:o:m:vh?", cbfs_create, true, true},
+ {"create", "M:r:s:B:b:H:o:m:vh?", cbfs_create, true, true},
{"extract", "H:r:n:f:vh?", cbfs_extract, true, false},
- {"locate", "H:r:f:n:P:a:Tvh?", cbfs_locate, true, false},
+ {"locate", "H:r:f:n:P:Tvh?", cbfs_locate, true, false},
{"layout", "wvh?", cbfs_layout, false, false},
{"print", "H:r:vh?", cbfs_print, true, false},
{"read", "r:f:vh?", cbfs_read, true, false},
@@ -755,7 +750,6 @@ static const struct command commands[] = {
};
static struct option long_options[] = {
- {"alignment", required_argument, 0, 'a' },
{"base-address", required_argument, 0, 'b' },
{"bootblock", required_argument, 0, 'B' },
{"cmdline", required_argument, 0, 'C' },
@@ -1023,9 +1017,6 @@ int main(int argc, char **argv)
param.copyoffset = strtoul(optarg, NULL, 0);
param.copyoffset_assigned = 1;
break;
- case 'a':
- param.alignment = strtoul(optarg, NULL, 0);
- break;
case 'P':
param.pagesize = strtoul(optarg, NULL, 0);
break;
More information about the coreboot-gerrit
mailing list