Page MenuHomeFreeBSD

Fix MIPS TLS support
AbandonedPublic

Authored by kan on Oct 9 2015, 3:46 AM.
Tags
Referenced Files
Unknown Object (File)
Sun, Nov 2, 7:35 PM
Unknown Object (File)
Sat, Nov 1, 6:00 AM
Unknown Object (File)
Sat, Nov 1, 12:59 AM
Unknown Object (File)
Sat, Nov 1, 12:59 AM
Unknown Object (File)
Fri, Oct 31, 8:21 PM
Unknown Object (File)
Sat, Oct 25, 4:23 PM
Unknown Object (File)
Oct 6 2025, 1:15 PM
Unknown Object (File)
Oct 6 2025, 12:49 PM
Subscribers

Details

Reviewers
emaste
sbruno
adrian
Group Reviewers
MIPS
Summary

Account for TLS_TP_OFFSET in thread pointer and for TLS_DTP_OFFSET
in dvp entries. This is identical to how powerpc lays out its
TLS, so shamelessly copy their code where appropriate.

Test Plan

qemu-mips-static env is able to build pkg now

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kan retitled this revision from to Fix MIPS TLS support.
kan updated this object.
kan edited the test plan for this revision. (Show Details)
kan added reviewers: MIPS, adrian, emaste.
kan set the repository for this revision to rS FreeBSD src repository - subversion.
kan added a project: MIPS.

The alternative approach of fixing sysarch(GET/SET_TLS) in qemu-bsd-user might be called for, pending confirmation from sbruno.
Our kernel does unnatural things in rdhwr emulation codem qemu-user might have to follow.

I am not sure our kernel is correct though, iff there is ever an straightforward hardware implementation of rdhwr, it will unlikely to do the same magic our kernel does.

adrian edited edge metadata.
This revision is now accepted and ready to land.Oct 9 2015, 4:52 AM
sbruno added a reviewer: sbruno.
sbruno added a subscriber: sbruno.

This fixes my ability to use unmodified qemu-user code to build mips/mips64 packages.

Fine with me, make sure to include Relnotes: YES and comment on ABI concerns in the commit message.

kan edited edge metadata.
kan removed rS FreeBSD src repository - subversion as the repository for this revision.

Updates diff to remove hdwr value fixup

This revision now requires review to proceed.Oct 10 2015, 9:20 PM

Abandon in favor of fix in qemu. Changing ABI is too heavy-handed.