xref: /linux/Documentation/ABI/testing/sysfs-firmware-ofw (revision c25141062a82ae8bddced1b3ce2b57a1c0efabe0)
175b57ecfSGrant LikelyWhat:		/sys/firmware/devicetree/*
275b57ecfSGrant LikelyDate:		November 2013
3*5e1743c0SFrank RowandContact:	Grant Likely <grant.likely@arm.com>, devicetree@vger.kernel.org
475b57ecfSGrant LikelyDescription:
575b57ecfSGrant Likely		When using OpenFirmware or a Flattened Device Tree to enumerate
675b57ecfSGrant Likely		hardware, the device tree structure will be exposed in this
775b57ecfSGrant Likely		directory.
875b57ecfSGrant Likely
975b57ecfSGrant Likely		It is possible for multiple device-tree directories to exist.
1075b57ecfSGrant Likely		Some device drivers use a separate detached device tree which
1175b57ecfSGrant Likely		have no attachment to the system tree and will appear in a
1275b57ecfSGrant Likely		different subdirectory under /sys/firmware/devicetree.
1375b57ecfSGrant Likely
1475b57ecfSGrant Likely		Userspace must not use the /sys/firmware/devicetree/base
1575b57ecfSGrant Likely		path directly, but instead should follow /proc/device-tree
1675b57ecfSGrant Likely		symlink. It is possible that the absolute path will change
1775b57ecfSGrant Likely		in the future, but the symlink is the stable ABI.
1875b57ecfSGrant Likely
1975b57ecfSGrant Likely		The /proc/device-tree symlink replaces the devicetree /proc
2075b57ecfSGrant Likely		filesystem support, and has largely the same semantics and
2175b57ecfSGrant Likely		should be compatible with existing userspace.
2275b57ecfSGrant Likely
2375b57ecfSGrant Likely		The contents of /sys/firmware/devicetree/ is a
2475b57ecfSGrant Likely		hierarchy of directories, one per device tree node. The
2575b57ecfSGrant Likely		directory name is the resolved path component name (node
2675b57ecfSGrant Likely		name plus address). Properties are represented as files
2775b57ecfSGrant Likely		in the directory. The contents of each file is the exact
2875b57ecfSGrant Likely		binary data from the device tree.
29*5e1743c0SFrank Rowand
30*5e1743c0SFrank RowandWhat:		/sys/firmware/fdt
31*5e1743c0SFrank RowandDate:		February 2015
32*5e1743c0SFrank RowandKernelVersion:	3.19
33*5e1743c0SFrank RowandContact:	Frank Rowand <frowand.list@gmail.com>, devicetree@vger.kernel.org
34*5e1743c0SFrank RowandDescription:
35*5e1743c0SFrank Rowand		Exports the FDT blob that was passed to the kernel by
36*5e1743c0SFrank Rowand		the bootloader. This allows userland applications such
37*5e1743c0SFrank Rowand		as kexec to access the raw binary. This blob is also
38*5e1743c0SFrank Rowand		useful when debugging since it contains any changes
39*5e1743c0SFrank Rowand		made to the blob by the bootloader.
40*5e1743c0SFrank Rowand
41*5e1743c0SFrank Rowand		The fact that this node does not reside under
42*5e1743c0SFrank Rowand		/sys/firmware/device-tree is deliberate: FDT is also used
43*5e1743c0SFrank Rowand		on arm64 UEFI/ACPI systems to communicate just the UEFI
44*5e1743c0SFrank Rowand		and ACPI entry points, but the FDT is never unflattened
45*5e1743c0SFrank Rowand		and used to configure the system.
46*5e1743c0SFrank Rowand
47*5e1743c0SFrank Rowand		A CRC32 checksum is calculated over the entire FDT
48*5e1743c0SFrank Rowand		blob, and verified at late_initcall time. The sysfs
49*5e1743c0SFrank Rowand		entry is instantiated only if the checksum is valid,
50*5e1743c0SFrank Rowand		i.e., if the FDT blob has not been modified in the mean
51*5e1743c0SFrank Rowand		time. Otherwise, a warning is printed.
52*5e1743c0SFrank RowandUsers:		kexec, debugging
53