Devices with 36-bit paddr on 32-bit system

John-Mark Gurney jmg at funkthat.com
Wed Aug 26 01:14:47 UTC 2015


Justin Hibbits wrote this message on Mon, Aug 24, 2015 at 23:44 -0700:
> With my work porting FreeBSD to PowerPC e500mc and e5500, I have
> devices in my device tree mapped well above the 4GB mark
> (0xffexxxxxx), and have no idea how to properly address them for
> resources in rman.  Do we already have a solution to support this?
> Part of the problem is the powerpc nexus does a straight convert to
> vm_offset_t of rman_get_start() (itself returning a u_long), and
> vm_offset_t is not necessarily equal to vm_paddr_t (on Book-E powerpc
> vm_offset_t is 32-bits, vm_paddr_t is 64-bits).
> 
> Could rman be thought that resources aren't necessarily u_long?  The
> only thought I have is to assume in the nexus code that the bottom 4
> bits of the 32-bit address are actually the top bits of the 36-bit
> address, and generate those in ofw_bus_reg_to_rl(), since the bottom
> 12 bits can be ignored anyways (pmap_mapdev() only maps full pages at
> a minimum).  This seems kinda kludgy to me, though.
> 
> Any thoughts?

I'd look at how i386's PAE does it, as this is exactly the same type
of issue that PAE has...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the freebsd-arch mailing list