[OpenBIOS] [RFC 2/3] ppc64: Switch to 64-bit cell size
segher at kernel.crashing.org
Sat May 28 22:15:36 CEST 2011
>>> If I recall correctly what I said, the device-tree property cell
>>> size is _always_ 32-bit, regardless of what the internal cell size
>> Don't call that "cell size" :-) The OF standard calls it "a 32-bit
>> as encoded by encode-int".
> There are places where 1275 refers to "cells" in the properties, where
> it _means_ 32-bit quantities. It's an unfortunate terminology problem.
Only in the actual property names, as far as I know. Historical
>>> - The cell size presented to FCode version 2 drivers (plug-in
>>> cards), which is emulated to be 32 bits.
>> Do you mean the size of (lit) here? That's 32-bit signed always,
>> yes. The
>> FCode cell size is the same as the Forth cell size. Most FCode
>> written for 32-bit systems work as-is on 64-bit systems; some need
>> fixes. Programs that need 64-bit numbers (for example, for devices
>> have 64-bit registers) need some careful coding.
> The FCode version 2 interpreter on SPARCs emulates 32-bit FCode by
> making various operations 32-bit specific. E.g., "0<>" tests only the
> low-order 32 bits of a cell. The intent was to ensure that 32-bit
> FCode programs did _not_ need fixes (because we couldn't afford the
> hassle of forcing everyone to fix them). That has resulted in
> considerable pain over the years as FCode programs and Forth don't
> always run the same.
Yeah, it's the worse of two evils, if you ask me.
More information about the OpenBIOS