mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 08:31:52 +00:00
system: Use stored size in image_data for determining image_used
Image used size is now part of the image_data struct present in all images at a fixed offset, so use it rather than scanning from the end of the image. BUG=chromium:577915 TEST=Verify on kevin + lars + lars_pd that system_get_image_used() returns the same value as the old implementation, for both RO and RW images. BRANCH=None Change-Id: I35f0aa87f5ab1371dbd8b132f22b9d0044358223 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/450859 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
3c4c83b8c3
commit
e025e17b33
@@ -325,14 +325,6 @@ SECTIONS
|
||||
* can expand to use all the remaining RAM. */
|
||||
__shared_mem_buf = .;
|
||||
|
||||
/* Tag at end of firmware image so that we can find the image size.
|
||||
* This may be overwritten by the shared memory buffer; that's ok
|
||||
* because we only use it to find the image size in flash. */
|
||||
. = ALIGN(4);
|
||||
BYTE(0x45);
|
||||
BYTE(0x4e);
|
||||
BYTE(0x44);
|
||||
BYTE(0xea);
|
||||
/* NOTHING MAY GO AFTER THIS! */
|
||||
} > IRAM
|
||||
|
||||
|
||||
@@ -212,14 +212,6 @@ SECTIONS
|
||||
* can expand to use all the remaining RAM. */
|
||||
__shared_mem_buf = .;
|
||||
|
||||
/* Tag at end of firmware image so that we can find the image size.
|
||||
* This may be overwritten by the shared memory buffer; that's ok
|
||||
* because we only use it to find the image size in flash. */
|
||||
. = ALIGN(4);
|
||||
BYTE(0x45);
|
||||
BYTE(0x4e);
|
||||
BYTE(0x44);
|
||||
BYTE(0xea);
|
||||
/* NOTHING MAY GO AFTER THIS! */
|
||||
} > IRAM
|
||||
|
||||
|
||||
@@ -214,17 +214,8 @@ SECTIONS
|
||||
|
||||
} > IRAM
|
||||
|
||||
.flash.tag : {
|
||||
/* Tag at end of firmware image so that we can find the image size.
|
||||
* This may be overwritten by the shared memory buffer; that's ok
|
||||
* because we only use it to find the image size in flash. */
|
||||
. = ALIGN(4);
|
||||
BYTE(0x45);
|
||||
BYTE(0x4e);
|
||||
BYTE(0x44);
|
||||
BYTE(0xea);
|
||||
/* NOTHING MAY GO IN FLASH AFTER THIS! */
|
||||
} >FLASH
|
||||
/* TODO(b:36228568): Properly compute image size for nds32. */
|
||||
__image_size = 0;
|
||||
|
||||
#ifdef CONFIG_LPC
|
||||
.h2ram (NOLOAD) : {
|
||||
|
||||
Reference in New Issue
Block a user