Messages in this thread | | | From | "Ingles, Raymond" <> | Subject | RE: Okay, I give up. How *do* you use ioremap()? | Date | Sun, 14 Nov 1999 15:27:12 -0500 |
| |
From: Ingo Molnar
>On Sun, 14 Nov 1999, Ingles, Raymond wrote:
>> info->mem_base = ioremap(info->reg_base, >> JS_PCI_VORTEX_MEM_SIZE); >> regval = readl(info->mem_base + >> JS_PCI_VORTEX2_LEGACY_CR);
>> joy-pci: reg_base 1: de000000 >> joy-pci: using reg_base of de000000 >> joy-pci: ioremapped, mem_base is c806b000 >> Unable to handle kernel paging request at virtual address c8113030
>it looks like as if JS_PCI_VORTEX2_LEGACY_CR is overflowing above the >mapped area. Is JS_PCI_VORTEX_MEM_SIZE big enough, and is >JS_PCI_VORTEX2_LEGACY_CR correct?
You know, that's actually weird. MEM_SIZE is 0x40000 (262144 bytes), and LEGACY_CR is 0x2a00c. So that shouldn't be a problem. But where on earth is it getting that address? I mean, unless I messed up my math, 0xc806b000 + 0x2a00c = 0xc809500c, not 0xc8113030! That would be, uh, a 0xb8030 offset, which, would be past 0x40000. I swear the code I posted is what I ran, honest. Where's the address coming from?
I'm going to go add some more printk's, and see if hexadecimal math is distorted in my region of space or what. I really don't think I'm stomping on my own data anywhere, and I can't see *how* I could just in that short stretch of code. :-/ Sincerely,
Ray Ingles (248) 377-7735 ray.ingles@fanucrobotics.com
"One of the main reasons for the downfall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs." - Robert Firth
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |