Changeset 38ad239 in mainline


Ignore:
Timestamp:
2016-04-24T08:42:07Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bc41f3a3
Parents:
b66cc97
Message:

sparc32: use asmtool.h macros for defining symbols

Files:
7 edited
3 moved

Legend:

Unmodified
Added
Removed
  • boot/arch/sparc32/src/asm.S

    rb66cc97 r38ad239  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <arch/arch.h>
    3031
    3132.section BOOTSTRAP
    3233
    33 .global start
    34 .global boot_pt
    35 .global boot_ctx_table
    36 .global boot_stack
    37 .global halt
    38 .global jump_to_kernel
    39 
    40 start:
     34SYMBOL(start)
    4135        b bootstrap
    4236        nop
     
    4438.section BOOTPT
    4539.align 4096
    46 boot_pt:
     40SYMBOL(boot_pt)
    4741        .space PTL0_ENTRIES * PTL0_ENTRY_SIZE
    4842
    49 boot_ctx_table:
     43SYMBOL(boot_ctx_table)
    5044        .space 4
    5145
    5246.section BOOTSTACK
    5347        .space 4096
    54 boot_stack:
     48SYMBOL(boot_stack)
    5549
    5650.text
    5751
    58 halt:
     52FUNCTION_BEGIN(halt)
    5953        b halt
    6054        nop
     55FUNCTION_END(halt)
    6156
    62 jump_to_kernel:
     57FUNCTION_BEGIN(jump_to_kernel)
    6358        set 0x80a00000, %l0
    6459        mov %i1, %o0
    6560        jmp %l0
    6661        nop
     62FUNCTION_END(jump_to_kernel)
  • kernel/arch/sparc32/src/context.S

    rb66cc97 r38ad239  
    2828#
    2929
     30#include <abi/asmtool.h>
    3031#include <arch/context_offset.h>
    3132#include <arch/arch.h>
     
    3334.text
    3435
    35 .global context_save_arch
    36 .global context_restore_arch
    37 
    3836/*
    3937 * context_save_arch() is required not to create its own stack frame. See the
    4038 * generic context.h for explanation.
    4139 */
    42 context_save_arch:
     40FUNCTION_BEGIN(context_save_arch)
    4341        #
    4442        # Force all our active register windows to memory so that we can find
     
    6260        retl
    6361        mov 1, %o0              ! context_save_arch returns 1
     62FUNCTION_END(context_save_arch)
    6463
    65 context_restore_arch:
     64FUNCTION_BEGIN(context_restore_arch)
    6665        #
    6766        # Forget all previous windows, they are not going to be needed again.
     
    9796        retl
    9897        xor %o0, %o0, %o0       ! context_restore_arch returns 0
     98FUNCTION_END(context_restore_arch)
  • kernel/arch/sparc32/src/start.S

    rb66cc97 r38ad239  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    3032
    31 .global kernel_image_start
    32 .global early_putchar
    33 .global kernel_sp
    34 .global uspace_wbuf
    35 
    36 kernel_image_start:
     33SYMBOL(kernel_image_start)
    3734        # Install trap handlers
    3835        set trap_table, %g1
     
    6865        nop
    6966
    70 early_putchar:
     67FUNCTION_BEGIN(early_putchar)
    7168        set 0x80000100, %l0
    7269        cmp %o0, '\n'
     
    8077                retl
    8178                nop
     79FUNCTION_END(early_putchar)
    8280
    83 kernel_sp:
     81SYMBOL(kernel_sp)
    8482.space 4
    8583
    86 uspace_wbuf:
     84SYMBOL(uspace_wbuf)
    8785.space 4
    8886
  • kernel/arch/sparc32/src/trap_table.S

    rb66cc97 r38ad239  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <arch/trap.h>
    3031#include <arch/regwin.h>
    3132
    3233.text
    33 
    34 .global trap_table
    35 .global reset_trap
    36 .global preemptible_trap
    37 .global interrupt_trap
    38 .global syscall_trap
    39 .global window_overflow_trap
    40 .global window_underflow_trap
    41 .global write_to_invalid
    42 .global read_from_invalid
    43 .global flush_windows
    4434
    4535.macro get_wim_number reg
     
    218208.endm
    219209
    220 write_to_invalid:
     210FUNCTION_BEGIN(write_to_invalid)
    221211        ! Write value 1
    222212        mov %o0, %g7
     
    236226        retl
    237227        nop
    238 
    239 read_from_invalid:
     228FUNCTION_END(write_to_invalid)
     229
     230FUNCTION_BEGIN(read_from_invalid)
    240231        ! Read value 1
    241232        mov %o0, %g7
     
    255246        retl
    256247        nop
    257 
    258 reset_trap:
     248FUNCTION_END(read_from_invalid)
     249
     250SYMBOL(reset_trap)
    259251        set 0x80000100, %l0
    260252        set 'r', %l1
     
    262254        rett
    263255
    264 window_overflow_trap:
     256SYMBOL(window_overflow_trap)
    265257        mov %g7, %l0
    266258       
     
    393385                rett %l2
    394386
    395 window_underflow_trap:
     387SYMBOL(window_underflow_trap)
    396388        mov %g7, %l0
    397389       
     
    479471                rett %l2
    480472
    481 flush_windows:
     473FUNCTION_BEGIN(flush_windows)
    482474        mov 7, %g1
    483475        1:
     
    494486        retl
    495487        nop
    496 
    497 preemptible_trap:
     488FUNCTION_END(flush_windows)
     489
     490SYMBOL(preemptible_trap)
    498491        /* Save %g7 */
    499492        mov %g7, %l0
     
    670663                rett %l2
    671664
    672 interrupt_trap:
     665SYMBOL(interrupt_trap)
    673666        /* Save %g7 */
    674667        mov %g7, %l0
     
    844837                rett %l2
    845838
    846 syscall_trap:
     839SYMBOL(syscall_trap)
    847840        /* Save %g7 */
    848841        mov %g7, %l0
     
    10511044
    10521045.align TRAP_TABLE_SIZE
    1053 trap_table:
     1046SYMBOL(trap_table)
    10541047        STRAP(0x0, reset_trap)
    10551048        TRAP(0x1, instruction_access_exception)
  • uspace/lib/c/arch/sparc32/Makefile.inc

    rb66cc97 r38ad239  
    2828
    2929ARCH_SOURCES = \
    30         arch/$(UARCH)/src/entry.s \
    31         arch/$(UARCH)/src/entryjmp.s \
    32         arch/$(UARCH)/src/thread_entry.s \
     30        arch/$(UARCH)/src/entry.S \
     31        arch/$(UARCH)/src/entryjmp.S \
     32        arch/$(UARCH)/src/thread_entry.S \
    3333        arch/$(UARCH)/src/fibril.S \
    3434        arch/$(UARCH)/src/tls.c \
  • uspace/lib/c/arch/sparc32/src/entry.S

    rb66cc97 r38ad239  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.section .init, "ax"
    3032
    3133.org 0
    32 
    33 .globl __entry
    3434
    3535## User-space task entry point
     
    3838# %o1 contains pcb_ptr
    3939#
    40 __entry:
     40SYMBOL(__entry)
    4141        #
    4242        # Create the first stack frame.
  • uspace/lib/c/arch/sparc32/src/entryjmp.S

    rb66cc97 r38ad239  
    2727#
    2828
    29 .globl entry_point_jmp
     29#include <abi/asmtool.h>
    3030
    3131## void entry_point_jmp(void *entry_point, void *pcb);
     
    3535#
    3636# Jump to program entry point
    37 entry_point_jmp:
     37FUNCTION_BEGIN(entry_point_jmp)
    3838        # Pass pcb pointer to entry point in %o1. As it is already
    3939        # there, no action is needed.
     
    4141        nop
    4242        # FIXME: use branch instead of call
     43FUNCTION_END(entry_point_jmp)
  • uspace/lib/c/arch/sparc32/src/fibril.S

    rb66cc97 r38ad239  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <libarch/context_offset.h>
    3031
    3132.text
    3233
    33 .global flush_windows
    34 .global context_save
    35 .global context_restore
    36 
    37 context_save:
     34FUNCTION_BEGIN(context_save)
    3835        #
    3936        # We rely on the kernel to flush our active register windows to memory
     
    5653        retl
    5754        mov 1, %o0              ! context_save_arch returns 1
     55FUNCTION_END(context_save)
    5856
    59 context_restore:
     57FUNCTION_BEGIN(context_restore)
    6058        #
    6159        # Flush all active windows.
     
    8482        retl
    8583        xor %o0, %o0, %o0       ! context_restore_arch returns 0
     84FUNCTION_END(context_restore)
  • uspace/lib/c/arch/sparc32/src/stacktrace_asm.S

    rb66cc97 r38ad239  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <libarch/stack.h>
    3031
    3132.text
    3233
    33 .global stacktrace_prepare
    34 .global stacktrace_fp_get
    35 .global stacktrace_pc_get
    36 
    37 stacktrace_prepare:
     34FUNCTION_BEGIN(stacktrace_prepare)
    3835        save %sp, -(STACK_WINDOW_SAVE_AREA_SIZE+STACK_ARG_SAVE_AREA_SIZE), %sp
    3936       
     
    5350        ret
    5451        restore
     52FUNCTION_END(stacktrace_prepare)
    5553
    56 stacktrace_fp_get:
     54FUNCTION_BEGIN(stacktrace_fp_get)
    5755        # Add the stack bias to %sp to get the actual address.
    5856        retl
    5957        mov %sp,  %o0
     58FUNCTION_END(stacktrace_fp_get)
    6059
    61 stacktrace_pc_get:
     60FUNCTION_BEGIN(stacktrace_pc_get)
    6261        retl
    6362        mov %o7, %o0
     63FUNCTION_END(stacktrace_pc_get)
  • uspace/lib/c/arch/sparc32/src/thread_entry.S

    rb66cc97 r38ad239  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    30 
    31 .globl __thread_entry
    3232
    3333## User-space thread entry point for all but the first threads.
    3434#
    3535#
    36 __thread_entry:
     36SYMBOL(__thread_entry)
    3737        #
    3838        # Create the first stack frame.
     
    6666       
    6767        ! not reached
    68        
    69 .end __thread_entry
Note: See TracChangeset for help on using the changeset viewer.