From c388281b06e5716209596bff0d4bf4e07887b1af Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Tue, 10 Jun 2014 10:22:02 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/203192 Reviewed-by: Vincent Palatin --- board/zinger/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.1