summaryrefslogtreecommitdiffstats
path: root/protocols/software.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-11-18 03:25:02 +0100
committerSuren A. Chilingaryan <csa@suren.me>2015-11-18 03:25:02 +0100
commitca7353be486a0364a3460b511291a40182f130ba (patch)
tree1505293794cbe29fdeb6341bbe699c52dd39f8aa /protocols/software.h
parentec667d49f84c45c261f050313d64f89ce88e4302 (diff)
downloadpcitool-ca7353be486a0364a3460b511291a40182f130ba.tar.gz
pcitool-ca7353be486a0364a3460b511291a40182f130ba.tar.bz2
pcitool-ca7353be486a0364a3460b511291a40182f130ba.tar.xz
pcitool-ca7353be486a0364a3460b511291a40182f130ba.zip
Provide API calls for register and bank address resolution
Diffstat (limited to 'protocols/software.h')
-rw-r--r--protocols/software.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/protocols/software.h b/protocols/software.h
index 27ab86e..88f2986 100644
--- a/protocols/software.h
+++ b/protocols/software.h
@@ -28,6 +28,16 @@ pcilib_register_bank_context_t* pcilib_software_registers_open(pcilib_t *ctx, pc
void pcilib_software_registers_close(pcilib_t *ctx, pcilib_register_bank_context_t *bank_ctx);
/**
+ * this function resolve the virtual address of the register for direct access
+ * @param[in] - ctx the pcilib_t structure runnning
+ * @param[in] - bank_ctx the bank context that was returned by the initialisation function
+ * @param[in] - flags
+ * @param[in] - addr the adress of the register we want to read
+ * @return virtual address or PCILIB_ADDRESS_INVALID on error
+ */
+uintptr_t pcilib_software_registers_resolve(pcilib_t *ctx, pcilib_register_bank_context_t *bank_ctx, pcilib_address_resolution_flags_t flags, pcilib_register_addr_t addr);
+
+/**
* this function read the value of a said register in the kernel space.
* @param[in] - ctx the pcilib_t structure runnning
* @param[in] - bank_ctx the bank context that was returned by the initialisation function
@@ -52,7 +62,7 @@ int pcilib_software_registers_write(pcilib_t *ctx,pcilib_register_bank_context_t
* software protocol addition to the protocol api.
*/
const pcilib_register_protocol_api_description_t pcilib_software_protocol_api =
- { PCILIB_VERSION, pcilib_software_registers_open, pcilib_software_registers_close,pcilib_software_registers_read, pcilib_software_registers_write }; /**< we add there the protocol to the list of possible protocols*/
+ { PCILIB_VERSION, pcilib_software_registers_open, pcilib_software_registers_close, pcilib_software_registers_resolve, pcilib_software_registers_read, pcilib_software_registers_write };
#endif /* _PCILIB_EXPORT_C */
#endif /* _PCILIB_PROTOCOL_SOFTWARE_H */