diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2021-06-16 17:16:05 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-07-17 13:45:45 +0000 |
commit | c78521b3761d9afd44db630b0ebe7b96acc44bd3 (patch) | |
tree | 07978e865c590f362aed8e07f654e6ce81a15e7a /util | |
parent | f3c0adc69af67a4f25de02f49e71404bc9e59149 (diff) |
util/cbfstool: Remove unused pagesize parameter
Change-Id: Ib672ba8ed418b1a76e4a48951eabda6923358e7a
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55581
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/cbfstool/cbfstool.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c index 8fd81fe5fa..c9db45a22f 100644 --- a/util/cbfstool/cbfstool.c +++ b/util/cbfstool/cbfstool.c @@ -540,15 +540,11 @@ static int do_cbfs_locate(uint32_t *cbfs_addr, size_t metadata_size, DEBUG("File size is %zd (0x%zx)\n", data_size, data_size); - /* Use a page size that can fit the entire file and is no smaller than - optionally provided with -P parameter. */ + /* Compute required page size */ if (param.force_pow2_pagesize) { - uint32_t pagesize = 1; - while (pagesize < data_size) - pagesize <<= 1; - while (pagesize < param.pagesize) - pagesize <<= 1; - param.pagesize = pagesize; + param.pagesize = 1; + while (param.pagesize < data_size) + param.pagesize <<= 1; DEBUG("Page size is %d (0x%x)\n", param.pagesize, param.pagesize); } @@ -1778,7 +1774,6 @@ static struct option long_options[] = { {"name", required_argument, 0, 'n' }, {"offset", required_argument, 0, 'o' }, {"padding", required_argument, 0, 'p' }, - {"page-size", required_argument, 0, 'P' }, {"pow2page", no_argument, 0, 'Q' }, {"ucode-region", required_argument, 0, 'q' }, {"size", required_argument, 0, 's' }, @@ -1914,7 +1909,7 @@ static void usage(char *name) "Add a payload to the ROM\n" " add-stage [-r image,regions] -f FILE -n NAME [-A hash] \\\n" " [-c compression] [-b base] [-S section-to-ignore] \\\n" - " [-a alignment] [-P page-size] [-Q|--pow2page] \\\n" + " [-a alignment] [-Q|--pow2page] \\\n" " [-y|--xip] [--ibb] \\\n" " [--ext-win-base win-base --ext-win-size win-size] " "Add a stage to the ROM\n" @@ -2163,14 +2158,6 @@ int main(int argc, char **argv) return 1; } break; - case 'P': - param.pagesize = strtoul(optarg, &suffix, 0); - if (!*optarg || (suffix && *suffix)) { - ERROR("Invalid page size '%s'.\n", - optarg); - return 1; - } - break; case 'Q': param.force_pow2_pagesize = 1; break; |