diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 18:05:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 18:05:40 -0400 |
commit | a5e6b135bdff649e4330f98e2e80dbb1984f7e77 (patch) | |
tree | 475bfb1163c59d1370fd77415255afba768f9520 /Documentation/ABI | |
parent | 971f115a50afbe409825c9f3399d5a3b9aca4381 (diff) | |
parent | 9d90c8d9cde929cbc575098e825d7c29d9f45054 (diff) |
Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (50 commits)
printk: do not mangle valid userspace syslog prefixes
efivars: Add Documentation
efivars: Expose efivars functionality to external drivers.
efivars: Parameterize operations.
efivars: Split out variable registration
efivars: parameterize efivars
efivars: Make efivars bin_attributes dynamic
efivars: move efivars globals into struct efivars
drivers:misc: ti-st: fix debugging code
kref: Fix typo in kref documentation
UIO: add PRUSS UIO driver support
Fix spelling mistakes in Documentation/zh_CN/SubmittingPatches
firmware: Fix unaligned memory accesses in dmi-sysfs
firmware: Add documentation for /sys/firmware/dmi
firmware: Expose DMI type 15 System Event Log
firmware: Break out system_event_log in dmi-sysfs
firmware: Basic dmi-sysfs support
firmware: Add DMI entry types to the headers
Driver core: convert platform_{get,set}_drvdata to static inline functions
Translate linux-2.6/Documentation/magic-number.txt into Chinese
...
Diffstat (limited to 'Documentation/ABI')
-rw-r--r-- | Documentation/ABI/stable/sysfs-firmware-efi-vars | 75 | ||||
-rw-r--r-- | Documentation/ABI/testing/sysfs-firmware-dmi | 110 | ||||
-rw-r--r-- | Documentation/ABI/testing/sysfs-platform-kim | 48 |
3 files changed, 233 insertions, 0 deletions
diff --git a/Documentation/ABI/stable/sysfs-firmware-efi-vars b/Documentation/ABI/stable/sysfs-firmware-efi-vars new file mode 100644 index 000000000000..5def20b9019e --- /dev/null +++ b/Documentation/ABI/stable/sysfs-firmware-efi-vars | |||
@@ -0,0 +1,75 @@ | |||
1 | What: /sys/firmware/efi/vars | ||
2 | Date: April 2004 | ||
3 | Contact: Matt Domsch <Matt_Domsch@dell.com> | ||
4 | Description: | ||
5 | This directory exposes interfaces for interactive with | ||
6 | EFI variables. For more information on EFI variables, | ||
7 | see 'Variable Services' in the UEFI specification | ||
8 | (section 7.2 in specification version 2.3 Errata D). | ||
9 | |||
10 | In summary, EFI variables are named, and are classified | ||
11 | into separate namespaces through the use of a vendor | ||
12 | GUID. They also have an arbitrary binary value | ||
13 | associated with them. | ||
14 | |||
15 | The efivars module enumerates these variables and | ||
16 | creates a separate directory for each one found. Each | ||
17 | directory has a name of the form "<key>-<vendor guid>" | ||
18 | and contains the following files: | ||
19 | |||
20 | attributes: A read-only text file enumerating the | ||
21 | EFI variable flags. Potential values | ||
22 | include: | ||
23 | |||
24 | EFI_VARIABLE_NON_VOLATILE | ||
25 | EFI_VARIABLE_BOOTSERVICE_ACCESS | ||
26 | EFI_VARIABLE_RUNTIME_ACCESS | ||
27 | EFI_VARIABLE_HARDWARE_ERROR_RECORD | ||
28 | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS | ||
29 | |||
30 | See the EFI documentation for an | ||
31 | explanation of each of these variables. | ||
32 | |||
33 | data: A read-only binary file that can be read | ||
34 | to attain the value of the EFI variable | ||
35 | |||
36 | guid: The vendor GUID of the variable. This | ||
37 | should always match the GUID in the | ||
38 | variable's name. | ||
39 | |||
40 | raw_var: A binary file that can be read to obtain | ||
41 | a structure that contains everything | ||
42 | there is to know about the variable. | ||
43 | For structure definition see "struct | ||
44 | efi_variable" in the kernel sources. | ||
45 | |||
46 | This file can also be written to in | ||
47 | order to update the value of a variable. | ||
48 | For this to work however, all fields of | ||
49 | the "struct efi_variable" passed must | ||
50 | match byte for byte with the structure | ||
51 | read out of the file, save for the value | ||
52 | portion. | ||
53 | |||
54 | **Note** the efi_variable structure | ||
55 | read/written with this file contains a | ||
56 | 'long' type that may change widths | ||
57 | depending on your underlying | ||
58 | architecture. | ||
59 | |||
60 | size: As ASCII representation of the size of | ||
61 | the variable's value. | ||
62 | |||
63 | |||
64 | In addition, two other magic binary files are provided | ||
65 | in the top-level directory and are used for adding and | ||
66 | removing variables: | ||
67 | |||
68 | new_var: Takes a "struct efi_variable" and | ||
69 | instructs the EFI firmware to create a | ||
70 | new variable. | ||
71 | |||
72 | del_var: Takes a "struct efi_variable" and | ||
73 | instructs the EFI firmware to remove any | ||
74 | variable that has a matching vendor GUID | ||
75 | and variable key name. | ||
diff --git a/Documentation/ABI/testing/sysfs-firmware-dmi b/Documentation/ABI/testing/sysfs-firmware-dmi new file mode 100644 index 000000000000..ba9da9503c23 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-firmware-dmi | |||
@@ -0,0 +1,110 @@ | |||
1 | What: /sys/firmware/dmi/ | ||
2 | Date: February 2011 | ||
3 | Contact: Mike Waychison <mikew@google.com> | ||
4 | Description: | ||
5 | Many machines' firmware (x86 and ia64) export DMI / | ||
6 | SMBIOS tables to the operating system. Getting at this | ||
7 | information is often valuable to userland, especially in | ||
8 | cases where there are OEM extensions used. | ||
9 | |||
10 | The kernel itself does not rely on the majority of the | ||
11 | information in these tables being correct. It equally | ||
12 | cannot ensure that the data as exported to userland is | ||
13 | without error either. | ||
14 | |||
15 | DMI is structured as a large table of entries, where | ||
16 | each entry has a common header indicating the type and | ||
17 | length of the entry, as well as 'handle' that is | ||
18 | supposed to be unique amongst all entries. | ||
19 | |||
20 | Some entries are required by the specification, but many | ||
21 | others are optional. In general though, users should | ||
22 | never expect to find a specific entry type on their | ||
23 | system unless they know for certain what their firmware | ||
24 | is doing. Machine to machine will vary. | ||
25 | |||
26 | Multiple entries of the same type are allowed. In order | ||
27 | to handle these duplicate entry types, each entry is | ||
28 | assigned by the operating system an 'instance', which is | ||
29 | derived from an entry type's ordinal position. That is | ||
30 | to say, if there are 'N' multiple entries with the same type | ||
31 | 'T' in the DMI tables (adjacent or spread apart, it | ||
32 | doesn't matter), they will be represented in sysfs as | ||
33 | entries "T-0" through "T-(N-1)": | ||
34 | |||
35 | Example entry directories: | ||
36 | |||
37 | /sys/firmware/dmi/entries/17-0 | ||
38 | /sys/firmware/dmi/entries/17-1 | ||
39 | /sys/firmware/dmi/entries/17-2 | ||
40 | /sys/firmware/dmi/entries/17-3 | ||
41 | ... | ||
42 | |||
43 | Instance numbers are used in lieu of the firmware | ||
44 | assigned entry handles as the kernel itself makes no | ||
45 | guarantees that handles as exported are unique, and | ||
46 | there are likely firmware images that get this wrong in | ||
47 | the wild. | ||
48 | |||
49 | Each DMI entry in sysfs has the common header values | ||
50 | exported as attributes: | ||
51 | |||
52 | handle : The 16bit 'handle' that is assigned to this | ||
53 | entry by the firmware. This handle may be | ||
54 | referred to by other entries. | ||
55 | length : The length of the entry, as presented in the | ||
56 | entry itself. Note that this is _not the | ||
57 | total count of bytes associated with the | ||
58 | entry_. This value represents the length of | ||
59 | the "formatted" portion of the entry. This | ||
60 | "formatted" region is sometimes followed by | ||
61 | the "unformatted" region composed of nul | ||
62 | terminated strings, with termination signalled | ||
63 | by a two nul characters in series. | ||
64 | raw : The raw bytes of the entry. This includes the | ||
65 | "formatted" portion of the entry, the | ||
66 | "unformatted" strings portion of the entry, | ||
67 | and the two terminating nul characters. | ||
68 | type : The type of the entry. This value is the same | ||
69 | as found in the directory name. It indicates | ||
70 | how the rest of the entry should be | ||
71 | interpreted. | ||
72 | instance: The instance ordinal of the entry for the | ||
73 | given type. This value is the same as found | ||
74 | in the parent directory name. | ||
75 | position: The position of the entry within the entirety | ||
76 | of the entirety. | ||
77 | |||
78 | === Entry Specialization === | ||
79 | |||
80 | Some entry types may have other information available in | ||
81 | sysfs. | ||
82 | |||
83 | --- Type 15 - System Event Log --- | ||
84 | |||
85 | This entry allows the firmware to export a log of | ||
86 | events the system has taken. This information is | ||
87 | typically backed by nvram, but the implementation | ||
88 | details are abstracted by this table. This entries data | ||
89 | is exported in the directory: | ||
90 | |||
91 | /sys/firmware/dmi/entries/15-0/system_event_log | ||
92 | |||
93 | and has the following attributes (documented in the | ||
94 | SMBIOS / DMI specification under "System Event Log (Type 15)": | ||
95 | |||
96 | area_length | ||
97 | header_start_offset | ||
98 | data_start_offset | ||
99 | access_method | ||
100 | status | ||
101 | change_token | ||
102 | access_method_address | ||
103 | header_format | ||
104 | per_log_type_descriptor_length | ||
105 | type_descriptors_supported_count | ||
106 | |||
107 | As well, the kernel exports the binary attribute: | ||
108 | |||
109 | raw_event_log : The raw binary bits of the event log | ||
110 | as described by the DMI entry. | ||
diff --git a/Documentation/ABI/testing/sysfs-platform-kim b/Documentation/ABI/testing/sysfs-platform-kim new file mode 100644 index 000000000000..c1653271872a --- /dev/null +++ b/Documentation/ABI/testing/sysfs-platform-kim | |||
@@ -0,0 +1,48 @@ | |||
1 | What: /sys/devices/platform/kim/dev_name | ||
2 | Date: January 2010 | ||
3 | KernelVersion: 2.6.38 | ||
4 | Contact: "Pavan Savoy" <pavan_savoy@ti.com> | ||
5 | Description: | ||
6 | Name of the UART device at which the WL128x chip | ||
7 | is connected. example: "/dev/ttyS0". | ||
8 | The device name flows down to architecture specific board | ||
9 | initialization file from the SFI/ATAGS bootloader | ||
10 | firmware. The name exposed is read from the user-space | ||
11 | dameon and opens the device when install is requested. | ||
12 | |||
13 | What: /sys/devices/platform/kim/baud_rate | ||
14 | Date: January 2010 | ||
15 | KernelVersion: 2.6.38 | ||
16 | Contact: "Pavan Savoy" <pavan_savoy@ti.com> | ||
17 | Description: | ||
18 | The maximum reliable baud-rate the host can support. | ||
19 | Different platforms tend to have different high-speed | ||
20 | UART configurations, so the baud-rate needs to be set | ||
21 | locally and also sent across to the WL128x via a HCI-VS | ||
22 | command. The entry is read and made use by the user-space | ||
23 | daemon when the ldisc install is requested. | ||
24 | |||
25 | What: /sys/devices/platform/kim/flow_cntrl | ||
26 | Date: January 2010 | ||
27 | KernelVersion: 2.6.38 | ||
28 | Contact: "Pavan Savoy" <pavan_savoy@ti.com> | ||
29 | Description: | ||
30 | The WL128x makes use of flow control mechanism, and this | ||
31 | entry most often should be 1, the host's UART is required | ||
32 | to have the capability of flow-control, or else this | ||
33 | entry can be made use of for exceptions. | ||
34 | |||
35 | What: /sys/devices/platform/kim/install | ||
36 | Date: January 2010 | ||
37 | KernelVersion: 2.6.38 | ||
38 | Contact: "Pavan Savoy" <pavan_savoy@ti.com> | ||
39 | Description: | ||
40 | When one of the protocols Bluetooth, FM or GPS wants to make | ||
41 | use of the shared UART transport, it registers to the shared | ||
42 | transport driver, which will signal the user-space for opening, | ||
43 | configuring baud and install line discipline via this sysfs | ||
44 | entry. This entry would be polled upon by the user-space | ||
45 | daemon managing the UART, and is notified about the change | ||
46 | by the sysfs_notify. The value would be '1' when UART needs | ||
47 | to be opened/ldisc installed, and would be '0' when UART | ||
48 | is no more required and needs to be closed. | ||