Date: Thu, 31 May 2007 08:44:33 +0400 From: Eygene Ryabinkin <rea-fbsd@codelabs.ru> To: Mike Meyer <mwm-keyword-freebsdhackers2.e313df@mired.org> Cc: rmgls@wanadoo.fr, freebsd-hackers@freebsd.org Subject: Re: direct I/O access Message-ID: <20070531044432.GC35160@void.codelabs.ru> In-Reply-To: <18013.7419.355416.25585@bhuda.mired.org> References: <20070529181027.65AD5700009C@mwinf2454.orange.fr> <18013.7419.355416.25585@bhuda.mired.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Mike, good day. Wed, May 30, 2007 at 02:43:07AM -0400, Mike Meyer wrote: > I believe this should be $0x4, as you want to *set* the values, not > get them. Right. > You also need to open the file "/dev/io". I believe that leaving this > file open for anything more than a handful of instructions would be a > bad thing, but I'm not going to verify it. I feel that the i386_set_ioperm directly manipulates the task's I/O bitmap referenced by the task state segment (TSS), so you don't need to mangle with /dev/io. /dev/io itself is the higher-level semi machine-indenepdent abstraction. Opening /dev/io grants the global access to all ports, while using i386_set_ioperm gives the fine-grained access. When you closing /dev/io, the port I/O access is revoked. To summarise: either you open /dev/io and do all your port I/O as in the good old days of the real-mode programs, or you're using i386_set_ioperm to obtain the access permissions to the I/O port range and again, do all port I/O as usual. -- Eygene
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070531044432.GC35160>