Re: arm64 mrs and system registers

From: Warner Losh <imp_at_bsdimp.com>
Date: Mon, 08 Apr 2024 21:18:25 UTC
Forget everything i said. I got this confused with a different bug. Sorry
about that.


Warner

On Mon, Apr 8, 2024, 3:03 PM Paul Floyd <pjfloyd@wanadoo.fr> wrote:

>
>
> On 8 Apr 2024, at 22:31, Warner Losh <imp@bsdimp.com> wrote:
>
>
>
> On Mon, Apr 8, 2024 at 9:03 PM Paul Floyd <pjfloyd@wanadoo.fr> wrote:
>
>> Hi
>>
>> I've been looking at this bugzilla item
>>
>> https://bugs.kde.org/show_bug.cgi?id=392146
>>
>> Is there any difference between Linux and FreeBSD when it comes to what
>> registers and fields are exposed by the kernel (see comment 17 in the
>> link above).
>>
>
> I don't think so. We've not seen issues with other drivers on aarch64
> except
> when they were written on x86 and didn't have the synchronization needed
> for the weaker memory models in aarch64 systems.
>
>
>> I did have a poke around the kernel code but it's a bit hard to tell
>> exactly which of the access macros are being used, without exhaustively
>> grepping for them one by one.
>>
>
> Yea, I think that there's missing atomics on the state transitions and/or
> some missing locking that "magically" provides barriers that make it work
> on x86.
>
>
> Hi
>
> There aren’t any memory issues.
>
> The problem is that the opcodes aren’t fully covered. There are 3 aspects
> to that
> 1. What the kernel exposes
> 2. What Valgrind implements (usually a subset of point 1 but it should
> claim things that the kernel doesn’t support).
> 3. Actually handling the opcode.
>
> If Linux and FreeBSD expose the same things then I can go ahead with
> looking at a common solution.
>
>
> A+
> Paul
>
>