Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jul 2026 10:55:45 +0100
From:      Jessica Clarke <jrtc27@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Konstantin Belousov <kib@FreeBSD.org>, "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org>
Subject:   Re: git: 6e93f5e4d693 - main - amd64: FRED support
Message-ID:  <A2F0F120-DFAE-4E4B-9EDD-B307F51C3ED1@freebsd.org>
In-Reply-To: <0c99064d-9ada-4ed9-800e-a0cae178f6c8@FreeBSD.org>
References:  <6a5e986a.22164.2ca88691@gitrepo.freebsd.org> <0c99064d-9ada-4ed9-800e-a0cae178f6c8@FreeBSD.org>

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

On 29 Jul 2026, at 21:44, John Baldwin <jhb@freebsd.org> wrote:
> 
> On 7/20/26 17:51, Konstantin Belousov wrote:
>> The branch main has been updated by kib:
>> URL: https://cgit.FreeBSD.org/src/commit/?id=6e93f5e4d6932c423b89dff8fc08d86f8bdeb7b9
>> commit 6e93f5e4d6932c423b89dff8fc08d86f8bdeb7b9
>> Author:     Konstantin Belousov <kib@FreeBSD.org>
>> AuthorDate: 2026-02-13 11:24:40 +0000
>> Commit:     Konstantin Belousov <kib@FreeBSD.org>
>> CommitDate: 2026-07-20 21:51:02 +0000
>>     amd64: FRED support
>>          FRED support as defined starting from the SDM rev. 90, requires a new
>>     'events' entry point to receive user and kernel mode exceptions and
>>     interrupts notifications from the hardware.  A minimal asm trampoline is
>>     enough, rest can be implemented in C due to the clean FRED organization
>>     of the event reporting.
>>          The syscall entry is handled by a microptimized assembly path, directly
>>     calling into the amd64_syscall() handler, instead of the generic events
>>     entry point.
>>          Tested by:      emaste
>>     Sponsored by:   The FreeBSD Foundation
>>     MFC after:      1 week
>>     Differential revision:  https://reviews.freebsd.org/D55829
> 
> This appears to have broken the cross-build jobs on GitHub for the past week
> which build with clang 15 and clang 18.  Are those versions too old to support
> the instructions used here?
> 
> Sample output:
> 
> --------------------------------------------------------------
>>>> stage 3.1: building everything
> --------------------------------------------------------------
> /home/runner/work/freebsd-src/freebsd-src/sys/amd64/amd64/exception.S:1455:2: error: invalid instruction mnemonic 'eretu'
> eretu
> ^~~~~
> /home/runner/work/freebsd-src/freebsd-src/sys/amd64/amd64/exception.S:1521:2: error: invalid instruction mnemonic 'lkgs'
> lkgs %ax
> ^~~~
> /home/runner/work/freebsd-src/freebsd-src/sys/amd64/amd64/exception.S:1542:2: error: invalid instruction mnemonic 'eretu'
> eretu
> ^~~~~
> /home/runner/work/freebsd-src/freebsd-src/sys/amd64/amd64/exception.S:1662:2: error: invalid instruction mnemonic 'erets'
> erets
> ^~~~~
> /home/runner/work/freebsd-src/freebsd-src/sys/amd64/amd64/exception.S:1682:2: error: invalid instruction mnemonic 'erets'
> erets
> ^~~~~
> --- exception.o ---
> *** [exception.o] Error code 1
> 
> (Or maybe clang needs some -m<foo> or .set <foo> to enable use of these instructions?)

LLVM 19+: https://github.com/llvm/llvm-project/commit/13b265c7b5c6a989427639e33893c158f737480b

So we need compatibility defines or similar.

Jessica



home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A2F0F120-DFAE-4E4B-9EDD-B307F51C3ED1>