Devices with 36-bit paddr on 32-bit system
Justin Hibbits
jrh29 at alumni.cwru.edu
Tue Aug 25 06:44:39 UTC 2015
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?
- Justin
More information about the freebsd-arch
mailing list