diff options
Diffstat (limited to 'bootwrapper/boot.S')
-rw-r--r-- | bootwrapper/boot.S | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/bootwrapper/boot.S b/bootwrapper/boot.S index 88cb036..fa4e363 100644 --- a/bootwrapper/boot.S +++ b/bootwrapper/boot.S @@ -1,25 +1,25 @@ ; ; Copyright (c) 2012, ARM Limited. All rights reserved. - ; + ; ; Redistribution and use in source and binary forms, with ; or without modification, are permitted provided that the ; following conditions are met: - ; + ; ; Redistributions of source code must retain the above - ; copyright notice, this list of conditions and the + ; copyright notice, this list of conditions and the ; following disclaimer. ; ; Redistributions in binary form must reproduce the - ; above copyright notice, this list of conditions and - ; the following disclaimer in the documentation + ; above copyright notice, this list of conditions and + ; the following disclaimer in the documentation ; and/or other materials provided with the distribution. - ; + ; ; Neither the name of ARM nor the names of its ; contributors may be used to endorse or promote products ; derived from this software without specific prior written - ; permission. - ; - + ; permission. + ; + AREA |boot|, CODE, ALIGN=2 PRESERVE8 @@ -29,14 +29,14 @@ IMPORT __use_no_heap_region IMPORT output_string IMPORT c_start - IMPORT enable_coherency + IMPORT enable_coherency IMPORT stack - IMPORT stack_size + IMPORT stack_size IMPORT hexword IMPORT read_sctlr IMPORT write_sctlr - IMPORT get_sp - IMPORT inv_icache_all + IMPORT get_sp + IMPORT inv_icache_all EXPORT start EXPORT dabort @@ -48,27 +48,27 @@ EXPORT unused EXPORT dead -;------------------------------------------------------------------------------ +;------------------------------------------------------------------------------ ; Boot code starts here - identify the CPU type, set up stacks and call c_start -;------------------------------------------------------------------------------ +;------------------------------------------------------------------------------ start bl inv_icache_all ;------------------------------------------------------------------ ; Enable ICache, branch predictor and alignment - ;------------------------------------------------------------------ + ;------------------------------------------------------------------ bl read_sctlr - bic r0, r0, #CR_C + bic r0, r0, #CR_C orr r0, r0, #CR_Z orr r0, r0, #CR_I - ;------------------------------------------------------------------ + ;------------------------------------------------------------------ ; Set U bit - the C compiler produces non-64-bit-aligned LDRD/STRDs - ;------------------------------------------------------------------ + ;------------------------------------------------------------------ orr r0, #CR_U bl write_sctlr ;------------------------------------------------------------------ - ; Give yourself a stack to make things easier - ;------------------------------------------------------------------ + ; Give yourself a stack to make things easier + ;------------------------------------------------------------------ ldr r0, =stack ldr r1, =stack_size ldr r1, [r1] @@ -77,8 +77,8 @@ start ;------------------------------------------------------------------ ; Caches are inavlidated at reset & MMU is off. So its safe to - ; enable coherency - ;------------------------------------------------------------------ + ; enable coherency + ;------------------------------------------------------------------ ;; bl enable_coherency ;------------------------------------------------------------------ @@ -87,15 +87,15 @@ start ;------------------------------------------------------------------ ; Jump to the C handler - ;------------------------------------------------------------------ + ;------------------------------------------------------------------ bl c_start ;------------------------------------------------------------------ ; Should never come here - ;------------------------------------------------------------------ + ;------------------------------------------------------------------ kernel_returned b kernel_returned - + ; ============================================================================== ; End of main code ; ============================================================================== @@ -122,10 +122,10 @@ fiq_string unused_string DCB " Emubuild-UNU!", 0 - ALIGN - + ALIGN + ; ============================================================================== -; Exception handlers - for most exceptions we spin +; Exception handlers - for most exceptions we spin ; ============================================================================== dabort @@ -139,7 +139,7 @@ dabort mrc p15,0,r0,c6,c0,0 ; DFAR bl hexword - + ldr r0, =dabort_string bl output_string b dead |