Skip to content

Commit 37ee8eb

Browse files
authored
Merge pull request #160 from nasa/integration-candidate
Integration Candidate COMBINED 2020-04-29 and 2020-05-06
2 parents 09b62df + 8754232 commit 37ee8eb

29 files changed

+1664
-775
lines changed

CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ add_definitions(-D_CFE_PSP_)
99
include_directories(fsw/shared)
1010

1111
# Build the PSP implementation which lies in a system-specific subdirectory
12+
include_directories(fsw/shared)
1213
include_directories(fsw/${CFE_SYSTEM_PSPNAME}/inc)
1314
add_subdirectory(fsw/${CFE_SYSTEM_PSPNAME} ${CFE_SYSTEM_PSPNAME})
1415

1516
# Build the "common" parts as a library
1617
add_library(psp-${CFE_SYSTEM_PSPNAME} STATIC
1718
fsw/shared/cfe_psp_configdata.c
1819
fsw/shared/cfe_psp_eeprom.c
20+
fsw/shared/cfe_psp_exceptionstorage.c
1921
fsw/shared/cfe_psp_memrange.c
2022
fsw/shared/cfe_psp_memutils.c
2123
fsw/shared/cfe_psp_module.c

README.md

+54-36
Original file line numberDiff line numberDiff line change
@@ -4,63 +4,81 @@ Travis-CI: [![Build Status](https://travis-ci.com/nasa/PSP.svg)](https://travis-
44

55
This repository contains NASA's Platform Support Package (PSP), which is a framework component of the Core Flight System.
66

7-
This is a collection of APIs abstracting platform specific functionality to be located in the `psp` subdirectory of a cFS Mission Tree. The Core Flight System is bundled at https://github.com/nasa/cFS, which includes build and execution instructions.
7+
This is a collection of APIs abstracting platform specific functionality to be located in the `psp` subdirectory of a cFS Mission Tree. The Core Flight System is bundled at <https://github.com/nasa/cFS>, which includes build and execution instructions.
88

99
## Version History
1010

11+
### Development Build: 1.4.11
12+
13+
- Removes non-termination string warnings when building with GCC9.
14+
- Exception handling is now implemented on POSIX. There is no longer a separate handler for SIGINT - it is now treated as an exception and goes through the normal process which ends up "restarting" CFE. On pc-linux causes the process to exit normally. There is now a mechanism to capture the CTRL+C exception code and use it during normal test cycles.
15+
- See <https://github.com/nasa/PSP/pull/160>
16+
1117
#### Development Build: 1.4.10
12-
- Implements full-precision microsecond conversion
13-
- See https://github.com/nasa/PSP/pull/155
1418

15-
#### Development Build: 1.4.9
16-
- RTEMS builds successfully without errors
17-
- Build script uses a proper CMakeLists.txt instead of the aux_source directory
18-
- Minor updates (see https://github.com/nasa/PSP/pull/153)
19+
- Implements full-precision microsecond conversion
20+
- See <https://github.com/nasa/PSP/pull/155>
21+
22+
### Development Build: 1.4.9
23+
24+
- RTEMS builds successfully without errors
25+
- Build script uses a proper CMakeLists.txt instead of the aux_source directory
26+
- Minor updates (see <https://github.com/nasa/PSP/pull/153>)
27+
28+
### Development Build: 1.4.8
29+
30+
- Minor updates (see <https://github.com/nasa/PSP/pull/151>)
31+
32+
### Development Build: 1.4.7
33+
34+
- Fixed some build warnings for MCP750
35+
- Minor updates (see <https://github.com/nasa/PSP/pull/142>)
36+
37+
### Development Build: 1.4.6
38+
39+
- Minor updates (see <https://github.com/nasa/PSP/pull/141>)
40+
41+
### Development Build: 1.4.5
42+
43+
- Simplifies array handling in VxWorks
44+
- Minor updates (see <https://github.com/nasa/PSP/pull/138>)
45+
46+
### Development Build: 1.4.4
47+
48+
- Minor updates (see <https://github.com/nasa/PSP/pull/132>)
1949

20-
#### Development Build: 1.4.8
21-
- Minor updates (see https://github.com/nasa/PSP/pull/151)
50+
### Development Build: 1.4.3
2251

23-
#### Development Build: 1.4.7
24-
- Fixed some build warnings for MCP750
25-
- Minor updates (see https://github.com/nasa/PSP/pull/142)
52+
- Minor updates (see <https://github.com/nasa/PSP/pull/130>)
2653

27-
#### Development Build: 1.4.6
28-
- Minor updates (see https://github.com/nasa/PSP/pull/141)
54+
### Development Build: 1.4.2
2955

30-
#### Development Build: 1.4.5
31-
- Simplifies array handling in VxWorks
32-
- Minor updates (see https://github.com/nasa/PSP/pull/138)
56+
- Minor updates (see <https://github.com/nasa/PSP/pull/127>)
3357

34-
#### Development Build: 1.4.4
35-
- Minor updates (see https://github.com/nasa/PSP/pull/132)
58+
### Development Build: 1.4.1
3659

37-
#### Development Build: 1.4.3
38-
- Minor updates (see https://github.com/nasa/PSP/pull/130)
60+
- Minor updates (see <https://github.com/nasa/PSP/pull/115>)
3961

40-
#### Development Build: 1.4.2
41-
- Minor updates (see https://github.com/nasa/PSP/pull/127)
62+
### **_1.4.0 OFFICIAL RELEASE_**
4263

43-
#### Development Build: 1.4.1
44-
- Minor updates (see https://github.com/nasa/PSP/pull/115)
64+
- This is a point release from an internal repository
65+
- Changes are detailed in [cFS repo](https://github.com/nasa/cFS) release documentation
66+
- Released as part of cFE 6.7.0, Apache 2.0
4567

46-
### \*\*\* 1.4.0 OFFICIAL RELEASE \*\*\*
47-
- This is a point release from an internal repository
48-
- Changes are detailed in [cFS repo](https://github.com/nasa/cFS) release documentation
49-
- Released as part of cFE 6.7.0, Apache 2.0
68+
### **_1.3.0a OFFICIAL RELEASE_**
5069

51-
### \*\*\* 1.3.0a OFFICIAL RELEASE \*\*\*
52-
- This is a point release from an internal repository
53-
- See [version description document](https://github.com/nasa/PSP/blob/v1.3.0a/doc/PSP%201.3.0.0%20Version%20Description%20Document.pdf)
54-
- Released as part of cFE 6.6.0a, Apache 2.0
70+
- This is a point release from an internal repository
71+
- See [version description document](https://github.com/nasa/PSP/blob/v1.3.0a/doc/PSP%201.3.0.0%20Version%20Description%20Document.pdf)
72+
- Released as part of cFE 6.6.0a, Apache 2.0
5573

56-
The open source release does not include all PSPs that have been developed. Only the three PSPs included are managed by the community CCB. PSPs developed by other organizations can be requested through the mechanisms listed below. Note the framework PSPs delivered may change in the future as platforms become obsolete.
74+
The open source release does not include all PSPs that have been developed. Only the three PSPs included are managed by the community CCB. PSPs developed by other organizations can be requested through the mechanisms listed below. Note the framework PSPs delivered may change in the future as platforms become obsolete.
5775

5876
## Known issues
5977

6078
See all open issues and closed to milestones later than this version.
6179

6280
## Getting Help
6381

64-
For best results, submit issues:questions or issues:help wanted requests at https://github.com/nasa/cFS.
82+
For best results, submit issues:questions or issues:help wanted requests at <https://github.com/nasa/cFS>.
6583

66-
Official cFS page: http://cfs.gsfc.nasa.gov
84+
Official cFS page: <http://cfs.gsfc.nasa.gov>

fsw/inc/cfe_psp.h

+6-11
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
#define CFE_PSP_ERROR_NOT_IMPLEMENTED (-27)
6666
#define CFE_PSP_INVALID_MODULE_NAME (-28)
6767
#define CFE_PSP_INVALID_MODULE_ID (-29)
68+
#define CFE_PSP_NO_EXCEPTION_DATA (-30)
6869

6970

7071

@@ -196,7 +197,7 @@ extern uint32 CFE_PSP_GetRestartType(uint32 *restartSubType );
196197
*/
197198

198199

199-
extern void CFE_PSP_FlushCaches(uint32 type, cpuaddr address, uint32 size);
200+
extern void CFE_PSP_FlushCaches(uint32 type, void* address, uint32 size);
200201
/*
201202
** This is a BSP specific cache flush routine
202203
*/
@@ -247,16 +248,6 @@ extern uint32 CFE_PSP_Get_Dec(void);
247248
** CFE_PSP_Get_Dec
248249
*/
249250

250-
251-
extern int32 CFE_PSP_InitProcessorReservedMemory(uint32 RestartType );
252-
/*
253-
** CFE_PSP_InitProcessorReservedMemory initializes all of the memory in the
254-
** BSP that is preserved on a processor reset. The memory includes the
255-
** Critical Data Store, the ES Reset Area, the Volatile Disk Memory, and
256-
** the User Reserved Memory. In general, the memory areas will be initialized
257-
** ( cleared ) on a Power On reset, and preserved during a processor reset.
258-
*/
259-
260251
extern int32 CFE_PSP_GetCDSSize(uint32 *SizeOfCDS);
261252
/*
262253
** CFE_PSP_GetCDSSize fetches the size of the OS Critical Data Store area.
@@ -368,6 +359,10 @@ extern void CFE_PSP_SetDefaultExceptionEnvironment(void);
368359
*/
369360

370361

362+
extern uint32 CFE_PSP_Exception_GetCount(void);
363+
extern int32 CFE_PSP_Exception_GetSummary(uint32 *ContextLogId, uint32 *TaskId, char *ReasonBuf, uint32 ReasonSize);
364+
extern int32 CFE_PSP_Exception_CopyContext(uint32 ContextLogId, void *ContextBuf, uint32 ContextSize);
365+
371366
/*
372367
** I/O Port API
373368
*/

fsw/inc/cfe_psp_configdata.h

+1-7
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,12 @@ typedef const struct
5858
uint32 PSP_WatchdogMin; /**< PSP Minimum watchdog in milliseconds */
5959
uint32 PSP_WatchdogMax; /**< PSP Maximum watchdog in milliseconds */
6060
uint32 PSP_MemTableSize; /**< Size of PSP memory table */
61+
uint32 PSP_ExceptionLogSize; /**< Size of PSP exception log */
6162
CFE_PSP_MemTable_t *PSP_MemoryTable; /**< Pointer to PSP memory table (forward reference) */
6263

6364
uint32 OS_VolumeTableSize; /**< Size of OS volume table */
6465
OS_VolumeInfo_t *OS_VolumeTable; /**< Pointer to OS volume table (forward reference) */
6566

66-
/**
67-
* Processor Context type.
68-
* This is needed to determine the size of the context entry in the ER log.
69-
* It is a placeholder as the implementation to use it is not merged in yet.
70-
*/
71-
uint32 OS_CpuContextSize;
72-
7367
/**
7468
* Number of EEPROM banks on this platform
7569
*/

fsw/mcp750-vxworks/inc/cfe_psp_config.h

+47-11
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,47 @@
4444
*/
4545
#define CFE_PSP_MEM_TABLE_SIZE 10
4646

47+
/**
48+
* This define sets the maximum number of exceptions
49+
* that can be stored.
50+
*
51+
* It must always be a power of two.
52+
*/
53+
#define CFE_PSP_MAX_EXCEPTION_ENTRIES 4
54+
4755
/*
48-
** Processor Context type.
49-
** This is needed to determine the size of the context entry in the ER log.
50-
** Although this file is in a CPU directory, it really is OS dependant, so supporting
51-
** multiple OSs on the same CPU architecture ( i.e. x86/linux, x86/windows, x86/osx )
52-
** will require IFDEFS.
56+
** Typedef for the layout of the vxWorks boot record structure
57+
**
58+
** This is statically placed at the beginning of system memory (sysMemTop)
59+
** which should be reserved in the kernel.
5360
*/
54-
typedef struct
61+
typedef struct
5562
{
56-
ESFPPC esf; /* Exception stack frame */
57-
FP_CONTEXT fp; /* floating point registers */
58-
59-
} CFE_PSP_ExceptionContext_t;
63+
uint32 bsp_reset_type;
64+
uint32 spare1;
65+
uint32 spare2;
66+
uint32 spare3;
67+
68+
} CFE_PSP_ReservedMemoryBootRecord_t;
6069

61-
#define CFE_PSP_CPU_CONTEXT_SIZE (sizeof(CFE_PSP_ExceptionContext_t))
70+
71+
/**
72+
* \brief The data type used by the underlying OS to represent a thread ID.
73+
*/
74+
typedef TASK_ID CFE_PSP_Exception_SysTaskId_t;
75+
76+
/*
77+
** Global variables
78+
*/
79+
typedef struct
80+
{
81+
UINT32 timebase_upper; /* Upper 32 bits of timebase as sampled by hook */
82+
UINT32 timebase_lower; /* Lower 32 bits of timebase as sampled by hook */
83+
int vector; /* vector number */
84+
ESFPPC esf; /* Exception stack frame */
85+
FP_CONTEXT fp; /* floating point registers */
86+
87+
} CFE_PSP_Exception_ContextDataEntry_t;
6288

6389
/*
6490
** Watchdog minimum and maximum values ( in milliseconds )
@@ -71,6 +97,16 @@ typedef struct
7197
*/
7298
#define CFE_PSP_NUM_EEPROM_BANKS 1
7399

100+
/*
101+
* The alignment to use for each reserved memory block.
102+
*
103+
* This is a mask to be applied to each block base address
104+
*
105+
* Chosen as the cache line size of the MPC750 processor (32 bytes)
106+
* such that the blocks will be cached more efficiently.
107+
*/
108+
#define CFE_PSP_MEMALIGN_MASK ((cpuaddr)0x1F)
109+
74110

75111
#endif
76112

fsw/mcp750-vxworks/inc/psp_version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
*/
3636
#define CFE_PSP_IMPL_MAJOR_VERSION 1
3737
#define CFE_PSP_IMPL_MINOR_VERSION 4
38-
#define CFE_PSP_IMPL_REVISION 10
38+
#define CFE_PSP_IMPL_REVISION 11
3939
#define CFE_PSP_IMPL_MISSION_REV 0
4040

4141
#endif /* _psp_version_ */

0 commit comments

Comments
 (0)