Page MenuHomeFreeBSD

gcore: Add aarch64 32-bit core support
ClosedPublic

Authored by jhibbits on Tue, Oct 8, 9:30 PM.

Details

Summary

Add trivial 32-bit arm cores on aarch64 support for gcore. This doesn't handle fpregs.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jhibbits created this revision.Tue, Oct 8, 9:30 PM
stevek added a subscriber: stevek.Tue, Oct 8, 9:32 PM
jhibbits retitled this revision from gcore: Add aarch64 support to gcore: Add aarch64 32-bit core support.Tue, Oct 8, 9:33 PM
jhibbits edited the summary of this revision. (Show Details)
andrew added inline comments.Wed, Oct 9, 8:42 AM
usr.bin/gcore/elf32core.c
40 ↗(On Diff #63057)

I think you want to use rs->x[13] here. The comment in fill_regs32 in sys/arm64/arm64/machdep.c is useful: /* For arm32, SP is r13 and LR is r14 */

You probably also want to set r_lr to rs->x14.

jhibbits updated this revision to Diff 63082.Wed, Oct 9, 3:43 PM

Address andrew's feedback. Thanks!

emaste added inline comments.Wed, Oct 9, 4:46 PM
usr.bin/gcore/Makefile
8 ↗(On Diff #63082)

my usual pedantic comment, keep these sorts of additions in alpha order :)

usr.bin/gcore/elf32core.c
55 ↗(On Diff #63082)

fwiw we've used ARM64TODO in the past

jhibbits updated this revision to Diff 63089.Wed, Oct 9, 5:26 PM

Address @emaste's comments

andrew accepted this revision.Fri, Oct 11, 7:27 AM
This revision is now accepted and ready to land.Fri, Oct 11, 7:27 AM
This revision was automatically updated to reflect the committed changes.