summaryrefslogtreecommitdiff
path: root/util/inteltool/inteltool.c
diff options
context:
space:
mode:
authorSven Schnelle <svens@stackframe.org>2012-01-08 15:27:18 +0100
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-01-08 20:41:09 +0100
commit4b7b320ff80c1047503e26fd387ba3d8acd996d9 (patch)
treedaa7bb7ada2b05b9204f73a62db4d37370fd9010 /util/inteltool/inteltool.c
parentf91cf9f1eabcac18609806ac99162ebfd8f1e3d0 (diff)
downloadcoreboot-4b7b320ff80c1047503e26fd387ba3d8acd996d9.tar.xz
inteltool: Add support for dumping AMB registers
Change-Id: I98615725afdb315caa67b2226224e3eb2a0e4393 Signed-off-by: Sven Schnelle <svens@stackframe.org> Reviewed-on: http://review.coreboot.org/525 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/inteltool/inteltool.c')
-rw-r--r--util/inteltool/inteltool.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/util/inteltool/inteltool.c b/util/inteltool/inteltool.c
index 488d9f5485..6b99605520 100644
--- a/util/inteltool/inteltool.c
+++ b/util/inteltool/inteltool.c
@@ -83,6 +83,9 @@ static const struct {
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_X44, "82X38/X48" },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_32X0, "3200/3210" },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_I63XX, "Intel 63xx I/O Controller Hub" },
+ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_I5000P, "Intel i5000P Memory Controller Hub" },
+ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_I5000X, "Intel i5000X Memory Controller Hub" },
+ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_I5000Z, "Intel i5000Z Memory Controller Hub" },
};
#ifndef __DARWIN__
@@ -139,6 +142,7 @@ void print_usage(const char *name)
" -d | --dmibar: dump northbridge DMIBAR registers\n"
" -P | --pciexpress: dump northbridge PCIEXBAR registers\n\n"
" -M | --msrs: dump CPU MSRs\n"
+ " -A | --ambs: dump AMB registers\n"
" -a | --all: dump all known registers\n"
"\n");
exit(1);
@@ -155,7 +159,7 @@ int main(int argc, char *argv[])
int dump_gpios = 0, dump_mchbar = 0, dump_rcba = 0;
int dump_pmbase = 0, dump_epbar = 0, dump_dmibar = 0;
- int dump_pciexbar = 0, dump_coremsrs = 0;
+ int dump_pciexbar = 0, dump_coremsrs = 0, dump_ambs = 0;
static struct option long_options[] = {
{"version", 0, 0, 'v'},
@@ -168,11 +172,12 @@ int main(int argc, char *argv[])
{"dmibar", 0, 0, 'd'},
{"pciexpress", 0, 0, 'P'},
{"msrs", 0, 0, 'M'},
+ {"ambs", 0, 0, 'A'},
{"all", 0, 0, 'a'},
{0, 0, 0, 0}
};
- while ((opt = getopt_long(argc, argv, "vh?grpmedPMa",
+ while ((opt = getopt_long(argc, argv, "vh?grpmedPMaA",
long_options, &option_index)) != EOF) {
switch (opt) {
case 'v':
@@ -212,6 +217,10 @@ int main(int argc, char *argv[])
dump_dmibar = 1;
dump_pciexbar = 1;
dump_coremsrs = 1;
+ dump_ambs = 1;
+ break;
+ case 'A':
+ dump_ambs = 1;
break;
case 'h':
case '?':
@@ -356,6 +365,9 @@ int main(int argc, char *argv[])
printf("\n\n");
}
+ if (dump_ambs) {
+ print_ambs(nb, pacc);
+ }
/* Clean up */
pci_free_dev(nb);
// pci_free_dev(sb); // TODO: glibc detected "double free or corruption"