63 ms·
A quick search shows that LOADALL can only be run from ring 0, so the same might be true for STOREALL. So ring 0 kernel could use STOREALL to return to real mod
by TapamN 4y ago
A quick search shows that LOADALL can only be run from ring 0, so the same might be true for STOREALL. So ring 0 kernel could use STOREALL to return to real mode, but ring 3 user code would probably get an illegal instruction trap.
- rep_lodsb 4y ago(author here) As mentioned in the post, LOAD/STOREALL only run in ring 0. Also you can't use it to return to real mode except from code running in ICE address space, which isn't accessible except on the special bond-out chip version. What you can do with STOREALL - with the F1 prefix - is store a bunch of internal registers to memory and then have an external chip (such as the AT keyboard controller) reset the CPU. Intel for some unknown reason tried really hard to make it impossible to exit protected mode!