Changeset 3b0f1b9a in mainline for kernel/arch/amd64/src/asm.S
- Timestamp:
- 2016-04-12T05:57:00Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0f792c28, d84398a7
- Parents:
- 8844e70
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/asm.S
r8844e70 r3b0f1b9a 27 27 */ 28 28 29 #include <abi/asmtool.h> 29 30 #include <arch/pm.h> 30 31 #include <arch/mm/page.h> … … 32 33 33 34 .text 34 .global interrupt_handlers35 .global syscall_entry36 .global cpuid37 .global has_cpuid38 .global read_efer_flag39 .global set_efer_flag40 .global memcpy_from_uspace41 .global memcpy_to_uspace42 .global memcpy_from_uspace_failover_address43 .global memcpy_to_uspace_failover_address44 .global early_putchar45 35 46 36 #define MEMCPY_DST %rdi … … 64 54 * 65 55 */ 66 memcpy_from_uspace: 67 memcpy_to_uspace: 56 FUNCTION_BEGIN(memcpy_from_uspace) 57 FUNCTION_BEGIN(memcpy_to_uspace) 68 58 movq MEMCPY_DST, %rax 69 59 … … 81 71 0: 82 72 ret /* return MEMCPY_SRC, success */ 83 84 memcpy_from_uspace_failover_address: 85 memcpy_to_uspace_failover_address: 73 FUNCTION_END(memcpy_from_uspace) 74 FUNCTION_END(memcpy_to_uspace) 75 76 SYMBOL(memcpy_from_uspace_failover_address) 77 SYMBOL(memcpy_to_uspace_failover_address) 86 78 xorl %eax, %eax /* return 0, failure */ 87 79 ret … … 92 84 * 93 85 */ 94 has_cpuid: 86 FUNCTION_BEGIN(has_cpuid) 95 87 /* Load RFLAGS */ 96 88 pushfq … … 114 106 xorl %edx, %eax 115 107 ret 116 117 cpuid: 108 FUNCTION_END(has_cpuid) 109 110 FUNCTION_BEGIN(cpuid) 118 111 /* Preserve %rbx across function calls */ 119 112 movq %rbx, %r10 … … 130 123 movq %r10, %rbx 131 124 ret 132 133 set_efer_flag: 125 FUNCTION_END(cpuid) 126 127 FUNCTION_BEGIN(set_efer_flag) 134 128 movl $0xc0000080, %ecx 135 129 rdmsr … … 137 131 wrmsr 138 132 ret 139 140 read_efer_flag: 133 FUNCTION_END(set_efer_flag) 134 135 FUNCTION_BEGIN(read_efer_flag) 141 136 movl $0xc0000080, %ecx 142 137 rdmsr 143 138 ret 139 FUNCTION_END(read_efer_flag) 144 140 145 141 /* … … 157 153 158 154 .macro handler i 159 .global int_\i 160 int_\i: 155 SYMBOL(int_\i) 161 156 162 157 /* … … 249 244 53,54,55,56,57,58,59,60,61,62,63 250 245 251 interrupt_handlers: 246 SYMBOL(interrupt_handlers) 252 247 .irp cnt, LIST_0_63 253 248 handler \cnt … … 273 268 * 274 269 */ 275 syscall_entry: 270 SYMBOL(syscall_entry) 276 271 /* Switch to hidden %gs */ 277 272 swapgs … … 396 391 * 397 392 */ 398 early_putchar: 399 393 FUNCTION_BEGIN(early_putchar) 400 394 #if ((defined(CONFIG_EGA)) && (!defined(CONFIG_FB))) 401 395 … … 525 519 526 520 ret 527 521 FUNCTION_END(early_putchar) 522
Note:
See TracChangeset
for help on using the changeset viewer.