On Thu, 26 Feb 2015, Miod Vallat wrote: > Please try the following revert diff. It works for me on that particular > non-ioapic system with yds(4).
I don't have a system to test this, but I suspect this diff will fix the problem: the i386_space_copy() macro can set the direction flag but doesn't clear it then, so functions using this macro can violate the ABI by returning with the direction flag set. Philip Index: include/bus.h =================================================================== RCS file: /data/src/openbsd/src/sys/arch/i386/include/bus.h,v retrieving revision 1.65 diff -u -p -r1.65 bus.h --- include/bus.h 24 Jan 2015 15:13:55 -0000 1.65 +++ include/bus.h 27 Feb 2015 07:19:52 -0000 @@ -458,6 +458,7 @@ struct i386_bus_space_ops { case 2: i386_space_copy1(a1,a2,cnt,"movsw","std");break;\ case 4: i386_space_copy1(a1,a2,cnt,"movsl","std");break;\ } \ + __asm volatile("cld"); /* must restore before func ret */ \ } else \ switch (sz) { \ case 1: i386_space_copy1(a1,a2,cnt,"movsb","cld");break;\