diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-10-15 13:23:03 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-10-16 01:52:30 +0000 |
commit | 1a0fcc27bb36e76f75947b97beca5cc8085ee855 (patch) | |
tree | 6039f77adecc2090ef2331e67dad2e3cad89f356 | |
parent | 09c88c34e8a0a28ebd1fcf06fa0b3bff9ed19d14 (diff) | |
download | chrome-ec-1a0fcc27bb36e76f75947b97beca5cc8085ee855.tar.gz |
x86: x86indebug command should print bit defintions
The chipset module prints debugging information about the state of
power good lines and chipset signals, but those have previously been
decodable only by looking at the EC source code.
Change the 'x86indebug' command to print a decoder ring.
BUG=chrome-os-partner:22895
BRANCH=none
TEST=x86indebug prints a list of bit meanings
Change-Id: I10eb653e23d19ece10635e5de61cd53b0d4d33d5
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/173089
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r-- | common/chipset_x86_common.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/common/chipset_x86_common.c b/common/chipset_x86_common.c index 2704dd143c..add033906e 100644 --- a/common/chipset_x86_common.c +++ b/common/chipset_x86_common.c @@ -361,6 +361,8 @@ DECLARE_CONSOLE_COMMAND(powerinfo, command_powerinfo, static int command_x86indebug(int argc, char **argv) { + const struct x86_signal_info *s = x86_signal_list; + int i; char *e; /* If one arg, set the mask */ @@ -375,6 +377,16 @@ static int command_x86indebug(int argc, char **argv) /* Print the mask */ ccprintf("x86 in: 0x%04x\n", in_signals); ccprintf("debug mask: 0x%04x\n", in_debug); + + /* Print the decode */ + + ccprintf("bit meanings:\n"); + for (i = 0; i < X86_SIGNAL_COUNT; i++, s++) { + int mask = 1 << i; + ccprintf(" 0x%04x %d %s\n", + mask, in_signals & mask ? 1 : 0, s->name); + } + return EC_SUCCESS; }; DECLARE_CONSOLE_COMMAND(x86indebug, command_x86indebug, |