MCPcopy Create free account
hub / github.com/F-Stack/f-stack / eal_get_baseaddr

Function eal_get_baseaddr

dpdk/lib/eal/linux/eal_memory.c:64–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62#define RANDOMIZE_VA_SPACE_FILE "/proc/sys/kernel/randomize_va_space"
63
64uint64_t eal_get_baseaddr(void)
65{
66 /*
67 * Linux kernel uses a really high address as starting address for
68 * serving mmaps calls. If there exists addressing limitations and IOVA
69 * mode is VA, this starting address is likely too high for those
70 * devices. However, it is possible to use a lower address in the
71 * process virtual address space as with 64 bits there is a lot of
72 * available space.
73 *
74 * Current known limitations are 39 or 40 bits. Setting the starting
75 * address at 4GB implies there are 508GB or 1020GB for mapping the
76 * available hugepages. This is likely enough for most systems, although
77 * a device with addressing limitations should call
78 * rte_mem_check_dma_mask for ensuring all memory is within supported
79 * range.
80 */
81#if defined(RTE_ARCH_LOONGARCH)
82 return 0x7000000000ULL;
83#else
84 return 0x100000000ULL;
85#endif
86}
87
88/*
89 * Get physical address of any mapped virtual address in the current process.

Callers 2

eal_get_virtual_areaFunction · 0.50
rte_eal_get_baseaddrFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected