Lines Matching defs:p_FmPcd

53     t_FmPcd         *p_FmPcd = (t_FmPcd*)h_FmPcd;
56 SANITY_CHECK_RETURN_VALUE(p_FmPcd, E_INVALID_HANDLE, FALSE);
58 for(i=0;i<p_FmPcd->p_FmPcdPlcr->numOfSharedProfiles;i++)
59 if(p_FmPcd->p_FmPcdPlcr->sharedProfilesIds[i] == absoluteProfileId)
64 static t_Error SetProfileNia(t_FmPcd *p_FmPcd, e_FmPcdEngine nextEngine, u_FmPcdPlcrNextEngineParams *p_NextEngineParams, uint32_t *nextAction)
89 relativeSchemeId = FmPcdKgGetRelativeSchemeId(p_FmPcd, physicatSchemeId);
92 if (!FmPcdKgIsSchemeValidSw(p_FmPcd, relativeSchemeId))
94 if(!KgIsSchemeAlwaysDirect(p_FmPcd, relativeSchemeId))
99 if(!FmPcdPlcrIsProfileShared(p_FmPcd, absoluteProfileId))
101 if(!FmPcdPlcrIsProfileValid(p_FmPcd, absoluteProfileId))
167 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
172 bitFor1Micro = FmGetTimeStampScale(p_FmPcd->h_Fm); /* TimeStamp per nano seconds units */
246 static void WritePar(t_FmPcd *p_FmPcd, uint32_t par)
248 t_FmPcdPlcrRegs *p_FmPcdPlcrRegs = p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs;
250 ASSERT_COND(FmIsMaster(p_FmPcd->h_Fm));
262 t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
265 ASSERT_COND(FmIsMaster(p_FmPcd->h_Fm));
266 event = GET_UINT32(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs->fmpl_evr);
267 mask = GET_UINT32(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs->fmpl_ier);
272 force = GET_UINT32(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs->fmpl_ifr);
274 WRITE_UINT32(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs->fmpl_ifr, force & ~event);
277 WRITE_UINT32(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs->fmpl_evr, event);
280 p_FmPcd->f_Exception(p_FmPcd->h_App,e_FM_PCD_PLCR_EXCEPTION_PRAM_SELF_INIT_COMPLETE);
282 p_FmPcd->f_Exception(p_FmPcd->h_App,e_FM_PCD_PLCR_EXCEPTION_ATOMIC_ACTION_COMPLETE);
290 t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
293 ASSERT_COND(FmIsMaster(p_FmPcd->h_Fm));
294 event = GET_UINT32(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs->fmpl_eevr);
295 mask = GET_UINT32(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs->fmpl_eier);
300 force = GET_UINT32(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs->fmpl_eifr);
302 WRITE_UINT32(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs->fmpl_eifr, force & ~event);
304 WRITE_UINT32(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs->fmpl_eevr, event);
307 p_FmPcd->f_Exception(p_FmPcd->h_App,e_FM_PCD_PLCR_EXCEPTION_DOUBLE_ECC);
310 captureReg = GET_UINT32(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs->fmpl_upcr);
315 p_FmPcd->f_FmPcdIndexedException(p_FmPcd->h_App,e_FM_PCD_PLCR_EXCEPTION_INIT_ENTRY_ERROR,(uint16_t)(captureReg & PLCR_ERR_UNINIT_NUM_MASK));
316 WRITE_UINT32(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs->fmpl_upcr, PLCR_ERR_UNINIT_CAP);
322 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
324 ASSERT_COND(p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].valid);
327 p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].pointedOwners++;
329 p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].pointedOwners--;
334 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
336 ASSERT_COND(p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].valid);
338 return p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].pointedOwners;
342 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
344 ASSERT_COND(p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].valid);
346 return p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].requiredAction;
351 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
360 SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
367 if(p_FmPcd->guestId != NCSW_MASTER_ID)
377 if ((err = XX_IpcSendMessage(p_FmPcd->h_IpcSession,
394 err = PlcrAllocProfiles(p_FmPcd, hardwarePortId, numOfProfiles, &base);
400 p_FmPcd->p_FmPcdPlcr->portsMapping[swPortIndex].numOfProfiles = numOfProfiles;
401 p_FmPcd->p_FmPcdPlcr->portsMapping[swPortIndex].profilesBase = base;
408 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
416 SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
420 if(p_FmPcd->guestId != NCSW_MASTER_ID)
425 ipcPlcrParams.num = p_FmPcd->p_FmPcdPlcr->portsMapping[swPortIndex].numOfProfiles;
427 ipcPlcrParams.plcrProfilesBase = p_FmPcd->p_FmPcdPlcr->portsMapping[swPortIndex].profilesBase;
431 if ((err = XX_IpcSendMessage(p_FmPcd->h_IpcSession,
446 err = PlcrFreeProfiles(p_FmPcd, hardwarePortId, p_FmPcd->p_FmPcdPlcr->portsMapping[swPortIndex].numOfProfiles, p_FmPcd->p_FmPcdPlcr->portsMapping[swPortIndex].profilesBase);
450 p_FmPcd->p_FmPcdPlcr->portsMapping[swPortIndex].numOfProfiles = 0;
451 p_FmPcd->p_FmPcdPlcr->portsMapping[swPortIndex].profilesBase = 0;
458 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
459 t_FmPcdPlcr *p_FmPcdPlcr = p_FmPcd->p_FmPcdPlcr;
464 t_Error PlcrAllocProfiles(t_FmPcd *p_FmPcd, uint8_t hardwarePortId, uint16_t numOfProfiles, uint16_t *p_Base)
466 t_FmPcdPlcrRegs *p_Regs = p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs;
471 SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
473 ASSERT_COND(FmIsMaster(p_FmPcd->h_Fm));
485 intFlags = FmPcdLock(p_FmPcd);
489 FmPcdUnlock(p_FmPcd, intFlags);
497 if(!p_FmPcd->p_FmPcdPlcr->profiles[i].profilesMng.allocated)
515 p_FmPcd->p_FmPcdPlcr->profiles[i].profilesMng.allocated = TRUE;
516 p_FmPcd->p_FmPcdPlcr->profiles[i].profilesMng.ownerId = hardwarePortId;
521 FmPcdUnlock(p_FmPcd, intFlags);
534 FmPcdUnlock(p_FmPcd, intFlags);
539 t_Error PlcrAllocSharedProfiles(t_FmPcd *p_FmPcd, uint16_t numOfProfiles, uint16_t *profilesIds)
544 SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
546 ASSERT_COND(FmIsMaster(p_FmPcd->h_Fm));
556 if(!p_FmPcd->p_FmPcdPlcr->profiles[i].profilesMng.allocated)
569 p_FmPcd->p_FmPcdPlcr->profiles[profilesIds[i]].profilesMng.allocated = TRUE;
570 p_FmPcd->p_FmPcdPlcr->profiles[profilesIds[i]].profilesMng.ownerId = 0;
576 t_Error PlcrFreeProfiles(t_FmPcd *p_FmPcd, uint8_t hardwarePortId, uint16_t numOfProfiles, uint16_t base)
578 t_FmPcdPlcrRegs *p_Regs = p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs;
581 SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
582 SANITY_CHECK_RETURN_ERROR(!p_FmPcd->p_FmPcdDriverParam, E_INVALID_HANDLE);
584 ASSERT_COND(FmIsMaster(p_FmPcd->h_Fm));
590 ASSERT_COND(p_FmPcd->p_FmPcdPlcr->profiles[i].profilesMng.ownerId == hardwarePortId);
591 ASSERT_COND(p_FmPcd->p_FmPcdPlcr->profiles[i].profilesMng.allocated);
593 p_FmPcd->p_FmPcdPlcr->profiles[i].profilesMng.allocated = FALSE;
594 p_FmPcd->p_FmPcdPlcr->profiles[i].profilesMng.ownerId = 0;
600 void PlcrFreeSharedProfiles(t_FmPcd *p_FmPcd, uint16_t numOfProfiles, uint16_t *profilesIds)
604 SANITY_CHECK_RETURN(p_FmPcd, E_INVALID_HANDLE);
606 ASSERT_COND(FmIsMaster(p_FmPcd->h_Fm));
609 ASSERT_COND(p_FmPcd->p_FmPcdPlcr->profiles[profilesIds[i]].profilesMng.allocated);
610 p_FmPcd->p_FmPcdPlcr->profiles[profilesIds[i]].profilesMng.allocated = FALSE;
614 void PlcrEnable(t_FmPcd *p_FmPcd)
616 t_FmPcdPlcrRegs *p_Regs = p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs;
621 void PlcrDisable(t_FmPcd *p_FmPcd)
623 t_FmPcdPlcrRegs *p_Regs = p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs;
630 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
633 SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
634 SANITY_CHECK_RETURN_ERROR(!p_FmPcd->p_FmPcdDriverParam, E_INVALID_HANDLE);
635 SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdPlcr, E_INVALID_HANDLE);
637 if(!FmIsMaster(p_FmPcd->h_Fm))
640 tmpReg32 = GET_UINT32(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs->fmpl_gcr);
646 WRITE_UINT32(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs->fmpl_gcr, tmpReg32);
652 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
654 SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
655 SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdDriverParam, E_INVALID_HANDLE);
656 SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdPlcr, E_INVALID_HANDLE);
658 if(!FmIsMaster(p_FmPcd->h_Fm))
661 p_FmPcd->p_FmPcdDriverParam->plcrAutoRefresh = enable;
670 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
675 err = SetProfileNia(p_FmPcd, p_Profile->nextEngineOnGreen, &(p_Profile->paramsOnGreen), &gnia);
678 err = SetProfileNia(p_FmPcd, p_Profile->nextEngineOnYellow, &(p_Profile->paramsOnYellow), &ynia);
681 err = SetProfileNia(p_FmPcd, p_Profile->nextEngineOnRed, &(p_Profile->paramsOnRed), &rnia);
862 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
864 ASSERT_COND(!p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].valid);
865 p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].valid = TRUE;
870 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
872 ASSERT_COND(p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].valid);
873 p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].valid = FALSE;
876 t_Handle PlcrConfig(t_FmPcd *p_FmPcd, t_FmPcdParams *p_FmPcdParams)
881 UNUSED(p_FmPcd);
891 if(p_FmPcd->guestId == NCSW_MASTER_ID)
894 p_FmPcd->p_FmPcdDriverParam->plcrAutoRefresh = DEFAULT_plcrAutoRefresh;
895 p_FmPcd->exceptions |= (DEFAULT_fmPcdPlcrExceptions | DEFAULT_fmPcdPlcrErrorExceptions);
903 t_Error PlcrInit(t_FmPcd *p_FmPcd)
905 t_FmPcdDriverParam *p_Param = p_FmPcd->p_FmPcdDriverParam;
906 t_FmPcdPlcr *p_FmPcdPlcr = p_FmPcd->p_FmPcdPlcr;
909 t_FmPcdPlcrRegs *p_Regs = p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs;
914 if ((p_FmPcd->guestId != NCSW_MASTER_ID) &&
927 if ((err = XX_IpcSendMessage(p_FmPcd->h_IpcSession,
947 p_FmPcd->p_FmPcdPlcr->sharedProfilesIds[index++] = (uint16_t)(i*32+j);
958 err = PlcrAllocSharedProfiles(p_FmPcd, p_FmPcdPlcr->numOfSharedProfiles, p_FmPcd->p_FmPcdPlcr->sharedProfilesIds);
978 if(p_FmPcd->exceptions & FM_PCD_EX_PLCR_DOUBLE_ECC)
980 FmEnableRamsEcc(p_FmPcd->h_Fm);
983 if(p_FmPcd->exceptions & FM_PCD_EX_PLCR_INIT_ENTRY_ERROR)
993 if(p_FmPcd->exceptions & FM_PCD_EX_PLCR_PRAM_SELF_INIT_COMPLETE)
995 if(p_FmPcd->exceptions & FM_PCD_EX_PLCR_ATOMIC_ACTION_COMPLETE )
1001 FmRegisterIntr(p_FmPcd->h_Fm, e_FM_MOD_PLCR, 0, e_FM_INTR_TYPE_ERR, PcdPlcrErrorException, p_FmPcd);
1002 FmRegisterIntr(p_FmPcd->h_Fm, e_FM_MOD_PLCR, 0, e_FM_INTR_TYPE_NORMAL, PcdPlcrException, p_FmPcd);
1008 p_FmPcd->p_FmPcdPlcr->profiles[0].profilesMng.allocated = TRUE;
1013 t_Error PlcrFree(t_FmPcd *p_FmPcd)
1019 FmUnregisterIntr(p_FmPcd->h_Fm, e_FM_MOD_PLCR, 0, e_FM_INTR_TYPE_ERR);
1020 FmUnregisterIntr(p_FmPcd->h_Fm, e_FM_MOD_PLCR, 0, e_FM_INTR_TYPE_NORMAL);
1022 if(p_FmPcd->p_FmPcdPlcr->numOfSharedProfiles)
1024 if(p_FmPcd->guestId != NCSW_MASTER_ID)
1029 ipcSharedPlcrParams.num = p_FmPcd->p_FmPcdPlcr->numOfSharedProfiles;
1032 for(i = 0;i<p_FmPcd->p_FmPcdPlcr->numOfSharedProfiles;i++)
1033 ipcSharedPlcrParams.sharedProfilesMask[p_FmPcd->p_FmPcdPlcr->sharedProfilesIds[i]/32] |= (0x80000000 >> (p_FmPcd->p_FmPcdPlcr->sharedProfilesIds[i] % 32));
1038 if ((err = XX_IpcSendMessage(p_FmPcd->h_IpcSession,
1048 PlcrFreeSharedProfiles(p_FmPcd, p_FmPcd->p_FmPcdPlcr->numOfSharedProfiles, p_FmPcd->p_FmPcdPlcr->sharedProfilesIds);*/
1059 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
1060 t_FmPcdPlcr *p_FmPcdPlcr = p_FmPcd->p_FmPcdPlcr;
1068 if(p_FmPcd->p_FmPcdPlcr->portsMapping[i].h_FmPort == h_FmPort)
1073 if(!p_FmPcd->p_FmPcdPlcr->portsMapping[i].numOfProfiles)
1075 if(relativeProfile >= p_FmPcd->p_FmPcdPlcr->portsMapping[i].numOfProfiles)
1077 *p_AbsoluteId = (uint16_t)(p_FmPcd->p_FmPcdPlcr->portsMapping[i].profilesBase + relativeProfile);
1092 t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
1097 return p_FmPcd->p_FmPcdPlcr->portsMapping[swPortIndex].profilesBase;
1102 t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
1107 return p_FmPcd->p_FmPcdPlcr->portsMapping[swPortIndex].numOfProfiles;
1177 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
1179 ASSERT_COND(p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].valid);
1181 p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].requiredAction = requiredAction;
1186 t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
1189 ans = TRY_LOCK(NULL, &p_FmPcd->p_FmPcdPlcr->profiles[profileId].lock);
1191 ans = TRY_LOCK(p_FmPcd->h_Spinlock, &p_FmPcd->p_FmPcdPlcr->profiles[profileId].lock);
1209 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
1217 SANITY_CHECK_RETURN_VALUE(p_FmPcd, E_INVALID_HANDLE, NULL);
1218 SANITY_CHECK_RETURN_VALUE(!p_FmPcd->p_FmPcdDriverParam, E_INVALID_STATE, NULL);
1219 SANITY_CHECK_RETURN_VALUE(p_FmPcd->p_FmPcdPlcr, E_INVALID_HANDLE, NULL);
1221 if (p_FmPcd->h_Hc)
1222 return FmHcPcdPlcrSetProfile(p_FmPcd->h_Hc, p_Profile);
1224 p_FmPcdPlcrRegs = p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs;
1235 if (FmPcdPlcrProfileTryLock(p_FmPcd, absoluteProfileId, FALSE))
1240 intFlags = FmPcdLock(p_FmPcd);
1253 FmPcdUnlock(p_FmPcd, intFlags);
1257 err = FmPcdPlcrProfileTryLock(p_FmPcd, absoluteProfileId, TRUE);
1258 FmPcdUnlock(p_FmPcd, intFlags);
1268 intFlags = FmPcdLock(p_FmPcd);
1269 WritePar(p_FmPcd, tmpReg32);
1271 FmPcdUnlock(p_FmPcd, intFlags);
1274 RELEASE_LOCK(p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].lock);
1285 RELEASE_LOCK(p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].lock);
1290 p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].nextEngineOnGreen = p_Profile->nextEngineOnGreen;
1291 memcpy(&p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].paramsOnGreen, &(p_Profile->paramsOnGreen), sizeof(u_FmPcdPlcrNextEngineParams));
1293 p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].nextEngineOnYellow = p_Profile->nextEngineOnYellow;
1294 memcpy(&p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].paramsOnYellow, &(p_Profile->paramsOnYellow), sizeof(u_FmPcdPlcrNextEngineParams));
1296 p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].nextEngineOnRed = p_Profile->nextEngineOnRed;
1297 memcpy(&p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].paramsOnRed, &(p_Profile->paramsOnRed), sizeof(u_FmPcdPlcrNextEngineParams));
1299 intFlags = FmPcdLock(p_FmPcd);
1318 WritePar(p_FmPcd, tmpReg32);
1320 FmPcdUnlock(p_FmPcd, intFlags);
1323 FmPcdPlcrValidateProfileSw(p_FmPcd,absoluteProfileId);
1325 RELEASE_LOCK(p_FmPcd->p_FmPcdPlcr->profiles[absoluteProfileId].lock);
1332 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
1336 SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
1337 SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdPlcr, E_INVALID_HANDLE);
1340 if (p_FmPcd->h_Hc)
1341 return FmHcPcdPlcrDeleteProfile(p_FmPcd->h_Hc, h_Profile);
1343 FmPcdPlcrInvalidateProfileSw(p_FmPcd,profileIndx);
1345 intFlags = FmPcdLock(p_FmPcd);
1346 WRITE_UINT32(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs->profileRegs.fmpl_pemode, ~FM_PCD_PLCR_PEMODE_PI);
1349 WritePar(p_FmPcd, tmpReg32);
1350 FmPcdUnlock(p_FmPcd, intFlags);
1361 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
1366 SANITY_CHECK_RETURN_VALUE(p_FmPcd, E_INVALID_HANDLE, 0);
1367 SANITY_CHECK_RETURN_VALUE(!p_FmPcd->p_FmPcdDriverParam, E_INVALID_STATE, 0);
1368 SANITY_CHECK_RETURN_VALUE(p_FmPcd->p_FmPcdPlcr, E_INVALID_HANDLE, 0);
1370 if (p_FmPcd->h_Hc)
1371 return FmHcPcdPlcrGetProfileCounter(p_FmPcd->h_Hc, h_Profile, counter);
1373 p_FmPcdPlcrRegs = p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs;
1381 intFlags = FmPcdLock(p_FmPcd);
1382 WritePar(p_FmPcd, FmPcdPlcrBuildReadPlcrActionReg(profileIndx));
1387 FmPcdUnlock(p_FmPcd, intFlags);
1412 FmPcdUnlock(p_FmPcd, intFlags);
1420 t_FmPcd *p_FmPcd = (t_FmPcd *)h_FmPcd;
1421 t_FmPcdPlcr *p_FmPcdPlcr = p_FmPcd->p_FmPcdPlcr;
1425 if (p_FmPcd->h_Hc)
1426 return FmHcPcdPlcrCcGetSetParams(p_FmPcd->h_Hc, profileIndx, requiredAction);
1431 if (FmPcdPlcrProfileTryLock(p_FmPcd, profileIndx, FALSE))
1434 intFlags = FmPcdLock(p_FmPcd);
1435 WritePar(p_FmPcd, FmPcdPlcrBuildReadPlcrActionReg(profileIndx));
1439 FmPcdUnlock(p_FmPcd, intFlags);
1440 RELEASE_LOCK(p_FmPcd->p_FmPcdPlcr->profiles[profileIndx].lock);
1444 ASSERT_COND(p_FmPcd->p_FmPcdPlcr->profiles[profileIndx].valid);
1446 if(!p_FmPcd->p_FmPcdPlcr->profiles[profileIndx].pointedOwners ||
1447 !(p_FmPcd->p_FmPcdPlcr->profiles[profileIndx].requiredAction & requiredAction))
1451 if((p_FmPcd->p_FmPcdPlcr->profiles[profileIndx].nextEngineOnGreen!= e_FM_PCD_DONE) ||
1452 (p_FmPcd->p_FmPcdPlcr->profiles[profileIndx].nextEngineOnYellow!= e_FM_PCD_DONE) ||
1453 (p_FmPcd->p_FmPcdPlcr->profiles[profileIndx].nextEngineOnRed!= e_FM_PCD_DONE))
1455 FmPcdUnlock(p_FmPcd, intFlags);
1459 if(p_FmPcd->p_FmPcdPlcr->profiles[profileIndx].paramsOnGreen.action == e_FM_PCD_ENQ_FRAME)
1464 FmPcdUnlock(p_FmPcd, intFlags);
1471 WritePar(p_FmPcd, tmpReg32);
1474 if(p_FmPcd->p_FmPcdPlcr->profiles[profileIndx].paramsOnYellow.action == e_FM_PCD_ENQ_FRAME)
1479 FmPcdUnlock(p_FmPcd, intFlags);
1486 WritePar(p_FmPcd, tmpReg32);
1489 if(p_FmPcd->p_FmPcdPlcr->profiles[profileIndx].paramsOnRed.action == e_FM_PCD_ENQ_FRAME)
1494 FmPcdUnlock(p_FmPcd, intFlags);
1501 WritePar(p_FmPcd, tmpReg32);
1505 FmPcdUnlock(p_FmPcd, intFlags);
1507 p_FmPcd->p_FmPcdPlcr->profiles[profileIndx].pointedOwners += 1;
1508 p_FmPcd->p_FmPcdPlcr->profiles[profileIndx].requiredAction |= requiredAction;
1510 RELEASE_LOCK(p_FmPcd->p_FmPcdPlcr->profiles[profileIndx].lock);
1517 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
1522 SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
1523 SANITY_CHECK_RETURN_ERROR(!p_FmPcd->p_FmPcdDriverParam, E_INVALID_STATE);
1524 SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdPlcr, E_INVALID_HANDLE);
1526 if (p_FmPcd->h_Hc)
1527 return FmHcPcdPlcrSetProfileCounter(p_FmPcd->h_Hc, h_Profile, counter, value);
1529 p_FmPcdPlcrRegs = p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs;
1532 intFlags = FmPcdLock(p_FmPcd);
1559 WritePar(p_FmPcd, tmpReg32);
1560 FmPcdUnlock(p_FmPcd, intFlags);
1567 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
1569 SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
1570 SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdDriverParam, E_INVALID_HANDLE);
1571 SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdPlcr, E_INVALID_HANDLE);
1573 p_FmPcd->p_FmPcdPlcr->numOfSharedProfiles = numOfSharedPlcrProfiles;
1584 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
1590 SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
1591 SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdPlcr, E_INVALID_HANDLE);
1592 SANITY_CHECK_RETURN_ERROR(!p_FmPcd->p_FmPcdDriverParam, E_INVALID_STATE);
1594 if(p_FmPcd->guestId != NCSW_MASTER_ID)
1598 return XX_IpcSendMessage(p_FmPcd->h_IpcSession,
1609 DUMP_TITLE(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs, ("FmPcdPlcrRegs Regs"));
1611 DUMP_VAR(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs,fmpl_gcr);
1612 DUMP_VAR(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs,fmpl_gsr);
1613 DUMP_VAR(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs,fmpl_evr);
1614 DUMP_VAR(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs,fmpl_ier);
1615 DUMP_VAR(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs,fmpl_ifr);
1616 DUMP_VAR(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs,fmpl_eevr);
1617 DUMP_VAR(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs,fmpl_eier);
1618 DUMP_VAR(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs,fmpl_eifr);
1619 DUMP_VAR(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs,fmpl_rpcnt);
1620 DUMP_VAR(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs,fmpl_ypcnt);
1621 DUMP_VAR(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs,fmpl_rrpcnt);
1622 DUMP_VAR(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs,fmpl_rypcnt);
1623 DUMP_VAR(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs,fmpl_tpcnt);
1624 DUMP_VAR(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs,fmpl_flmcnt);
1626 DUMP_VAR(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs,fmpl_serc);
1627 DUMP_VAR(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs,fmpl_upcr);
1628 DUMP_VAR(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs,fmpl_dpmr);
1631 DUMP_TITLE(&p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs->fmpl_pmr, ("fmpl_pmr"));
1634 DUMP_MEMORY(&p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs->fmpl_pmr[i], sizeof(uint32_t));
1643 t_FmPcd *p_FmPcd = (t_FmPcd*)h_FmPcd;
1651 SANITY_CHECK_RETURN_ERROR(p_FmPcd, E_INVALID_HANDLE);
1652 SANITY_CHECK_RETURN_ERROR(p_FmPcd->p_FmPcdPlcr, E_INVALID_HANDLE);
1653 SANITY_CHECK_RETURN_ERROR(!p_FmPcd->p_FmPcdDriverParam, E_INVALID_STATE);
1655 if(p_FmPcd->guestId != NCSW_MASTER_ID)
1660 return XX_IpcSendMessage(p_FmPcd->h_IpcSession,
1671 DUMP_TITLE(p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs, ("FmPcdPlcrRegs Profile Regs"));
1673 p_ProfilesRegs = &p_FmPcd->p_FmPcdPlcr->p_FmPcdPlcrRegs->profileRegs;
1676 intFlags = FmPcdLock(p_FmPcd);
1677 WritePar(p_FmPcd, tmpReg);
1697 FmPcdUnlock(p_FmPcd, intFlags);