Changeset b66cc97 in mainline for kernel/arch/ppc32/src


Ignore:
Timestamp:
2016-04-24T08:00:09Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
38ad239
Parents:
0407636
Message:

ppc32: use asmtool.h macros for defining symbols

Location:
kernel/arch/ppc32/src
Files:
6 edited
1 moved

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/src/asm.S

    r0407636 rb66cc97  
    2727 */
    2828
     29#include <abi/asmtool.h>
    2930#include <arch/asm/regname.h>
    3031#include <arch/msr.h>
     
    3334.text
    3435
    35 .global userspace_asm
    36 .global iret
    37 .global iret_syscall
    38 .global memcpy_from_uspace
    39 .global memcpy_to_uspace
    40 .global memcpy_from_uspace_failover_address
    41 .global memcpy_to_uspace_failover_address
    42 .global early_putchar
    43 
    44 userspace_asm:
    45        
     36FUNCTION_BEGIN(userspace_asm)
    4637        /*
    4738         * r3 = uspace_uarg
     
    7869       
    7970        rfi
    80 
    81 iret:
    82        
     71FUNCTION_END(userspace_asm)
     72
     73SYMBOL(iret)
    8374        /* Disable interrupts */
    8475       
     
    142133        rfi
    143134
    144 iret_syscall:
    145        
     135SYMBOL(iret_syscall)
    146136        /* Disable interrupts */
    147137       
     
    204194        rfi
    205195
    206 memcpy_from_uspace:
    207 memcpy_to_uspace:
    208        
     196FUNCTION_BEGIN(memcpy_from_uspace)
     197FUNCTION_BEGIN(memcpy_to_uspace)
    209198        srwi. r7, r5, 3
    210199        addi r6, r3, -4
     
    267256                mtctr r7
    268257                b 1b
    269 
    270 memcpy_from_uspace_failover_address:
    271 memcpy_to_uspace_failover_address:
     258FUNCTION_END(memcpy_from_uspace)
     259FUNCTION_END(memcpy_to_uspace)
     260
     261SYMBOL(memcpy_from_uspace_failover_address)
     262SYMBOL(memcpy_to_uspace_failover_address)
    272263        /* Return zero, failure */
    273264        xor r3, r3, r3
    274265        blr
    275266
    276 early_putchar:
     267FUNCTION_BEGIN(early_putchar)
    277268        blr
     269FUNCTION_END(early_putchar)
  • kernel/arch/ppc32/src/boot/boot.S

    r0407636 rb66cc97  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <arch/asm/regname.h>
    3031#include <config.h>
     
    3233.section K_TEXT_START, "ax"
    3334
    34 .global kernel_image_start
    35 kernel_image_start:
    36        
     35SYMBOL(kernel_image_start)
    3736        # load temporal kernel stack
    3837       
  • kernel/arch/ppc32/src/context.S

    r0407636 rb66cc97  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <arch/context_struct.h>
    3031#include <arch/asm/regname.h>
     
    3233.text
    3334
    34 .global context_save_arch
    35 .global context_restore_arch
    36 
    37 context_save_arch:
     35FUNCTION_BEGIN(context_save_arch)
    3836        stw sp, CONTEXT_OFFSET_SP(r3)
    3937        stw r2, CONTEXT_OFFSET_R2(r3)
     
    6765        li r3, 1
    6866        blr
     67FUNCTION_END(context_save_arch)
    6968
    70 context_restore_arch:
     69FUNCTION_BEGIN(context_restore_arch)
    7170        lwz sp, CONTEXT_OFFSET_SP(r3)
    7271        lwz r2, CONTEXT_OFFSET_R2(r3)
     
    10099        li r3, 0
    101100        blr
     101FUNCTION_END(context_restore_arch)
  • kernel/arch/ppc32/src/debug/stacktrace_asm.S

    r0407636 rb66cc97  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <arch/asm/regname.h>
    3031
    3132.text
    3233
    33 .global frame_pointer_get
    34 .global program_counter_get
    35 
    36 frame_pointer_get:
     34FUNCTION_BEGIN(frame_pointer_get)
    3735        mr r3, sp
    3836        blr
     37FUNCTION_END(frame_pointer_get)
    3938
    40 program_counter_get:
     39FUNCTION_BEGIN(program_counter_get)
    4140        mflr r3
    4241        blr
     42FUNCTION_END(program_counter_get)
  • kernel/arch/ppc32/src/dummy.S

    r0407636 rb66cc97  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    3032
    31 .global asm_delay_loop
    32 .global sys_tls_set
    33 .global cpu_halt
     33FUNCTION_BEGIN(sys_tls_set)
     34        b sys_tls_set
     35FUNCTION_END(sys_tls_set)
    3436
    35 sys_tls_set:
    36         b sys_tls_set
     37FUNCTION_BEGIN(asm_delay_loop)
     38        blr
     39FUNCTION_END(asm_delay_loop)
    3740
    38 asm_delay_loop:
    39         blr
    40 
    41 cpu_halt:
     41FUNCTION_BEGIN(cpu_halt)
    4242        b cpu_halt
     43FUNCTION_END(cpu_halt)
  • kernel/arch/ppc32/src/exception.S

    r0407636 rb66cc97  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <arch/asm/regname.h>
    3031#include <arch/msr.h>
     
    126127
    127128.org 0x100
    128 .global exc_system_reset
    129 exc_system_reset:
     129SYMBOL(exc_system_reset)
    130130        CONTEXT_STORE
    131131       
     
    134134
    135135.org 0x200
    136 .global exc_machine_check
    137 exc_machine_check:
     136SYMBOL(exc_machine_check)
    138137        CONTEXT_STORE
    139138       
     
    142141
    143142.org 0x300
    144 .global exc_data_storage
    145 exc_data_storage:
     143SYMBOL(exc_data_storage)
    146144        CONTEXT_STORE
    147145       
     
    150148
    151149.org 0x400
    152 .global exc_instruction_storage
    153 exc_instruction_storage:
     150SYMBOL(exc_instruction_storage)
    154151        CONTEXT_STORE
    155152       
     
    158155
    159156.org 0x500
    160 .global exc_external
    161 exc_external:
     157SYMBOL(exc_external)
    162158        CONTEXT_STORE
    163159       
     
    166162
    167163.org 0x600
    168 .global exc_alignment
    169 exc_alignment:
     164SYMBOL(exc_alignment)
    170165        CONTEXT_STORE
    171166       
     
    174169
    175170.org 0x700
    176 .global exc_program
    177 exc_program:
     171SYMBOL(exc_program)
    178172        CONTEXT_STORE
    179173       
     
    182176
    183177.org 0x800
    184 .global exc_fp_unavailable
    185 exc_fp_unavailable:
     178SYMBOL(exc_fp_unavailable)
    186179        CONTEXT_STORE
    187180       
     
    190183
    191184.org 0x900
    192 .global exc_decrementer
    193 exc_decrementer:
     185SYMBOL(exc_decrementer)
    194186        CONTEXT_STORE
    195187       
     
    198190
    199191.org 0xa00
    200 .global exc_reserved0
    201 exc_reserved0:
     192SYMBOL(exc_reserved0)
    202193        CONTEXT_STORE
    203194       
     
    206197
    207198.org 0xb00
    208 .global exc_reserved1
    209 exc_reserved1:
     199SYMBOL(exc_reserved1)
    210200        CONTEXT_STORE
    211201       
     
    214204
    215205.org 0xc00
    216 .global exc_syscall
    217 exc_syscall:
     206SYMBOL(exc_syscall)
    218207        CONTEXT_STORE
    219208       
     
    221210
    222211.org 0xd00
    223 .global exc_trace
    224 exc_trace:
     212SYMBOL(exc_trace)
    225213        CONTEXT_STORE
    226214       
     
    229217
    230218.org 0x1000
    231 .global exc_itlb_miss
    232 exc_itlb_miss:
     219SYMBOL(exc_itlb_miss)
    233220        CONTEXT_STORE
    234221       
     
    237224
    238225.org 0x1100
    239 .global exc_dtlb_miss_load
    240 exc_dtlb_miss_load:
     226SYMBOL(exc_dtlb_miss_load)
    241227        CONTEXT_STORE
    242228       
     
    245231
    246232.org 0x1200
    247 .global exc_dtlb_miss_store
    248 exc_dtlb_miss_store:
     233SYMBOL(exc_dtlb_miss_store)
    249234        CONTEXT_STORE
    250235       
  • kernel/arch/ppc32/src/fpu_context.S

    r0407636 rb66cc97  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <arch/asm/regname.h>
    3031#include <arch/fpu_context_struct.h>
     
    3233
    3334.text
    34 
    35 .global fpu_context_save
    36 .global fpu_context_restore
    37 .global fpu_init
    38 .global fpu_enable
    39 .global fpu_disable
    4035
    4136.macro FPU_CONTEXT_STORE r
     
    109104.endm
    110105
    111 fpu_context_save:
     106FUNCTION_BEGIN(fpu_context_save)
    112107        FPU_CONTEXT_STORE r3
    113108       
     
    116111       
    117112        blr
     113FUNCTION_END(fpu_context_save)
    118114
    119 fpu_context_restore:
     115FUNCTION_BEGIN(fpu_context_restore)
    120116        lfd fr0, FPU_CONTEXT_OFFSET_FPSCR(r3)
    121117        mtfsf 0xff, fr0
     
    124120       
    125121        blr
     122FUNCTION_END(fpu_context_restore)
    126123
    127 fpu_init:
     124FUNCTION_BEGIN(fpu_init)
    128125        mfmsr r0
    129126        ori r0, r0, MSR_FP
     
    137134       
    138135        blr
     136FUNCTION_END(fpu_init)
    139137
    140 fpu_enable:
     138FUNCTION_BEGIN(fpu_enable)
    141139        mfmsr r0
    142140        ori r0, r0, MSR_FP
     
    144142        isync
    145143        blr
     144FUNCTION_END(fpu_enable)
    146145
    147 fpu_disable:
     146FUNCTION_BEGIN(fpu_disable)
    148147        mfmsr r0
    149148        li r3, MSR_FP
     
    152151        isync
    153152        blr
     153FUNCTION_END(fpu_disable)
Note: See TracChangeset for help on using the changeset viewer.