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)
Sat, Nov 16, 2:10 PM
Unknown Object (File)
Oct 3 2024, 4:28 AM
Unknown Object (File)
Oct 2 2024, 6:26 PM
Unknown Object (File)
Oct 1 2024, 1:05 AM
Unknown Object (File)
Sep 28 2024, 5:21 PM
Unknown Object (File)
Sep 28 2024, 5:20 PM
Unknown Object (File)
Sep 28 2024, 3:32 PM
Unknown Object (File)
Sep 27 2024, 3:07 AM
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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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
302 ↗(On Diff #39888)

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
302 ↗(On Diff #39888)

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.