From 7e9108aa6cbca1f74f7debd5a51f544f7cbd47d1 Mon Sep 17 00:00:00 2001 From: Avi Date: Fri, 24 Feb 2023 12:42:33 +1000 Subject: [PATCH 1/3] Fix #379, Align mismatched function prototype/implem. parameter names --- fsw/mcp750-vxworks/src/cfe_psp_support.c | 4 ++-- fsw/pc-linux/src/cfe_psp_support.c | 6 +++--- fsw/pc-rtems/src/cfe_psp_support.c | 2 +- fsw/shared/src/cfe_psp_memutils.c | 8 ++++---- .../src/coveragetest-cfe-psp-support.c | 2 +- ut-stubs/ut_psp_stubs.c | 12 ++++++------ 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/fsw/mcp750-vxworks/src/cfe_psp_support.c b/fsw/mcp750-vxworks/src/cfe_psp_support.c index 43977eeb..70c2e2cc 100644 --- a/fsw/mcp750-vxworks/src/cfe_psp_support.c +++ b/fsw/mcp750-vxworks/src/cfe_psp_support.c @@ -77,9 +77,9 @@ extern CFE_PSP_MemoryBlock_t MCP750_ReservedMemBlock; * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -void CFE_PSP_Restart(uint32 reset_type) +void CFE_PSP_Restart(uint32 resetType) { - if (reset_type == CFE_PSP_RST_TYPE_POWERON) + if (resetType == CFE_PSP_RST_TYPE_POWERON) { CFE_PSP_ReservedMemoryMap.BootPtr->bsp_reset_type = CFE_PSP_RST_TYPE_POWERON; CFE_PSP_FlushCaches(1, MCP750_ReservedMemBlock.BlockPtr, MCP750_ReservedMemBlock.BlockSize); diff --git a/fsw/pc-linux/src/cfe_psp_support.c b/fsw/pc-linux/src/cfe_psp_support.c index 0fa3b0f8..a0952e23 100644 --- a/fsw/pc-linux/src/cfe_psp_support.c +++ b/fsw/pc-linux/src/cfe_psp_support.c @@ -57,9 +57,9 @@ extern char CFE_PSP_CpuName[]; * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -void CFE_PSP_Restart(uint32 reset_type) +void CFE_PSP_Restart(uint32 resetType) { - if (reset_type == CFE_PSP_RST_TYPE_POWERON) + if (resetType == CFE_PSP_RST_TYPE_POWERON) { OS_printf("CFE_PSP: Exiting cFE with POWERON Reset status.\n"); @@ -75,7 +75,7 @@ void CFE_PSP_Restart(uint32 reset_type) /* * Record the reset type for the next boot. */ - CFE_PSP_ReservedMemoryMap.BootPtr->NextResetType = reset_type; + CFE_PSP_ReservedMemoryMap.BootPtr->NextResetType = resetType; CFE_PSP_ReservedMemoryMap.BootPtr->ValidityFlag = CFE_PSP_BOOTRECORD_VALID; /* diff --git a/fsw/pc-rtems/src/cfe_psp_support.c b/fsw/pc-rtems/src/cfe_psp_support.c index 642ce8b3..8cb843d6 100644 --- a/fsw/pc-rtems/src/cfe_psp_support.c +++ b/fsw/pc-rtems/src/cfe_psp_support.c @@ -71,7 +71,7 @@ extern CFE_PSP_MemoryBlock_t PcRtems_ReservedMemBlock; * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -void CFE_PSP_Restart(uint32 reset_type) +void CFE_PSP_Restart(uint32 resetType) { CFE_PSP_FlushCaches(1, PcRtems_ReservedMemBlock.BlockPtr, PcRtems_ReservedMemBlock.BlockSize); OS_printf("%s is not implemented on this platform ( yet ! )\n", __func__); diff --git a/fsw/shared/src/cfe_psp_memutils.c b/fsw/shared/src/cfe_psp_memutils.c index 97c2b289..1189f5c0 100644 --- a/fsw/shared/src/cfe_psp_memutils.c +++ b/fsw/shared/src/cfe_psp_memutils.c @@ -51,9 +51,9 @@ * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_PSP_MemCpy(void *dst, const void *src, uint32 size) +int32 CFE_PSP_MemCpy(void *dest, const void *src, uint32 n) { - memcpy(dst, src, size); + memcpy(dest, src, n); return CFE_PSP_SUCCESS; } @@ -63,8 +63,8 @@ int32 CFE_PSP_MemCpy(void *dst, const void *src, uint32 size) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_PSP_MemSet(void *dst, uint8 value, uint32 size) +int32 CFE_PSP_MemSet(void *dest, uint8 value, uint32 n) { - memset(dst, (int)value, (size_t)size); + memset(dest, (int)value, (size_t)n); return CFE_PSP_SUCCESS; } diff --git a/unit-test-coverage/mcp750-vxworks/src/coveragetest-cfe-psp-support.c b/unit-test-coverage/mcp750-vxworks/src/coveragetest-cfe-psp-support.c index 2968cf6c..66804fdf 100644 --- a/unit-test-coverage/mcp750-vxworks/src/coveragetest-cfe-psp-support.c +++ b/unit-test-coverage/mcp750-vxworks/src/coveragetest-cfe-psp-support.c @@ -49,7 +49,7 @@ void Test_CFE_PSP_Restart(void) { /* * Test Case For: - * void CFE_PSP_Restart(uint32 reset_type) + * void CFE_PSP_Restart(uint32 resetType) */ UT_Setup_ReservedMem_BootRec(); diff --git a/ut-stubs/ut_psp_stubs.c b/ut-stubs/ut_psp_stubs.c index 2bf16c16..2e65ea2b 100644 --- a/ut-stubs/ut_psp_stubs.c +++ b/ut-stubs/ut_psp_stubs.c @@ -345,10 +345,10 @@ int32 CFE_PSP_GetVolatileDiskMem(cpuaddr *PtrToVolDisk, uint32 *SizeOfVolDisk) ** This function does not return a value. ** ******************************************************************************/ -void CFE_PSP_Restart(uint32 reset_type) +void CFE_PSP_Restart(uint32 resetType) { UT_DEFAULT_IMPL(CFE_PSP_Restart); - UT_Stub_CopyFromLocal(UT_KEY(CFE_PSP_Restart), (uint8 *)&reset_type, sizeof(reset_type)); + UT_Stub_CopyFromLocal(UT_KEY(CFE_PSP_Restart), (uint8 *)&resetType, sizeof(resetType)); } /*****************************************************************************/ @@ -668,7 +668,7 @@ int32 CFE_PSP_MemValidateRange(cpuaddr Address, size_t Size, uint32 MemoryType) ** Returns OS_SUCCESS. ** ******************************************************************************/ -int32 CFE_PSP_MemCpy(void *dst, const void *src, uint32 size) +int32 CFE_PSP_MemCpy(void *dest, const void *src, uint32 n) { int32 status; @@ -677,7 +677,7 @@ int32 CFE_PSP_MemCpy(void *dst, const void *src, uint32 size) if (status >= 0) { /* this is not actually a stub; it actually has to _do_ the intended function */ - memcpy(dst, src, size); + memcpy(dest, src, n); } return status; @@ -698,7 +698,7 @@ int32 CFE_PSP_MemCpy(void *dst, const void *src, uint32 size) ** Returns OS_SUCCESS. ** ******************************************************************************/ -int32 CFE_PSP_MemSet(void *dst, uint8 value, uint32 size) +int32 CFE_PSP_MemSet(void *dest, uint8 value, uint32 n) { int32 status; @@ -707,7 +707,7 @@ int32 CFE_PSP_MemSet(void *dst, uint8 value, uint32 size) if (status >= 0) { /* this is not actually a stub; it actually has to _do_ the intended function */ - memset(dst, (int)value, (size_t)size); + memset(dest, (int)value, (size_t)n); } return status; From 2b9357358795ce8169282a1afcf717265ce99b14 Mon Sep 17 00:00:00 2001 From: Dylan Date: Fri, 5 Jan 2024 09:29:07 -0500 Subject: [PATCH 2/3] Updating documentation and version numbers for v1.6.0-rc4+dev115 --- CHANGELOG.md | 4 ++++ fsw/mcp750-vxworks/inc/psp_version.h | 2 +- fsw/pc-rtems/inc/psp_version.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdf2fe81..c994b4a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Development Build: v1.6.0-rc4+dev117 +- Align mismatched function prototype/implem. parameter names +- See + ## Development Build: v1.6.0-rc4+dev102 - malloc stub memalign calculation - See diff --git a/fsw/mcp750-vxworks/inc/psp_version.h b/fsw/mcp750-vxworks/inc/psp_version.h index d00c32a8..39cd091d 100644 --- a/fsw/mcp750-vxworks/inc/psp_version.h +++ b/fsw/mcp750-vxworks/inc/psp_version.h @@ -27,7 +27,7 @@ /* * Development Build Macro Definitions */ -#define CFE_PSP_IMPL_BUILD_NUMBER 102 +#define CFE_PSP_IMPL_BUILD_NUMBER 115 #define CFE_PSP_IMPL_BUILD_BASELINE "v1.6.0-rc4" /* diff --git a/fsw/pc-rtems/inc/psp_version.h b/fsw/pc-rtems/inc/psp_version.h index d00c32a8..39cd091d 100644 --- a/fsw/pc-rtems/inc/psp_version.h +++ b/fsw/pc-rtems/inc/psp_version.h @@ -27,7 +27,7 @@ /* * Development Build Macro Definitions */ -#define CFE_PSP_IMPL_BUILD_NUMBER 102 +#define CFE_PSP_IMPL_BUILD_NUMBER 115 #define CFE_PSP_IMPL_BUILD_BASELINE "v1.6.0-rc4" /* From 10bce0863362adc238fb4d4847fd7cc26c41b84c Mon Sep 17 00:00:00 2001 From: dzbaker Date: Mon, 8 Jan 2024 08:17:58 -0500 Subject: [PATCH 3/3] Fix #424, re-add rtems_fxp_attach() to cfe_psp_start.c. --- fsw/pc-rtems/src/cfe_psp_start.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fsw/pc-rtems/src/cfe_psp_start.c b/fsw/pc-rtems/src/cfe_psp_start.c index a1ea66cb..5d03d17f 100644 --- a/fsw/pc-rtems/src/cfe_psp_start.c +++ b/fsw/pc-rtems/src/cfe_psp_start.c @@ -36,6 +36,8 @@ #include #include +extern int rtems_fxp_attach(struct rtems_bsdnet_ifconfig *config, int attaching); + /* ** cFE includes */