On Mon, 5 May 2025, Marcus Glocker wrote: > On Sun, May 04, 2025 at 05:57:56PM -0700, guent...@openbsd.org wrote: > > On Sun, 4 May 2025, Marcus Glocker wrote: > > > On Sun, May 04, 2025 at 09:36:48AM GMT, Marcus Glocker wrote: ... > > > Anyway, would it be sensible to clear the DR7 register during boot in > > > general to salvage machines like this one? > > > > Yes, but not just boot: we should also reset them when coming out > > of S3/S4 suspend. > > > > My previous diff made an incorrect stab at settings the BLD bit in > > %dr6, per recommendation in the SDM. If/when someone implements > > bus lock detection support they can fix up this ASM to support that; > > no point in doing in now. > > > > The latter two chunks add cpufunc.h wrappers for reading %dr[67] > > to make the trap.c bit nice. > > > > If this works for your box, Marcus, I think this is ready to go it. > > Your diff looks good to me (I did pretty much the same one for locore0.S > yesterday for testing), and works fine on the MacPro6,1. > > I also did a quick zzz regression test for the acpi_wakecode.S part on > my X1 and Go4, without issues. > > One very small comment inline. Other than that, ok mglocker@ ... > Do we also need to take care about i386?
Eh, if it hasn't been a problem so far... (I don't have a sane i386 box right now) > > --- amd64/locore0.S 4 Oct 2024 21:15:52 -0000 1.26 > > +++ amd64/locore0.S 4 May 2025 23:08:02 -0000 > > @@ -193,7 +193,12 @@ bi_size_ok: > > pushl $PSL_MBO > > popfl > > > > - xorl %eax,%eax > > + /* Reset debug control registers */ > > + xorl %eax,%eax > > + movl %eax,%dr6 > > + movl %eax,%dr7 > > I think we should use tabs for spacing here as well. Fixed before commit. Philip