Re: Memory access

From: Richard B. Johnson (root@chaos.analogic.com)
Date: Tue Jul 03 2001 - 09:57:28 EST


On Tue, 3 Jul 2001, [iso-8859-1] Guillaume Lancelin wrote:

> Writing a device driver for a IO card, I have the following message from
> the kernel:
> Unable to handle kernel paging request at virtual address 000d0804.
> [then it gives the register values]
> Segmentation fault."
>
> This address (0xd0804) is the location of a "mailbox" reserved by the IO
> card, and from which commands are passed to the card.
>
> My question: is the kernel using or protecting this area of the memory,
> and is there a way to deprotect it??? (how dangerous!)
>

This is not the correct address!! The addresses in the kernel are
virtual addresses, you need to execute ioremap(0xd0804, LENGTH) to
get the correct virtual address for access.

Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

    I was going to compile a list of innovations that could be
    attributed to Microsoft. Once I realized that Ctrl-Alt-Del
    was handled in the BIOS, I found that there aren't any.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jul 07 2001 - 21:00:12 EST