delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/10/18/04:21:25

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3BCE8DE1.D7C1D4AD@syntrex.com>
Date: Thu, 18 Oct 2001 10:08:01 +0200
From: Pavel Tsekov <ptsekov AT syntrex DOT com>
Organization: Syntrex Inc.
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Christian Hirt <hirt AT mbox DOT ife DOT uni-hannover DOT de>
CC: cygwin AT cygwin DOT com
Subject: Re: Problems with _inpw / STATUS_PRIVILEGED_INSTRUCTION
References: <3BCE8920 DOT EE09CE8 AT mbox DOT ife DOT uni-hannover DOT de>

Only some of the assembler isntructions 
are allowed to be used in RING3 (User mode) 
on Windows platforms - these which are not
privileged instructions. Privileged instructions 
are allowed in RING0 (Kernel mode) only.

This is not a cygwin issue - it's windows. To
work the situation out, you should see how to
contact the driver of the device you're trying
to control and request the information from
it. Check MSDN for CreateFile.

Christian Hirt wrote:
> 
> Hi there!
> 
> I am porting C-sources for the control of an external device
> (CCD-camera) to
> cygwin. Unfortunately some problems appeared.
> 
> The executable file terminates with the message:
> 
> 1084 (0) handle_exeptions: STATUS_PRIVILEGED_INSTRUCTION
> 
> I have located the point where this exception appears:
> 
>  /* attempt to clear the trigger enable bit at the target address */
>   tmpval = INPW(base+0x008);
>   tmpval &= 0xffdf;                   /* clear trigger bit            */
> 
> INPW is defined as follows:
> 
> #define INPW(a)  (USHORT)_inpw ((USHORT)(a))
> 
> I would be very happy if anybody brings light on this problem.
> 
> Thank you very much,
> 
> Christian Hirt

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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