File tree 3 files changed +10
-12
lines changed
3 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -251,7 +251,8 @@ void OS_Application_Startup(void)
251
251
*/
252
252
CFE_PSP_SpacecraftId = CommandData .SpacecraftId ;
253
253
CFE_PSP_CpuId = CommandData .CpuId ;
254
- strncpy (CFE_PSP_CpuName , CommandData .CpuName , CFE_PSP_CPU_NAME_LENGTH );
254
+ strncpy (CFE_PSP_CpuName , CommandData .CpuName , sizeof (CFE_PSP_CpuName )- 1 );
255
+ CFE_PSP_CpuName [sizeof (CFE_PSP_CpuName )- 1 ] = 0 ;
255
256
256
257
/*
257
258
** Set the reset subtype
Original file line number Diff line number Diff line change @@ -420,6 +420,13 @@ void CFE_PSP_SetupReservedMemoryMap(void)
420
420
CFE_PSP_ReservedMemoryMap .UserReservedMemory .BlockSize = CFE_PSP_USER_RESERVED_SIZE ;
421
421
ReservedMemoryAddr += UserReservedSize ;
422
422
423
+ /*
424
+ * displaying the final address shows how much was actually used,
425
+ * and additionally avoids a warning about the result of the final increment not being used.
426
+ * (prefer this over removing the increment, as it is safer if another block is added)
427
+ */
428
+ OS_printf ("CFE_PSP: PSP reserved memory ends at: 0x%08lX\n" ,
429
+ (unsigned long )ReservedMemoryAddr );
423
430
}
424
431
425
432
/******************************************************************************
Original file line number Diff line number Diff line change @@ -87,17 +87,7 @@ extern CFE_PSP_MemoryBlock_t PcRtems_ReservedMemBlock;
87
87
void CFE_PSP_Restart (uint32 reset_type )
88
88
{
89
89
90
- if ( reset_type == CFE_PSP_RST_TYPE_POWERON )
91
- {
92
- CFE_PSP_FlushCaches (1 , PcRtems_ReservedMemBlock .BlockPtr , PcRtems_ReservedMemBlock .BlockSize );
93
- /* reboot(BOOT_CLEAR); Need RTEMS equiv. */
94
- }
95
- else
96
- {
97
- CFE_PSP_FlushCaches (1 , PcRtems_ReservedMemBlock .BlockPtr , PcRtems_ReservedMemBlock .BlockSize );
98
- /* reboot(BOOT_NORMAL); Need RTEMS Equiv */
99
- }
100
-
90
+ CFE_PSP_FlushCaches (1 , PcRtems_ReservedMemBlock .BlockPtr , PcRtems_ReservedMemBlock .BlockSize );
101
91
OS_printf ("CFE_PSP_Restart is not implemented on this platform ( yet ! )\n" );
102
92
exit (-1 );
103
93
You can’t perform that action at this time.
0 commit comments