aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/head_44x.S
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2007-05-07 22:59:31 -0400
committerPaul Mackerras <paulus@samba.org>2007-05-08 00:47:33 -0400
commitd9b55a03611ff2e2e54fb4e1ad2648d5eb870fa3 (patch)
tree5704be539afcd6f29b1f5751476c8b4f53673bff /arch/powerpc/kernel/head_44x.S
parentf6dfc80554b27da11dbb36ebae166b23ec3aa9ca (diff)
[POWERPC] Early serial debug support for PPC44x
This adds support for early serial debugging via the built in port on IBM/AMCC PowerPC 44x CPUs. It uses a bolted TLB entry in address space 1 for the UART's mapping, allowing robust debugging both before and after the initialization of the MMU. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/head_44x.S')
-rw-r--r--arch/powerpc/kernel/head_44x.S34
1 files changed, 13 insertions, 21 deletions
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S
index a51026f0a9d7..88695963f587 100644
--- a/arch/powerpc/kernel/head_44x.S
+++ b/arch/powerpc/kernel/head_44x.S
@@ -172,36 +172,28 @@ skpinv: addi r4,r4,1 /* Increment */
172 isync 172 isync
173 173
1744: 1744:
175#ifdef CONFIG_SERIAL_TEXT_DEBUG 175#ifdef CONFIG_PPC_EARLY_DEBUG_44x
176 /* 176 /* Add UART mapping for early debug. */
177 * Add temporary UART mapping for early debug. 177
178 * We can map UART registers wherever we want as long as they don't
179 * interfere with other system mappings (e.g. with pinned entries).
180 * For an example of how we handle this - see ocotea.h. --ebs
181 */
182 /* pageid fields */ 178 /* pageid fields */
183 lis r3,UART0_IO_BASE@h 179 lis r3,PPC44x_EARLY_DEBUG_VIRTADDR@h
184 ori r3,r3,PPC44x_TLB_VALID | PPC44x_TLB_4K 180 ori r3,r3,PPC44x_TLB_VALID|PPC44x_TLB_TS|PPC44x_TLB_64K
185 181
186 /* xlat fields */ 182 /* xlat fields */
187 lis r4,UART0_PHYS_IO_BASE@h /* RPN depends on SoC */ 183 lis r4,CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW@h
188#ifndef CONFIG_440EP 184 ori r4,r4,CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH
189 ori r4,r4,0x0001 /* ERPN is 1 for second 4GB page */
190#endif
191 185
192 /* attrib fields */ 186 /* attrib fields */
193 li r5,0 187 li r5,(PPC44x_TLB_SW|PPC44x_TLB_SR|PPC44x_TLB_I|PPC44x_TLB_G)
194 ori r5,r5,(PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_I | PPC44x_TLB_G) 188 li r0,62 /* TLB slot 0 */
195 189
196 li r0,0 /* TLB slot 0 */ 190 tlbwe r3,r0,PPC44x_TLB_PAGEID
197 191 tlbwe r4,r0,PPC44x_TLB_XLAT
198 tlbwe r3,r0,PPC44x_TLB_PAGEID /* Load the pageid fields */ 192 tlbwe r5,r0,PPC44x_TLB_ATTRIB
199 tlbwe r4,r0,PPC44x_TLB_XLAT /* Load the translation fields */
200 tlbwe r5,r0,PPC44x_TLB_ATTRIB /* Load the attrib/access fields */
201 193
202 /* Force context change */ 194 /* Force context change */
203 isync 195 isync
204#endif /* CONFIG_SERIAL_TEXT_DEBUG */ 196#endif /* CONFIG_PPC_EARLY_DEBUG_44x */
205 197
206 /* Establish the interrupt vector offsets */ 198 /* Establish the interrupt vector offsets */
207 SET_IVOR(0, CriticalInput); 199 SET_IVOR(0, CriticalInput);