Newbie question about accessing memory in kernel space
Niklaus Giger
niklaus.giger at member.fsf.org
Wed May 25 21:31:22 EST 2005
Am Dienstag, 24. Mai 2005 22.31 schrieb Matt Porter:
> On Tue, May 24, 2005 at 09:19:28PM +0200, Niklaus Giger wrote:
> > Hi
> > Oops: kernel access of bad area, sig: 11 [#1]
>
> <snip>
>
> > What is wrong with my code?
>
> You mapped the device into user virtual address space. The TLB
> replacement code is unable to load a TLB entry for a page outside
> of kernel space...so you crash.
>
> Don't use io_block_map()...it allows you to shoot yourself in the
> foot very easily (as you just witnessed). Use ioremap() to map
> your device.
ioremap() fixed my problem.
Thanks a lot for your help.
Best regards
Niklaus
More information about the Linuxppc-embedded
mailing list