Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Nov 2003 13:39:08 +0100
From:      Jilles Tjoelker <jilles@stack.nl>
To:        John <strgout@unixjunkie.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: pge.c, its a power thing!
Message-ID:  <20031118123907.GA98199@stack.nl>
In-Reply-To: <20031118074508.GA74626@mail.unixjunkie.com>
References:  <20031118074508.GA74626@mail.unixjunkie.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 18, 2003 at 01:45:08AM -0600, John wrote:
> Sooo.. is there any chance someone could take a look at this

> http://www.seanadams.com/pge/pge.c

> and tell me what needs to be done to port this, or maybe just
> give me some pointers so i can spend the next year working on
> this? :)
> I think the big problem (well for me) will be converting this 
> from asm/io.h to something else. maybe ppi?

ppi would be more clean, but you can do it the same dirty way under
FreeBSD as well. Use i386_set_ioperm() instead of ioperm(). See the
manpage, although I think the arguments are the same. Use
<machine/cpufunc.h> instead of <asm/io.h> (ignore the comment about
<sys/systm.h>, that's a kernel-only include file).

Ignore the setuid crap in the webpage, of course. Just start it as root
(that could be fixed if you used ppi).

Be warned that I haven't tested any of this.

-- 
Jilles Tjoelker



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031118123907.GA98199>