Re: [PATCH] Open Firmware device tree virtual filesystem
- From: Jan Engelhardt <jengelh@xxxxxxxxxxxxxxx>
- Date: Sun, 31 Dec 2006 15:12:26 +0100 (MET)
On Dec 30 2006 15:38, Mitch Bradley wrote:
Request for comments.
It is similar in some respect to fs/proc/proc_devtree.c , but does
not use procfs, nor does it require an intermediate layer of code
to create a flattened representation of the device tree.
NB: openpromfs does not use procfs either. It just happens to be
mounted somewhere down there.
+++ b/Documentation/filesystems/ofwfs.txt
+== Property Value Encoding ==
+
+A regular file in ofwfs contains the exact byte sequence that
+comprises the OFW property value. Properties are not reformatted
+into text form, so numeric property values appear as binary
+integers. While this is inconvenient for viewing, it is generally
+easier for programs that read property values, and it means that
+Open Firmware documentation about property values applies
+directly, without having to separately document an ASCII
+transformation (which would have to separately specified for
+different kinds of properties).
I appreciate the ASCII formatting that openpromfs currently does.
Perhaps, should OFWFS be used, it could offer both?
+== Environment Assumptions ==
+
+The ofwfs code assumes that the Open Firmware client interface
+callback can be executed during Linux kernel startup
+(specifically, at "core_initcall" time). When ofwfs is
+initialized, it copies out the property values, so that subsequent
+accesses to the tree do not require callbacks into OFW.
openpromfs also has many parts read-only, only one object,
/options/security-password, is writable. Hence caching it once and
forever seems ok.
BUT, the eeprom utility may be used to modify values, and if used, I
would like to see ofwfs show the updated value. openpromfs does it
today:
15:09 ares:/proc/openprom/options # cat oem-banner?
false
15:09 ares:/proc/openprom/options # eeprom 'oem-banner?=true'
15:09 ares:/proc/openprom/options # cat oem-banner?
true
(BTW, why does not openpromfs have it rw?)
+== Recommended Mount Point ==
+
+The recommended mount point for ofwfs is /ofw. (TBD: Should it be
+mounted somewhere under /sys instead?)
Somewhere in /sys/firmware perhaps.
-`J'
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] Open Firmware device tree virtual filesystem
- From: David Miller
- Re: [PATCH] Open Firmware device tree virtual filesystem
- References:
- [PATCH] Open Firmware device tree virtual filesystem
- From: Mitch Bradley
- [PATCH] Open Firmware device tree virtual filesystem
- Prev by Date: Re: VM: Fix nasty and subtle race in shared mmap'ed page writeback
- Next by Date: Re: [OOPS] bcm43xx oops on 2.6.20-rc1 on x86_64
- Previous by thread: Re: [PATCH] Open Firmware device tree virtual filesystem
- Next by thread: Re: [PATCH] Open Firmware device tree virtual filesystem
- Index(es):