All pastes #83934 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-07-10 09:06 UTC
rendered paste body
(line 247)/*bl code for debugging*/

		add	r0, r0, #127
		bic	r0, r0, #127		@ align the kernel length
/*
 * r0     = decompressed kernel length
 * r1-r3  = unused
 * r4     = kernel execution address
 * r5     = decompressed kernel start
 * r6     = processor ID
 * r7     = architecture ID
 * r8     = atags pointer
 * r9-r14 = corrupted
 */
		add	r1, r5, r0		@ end of decompressed kernel
		adr	r2, reloc_start
		ldr	r3, LC1
		add	r3, r2, r3
1:		ldmia	r2!, {r9 - r14}		@ copy relocation code
		stmia	r1!, {r9 - r14}
		ldmia	r2!, {r9 - r14}
		stmia	r1!, {r9 - r14}
		cmp	r2, r3
		blo	1b

		bl	cache_clean_flush
		add	pc, r5, r0		@ call relocation code

/*
 * We're not in danger of overwriting ourselves.  Do this the simple way.
 *
 * r4     = kernel execution address
 * r7     = architecture ID
 */


wont_overwrite:	mov	r0, r4
		mov	r3, r7
		bl	decompress_kernel
		b	call_kernel

/*bl code for debugging purposes*/
	mov	r13, #0x0
	mov	r14, #0x41000000
	orr	r14, r14, #0x00300000
	orr	r14, r14, #0x00000004
	strb	r13, [r14]
(line 294)/*end bl code -- this code does not turn off the backlight, but it should. Does booting linux make it this far?*/