From owner-freebsd-arch@freebsd.org Tue Aug 25 06:44:39 2015 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 607A799AD75 for ; Tue, 25 Aug 2015 06:44:39 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-ig0-x232.google.com (mail-ig0-x232.google.com [IPv6:2607:f8b0:4001:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2FE59DC6 for ; Tue, 25 Aug 2015 06:44:39 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by igfj19 with SMTP id j19so4600484igf.0 for ; Mon, 24 Aug 2015 23:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=3YB3EH5gMc6irmSc1tdwU3AV1YtJ8E0t0nhnYFNPTTE=; b=cgRrKkloy8WEXqrPVBLOFUgXKTdvFXVF3Ul5ZNM47660bLinEFLHRp91/c2+uBSDbC FGfZQK6W0uEJX/BRt9d4H1UsjMpM+4NI2pgeyNi98hiHEAEOnuKkAZQl2O60QCN2tU2n JllvANPCY70Z7iEq5GumL39LftOtiR0WCmEZv6wX2yrjEFFXoNtTp0GPQlPUq2p+TaKg 0BrOnNngoz1IeJjZv/ugHKGu8Pod3ZXUu8Ye5STnFDKh5WAUwX5bXiQcZb4tJMxXylLP Ty9zEhX4u93QQbV1gfG/ku6w5dMxf/tYHvllzr6FEcxZWrpel5dBemAR3TAwW+zVWgDk avvg== MIME-Version: 1.0 X-Received: by 10.50.43.131 with SMTP id w3mr900706igl.8.1440485078636; Mon, 24 Aug 2015 23:44:38 -0700 (PDT) Sender: chmeeedalf@gmail.com Received: by 10.36.58.149 with HTTP; Mon, 24 Aug 2015 23:44:38 -0700 (PDT) Date: Mon, 24 Aug 2015 23:44:38 -0700 X-Google-Sender-Auth: YR77VzPr3nBJsVRzSoPYfe8OPjc Message-ID: Subject: Devices with 36-bit paddr on 32-bit system From: Justin Hibbits To: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2015 06:44:39 -0000 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