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>
This commit is contained in:
Randall Spangler
2013-10-15 13:23:03 -07:00
committed by chrome-internal-fetch
parent 09c88c34e8
commit 1a0fcc27bb

View File

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