diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2022-03-04 19:37:13 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-03-17 18:03:39 +0000 |
commit | cede042d730463ab6ade9e997de0688497e2025d (patch) | |
tree | aa56db725384957132ad96d927fad7f49eef358f /board/hammer | |
parent | 5e836acebf45a2666e8fb752175718df28b26ccb (diff) | |
download | chrome-ec-cede042d730463ab6ade9e997de0688497e2025d.tar.gz |
Hammer/Prism: Disambiguate CONFIG_RW_SIZE
Currently CONFIG_RW_SIZE is defined as
CONFIG_FLASH_SIZE_BYTES - CONFIG_RW_MEM_OFF - CONFIG_RO_MEM_OFF.
However, if you look at
CONFIG_RW_MEM_OFF = CONFIG_ROLLBACK_OFF + CONFIG_ROLLBACK_SIZE
where
CONFIG_ROLLBACK_OFF = CONFIG_RO_MEM_OFF + CONFIG_RO_SIZE,
you can tell CONFIG_RW_MEM_OFF is the offset from the beginning of the
flash storage not from CONFIG_RO_MEM_OFF. Thus, we shouldn't subtract
CONFIG_RO_MEM_OFF twice to define CONFIG_RW_SIZE.
It's currently working because CONFIG_RO_MEM_OFF happens to be zero.
Thus, this change won't change any functionality but will disambiguate
how CONFIG_RW_SIZE is defined.
BUG=b:222318598
BRANCH=None
TEST=Vell
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I42e23c0e9f0c5a6b97c5254250a18586e2f9b483
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3504050
Reviewed-by: caveh jalali <caveh@chromium.org>
Diffstat (limited to 'board/hammer')
-rw-r--r-- | board/hammer/board.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/board/hammer/board.h b/board/hammer/board.h index ceadb68176..e875125da7 100644 --- a/board/hammer/board.h +++ b/board/hammer/board.h @@ -58,8 +58,7 @@ #define CONFIG_RW_MEM_OFF (CONFIG_ROLLBACK_OFF + CONFIG_ROLLBACK_SIZE) #define CONFIG_RW_STORAGE_OFF 0 -#define CONFIG_RW_SIZE (CONFIG_FLASH_SIZE_BYTES - \ - (CONFIG_RW_MEM_OFF - CONFIG_RO_MEM_OFF)) +#define CONFIG_RW_SIZE (CONFIG_FLASH_SIZE_BYTES - CONFIG_RW_MEM_OFF) #define CONFIG_EC_PROTECTED_STORAGE_OFF CONFIG_RO_MEM_OFF #define CONFIG_EC_PROTECTED_STORAGE_SIZE CONFIG_RO_SIZE |