msrtool: Use libpci to let system and target probes find PCI devices.
And some more notes in TODO.
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3770 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
diff --git a/util/msrtool/msrtool.h b/util/msrtool/msrtool.h
index ab7c227..7b639f0 100644
--- a/util/msrtool/msrtool.h
+++ b/util/msrtool/msrtool.h
@@ -22,6 +22,7 @@
#include <stdio.h>
#include <stdint.h>
+#include <pci/pci.h>
#define HEXCHARS "0123456789abcdefABCDEF"
@@ -132,6 +133,8 @@
extern uint8_t reserved, verbose, quiet;
+extern struct pci_access *pacc;
+
#define printf_quiet(x...) do { if (!quiet) fprintf(stderr,x); } while(0)
#define printf_verbose(x...) do { if (verbose && !quiet) fprintf(stderr,x); } while(0)
@@ -145,6 +148,7 @@
/* sys.c */
struct cpuid_t *cpuid(void);
+struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device);
/* msrutils.c */
void hexprint(FILE *f, const struct msr val, const uint8_t bits);