1 /* start.S - start, bzero */
5 /*------------------------------------------------------------------------
6 * start - Initial entry point for a Xinu image (ARM)
7 *------------------------------------------------------------------------
10 .globl start /* Declare entry point global */
13 /* Load the stack pointer with end of memory */
17 /* Enable the Instruction Cache */
19 mrc p15, 0, r0, c1, c0, 0
20 orr r0, r0, #ARMV7A_C1CTL_I
21 mcr p15, 0, r0, c1, c0, 0
23 /* Use bzero (below) to zero out the BSS area */
29 /* Call nulluser to initialize the Xinu system */
30 /* (Note: the call never returns) */
34 /* Function to zero memory (r0 is lowest addr; r1 is highest) */
37 mov r2, #0 /* Round address to multiple */
38 add r0, r0, #3 /* of four by adding 3 and */
39 and r0, r0, #0xFFFFFFFC /* taking the result module 4 */
40 bloop: cmp r0, r1 /* Loop until last address */
41 bhs bexit /* has been reached */
42 str r2, [r0] /* Zero four-byte word of memory*/
43 add r0, r0, #4 /* Move to next word */
44 b bloop /* Continue to iterate */
45 bexit: mov pc, lr /* Return to caller */