Subject: Re: Network Interface Cards
To: Jared D. McNeill <jmcneill@invisible.yi.org>
From: Andrew Gillham <gillham@vaultron.com>
List: port-i386
Date: 10/02/2000 17:21:38
Jared D. McNeill writes:
> I got it this far right now, but I'm almost 100% positive that I'm calling
> i386_set_ioperm wrong (is that even the equivalent of Linux's ioperm?)

This is probably completely "wrong", but:

#include <stdio.h>
#include <errno.h>
#include <sys/types.h>
#include <machine/sysarch.h>
#include <machine/pio.h>

main()
{
        int i;

        if (i386_iopl(3) != 0) {
                perror("i386_iopl");
                return;
        }

        i = inb(0x100);
        printf("inb: 0x%x\n", inb(0x100));

}

This definitely works.  It is not exactly the correct solution, but
for testing purposes...

-Andrew