Path: blob/master/arch/h8300/platform/h8s/generic/crt0_rom.S
10820 views
/*1* linux/arch/h8300/platform/h8s/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>13#include <asm/regs267x.h>1415.global SYMBOL_NAME(_start)16.global SYMBOL_NAME(_command_line)17.global SYMBOL_NAME(_platform_gpio_table)18.global SYMBOL_NAME(_target_name)1920.h8300s21.section .text22.file "crt0_rom.S"2324/* CPU Reset entry */25SYMBOL_NAME_LABEL(_start)26mov.l #__ramend,sp27ldc #0x80,ccr28ldc #0,exr29bclr #4,@INTCR:830bset #5,@INTCR:8 /* Interrupt mode 2 */3132/* Peripheral Setup */3334/* copy .data */35#if !defined(CONFIG_H8S_SIM)36mov.l #__begin_data,er537mov.l #__sdata,er638mov.l #__edata,er439sub.l er6,er440shlr.l #2,er4411:42mov.l @er5+,er043mov.l er0,@er644adds #4,er645dec.l #1,er446bne 1b47#endif4849/* .bss clear */50mov.l #__sbss,er551mov.l #__ebss,er452sub.l er5,er453shlr.l #2,er454sub.l er0,er0551:56mov.l er0,@er557adds #4,er558dec.l #1,er459bne 1b6061/* linux kernel start */62ldc #0x90,ccr /* running kernel */63mov.l #SYMBOL_NAME(init_thread_union),sp64add.l #0x2000,sp65jsr @_start_kernel66_exit:6768jmp _exit6970rts7172/* I/O port assign information */73__platform_gpio_table:74mov.l #gpio_table,er075rts7677gpio_table:78;; P1DDR79.byte 0x00,0x0080;; P2DDR81.byte 0x00,0x0082;; P3DDR83.byte 0x00,0x0084;; P4DDR85.byte 0x00,0x0086;; P5DDR87.byte 0x00,0x0088;; P6DDR89.byte 0x00,0x0090;; dummy91.byte 0x00,0x0092;; P8DDR93.byte 0x00,0x0094;; PADDR95.byte 0x00,0x0096;; PBDDR97.byte 0x00,0x0098;; PCDDR99.byte 0x00,0x00100;; PDDDR101.byte 0x00,0x00102;; PEDDR103.byte 0x00,0x00104;; PFDDR105.byte 0x00,0x00106;; PGDDR107.byte 0x00,0x00108;; PHDDR109.byte 0x00,0x00110111.section .rodata112__target_name:113.asciz "generic"114115.section .bss116__command_line:117.space 512118119/* interrupt vector */120.section .vectors,"ax"121.long __start122.long __start123vector = 2124.rept 126-1125.long _interrupt_redirect_table+vector*4126vector = vector + 1127.endr128129130