diff options
author | Vasilii Chernov <vchernov@inr.ru> | 2016-03-02 10:28:04 +0100 |
---|---|---|
committer | Vasilii Chernov <vchernov@inr.ru> | 2016-03-02 10:28:04 +0100 |
commit | 8e7c95957ee73d6c11ef28f7c0e2319a11103783 (patch) | |
tree | 83df220932b3d88e071eda4c756e485dd48d50e9 /pcilib/bar.h | |
parent | 8719b84a95805d109e21c20f05a0164315e1b38a (diff) | |
parent | 867bddcf7be374221a04b7ae89f93a5f5d703ee6 (diff) | |
download | pcitool-8e7c95957ee73d6c11ef28f7c0e2319a11103783.tar.gz pcitool-8e7c95957ee73d6c11ef28f7c0e2319a11103783.tar.bz2 pcitool-8e7c95957ee73d6c11ef28f7c0e2319a11103783.tar.xz pcitool-8e7c95957ee73d6c11ef28f7c0e2319a11103783.zip |
Merge with http://ufo.kit.edu/ufo/log/csa/pcitool 362 revision
Diffstat (limited to 'pcilib/bar.h')
-rw-r--r-- | pcilib/bar.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pcilib/bar.h b/pcilib/bar.h index 3c0eef6..accc4ba 100644 --- a/pcilib/bar.h +++ b/pcilib/bar.h @@ -72,7 +72,21 @@ int pcilib_detect_address(pcilib_t *ctx, pcilib_bar_t *bar, uintptr_t *addr, siz */ char *pcilib_resolve_data_space(pcilib_t *ctx, uintptr_t addr, size_t *size); +/** + * Return information about the specified BAR or NULL if BAR is not present in hardware + * @param[in,out] ctx - pcilib context + * @param[in] bar - the PCI BAR number (numbered from 0) + * @return - pointer to structure describing the specified BAR or NULL in case of error + */ const pcilib_bar_info_t *pcilib_get_bar_info(pcilib_t *ctx, pcilib_bar_t bar); + +/** + * Return a list of BAR memory regions available in the hardware. + * The list is terminated by a dummy BAR description with 0 size. + * + * @param[in,out] ctx - pcilib context + * @return - pointer to structure describing the BARs or NULL in case of error + */ const pcilib_bar_info_t *pcilib_get_bar_list(pcilib_t *ctx); |