Alexander Couzens has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35608 )
Change subject: util/superio: add support to dump all ldns ......................................................................
util/superio: add support to dump all ldns
The dump of all LDNs shows all registers while iterating over the LDN address space.
Change-Id: I52450725a21a9ecf0bd0d5fd06a8ac5918d17523 Signed-off-by: Alexander Couzens lynxis@fe80.eu --- M util/superiotool/ite.c M util/superiotool/superiotool.c M util/superiotool/superiotool.h 3 files changed, 25 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/35608/1
diff --git a/util/superiotool/ite.c b/util/superiotool/ite.c index 2e21e80..d17149d 100644 --- a/util/superiotool/ite.c +++ b/util/superiotool/ite.c @@ -1496,6 +1496,7 @@ static void probe_idregs_ite_helper(const char *init, uint16_t port) { uint16_t id, chipver, ecport; + uint16_t ldn, reg, i;
probing_for("ITE", init, port);
@@ -1536,6 +1537,22 @@ printf("BRAM (0x%04x)\n", ecport); dump_superio("ITE-BRAM", bram_table, ecport, id, LDN_SEL); } + + if (full_dump) { + for (ldn = 0; ldn <= 0xff; ldn++) { + regwrite(port, LDN_SEL, ldn); /* Select LDN 16 (BRAM). */ + printf("LDN 0x%02x\n", ldn); + for (reg = 0; reg < 0x100; reg +=8) { + printf("0x%02x: ", reg); + for (i=0; i < 8; i++) + if (i < 7) + printf("%02x ", regval(port, reg + i)); + else + printf("%02x", regval(port, reg + i)); + printf("\n"); + } + } + } }
void probe_idregs_ite(uint16_t port) diff --git a/util/superiotool/superiotool.c b/util/superiotool/superiotool.c index 3e21b0c..17f41ee 100644 --- a/util/superiotool/superiotool.c +++ b/util/superiotool/superiotool.c @@ -25,7 +25,7 @@ #endif
/* Command line options. */ -int dump = 0, verbose = 0, extra_dump = 0, alternate_dump = 0; +int dump = 0, verbose = 0, extra_dump = 0, alternate_dump = 0, full_dump = 0;
/* Global flag which indicates whether a chip was detected at all. */ int chip_found = 0; @@ -292,6 +292,7 @@ #endif
static const struct option long_options[] = { + {"full-dump", no_argument, NULL, 'D'}, {"dump", no_argument, NULL, 'd'}, {"extra-dump", no_argument, NULL, 'e'}, {"alternate-dump", no_argument, NULL, 'a'}, @@ -302,9 +303,12 @@ {0, 0, 0, 0} };
- while ((opt = getopt_long(argc, argv, "dealVvh", + while ((opt = getopt_long(argc, argv, "DdealVvh", long_options, &option_index)) != EOF) { switch (opt) { + case 'D': + full_dump = 1; + break; case 'd': dump = 1; break; diff --git a/util/superiotool/superiotool.h b/util/superiotool/superiotool.h index d3b9fd0..950f9f7 100644 --- a/util/superiotool/superiotool.h +++ b/util/superiotool/superiotool.h @@ -111,6 +111,7 @@ #define USAGE "Usage: superiotool [-d] [-e] [-a] [-l] [-V] [-v] [-h]\n\n\ -d | --dump Dump Super I/O register contents\n\ -e | --extra-dump Dump secondary registers too (e.g. EC registers)\n\ + -D | --full-dump Dump ALL Super I/O register contents regardless off visiability\n\ -a | --alternate-dump Use alternative dump format, more suitable for diff\n\ -l | --list-supported Show the list of supported Super I/O chips\n\ -V | --verbose Verbose mode\n\ @@ -147,7 +148,7 @@ #define WINBOND_HWM_SEL 0x4e /* Hardware monitor bank select */
/* Command line parameters. */ -extern int dump, verbose, extra_dump; +extern int dump, verbose, extra_dump, full_dump;
extern int chip_found;
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35608 )
Change subject: util/superio: add support to dump all ldns ......................................................................
Patch Set 1: Code-Review+1
why only expose it for ITE?
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35608 )
Change subject: util/superio: add support to dump all ldns ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/35608/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/35608/1//COMMIT_MSG@11 PS1, Line 11: Only supported for ITE?
Alexander Couzens has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35608 )
Change subject: util/superio: add support to dump all ldns ......................................................................
Patch Set 1:
oh. I forgot about that one. I'll look into it further and make it a WIP