delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/03/28/13:16:45

From: clc5q AT cobra DOT cs DOT Virginia DOT EDU (Clark L. Coleman)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: CWSDPMR0: system crash on INVD
Date: 28 Mar 2001 18:03:41 GMT
Organization: University of Virginia
Lines: 28
Message-ID: <99t91t$rgg$1@murdoch.acc.Virginia.EDU>
References: <99t5g6$m5r$1 AT murdoch DOT acc DOT Virginia DOT EDU> <99t7j4$7ce$1 AT node17 DOT cwnet DOT frontiernet DOT net>
NNTP-Posting-Host: cobra.cs.virginia.edu
X-Trace: murdoch.acc.Virginia.EDU 985802621 28176 128.143.137.16 (28 Mar 2001 18:03:41 GMT)
X-Complaints-To: abuse AT virginia DOT edu
NNTP-Posting-Date: 28 Mar 2001 18:03:41 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019