Date: Sun, 22 Mar 2026 11:06:28 +0100 From: A FreeBSD User <freebsd@walstatt-de.de> To: Konstantin Belousov <kib@FreeBSD.org> Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 1ba29614c4ce - main - amd64: revert back struct trapframe to the pre-FRED definition Message-ID: <20260322110655.5166a078@thor.sb211.local> In-Reply-To: <69bf1dbc.27145.5b461258@gitrepo.freebsd.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] Am Tage des Herren Sat, 21 Mar 2026 22:37:48 +0000 Konstantin Belousov <kib@FreeBSD.org> schrieb: > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=1ba29614c4ce5e261ade0bd7def94079b7b9647a > > commit 1ba29614c4ce5e261ade0bd7def94079b7b9647a > Author: Konstantin Belousov <kib@FreeBSD.org> > AuthorDate: 2026-03-21 22:26:48 +0000 > Commit: Konstantin Belousov <kib@FreeBSD.org> > CommitDate: 2026-03-21 22:37:27 +0000 > > amd64: revert back struct trapframe to the pre-FRED definition > > Trying to use the grown struct trapframe for IDT case broke in cases > where code supposed that hardware consumed sizeof(struct trapframe) of > the stack space when delivering interrupt or exception. In particular, > this was broken for #NM/#DB/#MC. Naive attempt of using IDT-trapframe > size for stack consumption caused later problems with larger C type. > > Instead of pretending that IDT event delivery pushed two never-accessed > doubleword to the stack, keep it honest and provide separate type for > the FRED interrupt frame, i.e. struct trapframe_fred. > > Convert between trapframe_fred and trapframe can be done by trivial pointer > arithmetic. > > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > --- > sys/x86/include/frame.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/sys/x86/include/frame.h b/sys/x86/include/frame.h > index a6444d55cfaf..b8e090ff95d0 100644 > --- a/sys/x86/include/frame.h > +++ b/sys/x86/include/frame.h > @@ -152,6 +152,10 @@ struct trapframe { > uint16_t tf_ss; > uint16_t tf_fred_evinfo1; > uint32_t tf_fred_evinfo2; > +}; > + > +struct trapframe_fred { > + struct trapframe tf_idt; > /* two long words added by FRED */ > uint64_t tf_fred_evdata; > uint64_t tf_fred_zero1; > ... this fixes in my case mentioned freezing/rebooting issues. Thank you very much. Kind regards oh -- A FreeBSD user [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRQheDybVktG5eW/1Kxzvs8OqokrwUCab+/PwAKCRCxzvs8Oqok r7VNAP0Zr3nZdL49iR5uDP2S2JT3FZLrf88AHwC7IkLq6r1+eQEA48rdin65dN7m zr8qanU+e4OHLP5Uogx+uNGqx92iOwg= =Vqpx -----END PGP SIGNATURE-----home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20260322110655.5166a078>
