vfio: fix DMA mapping of external heaps
[dpdk.git] / lib / librte_eal / freebsd / eal / eal_memory.c
index 5e02044..a97d8f0 100644 (file)
 
 #define EAL_PAGE_SIZE (sysconf(_SC_PAGESIZE))
 
+uint64_t eal_get_baseaddr(void)
+{
+       /*
+        * FreeBSD may allocate something in the space we will be mapping things
+        * before we get a chance to do that, so use a base address that's far
+        * away from where malloc() et al usually map things.
+        */
+       return 0x1000000000ULL;
+}
+
 /*
  * Get physical address of any mapped virtual address in the current process.
  */
@@ -83,6 +93,7 @@ rte_eal_hugepage_init(void)
                msl->page_sz = page_sz;
                msl->len = internal_config.memory;
                msl->socket_id = 0;
+               msl->heap = 1;
 
                /* populate memsegs. each memseg is 1 page long */
                for (cur_seg = 0; cur_seg < n_segs; cur_seg++) {