cbfstool: Support 64bit addresses for flat images

SELF has the fields wired up for 64bit, but adding flat images cuts the
upper half.

Change-Id: I3b48b8face921e942fb0e01eace791ad3e1669a0
Signed-off-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80576
Reviewed-by: ron minnich <rminnich@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Patrick Georgi
2024-02-17 21:09:13 +01:00
parent 6270e74025
commit 7691e96ab1
3 changed files with 8 additions and 8 deletions

View File

@@ -57,7 +57,7 @@ static struct param {
*/
long long int baseaddress_input;
uint32_t baseaddress_assigned;
uint32_t loadaddress;
uint64_t loadaddress;
uint32_t headeroffset;
/*
* Input can be negative. It will be transformed to offset from start of region (if
@@ -65,7 +65,7 @@ static struct param {
*/
long long int headeroffset_input;
uint32_t headeroffset_assigned;
uint32_t entrypoint;
uint64_t entrypoint;
uint32_t size;
uint32_t alignment;
uint32_t pagesize;
@@ -2157,7 +2157,7 @@ int main(int argc, char **argv)
param.baseaddress_assigned = 1;
break;
case 'l':
param.loadaddress = strtoul(optarg, &suffix, 0);
param.loadaddress = strtoull(optarg, &suffix, 0);
if (!*optarg || (suffix && *suffix)) {
ERROR("Invalid load address '%s'.\n",
optarg);
@@ -2165,7 +2165,7 @@ int main(int argc, char **argv)
}
break;
case 'e':
param.entrypoint = strtoul(optarg, &suffix, 0);
param.entrypoint = strtoull(optarg, &suffix, 0);
if (!*optarg || (suffix && *suffix)) {
ERROR("Invalid entry point '%s'.\n",
optarg);