Date: Thu, 18 Mar 1999 11:53:58 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: "Clark L. Coleman" cc: djgpp AT delorie DOT com Subject: Re: Inline Assembler/CWSDPR0 (Privileged instructions) In-Reply-To: <7copjd$mp6$1@murdoch.acc.Virginia.EDU> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 17 Mar 1999, Clark L. Coleman wrote: > 1) Do I need to compile without debug info? It shouldn't matter. The debug info is a special portion of the executable file, and it only gets accessed by a debugger or `symify'. So it has no effect on how the program runs (or how it crashes ;-). > 2) Can you really execute instructions like WRMSR in your own code > just by using stubedit to force use of CWSDPR0.EXE, or is there more > to it than that? CWSDPR0 runs your program at ring 0. I don't know much about WRMSR and its constraints, but if all it requires is a ring-0 program, then CWSDPR0 should be enough. Note that you need to stubedit your program each time you link it, since the linking prepends the default stub. The easiest way to do this is to make the stubedit step part of your Makefile (assuming you have one). > Instead, it raises a fault, which is > what I would expect when you try to execute a privileged instruction > (WRMSR) in User Mode, leading me to think that the stubedit was not > sufficient to permit executing this inline assembly. Please always post the full symified traceback and the register dump printed when the program crashes. There's some valuable info there that people here could use to help you.