diff options
Diffstat (limited to 'arch/x86/boot/copy.S')
-rw-r--r-- | arch/x86/boot/copy.S | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/arch/x86/boot/copy.S b/arch/x86/boot/copy.S index ef50c84e8b4b..11f272c6f5e9 100644 --- a/arch/x86/boot/copy.S +++ b/arch/x86/boot/copy.S | |||
@@ -8,6 +8,8 @@ | |||
8 | * | 8 | * |
9 | * ----------------------------------------------------------------------- */ | 9 | * ----------------------------------------------------------------------- */ |
10 | 10 | ||
11 | #include <linux/linkage.h> | ||
12 | |||
11 | /* | 13 | /* |
12 | * Memory copy routines | 14 | * Memory copy routines |
13 | */ | 15 | */ |
@@ -15,9 +17,7 @@ | |||
15 | .code16gcc | 17 | .code16gcc |
16 | .text | 18 | .text |
17 | 19 | ||
18 | .globl memcpy | 20 | GLOBAL(memcpy) |
19 | .type memcpy, @function | ||
20 | memcpy: | ||
21 | pushw %si | 21 | pushw %si |
22 | pushw %di | 22 | pushw %di |
23 | movw %ax, %di | 23 | movw %ax, %di |
@@ -31,11 +31,9 @@ memcpy: | |||
31 | popw %di | 31 | popw %di |
32 | popw %si | 32 | popw %si |
33 | ret | 33 | ret |
34 | .size memcpy, .-memcpy | 34 | ENDPROC(memcpy) |
35 | 35 | ||
36 | .globl memset | 36 | GLOBAL(memset) |
37 | .type memset, @function | ||
38 | memset: | ||
39 | pushw %di | 37 | pushw %di |
40 | movw %ax, %di | 38 | movw %ax, %di |
41 | movzbl %dl, %eax | 39 | movzbl %dl, %eax |
@@ -48,52 +46,42 @@ memset: | |||
48 | rep; stosb | 46 | rep; stosb |
49 | popw %di | 47 | popw %di |
50 | ret | 48 | ret |
51 | .size memset, .-memset | 49 | ENDPROC(memset) |
52 | 50 | ||
53 | .globl copy_from_fs | 51 | GLOBAL(copy_from_fs) |
54 | .type copy_from_fs, @function | ||
55 | copy_from_fs: | ||
56 | pushw %ds | 52 | pushw %ds |
57 | pushw %fs | 53 | pushw %fs |
58 | popw %ds | 54 | popw %ds |
59 | call memcpy | 55 | call memcpy |
60 | popw %ds | 56 | popw %ds |
61 | ret | 57 | ret |
62 | .size copy_from_fs, .-copy_from_fs | 58 | ENDPROC(copy_from_fs) |
63 | 59 | ||
64 | .globl copy_to_fs | 60 | GLOBAL(copy_to_fs) |
65 | .type copy_to_fs, @function | ||
66 | copy_to_fs: | ||
67 | pushw %es | 61 | pushw %es |
68 | pushw %fs | 62 | pushw %fs |
69 | popw %es | 63 | popw %es |
70 | call memcpy | 64 | call memcpy |
71 | popw %es | 65 | popw %es |
72 | ret | 66 | ret |
73 | .size copy_to_fs, .-copy_to_fs | 67 | ENDPROC(copy_to_fs) |
74 | 68 | ||
75 | #if 0 /* Not currently used, but can be enabled as needed */ | 69 | #if 0 /* Not currently used, but can be enabled as needed */ |
76 | 70 | GLOBAL(copy_from_gs) | |
77 | .globl copy_from_gs | ||
78 | .type copy_from_gs, @function | ||
79 | copy_from_gs: | ||
80 | pushw %ds | 71 | pushw %ds |
81 | pushw %gs | 72 | pushw %gs |
82 | popw %ds | 73 | popw %ds |
83 | call memcpy | 74 | call memcpy |
84 | popw %ds | 75 | popw %ds |
85 | ret | 76 | ret |
86 | .size copy_from_gs, .-copy_from_gs | 77 | ENDPROC(copy_from_gs) |
87 | .globl copy_to_gs | ||
88 | 78 | ||
89 | .type copy_to_gs, @function | 79 | GLOBAL(copy_to_gs) |
90 | copy_to_gs: | ||
91 | pushw %es | 80 | pushw %es |
92 | pushw %gs | 81 | pushw %gs |
93 | popw %es | 82 | popw %es |
94 | call memcpy | 83 | call memcpy |
95 | popw %es | 84 | popw %es |
96 | ret | 85 | ret |
97 | .size copy_to_gs, .-copy_to_gs | 86 | ENDPROC(copy_to_gs) |
98 | |||
99 | #endif | 87 | #endif |