162306a36Sopenharmony_ciWhat: /sys/firmware/devicetree/* 262306a36Sopenharmony_ciDate: November 2013 362306a36Sopenharmony_ciContact: Grant Likely <grant.likely@arm.com>, devicetree@vger.kernel.org 462306a36Sopenharmony_ciDescription: 562306a36Sopenharmony_ci When using OpenFirmware or a Flattened Device Tree to enumerate 662306a36Sopenharmony_ci hardware, the device tree structure will be exposed in this 762306a36Sopenharmony_ci directory. 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci It is possible for multiple device-tree directories to exist. 1062306a36Sopenharmony_ci Some device drivers use a separate detached device tree which 1162306a36Sopenharmony_ci have no attachment to the system tree and will appear in a 1262306a36Sopenharmony_ci different subdirectory under /sys/firmware/devicetree. 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci Userspace must not use the /sys/firmware/devicetree/base 1562306a36Sopenharmony_ci path directly, but instead should follow /proc/device-tree 1662306a36Sopenharmony_ci symlink. It is possible that the absolute path will change 1762306a36Sopenharmony_ci in the future, but the symlink is the stable ABI. 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci The /proc/device-tree symlink replaces the devicetree /proc 2062306a36Sopenharmony_ci filesystem support, and has largely the same semantics and 2162306a36Sopenharmony_ci should be compatible with existing userspace. 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ci The contents of /sys/firmware/devicetree/ is a 2462306a36Sopenharmony_ci hierarchy of directories, one per device tree node. The 2562306a36Sopenharmony_ci directory name is the resolved path component name (node 2662306a36Sopenharmony_ci name plus address). Properties are represented as files 2762306a36Sopenharmony_ci in the directory. The contents of each file is the exact 2862306a36Sopenharmony_ci binary data from the device tree. 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ciWhat: /sys/firmware/fdt 3162306a36Sopenharmony_ciDate: February 2015 3262306a36Sopenharmony_ciKernelVersion: 3.19 3362306a36Sopenharmony_ciContact: Frank Rowand <frowand.list@gmail.com>, devicetree@vger.kernel.org 3462306a36Sopenharmony_ciDescription: 3562306a36Sopenharmony_ci Exports the FDT blob that was passed to the kernel by 3662306a36Sopenharmony_ci the bootloader. This allows userland applications such 3762306a36Sopenharmony_ci as kexec to access the raw binary. This blob is also 3862306a36Sopenharmony_ci useful when debugging since it contains any changes 3962306a36Sopenharmony_ci made to the blob by the bootloader. 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ci The fact that this node does not reside under 4262306a36Sopenharmony_ci /sys/firmware/device-tree is deliberate: FDT is also used 4362306a36Sopenharmony_ci on arm64 UEFI/ACPI systems to communicate just the UEFI 4462306a36Sopenharmony_ci and ACPI entry points, but the FDT is never unflattened 4562306a36Sopenharmony_ci and used to configure the system. 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci A CRC32 checksum is calculated over the entire FDT 4862306a36Sopenharmony_ci blob, and verified at late_initcall time. The sysfs 4962306a36Sopenharmony_ci entry is instantiated only if the checksum is valid, 5062306a36Sopenharmony_ci i.e., if the FDT blob has not been modified in the mean 5162306a36Sopenharmony_ci time. Otherwise, a warning is printed. 5262306a36Sopenharmony_ciUsers: kexec, debugging 53