diff options
Diffstat (limited to 'Documentation/arm')
-rw-r--r-- | Documentation/arm/Booting | 5 | ||||
-rw-r--r-- | Documentation/arm/SH-Mobile/zboot-rom-sdhi.txt | 42 | ||||
-rw-r--r-- | Documentation/arm/Samsung-S3C24XX/Overview.txt | 7 | ||||
-rw-r--r-- | Documentation/arm/kernel_user_helpers.txt | 267 | ||||
-rw-r--r-- | Documentation/arm/nvidia/tegra_parameters.txt | 169 |
5 files changed, 488 insertions, 2 deletions
diff --git a/Documentation/arm/Booting b/Documentation/arm/Booting index 4e686a2ed91..a341d87d276 100644 --- a/Documentation/arm/Booting +++ b/Documentation/arm/Booting | |||
@@ -164,3 +164,8 @@ In either case, the following conditions must be met: | |||
164 | - The boot loader is expected to call the kernel image by jumping | 164 | - The boot loader is expected to call the kernel image by jumping |
165 | directly to the first instruction of the kernel image. | 165 | directly to the first instruction of the kernel image. |
166 | 166 | ||
167 | On CPUs supporting the ARM instruction set, the entry must be | ||
168 | made in ARM state, even for a Thumb-2 kernel. | ||
169 | |||
170 | On CPUs supporting only the Thumb instruction set such as | ||
171 | Cortex-M class CPUs, the entry must be made in Thumb state. | ||
diff --git a/Documentation/arm/SH-Mobile/zboot-rom-sdhi.txt b/Documentation/arm/SH-Mobile/zboot-rom-sdhi.txt new file mode 100644 index 00000000000..441959846e1 --- /dev/null +++ b/Documentation/arm/SH-Mobile/zboot-rom-sdhi.txt | |||
@@ -0,0 +1,42 @@ | |||
1 | ROM-able zImage boot from eSD | ||
2 | ----------------------------- | ||
3 | |||
4 | An ROM-able zImage compiled with ZBOOT_ROM_SDHI may be written to eSD and | ||
5 | SuperH Mobile ARM will to boot directly from the SDHI hardware block. | ||
6 | |||
7 | This is achieved by the mask ROM loading the first portion of the image into | ||
8 | MERAM and then jumping to it. This portion contains loader code which | ||
9 | copies the entire image to SDRAM and jumps to it. From there the zImage | ||
10 | boot code proceeds as normal, uncompressing the image into its final | ||
11 | location and then jumping to it. | ||
12 | |||
13 | This code has been tested on an mackerel board using the developer 1A eSD | ||
14 | boot mode which is configured using the following jumper settings. | ||
15 | |||
16 | 8 7 6 5 4 3 2 1 | ||
17 | x|x|x|x| |x|x| | ||
18 | S4 -+-+-+-+-+-+-+- | ||
19 | | | | |x| | |x on | ||
20 | |||
21 | The eSD card needs to be present in SDHI slot 1 (CN7). | ||
22 | As such S1 and S33 also need to be configured as per | ||
23 | the notes in arch/arm/mach-shmobile/board-mackerel.c. | ||
24 | |||
25 | A partial zImage must be written to physical partition #1 (boot) | ||
26 | of the eSD at sector 0 in vrl4 format. A utility vrl4 is supplied to | ||
27 | accomplish this. | ||
28 | |||
29 | e.g. | ||
30 | vrl4 < zImage | dd of=/dev/sdX bs=512 count=17 | ||
31 | |||
32 | A full copy of _the same_ zImage should be written to physical partition #1 | ||
33 | (boot) of the eSD at sector 0. This should _not_ be in vrl4 format. | ||
34 | |||
35 | vrl4 < zImage | dd of=/dev/sdX bs=512 | ||
36 | |||
37 | Note: The commands above assume that the physical partition has been | ||
38 | switched. No such facility currently exists in the Linux Kernel. | ||
39 | |||
40 | Physical partitions are described in the eSD specification. At the time of | ||
41 | writing they are not the same as partitions that are typically configured | ||
42 | using fdisk and visible through /proc/partitions | ||
diff --git a/Documentation/arm/Samsung-S3C24XX/Overview.txt b/Documentation/arm/Samsung-S3C24XX/Overview.txt index c12bfc1a00c..359587b2367 100644 --- a/Documentation/arm/Samsung-S3C24XX/Overview.txt +++ b/Documentation/arm/Samsung-S3C24XX/Overview.txt | |||
@@ -8,10 +8,13 @@ Introduction | |||
8 | 8 | ||
9 | The Samsung S3C24XX range of ARM9 System-on-Chip CPUs are supported | 9 | The Samsung S3C24XX range of ARM9 System-on-Chip CPUs are supported |
10 | by the 's3c2410' architecture of ARM Linux. Currently the S3C2410, | 10 | by the 's3c2410' architecture of ARM Linux. Currently the S3C2410, |
11 | S3C2412, S3C2413, S3C2416 S3C2440, S3C2442, S3C2443 and S3C2450 devices | 11 | S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443 and S3C2450 devices |
12 | are supported. | 12 | are supported. |
13 | 13 | ||
14 | Support for the S3C2400 and S3C24A0 series are in progress. | 14 | Support for the S3C2400 and S3C24A0 series was never completed and the |
15 | corresponding code has been removed after a while. If someone wishes to | ||
16 | revive this effort, partial support can be retrieved from earlier Linux | ||
17 | versions. | ||
15 | 18 | ||
16 | The S3C2416 and S3C2450 devices are very similar and S3C2450 support is | 19 | The S3C2416 and S3C2450 devices are very similar and S3C2450 support is |
17 | included under the arch/arm/mach-s3c2416 directory. Note, whilst core | 20 | included under the arch/arm/mach-s3c2416 directory. Note, whilst core |
diff --git a/Documentation/arm/kernel_user_helpers.txt b/Documentation/arm/kernel_user_helpers.txt new file mode 100644 index 00000000000..a17df9f91d1 --- /dev/null +++ b/Documentation/arm/kernel_user_helpers.txt | |||
@@ -0,0 +1,267 @@ | |||
1 | Kernel-provided User Helpers | ||
2 | ============================ | ||
3 | |||
4 | These are segment of kernel provided user code reachable from user space | ||
5 | at a fixed address in kernel memory. This is used to provide user space | ||
6 | with some operations which require kernel help because of unimplemented | ||
7 | native feature and/or instructions in many ARM CPUs. The idea is for this | ||
8 | code to be executed directly in user mode for best efficiency but which is | ||
9 | too intimate with the kernel counter part to be left to user libraries. | ||
10 | In fact this code might even differ from one CPU to another depending on | ||
11 | the available instruction set, or whether it is a SMP systems. In other | ||
12 | words, the kernel reserves the right to change this code as needed without | ||
13 | warning. Only the entry points and their results as documented here are | ||
14 | guaranteed to be stable. | ||
15 | |||
16 | This is different from (but doesn't preclude) a full blown VDSO | ||
17 | implementation, however a VDSO would prevent some assembly tricks with | ||
18 | constants that allows for efficient branching to those code segments. And | ||
19 | since those code segments only use a few cycles before returning to user | ||
20 | code, the overhead of a VDSO indirect far call would add a measurable | ||
21 | overhead to such minimalistic operations. | ||
22 | |||
23 | User space is expected to bypass those helpers and implement those things | ||
24 | inline (either in the code emitted directly by the compiler, or part of | ||
25 | the implementation of a library call) when optimizing for a recent enough | ||
26 | processor that has the necessary native support, but only if resulting | ||
27 | binaries are already to be incompatible with earlier ARM processors due to | ||
28 | useage of similar native instructions for other things. In other words | ||
29 | don't make binaries unable to run on earlier processors just for the sake | ||
30 | of not using these kernel helpers if your compiled code is not going to | ||
31 | use new instructions for other purpose. | ||
32 | |||
33 | New helpers may be added over time, so an older kernel may be missing some | ||
34 | helpers present in a newer kernel. For this reason, programs must check | ||
35 | the value of __kuser_helper_version (see below) before assuming that it is | ||
36 | safe to call any particular helper. This check should ideally be | ||
37 | performed only once at process startup time, and execution aborted early | ||
38 | if the required helpers are not provided by the kernel version that | ||
39 | process is running on. | ||
40 | |||
41 | kuser_helper_version | ||
42 | -------------------- | ||
43 | |||
44 | Location: 0xffff0ffc | ||
45 | |||
46 | Reference declaration: | ||
47 | |||
48 | extern int32_t __kuser_helper_version; | ||
49 | |||
50 | Definition: | ||
51 | |||
52 | This field contains the number of helpers being implemented by the | ||
53 | running kernel. User space may read this to determine the availability | ||
54 | of a particular helper. | ||
55 | |||
56 | Usage example: | ||
57 | |||
58 | #define __kuser_helper_version (*(int32_t *)0xffff0ffc) | ||
59 | |||
60 | void check_kuser_version(void) | ||
61 | { | ||
62 | if (__kuser_helper_version < 2) { | ||
63 | fprintf(stderr, "can't do atomic operations, kernel too old\n"); | ||
64 | abort(); | ||
65 | } | ||
66 | } | ||
67 | |||
68 | Notes: | ||
69 | |||
70 | User space may assume that the value of this field never changes | ||
71 | during the lifetime of any single process. This means that this | ||
72 | field can be read once during the initialisation of a library or | ||
73 | startup phase of a program. | ||
74 | |||
75 | kuser_get_tls | ||
76 | ------------- | ||
77 | |||
78 | Location: 0xffff0fe0 | ||
79 | |||
80 | Reference prototype: | ||
81 | |||
82 | void * __kuser_get_tls(void); | ||
83 | |||
84 | Input: | ||
85 | |||
86 | lr = return address | ||
87 | |||
88 | Output: | ||
89 | |||
90 | r0 = TLS value | ||
91 | |||
92 | Clobbered registers: | ||
93 | |||
94 | none | ||
95 | |||
96 | Definition: | ||
97 | |||
98 | Get the TLS value as previously set via the __ARM_NR_set_tls syscall. | ||
99 | |||
100 | Usage example: | ||
101 | |||
102 | typedef void * (__kuser_get_tls_t)(void); | ||
103 | #define __kuser_get_tls (*(__kuser_get_tls_t *)0xffff0fe0) | ||
104 | |||
105 | void foo() | ||
106 | { | ||
107 | void *tls = __kuser_get_tls(); | ||
108 | printf("TLS = %p\n", tls); | ||
109 | } | ||
110 | |||
111 | Notes: | ||
112 | |||
113 | - Valid only if __kuser_helper_version >= 1 (from kernel version 2.6.12). | ||
114 | |||
115 | kuser_cmpxchg | ||
116 | ------------- | ||
117 | |||
118 | Location: 0xffff0fc0 | ||
119 | |||
120 | Reference prototype: | ||
121 | |||
122 | int __kuser_cmpxchg(int32_t oldval, int32_t newval, volatile int32_t *ptr); | ||
123 | |||
124 | Input: | ||
125 | |||
126 | r0 = oldval | ||
127 | r1 = newval | ||
128 | r2 = ptr | ||
129 | lr = return address | ||
130 | |||
131 | Output: | ||
132 | |||
133 | r0 = success code (zero or non-zero) | ||
134 | C flag = set if r0 == 0, clear if r0 != 0 | ||
135 | |||
136 | Clobbered registers: | ||
137 | |||
138 | r3, ip, flags | ||
139 | |||
140 | Definition: | ||
141 | |||
142 | Atomically store newval in *ptr only if *ptr is equal to oldval. | ||
143 | Return zero if *ptr was changed or non-zero if no exchange happened. | ||
144 | The C flag is also set if *ptr was changed to allow for assembly | ||
145 | optimization in the calling code. | ||
146 | |||
147 | Usage example: | ||
148 | |||
149 | typedef int (__kuser_cmpxchg_t)(int oldval, int newval, volatile int *ptr); | ||
150 | #define __kuser_cmpxchg (*(__kuser_cmpxchg_t *)0xffff0fc0) | ||
151 | |||
152 | int atomic_add(volatile int *ptr, int val) | ||
153 | { | ||
154 | int old, new; | ||
155 | |||
156 | do { | ||
157 | old = *ptr; | ||
158 | new = old + val; | ||
159 | } while(__kuser_cmpxchg(old, new, ptr)); | ||
160 | |||
161 | return new; | ||
162 | } | ||
163 | |||
164 | Notes: | ||
165 | |||
166 | - This routine already includes memory barriers as needed. | ||
167 | |||
168 | - Valid only if __kuser_helper_version >= 2 (from kernel version 2.6.12). | ||
169 | |||
170 | kuser_memory_barrier | ||
171 | -------------------- | ||
172 | |||
173 | Location: 0xffff0fa0 | ||
174 | |||
175 | Reference prototype: | ||
176 | |||
177 | void __kuser_memory_barrier(void); | ||
178 | |||
179 | Input: | ||
180 | |||
181 | lr = return address | ||
182 | |||
183 | Output: | ||
184 | |||
185 | none | ||
186 | |||
187 | Clobbered registers: | ||
188 | |||
189 | none | ||
190 | |||
191 | Definition: | ||
192 | |||
193 | Apply any needed memory barrier to preserve consistency with data modified | ||
194 | manually and __kuser_cmpxchg usage. | ||
195 | |||
196 | Usage example: | ||
197 | |||
198 | typedef void (__kuser_dmb_t)(void); | ||
199 | #define __kuser_dmb (*(__kuser_dmb_t *)0xffff0fa0) | ||
200 | |||
201 | Notes: | ||
202 | |||
203 | - Valid only if __kuser_helper_version >= 3 (from kernel version 2.6.15). | ||
204 | |||
205 | kuser_cmpxchg64 | ||
206 | --------------- | ||
207 | |||
208 | Location: 0xffff0f60 | ||
209 | |||
210 | Reference prototype: | ||
211 | |||
212 | int __kuser_cmpxchg64(const int64_t *oldval, | ||
213 | const int64_t *newval, | ||
214 | volatile int64_t *ptr); | ||
215 | |||
216 | Input: | ||
217 | |||
218 | r0 = pointer to oldval | ||
219 | r1 = pointer to newval | ||
220 | r2 = pointer to target value | ||
221 | lr = return address | ||
222 | |||
223 | Output: | ||
224 | |||
225 | r0 = success code (zero or non-zero) | ||
226 | C flag = set if r0 == 0, clear if r0 != 0 | ||
227 | |||
228 | Clobbered registers: | ||
229 | |||
230 | r3, lr, flags | ||
231 | |||
232 | Definition: | ||
233 | |||
234 | Atomically store the 64-bit value pointed by *newval in *ptr only if *ptr | ||
235 | is equal to the 64-bit value pointed by *oldval. Return zero if *ptr was | ||
236 | changed or non-zero if no exchange happened. | ||
237 | |||
238 | The C flag is also set if *ptr was changed to allow for assembly | ||
239 | optimization in the calling code. | ||
240 | |||
241 | Usage example: | ||
242 | |||
243 | typedef int (__kuser_cmpxchg64_t)(const int64_t *oldval, | ||
244 | const int64_t *newval, | ||
245 | volatile int64_t *ptr); | ||
246 | #define __kuser_cmpxchg64 (*(__kuser_cmpxchg64_t *)0xffff0f60) | ||
247 | |||
248 | int64_t atomic_add64(volatile int64_t *ptr, int64_t val) | ||
249 | { | ||
250 | int64_t old, new; | ||
251 | |||
252 | do { | ||
253 | old = *ptr; | ||
254 | new = old + val; | ||
255 | } while(__kuser_cmpxchg64(&old, &new, ptr)); | ||
256 | |||
257 | return new; | ||
258 | } | ||
259 | |||
260 | Notes: | ||
261 | |||
262 | - This routine already includes memory barriers as needed. | ||
263 | |||
264 | - Due to the length of this sequence, this spans 2 conventional kuser | ||
265 | "slots", therefore 0xffff0f80 is not used as a valid entry point. | ||
266 | |||
267 | - Valid only if __kuser_helper_version >= 5 (from kernel version 3.1). | ||
diff --git a/Documentation/arm/nvidia/tegra_parameters.txt b/Documentation/arm/nvidia/tegra_parameters.txt new file mode 100644 index 00000000000..4c73fe7269f --- /dev/null +++ b/Documentation/arm/nvidia/tegra_parameters.txt | |||
@@ -0,0 +1,169 @@ | |||
1 | This file documents NVIDIA Tegra specific sysfs and debugfs files and | ||
2 | kernel module parameters. | ||
3 | |||
4 | /sys/power/suspend/mode | ||
5 | ----------------------- | ||
6 | |||
7 | Used to select the LP1 or LP0 power state during system suspend. | ||
8 | # echo lp0 > /sys/kernel/debug/suspend_mode | ||
9 | # echo lp1 > /sys/kernel/debug/suspend_mode | ||
10 | |||
11 | /sys/module/cpuidle/parameters/lp2_in_idle | ||
12 | ------------------------------------------ | ||
13 | |||
14 | Used to enable/disable LP2 in idle. | ||
15 | # echo 1 > /sys/module/cpuidle/parameters/lp2_in_idle | ||
16 | # echo 0 > /sys/module/cpuidle/parameters/lp2_in_idle | ||
17 | |||
18 | /sys/kernel/debug/cpuidle/lp2 | ||
19 | ----------------------------- | ||
20 | |||
21 | Contains LP2 statistics. | ||
22 | # cat /sys/kernel/debug/cpuidle/lp2 | ||
23 | |||
24 | /sys/kernel/debug/powergate | ||
25 | --------------------------- | ||
26 | |||
27 | Contains power gating state of different tegra blocks. | ||
28 | |||
29 | # cat /sys/kernel/debug/powergate | ||
30 | |||
31 | /sys/module/cpu_tegra3/parameters/auto_hotplug | ||
32 | ---------------------------------------------- | ||
33 | |||
34 | Used to control auto hotplug governor | ||
35 | # echo 0 >/sys/module/cpu_tegra3/parameters/auto_hotplug | ||
36 | # echo 1 >/sys/module/cpu_tegra3/parameters/auto_hotplug | ||
37 | # cat /sys/module/cpu_tegra3/parameters/auto_hotplug | ||
38 | 0: disabled | ||
39 | 1: idle | ||
40 | 2: down | ||
41 | 3: up | ||
42 | |||
43 | /sys/module/cpu_tegra3/parameters/no_lp | ||
44 | --------------------------------------- | ||
45 | |||
46 | Used to enable/disable shadow cluster. | ||
47 | # echo 0 >/sys/module/cpu_tegra3/parameters/no_lp | ||
48 | # echo 1 >/sys/module/cpu_tegra3/parameters/no_lp | ||
49 | |||
50 | /sys/module/cpu_tegra3/parameters/idle_bottom_freq | ||
51 | -------------------------------------------------- | ||
52 | |||
53 | Shadow cluster maximum frequency. | ||
54 | |||
55 | /sys/module/cpu_tegra3/parameters/idle_top_freq | ||
56 | ----------------------------------------------- | ||
57 | |||
58 | Main cluster minimum frequency. | ||
59 | |||
60 | /sys/module/cpu_tegra3/parameters/down_delay | ||
61 | --------------------------------------------- | ||
62 | |||
63 | Auto hotplug delay (in jiffies) for reducing cores. | ||
64 | |||
65 | /sys/module/cpu_tegra3/parameters/up2g0_delay | ||
66 | --------------------------------------------- | ||
67 | |||
68 | Delay (in jiffies) for swithing to main cluster. | ||
69 | |||
70 | /sys/module/cpu_tegra3/parameters/up2gn_delay | ||
71 | --------------------------------------------- | ||
72 | |||
73 | Delay (in jiffies) for bringing additional cores online in main | ||
74 | cluster. | ||
75 | |||
76 | /sys/module/cpu_tegra3/parameters/balance_level | ||
77 | ----------------------------------------------- | ||
78 | |||
79 | Percentage of max speed considered to be in balance. Half of balanced | ||
80 | speed is considered skewed. Speed balance states: | ||
81 | * balanced: freq targets for all CPUs are above 50% of highest speed | ||
82 | * biased: freq target for at least one CPU is below 50% threshold | ||
83 | * skewed: freq targets for at least 2 CPUs are below 25% threshold | ||
84 | Speed balance state and hotplug state dictates auto hotlug behavior. | ||
85 | |||
86 | /sys/module/cpu_tegra3/parameters/mp_overhead | ||
87 | --------------------------------------------- | ||
88 | |||
89 | Multi-core overhead percentage for EDP limit calculation. | ||
90 | |||
91 | /sys/kernel/debug/tegra_hotplug/stats | ||
92 | ------------------------------------- | ||
93 | |||
94 | Contains hotplug statistics. | ||
95 | |||
96 | /sys/kernel/cluster/active | ||
97 | -------------------------- | ||
98 | |||
99 | Controls active CPU cluster: main (G) or shadow (LP). | ||
100 | For manual control disable auto hotlug, enable immediate switch and | ||
101 | possibly force switch to happen always: | ||
102 | # echo 0 > /sys/module/cpu_tegra3/parameters/auto_hotplug | ||
103 | # echo 1 > /sys/kernel/cluster/immediate | ||
104 | # echo 1 > /sys/kernel/cluster/force | ||
105 | |||
106 | Cluster switching can happen only when only core 0 is online. | ||
107 | |||
108 | Active cluster can be set or toggled: | ||
109 | # echo "G" > /sys/kernel/cluster/active | ||
110 | # echo "LP" > /sys/kernel/cluster/active | ||
111 | # echo "toggle" > /sys/kernel/cluster/active | ||
112 | |||
113 | /sys/module/tegra3_clocks/parameters/detach_shared_bus | ||
114 | ------------------------------------------------------ | ||
115 | |||
116 | Enable/disable shared bus clock update. | ||
117 | |||
118 | /sys/module/tegra3_emc/parameters/emc_enable | ||
119 | -------------------------------------------- | ||
120 | |||
121 | Enable/disable EMC DFS. | ||
122 | |||
123 | /sys/kernel/debug/tegra_emc/stats | ||
124 | --------------------------------- | ||
125 | |||
126 | Contains EMC clock statistics. | ||
127 | |||
128 | /sys/module/tegra3_dvfs/parameters/disable_cpu | ||
129 | ---------------------------------------------- | ||
130 | |||
131 | Enable/disable DVFS for CPU domain. | ||
132 | |||
133 | /sys/module/tegra3_dvfs/parameters/disable_core | ||
134 | ----------------------------------------------- | ||
135 | |||
136 | Enable/disable DVFS for CORE domain. | ||
137 | |||
138 | /sys/kernel/debug/clock/emc/rate | ||
139 | -------------------------------- | ||
140 | |||
141 | Get/set EMC clock rate. | ||
142 | |||
143 | /sys/kernel/debug/clock/<module>/rate | ||
144 | ------------------------------------- | ||
145 | |||
146 | /sys/kernel/debug/clock/<module>/parent | ||
147 | --------------------------------------- | ||
148 | |||
149 | /sys/kernel/debug/clock/<module>/state | ||
150 | -------------------------------------- | ||
151 | |||
152 | /sys/kernel/debug/clock/<module>/time_on | ||
153 | ---------------------------------------- | ||
154 | |||
155 | /sys/kernel/debug/clock/clock_tree | ||
156 | ---------------------------------- | ||
157 | |||
158 | Shows the state of the clock tree. | ||
159 | |||
160 | /sys/kernel/debug/clock/dvfs | ||
161 | ---------------------------- | ||
162 | |||
163 | Contains voltage state. | ||
164 | |||
165 | /sys/kernel/debug/tegra_actmon/avp/state | ||
166 | ---------------------------------------- | ||
167 | |||
168 | /sys/kernel/debug/clock/mon.avp/rate | ||
169 | ------------------------------------ | ||