summaryrefslogtreecommitdiff
path: root/test/flash.c
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2015-09-07 13:47:48 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-09-16 14:49:32 -0700
commit1167cad6a88e45bbf6a5599f19d018cd6a8b5233 (patch)
treeeaff44a061fa989b49a5c52fc58ef14f3ccb48c3 /test/flash.c
parent558c465165acf494905fa59c822c7190b4646899 (diff)
downloadchrome-ec-1167cad6a88e45bbf6a5599f19d018cd6a8b5233.tar.gz
cleanup: Change meaning of storage offset CONFIGs
In order to support architectures with non-contiguous writable and protected regions, change storage offsets to be relative to writable and protected regions, rather than relative to "the start of the region of storage belonging to the EC". Spec doc available at https://goo.gl/fnzTvr. BRANCH=None BUG=chrome-os-partner:23796 TEST=With entire patch series, on both Samus and Glados: - Verify 'version' EC console command is correct - Verify 'flashrom -p ec -r read.bin' reads back EC image - Verify software sync correctly flashes both EC and PD RW images Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: I796f8e7305a6336495bd256a78774595cb16a2e4 Reviewed-on: https://chromium-review.googlesource.com/297823 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'test/flash.c')
-rw-r--r--test/flash.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/flash.c b/test/flash.c
index da3df8a1ad..260d79d3d6 100644
--- a/test/flash.c
+++ b/test/flash.c
@@ -361,11 +361,13 @@ static int test_flash_info(void)
static int test_region_info(void)
{
VERIFY_REGION_INFO(EC_FLASH_REGION_RO,
+ CONFIG_EC_PROTECTED_STORAGE_OFF +
CONFIG_RO_STORAGE_OFF, CONFIG_RO_SIZE);
VERIFY_REGION_INFO(EC_FLASH_REGION_RW,
+ CONFIG_EC_WRITABLE_STORAGE_OFF +
CONFIG_RW_STORAGE_OFF, CONFIG_RW_SIZE);
VERIFY_REGION_INFO(EC_FLASH_REGION_WP_RO,
- CONFIG_WP_OFF, CONFIG_WP_SIZE);
+ CONFIG_WP_STORAGE_OFF, CONFIG_WP_STORAGE_SIZE);
return EC_SUCCESS;
}