Devicetree spec: Specifying /cpus/cpu@* unit address format?

David Gibson david at gibson.dropbear.id.au
Sat Apr 4 21:43:41 PDT 2026


On Fri, Apr 03, 2026 at 06:06:17PM +0800, Vivian Wang wrote:
> (Also posted at: https://github.com/devicetree-org/devicetree-specification/issues/86 )
> 
> Hi all,
> 
> Presently, there seems to be some confusion in the community about the
> format of unit addresses for "/cpus/cpu@*" nodes for a CPU with ID > 9, e.g.
> 
>     cpu@??? {
>         reg = <10>;
>         /* reg = <0xa>; */ /* This should be equivalent */
>     }
> 
> 
> Should this be a decimal "cpu at 10", or hexadecimal "cpu at a"? I can't find
> any explicit specification.

It should be hex.  That's a general convention for unit addresses.
Before flattened trees, OF essentially never used decimal
representations of things.

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20260405/cb19cd6a/attachment.sig>


More information about the linux-riscv mailing list