reading files in /proc/device-tree
    Benjamin Herrenschmidt 
    benh at kernel.crashing.org
       
    Thu Sep 30 22:20:53 EST 2004
    
    
  
> Just read the file.
> 
> segher at victim:~ $ xxd -g4 /proc/device-tree/memory/reg
> 
> 00000000 00000000 00000000 80000000         ; 2GB at 0
> 00000001 00000000 00000000 80000000         ; 2GB at 4GB
> 
> (comments are mine, data is faked).
> 
> There might be more memory nodes; read them all and take
> the union.
> 
> Also, the format of the entries is dependent on the
> #address-cells and #sized-cells properties.
 ... of the parent node :) read the OF spec for more details
Ben.
    
    
More information about the Linuxppc64-dev
mailing list