lkml.org 
[lkml]   [2006]   [Dec]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Open Firmware device tree virtual filesystem

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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-12-31 15:19    [from the cache]
©2003-2011 Jasper Spaans