FreeBSD and FRED

Konstantin Belousov <[email protected]> Thu, 5 Mar 2026 07:04:48 +0200
Newsgroups gmane.os.freebsd.devel.amd64
Message-ID <[email protected]>
Hello,
As you might now, there is an effort to modernize the system-level of
amd64 architecture. In particular, the somewhat baroque way for the
interrupts, exceptions, and syscalls report by hardware, was the source
of many bugs in many operating systems on amd64, to the level of CVEs.
That was all mostly due to the IRETQ instruction raising unexpected
exceptions (for OS developers), for the subtle difference in the IRETQ
behaviour between vendors, for the machine state having wrong tlsbase
on such exception, for unexpected debugging tracing inherited by the
kernel mode after the switch from userspace, and many more.

The new architecture for the exceptions and interrupts, proposed by Intel,
is called FRED.  It was recently supported by AMD.  Intel included the FRED
definition into the latest edition of the SDM rev. 90, published in Feb 2026.
The architecture is indeed quite clean, it eliminates all knows quirks
in the events delivery mechanism.  Also due to the regular structure of
the system data for event delivery it can be easily handled in common
code, which can be done in C.

I do not believe that there is any hardware that can be commerically bougth
with the FRED support right now.  Still, Linux already supports FRED, and
inclusion into the SDM makes it the commitment from the CPU vendors.

On my working branch fred there are initial patches that at least allow
to boot single-user in simics with FRED enabled. A lot of work is needed
yet to bring the patches into the final form, but at least the initial
bring-up passed.

This message is mostly a FYI, to provide some view on the FreeBSD relations
to this cross-vendor efforts.

The work is sponsored by The FreeBSD Foundation.