diff options
author | Tom Hughes <tomhughes@chromium.org> | 2019-07-09 14:19:20 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-07-11 20:42:10 +0000 |
commit | 220d0bf43c6ec01bac79360b99b75199b04d4ada (patch) | |
tree | 2f8d6b159d5359b1124c190ac2ffe8e070faa3cf | |
parent | eccb31cfd4c17785f401e40b1ab2e27106dcec4d (diff) | |
download | chrome-ec-220d0bf43c6ec01bac79360b99b75199b04d4ada.tar.gz |
stm32h7: Fail build if CONFIG_FLASH_READOUT_PROTECTION_AS_PSTATE not used
As comment indicates, we're not sure that using RSS1 for the write
protect PSTATE is safe.
BRANCH=none
BUG=chromium:888104
TEST=In nocturne_fp board.h file:
#undef CONFIG_FLASH_READOUT_PROTECTION_AS_PSTATE
=> Build fails with error as expected
Change-Id: I0236381738e7ecf9b18a8d10dc7ba4b9dc370001
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1693339
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
-rw-r--r-- | chip/stm32/flash-stm32h7.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chip/stm32/flash-stm32h7.c b/chip/stm32/flash-stm32h7.c index ba0a8a69f1..960f478cd2 100644 --- a/chip/stm32/flash-stm32h7.c +++ b/chip/stm32/flash-stm32h7.c @@ -161,6 +161,9 @@ static void protect_blocks(uint32_t blocks) * If RDP is not defined, use the option bytes RSS1 bit. * TODO(crbug.com/888104): Validate that using RSS1 for this purpose is safe. */ +#ifndef CONFIG_FLASH_READOUT_PROTECTION_AS_PSTATE +#error "crbug.com/888104: Using RSS1 for write protect PSTATE may not be safe." +#endif static int is_wp_enabled(void) { #ifdef CONFIG_FLASH_READOUT_PROTECTION_AS_PSTATE |