diff --git a/fsw/cfe-core/src/es/cfe_es_mempool.c b/fsw/cfe-core/src/es/cfe_es_mempool.c index 9ccda8337..1f32588dd 100644 --- a/fsw/cfe-core/src/es/cfe_es_mempool.c +++ b/fsw/cfe-core/src/es/cfe_es_mempool.c @@ -390,7 +390,7 @@ int32 CFE_ES_PoolDelete(CFE_ES_MemHandle_t PoolID) ** Purpose: ** CFE_ES_GetPoolBuf allocates a block from the memory pool. */ -int32 CFE_ES_GetPoolBuf(uint32 **BufPtr, +int32 CFE_ES_GetPoolBuf(CFE_ES_MemPoolBuf_t *BufPtr, CFE_ES_MemHandle_t Handle, size_t Size ) { @@ -444,9 +444,8 @@ int32 CFE_ES_GetPoolBuf(uint32 **BufPtr, } - /* Compute the actual buffer address. - * It is returned as uint32* for historical reasons. */ - *BufPtr = (uint32*)(PoolRecPtr->BaseAddr + DataOffset); + /* Compute the actual buffer address. */ + *BufPtr = CFE_ES_MEMPOOLBUF_C(PoolRecPtr->BaseAddr + DataOffset); return (int32)Size; } @@ -455,7 +454,7 @@ int32 CFE_ES_GetPoolBuf(uint32 **BufPtr, ** CFE_ES_GetPoolBufInfo gets the size of the specified block (if it exists). */ int32 CFE_ES_GetPoolBufInfo(CFE_ES_MemHandle_t Handle, - uint32 * BufPtr) + CFE_ES_MemPoolBuf_t BufPtr) { int32 Status; CFE_ES_MemPoolRecord_t *PoolRecPtr; @@ -509,7 +508,7 @@ int32 CFE_ES_GetPoolBufInfo(CFE_ES_MemHandle_t Handle, ** CFE_ES_putPoolBuf returns a block back to the memory pool. */ int32 CFE_ES_PutPoolBuf(CFE_ES_MemHandle_t Handle, - uint32 * BufPtr) + CFE_ES_MemPoolBuf_t BufPtr) { CFE_ES_MemPoolRecord_t *PoolRecPtr; size_t DataSize; diff --git a/fsw/cfe-core/src/inc/cfe_es.h b/fsw/cfe-core/src/inc/cfe_es.h index 28457d0bf..244a76510 100644 --- a/fsw/cfe-core/src/inc/cfe_es.h +++ b/fsw/cfe-core/src/inc/cfe_es.h @@ -175,6 +175,34 @@ typedef union CFE_ES_PoolAlign */ #define CFE_ES_STATIC_POOL_TYPE(size) union { CFE_ES_PoolAlign_t Align; uint8 Data[size]; } +/** + * @brief Pointer type used for memory pool API + * + * This is used in the Get/Put API calls to refer to a pool buffer. + * + * This pointer is expected to be type cast to the real object + * type after getting a new buffer. Using void* allows this + * type conversion to occur easily. + * + * @note Older versions of CFE implemented the API using a uint32*, + * which required explicit type casting everywhere it was called. + * Although the API type is now void* to make usage easier, the + * pool buffers are aligned to machine requirements - typically 64 bits. + */ +typedef void* CFE_ES_MemPoolBuf_t; + +/** + * @brief Conversion macro to create buffer pointer from another type + * + * In cases where the actual buffer pointer is computed, this macro + * aids in converting the computed address (typically an OSAL "cpuaddr" + * type) into a buffer pointer. + * + * @note Any address calculation needs to take machine alignment + * requirements into account. + */ +#define CFE_ES_MEMPOOLBUF_C(x) ((CFE_ES_MemPoolBuf_t)(x)) + /*****************************************************************************/ /* ** Exported Functions @@ -1508,7 +1536,7 @@ int32 CFE_ES_PoolDelete(CFE_ES_MemHandle_t PoolID); ** \sa #CFE_ES_PoolCreate, #CFE_ES_PoolCreateNoSem, #CFE_ES_PoolCreateEx, #CFE_ES_PutPoolBuf, #CFE_ES_GetMemPoolStats, #CFE_ES_GetPoolBufInfo ** ******************************************************************************/ -int32 CFE_ES_GetPoolBuf(uint32 **BufPtr, CFE_ES_MemHandle_t PoolID, size_t Size); +int32 CFE_ES_GetPoolBuf(CFE_ES_MemPoolBuf_t *BufPtr, CFE_ES_MemHandle_t PoolID, size_t Size); /*****************************************************************************/ /** @@ -1532,7 +1560,7 @@ int32 CFE_ES_GetPoolBuf(uint32 **BufPtr, CFE_ES_MemHandle_t PoolID, size_t Size) ** \sa #CFE_ES_PoolCreate, #CFE_ES_PoolCreateNoSem, #CFE_ES_PoolCreateEx, #CFE_ES_GetPoolBuf, #CFE_ES_GetMemPoolStats, #CFE_ES_PutPoolBuf ** ******************************************************************************/ -CFE_Status_t CFE_ES_GetPoolBufInfo(CFE_ES_MemHandle_t PoolID, uint32 *BufPtr); +CFE_Status_t CFE_ES_GetPoolBufInfo(CFE_ES_MemHandle_t PoolID, CFE_ES_MemPoolBuf_t BufPtr); /*****************************************************************************/ /** @@ -1554,7 +1582,7 @@ CFE_Status_t CFE_ES_GetPoolBufInfo(CFE_ES_MemHandle_t PoolID, uint32 *BufPtr); ** \sa #CFE_ES_PoolCreate, #CFE_ES_PoolCreateNoSem, #CFE_ES_PoolCreateEx, #CFE_ES_GetPoolBuf, #CFE_ES_GetMemPoolStats, #CFE_ES_GetPoolBufInfo ** ******************************************************************************/ -int32 CFE_ES_PutPoolBuf(CFE_ES_MemHandle_t PoolID, uint32 *BufPtr); +int32 CFE_ES_PutPoolBuf(CFE_ES_MemHandle_t PoolID, CFE_ES_MemPoolBuf_t BufPtr); /*****************************************************************************/ /** diff --git a/fsw/cfe-core/src/sb/cfe_sb_api.c b/fsw/cfe-core/src/sb/cfe_sb_api.c index c7f2dbbe1..e1c6570ef 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_api.c +++ b/fsw/cfe-core/src/sb/cfe_sb_api.c @@ -1597,7 +1597,7 @@ CFE_MSG_Message_t *CFE_SB_ZeroCopyGetPtr(size_t MsgSize, CFE_SB_LockSharedData(__func__,__LINE__); /* Allocate a new zero copy descriptor from the SB memory pool.*/ - stat1 = CFE_ES_GetPoolBuf((uint32 **)&zcd, CFE_SB.Mem.PoolHdl, sizeof(CFE_SB_ZeroCopyD_t)); + stat1 = CFE_ES_GetPoolBuf((CFE_ES_MemPoolBuf_t*)&zcd, CFE_SB.Mem.PoolHdl, sizeof(CFE_SB_ZeroCopyD_t)); if(stat1 < 0){ CFE_SB_UnlockSharedData(__func__,__LINE__); return NULL; @@ -1611,10 +1611,10 @@ CFE_MSG_Message_t *CFE_SB_ZeroCopyGetPtr(size_t MsgSize, }/* end if */ /* Allocate a new buffer (from the SB memory pool) to hold the message */ - stat1 = CFE_ES_GetPoolBuf((uint32 **)&bd, CFE_SB.Mem.PoolHdl, MsgSize + sizeof(CFE_SB_BufferD_t)); + stat1 = CFE_ES_GetPoolBuf((CFE_ES_MemPoolBuf_t*)&bd, CFE_SB.Mem.PoolHdl, MsgSize + sizeof(CFE_SB_BufferD_t)); if((stat1 < 0)||(bd==NULL)){ /*deallocate the first buffer if the second buffer creation fails*/ - stat1 = CFE_ES_PutPoolBuf(CFE_SB.Mem.PoolHdl, (uint32 *)zcd); + stat1 = CFE_ES_PutPoolBuf(CFE_SB.Mem.PoolHdl, zcd); if(stat1 > 0){ CFE_SB.StatTlmMsg.Payload.MemInUse-=stat1; } @@ -1680,7 +1680,7 @@ int32 CFE_SB_ZeroCopyReleasePtr(CFE_MSG_Message_t *Ptr2Release, { int32 Status; int32 Stat2; - cpuaddr Addr = (cpuaddr)Ptr2Release; + CFE_ES_MemPoolBuf_t BufAddr; Status = CFE_SB_ZeroCopyReleaseDesc(Ptr2Release, BufferHandle); @@ -1688,8 +1688,8 @@ int32 CFE_SB_ZeroCopyReleasePtr(CFE_MSG_Message_t *Ptr2Release, if(Status == CFE_SUCCESS){ /* give the buffer back to the buffer pool */ - Stat2 = CFE_ES_PutPoolBuf(CFE_SB.Mem.PoolHdl, - (uint32 *) (Addr - sizeof(CFE_SB_BufferD_t))); + BufAddr = CFE_ES_MEMPOOLBUF_C((cpuaddr)Ptr2Release - sizeof(CFE_SB_BufferD_t)); + Stat2 = CFE_ES_PutPoolBuf(CFE_SB.Mem.PoolHdl, BufAddr); if(Stat2 > 0){ /* Substract the size of the actual buffer from the Memory in use ctr */ CFE_SB.StatTlmMsg.Payload.MemInUse-=Stat2; @@ -1735,7 +1735,7 @@ int32 CFE_SB_ZeroCopyReleaseDesc(CFE_MSG_Message_t *Ptr2Release, CFE_SB_LockSharedData(__func__,__LINE__); - Stat = CFE_ES_GetPoolBufInfo(CFE_SB.Mem.PoolHdl, (uint32 *)zcd); + Stat = CFE_ES_GetPoolBufInfo(CFE_SB.Mem.PoolHdl, zcd); if((Ptr2Release == NULL) || (Stat < 0) || (zcd->Buffer != (void *)Ptr2Release)){ CFE_SB_UnlockSharedData(__func__,__LINE__); @@ -1754,7 +1754,7 @@ int32 CFE_SB_ZeroCopyReleaseDesc(CFE_MSG_Message_t *Ptr2Release, } /* give the descriptor back to the buffer pool */ - Stat = CFE_ES_PutPoolBuf(CFE_SB.Mem.PoolHdl, (uint32 *)zcd); + Stat = CFE_ES_PutPoolBuf(CFE_SB.Mem.PoolHdl, zcd); if(Stat > 0){ /* Substract the size of the actual buffer from the Memory in use ctr */ CFE_SB.StatTlmMsg.Payload.MemInUse-=Stat; diff --git a/fsw/cfe-core/src/sb/cfe_sb_buf.c b/fsw/cfe-core/src/sb/cfe_sb_buf.c index 966f16125..e213a12e6 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_buf.c +++ b/fsw/cfe-core/src/sb/cfe_sb_buf.c @@ -63,7 +63,7 @@ CFE_SB_BufferD_t * CFE_SB_GetBufferFromPool(CFE_SB_MsgId_t MsgId, size_t Size) { CFE_SB_BufferD_t *bd = NULL; /* Allocate a new buffer descriptor from the SB memory pool.*/ - stat1 = CFE_ES_GetPoolBuf((uint32 **)&bd, CFE_SB.Mem.PoolHdl, Size + sizeof(CFE_SB_BufferD_t)); + stat1 = CFE_ES_GetPoolBuf((CFE_ES_MemPoolBuf_t*)&bd, CFE_SB.Mem.PoolHdl, Size + sizeof(CFE_SB_BufferD_t)); if(stat1 < 0){ return NULL; } @@ -144,7 +144,7 @@ int32 CFE_SB_ReturnBufferToPool(CFE_SB_BufferD_t *bd){ int32 Stat; /* give the buf descriptor back to the buf descriptor pool */ - Stat = CFE_ES_PutPoolBuf(CFE_SB.Mem.PoolHdl, (uint32 *)bd); + Stat = CFE_ES_PutPoolBuf(CFE_SB.Mem.PoolHdl, bd); if(Stat > 0){ CFE_SB.StatTlmMsg.Payload.SBBuffersInUse--; /* Substract the size of a buffer descriptor from the Memory in use ctr */ @@ -212,7 +212,7 @@ CFE_SB_DestinationD_t *CFE_SB_GetDestinationBlk(void) CFE_SB_DestinationD_t *Dest = NULL; /* Allocate a new destination descriptor from the SB memory pool.*/ - Stat = CFE_ES_GetPoolBuf((uint32 **)&Dest, CFE_SB.Mem.PoolHdl, sizeof(CFE_SB_DestinationD_t)); + Stat = CFE_ES_GetPoolBuf((CFE_ES_MemPoolBuf_t*)&Dest, CFE_SB.Mem.PoolHdl, sizeof(CFE_SB_DestinationD_t)); if(Stat < 0){ return NULL; } @@ -250,7 +250,7 @@ int32 CFE_SB_PutDestinationBlk(CFE_SB_DestinationD_t *Dest) }/* end if */ /* give the destination block back to the SB memory pool */ - Stat = CFE_ES_PutPoolBuf(CFE_SB.Mem.PoolHdl, (uint32 *)Dest); + Stat = CFE_ES_PutPoolBuf(CFE_SB.Mem.PoolHdl, Dest); if(Stat > 0){ /* Substract the size of the destination block from the Memory in use ctr */ CFE_SB.StatTlmMsg.Payload.MemInUse-=Stat; diff --git a/fsw/cfe-core/src/sb/cfe_sb_task.c b/fsw/cfe-core/src/sb/cfe_sb_task.c index 825475770..a6aff96e2 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_task.c +++ b/fsw/cfe-core/src/sb/cfe_sb_task.c @@ -144,7 +144,7 @@ void CFE_SB_TaskMain(void) int32 CFE_SB_AppInit(void){ uint32 CfgFileEventsToFilter = 0; - uint32 *TmpPtr = NULL; + CFE_ES_MemPoolBuf_t TmpPtr; int32 Status; Status = CFE_ES_RegisterApp(); @@ -278,7 +278,7 @@ int32 CFE_SB_AppInit(void){ /* Ensure a ground commanded reset does not get blocked if SB mem pool */ /* becomes fully configured (DCR6772) */ - Status = CFE_ES_GetPoolBuf((uint32 **)&TmpPtr, CFE_SB.Mem.PoolHdl, + Status = CFE_ES_GetPoolBuf(&TmpPtr, CFE_SB.Mem.PoolHdl, sizeof(CFE_ES_Restart_t)); if(Status < 0){ @@ -288,7 +288,7 @@ int32 CFE_SB_AppInit(void){ /* Return mem block used on previous call,the actual memory is not needed.*/ /* The SB mem pool is now configured with a block size for the reset cmd. */ - Status = CFE_ES_PutPoolBuf(CFE_SB.Mem.PoolHdl, (uint32 *)TmpPtr); + Status = CFE_ES_PutPoolBuf(CFE_SB.Mem.PoolHdl, TmpPtr); if(Status < 0){ CFE_ES_WriteToSysLog("SB:Init error, PutPool Failed:RC=0x%08X\n",(unsigned int)Status); diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_api.c b/fsw/cfe-core/src/tbl/cfe_tbl_api.c index 32e7176fe..7d261ec31 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_api.c +++ b/fsw/cfe-core/src/tbl/cfe_tbl_api.c @@ -255,7 +255,7 @@ int32 CFE_TBL_Register( CFE_TBL_Handle_t *TblHandlePtr, RegRecPtr->UserDefAddr = false; /* Allocate the memory buffer(s) for the table and inactive table, if necessary */ - Status = CFE_ES_GetPoolBuf((uint32 **)&RegRecPtr->Buffers[0].BufferPtr, + Status = CFE_ES_GetPoolBuf(&RegRecPtr->Buffers[0].BufferPtr, CFE_TBL_TaskData.Buf.PoolHdl, Size); if(Status < 0) @@ -281,7 +281,7 @@ int32 CFE_TBL_Register( CFE_TBL_Handle_t *TblHandlePtr, ((Status & CFE_SEVERITY_BITMASK) != CFE_SEVERITY_ERROR)) { /* Allocate memory for the dedicated secondary buffer */ - Status = CFE_ES_GetPoolBuf((uint32 **)&RegRecPtr->Buffers[1].BufferPtr, + Status = CFE_ES_GetPoolBuf(&RegRecPtr->Buffers[1].BufferPtr, CFE_TBL_TaskData.Buf.PoolHdl, Size); if(Status < 0) diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_internal.c b/fsw/cfe-core/src/tbl/cfe_tbl_internal.c index d86234bb8..e2ae1cb99 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_internal.c +++ b/fsw/cfe-core/src/tbl/cfe_tbl_internal.c @@ -169,7 +169,7 @@ int32 CFE_TBL_EarlyInit (void) do { /* Allocate memory for shared load buffers */ - Status = CFE_ES_GetPoolBuf((uint32 **)&CFE_TBL_TaskData.LoadBuffs[j].BufferPtr, + Status = CFE_ES_GetPoolBuf(&CFE_TBL_TaskData.LoadBuffs[j].BufferPtr, CFE_TBL_TaskData.Buf.PoolHdl, CFE_PLATFORM_TBL_MAX_SNGL_TABLE_SIZE); diff --git a/fsw/cfe-core/unit-test/es_UT.c b/fsw/cfe-core/unit-test/es_UT.c index 8d12e8a06..2398e35bc 100644 --- a/fsw/cfe-core/unit-test/es_UT.c +++ b/fsw/cfe-core/unit-test/es_UT.c @@ -6038,8 +6038,8 @@ void TestESMempool(void) CFE_ES_MemHandle_t PoolID2; /* Poo1 2 handle, with mutex */ uint8 Buffer1[1024]; uint8 Buffer2[1024]; - uint32 *addressp1 = NULL; /* Pool 1 buffer address */ - uint32 *addressp2 = NULL; /* Pool 2 buffer address */ + CFE_ES_MemPoolBuf_t addressp1 = CFE_ES_MEMPOOLBUF_C(0); /* Pool 1 buffer address */ + CFE_ES_MemPoolBuf_t addressp2 = CFE_ES_MEMPOOLBUF_C(0); /* Pool 2 buffer address */ CFE_ES_MemPoolRecord_t *PoolPtr; CFE_ES_MemPoolStats_t Stats; size_t BlockSizes[CFE_PLATFORM_ES_POOL_MAX_BUCKETS+2]; @@ -6085,12 +6085,12 @@ void TestESMempool(void) /* Test successfully allocating a pool buffer */ UT_Report(__FILE__, __LINE__, - CFE_ES_GetPoolBuf((uint32 **) &addressp1, PoolID1, 256) > 0, + CFE_ES_GetPoolBuf(&addressp1, PoolID1, 256) > 0, "CFE_ES_GetPoolBuf", "Allocate pool buffer [1]; successful"); UT_Report(__FILE__, __LINE__, - CFE_ES_GetPoolBuf((uint32 **) &addressp2, PoolID2, 256) > 0, + CFE_ES_GetPoolBuf(&addressp2, PoolID2, 256) > 0, "CFE_ES_GetPoolBuf", "Allocate pool buffer [2]; successful"); @@ -6195,7 +6195,7 @@ void TestESMempool(void) /* Test returning a pool buffer using an invalid memory block */ UT_Report(__FILE__, __LINE__, CFE_ES_PutPoolBuf(PoolID2, - addressp2 - 10) == CFE_ES_BUFFER_NOT_IN_POOL, + CFE_ES_MEMPOOLBUF_C((cpuaddr)addressp2 - 40)) == CFE_ES_BUFFER_NOT_IN_POOL, "CFE_ES_PutPoolBuf", "Invalid memory block"); @@ -6361,12 +6361,12 @@ void TestESMempool(void) * subsequent tests */ UT_Report(__FILE__, __LINE__, - CFE_ES_GetPoolBuf((uint32 **) &addressp1, PoolID1, 256) > 0, + CFE_ES_GetPoolBuf(&addressp1, PoolID1, 256) > 0, "CFE_ES_GetPoolBuf", "Allocate pool buffer [3]; successful"); UT_Report(__FILE__, __LINE__, - CFE_ES_GetPoolBuf((uint32 **) &addressp2, PoolID2, 256) > 0, + CFE_ES_GetPoolBuf(&addressp2, PoolID2, 256) > 0, "CFE_ES_GetPoolBuf", "Allocate pool buffer [3]; successful"); @@ -6481,12 +6481,12 @@ void TestESMempool(void) * subsequent tests */ UT_Report(__FILE__, __LINE__, - CFE_ES_GetPoolBuf((uint32 **) &addressp1, PoolID1, 256) > 0, + CFE_ES_GetPoolBuf(&addressp1, PoolID1, 256) > 0, "CFE_ES_GetPoolBuf", "Allocate pool buffer [3]; successful"); UT_Report(__FILE__, __LINE__, - CFE_ES_GetPoolBuf((uint32 **) &addressp2, PoolID2, 256) > 0, + CFE_ES_GetPoolBuf(&addressp2, PoolID2, 256) > 0, "CFE_ES_GetPoolBuf", "Allocate pool buffer [3]; successful"); @@ -6602,7 +6602,7 @@ void TestESMempool(void) /* Test getting the size of a pool buffer that is not in the pool */ UT_Report(__FILE__, __LINE__, CFE_ES_GetPoolBufInfo(PoolID1, - (uint32 *) addressp1 + 100) == + CFE_ES_MEMPOOLBUF_C((cpuaddr)addressp1 + 400)) == CFE_ES_BUFFER_NOT_IN_POOL, "CFE_ES_GetPoolBufInfo", "Invalid pool buffer"); diff --git a/fsw/cfe-core/ut-stubs/ut_es_stubs.c b/fsw/cfe-core/ut-stubs/ut_es_stubs.c index 6bd242975..6f7ad94e7 100644 --- a/fsw/cfe-core/ut-stubs/ut_es_stubs.c +++ b/fsw/cfe-core/ut-stubs/ut_es_stubs.c @@ -451,7 +451,7 @@ int32 CFE_ES_WriteToSysLog(const char *SpecStringPtr, ...) ** value (0xffffffff if Size exceeds maximum value allowed). ** ******************************************************************************/ -int32 CFE_ES_GetPoolBuf(uint32 **BufPtr, CFE_ES_MemHandle_t PoolID, size_t Size) +int32 CFE_ES_GetPoolBuf(CFE_ES_MemPoolBuf_t *BufPtr, CFE_ES_MemHandle_t PoolID, size_t Size) { UT_Stub_RegisterContext(UT_KEY(CFE_ES_GetPoolBuf), BufPtr); UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_ES_GetPoolBuf), PoolID); @@ -504,7 +504,7 @@ int32 CFE_ES_GetPoolBuf(uint32 **BufPtr, CFE_ES_MemHandle_t PoolID, size_t Size) if (PositionEnd <= PoolSize) { - *BufPtr = (uint32 *)BufAddrStart; + *BufPtr = CFE_ES_MEMPOOLBUF_C(BufAddrStart); memset((void*)BufAddrStart, 0x55, Size); /* @@ -690,10 +690,10 @@ int32 CFE_ES_PoolDelete(CFE_ES_MemHandle_t PoolID) ** Returns either a user-defined status flag, 16, or -1. ** ******************************************************************************/ -int32 CFE_ES_PutPoolBuf(CFE_ES_MemHandle_t PoolID, uint32 *BufPtr) +int32 CFE_ES_PutPoolBuf(CFE_ES_MemHandle_t PoolID, CFE_ES_MemPoolBuf_t BufPtr) { UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_ES_PutPoolBuf), PoolID); - UT_Stub_RegisterContext(UT_KEY(CFE_ES_PutPoolBuf), BufPtr); + UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_ES_PutPoolBuf), BufPtr); int32 status; @@ -722,10 +722,10 @@ int32 CFE_ES_PutPoolBuf(CFE_ES_MemHandle_t PoolID, uint32 *BufPtr) ** Returns either a user-defined status flag or 16. ** ******************************************************************************/ -int32 CFE_ES_GetPoolBufInfo(CFE_ES_MemHandle_t PoolID, uint32 *BufPtr) +int32 CFE_ES_GetPoolBufInfo(CFE_ES_MemHandle_t PoolID, CFE_ES_MemPoolBuf_t BufPtr) { UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_ES_GetPoolBufInfo), PoolID); - UT_Stub_RegisterContext(UT_KEY(CFE_ES_GetPoolBufInfo), BufPtr); + UT_Stub_RegisterContextGenericArg(UT_KEY(CFE_ES_GetPoolBufInfo), BufPtr); int32 status;