Subject: Re: OpenFirmware, node numbers, handles etc.
To: NetBSD tech-kern mailing list <>
From: Valeriy E. Ushakov <>
List: tech-kern
Date: 11/28/2007 01:23:05
On Tue, Nov 27, 2007 at 09:59:16 -0500, Michael Lorenz wrote:

> is there a good reason why OF handles, node numbers etc. are
> represented as int in our code? As far as I can tell using a signed  
> type here only causes trouble since at least node numbers may well  
> have the upper bit set.

Why would you want to sign-extend a phandle anyway? :)

I guess way back then when that code was written nobody cared to
provide openboot/ofw interface across all relevant platforms, so that
you can e.g. declare sa_node in sbus_attach_args as "phandle_t".

SY, Uwe
--                       |       Zu Grunde kommen          |       Ist zu Grunde gehen