Changeset 73b3ecd in mainline for kernel


Ignore:
Timestamp:
2016-04-21T20:00:18Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
054476d
Parents:
96521f2f
Message:

arm32: use asmtool.h macros for defining symbols

Location:
kernel/arch/arm32
Files:
8 edited
1 moved

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/Makefile.inc

    r96521f2f r73b3ecd  
    3333ATSIGN = %
    3434
    35 GCC_CFLAGS += -fno-omit-frame-pointer -mapcs-frame -march=$(subst _,-,$(PROCESSOR_ARCH)) -mno-unaligned-access
     35GCC_CFLAGS += -fno-omit-frame-pointer -mapcs-frame -march=$(subst _,-,$(PROCESSOR_ARCH)) -mno-unaligned-access -mfpu=vfpv3
    3636
    3737ifeq ($(CONFIG_FPU),y)
     
    7070ifeq ($(CONFIG_FPU),y)
    7171        ARCH_SOURCES += arch/$(KARCH)/src/fpu_context.c
    72         ARCH_SOURCES += arch/$(KARCH)/src/fpu.s
     72        ARCH_SOURCES += arch/$(KARCH)/src/fpu.S
    7373endif
    7474
  • kernel/arch/arm32/src/asm.S

    r96521f2f r73b3ecd  
    2727 */
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    3032
    31 .global memcpy_from_uspace
    32 .global memcpy_to_uspace
    33 .global memcpy_from_uspace_failover_address
    34 .global memcpy_to_uspace_failover_address
    35 .global early_putchar
    36 
    37 memcpy_from_uspace:
    38 memcpy_to_uspace:
     33FUNCTION_BEGIN(memcpy_from_uspace)
     34FUNCTION_BEGIN(memcpy_to_uspace)
    3935        add r3, r1, #3
    4036        bic r3, r3, #3
     
    9490                bne 7b
    9591                b 3b
     92FUNCTION_END(memcpy_from_uspace)
     93FUNCTION_END(memcpy_to_uspace)
    9694
    97 memcpy_from_uspace_failover_address:
    98 memcpy_to_uspace_failover_address:
     95SYMBOL(memcpy_from_uspace_failover_address)
     96SYMBOL(memcpy_to_uspace_failover_address)
    9997        mov r0, #0
    10098        ldmia sp!, {r4, r5, pc}
    10199
    102 early_putchar:
     100FUNCTION_BEGIN(early_putchar)
    103101        mov pc, lr
     102FUNCTION_END(early_putchar)
     103
  • kernel/arch/arm32/src/context.S

    r96521f2f r73b3ecd  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text   
    3032
    31 .global context_save_arch
    32 .global context_restore_arch
    33 
    34 context_save_arch:
     33FUNCTION_BEGIN(context_save_arch)
    3534        stmfd sp!, {r1}
    3635        mrs r1, cpsr
     
    4443        mov r0, #1
    4544        mov pc, lr
     45FUNCTION_END(context_save_arch)
    4646
    47 
    48 context_restore_arch:
     47FUNCTION_BEGIN(context_restore_arch)
    4948        ldmia r0!, {r4}
    5049        mrs r5, cpsr
     
    5857        mov r0, #0
    5958        mov pc, lr
     59FUNCTION_END(context_restore_arch)
     60
  • kernel/arch/arm32/src/debug/stacktrace_asm.S

    r96521f2f r73b3ecd  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    3032
    31 .global frame_pointer_get
    32 .global program_counter_get
    33 
    34 frame_pointer_get:
     33FUNCTION_BEGIN(frame_pointer_get)
    3534        mov r0, fp
    3635        mov pc, lr
     36FUNCTION_END(frame_pointer_get)
    3737
    38 program_counter_get:
     38FUNCTION_BEGIN(program_counter_get)
    3939        mov r0, lr
    4040        mov pc, lr
     41FUNCTION_END(program_counter_get)
     42
  • kernel/arch/arm32/src/dummy.S

    r96521f2f r73b3ecd  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    3032
    31 .global calibrate_delay_loop
    32 .global asm_delay_loop
     33FUNCTION_BEGIN(calibrate_delay_loop)
     34        mov     pc, lr
     35FUNCTION_END(calibrate_delay_loop)
    3336
    34 .global sys_tls_set
    35 .global dummy
    36 
    37 calibrate_delay_loop:
     37FUNCTION_BEGIN(asm_delay_loop)
    3838        mov     pc, lr
    39 
    40 asm_delay_loop:
    41         mov     pc, lr
     39FUNCTION_END(asm_delay_loop)
    4240
    4341# not used on ARM
    44 sys_tls_set:
     42FUNCTION_BEGIN(sys_tls_set)
     43FUNCTION_BEGIN(dummy)
     44        mov pc, lr
     45FUNCTION_END(dummy)
     46FUNCTION_END(sys_tls_set)
    4547
    46 dummy:
    47         mov pc, lr
  • kernel/arch/arm32/src/eabi.S

    r96521f2f r73b3ecd  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    3032
    31 .global __aeabi_idiv
    32 .global __aeabi_uidiv
    33 
    34 .global __aeabi_idivmod
    35 .global __aeabi_uidivmod
    36 
    37 .global __aeabi_ldivmod
    38 .global __aeabi_uldivmod
    39 
    40 __aeabi_idiv:
     33FUNCTION_BEGIN(__aeabi_idiv)
    4134        push {lr}
    4235        bl __divsi3
    4336        pop {lr}
    4437        mov pc, lr
     38FUNCTION_END(__aeabi_idiv)
    4539
    46 __aeabi_uidiv:
     40FUNCTION_BEGIN(__aeabi_uidiv)
    4741        push {lr}
    4842        bl __udivsi3
    4943        pop {lr}
    5044        mov pc, lr
     45FUNCTION_END(__aeabi_uidiv)
    5146
    52 __aeabi_idivmod:
     47FUNCTION_BEGIN(__aeabi_idivmod)
    5348        push {lr}
    5449        sub sp, sp, #12
     
    5954        pop {lr}
    6055        mov pc, lr
     56FUNCTION_END(__aeabi_idivmod)
    6157
    62 __aeabi_uidivmod:
     58FUNCTION_BEGIN(__aeabi_uidivmod)
    6359        push {lr}
    6460        sub sp, sp, #12
     
    6965        pop {lr}
    7066        mov pc, lr
     67FUNCTION_END(__aeabi_uidivmod)
    7168
    72 __aeabi_ldivmod:
     69FUNCTION_BEGIN(__aeabi_ldivmod)
    7370        push {lr}
    7471        sub sp, sp, #24
     
    8077        pop {lr}
    8178        mov pc, lr
     79FUNCTION_END(__aeabi_ldivmod)
    8280
    83 __aeabi_uldivmod:
     81FUNCTION_BEGIN(__aeabi_uldivmod)
    8482        push {lr}
    8583        sub sp, sp, #24
     
    9189        pop {lr}
    9290        mov pc, lr
     91FUNCTION_END(__aeabi_uldivmod)
     92
  • kernel/arch/arm32/src/exc_handler.S

    r96521f2f r73b3ecd  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text   
    30 
    31 .global irq_exception_entry
    32 .global fiq_exception_entry
    33 .global data_abort_exception_entry
    34 .global prefetch_abort_exception_entry
    35 .global undef_instr_exception_entry
    36 .global swi_exception_entry
    37 .global reset_exception_entry
    38 
    3932
    4033# Switches to kernel stack and saves all registers there.
     
    156149.endm
    157150
    158 reset_exception_entry:
     151SYMBOL(reset_exception_entry)
    159152        SAVE_REGS_TO_STACK
    160153        mov r0, #0
     
    163156        LOAD_REGS_FROM_STACK
    164157
    165 irq_exception_entry:
     158SYMBOL(irq_exception_entry)
    166159        sub lr, lr, #4
    167160        SAVE_REGS_TO_STACK
     
    171164        LOAD_REGS_FROM_STACK
    172165
    173 fiq_exception_entry:
     166SYMBOL(fiq_exception_entry)
    174167        sub lr, lr, #4
    175168        SAVE_REGS_TO_STACK
     
    179172        LOAD_REGS_FROM_STACK
    180173
    181 undef_instr_exception_entry:
     174SYMBOL(undef_instr_exception_entry)
    182175        SAVE_REGS_TO_STACK
    183176        mov r0, #1
     
    186179        LOAD_REGS_FROM_STACK
    187180
    188 prefetch_abort_exception_entry:
     181SYMBOL(prefetch_abort_exception_entry)
    189182        sub lr, lr, #4
    190183        SAVE_REGS_TO_STACK
     
    194187        LOAD_REGS_FROM_STACK
    195188
    196 data_abort_exception_entry:
     189SYMBOL(data_abort_exception_entry)
    197190        sub lr, lr, #8
    198191        SAVE_REGS_TO_STACK
     
    202195        LOAD_REGS_FROM_STACK
    203196
    204 swi_exception_entry:
     197SYMBOL(swi_exception_entry)
    205198        ldr r13, =exc_stack
    206199        SAVE_REGS_TO_STACK
  • kernel/arch/arm32/src/fpu.S

    r96521f2f r73b3ecd  
    2727 */
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    3032
    31 .global fpsid_read
    32 .global mvfr0_read
    33 .global fpscr_read
    34 .global fpscr_write
    35 .global fpexc_read
    36 .global fpexc_write
    37 
    38 .global fpu_context_save_s32
    39 .global fpu_context_restore_s32
    40 .global fpu_context_save_d16
    41 .global fpu_context_restore_d16
    42 .global fpu_context_save_d32
    43 .global fpu_context_restore_d32
    44 
    45 fpsid_read:
     33FUNCTION_BEGIN(fpsid_read)
    4634        vmrs r0, fpsid
    4735        mov pc, lr
     36FUNCTION_END(fpsid_read)
    4837
    49 mvfr0_read:
     38FUNCTION_BEGIN(mvfr0_read)
    5039        vmrs r0, mvfr0
    5140        mov pc, lr
     41FUNCTION_END(mvfr0_read)
    5242
    53 fpscr_read:
     43FUNCTION_BEGIN(fpscr_read)
    5444        vmrs r0, fpscr
    5545        mov pc, lr
     46FUNCTION_END(fpscr_read)
    5647
    57 fpscr_write:
     48FUNCTION_BEGIN(fpscr_write)
    5849        vmsr fpscr, r0
    5950        mov pc, lr
     51FUNCTION_END(fpscr_write)
    6052
    61 fpexc_read:
     53FUNCTION_BEGIN(fpexc_read)
    6254        vmrs r0, fpexc
    6355        mov pc, lr
     56FUNCTION_END(fpexc_read)
    6457
    65 fpexc_write:
     58FUNCTION_BEGIN(fpexc_write)
    6659        vmsr fpexc, r0
    6760        mov pc, lr
     61FUNCTION_END(fpexc_write)
    6862
    69 fpu_context_save_s32:
     63FUNCTION_BEGIN(fpu_context_save_s32)
    7064        vmrs r1, fpexc
    7165        vmrs r2, fpscr
     
    7367        vstmia r0!, {s0-s31}
    7468        mov pc, lr
     69FUNCTION_END(fpu_context_save_s32)
    7570
    76 fpu_context_restore_s32:
     71FUNCTION_BEGIN(fpu_context_restore_s32)
    7772        ldmia r0!, {r1, r2}
    7873        vmsr fpexc, r1
     
    8075        vldmia r0!, {s0-s31}
    8176        mov pc, lr
     77FUNCTION_END(fpu_context_restore_s32)
    8278
    83 fpu_context_save_d16:
     79FUNCTION_BEGIN(fpu_context_save_d16)
    8480        vmrs r1, fpexc
    8581        vmrs r2, fpscr
     
    8783        vstmia r0!, {d0-d15}
    8884        mov pc, lr
     85FUNCTION_END(fpu_context_save_d16)
    8986
    90 fpu_context_restore_d16:
     87FUNCTION_BEGIN(fpu_context_restore_d16)
    9188        ldmia r0!, {r1, r2}
    9289        vmsr fpexc, r1
     
    9491        vldmia r0!, {d0-d15}
    9592        mov pc, lr
     93FUNCTION_END(fpu_context_restore_d16)
    9694
    97 fpu_context_save_d32:
     95FUNCTION_BEGIN(fpu_context_save_d32)
    9896        vmrs r1, fpexc
    9997        stmia r0!, {r1}
     
    103101        vstmia r0!, {d16-d31}
    104102        mov pc, lr
     103FUNCTION_END(fpu_context_save_d32)
    105104
    106 fpu_context_restore_d32:
     105FUNCTION_BEGIN(fpu_context_restore_d32)
    107106        ldmia r0!, {r1, r2}
    108107        vmsr fpexc, r1
     
    111110        vldmia r0!, {d16-d31}
    112111        mov pc, lr
     112FUNCTION_END(fpu_context_restore_d32)
    113113
    114 
    115 
  • kernel/arch/arm32/src/start.S

    r96521f2f r73b3ecd  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <arch/asm/boot.h>
    3031
    3132.text
    3233
    33 .global kernel_image_start
    34 .global exc_stack
    35 .global supervisor_sp
    36 
    37 kernel_image_start:
    38 
     34SYMBOL(kernel_image_start)
    3935        # initialize Stack pointer for exception modes
    4036        mrs r4, cpsr
     
    8379
    8480        .space 1024
    85 exc_stack:
     81SYMBOL(exc_stack)
    8682
    87 supervisor_sp:
     83SYMBOL(supervisor_sp)
    8884        .space 4
Note: See TracChangeset for help on using the changeset viewer.