Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Mar 2017 12:13:30 +0000
From:      Andrew Gierth <andrew@tao11.riddles.org.uk>
To:        Mark Millard <markmi@dsl-only.net>
Cc:        Warner Losh <imp@bsdimp.com>, "freebsd-arm\@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: Is CPUTYPE=cortex-A7 supposed to work?
Message-ID:  <87fuipe460.fsf@news-spur.riddles.org.uk>
In-Reply-To: <3056BE0A-6441-4878-905D-741C61BDC47C@dsl-only.net> (Mark Millard's message of "Sun, 5 Mar 2017 20:26:49 -0800")
References:  <871suc3nv8.fsf@news-spur.riddles.org.uk> <CANCZdfq4EwH%2B_9FVNai8s6Y-gdTjHJ8dNkJwSrnF%2BSAkdwvYdg@mail.gmail.com> <87tw7820fc.fsf@news-spur.riddles.org.uk> <644D1F49-BF5D-409D-BFC4-4F7E6E73085B@dsl-only.net> <87lgsk1udz.fsf@news-spur.riddles.org.uk> <9677298B-5A5E-44BF-928E-28DDDADB310A@dsl-only.net> <87h93814rb.fsf@news-spur.riddles.org.uk> <70AE704A-C9FF-4742-88E9-147CD5B77BE8@dsl-only.net> <87tw77iwx6.fsf@news-spur.riddles.org.uk> <8760jnfvwp.fsf@news-spur.riddles.org.uk> <3056BE0A-6441-4878-905D-741C61BDC47C@dsl-only.net>

index | next in thread | previous in thread | raw e-mail

Bingo.

Signal delivery isn't preserving the NEON registers (at all, as far as I
can tell); if the signal handler changes any of them, those changes are
visible in the interrupted code.

If libthr is compiled with -mcpu=cortex-a7, then it uses NEON registers
for data copying in thr_sighandler, so obviously things go south at that
point. Equally bad things happen if the signal handler does any floating
point or vector work itself whether linked with libthr or not.

So it looks like this is a kernel bug after all, no?

Looking at arm/arm/machdep.c reveals a noticable absence of any attempt
to preserve the VFP state in sendsig(), contrary to what happens on
other platforms.

-- 
Andrew.


help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87fuipe460.fsf>