summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2021-02-18 15:47:47 -0700
committerCommit Bot <commit-bot@chromium.org>2021-02-19 17:30:04 +0000
commit62ed9e8deee3ec64196925187a7e42c8021b1be6 (patch)
tree5c26f6d25ded9412814edebbdc20b1c99f0f9194
parentbfeed1bdd880ba9b7eed345672f84d52274f4aea (diff)
downloadchrome-ec-62ed9e8deee3ec64196925187a7e42c8021b1be6.tar.gz
cleanup: remove unnecessary image size padding
For dauntless images, we say that the image goes to the next 16KB aligned address, but this will get reduce anyway since we don't send the 0xFFs as the end of the transfer. Removing this just reduces unnecessary complexity BUG=none TEST=update firmware on D2 TEST=update firmware on H1 (should be no change) Change-Id: I03ce12b85138b9200a8e48ad441221d3aa3f1609 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2706038 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
-rw-r--r--extra/usb_updater/gsctool.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/extra/usb_updater/gsctool.c b/extra/usb_updater/gsctool.c
index d91b1d6036..bc72f73085 100644
--- a/extra/usb_updater/gsctool.c
+++ b/extra/usb_updater/gsctool.c
@@ -1066,8 +1066,7 @@ static bool locate_headers(const void *image, const uint32_t size)
return false;
}
sections[RW_A].offset = rw_offset;
- sections[RW_A].size =
- round_up_16kb(as_header(image, rw_offset)->image_size);
+ sections[RW_A].size = as_header(image, rw_offset)->image_size;
/* Validate the RO_B header */
h = as_header(image, slot_a_end);
@@ -1086,8 +1085,7 @@ static bool locate_headers(const void *image, const uint32_t size)
return false;
}
sections[RW_B].offset = rw_offset;
- sections[RW_B].size =
- round_up_16kb(as_header(image, rw_offset)->image_size);
+ sections[RW_B].size = as_header(image, rw_offset)->image_size;
/* We found all of the headers and updated offset/size in sections */
return true;