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

Subversion Repositories or1k

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
        .global __text_start
2
        .global __main
3
        .global __bss_start
4
        .global __bss_end
5
        .global __ram_start
6
        .global __ram_end
7
        .global __rom_start
8
        .global __rom_end
9
        .global __data_start
10
        .global __data_end
11
 
12
        .global splash_bits
13
        .global _start
14
        .global _stext
15
 
16
#define DEBUG
17
#define ROM_OFFSET 0x10C00000
18
#define STACK_GAURD 0x10
19
 
20
        .data
21
splash_bits:
22
#include "bootlogo.rh"
23
 
24
        .text
25
 
26
_start:
27
_stext:
28
        /* At this point, %a0 contains a pointer to the
29
           list of pages, which are in order but not
30
           necessarily contiguous.  We have to move
31
           things around, set up the stack and get into
32
           the kernel.  PalmOS has done much of the hard
33
           work for us setting up the hardware */
34
 
35
        movew   #0x2700, %sr            /* Exceptions off! */
36
        movew   #0x2400, 0xfffff200     /* PLLCR */
37
        movew   #0x0123, 0xfffff202     /* PLLFSR */
38
        moveb   #0x1f,   0xfffff207     /* Full power */
39
 
40
        /* Init chip registers.  PalmV specific */
41
        /* PalmOS has setup the device.  We just get on with it */
42
 
43
        movel   #splash_bits, 0xfffffA00 /* LSSA */
44
 
45
        moveb   #0x20,   0xfffff419     /* ForceON RS232 driver */
46
        moveb   #0x08,   0xfffff906     /* Ignore CTS */
47
        movew   #0x00c0, 0xfffff908     /* No, not Fscking IrDA */
48
        movew   #0x010b, 0xfffff902     /* BAUD to 9600 */
49
        movew   #0xe100, 0xfffff900     /* enable */
50
 
51
        movew   #16384, %d0  /* PLL settle wait loop */
52
L0:
53
        subw    #1, %d0
54
        bne     L0
55
 
56
        /* My parts are scattered, %a0 has a list.  Make me whole */
57
        moveal  #0x1400, %a2            /* FIXME: Hard coded load address */
58
        moveal  %a0@+, %a1              /* Move to page 1 (this is page 0) */
59
mvlp0:
60
#ifdef DEBUG
61
        moveq   #70, %d7                /* 'F' */
62
        moveb   %d7,0xfffff907          /* No absolute addresses */
63
pclp1:
64
        movew   0xfffff906, %d7
65
        andw    #0x2000, %d7
66
        beq     pclp1
67
#endif /* DEBUG */
68
        movew   #1024, %d6
69
        moveal  %a0@+, %a1
70
        movel   %a1, %d0
71
        beq     mvdone
72
mvlp1:
73
        movel   %a1@+, %d0
74
        movel   %d0, %a2@+
75
        subw    #1, %d6
76
#if 1
77
        bne     mvlp1
78
        bra     mvlp0
79
#endif
80
mvdone:
81
 
82
#ifdef DEBUG
83
        moveq   #82, %d7                /* 'R' */
84
        moveb   %d7,0xfffff907          /* No absolute addresses */
85
pclp3:
86
        movew   0xfffff906, %d7
87
        andw    #0x2000, %d7
88
        beq     pclp3
89
#endif /* DEBUG */
90
        moveal  #0x001ffff0, %ssp
91
        moveal  #__bss_start, %a0
92
        moveal  #__bss_end, %a1
93
 
94
        /* Copy 0 to %a0 until %a0 >= %a1 */
95
L1:
96
        movel   #0, %a0@+
97
        cmpal   %a0, %a1
98
        bhi     L1
99
 
100
#ifdef DEBUG
101
        moveq   #67, %d7                /* 'C' */
102
        jsr     putc
103
#endif /* DEBUG */
104
 
105
        pea     0
106
        pea     env
107
        pea     %sp@(4)
108
        pea     0
109
 
110
#ifdef DEBUG
111
        moveq   #70, %d7                /* 'F' */
112
        jsr     putc
113
#endif /* DEBUG */
114
 
115
lp:
116
        jsr     start_kernel
117
        jmp lp
118
_exit:
119
 
120
        jmp     _exit
121
 
122
__main:
123
        /* nothing */
124
        rts
125
 
126
#ifdef DEBUG
127
putc:
128
        moveb   %d7,0xfffff907
129
pclp:
130
        movew   0xfffff906, %d7
131
        andw    #0x2000, %d7
132
        beq     pclp
133
        rts
134
#endif /* DEBUG */
135
 
136
        .data
137
env:
138
        .long   0

powered by: WebSVN 2.1.0

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