Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #443, Correct minor bugs + typos in the VxWorks layer #444

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions fsw/mcp750-vxworks/src/cfe_psp_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ int32 CFE_PSP_ReadFromCDS(void *PtrToDataToRead, uint32 CDSOffset, uint32 NumByt
return_code = CFE_PSP_ERROR;
}

} /* end if PtrToDataToWrite == NULL */
} /* end if PtrToDataToRead == NULL */

return return_code;
}
Expand Down Expand Up @@ -319,9 +319,7 @@ int32 CFE_PSP_GetVolatileDiskMem(cpuaddr *PtrToVolDisk, uint32 *SizeOfVolDisk)
*/
int32 CFE_PSP_InitProcessorReservedMemory(uint32 RestartType)
{
int32 return_code;

if (RestartType != CFE_PSP_RST_TYPE_PROCESSOR)
if (RestartType == CFE_PSP_RST_TYPE_POWERON)
{
OS_printf("CFE_PSP: Clearing Processor Reserved Memory.\n");
memset(MCP750_ReservedMemBlock.BlockPtr, 0, MCP750_ReservedMemBlock.BlockSize);
Expand All @@ -331,8 +329,8 @@ int32 CFE_PSP_InitProcessorReservedMemory(uint32 RestartType)
*/
CFE_PSP_ReservedMemoryMap.BootPtr->bsp_reset_type = CFE_PSP_RST_TYPE_PROCESSOR;
}
return_code = CFE_PSP_SUCCESS;
return return_code;

return CFE_PSP_SUCCESS;
}

/******************************************************************************
Expand Down Expand Up @@ -478,7 +476,7 @@ int32 CFE_PSP_GetCFETextSegmentInfo(cpuaddr *PtrToCFESegment, uint32 *SizeOfCFES
MODULE_ID cFEModuleId;
MODULE_INFO cFEModuleInfo;
cpuaddr GetModuleIdAddr;
MODULE_ID (*GetModuldIdFunc)(void);
MODULE_ID (*GetModuleIdFunc)(void);

if (PtrToCFESegment == NULL || SizeOfCFESegment == NULL)
{
Expand All @@ -503,8 +501,8 @@ int32 CFE_PSP_GetCFETextSegmentInfo(cpuaddr *PtrToCFESegment, uint32 *SizeOfCFES
return_code = OS_SymbolLookup(&GetModuleIdAddr, "GetCfeCoreModuleID");
if (return_code == OS_SUCCESS && GetModuleIdAddr != 0)
{
GetModuldIdFunc = (MODULE_ID(*)(void))GetModuleIdAddr;
cFEModuleId = GetModuldIdFunc();
GetModuleIdFunc = (MODULE_ID(*)(void))GetModuleIdAddr;
cFEModuleId = GetModuleIdFunc();
}

/*
Expand Down Expand Up @@ -538,4 +536,4 @@ int32 CFE_PSP_GetCFETextSegmentInfo(cpuaddr *PtrToCFESegment, uint32 *SizeOfCFES
}

return return_code;
}
}
4 changes: 2 additions & 2 deletions fsw/mcp750-vxworks/src/cfe_psp_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ void OS_Application_Startup(void)
else if (reset_register & SYS_REG_BLRR_FBTN)
{
OS_printf("CFE_PSP: POWERON Reset: Front Panel Push Button Reset.\n");
reset_type = CFE_PSP_RST_SUBTYPE_PUSH_BUTTON;
reset_subtype = 3;
reset_type = CFE_PSP_RST_TYPE_POWERON;
reset_subtype = CFE_PSP_RST_SUBTYPE_PUSH_BUTTON;
}
else if (reset_register & SYS_REG_BLRR_WDT2)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ void Test_OS_Application_Startup(void)
*PCS_SYS_REG_BLRR = PCS_SYS_REG_BLRR_FBTN;
UT_OS_Application_Startup();
UtAssert_INT32_EQ(UT_GetStubCount(UT_KEY(PCS_SystemMain)), 5);
UtAssert_INT32_EQ(StartType.StartType, CFE_PSP_RST_SUBTYPE_PUSH_BUTTON);
UtAssert_INT32_EQ(StartType.StartSubtype, 3);
UtAssert_INT32_EQ(StartType.StartType, CFE_PSP_RST_TYPE_POWERON);
UtAssert_INT32_EQ(StartType.StartSubtype, CFE_PSP_RST_SUBTYPE_PUSH_BUTTON);

*PCS_SYS_REG_BLRR = PCS_SYS_REG_BLRR_WDT2;
UT_OS_Application_Startup();
Expand Down
Loading