From 62ed9e8deee3ec64196925187a7e42c8021b1be6 Mon Sep 17 00:00:00 2001 From: Jett Rink Date: Thu, 18 Feb 2021 15:47:47 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2706038 Reviewed-by: Vadim Bendebury --- extra/usb_updater/gsctool.c | 6 ++---- 1 file 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; -- cgit v1.2.1