summaryrefslogtreecommitdiff
path: root/common/system.c
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@google.com>2018-05-16 15:10:30 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-05-18 20:08:43 -0700
commit12b71fcbb0a90552f3124c2e776e9d61e3075bba (patch)
tree9b794c0913426adb3f1bc7a4f62475cf51832b19 /common/system.c
parentf5d9109524f6e2625729d3317b4a7dedd2b37157 (diff)
downloadchrome-ec-12b71fcbb0a90552f3124c2e776e9d61e3075bba.tar.gz
cr50: include sleepmask in all images
sleepmask is really useful for debugging sleep issues. Add a read only version of sleepmask to non-DBG images. It will only be accessible once the console is unlocked. BUG=none BRANCH=cr50 TEST=make sure sleepmask can be modified in DBG images and can only be read in prod images. Change-Id: I31ef966f6302d4a7602a014cb08c9b972d13f41e Signed-off-by: Mary Ruthven <mruthven@google.com> Reviewed-on: https://chromium-review.googlesource.com/1062804 Commit-Ready: Mary Ruthven <mruthven@chromium.org> Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'common/system.c')
-rw-r--r--common/system.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/common/system.c b/common/system.c
index 65c1d16681..64bfabbbc2 100644
--- a/common/system.c
+++ b/common/system.c
@@ -1224,6 +1224,7 @@ DECLARE_SAFE_CONSOLE_COMMAND(syslock, command_system_lock,
*/
static int command_sleepmask(int argc, char **argv)
{
+#ifdef CONFIG_CMD_SLEEPMASK_SET
int v;
if (argc >= 2) {
@@ -1242,14 +1243,14 @@ static int command_sleepmask(int argc, char **argv)
sleep_mask = v;
}
}
-
+#endif
ccprintf("sleep mask: %08x\n", sleep_mask);
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(sleepmask, command_sleepmask,
- "[ on | off | <sleep_mask>]",
- "Display/force sleep mask");
+DECLARE_SAFE_CONSOLE_COMMAND(sleepmask, command_sleepmask,
+ "[ on | off | <sleep_mask>]",
+ "Display/force sleep mask");
#endif
#ifdef CONFIG_CMD_JUMPTAGS