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>
This commit is contained in:
Mary Ruthven
2018-05-16 15:10:30 -07:00
committed by chrome-bot
parent f5d9109524
commit 12b71fcbb0
3 changed files with 7 additions and 5 deletions

View File

@@ -31,7 +31,7 @@
#undef CONFIG_CMD_CRASH
#undef CONFIG_CMD_MD
#undef CONFIG_CMD_RW
#undef CONFIG_CMD_SLEEPMASK
#undef CONFIG_CMD_SLEEPMASK_SET
#undef CONFIG_CMD_WAITMS
#undef CONFIG_FLASH
#endif

View File

@@ -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

View File

@@ -876,6 +876,7 @@
#define CONFIG_CMD_SHMEM
#undef CONFIG_CMD_SLEEP
#define CONFIG_CMD_SLEEPMASK
#define CONFIG_CMD_SLEEPMASK_SET
#undef CONFIG_CMD_SPI_FLASH
#undef CONFIG_CMD_SPI_NOR
#undef CONFIG_CMD_SPI_XFER