36 #ifndef __CVMX_FPA_H__
37 #define __CVMX_FPA_H__
42 #define CVMX_FPA_NUM_POOLS 8
43 #define CVMX_FPA_MIN_BLOCK_SIZE 128
44 #define CVMX_FPA_ALIGNMENT 128
97 static inline const char *cvmx_fpa_get_name(
uint64_t pool)
99 return cvmx_fpa_pool_info[pool].
name;
110 return cvmx_fpa_pool_info[pool].
base;
124 return ((ptr >= cvmx_fpa_pool_info[pool].base) &&
126 ((
char *)(cvmx_fpa_pool_info[pool].base)) +
127 cvmx_fpa_pool_info[pool].
size *
128 cvmx_fpa_pool_info[pool].starting_element_count));
135 static inline void cvmx_fpa_enable(
void)
142 (
"Warning: Enabling FPA when FPA already enabled.\n");
149 if (cvmx_octeon_is_pass1()) {
152 for (i = 1; i < 8; i++) {
155 marks.s.fpf_wr = 0xe0;
176 static inline void *cvmx_fpa_alloc(
uint64_t pool)
181 return cvmx_phys_to_ptr(address);
201 data.
s.scraddr = scr_addr >> 3;
205 cvmx_send_single(data.
u64);
217 static inline void cvmx_fpa_free_nosync(
void *ptr,
uint64_t pool,
221 newptr.
u64 = cvmx_ptr_to_phys(ptr);
227 cvmx_write_io(newptr.
u64, num_cache_lines);
239 static inline void cvmx_fpa_free(
void *ptr,
uint64_t pool,
243 newptr.
u64 = cvmx_ptr_to_phys(ptr);
254 cvmx_write_io(newptr.
u64, num_cache_lines);