Question on fixup_bigphys_addr() in syslib/ibm44x_common.c
ebs at ebshome.net
Sat Apr 16 10:36:44 EST 2005
On Fri, Apr 15, 2005 at 05:16:32PM -0700, Shawn Jin wrote:
> When looking into ppc440 support, I'm confused on the functionality of
> fixup_bigphys_addr() in syslib/ibm44x_common.c. It's called by
> ioremap() in arch/ppc/mm/pgtable.c. The prototype is as follows.
> phys_addr_t fixup_bigphys_addr(phys_addr_t addr, phys_addr_t size)
> Why do we need this fixup? ioremap() takes a physical address as an
> argument and maps the physical address space to virtual address space
> with the specified size. Since it's already a physical address, which
> is 36-bit address in the case of 440, why do we need to fix up the
> ERPN? I must be missing something here.
phys addr which is passed to ioremap doesn't always contain full
36-bit address. The reason for this is that some generic Linux
subsystems (e.g. PCI) for 32-bit archs assume that physical address is
always 32-bit. To make such generic (not 440-specific) drivers work
on 44x we need this hack.
IIRC there is an effort under way to fix this generic kernel
limitation, so hopefully we will be able to get rid of this hack soon.
More information about the Linuxppc-embedded