From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by sourceware.org (Postfix) with ESMTPS id 473E73858C60 for ; Thu, 2 Feb 2023 11:07:19 +0000 (GMT) Authentication-Results: sourceware.org; dmarc=permerror header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=cygwin.com Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N7zJj-1oaGYw3XZD-014zjl for ; Thu, 02 Feb 2023 12:07:17 +0100 Received: by calimero.vinschen.de (Postfix, from userid 500) id C97B0A80B94; Thu, 2 Feb 2023 12:07:16 +0100 (CET) Date: Thu, 2 Feb 2023 12:07:16 +0100 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: ioperm / iopl / pciutils Message-ID: Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Provags-ID: V03:K1:4QU4NQQP2aLpCJ1kH1znYvrft2VX9KVA9YEeXy+7zfL0b+ugtEQ r0XuB6LVvhdRYJFBDxOWxjoOYTOZS/YSC1MmsEQlwFwDaP7JkamuYoUWvqmBYUGdcoXzE05 DBFuk0hLOPonWvVYbHiNy8NiTBne08YaK/aNwPy0ZEVSrS7W0C0q710jpRT2anYKsVdh32u tSq9QvaTFoMhCL3gIWRuA== UI-OutboundReport: notjunk:1;M01:P0:iCbKYvaHiUw=;rW/N6LtkUm+QxCYb1Wi/8xDo2wd BP7fdkqPO8EFqN91GuIdPy95fm6MI9UoNooJRuw2GtB0uh5wiODHtxHyocA9gyO0D29N2ZnoZ prsGOfYGePk4wm8Z3ymZdJia5edDZxu+gV13QsTQHQ7TD8HsBxPf7WrrEdtgOF6E6iFzwsEpF ubNtZJ80tb5rO5jxCpzaq7lqZDtNRRWyBKRP8AKRrdwZpwY9PGUsTMP/35A070bBfgh5sjeNq t7U266xkNZb/oIChXQ1j59qhclVCSXvzgO1K63LO8uidgm4sij0eRyU1YMLalvj/3OWZa/t7H 8a9xO+qHcJ8nD9zLmldeHVcjcpLSb2n1PHDwXhr+5lq4YJAaJM2K4+1vEc3QdsUpKgnTCgvyD cAcGcadpSua7J45sU785nz3wE0U1dTAbBmGvKdNdVcfecD46vN/YFJiLcH7b1m9y5U3N6FiLG LdGwKy9s+xks24rNA3u4wlSxmeEn4QmJ2KILsLQHwZIBnNNkhjfFYe2dODlvEJxTACzw+eAsP lPr24CJoKTmHZ0M3Lcrgpa1b85MLefTo7iQUig/fb4PWeoPvt6HVmKSJyZY1yvaA36/UYe30q 5ngx6w21/vfVJAisPHSTQvfBjI7xeBNNYoXV2LC5wNWI7df9vbcTqir8WCSa+ZsmdjodFDTFX wqhmMv6bam4YvIVGeNeVcn9Ha+jm/d3bOcucON6PnA== X-Spam-Status: No, score=-95.7 required=5.0 tests=BAYES_00,BODY_8BITS,GOOD_FROM_CORINNA_CYGWIN,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_FAIL,SPF_HELO_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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