[Gllug] Virtual memory error in driver

salsaman at xs4all.nl salsaman at xs4all.nl
Mon Jul 25 21:14:56 UTC 2011


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

Thinking the address may have been remapped, my second attempt was like this:

  page *mempage;
  void *page_addr;

  mempage = virt_to_page(0x01e26000);
  page_addr = kmap(mempage);

  memset(page_addr + 0x88,0xFF,1);

  kunmap(mempage);


but again I got exactly the same error.


Can anybody advise me how to do this correctly ?


TIA,
Salsaman.

--
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list