Path: blob/master/arch/h8300/platform/h8300h/generic/crt0_rom.S
10820 views
/*1* linux/arch/h8300/platform/h8300h/generic/crt0_rom.S2*3* Yoshinori Sato <[email protected]>4*5* Platform depend startup6* Target Archtecture: generic7* Memory Layout : ROM8*/910#define ASSEMBLY1112#include <asm/linkage.h>1314.global SYMBOL_NAME(_start)15.global SYMBOL_NAME(_command_line)16.global SYMBOL_NAME(_platform_gpio_table)17.global SYMBOL_NAME(_target_name)1819.h8300h20.section .text21.file "crt0_rom.S"2223/* CPU Reset entry */24SYMBOL_NAME_LABEL(_start)25mov.l #__ramend,sp26ldc #0x80,ccr2728/* Peripheral Setup */2930/* .bss clear */31mov.l #__sbss,er532mov.l #__ebss,er433sub.l er5,er434shlr er435shlr er436sub.l er0,er0371:38mov.l er0,@er539adds #4,er540dec.l #1,er441bne 1b4243/* copy .data */44#if !defined(CONFIG_H8300H_SIM)45/* copy .data */46mov.l #__begin_data,er547mov.l #__sdata,er648mov.l #__edata,er449sub.l er6,er450shlr.l er451shlr.l er4521:53mov.l @er5+,er054mov.l er0,@er655adds #4,er656dec.l #1,er457bne 1b58#endif5960/* copy kernel commandline */61mov.l #COMMAND_START,er562mov.l #SYMBOL_NAME(_command_line),er663mov.w #512,r464eepmov.w6566/* linux kernel start */67ldc #0x90,ccr /* running kernel */68mov.l #SYMBOL_NAME(init_thread_union),sp69add.l #0x2000,sp70jsr @_start_kernel71_exit:7273jmp _exit7475rts7677/* I/O port assign information */78__platform_gpio_table:79mov.l #gpio_table,er080rts8182gpio_table:83;; P1DDR84.byte 0x00,0x0085;; P2DDR86.byte 0x00,0x0087;; P3DDR88.byte 0x00,0x0089;; P4DDR90.byte 0x00,0x0091;; P5DDR92.byte 0x00,0x0093;; P6DDR94.byte 0x00,0x0095;; dummy96.byte 0x00,0x0097;; P8DDR98.byte 0x00,0x0099;; P9DDR100.byte 0x00,0x00101;; PADDR102.byte 0x00,0x00103;; PBDDR104.byte 0x00,0x00105106.section .rodata107__target_name:108.asciz "generic"109110.section .bss111__command_line:112.space 512113114/* interrupt vector */115.section .vectors,"ax"116.long __start117vector = 1118.rept 64-1119.long _interrupt_redirect_table+vector*4120vector = vector + 1121.endr122123124