OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [arch/] [ppc/] [boot/] [compressed/] [head.S] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1624 jcastillo
#include "ppc_defs.h"
2
 
3
        .text
4
/*
5
 * This code may be executed by a bootstrap process.  If so, the
6
 * purpose is to relocate the loaded image to it's final location
7
 * in memory.
8
 *    R3: End of image
9
 *    R4: Start of image - 0x400
10
 *
11
 */
12
        .globl  start
13
start:
14
        addi    r4,r4,0x400     /* Point at start of image */
15
        lis     r5,start@h      /* Load address */
16
        ori     r5,r5,start@l
17
        subi    r4,r4,4         /* Adjust for auto-increment */
18
        subi    r5,r5,4
19
        subi    r3,r3,4
20
00:     lwzu    r0,4(r4)        /* Fast move */
21
        stwu    r0,4(r5)
22
        cmp     0,r3,r4
23
        bne     00b
24
        lis     r5,continue@h   /* Actual code starts here */
25
        ori     r5,r5,continue@l
26
        mtlr    r5
27
        blr
28
 
29
continue:
30
        bl      decompress_kernel
31
        li      r5,0x100        /* Kernel code starts here */
32
        mtlr    r5
33
        blr

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.