public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: ioperm / iopl / pciutils
Date: Thu, 2 Feb 2023 12:07:16 +0100	[thread overview]
Message-ID: <Y9uZZHAU7ai+wQba@calimero.vinschen.de> (raw)
In-Reply-To: <trfpdc$2j2$1@ciao.gmane.io>

On Feb  2 08:40, Franz Fehringer via Cygwin wrote:
> Am 02.02.2023 um 08:33 schrieb Franz Fehringer via Cygwin:
> > Am 31.01.2023 um 10:27 schrieb Corinna Vinschen via Cygwin:
> > > On Jan 29 18:22, Franz Fehringer via Cygwin wrote:
> > > > Hi all,
> > > > 
> > > > Is there any Cygwin package providing the iopl et al. routines?
> > > > Google uncovers an ioperm package but that seems to be nothing current.
> > > > My goal is to compile https://github.com/pciutils/pciutils with Cygwin.
> > > 
> > > Cygwin doesn't have any Linux-like or POSIX-like API (device names,
> > > ioctl's and whatnot) to access PCI directly.
> > > 
> > > 
> > > Corinna
> > > 
> > 
> > On https://github.com/pciutils/pciutils the claim is
> > 
> > In runs on the following systems:
> >      Linux        (via /sys/bus/pci, /proc/bus/pci or i386 ports)
> > 
> > and http://ftp.uni-kl.de/pub/windows/cygwin/release/ioperm/setup.hint says
> > 
> > # $Id: setup.hint,v 1.4 2003/01/31 14:58:56 telka Exp $
> > 
> > sdesc: "support for ioperm()/iopl() functions"
> > ldesc: "This package adds support for ioperm()/iopl() functions to Cygwin.
> > This support includes sys/io.h and sys/perm.h header files together
> > with development and runtime libraries."
> > category: Devel Libs System
> > requires: cygwin libpopt0
> > 
> > So there possibly was once iopl support?

I was just trying to say that Cygwin itself (i. e., the core DLL) does
not provide any such calls or headers.

> Just guessing this was possibly 32bit only.

Very likely.  Looks like we never had an ioperm package for 64 bit, and
that makes sense.  You'd have to build the ioperm package by yourself
for 64 bit, and you'll have a few problems there.

- Checking the package for type safety.  Think LP64 vs. LLP64
  https://cygwin.com/faq.html#faq.programming.64bitporting

- The ioperm package can only provide these calls by installing
  a kernel driver (see the source, driver subdir).

- This driver may or may not work on 64 bit, but if it works,
  you can only install it by switching your machine into
  debug mode:
  https://learn.microsoft.com/en-us/windows-hardware/drivers/install/installing-an-unsigned-driver-during-development-and-test

- For normal operations you have to sign the driver.  Self-signed
  drivers won't run on any machine with UEFI secure boot enabled.
  Alternatively you can let Microsoft sign it.  Only that version
  would be ok for inclusion into the Cygwin distro.

- Alternatively you can try to convert the ioperm driver into an
  UMDF driver.  Some kernel functionality is not allowed for UMDF
  drivers, but I never looked deeper into this.


Corinna

      reply	other threads:[~2023-02-02 11:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-29 17:22 Franz Fehringer
2023-01-30  2:35 ` Eliot Moss
2023-01-30  7:09   ` Franz Fehringer
2023-01-31  9:27 ` Corinna Vinschen
2023-02-01 19:31   ` Franz Fehringer
2023-02-02  7:33   ` Franz Fehringer
2023-02-02  7:40     ` Franz Fehringer
2023-02-02 11:07       ` Corinna Vinschen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y9uZZHAU7ai+wQba@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).