Mail Archives: djgpp/2001/03/28/13:16:45
In article <99t7j4$7ce$1 AT node17 DOT cwnet DOT frontiernet DOT net>,
Alexei A. Frounze <dummy_addressee AT hotmail DOT com> wrote:
>"Clark L. Coleman" <clc5q AT cobra DOT cs DOT Virginia DOT EDU> wrote in message
>news:99t5g6$m5r$1 AT murdoch DOT acc DOT Virginia DOT EDU...
>>
>> When using the CWSDPR0.EXE (via stubedit), there is a privileged
>> instruction that still crashes my machine: "invd", which invalidates
>> the caches but does not write back dirty lines to main memory (i.e. is
>> used only when coherency is not an issue.) Switching to the "wbinvd"
>> instruction gets rid of the problem.
>>
>> I.e.:
>>
>> __asm__ __volatile__ ("invd");
>>
>> from within my C code causes a DOS crash and reboot.
>
>INVD is a PL#0 instruction and must be invoked only by a OS software, not
>user applications.
I thought that was what CWSDPR0.EXE was all about -- providing access
to such instructions. I execute numerous other such instructions using
that facility, including WBINVD (which I mentioned in my post as a
substitute for INVD that works with no problems), along with WRMSR.
The "R0" in CWSDPR0.EXE stands for "Ring 0", i.e. privilege level 0.
Clark Coleman
- Raw text -