app: aboot: Correct the max_download_size
For AVB 2.0, Salt Buffer is required to copy salt at start of verified image.
Correct the max_download_size as there is salt buffer offset is added at the
start of image address.
Change-Id: Iea0e15d79b4cdf0ca20a34b83af1938cdcc6ba2c
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index 584ba35..2eb87c3 100644
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -5007,8 +5007,14 @@
publish_getvar_multislot_vars();
/* Max download size supported */
+#if !VERIFIED_BOOT_2
snprintf(max_download_size, MAX_RSP_SIZE, "\t0x%x",
target_get_max_flash_size());
+#else
+ snprintf(max_download_size, MAX_RSP_SIZE, "\t0x%x",
+ SUB_SALT_BUFF_OFFSET(target_get_max_flash_size()));
+#endif
+
fastboot_publish("max-download-size", (const char *) max_download_size);
/* Is the charger screen check enabled */
snprintf(charger_screen_enabled, MAX_RSP_SIZE, "%d",