Re: pge.c, its a power thing!

[ Available lists | Index of freebsd-hackers | Month of Nov 2003 | Week of 18 Nov 2003 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Jilles Tjoelker <jilles@stack.nl>
Date
18 Nov 2003 04:39:10
Subject
Re: pge.c, its a power thing!
Message-ID
20031118123907.GA98199@stack.nl

In reply to
References to

[ Hide this part ]
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


Elapsed time: 0.109 seconds