Changeset 991779c5 in mainline for arch/sparc64/src/start.S


Ignore:
Timestamp:
2006-07-04T14:59:10Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7f1c620
Parents:
a6dd361
Message:

Make sparc64 kernel assume it is loaded by our loader.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/sparc64/src/start.S

    ra6dd361 r991779c5  
    4444.global kernel_image_start
    4545kernel_image_start:
    46 0:
    47         b 1f
    48         nop
    49 
    50 /*
    51  * This header forces SILO to load the kernel at 0x4000.
    52  * More precisely, SILO will think this is an old version of Linux.
    53  */
    54 .ascii "HdrS"
    55 .word 0
    56 .half 0
    57 
    58 .align 8
    59 
    60 1:
    6146        flushw                          ! flush all but the active register window
    6247
    63         /*
    64          * Prepare to copy the kernel image to 4M.
    65          */
    66 
    67         set LMA, %g1                    ! source address
    68         set VMA, %g2                    ! destination address
    69         set hardcoded_ktext_size, %g3   ! link address of hardcoded_ktext_size
    70         set hardcoded_kdata_size, %g4   ! link address of hardcoded_kdata_size
    71 
    72         sub %g3, %g2, %g3               ! offset of hardcoded_ktext_size from the beginning of the load address
    73         sub %g4, %g2, %g4               ! offset of hardcoded_kdata_size from the beginning of the load address
    74        
    75         ldx [%g3 + %g1], %g3            ! hardcoded_ktext_size -> %g3
    76         ldx [%g4 + %g1], %g4            ! hardcoded_kdata_size -> %g4
    77 
    78         add %g3, %g4, %g3               ! size of kernel text and data
    79 
    80         /*
    81          * Start copying the kernel from higher addresses towards lower addresses.
    82          */
    83 
    84 2:      dec %g3
    85         ldub [%g1 + %g3], %g4
    86         stb %g4, [%g2 + %g3]
    87         cmp %g3, 0
    88         bnz 2b
    89         nop
    90 
    91         set relocated, %g1
    92         jmp %g1
    93         nop
    94 
    95 relocated:
    9648        set ofw, %l0
    9749
Note: See TracChangeset for help on using the changeset viewer.