Lines Matching defs:p_FmPcd

49 t_Handle PrsConfig(t_FmPcd *p_FmPcd,t_FmPcdParams *p_FmPcdParams)
54 UNUSED(p_FmPcd);
65 if (p_FmPcd->guestId == NCSW_MASTER_ID)
73 p_FmPcd->p_FmPcdDriverParam->prsMaxParseCycleLimit = DEFAULT_prsMaxParseCycleLimit;
74 p_FmPcd->exceptions |= (DEFAULT_fmPcdPrsErrorExceptions | DEFAULT_fmPcdPrsExceptions);
81 t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
84 ASSERT_COND(p_FmPcd->guestId == NCSW_MASTER_ID);
85 event = GET_UINT32(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs->perr);
86 mask = GET_UINT32(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs->perer);
91 force = GET_UINT32(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs->perfr);
93 WRITE_UINT32(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs->perfr, force & ~event);
95 WRITE_UINT32(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs->perr, event);
100 p_FmPcd->f_Exception(p_FmPcd->h_App,e_FM_PCD_PRS_EXCEPTION_DOUBLE_ECC);
105 t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
108 ASSERT_COND(p_FmPcd->guestId == NCSW_MASTER_ID);
109 event = GET_UINT32(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs->pevr);
110 event &= GET_UINT32(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs->pever);
117 force = GET_UINT32(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs->pevfr);
119 WRITE_UINT32(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs->pevfr, force & ~event);
121 WRITE_UINT32(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs->pevr, event);
123 p_FmPcd->f_Exception(p_FmPcd->h_App,e_FM_PCD_PRS_EXCEPTION_SINGLE_ECC);
128 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
132 SANITY_CHECK_RETURN_VALUE(p_FmPcd, E_INVALID_HANDLE, 0);
133 SANITY_CHECK_RETURN_VALUE(!p_FmPcd->p_FmPcdDriverParam, E_INVALID_HANDLE, 0);
135 ASSERT_COND(p_FmPcd->guestId == NCSW_MASTER_ID);
136 ASSERT_COND(p_FmPcd->p_FmPcdPrs->currLabel < FM_PCD_PRS_NUM_OF_LABELS);
138 for (i=0; i < p_FmPcd->p_FmPcdPrs->currLabel; i++)
140 p_Label = &p_FmPcd->p_FmPcdPrs->labelsTable[i];
150 t_Error PrsInit(t_FmPcd *p_FmPcd)
152 t_FmPcdDriverParam *p_Param = p_FmPcd->p_FmPcdDriverParam;
153 t_FmPcdPrsRegs *p_Regs = p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs;
156 if(p_FmPcd->guestId != NCSW_MASTER_ID)
159 ASSERT_COND(p_FmPcd->guestId == NCSW_MASTER_ID);
171 FM_GetRevision(p_FmPcd->h_Fm, &revInfo);
187 FmRegisterIntr(p_FmPcd->h_Fm, e_FM_MOD_PRS, 0, e_FM_INTR_TYPE_ERR, PcdPrsErrorException, p_FmPcd);
190 FmRegisterIntr(p_FmPcd->h_Fm, e_FM_MOD_PRS, 0, e_FM_INTR_TYPE_NORMAL, PcdPrsException, p_FmPcd);
197 if(p_FmPcd->exceptions & FM_PCD_EX_PRS_SINGLE_ECC)
199 FmEnableRamsEcc(p_FmPcd->h_Fm);
213 if(p_FmPcd->exceptions & FM_PCD_EX_PRS_DOUBLE_ECC)
215 FmEnableRamsEcc(p_FmPcd->h_Fm);
222 WRITE_UINT32(p_Regs->ppsc, p_FmPcd->p_FmPcdPrs->fmPcdPrsPortIdStatistics);
231 FM_GetRevision(p_FmPcd->h_Fm, &revInfo);
244 WRITE_UINT32(*(p_FmPcd->p_FmPcdPrs->p_SwPrsCode+ FM_PCD_PRS_SW_OFFSET/4 + i), tmpReg);
246 p_FmPcd->p_FmPcdPrs->p_CurrSwPrs = FM_PCD_PRS_SW_OFFSET/4 + p_FmPcd->p_FmPcdPrs->p_SwPrsCode+sizeof(swPrsL4Patch)/4;
254 void PrsFree(t_FmPcd *p_FmPcd )
256 ASSERT_COND(p_FmPcd->guestId == NCSW_MASTER_ID);
257 FmUnregisterIntr(p_FmPcd->h_Fm, e_FM_MOD_PRS, 0, e_FM_INTR_TYPE_ERR);
259 FmUnregisterIntr(p_FmPcd->h_Fm, e_FM_MOD_PRS, 0, e_FM_INTR_TYPE_NORMAL);
262 void PrsEnable(t_FmPcd *p_FmPcd )
264 t_FmPcdPrsRegs *p_Regs = p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs;
266 ASSERT_COND(p_FmPcd->guestId == NCSW_MASTER_ID);
270 void PrsDisable(t_FmPcd *p_FmPcd )
272 t_FmPcdPrsRegs *p_Regs = p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs;
274 ASSERT_COND(p_FmPcd->guestId == NCSW_MASTER_ID);
278 t_Error PrsIncludePortInStatistics(t_FmPcd *p_FmPcd, uint8_t hardwarePortId, bool include)
284 SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
285 SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdPrs, E_INVALID_HANDLE);
291 p_FmPcd->p_FmPcdPrs->fmPcdPrsPortIdStatistics |= bitMask;
293 p_FmPcd->p_FmPcdPrs->fmPcdPrsPortIdStatistics &= ~bitMask;
295 WRITE_UINT32(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs->ppsc, p_FmPcd->p_FmPcdPrs->fmPcdPrsPortIdStatistics);
302 t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
308 SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
309 SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdPrs, E_INVALID_HANDLE);
311 if(p_FmPcd->guestId != NCSW_MASTER_ID)
318 if ((err = XX_IpcSendMessage(p_FmPcd->h_IpcSession,
328 return PrsIncludePortInStatistics(p_FmPcd, hardwarePortId, include);
333 t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
341 if(p_FmPcd->guestId != NCSW_MASTER_ID)
350 if ((err = XX_IpcSendMessage(p_FmPcd->h_IpcSession,
370 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
372 SANITY_CHECK_RETURN(p_FmPcd, E_INVALID_HANDLE);
373 SANITY_CHECK_RETURN(p_FmPcd->p_FmPcdPrs, E_INVALID_HANDLE);
375 if(p_FmPcd->guestId != NCSW_MASTER_ID)
381 WRITE_UINT32(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs->ppsc, FM_PCD_PRS_PPSC_ALL_PORTS);
383 WRITE_UINT32(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs->ppsc, 0);
389 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
393 SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
394 SANITY_CHECK_RETURN_ERROR(!p_FmPcd->p_FmPcdDriverParam, E_INVALID_STATE);
395 SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdPrs, E_INVALID_STATE);
397 SANITY_CHECK_RETURN_ERROR(!p_FmPcd->enabled, E_INVALID_HANDLE);
399 if(p_FmPcd->guestId != NCSW_MASTER_ID)
404 if(p_FmPcd->p_FmPcdPrs->p_CurrSwPrs > p_FmPcd->p_FmPcdPrs->p_SwPrsCode + p_SwPrs->base*2/4)
414 p_FmPcd->p_FmPcdPrs->currLabel = 0;
415 if(p_FmPcd->p_FmPcdPrs->currLabel+ p_SwPrs->numOfLabels > FM_PCD_PRS_NUM_OF_LABELS)
417 memcpy(&p_FmPcd->p_FmPcdPrs->labelsTable[p_FmPcd->p_FmPcdPrs->currLabel], p_SwPrs->labelsTable, p_SwPrs->numOfLabels*sizeof(t_FmPcdPrsLabelParams));
418 p_FmPcd->p_FmPcdPrs->currLabel += p_SwPrs->numOfLabels;
420 p_LoadTarget = p_FmPcd->p_FmPcdPrs->p_SwPrsCode + p_SwPrs->base*2/4;
431 p_FmPcd->p_FmPcdPrs->p_CurrSwPrs = p_FmPcd->p_FmPcdPrs->p_SwPrsCode + p_SwPrs->base*2/4 + p_SwPrs->size/4;
435 WRITE_UINT32(*(p_FmPcd->p_FmPcdPrs->p_SwPrsCode+PRS_SW_DATA/4+i), p_SwPrs->swPrsDataParams[i]);
439 WRITE_UINT32(*(p_FmPcd->p_FmPcdPrs->p_SwPrsCode+(PRS_SW_DATA-FM_PCD_PRS_SW_TAIL_SIZE)/4), 0);
446 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
448 SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
449 SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdDriverParam, E_INVALID_HANDLE);
451 if(p_FmPcd->guestId != NCSW_MASTER_ID)
454 p_FmPcd->p_FmPcdDriverParam->prsMaxParseCycleLimit = value;
463 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
468 SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
469 SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdPrs, E_INVALID_HANDLE);
470 SANITY_CHECK_RETURN_ERROR(!p_FmPcd->p_FmPcdDriverParam, E_INVALID_STATE);
472 if(p_FmPcd->guestId != NCSW_MASTER_ID)
476 return XX_IpcSendMessage(p_FmPcd->h_IpcSession,
485 DUMP_TITLE(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs, ("FmPcdPrsRegs Regs"));
487 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,rpclim);
488 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,rpimac);
489 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,pmeec);
490 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,pevr);
491 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,pever);
492 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,pevfr);
493 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,perr);
494 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,perer);
495 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,perfr);
496 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,ppsc);
497 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,pds);
498 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,l2rrs);
499 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,l3rrs);
500 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,l4rrs);
501 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,srrs);
502 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,l2rres);
503 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,l3rres);
504 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,l4rres);
505 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,srres);
506 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,spcs);
507 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,spscs);
508 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,hxscs);
509 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,mrcs);
510 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,mwcs);
511 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,mrscs);
512 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,mwscs);
513 DUMP_VAR(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs,fcscs);