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

Integration Candidate: 2020-10-20 #209

Merged
merged 3 commits into from
Oct 21, 2020
Merged
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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ This is a collection of APIs abstracting platform specific functionality to be l

## Version History

### Development Build: 1.5.0-rc1+dev24

- Improves the module ID lookup when getting the CFE core text segment info. VxWorks PSP should use the real module name, not assume cfe-core.o when getting text segment info
- See <https://github.com/nasa/PSP/pull/209>

### Development Build: 1.5.0-rc1+dev19

- Use the osal_id_t typedef whenever dealing with an OSAL ID value.
Expand Down
2 changes: 1 addition & 1 deletion fsw/mcp750-vxworks/inc/psp_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/*
* Development Build Macro Definitions
*/
#define CFE_PSP_IMPL_BUILD_NUMBER 19
#define CFE_PSP_IMPL_BUILD_NUMBER 24
#define CFE_PSP_IMPL_BUILD_BASELINE "v1.5.0-rc1"

/*
Expand Down
45 changes: 35 additions & 10 deletions fsw/mcp750-vxworks/src/cfe_psp_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@

#include <target_config.h>

/*
** Define the cFE Core loadable module name
*/
#define CFE_MODULE_NAME_DEFAULT "cfe-core.o"

static char CFE_MODULE_NAME[] = CFE_MODULE_NAME_DEFAULT;


/*
** External Declarations
*/
Expand Down Expand Up @@ -505,14 +497,47 @@ int32 CFE_PSP_GetCFETextSegmentInfo(cpuaddr *PtrToCFESegment, uint32 *SizeOfCFES
STATUS status;
MODULE_ID cFEModuleId;
MODULE_INFO cFEModuleInfo;
cpuaddr GetModuleIdAddr;
MODULE_ID (*GetModuldIdFunc)(void);



if ( SizeOfCFESegment == NULL )
if ( PtrToCFESegment == NULL || SizeOfCFESegment == NULL )
{
return_code = CFE_PSP_ERROR;
}
else
{
cFEModuleId = moduleFindByName(CFE_MODULE_NAME);
/*
* First attempt to call a function called GetCfeCoreModuleID().
*
* If CFE core was started via the "startCfeCore" routine, this
* provides the actual module ID that was loaded by that routine,
* no matter what it is actually named. This is provided by the
* support/integration code compiled directly into the VxWorks kernel
* image.
*
* The prototype should be:
* MODULE_ID GetCfeCoreModuleID(void);
*/
cFEModuleId = NULL;
GetModuleIdAddr = 0;
return_code = OS_SymbolLookup(&GetModuleIdAddr, "GetCfeCoreModuleID");
if ( return_code == OS_SUCCESS && GetModuleIdAddr != 0 )
{
GetModuldIdFunc = (MODULE_ID (*)(void))GetModuleIdAddr;
cFEModuleId = GetModuldIdFunc();
}

/*
* If the above did not yield a valid module ID,
* then attempt to find the module ID by name.
* This assumes the core executable name as built by CMake
*/
if ( cFEModuleId == NULL )
{
cFEModuleId = moduleFindByName((char *)GLOBAL_CONFIGDATA.Default_CoreFilename);
}

if ( cFEModuleId == NULL )
{
Expand Down
2 changes: 1 addition & 1 deletion fsw/pc-linux/inc/psp_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/*
* Development Build Macro Definitions
*/
#define CFE_PSP_IMPL_BUILD_NUMBER 19
#define CFE_PSP_IMPL_BUILD_NUMBER 24
#define CFE_PSP_IMPL_BUILD_BASELINE "v1.5.0-rc1"

/*
Expand Down
2 changes: 1 addition & 1 deletion fsw/pc-rtems/inc/psp_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/*
* Development Build Macro Definitions
*/
#define CFE_PSP_IMPL_BUILD_NUMBER 19
#define CFE_PSP_IMPL_BUILD_NUMBER 24
#define CFE_PSP_IMPL_BUILD_BASELINE "v1.5.0-rc1"

/*
Expand Down