summaryrefslogtreecommitdiff
path: root/util/cbfstool
diff options
context:
space:
mode:
Diffstat (limited to 'util/cbfstool')
-rw-r--r--util/cbfstool/bpdt_formats/bpdt_1_6.c16
-rw-r--r--util/cbfstool/bpdt_formats/bpdt_1_7.c20
2 files changed, 18 insertions, 18 deletions
diff --git a/util/cbfstool/bpdt_formats/bpdt_1_6.c b/util/cbfstool/bpdt_formats/bpdt_1_6.c
index c5cedd3d8b..477a58c6ff 100644
--- a/util/cbfstool/bpdt_formats/bpdt_1_6.c
+++ b/util/cbfstool/bpdt_formats/bpdt_1_6.c
@@ -149,14 +149,14 @@ static cse_layout_ptr create_cse_layout(const struct region *r)
if (!l)
return NULL;
- l->data_offset = r[DP].offset;
- l->data_size = r[DP].size;
- l->bp1_offset = r[BP1].offset;
- l->bp1_size = r[BP1].size;
- l->bp2_offset = r[BP2].offset;
- l->bp2_size = r[BP2].size;
- l->bp3_offset = r[BP3].offset;
- l->bp3_size = r[BP3].size;
+ l->data_offset = region_offset(&r[DP]);
+ l->data_size = region_sz(&r[DP]);
+ l->bp1_offset = region_offset(&r[BP1]);
+ l->bp1_size = region_sz(&r[BP1]);
+ l->bp2_offset = region_offset(&r[BP2]);
+ l->bp2_size = region_sz(&r[BP2]);
+ l->bp3_offset = region_offset(&r[BP3]);
+ l->bp3_size = region_sz(&r[BP3]);
l->checksum = 0; /* unused */
return l;
diff --git a/util/cbfstool/bpdt_formats/bpdt_1_7.c b/util/cbfstool/bpdt_formats/bpdt_1_7.c
index 9badc82c11..7e42a7b127 100644
--- a/util/cbfstool/bpdt_formats/bpdt_1_7.c
+++ b/util/cbfstool/bpdt_formats/bpdt_1_7.c
@@ -196,16 +196,16 @@ static cse_layout_ptr create_cse_layout(const struct region *r)
l->size = sizeof(struct cse_layout) - sizeof(l->rom_bypass);
l->redundancy = 0;
l->checksum = 0;
- l->data_offset = r[DP].offset;
- l->data_size = r[DP].size;
- l->bp1_offset = r[BP1].offset;
- l->bp1_size = r[BP1].size;
- l->bp2_offset = r[BP2].offset;
- l->bp2_size = r[BP2].size;
- l->bp3_offset = r[BP3].offset;
- l->bp3_size = r[BP3].size;
- l->bp4_offset = r[BP4].offset;
- l->bp4_size = r[BP4].size;
+ l->data_offset = region_offset(&r[DP]);
+ l->data_size = region_sz(&r[DP]);
+ l->bp1_offset = region_offset(&r[BP1]);
+ l->bp1_size = region_sz(&r[BP1]);
+ l->bp2_offset = region_offset(&r[BP2]);
+ l->bp2_size = region_sz(&r[BP2]);
+ l->bp3_offset = region_offset(&r[BP3]);
+ l->bp3_size = region_sz(&r[BP3]);
+ l->bp4_offset = region_offset(&r[BP4]);
+ l->bp4_size = region_sz(&r[BP4]);
l->bp5_offset = 0;
l->bp5_size = 0;
l->temp_base_addr = 0;