Messages in this thread | | | Date | Mon, 15 Nov 1999 00:15:24 +0100 | From | Andreas Bombe <> | Subject | Re: Okay, I give up. How *do* you use ioremap()? |
| |
On Sun, Nov 14, 1999 at 10:49:10PM +0100, Ingo Molnar wrote: > > 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 > > (Maybe mem_base is not 'char *' and the pointer aritmetics lead to a > bigger address than intended?)
0x2a00c * 4 = 0xa8030.
That is suspicuously close to the value 0xb8030 Raymond guessed. info->mem_base is obviously an int*. It should be a char* or void* (allowing byte pointer arithmetic on void* is a gcc'ism).
-- Andreas E. Bombe <andreas.bombe@munich.netsurf.de> http://home.pages.de/~andreas.bombe/ RSA 0x886663c9 30 EC 09 73 84 7B 55 83 C4 7A 91 D9 9D C5 4B B0 DSA 0x04880A44 72E5 7031 4414 2EB6 F6B4 4CBD 1181 7032 0488 0A44
- 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/
| |