* Question on fixup_bigphys_addr() in syslib/ibm44x_common.c
@ 2005-04-16 0:16 Shawn Jin
2005-04-16 0:36 ` Eugene Surovegin
0 siblings, 1 reply; 2+ messages in thread
From: Shawn Jin @ 2005-04-16 0:16 UTC (permalink / raw)
To: ppcembed
Hi,
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.
Thanks,
-Shawn.
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Question on fixup_bigphys_addr() in syslib/ibm44x_common.c
2005-04-16 0:16 Question on fixup_bigphys_addr() in syslib/ibm44x_common.c Shawn Jin
@ 2005-04-16 0:36 ` Eugene Surovegin
0 siblings, 0 replies; 2+ messages in thread
From: Eugene Surovegin @ 2005-04-16 0:36 UTC (permalink / raw)
To: Shawn Jin; +Cc: ppcembed
On Fri, Apr 15, 2005 at 05:16:32PM -0700, Shawn Jin wrote:
> Hi,
>
> 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.
--
Eugene
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-04-16 0:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-16 0:16 Question on fixup_bigphys_addr() in syslib/ibm44x_common.c Shawn Jin
2005-04-16 0:36 ` Eugene Surovegin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.