[Gllug] Virtual memory error in driver

James Courtier-Dutton james.dutton at gmail.com
Tue Jul 26 11:53:18 UTC 2011

On 26 July 2011 12:37,  <salsaman at xs4all.nl> wrote:
> On Tue, July 26, 2011 11:02, James Courtier-Dutton wrote:
>> On 25 July 2011 22:14,  <salsaman at xs4all.nl> wrote:
>>> Hi all,
>>> I am trying to write a driver to read the values of some peripheral. The
>>> first step is to set the direction of the pins to read, the code is
>>> something like:
>>> unit8_t *address = 0x01e26088;
>>> memset(address, 0xFF, 1);
>>> however when I load the module with this code, I get an error:
>>> Unable to handle kernel paging request at virtual address 01e26088
>> Where are you getting 0x01e26088 from?
> It's from the data sheet, the pin direction register for the device.
> Salsaman.

Do you have a url where I could download the datasheet?
What sort of platform is this? Is it Linux on x86?

If it is a PCI device, that address will be relative to the PCI
assigned resources range.
The first thing your driver will have to do is "claim" the PCI resources.
As an example look in the Linux kernel for:
ca0106_main.c   (I wrote it)


Once your driver has claimed the PCI resources, it can then write to them.
Gllug mailing list  -  Gllug at gllug.org.uk

More information about the GLLUG mailing list