123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241 |
- #include <linux/linkage.h>
- #include <linux/init.h>
- #include <asm/asm-offsets.h>
- #include <asm/thread_info.h>
- #ifdef CONFIG_MEMORY_RESERVE
- #define RAMEND (CONFIG_RAMBASE+CONFIG_RAMSIZE)-(CONFIG_MEMORY_RESERVE*0x100000)
- #else
- #define RAMEND (CONFIG_RAMBASE+CONFIG_RAMSIZE)
- #endif
- .global _start
- .global _rambase
- .global _ramvec
- .global _ramstart
- .global _ramend
- #if defined(CONFIG_PILOT) || defined(CONFIG_INIT_LCD)
- .global bootlogo_bits
- #endif
- #undef DEBUG_HEAD_CODE
- .data
- _rambase:
- .long 0
- _ramvec:
- .long 0
- _ramstart:
- .long 0
- _ramend:
- .long 0
- __HEAD
- _start:
- #ifdef CONFIG_PILOT
- .byte 0x4e, 0xfa, 0x00, 0x0a
- .byte 'b', 'o', 'o', 't'
- .word 10000
- nop
- moveq #0, %d0
- movew %d0, 0xfffff618
- movel #0x00011f07, 0xfffff114
- #endif
- movew #0x2700, %sr
- #if defined(CONFIG_M68328) || \
- defined(CONFIG_M68EZ328) || \
- defined(CONFIG_M68VZ328)
- #ifdef DEBUG_HEAD_CODE
- movew #0x0800, 0xfffff906
- movew #0x010b, 0xfffff902
- movew #0xe100, 0xfffff900
- #endif
- #ifdef CONFIG_PILOT
- movew #0x2410, 0xfffff200
- #else
- movew #0x2400, 0xfffff200
- #endif
- movew #0x0123, 0xfffff202
- moveq #0, %d0
- movew #16384, %d0
- _pll_settle:
- subw #1, %d0
- bne _pll_settle
- #endif
- #ifdef CONFIG_ROMKERNEL
- #ifdef CONFIG_UCSIMM
- moveb #0x00, 0xfffffb0b
- moveb #0x10, 0xfffff000
- moveb #0x00, 0xfffff40b
- moveb #0x00, 0xfffff423
- moveb #0x08, 0xfffffd0d
- moveb #0x07, 0xfffffd0e
- movew #0x8600, 0xfffff100
- movew #0x018b, 0xfffff110
- movew #0x8f00, 0xfffffc00
- movew #0x9667, 0xfffffc02
- movew #0x0000, 0xfffff106
- movew #0x068f, 0xfffff116
- moveb #0x40, 0xfffff300
- movel #0x007FFFFF, %d0
- movel %d0, 0xfffff304
- moveb 0xfffff42b, %d0
- andb #0xe0, %d0
- moveb %d0, 0xfffff42b
- #endif
- #ifdef CONFIG_INIT_LCD
- #ifdef CONFIG_PILOT
- moveb #0, 0xfffffA27
- movel #_start, 0xfffffA00
- moveb #0xa, 0xfffffA05
- movew #0x9f, 0xFFFFFa08
- movew #0x9f, 0xFFFFFa0a
- moveb #9, 0xfffffa29
- moveb #0, 0xfffffa25
- moveb #0x04, 0xFFFFFa20
- moveb #0x58, 0xfffffA27
- moveb #0x85, 0xfffff429
- moveb #0xd8, 0xfffffA27
- moveb #0xc5, 0xfffff429
- moveb #0xd5, 0xfffff429
- movel #bootlogo_bits, 0xFFFFFA00
- moveb #10, 0xFFFFFA05
- movew #160, 0xFFFFFA08
- movew #160, 0xFFFFFA0A
- #else
- movel #bootlogo_bits, 0xfffffA00
- moveb #0x28, 0xfffffA05
- movew #0x280, 0xFFFFFa08
- movew #0x1df, 0xFFFFFa0a
- moveb #0, 0xfffffa29
- moveb #0, 0xfffffa25
- moveb #0x08, 0xFFFFFa20
- moveb #0x01, 0xFFFFFA21
- moveb #0x81, 0xfffffA27
- movew #0xff00, 0xfffff412
- #endif
- #endif
- moveal #_etext, %a0
- moveal #_sdata, %a1
- moveal #__bss_start, %a2
- _copy_initmem:
- movel %a0@+, %a1@+
- cmpal %a1, %a2
- bhi _copy_initmem
- #endif
- movel #CONFIG_VECTORBASE,_ramvec
- movel #CONFIG_RAMBASE,_rambase
- movel #RAMEND, _ramend
- lea __bss_stop,%a1
- movel %a1,_ramstart
- #if defined(CONFIG_ROMFS_FS) && defined(CONFIG_RAMKERNEL) && \
- defined(CONFIG_MTD_UCLINUX)
- lea __bss_start, %a0
- lea __bss_stop, %a1
- movel %a0, %a2
- movel 8(%a0), %d0
- addql #8, %d0
- andl #0xfffffffc, %d0
- addl %d0, %a0
- addl %d0, %a1
- movel %a1, _ramstart
- _copy_romfs:
- movel -(%a0), -(%a1)
- cmpl %a0, %a2
- bne _copy_romfs
- #endif
- lea __bss_start, %a0
- lea __bss_stop, %a1
- _clear_bss:
- movel #0, (%a0)+
- cmpl %a0, %a1
- bne _clear_bss
- lea init_thread_union,%a0
- lea THREAD_SIZE(%a0),%sp
- jsr start_kernel
- _exit:
- jmp _exit
|