Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SP0/VxWorks6.9 SPE unavailable exception encountered #1154

Closed
skliper opened this issue Sep 20, 2021 · 0 comments · Fixed by #1155 or #1158
Closed

SP0/VxWorks6.9 SPE unavailable exception encountered #1154

skliper opened this issue Sep 20, 2021 · 0 comments · Fixed by #1155 or #1158
Assignees
Labels
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented Sep 20, 2021

Describe the bug
Apparently VxWorks needs VX_SPE_TASK defined for tasks on a 32 bit system if any SPE instructions are inserted by the compiler. Lacking this I hit "SPE unavailable exception" from within a child task on the SP0 with VxWorks 6.9.

Side note - Turns out under certain circumstances VX_FP_TASK behaves like VX_SPE_TASK.

Flags are set here:

/* see if the user wants floating point enabled. If
* so, then se the correct option.
*/
vxflags = 0;
if (flags & OS_FP_ENABLED)
{
vxflags |= VX_FP_TASK;
}

To Reproduce
Run the cfe functional test on SP0, observe the SPE unavailable exception related to the TestTblNonAppContext task started by TestTableBadContext in tbl_registration_test.c:
https://github.com/nasa/cFE/blob/64a6a59456fa9e47dc93e4bb9cecacc3d86d1862/modules/cfe_testcase/src/tbl_registration_test.c#L246-L248

Note - I'm not sure how consistent this is, since it'll only occur if SPE instructions are added by the compiler (no clue why it happened w/ this task).

Expected behavior
No exception - could be achieved by allowing additional flags to be added from the PSP build configuration?

System observed on:

  • Hardware: SP0
  • OS: VxWorks 6.9
  • Versions Bundle main

Additional context
None

Reporter Info
Jacob Hageman - NASA/GSFC

@skliper skliper added the bug label Sep 20, 2021
@skliper skliper added this to the 6.0.0 milestone Sep 20, 2021
jphickey added a commit to jphickey/osal that referenced this issue Sep 20, 2021
Adds a simple BSP API to get/set integer flags for each resource type.
All bits are platform-defined, so this can be used to store any
arbitrary platform flag.

Initial use case is for setting task flags on vxWorks platforms which
require a certain task flag to be set.
astrogeco added a commit that referenced this issue Sep 21, 2021
Fix #1154, add bsp-specific configuration flag registry
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants