Fix #158, Implement exception storage in PSP#159
Merged
astrogeco merged 2 commits intonasa:integration-candidatefrom May 8, 2020
Merged
Fix #158, Implement exception storage in PSP#159astrogeco merged 2 commits intonasa:integration-candidatefrom
astrogeco merged 2 commits intonasa:integration-candidatefrom
Conversation
fa75255 to
21b017b
Compare
Implment exceptions for VxWorks and PC-Linux PSP Exceptions are buffered in an extra block inside the PSP reserved area. On pc-linux, the interrupt (CTRL+C) handling is also treated as an exception, which shuts down the CFE normally. This also means processor resets on the pc-linux can be tested.
21b017b to
fe5e019
Compare
Contributor
Author
|
All components of this are now rebased. Ready for merge. |
Contributor
|
Need to resolve CI failures |
skliper
reviewed
May 5, 2020
Comment on lines
+387
to
+394
| start_addr = (cpuaddr) sysMemTop(); | ||
| end_addr = start_addr; | ||
|
|
||
| memset(&CFE_PSP_ReservedMemoryMap, 0, sizeof(CFE_PSP_ReservedMemoryMap)); | ||
|
|
||
| CFE_PSP_ReservedMemoryMap.BootPtr = (CFE_PSP_ReservedMemoryBootRecord_t *)end_addr; | ||
| end_addr += sizeof(CFE_PSP_ReservedMemoryBootRecord_t); | ||
| end_addr = (end_addr + CFE_PSP_MEMALIGN_MASK) & ~CFE_PSP_MEMALIGN_MASK; |
Contributor
There was a problem hiding this comment.
Did you look into the routines Doyle suggested?
Contributor
|
CCB 20200506 - Had special topic on April 30 2020. @acudmore will review later this week. |
ghost
approved these changes
May 8, 2020
ghost
left a comment
There was a problem hiding this comment.
Nice improvement, and having the linux exception handling helps as well.
When I finally merge RTEMS 5.x changes in, I would like to implement the exception code for RTEMS and also explore concepts of saving the exception storage on boot, but that can be a separate effort.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the contribution
Implements exception capture and storage within the PSP.
Provides a new API so that CFE can poll for exceptions at a later time and also record the information in the ER log.
Testing performed
Add a divide by zero "bug" to sample_app
Confirm that the PSP captures the exception context correctly and it is later logged by CFE
Confirm SIGINT, SIGQUIT, and SIGTERM are appropriately handled on POSIX
Expected behavior changes
Exception handling is now implemented on POSIX. The initial config will capture arithmetic errors (SIGFPE) as well as SIGINT and SIGTERM. The latter is notable in that 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, which on pc-linux causes the process to exit normally.
Importantly, as CTRL+C is frequently used during testing, this means that there is now a mechanism through which the exception code will get used during normal test cycles. Otherwise the code is very infrequently used and could suffer from bit-rot.
System(s) tested on
Ubuntu 20.04 LTS
VxWorks 6.9 on MCP750
i686-rtems4.11 (pc-rtems) on QEMU (no exception handling here, just tested to ensure nothing broke)
Additional context
Goes along with nasa/cFE#411, nasa/cFE#76
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.