34 #ifndef _RTE_MEMORY_H_
35 #define _RTE_MEMORY_H_
47 #ifdef RTE_EXEC_ENV_LINUXAPP
48 #include <exec-env/rte_dom0_common.h>
56 RTE_PGSIZE_4K = 1ULL << 12,
57 RTE_PGSIZE_64K = 1ULL << 16,
58 RTE_PGSIZE_256K = 1ULL << 18,
59 RTE_PGSIZE_2M = 1ULL << 21,
60 RTE_PGSIZE_16M = 1ULL << 24,
61 RTE_PGSIZE_256M = 1ULL << 28,
62 RTE_PGSIZE_512M = 1ULL << 29,
63 RTE_PGSIZE_1G = 1ULL << 30,
64 RTE_PGSIZE_4G = 1ULL << 32,
65 RTE_PGSIZE_16G = 1ULL << 34,
68 #define SOCKET_ID_ANY -1
69 #ifndef RTE_CACHE_LINE_SIZE
70 #define RTE_CACHE_LINE_SIZE 64
72 #define RTE_CACHE_LINE_MASK (RTE_CACHE_LINE_SIZE-1)
74 #define RTE_CACHE_LINE_ROUNDUP(size) \
75 (RTE_CACHE_LINE_SIZE * ((size + RTE_CACHE_LINE_SIZE - 1) / RTE_CACHE_LINE_SIZE))
81 #define __rte_cache_aligned __attribute__((__aligned__(RTE_CACHE_LINE_SIZE)))
84 #define RTE_BAD_PHYS_ADDR ((phys_addr_t)-1)
95 #ifdef RTE_LIBRTE_IVSHMEM
96 phys_addr_t ioremap_addr;
103 #ifdef RTE_LIBRTE_XEN_DOM0
105 uint64_t mfn[DOM0_NUM_MEMBLOCK];
107 } __attribute__((__packed__));
182 #ifdef RTE_LIBRTE_XEN_DOM0
194 phys_addr_t rte_mem_phy2mch(uint32_t memseg_id,
const phys_addr_t phy_addr);
205 int rte_xen_dom0_memory_init(
void);
216 int rte_xen_dom0_memory_attach(
void);