Page MenuHomeFreeBSD

Powerpc64: Add the facility unavailable trap subsystem
ClosedPublic

Authored by breno.leitao_gmail.com on Mar 2 2018, 5:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 8, 10:58 PM
Unknown Object (File)
Dec 22 2023, 11:06 PM
Unknown Object (File)
Dec 11 2023, 4:42 AM
Unknown Object (File)
Dec 7 2023, 6:58 PM
Unknown Object (File)
Dec 5 2023, 5:23 AM
Unknown Object (File)
Nov 18 2023, 11:05 PM
Unknown Object (File)
Nov 18 2023, 5:51 PM
Unknown Object (File)
Nov 18 2023, 5:48 PM
Subscribers

Details

Summary

This code adds the basic infrastructure for the facility subsystem. A facility
trap is raised when an unavailable instruction is executed. One example is
executing a Hardware Transactional Memory instruction while the MSR[TM] is
disabled. In the past, there was a specific interrupt for it (FP, VEC), but the
new instructions seem to be multiplexed on this facility interrupt.

The root cause of the trap is provided on Facility Status and Control Register
(FSCR) register.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 15356
Build 15410: arc lint + arc unit

Event Timeline

sys/powerpc/include/facility.h
1 ↗(On Diff #39888)

I would put the definitions from this header into spr.h under the SPR_FSCR, like other SPR bits.

sys/powerpc/powerpc/trap.c
301

Don't forget the break; here, otherwise it falls through.

hi Justin, thanks for the review. I will work on a v2 patchset.

sys/powerpc/include/facility.h
1 ↗(On Diff #39888)

ok!

sys/powerpc/powerpc/trap.c
301

In fact, I was expecting it to fall through, execute the EXC_HEA code and return the SIGILL, but I think it will be better if I split and break both, and return SIGILL in the two cases.

Patchset v2. Changes as requested by Justin (Thanks!):

  • Move the SPR_FSCR definitions to spr.h
  • Split the code between EXC_FAC and EXC_HEA.
This revision is now accepted and ready to land.Mar 4 2018, 9:56 PM
This revision was automatically updated to reflect the committed changes.