/* Default to having all POW constancy checks turned on */ #ifndef CVMX_ENABLE_POW_CHECKS #define CVMX_ENABLE_POW_CHECKS 1 #endif
enum cvmx_pow_tag_type { /* Tag ordering is maintained */
CVMX_POW_TAG_TYPE_ORDERED = 0L, /* Tag ordering is maintained, and at most one PP has the tag */
CVMX_POW_TAG_TYPE_ATOMIC = 1L, /* *Theworkqueueentryfromtheorder-NEVERtagswitchfrom *NULLtoNULL
*/
CVMX_POW_TAG_TYPE_NULL = 2L, /* A tag switch to NULL, and there is no space reserved in POW *-NEVERtagswitchtoNULL_NULL *-NEVERtagswitchfromNULL_NULL *-NULL_NULLisenteredatthebeginningoftimeandonadeschedule. *-NULL_NULLcanbeexitedbyanewworkrequest.ANULL_SWITCH *loadcanalsoswitchthestatetoNULL
*/
CVMX_POW_TAG_TYPE_NULL_NULL = 3L
};
/** *Addressfornewworkrequestloads(did<2:0>==0)
*/ struct { #ifdef __BIG_ENDIAN_BITFIELD /* Mips64 address region. Should be CVMX_IO_SEG */
uint64_t mem_region:2; /* Must be zero */
uint64_t reserved_49_61:13; /* Must be one */
uint64_t is_io:1; /* the ID of POW -- did<2:0> == 0 in this case */
uint64_t did:8; /* Must be zero */
uint64_t reserved_4_39:36; /* *Ifset,don'treturnloadresponseuntilworkis *available.
*/
uint64_t wait:1; /* Must be zero */
uint64_t reserved_0_2:3; #else
uint64_t reserved_0_2:3;
uint64_t wait:1;
uint64_t reserved_4_39:36;
uint64_t did:8;
uint64_t is_io:1;
uint64_t reserved_49_61:13;
uint64_t mem_region:2; #endif
} swork;
/** *AddressforloadstogetPOWinternalstatus
*/ struct { #ifdef __BIG_ENDIAN_BITFIELD /* Mips64 address region. Should be CVMX_IO_SEG */
uint64_t mem_region:2; /* Must be zero */
uint64_t reserved_49_61:13; /* Must be one */
uint64_t is_io:1; /* the ID of POW -- did<2:0> == 1 in this case */
uint64_t did:8; /* Must be zero */
uint64_t reserved_10_39:30; /* The core id to get status for */
uint64_t coreid:4; /* *Ifsetandget_curisset,returnreversetag-list *pointerratherthanforwardtag-listpointer.
*/
uint64_t get_rev:1; /* *Ifset,returncurrentstatusratherthanpending *status.
*/
uint64_t get_cur:1; /* *Ifset,getthework-queuepointerratherthan *tag/type.
*/
uint64_t get_wqp:1; /* Must be zero */
uint64_t reserved_0_2:3; #else
uint64_t reserved_0_2:3;
uint64_t get_wqp:1;
uint64_t get_cur:1;
uint64_t get_rev:1;
uint64_t coreid:4;
uint64_t reserved_10_39:30;
uint64_t did:8;
uint64_t is_io:1;
uint64_t reserved_49_61:13;
uint64_t mem_region:2; #endif
} sstatus;
/** *AddressformemoryloadstogetPOWinternalstate
*/ struct { #ifdef __BIG_ENDIAN_BITFIELD /* Mips64 address region. Should be CVMX_IO_SEG */
uint64_t mem_region:2; /* Must be zero */
uint64_t reserved_49_61:13; /* Must be one */
uint64_t is_io:1; /* the ID of POW -- did<2:0> == 2 in this case */
uint64_t did:8; /* Must be zero */
uint64_t reserved_16_39:24; /* POW memory index */
uint64_t index:11; /* *Ifset,returndescheduleinformationratherthan *thestandardresponseforwork-queueindex(invalid *ifthework-queueentryisnotonthedeschedule *list).
*/
uint64_t get_des:1; /* *Ifset,getthework-queuepointerratherthan *tag/type(noeffectwhenget_desset).
*/
uint64_t get_wqp:1; /* Must be zero */
uint64_t reserved_0_2:3; #else
uint64_t reserved_0_2:3;
uint64_t get_wqp:1;
uint64_t get_des:1;
uint64_t index:11;
uint64_t reserved_16_39:24;
uint64_t did:8;
uint64_t is_io:1;
uint64_t reserved_49_61:13;
uint64_t mem_region:2; #endif
} smemload;
/** *Addressforindex/pointerloads
*/ struct { #ifdef __BIG_ENDIAN_BITFIELD /* Mips64 address region. Should be CVMX_IO_SEG */
uint64_t mem_region:2; /* Must be zero */
uint64_t reserved_49_61:13; /* Must be one */
uint64_t is_io:1; /* the ID of POW -- did<2:0> == 3 in this case */
uint64_t did:8; /* Must be zero */
uint64_t reserved_9_39:31; /* *when{get_rmt==0ANDget_des_get_tail==0},this *fieldselectsoneofeightPOWinternal-input *queues(0-7),oneperQOSlevel;values8-15are *illegalinthiscase;when{get_rmt==0AND *get_des_get_tail==1},thisfieldselectsoneof *16deschedulelists(pergroup);whenget_rmt==1, *thisfieldselectsoneof16memory-inputqueue *lists.Thetwomemory-inputqueuelistsassociated *witheachQOSlevelare: * *-qosgrp=0,qosgrp=8:QOS0 *-qosgrp=1,qosgrp=9:QOS1 *-qosgrp=2,qosgrp=10:QOS2 *-qosgrp=3,qosgrp=11:QOS3 *-qosgrp=4,qosgrp=12:QOS4 *-qosgrp=5,qosgrp=13:QOS5 *-qosgrp=6,qosgrp=14:QOS6 *-qosgrp=7,qosgrp=15:QOS7
*/
uint64_t qosgrp:4; /* *Ifsetandget_rmtisclear,returndeschedulelist *indexesratherthanindexesforthespecifiedqos *level;ifsetandget_rmtisset,returnthetail *pointerratherthantheheadpointerforthe *specifiedqoslevel.
*/
uint64_t get_des_get_tail:1; /* *Ifset,returnremotepointersratherthanthe *localindexesforthespecifiedqoslevel.
*/
uint64_t get_rmt:1; /* Must be zero */
uint64_t reserved_0_2:3; #else
uint64_t reserved_0_2:3;
uint64_t get_rmt:1;
uint64_t get_des_get_tail:1;
uint64_t qosgrp:4;
uint64_t reserved_9_39:31;
uint64_t did:8;
uint64_t is_io:1;
uint64_t reserved_49_61:13;
uint64_t mem_region:2; #endif
} sindexload;
/** *addressforNULL_RDrequest(did<2:0>==4)whenthisisread, *HWattemptstochangethestatetoNULLifitisNULL_NULL(the *hardwarecannotswitchfromNULL_NULLtoNULLifaPOWentryis *notavailable-softwaremayneedtorecoverbyfinishing *anotherpieceofworkbeforeaPOWentrycaneverbecome *available.)
*/ struct { #ifdef __BIG_ENDIAN_BITFIELD /* Mips64 address region. Should be CVMX_IO_SEG */
uint64_t mem_region:2; /* Must be zero */
uint64_t reserved_49_61:13; /* Must be one */
uint64_t is_io:1; /* the ID of POW -- did<2:0> == 4 in this case */
uint64_t did:8; /* Must be zero */
uint64_t reserved_0_39:40; #else
uint64_t reserved_0_39:40;
uint64_t did:8;
uint64_t is_io:1;
uint64_t reserved_49_61:13;
uint64_t mem_region:2; #endif
} snull_rd;
} cvmx_pow_load_addr_t;
/** *Responsetonewworkrequestloads
*/ struct { #ifdef __BIG_ENDIAN_BITFIELD /* *Setwhennonewworkqueueentrywasreturned.* *Iftherewasde-scheduledwork,theHWwill *definitelyreturnit.Whenthisbitisset,it *couldmeaneithermean: * *-Therewasnowork,or * *-TherewasnoworkthattheHWcouldfind.This *casecanhappen,regardlessofthewaitbitvalue *intheoriginalrequest,whenthereisworkin *theIQ'sthatistoodeepdownthelist.
*/
uint64_t no_work:1; /* Must be zero */
uint64_t reserved_40_62:23; /* 36 in O1 -- the work queue pointer */
uint64_t addr:40; #else
uint64_t addr:40;
uint64_t reserved_40_62:23;
uint64_t no_work:1; #endif
} s_work;
/** *ResultforaPOWStatusLoad(whenget_cur==0andget_wqp==0)
*/ struct { #ifdef __BIG_ENDIAN_BITFIELD
uint64_t reserved_62_63:2; /* Set when there is a pending non-NULL SWTAG or *SWTAG_FULL,andthePOWentryhasnotleftthelist
* for the original tag. */
uint64_t pend_switch:1; /* Set when SWTAG_FULL and pend_switch is set. */
uint64_t pend_switch_full:1; /* *SetwhenthereisapendingNULLSWTAG,oran *implicitswitchtoNULL.
*/
uint64_t pend_switch_null:1; /* Set when there is a pending DESCHED or SWTAG_DESCHED. */
uint64_t pend_desched:1; /* *SetwhenthereisapendingSWTAG_DESCHEDand *pend_deschedisset.
*/
uint64_t pend_desched_switch:1; /* Set when nosched is desired and pend_desched is set. */
uint64_t pend_nosched:1; /* Set when there is a pending GET_WORK. */
uint64_t pend_new_work:1; /* *Whenpend_new_workisset,thisbitindicatesthat *thewaitbitwasset.
*/
uint64_t pend_new_work_wait:1; /* Set when there is a pending NULL_RD. */
uint64_t pend_null_rd:1; /* Set when there is a pending CLR_NSCHED. */
uint64_t pend_nosched_clr:1;
uint64_t reserved_51:1; /* This is the index when pend_nosched_clr is set. */
uint64_t pend_index:11; /* *Thisisthenew_grpwhen(pend_deschedAND *pend_desched_switch)isset.
*/
uint64_t pend_grp:4;
uint64_t reserved_34_35:2; /* *Thisisthetagtypewhenpend_switchor *(pend_deschedANDpend_desched_switch)areset.
*/
uint64_t pend_type:2; /* *-thisisthetagwhenpend_switchor(pend_desched *ANDpend_desched_switch)areset.
*/
uint64_t pend_tag:32; #else
uint64_t pend_tag:32;
uint64_t pend_type:2;
uint64_t reserved_34_35:2;
uint64_t pend_grp:4;
uint64_t pend_index:11;
uint64_t reserved_51:1;
uint64_t pend_nosched_clr:1;
uint64_t pend_null_rd:1;
uint64_t pend_new_work_wait:1;
uint64_t pend_new_work:1;
uint64_t pend_nosched:1;
uint64_t pend_desched_switch:1;
uint64_t pend_desched:1;
uint64_t pend_switch_null:1;
uint64_t pend_switch_full:1;
uint64_t pend_switch:1;
uint64_t reserved_62_63:2; #endif
} s_sstatus0;
/** *ResultforaPOWStatusLoad(whenget_cur==0andget_wqp==1)
*/ struct { #ifdef __BIG_ENDIAN_BITFIELD
uint64_t reserved_62_63:2; /* *Setwhenthereisapendingnon-NULLSWTAGor *SWTAG_FULL,andthePOWentryhasnotleftthelist *fortheoriginaltag.
*/
uint64_t pend_switch:1; /* Set when SWTAG_FULL and pend_switch is set. */
uint64_t pend_switch_full:1; /* *SetwhenthereisapendingNULLSWTAG,oran *implicitswitchtoNULL.
*/
uint64_t pend_switch_null:1; /* *SetwhenthereisapendingDESCHEDor *SWTAG_DESCHED.
*/
uint64_t pend_desched:1; /* *SetwhenthereisapendingSWTAG_DESCHEDand *pend_deschedisset.
*/
uint64_t pend_desched_switch:1; /* Set when nosched is desired and pend_desched is set. */
uint64_t pend_nosched:1; /* Set when there is a pending GET_WORK. */
uint64_t pend_new_work:1; /* *Whenpend_new_workisset,thisbitindicatesthat *thewaitbitwasset.
*/
uint64_t pend_new_work_wait:1; /* Set when there is a pending NULL_RD. */
uint64_t pend_null_rd:1; /* Set when there is a pending CLR_NSCHED. */
uint64_t pend_nosched_clr:1;
uint64_t reserved_51:1; /* This is the index when pend_nosched_clr is set. */
uint64_t pend_index:11; /* *Thisisthenew_grpwhen(pend_deschedAND *pend_desched_switch)isset.
*/
uint64_t pend_grp:4; /* This is the wqp when pend_nosched_clr is set. */
uint64_t pend_wqp:36; #else
uint64_t pend_wqp:36;
uint64_t pend_grp:4;
uint64_t pend_index:11;
uint64_t reserved_51:1;
uint64_t pend_nosched_clr:1;
uint64_t pend_null_rd:1;
uint64_t pend_new_work_wait:1;
uint64_t pend_new_work:1;
uint64_t pend_nosched:1;
uint64_t pend_desched_switch:1;
uint64_t pend_desched:1;
uint64_t pend_switch_null:1;
uint64_t pend_switch_full:1;
uint64_t pend_switch:1;
uint64_t reserved_62_63:2; #endif
} s_sstatus1;
/** *ResponsetoNULL_RDrequestloads
*/ struct { #ifdef __BIG_ENDIAN_BITFIELD
uint64_t unused:62; /* of type cvmx_pow_tag_type_t. state is one of the *following: * *-CVMX_POW_TAG_TYPE_ORDERED *-CVMX_POW_TAG_TYPE_ATOMIC *-CVMX_POW_TAG_TYPE_NULL *-CVMX_POW_TAG_TYPE_NULL_NULL
*/
uint64_t state:2; #else
uint64_t state:2;
uint64_t unused:62; #endif
} s_null_rd;
struct { #ifdef __BIG_ENDIAN_BITFIELD /* Memory region. Should be CVMX_IO_SEG in most cases */
uint64_t mem_reg:2;
uint64_t reserved_49_61:13; /* Must be zero */
uint64_t is_io:1; /* Must be one */ /* Device ID of POW. Note that different sub-dids are used. */
uint64_t did:8;
uint64_t reserved_36_39:4; /* Must be zero */ /* Address field. addr<2:0> must be zero */
uint64_t addr:36; #else
uint64_t addr:36;
uint64_t reserved_36_39:4;
uint64_t did:8;
uint64_t is_io:1;
uint64_t reserved_49_61:13;
uint64_t mem_reg:2; #endif
} stag;
} cvmx_pow_tag_store_addr_t;
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;
uint64_t unused:36; /* if set, don't return load response until work is available */
uint64_t wait:1;
uint64_t unused2:3; #else
uint64_t unused2:3;
uint64_t wait:1;
uint64_t unused:36;
uint64_t did:8;
uint64_t len:8;
uint64_t scraddr:8; #endif
} s;
} cvmx_pow_iobdma_store_t;
/* CSR typedefs have been moved to cvmx-csr-*.h */
/** *Printawarningifatagswitchispendingforthiscore * *@function:Functionnamecheckingforapendingtagswitch
*/ staticinlinevoid __cvmx_pow_warn_if_pending_switch(constchar *function)
{
uint64_t switch_complete;
CVMX_MF_CHORD(switch_complete); if (!switch_complete)
pr_warn("%s called with tag switch in progress\n", function);
}
/** *Waitsforatagswitchtocompletebypollingthecompletionbit. *NotethatswitchestoNULLcompleteimmediatelyanddonotneed *tobewaitedfor.
*/ staticinlinevoid cvmx_pow_tag_sw_wait(void)
{ const uint64_t MAX_CYCLES = 1ull << 31;
uint64_t switch_complete;
uint64_t start_cycle = cvmx_get_cycle(); while (1) {
CVMX_MF_CHORD(switch_complete); if (unlikely(switch_complete)) break; if (unlikely(cvmx_get_cycle() > start_cycle + MAX_CYCLES)) {
pr_warn("Tag switch is taking a long time, possible deadlock\n");
start_cycle = -MAX_CYCLES - 1;
}
}
}
if (CVMX_ENABLE_POW_CHECKS) {
cvmx_pow_tag_req_t current_tag;
__cvmx_pow_warn_if_pending_switch(__func__);
current_tag = cvmx_pow_get_current_tag(); if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL_NULL)
pr_warn("%s called with NULL_NULL tag\n", __func__); if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL)
pr_warn("%s called with NULL tag\n", __func__); if ((current_tag.s.type == tag_type)
&& (current_tag.s.tag == tag))
pr_warn("%s called to perform a tag switch to the same tag\n",
__func__); if (tag_type == CVMX_POW_TAG_TYPE_NULL)
pr_warn("%s called to perform a tag switch to NULL. Use cvmx_pow_tag_sw_null() instead\n",
__func__);
}
/* once this store arrives at POW, it will attempt the switch
software must wait for the switch to complete separately */
cvmx_write_io(ptr.u64, tag_req.u64);
}
if (CVMX_ENABLE_POW_CHECKS) {
cvmx_pow_tag_req_t current_tag;
__cvmx_pow_warn_if_pending_switch(__func__);
current_tag = cvmx_pow_get_current_tag(); if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL_NULL)
pr_warn("%s called with NULL_NULL tag\n", __func__); if ((current_tag.s.type == tag_type)
&& (current_tag.s.tag == tag))
pr_warn("%s called to perform a tag switch to the same tag\n",
__func__); if (tag_type == CVMX_POW_TAG_TYPE_NULL)
pr_warn("%s called to perform a tag switch to NULL. Use cvmx_pow_tag_sw_null() instead\n",
__func__); if (wqp != cvmx_phys_to_ptr(0x80)) if (wqp != cvmx_pow_get_current_wqp())
pr_warn("%s passed WQE(%p) doesn't match the address in the POW(%p)\n",
__func__, wqp,
cvmx_pow_get_current_wqp());
}
if (CVMX_ENABLE_POW_CHECKS) {
cvmx_pow_tag_req_t current_tag;
__cvmx_pow_warn_if_pending_switch(__func__);
current_tag = cvmx_pow_get_current_tag(); if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL_NULL)
pr_warn("%s called with NULL_NULL tag\n", __func__); if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL)
pr_warn("%s called when we already have a NULL tag\n",
__func__);
}
if (CVMX_ENABLE_POW_CHECKS) {
cvmx_pow_tag_req_t current_tag;
__cvmx_pow_warn_if_pending_switch(__func__);
current_tag = cvmx_pow_get_current_tag(); if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL_NULL)
pr_warn("%s called with NULL_NULL tag\n", __func__); if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL)
pr_warn("%s called with NULL tag. Deschedule not allowed from NULL state\n",
__func__); if ((current_tag.s.type != CVMX_POW_TAG_TYPE_ATOMIC)
&& (tag_type != CVMX_POW_TAG_TYPE_ATOMIC))
pr_warn("%s called where neither the before or after tag is ATOMIC\n",
__func__);
}
/* Need to make sure any writes to the work queue entry are complete */
CVMX_SYNCWS; /* *Ensurethatthereisnotapendingtagswitch,asatag *switchcannotbestartedifapreviousswitchisstill *pending.
*/
cvmx_pow_tag_sw_wait();
cvmx_pow_tag_sw_desched_nocheck(tag, tag_type, group, no_sched);
}
if (CVMX_ENABLE_POW_CHECKS) {
cvmx_pow_tag_req_t current_tag;
__cvmx_pow_warn_if_pending_switch(__func__);
current_tag = cvmx_pow_get_current_tag(); if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL_NULL)
pr_warn("%s called with NULL_NULL tag\n", __func__); if (current_tag.s.type == CVMX_POW_TAG_TYPE_NULL)
pr_warn("%s called with NULL tag. Deschedule not expected from NULL state\n",
__func__);
}
/* Need to make sure any writes to the work queue entry are complete */
CVMX_SYNCWS;
/* Below is the list of values for the top 8 bits of the tag. */ /* *Tagvalueswithtopbyteofthisvaluearereservedforinternal *executiveuses.
*/ #define CVMX_TAG_SW_BITS_INTERNAL 0x1 /* The executive divides the remaining 24 bits as follows: *-theupper8bits(bits23-16ofthetag)defineasubgroup * *-thelower16bits(bits15-0ofthetag)definearethevalue *withthesubgroup * *Notethatthissectiondescribestheformatoftagsgeneratedby *software-refertothehardwaredocumentationforadescriptionof *thetagsvaluesgeneratedbythepacketinputhardware.Subgroups *aredefinedhere.
*/ /* Mask for the value portion of the tag */ #define CVMX_TAG_SUBGROUP_MASK 0xFFFF #define CVMX_TAG_SUBGROUP_SHIFT 16 #define CVMX_TAG_SUBGROUP_PKO 0x1
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.74Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-10-02)
¤
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.