Added an internal helper to get OS-specific EAL mapping base address
This helper can be used by the drivers to program offload / accelerator
devices, where the base address can be used as a reference address by
the accelerator to access the host memory
An address can also be represented as an offset relative to the base
address using smaller data types
Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
return rte_eal_get_configuration()->iova_mode;
}
+/* Get the EAL base address */
+uint64_t
+rte_eal_get_baseaddr(void)
+{
+ return (internal_config.base_virtaddr != 0) ?
+ (uint64_t) internal_config.base_virtaddr :
+ eal_get_baseaddr();
+}
+
enum rte_proc_type_t
rte_eal_process_type(void)
{
return RTE_PER_LCORE(_thread_id);
}
+/**
+ * Get the OS-specific EAL base address.
+ *
+ * @return
+ * The base address.
+ */
+__rte_internal
+uint64_t rte_eal_get_baseaddr(void);
+
/**
* Get the iova mode
*
INTERNAL {
global:
+ rte_eal_get_baseaddr;
rte_firmware_read;
rte_intr_allow_others;
rte_intr_cap_multiple;