[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rtl] I/O ports beyond 0x3FF
> In order to obtain access to the I/O port beyond 0x3FF I belive I have
> to call the "iopl" Linux funcion.
> I am able to compile the modules, but I can't load them into the kernel.
>
> Can anyone explain me why can_t I load any RTLinux modules containig th
> "iopl" Linux function?
iopl is a function to set permissions on an already mapped memory region.
The kernel module does not need to get these perms set since its request
are done by the privileged root-user.
So for a PCI card either you need to use
* check_region,request_region and releas_region + inb/oub inw/outw etc.
* or you need to use ioremap and grab the memory slot for your device and
then access it with readb/writeb etc.
in your kernel module. The base address needed for these operations you
should find in the pci_dev structure of that card.
now that the IO-map is set up a user-space program with the necessary
privileges can request to access that memory area with iopl. So I don't
think you want iopl in a kernel-module.
hofrat