First post, by superfury
According to the 80286 documentation, the LOCK prefix faults (#GP?) when IOPL<CPL, just like other privileged IOPL-based instructions.
But afaik, it's needed to perform locking for semaphores and mutexes on multiple CPU configurations? Thus a user-mode process needs to be able to use it?
Did it change with CPU generations or is it incorrectly documented for the 286?
https://www.scs.stanford.edu/05au-cs240c/lab/i386/s15_07.htm
Documents that it is sensitive, but the LOCK prefix documentation doesn't mention it's relation to IOPL? Or is it a 286 vs 386+ difference? What about NEC Vx0/186 and 808x processors? They probably allow it in any case.
Then what about the 286? Does it prevent LOCK (#GP fault) when used with IOPL<CPL?
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io