diff --git a/fsw/pc-linux/src/cfe_psp_start.c b/fsw/pc-linux/src/cfe_psp_start.c index 732d1cd8..926a987e 100644 --- a/fsw/pc-linux/src/cfe_psp_start.c +++ b/fsw/pc-linux/src/cfe_psp_start.c @@ -251,7 +251,8 @@ void OS_Application_Startup(void) */ CFE_PSP_SpacecraftId = CommandData.SpacecraftId; CFE_PSP_CpuId = CommandData.CpuId; - strncpy(CFE_PSP_CpuName, CommandData.CpuName, CFE_PSP_CPU_NAME_LENGTH); + strncpy(CFE_PSP_CpuName, CommandData.CpuName, sizeof(CFE_PSP_CpuName)-1); + CFE_PSP_CpuName[sizeof(CFE_PSP_CpuName)-1] = 0; /* ** Set the reset subtype diff --git a/fsw/pc-rtems/src/cfe_psp_memory.c b/fsw/pc-rtems/src/cfe_psp_memory.c index dc2135c3..7f9068a0 100644 --- a/fsw/pc-rtems/src/cfe_psp_memory.c +++ b/fsw/pc-rtems/src/cfe_psp_memory.c @@ -420,6 +420,13 @@ void CFE_PSP_SetupReservedMemoryMap(void) CFE_PSP_ReservedMemoryMap.UserReservedMemory.BlockSize = CFE_PSP_USER_RESERVED_SIZE; ReservedMemoryAddr += UserReservedSize; + /* + * displaying the final address shows how much was actually used, + * and additionally avoids a warning about the result of the final increment not being used. + * (prefer this over removing the increment, as it is safer if another block is added) + */ + OS_printf("CFE_PSP: PSP reserved memory ends at: 0x%08lX\n", + (unsigned long)ReservedMemoryAddr); } /****************************************************************************** diff --git a/fsw/pc-rtems/src/cfe_psp_support.c b/fsw/pc-rtems/src/cfe_psp_support.c index 8a26c7d4..83732f64 100644 --- a/fsw/pc-rtems/src/cfe_psp_support.c +++ b/fsw/pc-rtems/src/cfe_psp_support.c @@ -87,17 +87,7 @@ extern CFE_PSP_MemoryBlock_t PcRtems_ReservedMemBlock; void CFE_PSP_Restart(uint32 reset_type) { - if ( reset_type == CFE_PSP_RST_TYPE_POWERON ) - { - CFE_PSP_FlushCaches(1, PcRtems_ReservedMemBlock.BlockPtr, PcRtems_ReservedMemBlock.BlockSize); - /* reboot(BOOT_CLEAR); Need RTEMS equiv. */ - } - else - { - CFE_PSP_FlushCaches(1, PcRtems_ReservedMemBlock.BlockPtr, PcRtems_ReservedMemBlock.BlockSize); - /* reboot(BOOT_NORMAL); Need RTEMS Equiv */ - } - + CFE_PSP_FlushCaches(1, PcRtems_ReservedMemBlock.BlockPtr, PcRtems_ReservedMemBlock.BlockSize); OS_printf("CFE_PSP_Restart is not implemented on this platform ( yet ! )\n"); exit(-1);