/** *StructuredescribingthedataformatusedforstorestotheFPA.
*/ typedefunion {
uint64_t u64; struct { #ifdef __BIG_ENDIAN_BITFIELD /* *the(64-bitword)locationinscratchpadtowrite *to(iflen!=0)
*/
uint64_t scraddr:8; /* the number of words in the response (0 => no response) */
uint64_t len:8; /* the ID of the device on the non-coherent bus */
uint64_t did:8; /* *theaddressthatwillappearinthefirsttickon *theNCBbus.
*/
uint64_t addr:40; #else
uint64_t addr:40;
uint64_t did:8;
uint64_t len:8;
uint64_t scraddr:8; #endif
} s;
} cvmx_fpa_iobdma_data_t;
/** *StructuredescribingthecurrentstateofaFPApool.
*/ typedefstruct { /* Name it was created under */ constchar *name; /* Size of each block */
uint64_t size; /* The base memory address of whole block */ void *base; /* The number of elements in the pool at creation */
uint64_t starting_element_count;
} cvmx_fpa_pool_info_t;
/** *FreeablockallocatedwithaFPApool.DoesNOTprovidememory *orderingincaseswherethememoryblockwasmodifiedbythecore. * *@ptr:Blocktofree *@pool:Pooltoputitin *@num_cache_lines: *Cachelinestoinvalidate
*/ staticinlinevoid cvmx_fpa_free_nosync(void *ptr, uint64_t pool,
uint64_t num_cache_lines)
{
cvmx_addr_t newptr;
newptr.u64 = cvmx_ptr_to_phys(ptr);
newptr.sfilldidspace.didspace =
CVMX_ADDR_DIDSPACE(CVMX_FULL_DID(CVMX_OCT_DID_FPA, pool)); /* Prevent GCC from reordering around free */
barrier(); /* value written is number of cache lines not written back */
cvmx_write_io(newptr.u64, num_cache_lines);
}
/** *FreeablockallocatedwithaFPApool.Providesrequiredmemory *orderingincaseswherememoryblockwasmodifiedbycore. * *@ptr:Blocktofree *@pool:Pooltoputitin *@num_cache_lines: *Cachelinestoinvalidate
*/ staticinlinevoid cvmx_fpa_free(void *ptr, uint64_t pool,
uint64_t num_cache_lines)
{
cvmx_addr_t newptr;
newptr.u64 = cvmx_ptr_to_phys(ptr);
newptr.sfilldidspace.didspace =
CVMX_ADDR_DIDSPACE(CVMX_FULL_DID(CVMX_OCT_DID_FPA, pool)); /* *Makesurethatanypreviouswritestomemorygooutbefore *wefreethisbuffer.Thisalsoservesasabarrierto *preventGCCfromreorderingoperationstoafterthe *free.
*/
CVMX_SYNCWS; /* value written is number of cache lines not written back */
cvmx_write_io(newptr.u64, num_cache_lines);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.