Changeset 3b0f1b9a in mainline for kernel/arch/amd64/src/asm.S


Ignore:
Timestamp:
2016-04-12T05:57:00Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0f792c28, d84398a7
Parents:
8844e70
Message:

amd64: use asmtool.h macros for defining symbols

File:
1 edited

Legend:

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

    r8844e70 r3b0f1b9a  
    2727 */
    2828
     29#include <abi/asmtool.h>
    2930#include <arch/pm.h>
    3031#include <arch/mm/page.h>
     
    3233
    3334.text
    34 .global interrupt_handlers
    35 .global syscall_entry
    36 .global cpuid
    37 .global has_cpuid
    38 .global read_efer_flag
    39 .global set_efer_flag
    40 .global memcpy_from_uspace
    41 .global memcpy_to_uspace
    42 .global memcpy_from_uspace_failover_address
    43 .global memcpy_to_uspace_failover_address
    44 .global early_putchar
    4535
    4636#define MEMCPY_DST   %rdi
     
    6454 *
    6555 */
    66 memcpy_from_uspace:
    67 memcpy_to_uspace:
     56FUNCTION_BEGIN(memcpy_from_uspace)
     57FUNCTION_BEGIN(memcpy_to_uspace)
    6858        movq MEMCPY_DST, %rax
    6959       
     
    8171        0:
    8272                ret                 /* return MEMCPY_SRC, success */
    83 
    84 memcpy_from_uspace_failover_address:
    85 memcpy_to_uspace_failover_address:
     73FUNCTION_END(memcpy_from_uspace)
     74FUNCTION_END(memcpy_to_uspace)
     75
     76SYMBOL(memcpy_from_uspace_failover_address)
     77SYMBOL(memcpy_to_uspace_failover_address)
    8678        xorl %eax, %eax         /* return 0, failure */
    8779        ret
     
    9284*
    9385*/
    94 has_cpuid:
     86FUNCTION_BEGIN(has_cpuid)
    9587        /* Load RFLAGS */
    9688        pushfq
     
    114106        xorl %edx, %eax
    115107        ret
    116 
    117 cpuid:
     108FUNCTION_END(has_cpuid)
     109
     110FUNCTION_BEGIN(cpuid)
    118111        /* Preserve %rbx across function calls */
    119112        movq %rbx, %r10
     
    130123        movq %r10, %rbx
    131124        ret
    132 
    133 set_efer_flag:
     125FUNCTION_END(cpuid)
     126
     127FUNCTION_BEGIN(set_efer_flag)
    134128        movl $0xc0000080, %ecx
    135129        rdmsr
     
    137131        wrmsr
    138132        ret
    139 
    140 read_efer_flag:
     133FUNCTION_END(set_efer_flag)
     134
     135FUNCTION_BEGIN(read_efer_flag)
    141136        movl $0xc0000080, %ecx
    142137        rdmsr
    143138        ret
     139FUNCTION_END(read_efer_flag)
    144140
    145141/*
     
    157153
    158154.macro handler i
    159 .global int_\i
    160 int_\i:
     155SYMBOL(int_\i)
    161156
    162157        /*
     
    249244        53,54,55,56,57,58,59,60,61,62,63
    250245
    251 interrupt_handlers:
     246SYMBOL(interrupt_handlers)
    252247.irp cnt, LIST_0_63
    253248        handler \cnt
     
    273268 *
    274269 */
    275 syscall_entry:
     270SYMBOL(syscall_entry)
    276271        /* Switch to hidden %gs */
    277272        swapgs
     
    396391 *
    397392 */
    398 early_putchar:
    399        
     393FUNCTION_BEGIN(early_putchar)
    400394#if ((defined(CONFIG_EGA)) && (!defined(CONFIG_FB)))
    401395       
     
    525519       
    526520        ret
    527 
     521FUNCTION_END(early_putchar)
     522
Note: See TracChangeset for help on using the changeset viewer.