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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [arch/] [m68knommu/] [platform/] [68EZ328/] [alma_ans/] [crt0_ram.S] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
/* arch/m68knommu/platform/68EZ328/alma_ans_ram-head.S
2
 *
3
 * Copyright (C) 1999  Vladimir Gurevich 
4
 *                     Bear & Hare Software, Inc.
5
 *
6
 * Based on: arch/m68knommu/platform/68EZ328/pilot-head.S
7
 * Copyright (C) 1998  D. Jeff Dionne ,
8
 *                     Kenneth Albanowski ,
9
 *                     The Silver Hammer Group, Ltd.
10
 */
11
 
12
        .global _stext
13
        .global _start
14
        .global __bss_start
15
        .global _ramend
16
        .global _boot_stack
17
 
18
#define ASSEMBLY
19
 
20
#include 
21
#include 
22
 
23
        .text
24
_start:
25
_stext:
26
        /*
27
         * We do not need to program the basic registers here, since
28
         * this is an image which is loaded directly into DRAM. It
29
         * is the xxx-init.b file that will take care of that.
30
         */
31
 
32
        moveal  #_boot_stack, %sp
33
        movew   #0x2700, %sr
34
 
35
        /*
36
         * Here we start doing some real things
37
         */
38
        moveq   #13, %d7                /* '\r' */
39
        jsr putc
40
 
41
        moveq   #10, %d7                /* '\n' */
42
        jsr putc
43
 
44
        moveq   #65, %d7                /* 'A' */
45
        jsr putc
46
 
47
        movew   #16384, %d0  /* PLL settle wait loop */
48
L0:
49
        subw    #1, %d0
50
        bne     L0
51
 
52
        moveq   #66, %d7                /* 'B' */
53
        jsr     putc
54
 
55
        moveal  #__bss_start, %a0
56
        moveal  #end, %a1
57
 
58
        /* Copy 0 to %a0 until %a0 == %a1 */
59
L1:
60
        movel   #0, %a0@+
61
        cmpal   %a0, %a1
62
        bhi     L1
63
 
64
        moveq   #67, %d7                /* 'C' */
65
        jsr     putc
66
 
67
        pea     0
68
        pea     env
69
        pea     %sp@(4)
70
        pea     0
71
 
72
        moveq   #68, %d7                /* 'D' */
73
        jsr     putc
74
 
75
 
76
lp:
77
        jsr     start_kernel
78
        jmp lp
79
_exit:
80
 
81
        jmp     _exit
82
 
83
 
84
putc:
85
        moveb   %d7,UTX_TXDATA_ADDR
86
pclp:
87
        movew   UTX_ADDR, %d7
88
        andw    #UTX_TX_AVAIL, %d7
89
        beq     pclp
90
        rts
91
 
92
        .data
93
env:
94
        .long   0
95
        .text

powered by: WebSVN 2.1.0

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