diff options
author | Michael Niewöhner <foss@mniewoehner.de> | 2020-03-13 22:22:26 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2020-03-17 00:25:04 +0000 |
commit | 9952e72d066b3d25355ccf43b396ab0ad5b98a78 (patch) | |
tree | aaac55073204d3b7c8bde9ca1ae2be7cea9ce4c4 /util/inteltool/inteltool.c | |
parent | fe8170f909dc682e529c8fe8d9dadf3b13acdef6 (diff) |
util/inteltool: add code for dumping LPC registers
This adds the implementation for dumping LPC registers
Change-Id: I50ae4913933f7594f0d63ce3f752302ed5c461e2
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39517
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util/inteltool/inteltool.c')
-rw-r--r-- | util/inteltool/inteltool.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/util/inteltool/inteltool.c b/util/inteltool/inteltool.c index 0e84b550fc..8d5d9942a7 100644 --- a/util/inteltool/inteltool.c +++ b/util/inteltool/inteltool.c @@ -494,7 +494,7 @@ static void print_version(void) static void print_usage(const char *name) { - printf("usage: %s [-vh?gGrpmedPMaAsfSRx]\n", name); + printf("usage: %s [-vh?gGrplmedPMaAsfSRx]\n", name); printf("\n" " -v | --version: print the version\n" " -h | --help: print this help\n\n" @@ -505,6 +505,7 @@ static void print_usage(const char *name) " -G | --gpio-diffs: show GPIO differences from defaults\n" " -r | --rcba: dump southbridge RCBA registers\n" " -p | --pmbase: dump southbridge Power Management registers\n\n" + " -l | --lpc: dump southbridge LPC/eSPI Interface registers\n\n" " -m | --mchbar: dump northbridge Memory Controller registers\n" " -S FILE | --spd=FILE: create a file storing current timings (implies -m)\n" " -e | --epbar: dump northbridge EPBAR registers\n" @@ -574,6 +575,7 @@ int main(int argc, char *argv[]) int dump_pmbase = 0, dump_epbar = 0, dump_dmibar = 0; int dump_pciexbar = 0, dump_coremsrs = 0, dump_ambs = 0; int dump_spi = 0, dump_gfx = 0, dump_ahci = 0, dump_sgx = 0; + int dump_lpc = 0; int show_gpio_diffs = 0; size_t pcr_count = 0; uint8_t dump_pcr[MAX_PCR_PORTS]; @@ -586,6 +588,7 @@ int main(int argc, char *argv[]) {"mchbar", 0, 0, 'm'}, {"rcba", 0, 0, 'r'}, {"pmbase", 0, 0, 'p'}, + {"lpc", 0, 0, 'l'}, {"epbar", 0, 0, 'e'}, {"dmibar", 0, 0, 'd'}, {"pciexpress", 0, 0, 'P'}, @@ -601,7 +604,7 @@ int main(int argc, char *argv[]) {0, 0, 0, 0} }; - while ((opt = getopt_long(argc, argv, "vh?gGrpmedPMaAsfRS:x", + while ((opt = getopt_long(argc, argv, "vh?gGrplmedPMaAsfRS:x", long_options, &option_index)) != EOF) { switch (opt) { case 'v': @@ -633,6 +636,9 @@ int main(int argc, char *argv[]) case 'p': dump_pmbase = 1; break; + case 'l': + dump_lpc = 1; + break; case 'e': dump_epbar = 1; break; @@ -651,6 +657,7 @@ int main(int argc, char *argv[]) dump_mchbar = 1; dump_rcba = 1; dump_pmbase = 1; + dump_lpc = 1; dump_epbar = 1; dump_dmibar = 1; dump_pciexbar = 1; @@ -816,6 +823,11 @@ int main(int argc, char *argv[]) printf("\n\n"); } + if (dump_lpc) { + print_lpc(sb, pacc); + printf("\n\n"); + } + if (dump_mchbar) { print_mchbar(nb, pacc, dump_spd_file); printf("\n\n"); |