Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Aug 2015 23:44:38 -0700
From:      Justin Hibbits <jrh29@alumni.cwru.edu>
To:        "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Devices with 36-bit paddr on 32-bit system
Message-ID:  <CAHSQbTDsvB32%2BLyzHJO78VwUwAfUTMOUQp13BMCUpapSMT0fbg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHSQbTDsvB32%2BLyzHJO78VwUwAfUTMOUQp13BMCUpapSMT0fbg>