+link:https://www.intel.com/content/www/us/en/content-details/819481/flexible-return-and-event-delivery-fred-specification.html[Intel FRED specification before SDM] URL: link:https://www.intel.com/content/www/us/en/content-details/819481/flexible-return-and-event-delivery-fred-specification.html[]
++ link:https://reviews.freebsd.org/D55829[D55829 amd64: FRED support] URL: link:https://reviews.freebsd.org/D55829[]
+
+Contact: Konstantin Belousov <kib@FreeBSD.org>
+
+Support for FRED AKA Flexible Return and Event Delivery feature of the very modern amd64 platform was implemented.
+FRED is the complete revamp of the hardware interface to report exceptions, interrupts, and system calls to the operating system, and the way operating system returns control from the handler to the interrupted code.
+The goal for designing FRED was to get rid of the layers of compatibility features and bugs that accumulated in the existing way, let us call it IDT based event delivery.
+
+FRED specification is now included into the Intel SDM revision 90.
+AMD seems to be committed to provide FRED on some future implementations.
+
+As such, FRED support requires the new code path for event handlers.
+The nice structuring of the FRED allows to have minimal assembly trampolines there, moving most of the dispatch to the C code.
+
+The implementation of the FRED handler was relatively simple, and required much less time than I initially thought.
+It shows how good and natural the proposed interface is.
+
+The testing so far was only done on the Simics emulator.
+FRED should be supported by the newly released Intel Panther Lake CPUs, but I do not have access to the real hardware.