From owner-freebsd-current@FreeBSD.ORG Sat Oct 15 06:12:57 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EFD2106564A; Sat, 15 Oct 2011 06:12:57 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id D42888FC15; Sat, 15 Oct 2011 06:12:56 +0000 (UTC) Received: by wwi18 with SMTP id 18so1025900wwi.31 for ; Fri, 14 Oct 2011 23:12:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=uv6eYispsUOxoGt2E9up5p+Ne+bDiU2VDyxJE0rOZ8I=; b=S7DYkp0H7kfvXjAc8MCcCjvYyjQPww1+JE8JqAtDTTpQNVKNlaD9baKcuavJw0LGCG ASx0xTYholri4fkHQ0qQEzp4ifhw6wmaQ2Hta6JVqJlCNV/QL870c2gwWSQqs5gp9flO fSGMNahKgezxI2jETd/nfrg3WG1S5luRWhzgk= MIME-Version: 1.0 Received: by 10.216.138.82 with SMTP id z60mr946208wei.11.1318659175698; Fri, 14 Oct 2011 23:12:55 -0700 (PDT) Sender: c.jayachandran@gmail.com Received: by 10.216.188.3 with HTTP; Fri, 14 Oct 2011 23:12:55 -0700 (PDT) In-Reply-To: <4E989C28.3030606@freebsd.org> References: <4E989C28.3030606@freebsd.org> Date: Sat, 15 Oct 2011 11:42:55 +0530 X-Google-Sender-Auth: s94nUBujAOEZi-RfSfjJXFRmuUo Message-ID: From: "Jayachandran C." To: Nathan Whitehorn Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Rafal Jaworowski , Marcel Moolenaar , FreeBSD Current Subject: Re: [RFC] FDT fix for 64 bit platforms X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Oct 2011 06:12:57 -0000 On Sat, Oct 15, 2011 at 2:01 AM, Nathan Whitehorn wrote: > On 10/14/11 14:10, Jayachandran C. wrote: >> >> I'm planning commit this -CURRENT if there an no objections. >> >> In the current implementation, phandle is used to store a pointer to >> the location inside the device tree. =A0Since phandle_t is u32, this >> will not work on 64 bit platforms. With this fix, the phandle is the >> offset from the start of device tree pointer 'fdtp', which will be 32 >> bit. >> >> Review or testing from device tree users will be welcome. >> >> JC. > > Why not use offsets into the FDT rather than full pointers? I believe hav= ing > phandles greater than 32 bits violates the FDT spec, and declaring that t= he > FDT can't itself be larger than 4 GB seems reasonable. I am actually using the offset from the beginning of FDT (fdtp) as phandle. I cannot use the usual fdt offset (after off_dt_struct) as phandle, because in that case offset of 0 is valid, but phandle 0 should not be valid. JC.