Changeset 8844e70 in mainline for kernel/arch/ia32
- Timestamp:
- 2016-04-11T17:03:47Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3b0f1b9a
- Parents:
- 3a34852
- Location:
- kernel/arch/ia32
- Files:
-
- 8 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/Makefile.inc
r3a34852 r8844e70 75 75 arch/$(KARCH)/src/debug/stacktrace.c \ 76 76 arch/$(KARCH)/src/debug/stacktrace_asm.S \ 77 arch/$(KARCH)/src/delay. s\77 arch/$(KARCH)/src/delay.S \ 78 78 arch/$(KARCH)/src/asm.S \ 79 79 arch/$(KARCH)/src/proc/scheduler.c \ -
kernel/arch/ia32/src/asm.S
r3a34852 r8844e70 31 31 */ 32 32 33 #include <abi/asmtool.h> 33 34 #include <arch/pm.h> 34 35 #include <arch/cpu.h> … … 37 38 38 39 .text 39 .global paging_on40 .global enable_l_apic_in_msr41 .global memcpy_from_uspace42 .global memcpy_from_uspace_failover_address43 .global memcpy_to_uspace44 .global memcpy_to_uspace_failover_address45 .global early_putchar46 40 47 41 #define MEMCPY_DST 4 … … 64 58 * 65 59 */ 66 memcpy_from_uspace: 67 memcpy_to_uspace: 60 FUNCTION_BEGIN(memcpy_from_uspace) 61 FUNCTION_BEGIN(memcpy_to_uspace) 68 62 movl %edi, %edx /* save %edi */ 69 63 movl %esi, %eax /* save %esi */ … … 93 87 movl MEMCPY_DST(%esp), %eax 94 88 ret 89 FUNCTION_END(memcpy_from_uspace) 90 FUNCTION_END(memcpy_to_uspace) 95 91 96 92 /* … … 98 94 * above had caused a page fault. 99 95 */ 100 memcpy_from_uspace_failover_address: 101 memcpy_to_uspace_failover_address: 96 SYMBOL(memcpy_from_uspace_failover_address) 97 SYMBOL(memcpy_to_uspace_failover_address) 102 98 movl %edx, %edi 103 99 movl %eax, %esi … … 112 108 * 113 109 */ 114 paging_on: 110 FUNCTION_BEGIN(paging_on) 115 111 movl %cr0, %edx 116 112 orl $(1 << 31), %edx /* paging on */ … … 123 119 0: 124 120 ret 121 FUNCTION_END(paging_on) 125 122 126 123 /** Enable local APIC … … 129 126 * 130 127 */ 131 enable_l_apic_in_msr: 128 FUNCTION_BEGIN(enable_l_apic_in_msr) 132 129 movl $0x1b, %ecx 133 130 rdmsr … … 136 133 wrmsr 137 134 ret 135 FUNCTION_END(enable_l_apic_in_msr) 138 136 139 137 /* … … 152 150 * entirely in registers. 153 151 */ 154 .global sysenter_handler 155 sysenter_handler: 152 SYMBOL(sysenter_handler) 156 153 157 154 /* … … 232 229 * This is the legacy syscall handler using the interrupt mechanism. 233 230 */ 234 .global int_syscall 235 int_syscall: 231 SYMBOL(int_syscall) 236 232 subl $(ISTATE_SOFT_SIZE + 4), %esp 237 233 … … 319 315 320 316 .macro handler i 321 .global int_\i 322 int_\i: 317 SYMBOL(int_\i) 323 318 /* 324 319 * This macro distinguishes between two versions of ia32 … … 462 457 * 463 458 */ 464 early_putchar: 459 FUNCTION_BEGIN(early_putchar) 465 460 466 461 #if ((defined(CONFIG_EGA)) && (!defined(CONFIG_FB))) … … 594 589 595 590 ret 596 591 FUNCTION_END(early_putchar) 592 -
kernel/arch/ia32/src/atomic.S
r3a34852 r8844e70 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 32 31 33 #ifdef CONFIG_SMP 32 34 33 .global spinlock_arch34 35 35 # 36 36 # This is a bus-and-hyperthreading-friendly implementation of spinlock 37 37 # 38 spinlock_arch: 38 FUNCTION_BEGIN(spinlock_arch) 39 39 pushl %eax 40 40 pushl %ebx … … 55 55 popl %eax 56 56 ret 57 FUNCTION_END(spinlock_arch) 57 58 58 59 #endif -
kernel/arch/ia32/src/boot/multiboot.S
r3a34852 r8844e70 29 29 */ 30 30 31 #include <abi/asmtool.h> 31 32 #include <arch/boot/boot.h> 32 33 #include <arch/mm/page.h> … … 61 62 62 63 .align 4 63 .global multiboot_image_start64 64 multiboot_header: 65 65 .long MULTIBOOT_HEADER_MAGIC … … 72 72 .long multiboot_image_start 73 73 74 multiboot_image_start: 74 SYMBOL(multiboot_image_start) 75 75 cli 76 76 cld … … 162 162 * 163 163 */ 164 .global map_kernel_pse 164 FUNCTION_BEGIN(map_kernel_pse) 165 165 map_kernel_pse: 166 166 /* Paging features */ … … 194 194 movl %ebx, %cr0 195 195 ret 196 FUNCTION_END(map_kernel_pse) 196 197 197 198 /** Setup mapping for the kernel (non-PSE variant). … … 201 202 * 202 203 */ 203 .global map_kernel_non_pse 204 map_kernel_non_pse: 204 FUNCTION_BEGIN(map_kernel_non_pse) 205 205 /* Paging features */ 206 206 movl %cr4, %ecx … … 281 281 282 282 ret 283 FUNCTION_END(map_kernel_non_pse) 283 284 284 285 /** Calculate unmapped address of the end of the kernel. */ … … 707 708 .space 4096, 0 708 709 709 .global bootstrap_idtr 710 bootstrap_idtr: 710 SYMBOL(bootstrap_idtr) 711 711 .word 0 712 712 .long 0 713 713 714 .global bootstrap_gdtr 715 bootstrap_gdtr: 714 SYMBOL(bootstrap_gdtr) 716 715 .word GDT_SELECTOR(GDT_ITEMS) 717 716 .long KA2PA(gdt) 718 717 719 .global multiboot_eax 720 multiboot_eax: 718 SYMBOL(multiboot_eax) 721 719 .long 0 722 720 723 .global multiboot_ebx 724 multiboot_ebx: 721 SYMBOL(multiboot_ebx) 725 722 .long 0 726 723 -
kernel/arch/ia32/src/boot/multiboot2.S
r3a34852 r8844e70 27 27 */ 28 28 29 #include <abi/asmtool.h> 29 30 #include <arch/boot/boot.h> 30 31 #include <arch/pm.h> … … 39 40 40 41 .align 8 41 .global multiboot2_image_start42 42 multiboot2_header_start: 43 43 .long MULTIBOOT2_HEADER_MAGIC … … 120 120 multiboot2_header_end: 121 121 122 multiboot2_image_start: 122 SYMBOL(multiboot2_image_start) 123 123 cli 124 124 cld -
kernel/arch/ia32/src/context.S
r3a34852 r8844e70 27 27 # 28 28 29 #include <abi/asmtool.h> 29 30 #include <arch/context_struct.h> 30 31 31 32 .text 32 33 .global context_save_arch34 .global context_restore_arch35 36 33 37 34 ## Save current CPU context … … 40 37 # pointed by the 1st argument. Returns 1 in EAX. 41 38 # 42 context_save_arch: 39 FUNCTION_BEGIN(context_save_arch) 43 40 movl 0(%esp), %eax # save pc value into eax 44 41 movl 4(%esp), %edx # address of the context variable to save context to … … 55 52 incl %eax 56 53 ret 54 FUNCTION_END(context_save_arch) 57 55 58 56 … … 62 60 # pointed by the 1st argument. Returns 0 in EAX. 63 61 # 64 context_restore_arch: 62 FUNCTION_BEGIN(context_restore_arch) 65 63 movl 4(%esp), %eax # address of the context variable to restore context from 66 64 … … 76 74 xorl %eax, %eax # context_restore returns 0 77 75 ret 78 76 FUNCTION_END(context_restore_arch) -
kernel/arch/ia32/src/debug/stacktrace_asm.S
r3a34852 r8844e70 27 27 # 28 28 29 #include <abi/asmtool.h> 30 29 31 .text 30 32 31 .global frame_pointer_get 32 .global program_counter_get 33 34 frame_pointer_get: 33 FUNCTION_BEGIN(frame_pointer_get) 35 34 movl %ebp, %eax 36 35 ret 36 FUNCTION_END(frame_pointer_get) 37 37 38 program_counter_get: 38 FUNCTION_BEGIN(program_counter_get) 39 39 movl (%esp), %eax 40 40 ret 41 FUNCTION_END(program_counter_get) -
kernel/arch/ia32/src/delay.S
r3a34852 r8844e70 31 31 # 32 32 33 #include <abi/asmtool.h> 34 33 35 .text 34 36 35 .global asm_delay_loop 36 .global asm_fake_loop 37 38 asm_delay_loop: 37 FUNCTION_BEGIN(asm_delay_loop) 39 38 movl 4(%esp),%ecx # move argument to %ecx 40 39 0: lahf … … 42 41 jnz 0b 43 42 ret 43 FUNCTION_END(asm_delay_loop) 44 44 45 asm_fake_loop: 45 FUNCTION_BEGIN(asm_fake_loop) 46 46 movl 4(%esp),%ecx # move argument to %ecx 47 47 0: lahf … … 49 49 jz 0b 50 50 ret 51 FUNCTION_END(asm_fake_loop) 52 -
kernel/arch/ia32/src/smp/ap.S
r3a34852 r8844e70 32 32 */ 33 33 34 #include <abi/asmtool.h> 34 35 #include <arch/boot/boot.h> 35 36 #include <arch/boot/memmap.h> … … 40 41 41 42 #ifdef CONFIG_SMP 42 43 .global unmapped_ap_boot44 43 45 44 KTEXT=8 … … 53 52 54 53 .align 4096 55 unmapped_ap_boot: 54 SYMBOL(unmapped_ap_boot) 56 55 .code16 57 56 cli … … 99 98 #ifdef CONFIG_SMP 100 99 101 .global unmapped_ap_gdtr 102 103 unmapped_ap_gdtr: 100 SYMBOL(unmapped_ap_gdtr) 104 101 .word 0 105 102 .long 0
Note:
See TracChangeset
for help on using the changeset viewer.