Commit db5ede6f authored by Geert Uytterhoeven's avatar Geert Uytterhoeven

h8300: Hardcode symbol prefixes in asm sources

Commit e1b5bb6d ("consolidate cond_syscall
and SYSCALL_ALIAS declarations") broke the h8300 build because it removed
the duplicate SYMBOL_NAME() macro from arch/h8300/include/asm/linkage.h,
and all the h8300 asm files include <asm/linkage.h> instead of
<linux/linkage.h>:

    arch/h8300/kernel/entry.S: Assembler messages:
    arch/h8300/kernel/entry.S:158: Error: junk at end of line, first unrecognized character is `('
    ...
    arch/h8300/kernel/syscalls.S: Assembler messages:
    arch/h8300/kernel/syscalls.S:6: Error: junk at end of line, first unrecognized character is `('
    ...
    arch/h8300/lib/abs.S: Assembler messages:
    arch/h8300/lib/abs.S:12: Error: junk at end of line, first unrecognized character is `('
    ...
    arch/h8300/lib/memcpy.S: Assembler messages:
    arch/h8300/lib/memcpy.S:13: Error: junk at end of line, first unrecognized character is `('
    ...
    arch/h8300/lib/memset.S: Assembler messages:
    arch/h8300/lib/memset.S:13: Error: junk at end of line, first unrecognized character is `('
    ...

Commit 126de6b2 ("linkage.h: fix build
breakage due to symbol prefix handling") broke it even more, by removing
SYMBOL_NAME() and replacing it by __SYMBOL_NAME().

Commit f8ce1faf ("Merge tag
'modules-next-for-linus' of
git://git.kernel.org/pub/scm/linuxkernel/git/rusty/linux")
also removed __SYMBOL_NAME(), hidden in a merge conflict resolution.

Hence, replace the use of SYMBOL_NAME() and SYMBOL_NAME_LABEL() in h8300
assembler sources by hardcoding the underscore symbol prefix, like other
architectures (blackfin/metag) do.

This allows to kill SYMBOL_NAME_LABEL(). Now <asm/linkage.h> becomes empty,
and h8300 can be switched to asm-generic/linkage.h.
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent c805a5b7
generic-y += clkdev.h generic-y += clkdev.h
generic-y += exec.h generic-y += exec.h
generic-y += linkage.h
generic-y += mmu.h generic-y += mmu.h
generic-y += module.h generic-y += module.h
generic-y += trace_clock.h generic-y += trace_clock.h
#ifndef _H8300_LINKAGE_H
#define _H8300_LINKAGE_H
#undef SYMBOL_NAME_LABEL
#define SYMBOL_NAME_LABEL(_name_) _##_name_##:
#endif
...@@ -87,13 +87,13 @@ INTERRUPTS = 128 ...@@ -87,13 +87,13 @@ INTERRUPTS = 128
bne 5f bne 5f
/* user mode */ /* user mode */
mov.l sp,@SYMBOL_NAME(sw_usp) mov.l sp,@_sw_usp
mov.l @sp,er0 /* restore saved er0 */ mov.l @sp,er0 /* restore saved er0 */
orc #0x10,ccr /* switch kernel stack */ orc #0x10,ccr /* switch kernel stack */
mov.l @SYMBOL_NAME(sw_ksp),sp mov.l @_sw_ksp,sp
sub.l #(LRET-LORIG),sp /* allocate LORIG - LRET */ sub.l #(LRET-LORIG),sp /* allocate LORIG - LRET */
SAVEREGS SAVEREGS
mov.l @SYMBOL_NAME(sw_usp),er0 mov.l @_sw_usp,er0
mov.l @(USERRET:16,er0),er1 /* copy the RET addr */ mov.l @(USERRET:16,er0),er1 /* copy the RET addr */
mov.l er1,@(LRET-LER3:16,sp) mov.l er1,@(LRET-LER3:16,sp)
SAVEEXR SAVEEXR
...@@ -128,7 +128,7 @@ INTERRUPTS = 128 ...@@ -128,7 +128,7 @@ INTERRUPTS = 128
bne 7f bne 7f
orc #0x80,ccr orc #0x80,ccr
mov.l @SYMBOL_NAME(sw_usp),er0 mov.l @_sw_usp,er0
mov.l @(LER0-LER1:16,sp),er1 /* restore ER0 */ mov.l @(LER0-LER1:16,sp),er1 /* restore ER0 */
mov.l er1,@er0 mov.l er1,@er0
RESTOREEXR RESTOREEXR
...@@ -141,7 +141,7 @@ INTERRUPTS = 128 ...@@ -141,7 +141,7 @@ INTERRUPTS = 128
mov.l @sp+,er1 mov.l @sp+,er1
add.l #(LRET-LER1),sp /* remove LORIG - LRET */ add.l #(LRET-LER1),sp /* remove LORIG - LRET */
mov.l sp,@SYMBOL_NAME(sw_ksp) mov.l sp,@_sw_ksp
andc #0xef,ccr /* switch to user mode */ andc #0xef,ccr /* switch to user mode */
mov.l er0,sp mov.l er0,sp
bra 8f bra 8f
...@@ -155,20 +155,20 @@ INTERRUPTS = 128 ...@@ -155,20 +155,20 @@ INTERRUPTS = 128
rte rte
.endm .endm
.globl SYMBOL_NAME(system_call) .globl _system_call
.globl SYMBOL_NAME(ret_from_exception) .globl _ret_from_exception
.globl SYMBOL_NAME(ret_from_fork) .globl _ret_from_fork
.globl SYMBOL_NAME(ret_from_kernel_thread) .globl _ret_from_kernel_thread
.globl SYMBOL_NAME(ret_from_interrupt) .globl _ret_from_interrupt
.globl SYMBOL_NAME(interrupt_redirect_table) .globl _interrupt_redirect_table
.globl SYMBOL_NAME(sw_ksp),SYMBOL_NAME(sw_usp) .globl _sw_ksp,_sw_usp
.globl SYMBOL_NAME(resume) .globl _resume
.globl SYMBOL_NAME(interrupt_entry) .globl _interrupt_entry
.globl SYMBOL_NAME(trace_break) .globl _trace_break
#if defined(CONFIG_ROMKERNEL) #if defined(CONFIG_ROMKERNEL)
.section .int_redirect,"ax" .section .int_redirect,"ax"
SYMBOL_NAME_LABEL(interrupt_redirect_table) _interrupt_redirect_table:
#if defined(CONFIG_CPU_H8300H) #if defined(CONFIG_CPU_H8300H)
.rept 7 .rept 7
.long 0 .long 0
...@@ -178,54 +178,54 @@ SYMBOL_NAME_LABEL(interrupt_redirect_table) ...@@ -178,54 +178,54 @@ SYMBOL_NAME_LABEL(interrupt_redirect_table)
.rept 5 .rept 5
.long 0 .long 0
.endr .endr
jmp @SYMBOL_NAME(trace_break) jmp @_trace_break
.long 0 .long 0
#endif #endif
jsr @SYMBOL_NAME(interrupt_entry) /* NMI */ jsr @_interrupt_entry /* NMI */
jmp @SYMBOL_NAME(system_call) /* TRAPA #0 (System call) */ jmp @_system_call /* TRAPA #0 (System call) */
.long 0 .long 0
.long 0 .long 0
jmp @SYMBOL_NAME(trace_break) /* TRAPA #3 (breakpoint) */ jmp @_trace_break /* TRAPA #3 (breakpoint) */
.rept INTERRUPTS-12 .rept INTERRUPTS-12
jsr @SYMBOL_NAME(interrupt_entry) jsr @_interrupt_entry
.endr .endr
#endif #endif
#if defined(CONFIG_RAMKERNEL) #if defined(CONFIG_RAMKERNEL)
.globl SYMBOL_NAME(interrupt_redirect_table) .globl _interrupt_redirect_table
.section .bss .section .bss
SYMBOL_NAME_LABEL(interrupt_redirect_table) _interrupt_redirect_table:
.space 4 .space 4
#endif #endif
.section .text .section .text
.align 2 .align 2
SYMBOL_NAME_LABEL(interrupt_entry) _interrupt_entry:
SAVE_ALL SAVE_ALL
mov.l sp,er0 mov.l sp,er0
add.l #LVEC,er0 add.l #LVEC,er0
btst #4,r1l btst #4,r1l
bne 1f bne 1f
/* user LVEC */ /* user LVEC */
mov.l @SYMBOL_NAME(sw_usp),er0 mov.l @_sw_usp,er0
adds #4,er0 adds #4,er0
1: 1:
mov.l @er0,er0 /* LVEC address */ mov.l @er0,er0 /* LVEC address */
#if defined(CONFIG_ROMKERNEL) #if defined(CONFIG_ROMKERNEL)
sub.l #SYMBOL_NAME(interrupt_redirect_table),er0 sub.l #_interrupt_redirect_table,er0
#endif #endif
#if defined(CONFIG_RAMKERNEL) #if defined(CONFIG_RAMKERNEL)
mov.l @SYMBOL_NAME(interrupt_redirect_table),er1 mov.l @_interrupt_redirect_table,er1
sub.l er1,er0 sub.l er1,er0
#endif #endif
SHLR2 er0 SHLR2 er0
dec.l #1,er0 dec.l #1,er0
mov.l sp,er1 mov.l sp,er1
subs #4,er1 /* adjust ret_pc */ subs #4,er1 /* adjust ret_pc */
jsr @SYMBOL_NAME(do_IRQ) jsr @_do_IRQ
jmp @SYMBOL_NAME(ret_from_interrupt) jmp @_ret_from_interrupt
SYMBOL_NAME_LABEL(system_call) _system_call:
subs #4,sp /* dummy LVEC */ subs #4,sp /* dummy LVEC */
SAVE_ALL SAVE_ALL
andc #0x7f,ccr andc #0x7f,ccr
...@@ -233,21 +233,21 @@ SYMBOL_NAME_LABEL(system_call) ...@@ -233,21 +233,21 @@ SYMBOL_NAME_LABEL(system_call)
/* save top of frame */ /* save top of frame */
mov.l sp,er0 mov.l sp,er0
jsr @SYMBOL_NAME(set_esp0) jsr @_set_esp0
mov.l sp,er2 mov.l sp,er2
and.w #0xe000,r2 and.w #0xe000,r2
mov.b @((TI_FLAGS+3-(TIF_SYSCALL_TRACE >> 3)):16,er2),r2l mov.b @((TI_FLAGS+3-(TIF_SYSCALL_TRACE >> 3)):16,er2),r2l
btst #(TIF_SYSCALL_TRACE & 7),r2l btst #(TIF_SYSCALL_TRACE & 7),r2l
beq 1f beq 1f
jsr @SYMBOL_NAME(do_syscall_trace) jsr @_do_syscall_trace
1: 1:
cmp.l #NR_syscalls,er4 cmp.l #NR_syscalls,er4
bcc badsys bcc badsys
SHLL2 er4 SHLL2 er4
mov.l #SYMBOL_NAME(sys_call_table),er0 mov.l #_sys_call_table,er0
add.l er4,er0 add.l er4,er0
mov.l @er0,er4 mov.l @er0,er4
beq SYMBOL_NAME(ret_from_exception):16 beq _ret_from_exception:16
mov.l @(LER1:16,sp),er0 mov.l @(LER1:16,sp),er0
mov.l @(LER2:16,sp),er1 mov.l @(LER2:16,sp),er1
mov.l @(LER3:16,sp),er2 mov.l @(LER3:16,sp),er2
...@@ -258,10 +258,10 @@ SYMBOL_NAME_LABEL(system_call) ...@@ -258,10 +258,10 @@ SYMBOL_NAME_LABEL(system_call)
mov.b @((TI_FLAGS+3-(TIF_SYSCALL_TRACE >> 3)):16,er2),r2l mov.b @((TI_FLAGS+3-(TIF_SYSCALL_TRACE >> 3)):16,er2),r2l
btst #(TIF_SYSCALL_TRACE & 7),r2l btst #(TIF_SYSCALL_TRACE & 7),r2l
beq 2f beq 2f
jsr @SYMBOL_NAME(do_syscall_trace) jsr @_do_syscall_trace
2: 2:
#if defined(CONFIG_SYSCALL_PRINT) #if defined(CONFIG_SYSCALL_PRINT)
jsr @SYMBOL_NAME(syscall_print) jsr @_syscall_print
#endif #endif
orc #0x80,ccr orc #0x80,ccr
bra resume_userspace bra resume_userspace
...@@ -275,11 +275,11 @@ badsys: ...@@ -275,11 +275,11 @@ badsys:
#define resume_kernel restore_all #define resume_kernel restore_all
#endif #endif
SYMBOL_NAME_LABEL(ret_from_exception) _ret_from_exception:
#if defined(CONFIG_PREEMPT) #if defined(CONFIG_PREEMPT)
orc #0x80,ccr orc #0x80,ccr
#endif #endif
SYMBOL_NAME_LABEL(ret_from_interrupt) _ret_from_interrupt:
mov.b @(LCCR+1:16,sp),r0l mov.b @(LCCR+1:16,sp),r0l
btst #4,r0l btst #4,r0l
bne resume_kernel:8 /* return from kernel */ bne resume_kernel:8 /* return from kernel */
...@@ -296,12 +296,12 @@ work_pending: ...@@ -296,12 +296,12 @@ work_pending:
/* work notifysig */ /* work notifysig */
mov.l sp,er0 mov.l sp,er0
subs #4,er0 /* er0: pt_regs */ subs #4,er0 /* er0: pt_regs */
jsr @SYMBOL_NAME(do_notify_resume) jsr @_do_notify_resume
bra restore_all:8 bra restore_all:8
work_resched: work_resched:
mov.l sp,er0 mov.l sp,er0
jsr @SYMBOL_NAME(set_esp0) jsr @_set_esp0
jsr @SYMBOL_NAME(schedule) jsr @_schedule
bra resume_userspace:8 bra resume_userspace:8
restore_all: restore_all:
RESTORE_ALL /* Does RTE */ RESTORE_ALL /* Does RTE */
...@@ -320,26 +320,26 @@ need_resched: ...@@ -320,26 +320,26 @@ need_resched:
mov.l er0,@(TI_PRE_COUNT:16,er4) mov.l er0,@(TI_PRE_COUNT:16,er4)
andc #0x7f,ccr andc #0x7f,ccr
mov.l sp,er0 mov.l sp,er0
jsr @SYMBOL_NAME(set_esp0) jsr @_set_esp0
jsr @SYMBOL_NAME(schedule) jsr @_schedule
orc #0x80,ccr orc #0x80,ccr
bra need_resched:8 bra need_resched:8
#endif #endif
SYMBOL_NAME_LABEL(ret_from_fork) _ret_from_fork:
mov.l er2,er0 mov.l er2,er0
jsr @SYMBOL_NAME(schedule_tail) jsr @_schedule_tail
jmp @SYMBOL_NAME(ret_from_exception) jmp @_ret_from_exception
SYMBOL_NAME_LABEL(ret_from_kernel_thread) _ret_from_kernel_thread:
mov.l er2,er0 mov.l er2,er0
jsr @SYMBOL_NAME(schedule_tail) jsr @_schedule_tail
mov.l @(LER4:16,sp),er0 mov.l @(LER4:16,sp),er0
mov.l @(LER5:16,sp),er1 mov.l @(LER5:16,sp),er1
jsr @er1 jsr @er1
jmp @SYMBOL_NAME(ret_from_exception) jmp @_ret_from_exception
SYMBOL_NAME_LABEL(resume) _resume:
/* /*
* Beware - when entering resume, offset of tss is in d1, * Beware - when entering resume, offset of tss is in d1,
* prev (the current task) is in a0, next (the new task) * prev (the current task) is in a0, next (the new task)
...@@ -355,7 +355,7 @@ SYMBOL_NAME_LABEL(resume) ...@@ -355,7 +355,7 @@ SYMBOL_NAME_LABEL(resume)
/* disable interrupts */ /* disable interrupts */
orc #0x80,ccr orc #0x80,ccr
mov.l @SYMBOL_NAME(sw_usp),er3 mov.l @_sw_usp,er3
mov.l er3,@(THREAD_USP:16,er0) mov.l er3,@(THREAD_USP:16,er0)
mov.l sp,@(THREAD_KSP:16,er0) mov.l sp,@(THREAD_KSP:16,er0)
...@@ -363,7 +363,7 @@ SYMBOL_NAME_LABEL(resume) ...@@ -363,7 +363,7 @@ SYMBOL_NAME_LABEL(resume)
/* FIXME: what did we hack out of here, this does nothing! */ /* FIXME: what did we hack out of here, this does nothing! */
mov.l @(THREAD_USP:16,er1),er0 mov.l @(THREAD_USP:16,er1),er0
mov.l er0,@SYMBOL_NAME(sw_usp) mov.l er0,@_sw_usp
mov.l @(THREAD_KSP:16,er1),sp mov.l @(THREAD_KSP:16,er1),sp
/* restore status register */ /* restore status register */
...@@ -372,15 +372,15 @@ SYMBOL_NAME_LABEL(resume) ...@@ -372,15 +372,15 @@ SYMBOL_NAME_LABEL(resume)
ldc r3l,ccr ldc r3l,ccr
rts rts
SYMBOL_NAME_LABEL(trace_break) _trace_break:
subs #4,sp subs #4,sp
SAVE_ALL SAVE_ALL
sub.l er1,er1 sub.l er1,er1
dec.l #1,er1 dec.l #1,er1
mov.l er1,@(LORIG,sp) mov.l er1,@(LORIG,sp)
mov.l sp,er0 mov.l sp,er0
jsr @SYMBOL_NAME(set_esp0) jsr @_set_esp0
mov.l @SYMBOL_NAME(sw_usp),er0 mov.l @_sw_usp,er0
mov.l @er0,er1 mov.l @er0,er1
mov.w @(-2:16,er1),r2 mov.w @(-2:16,er1),r2
cmp.w #0x5730,r2 cmp.w #0x5730,r2
...@@ -390,13 +390,13 @@ SYMBOL_NAME_LABEL(trace_break) ...@@ -390,13 +390,13 @@ SYMBOL_NAME_LABEL(trace_break)
1: 1:
and.w #0xff,e1 and.w #0xff,e1
mov.l er1,er0 mov.l er1,er0
jsr @SYMBOL_NAME(trace_trap) jsr @_trace_trap
jmp @SYMBOL_NAME(ret_from_exception) jmp @_ret_from_exception
.section .bss .section .bss
SYMBOL_NAME_LABEL(sw_ksp) _sw_ksp:
.space 4 .space 4
SYMBOL_NAME_LABEL(sw_usp) _sw_usp:
.space 4 .space 4
.end .end
This diff is collapsed.
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
.h8300s .h8300s
#endif #endif
.text .text
.global SYMBOL_NAME(abs) .global _abs
;;; int abs(int n) ;;; int abs(int n)
SYMBOL_NAME_LABEL(abs) _abs:
mov.l er0,er0 mov.l er0,er0
bpl 1f bpl 1f
neg.l er0 neg.l er0
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
#endif #endif
.text .text
.global SYMBOL_NAME(memcpy) .global _memcpy
;;; void *memcpy(void *to, void *from, size_t n) ;;; void *memcpy(void *to, void *from, size_t n)
SYMBOL_NAME_LABEL(memcpy) _memcpy:
mov.l er2,er2 mov.l er2,er2
bne 1f bne 1f
rts rts
......
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
#endif #endif
.text .text
.global SYMBOL_NAME(memset) .global _memset
;;void *memset(*ptr, int c, size_t count) ;;void *memset(*ptr, int c, size_t count)
;; ptr = er0 ;; ptr = er0
;; c = er1(r1l) ;; c = er1(r1l)
;; count = er2 ;; count = er2
SYMBOL_NAME_LABEL(memset) _memset:
btst #0,r0l btst #0,r0l
beq 2f beq 2f
......
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
#define RAMEND CONFIG_BLKDEV_RESERVE_ADDRESS #define RAMEND CONFIG_BLKDEV_RESERVE_ADDRESS
#endif #endif
.global SYMBOL_NAME(_start) .global __start
.global SYMBOL_NAME(command_line) .global _command_line
.global SYMBOL_NAME(_platform_gpio_table) .global __platform_gpio_table
.global SYMBOL_NAME(_target_name) .global __target_name
.h8300h .h8300h
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
.file "crt0_ram.S" .file "crt0_ram.S"
/* CPU Reset entry */ /* CPU Reset entry */
SYMBOL_NAME_LABEL(_start) __start:
mov.l #RAMEND,sp mov.l #RAMEND,sp
ldc #0x80,ccr ldc #0x80,ccr
...@@ -59,13 +59,13 @@ SYMBOL_NAME_LABEL(_start) ...@@ -59,13 +59,13 @@ SYMBOL_NAME_LABEL(_start)
/* copy kernel commandline */ /* copy kernel commandline */
mov.l #COMMAND_START,er5 mov.l #COMMAND_START,er5
mov.l #SYMBOL_NAME(command_line),er6 mov.l #_command_line,er6
mov.w #512,r4 mov.w #512,r4
eepmov.w eepmov.w
/* uClinux kernel start */ /* uClinux kernel start */
ldc #0x90,ccr /* running kernel */ ldc #0x90,ccr /* running kernel */
mov.l #SYMBOL_NAME(init_thread_union),sp mov.l #_init_thread_union,sp
add.l #0x2000,sp add.l #0x2000,sp
jsr @_start_kernel jsr @_start_kernel
_exit: _exit:
...@@ -107,4 +107,4 @@ __target_name: ...@@ -107,4 +107,4 @@ __target_name:
.asciz "AE-3068" .asciz "AE-3068"
.section .bootvec,"ax" .section .bootvec,"ax"
jmp @SYMBOL_NAME(_start) jmp @__start
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
#define RAMEND CONFIG_BLKDEV_RESERVE_ADDRESS #define RAMEND CONFIG_BLKDEV_RESERVE_ADDRESS
#endif #endif
.global SYMBOL_NAME(_start) .global __start
.global SYMBOL_NAME(command_line) .global _command_line
.global SYMBOL_NAME(_platform_gpio_table) .global __platform_gpio_table
.global SYMBOL_NAME(_target_name) .global __target_name
.h8300h .h8300h
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
.file "crt0_ram.S" .file "crt0_ram.S"
/* CPU Reset entry */ /* CPU Reset entry */
SYMBOL_NAME_LABEL(_start) __start:
mov.l #RAMEND,sp mov.l #RAMEND,sp
ldc #0x80,ccr ldc #0x80,ccr
...@@ -59,13 +59,13 @@ SYMBOL_NAME_LABEL(_start) ...@@ -59,13 +59,13 @@ SYMBOL_NAME_LABEL(_start)
/* copy kernel commandline */ /* copy kernel commandline */
mov.l #COMMAND_START,er5 mov.l #COMMAND_START,er5
mov.l #SYMBOL_NAME(command_line),er6 mov.l #_command_line,er6
mov.w #512,r4 mov.w #512,r4
eepmov.w eepmov.w
/* uClinux kernel start */ /* uClinux kernel start */
ldc #0x90,ccr /* running kernel */ ldc #0x90,ccr /* running kernel */
mov.l #SYMBOL_NAME(init_thread_union),sp mov.l #_init_thread_union,sp
add.l #0x2000,sp add.l #0x2000,sp
jsr @_start_kernel jsr @_start_kernel
_exit: _exit:
......
...@@ -12,17 +12,17 @@ ...@@ -12,17 +12,17 @@
#include <asm/linkage.h> #include <asm/linkage.h>
.global SYMBOL_NAME(_start) .global __start
.global SYMBOL_NAME(_command_line) .global __command_line
.global SYMBOL_NAME(_platform_gpio_table) .global __platform_gpio_table
.global SYMBOL_NAME(_target_name) .global __target_name
.h8300h .h8300h
.section .text .section .text
.file "crt0_rom.S" .file "crt0_rom.S"
/* CPU Reset entry */ /* CPU Reset entry */
SYMBOL_NAME_LABEL(_start) __start:
mov.l #__ramend,sp mov.l #__ramend,sp
ldc #0x80,ccr ldc #0x80,ccr
...@@ -60,13 +60,13 @@ SYMBOL_NAME_LABEL(_start) ...@@ -60,13 +60,13 @@ SYMBOL_NAME_LABEL(_start)
/* copy kernel commandline */ /* copy kernel commandline */
mov.l #COMMAND_START,er5 mov.l #COMMAND_START,er5
mov.l #SYMBOL_NAME(_command_line),er6 mov.l #__command_line,er6
mov.w #512,r4 mov.w #512,r4
eepmov.w eepmov.w
/* linux kernel start */ /* linux kernel start */
ldc #0x90,ccr /* running kernel */ ldc #0x90,ccr /* running kernel */
mov.l #SYMBOL_NAME(init_thread_union),sp mov.l #_init_thread_union,sp
add.l #0x2000,sp add.l #0x2000,sp
jsr @_start_kernel jsr @_start_kernel
_exit: _exit:
......
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
#define RAMEND CONFIG_BLKDEV_RESERVE_ADDRESS #define RAMEND CONFIG_BLKDEV_RESERVE_ADDRESS
#endif #endif
.global SYMBOL_NAME(_start) .global __start
.global SYMBOL_NAME(command_line) .global _command_line
.global SYMBOL_NAME(_platform_gpio_table) .global __platform_gpio_table
.global SYMBOL_NAME(_target_name) .global __target_name
.h8300h .h8300h
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
.file "crt0_ram.S" .file "crt0_ram.S"
/* CPU Reset entry */ /* CPU Reset entry */
SYMBOL_NAME_LABEL(_start) __start:
mov.l #RAMEND,sp mov.l #RAMEND,sp
ldc #0x80,ccr ldc #0x80,ccr
...@@ -59,13 +59,13 @@ SYMBOL_NAME_LABEL(_start) ...@@ -59,13 +59,13 @@ SYMBOL_NAME_LABEL(_start)
/* copy kernel commandline */ /* copy kernel commandline */
mov.l #COMMAND_START,er5 mov.l #COMMAND_START,er5
mov.l #SYMBOL_NAME(command_line),er6 mov.l #_command_line,er6
mov.w #512,r4 mov.w #512,r4
eepmov.w eepmov.w
/* uClinux kernel start */ /* uClinux kernel start */
ldc #0x90,ccr /* running kernel */ ldc #0x90,ccr /* running kernel */
mov.l #SYMBOL_NAME(init_thread_union),sp mov.l #_init_thread_union,sp
add.l #0x2000,sp add.l #0x2000,sp
jsr @_start_kernel jsr @_start_kernel
_exit: _exit:
...@@ -107,4 +107,4 @@ __target_name: ...@@ -107,4 +107,4 @@ __target_name:
.asciz "H8MAX" .asciz "H8MAX"
.section .bootvec,"ax" .section .bootvec,"ax"
jmp @SYMBOL_NAME(_start) jmp @__start
...@@ -23,10 +23,10 @@ ...@@ -23,10 +23,10 @@
#define RAMEND CONFIG_BLKDEV_RESERVE_ADDRESS #define RAMEND CONFIG_BLKDEV_RESERVE_ADDRESS
#endif #endif
.global SYMBOL_NAME(_start) .global __start
.global SYMBOL_NAME(_command_line) .global __command_line
.global SYMBOL_NAME(_platform_gpio_table) .global __platform_gpio_table
.global SYMBOL_NAME(_target_name) .global __target_name
.h8300s .h8300s
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
.file "crt0_ram.S" .file "crt0_ram.S"
/* CPU Reset entry */ /* CPU Reset entry */
SYMBOL_NAME_LABEL(_start) __start:
mov.l #RAMEND,sp mov.l #RAMEND,sp
ldc #0x80,ccr ldc #0x80,ccr
ldc #0x00,exr ldc #0x00,exr
...@@ -66,13 +66,13 @@ SYMBOL_NAME_LABEL(_start) ...@@ -66,13 +66,13 @@ SYMBOL_NAME_LABEL(_start)
/* copy kernel commandline */ /* copy kernel commandline */
mov.l #COMMAND_START,er5 mov.l #COMMAND_START,er5
mov.l #SYMBOL_NAME(command_line),er6 mov.l #_command_line,er6
mov.w #512,r4 mov.w #512,r4
eepmov.w eepmov.w
/* uClinux kernel start */ /* uClinux kernel start */
ldc #0x90,ccr /* running kernel */ ldc #0x90,ccr /* running kernel */
mov.l #SYMBOL_NAME(init_thread_union),sp mov.l #_init_thread_union,sp
add.l #0x2000,sp add.l #0x2000,sp
jsr @_start_kernel jsr @_start_kernel
_exit: _exit:
...@@ -127,4 +127,4 @@ __target_name: ...@@ -127,4 +127,4 @@ __target_name:
.asciz "EDOSK-2674" .asciz "EDOSK-2674"
.section .bootvec,"ax" .section .bootvec,"ax"
jmp @SYMBOL_NAME(_start) jmp @__start
...@@ -13,17 +13,17 @@ ...@@ -13,17 +13,17 @@
#include <asm/linkage.h> #include <asm/linkage.h>
#include <asm/regs267x.h> #include <asm/regs267x.h>
.global SYMBOL_NAME(_start) .global __start
.global SYMBOL_NAME(_command_line) .global __command_line
.global SYMBOL_NAME(_platform_gpio_table) .global __platform_gpio_table
.global SYMBOL_NAME(_target_name) .global __target_name
.h8300s .h8300s
.section .text .section .text
.file "crt0_rom.S" .file "crt0_rom.S"
/* CPU Reset entry */ /* CPU Reset entry */
SYMBOL_NAME_LABEL(_start) __start:
mov.l #__ramend,sp mov.l #__ramend,sp
ldc #0x80,ccr ldc #0x80,ccr
ldc #0,exr ldc #0,exr
...@@ -82,13 +82,13 @@ SYMBOL_NAME_LABEL(_start) ...@@ -82,13 +82,13 @@ SYMBOL_NAME_LABEL(_start)
/* copy kernel commandline */ /* copy kernel commandline */
mov.l #COMMAND_START,er5 mov.l #COMMAND_START,er5
mov.l #SYMBOL_NAME(_command_line),er6 mov.l #__command_line,er6
mov.w #512,r4 mov.w #512,r4
eepmov.w eepmov.w
/* linux kernel start */ /* linux kernel start */
ldc #0x90,ccr /* running kernel */ ldc #0x90,ccr /* running kernel */
mov.l #SYMBOL_NAME(init_thread_union),sp mov.l #_init_thread_union,sp
add.l #0x2000,sp add.l #0x2000,sp
jsr @_start_kernel jsr @_start_kernel
_exit: _exit:
......
...@@ -23,10 +23,10 @@ ...@@ -23,10 +23,10 @@
#define RAMEND CONFIG_BLKDEV_RESERVE_ADDRESS #define RAMEND CONFIG_BLKDEV_RESERVE_ADDRESS
#endif #endif
.global SYMBOL_NAME(_start) .global __start
.global SYMBOL_NAME(_command_line) .global __command_line
.global SYMBOL_NAME(_platform_gpio_table) .global __platform_gpio_table
.global SYMBOL_NAME(_target_name) .global __target_name
.h8300s .h8300s
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
.file "crt0_ram.S" .file "crt0_ram.S"
/* CPU Reset entry */ /* CPU Reset entry */
SYMBOL_NAME_LABEL(_start) __start:
mov.l #RAMEND,sp mov.l #RAMEND,sp
ldc #0x80,ccr ldc #0x80,ccr
ldc #0x00,exr ldc #0x00,exr
...@@ -63,13 +63,13 @@ SYMBOL_NAME_LABEL(_start) ...@@ -63,13 +63,13 @@ SYMBOL_NAME_LABEL(_start)
/* copy kernel commandline */ /* copy kernel commandline */
mov.l #COMMAND_START,er5 mov.l #COMMAND_START,er5
mov.l #SYMBOL_NAME(command_line),er6 mov.l #_command_line,er6
mov.w #512,r4 mov.w #512,r4
eepmov.w eepmov.w
/* uClinux kernel start */ /* uClinux kernel start */
ldc #0x90,ccr /* running kernel */ ldc #0x90,ccr /* running kernel */
mov.l #SYMBOL_NAME(init_thread_union),sp mov.l #_init_thread_union,sp
add.l #0x2000,sp add.l #0x2000,sp
jsr @_start_kernel jsr @_start_kernel
_exit: _exit:
...@@ -124,4 +124,4 @@ __target_name: ...@@ -124,4 +124,4 @@ __target_name:
.asciz "generic" .asciz "generic"
.section .bootvec,"ax" .section .bootvec,"ax"
jmp @SYMBOL_NAME(_start) jmp @__start
...@@ -13,17 +13,17 @@ ...@@ -13,17 +13,17 @@
#include <asm/linkage.h> #include <asm/linkage.h>
#include <asm/regs267x.h> #include <asm/regs267x.h>
.global SYMBOL_NAME(_start) .global __start
.global SYMBOL_NAME(_command_line) .global __command_line
.global SYMBOL_NAME(_platform_gpio_table) .global __platform_gpio_table
.global SYMBOL_NAME(_target_name) .global __target_name
.h8300s .h8300s
.section .text .section .text
.file "crt0_rom.S" .file "crt0_rom.S"
/* CPU Reset entry */ /* CPU Reset entry */
SYMBOL_NAME_LABEL(_start) __start:
mov.l #__ramend,sp mov.l #__ramend,sp
ldc #0x80,ccr ldc #0x80,ccr
ldc #0,exr ldc #0,exr
...@@ -61,7 +61,7 @@ SYMBOL_NAME_LABEL(_start) ...@@ -61,7 +61,7 @@ SYMBOL_NAME_LABEL(_start)
/* linux kernel start */ /* linux kernel start */
ldc #0x90,ccr /* running kernel */ ldc #0x90,ccr /* running kernel */
mov.l #SYMBOL_NAME(init_thread_union),sp mov.l #_init_thread_union,sp
add.l #0x2000,sp add.l #0x2000,sp
jsr @_start_kernel jsr @_start_kernel
_exit: _exit:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment