Skip to content

Commit

Permalink
Merge pull request #288 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
PSP Integration candidate: 2021-04-02
  • Loading branch information
astrogeco authored Apr 2, 2021
2 parents 487f8b8 + 7acd39a commit 79b944b
Show file tree
Hide file tree
Showing 23 changed files with 112 additions and 382 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ This is a collection of APIs abstracting platform specific functionality to be l

## Version History

### Development Build: v1.5.0-rc1+dev101

- Removes unnecessary global config structure `Target_PspConfigData` and associated elements infavor of the new version API.
- The mem pool stats TLM command now works on 64-bit Linux and sends out the expected telemetry packet.
Converts `CFE_PSP_MemoryTable` to internal object (instead of external) that should only be accessed via the PSP API. Replace `uint32`s with `size_t`. Use full range (SIZE_MAX) in the Linux/RTEMS implementation.
- See <https://github.com/nasa/PSP/pull/288> and <https://github.com/nasa/cFS/pull/233>

### Development Build: v1.5.0-rc1+dev95

- Includes `cfe_psp_version.c` in the cmake source list, which was mistakenly omitted previously.
Expand Down
25 changes: 3 additions & 22 deletions fsw/inc/cfe_psp.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,29 +146,10 @@
#define CFE_PSP_RST_SUBTYPE_MAX 10
/** \} */

/* Implement the "version" macros */
#define CFE_PSP_MAJOR_VERSION (GLOBAL_PSP_CONFIGDATA.PSP_VersionInfo.MajorVersion)
#define CFE_PSP_MINOR_VERSION (GLOBAL_PSP_CONFIGDATA.PSP_VersionInfo.MinorVersion)
#define CFE_PSP_REVISION (GLOBAL_PSP_CONFIGDATA.PSP_VersionInfo.Revision)
#define CFE_PSP_MISSION_REV (GLOBAL_PSP_CONFIGDATA.PSP_VersionInfo.MissionRev)
#define CFE_PSP_VERSION (GLOBAL_PSP_CONFIGDATA.PSP_VersionInfo.VersionString)

/*
** Type Definitions
*/

/*
** Memory table type
*/
typedef struct
{
uint32 MemoryType;
uint32 WordSize;
cpuaddr StartAddr;
uint32 Size;
uint32 Attributes;
} CFE_PSP_MemTable_t;

/*
** Function prototypes
*/
Expand Down Expand Up @@ -394,11 +375,11 @@ int32 CFE_PSP_MemWrite32(cpuaddr MemoryAddress, uint32 uint32Value);
int32 CFE_PSP_MemCpy(void *dest, const void *src, uint32 n);
int32 CFE_PSP_MemSet(void *dest, uint8 value, uint32 n);

int32 CFE_PSP_MemValidateRange(cpuaddr Address, uint32 Size, uint32 MemoryType);
int32 CFE_PSP_MemValidateRange(cpuaddr Address, size_t Size, uint32 MemoryType);
uint32 CFE_PSP_MemRanges(void);
int32 CFE_PSP_MemRangeSet(uint32 RangeNum, uint32 MemoryType, cpuaddr StartAddr, uint32 Size, uint32 WordSize,
int32 CFE_PSP_MemRangeSet(uint32 RangeNum, uint32 MemoryType, cpuaddr StartAddr, size_t Size, size_t WordSize,
uint32 Attributes);
int32 CFE_PSP_MemRangeGet(uint32 RangeNum, uint32 *MemoryType, cpuaddr *StartAddr, uint32 *Size, uint32 *WordSize,
int32 CFE_PSP_MemRangeGet(uint32 RangeNum, uint32 *MemoryType, cpuaddr *StartAddr, size_t *Size, size_t *WordSize,
uint32 *Attributes);

int32 CFE_PSP_EepromWrite8(cpuaddr MemoryAddress, uint8 ByteValue);
Expand Down
86 changes: 0 additions & 86 deletions fsw/inc/cfe_psp_configdata.h

This file was deleted.

5 changes: 2 additions & 3 deletions fsw/mcp750-vxworks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
#
######################################################################

# This contains the fully platform-specific code to
# This contains the fully platform-specific code to
# run CFE on this target.

# Build the mcp750-vxworks implementation as a library
add_library(psp-${CFE_PSP_TARGETNAME}-impl OBJECT
src/cfe_psp_exception.c
src/cfe_psp_memory.c
src/cfe_psp_memtab.c
src/cfe_psp_ssr.c
src/cfe_psp_start.c
src/cfe_psp_support.c
Expand All @@ -22,7 +21,7 @@ target_compile_definitions(psp-${CFE_SYSTEM_PSPNAME}-impl PRIVATE
$<TARGET_PROPERTY:psp_module_api,INTERFACE_COMPILE_DEFINITIONS>
)

target_include_directories(psp-${CFE_PSP_TARGETNAME}-impl PRIVATE
target_include_directories(psp-${CFE_PSP_TARGETNAME}-impl PRIVATE
inc
$<TARGET_PROPERTY:psp_module_api,INTERFACE_INCLUDE_DIRECTORIES>
)
Expand Down
4 changes: 3 additions & 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 95
#define CFE_PSP_IMPL_BUILD_NUMBER 101
#define CFE_PSP_IMPL_BUILD_BASELINE "v1.5.0-rc1"

/*
Expand All @@ -42,6 +42,8 @@
99 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. A value of "99" indicates an unreleased \
development version. */

#define CFE_PSP_IMPL_CODENAME "Bootes"

/*
* Tools to construct version string
*/
Expand Down
5 changes: 5 additions & 0 deletions fsw/mcp750-vxworks/src/cfe_psp_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,11 @@ void CFE_PSP_SetupReservedMemoryMap(void)

OS_printf("CFE_PSP: MCP750 Reserved Memory Block at 0x%08lx, Total Size = 0x%lx\n",
(unsigned long)MCP750_ReservedMemBlock.BlockPtr, (unsigned long)MCP750_ReservedMemBlock.BlockSize);

/*
* Set up the "RAM" entry in the memory table.
*/
CFE_PSP_MemRangeSet(0, CFE_PSP_MEM_RAM, 0, 0x8000000, CFE_PSP_MEM_SIZE_DWORD, CFE_PSP_MEM_ATTR_READWRITE);
}

/******************************************************************************
Expand Down
54 changes: 0 additions & 54 deletions fsw/mcp750-vxworks/src/cfe_psp_memtab.c

This file was deleted.

5 changes: 2 additions & 3 deletions fsw/pc-linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
#
######################################################################

# This contains the fully platform-specific code to
# This contains the fully platform-specific code to
# run CFE on this target.

# Build the pc-linux implementation as a library
add_library(psp-${CFE_PSP_TARGETNAME}-impl OBJECT
src/cfe_psp_exception.c
src/cfe_psp_memory.c
src/cfe_psp_memtab.c
src/cfe_psp_ssr.c
src/cfe_psp_start.c
src/cfe_psp_support.c
Expand All @@ -26,7 +25,7 @@ target_compile_definitions(psp-${CFE_SYSTEM_PSPNAME}-impl PRIVATE
$<TARGET_PROPERTY:psp_module_api,INTERFACE_COMPILE_DEFINITIONS>
)

target_include_directories(psp-${CFE_PSP_TARGETNAME}-impl PRIVATE
target_include_directories(psp-${CFE_PSP_TARGETNAME}-impl PRIVATE
inc
$<TARGET_PROPERTY:psp_module_api,INTERFACE_INCLUDE_DIRECTORIES>
)
Expand Down
4 changes: 3 additions & 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 95
#define CFE_PSP_IMPL_BUILD_NUMBER 101
#define CFE_PSP_IMPL_BUILD_BASELINE "v1.5.0-rc1"

/*
Expand All @@ -42,6 +42,8 @@
99 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. A value of "99" indicates an unreleased \
development version. */

#define CFE_PSP_IMPL_CODENAME "Bootes"

/*
* Tools to construct version string
*/
Expand Down
7 changes: 7 additions & 0 deletions fsw/pc-linux/src/cfe_psp_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,13 @@ void CFE_PSP_SetupReservedMemoryMap(void)
CFE_PSP_InitResetArea();
CFE_PSP_InitVolatileDiskMem();
CFE_PSP_InitUserReservedArea();

/*
* Set up the "RAM" entry in the memory table.
* On Linux this is just encompasses the entire memory space, but an entry needs
* to exist so that CFE_PSP_ValidateMemRange() works as intended.
*/
CFE_PSP_MemRangeSet(0, CFE_PSP_MEM_RAM, 0, SIZE_MAX, CFE_PSP_MEM_SIZE_DWORD, CFE_PSP_MEM_ATTR_READWRITE);
}

int32 CFE_PSP_InitProcessorReservedMemory(uint32 RestartType)
Expand Down
55 changes: 0 additions & 55 deletions fsw/pc-linux/src/cfe_psp_memtab.c

This file was deleted.

5 changes: 2 additions & 3 deletions fsw/pc-rtems/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
#
######################################################################

# This contains the fully platform-specific code to
# This contains the fully platform-specific code to
# run CFE on this target.

# Build the pc-rtems implementation as a library
add_library(psp-${CFE_PSP_TARGETNAME}-impl OBJECT
src/cfe_psp_exception.c
src/cfe_psp_memory.c
src/cfe_psp_memtab.c
src/cfe_psp_ssr.c
src/cfe_psp_start.c
src/cfe_psp_support.c
Expand All @@ -23,7 +22,7 @@ target_compile_definitions(psp-${CFE_SYSTEM_PSPNAME}-impl PRIVATE
$<TARGET_PROPERTY:psp_module_api,INTERFACE_COMPILE_DEFINITIONS>
)

target_include_directories(psp-${CFE_PSP_TARGETNAME}-impl PRIVATE
target_include_directories(psp-${CFE_PSP_TARGETNAME}-impl PRIVATE
inc
$<TARGET_PROPERTY:psp_module_api,INTERFACE_INCLUDE_DIRECTORIES>
)
Expand Down
Loading

0 comments on commit 79b944b

Please sign in to comment.