diff options
author | Mark Rutland <mark.rutland@arm.com> | 2013-10-11 09:52:07 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2013-10-24 10:47:20 -0400 |
commit | 4fcd6e1416b0424f94ede03cb322a323a640bf4b (patch) | |
tree | 05ecbd210dc0ad6d253be129bbb164fdee378481 | |
parent | 2a3f912c782f2364f5e5813ab66ca6c92fb43acb (diff) |
Docs: arm64: booting: clarify boot requirements
There are a few points in the arm64 booting document which are unclear
(such as the initial state of secondary CPUs), and/or have not been
documented (PSCI is a supported mechanism for booting secondary CPUs).
This patch amends the arm64 boot document to better express the
(existing) requirements, and to describe PSCI as a supported booting
mechanism.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Martin <dave.martin@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Fu Wei <tekkamanninja@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r-- | Documentation/arm64/booting.txt | 45 |
1 files changed, 31 insertions, 14 deletions
diff --git a/Documentation/arm64/booting.txt b/Documentation/arm64/booting.txt index 98df4a03807e..a9691cc48fe3 100644 --- a/Documentation/arm64/booting.txt +++ b/Documentation/arm64/booting.txt | |||
@@ -115,9 +115,10 @@ Before jumping into the kernel, the following conditions must be met: | |||
115 | External caches (if present) must be configured and disabled. | 115 | External caches (if present) must be configured and disabled. |
116 | 116 | ||
117 | - Architected timers | 117 | - Architected timers |
118 | CNTFRQ must be programmed with the timer frequency. | 118 | CNTFRQ must be programmed with the timer frequency and CNTVOFF must |
119 | If entering the kernel at EL1, CNTHCTL_EL2 must have EL1PCTEN (bit 0) | 119 | be programmed with a consistent value on all CPUs. If entering the |
120 | set where available. | 120 | kernel at EL1, CNTHCTL_EL2 must have EL1PCTEN (bit 0) set where |
121 | available. | ||
121 | 122 | ||
122 | - Coherency | 123 | - Coherency |
123 | All CPUs to be booted by the kernel must be part of the same coherency | 124 | All CPUs to be booted by the kernel must be part of the same coherency |
@@ -130,30 +131,46 @@ Before jumping into the kernel, the following conditions must be met: | |||
130 | the kernel image will be entered must be initialised by software at a | 131 | the kernel image will be entered must be initialised by software at a |
131 | higher exception level to prevent execution in an UNKNOWN state. | 132 | higher exception level to prevent execution in an UNKNOWN state. |
132 | 133 | ||
134 | The requirements described above for CPU mode, caches, MMUs, architected | ||
135 | timers, coherency and system registers apply to all CPUs. All CPUs must | ||
136 | enter the kernel in the same exception level. | ||
137 | |||
133 | The boot loader is expected to enter the kernel on each CPU in the | 138 | The boot loader is expected to enter the kernel on each CPU in the |
134 | following manner: | 139 | following manner: |
135 | 140 | ||
136 | - The primary CPU must jump directly to the first instruction of the | 141 | - The primary CPU must jump directly to the first instruction of the |
137 | kernel image. The device tree blob passed by this CPU must contain | 142 | kernel image. The device tree blob passed by this CPU must contain |
138 | for each CPU node: | 143 | an 'enable-method' property for each cpu node. The supported |
139 | 144 | enable-methods are described below. | |
140 | 1. An 'enable-method' property. Currently, the only supported value | ||
141 | for this field is the string "spin-table". | ||
142 | |||
143 | 2. A 'cpu-release-addr' property identifying a 64-bit, | ||
144 | zero-initialised memory location. | ||
145 | 145 | ||
146 | It is expected that the bootloader will generate these device tree | 146 | It is expected that the bootloader will generate these device tree |
147 | properties and insert them into the blob prior to kernel entry. | 147 | properties and insert them into the blob prior to kernel entry. |
148 | 148 | ||
149 | - Any secondary CPUs must spin outside of the kernel in a reserved area | 149 | - CPUs with a "spin-table" enable-method must have a 'cpu-release-addr' |
150 | of memory (communicated to the kernel by a /memreserve/ region in the | 150 | property in their cpu node. This property identifies a |
151 | naturally-aligned 64-bit zero-initalised memory location. | ||
152 | |||
153 | These CPUs should spin outside of the kernel in a reserved area of | ||
154 | memory (communicated to the kernel by a /memreserve/ region in the | ||
151 | device tree) polling their cpu-release-addr location, which must be | 155 | device tree) polling their cpu-release-addr location, which must be |
152 | contained in the reserved region. A wfe instruction may be inserted | 156 | contained in the reserved region. A wfe instruction may be inserted |
153 | to reduce the overhead of the busy-loop and a sev will be issued by | 157 | to reduce the overhead of the busy-loop and a sev will be issued by |
154 | the primary CPU. When a read of the location pointed to by the | 158 | the primary CPU. When a read of the location pointed to by the |
155 | cpu-release-addr returns a non-zero value, the CPU must jump directly | 159 | cpu-release-addr returns a non-zero value, the CPU must jump to this |
156 | to this value. | 160 | value. The value will be written as a single 64-bit little-endian |
161 | value, so CPUs must convert the read value to their native endianness | ||
162 | before jumping to it. | ||
163 | |||
164 | - CPUs with a "psci" enable method should remain outside of | ||
165 | the kernel (i.e. outside of the regions of memory described to the | ||
166 | kernel in the memory node, or in a reserved area of memory described | ||
167 | to the kernel by a /memreserve/ region in the device tree). The | ||
168 | kernel will issue CPU_ON calls as described in ARM document number ARM | ||
169 | DEN 0022A ("Power State Coordination Interface System Software on ARM | ||
170 | processors") to bring CPUs into the kernel. | ||
171 | |||
172 | The device tree should contain a 'psci' node, as described in | ||
173 | Documentation/devicetree/bindings/arm/psci.txt. | ||
157 | 174 | ||
158 | - Secondary CPU general-purpose register settings | 175 | - Secondary CPU general-purpose register settings |
159 | x0 = 0 (reserved for future use) | 176 | x0 = 0 (reserved for future use) |