Page MenuHomeFreeBSD

kinst/arm64: Handle an additional PC-relative instruction
AcceptedPublic

Authored by markj on Wed, May 13, 4:04 PM.
Tags
None
Referenced Files
F156907495: D56988.id177786.diff
Sun, May 17, 6:37 AM
Unknown Object (File)
Sat, May 16, 7:45 AM
Unknown Object (File)
Thu, May 14, 7:56 PM
Subscribers

Details

Reviewers
christos
andrew
Group Reviewers
DTrace
arm64
Summary

"ldr <reg>, <literal>" loads a value from a literal memory address into
a register. It's PC-relative and so cannot be directly implemented
using the trampoline mechanism. Unfortunately, on arm64 it can't easily
be emulated either since the return-to-EL1 handler does not restore
callee-saved registers, so like adr/adrp, we simply don't handle it.
These instructions are fairly rare in an arm64 kernel.

While here, refactor the code so that all instruction decoding is done
in one place: introduce an enum type which characterizes the instruction
type, add a helper to map instructions to enum values, and store the
corresponding enum value in the probe description.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 73076
Build 69959: arc lint + arc unit

Event Timeline

markj requested review of this revision.Wed, May 13, 4:04 PM

Are there any updates we should do in D40874?

This revision is now accepted and ready to land.Thu, May 14, 2:34 PM

Are there any updates we should do in D40874?

You might mention that we don't trace ldr <literal> on arm64, same as adr/adrp.