summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2014-06-10 10:22:02 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-06-11 00:13:51 +0000
commitc388281b06e5716209596bff0d4bf4e07887b1af (patch)
treef3f04f43000299911961d3ce0d375e7e153988c9
parent8c201b1e6c4683f3f078fbf747e0b78b7af3ea91 (diff)
downloadchrome-ec-c388281b06e5716209596bff0d4bf4e07887b1af.tar.gz
zinger: fix check for is in RO
Fix check for whether or not we are running in RO. The previous code read the contents of the RW reset vector, but RW code may be corrupted causing us to think we are in RW when we are not. BUG=none BRANCH=none TEST=mostly just code inspection. verified this code running in RW correctly identifies we are in RW. Change-Id: I2c27af45a59b29f55fd24295f91d5c5f0e491dd4 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/203192 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--board/zinger/board.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/board/zinger/board.c b/board/zinger/board.c
index 869a6afc30..8c9dc27faa 100644
--- a/board/zinger/board.c
+++ b/board/zinger/board.c
@@ -40,7 +40,7 @@ static void jump_to_rw(void)
int is_ro_mode(void)
{
- return (uint32_t)&jump_to_rw < *rw_rst;
+ return (uint32_t)&jump_to_rw < (uint32_t)rw_rst;
}
static int check_rw_valid(void)