1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2018 Intel Corporation
5 #ifndef _EAL_PRIVATE_H_
6 #define _EAL_PRIVATE_H_
13 * Initialize the memzone subsystem (private to eal).
19 int rte_eal_memzone_init(void);
22 * Common log initialization function (private to eal). Determines
23 * where log data is written when no call to rte_openlog_stream is
27 * The default log stream to be used.
32 void eal_log_set_default(FILE *default_log);
35 * Fill configuration with number of physical and logical processors
37 * This function is private to EAL.
39 * Parse /proc/cpuinfo to get the number of physical and logical
40 * processors on the machine.
43 * 0 on success, negative on error
45 int rte_eal_cpu_init(void);
50 * This function is private to EAL.
52 * Fill configuration structure with these infos, and return 0 on success.
55 * 0 on success, negative on error
57 int rte_eal_memory_init(void);
62 * This function is private to EAL.
64 * Mmap memory areas used by HPET (high precision event timer) that will
65 * provide our time reference, and configure the TSC frequency also for it
66 * to be used as a reference.
69 * 0 on success, negative on error
71 int rte_eal_timer_init(void);
74 * Init the default log stream
76 * This function is private to EAL.
79 * 0 on success, negative on error
81 int rte_eal_log_init(const char *id, int facility);
84 * Init tail queues for non-EAL library structures. This is to allow
85 * the rings, mempools, etc. lists to be shared among multiple processes
87 * This function is private to EAL
90 * 0 on success, negative on error
92 int rte_eal_tailqs_init(void);
95 * Init interrupt handling.
97 * This function is private to EAL.
100 * 0 on success, negative on error
102 int rte_eal_intr_init(void);
105 * Init alarm mechanism. This is to allow a callback be called after
108 * This function is private to EAL.
111 * 0 on success, negative on error
113 int rte_eal_alarm_init(void);
116 * Function is to check if the kernel module(like, vfio, vfio_iommu_type1,
120 * The module's name which need to be checked
123 * -1 means some error happens(NULL pointer or open failure)
124 * 0 means the module not loaded
125 * 1 means the module loaded
127 int rte_eal_check_module(const char *module_name);
132 * This function is private to the EAL.
134 unsigned eal_cpu_core_id(unsigned lcore_id);
137 * Check if cpu is present.
139 * This function is private to the EAL.
141 int eal_cpu_detected(unsigned lcore_id);
144 * Set TSC frequency from precise value or estimation
146 * This function is private to the EAL.
148 void set_tsc_freq(void);
151 * Get precise TSC frequency from system
153 * This function is private to the EAL.
155 uint64_t get_tsc_freq(void);
158 * Get TSC frequency if the architecture supports.
160 * This function is private to the EAL.
163 * The number of TSC cycles in one second.
164 * Returns zero if the architecture support is not available.
166 uint64_t get_tsc_freq_arch(void);
169 * Prepare physical memory mapping
170 * i.e. hugepages on Linux and
173 * This function is private to the EAL.
175 int rte_eal_hugepage_init(void);
178 * Creates memory mapping in secondary process
179 * i.e. hugepages on Linux and
182 * This function is private to the EAL.
184 int rte_eal_hugepage_attach(void);
187 * Find a bus capable of identifying a device.
190 * A device identifier (PCI address, virtual PMD name, ...).
193 * A valid bus handle if found.
194 * NULL if no bus is able to parse this device.
196 struct rte_bus *rte_bus_find_by_device_name(const char *str);
199 * Create the unix channel for primary/secondary communication.
206 int rte_mp_channel_init(void);
208 #endif /* _EAL_PRIVATE_H_ */