Loading arch/x86/boot/compressed/head_32.S +4 −4 Original line number Diff line number Diff line Loading @@ -25,14 +25,12 @@ #include <linux/linkage.h> #include <asm/segment.h> #include <asm/page.h> #include <asm/page_types.h> #include <asm/boot.h> #include <asm/asm-offsets.h> .section ".text.head","ax",@progbits .globl startup_32 startup_32: ENTRY(startup_32) cld /* test KEEP_SEGMENTS flag to see if the bootloader is asking * us to not reload segments */ Loading Loading @@ -113,6 +111,8 @@ startup_32: */ leal relocated(%ebx), %eax jmp *%eax ENDPROC(startup_32) .section ".text" relocated: Loading arch/x86/boot/compressed/head_64.S +4 −6 Original line number Diff line number Diff line Loading @@ -26,8 +26,8 @@ #include <linux/linkage.h> #include <asm/segment.h> #include <asm/pgtable.h> #include <asm/page.h> #include <asm/pgtable_types.h> #include <asm/page_types.h> #include <asm/boot.h> #include <asm/msr.h> #include <asm/processor-flags.h> Loading @@ -35,9 +35,7 @@ .section ".text.head" .code32 .globl startup_32 startup_32: ENTRY(startup_32) cld /* test KEEP_SEGMENTS flag to see if the bootloader is asking * us to not reload segments */ Loading Loading @@ -176,6 +174,7 @@ startup_32: /* Jump from 32bit compatibility mode into 64bit mode. */ lret ENDPROC(startup_32) no_longmode: /* This isn't an x86-64 CPU so hang */ Loading Loading @@ -295,7 +294,6 @@ relocated: call decompress_kernel popq %rsi /* * Jump to the decompressed kernel. */ Loading arch/x86/boot/copy.S +14 −26 Original line number Diff line number Diff line Loading @@ -8,6 +8,8 @@ * * ----------------------------------------------------------------------- */ #include <linux/linkage.h> /* * Memory copy routines */ Loading @@ -15,9 +17,7 @@ .code16gcc .text .globl memcpy .type memcpy, @function memcpy: GLOBAL(memcpy) pushw %si pushw %di movw %ax, %di Loading @@ -31,11 +31,9 @@ memcpy: popw %di popw %si ret .size memcpy, .-memcpy ENDPROC(memcpy) .globl memset .type memset, @function memset: GLOBAL(memset) pushw %di movw %ax, %di movzbl %dl, %eax Loading @@ -48,52 +46,42 @@ memset: rep; stosb popw %di ret .size memset, .-memset ENDPROC(memset) .globl copy_from_fs .type copy_from_fs, @function copy_from_fs: GLOBAL(copy_from_fs) pushw %ds pushw %fs popw %ds call memcpy popw %ds ret .size copy_from_fs, .-copy_from_fs ENDPROC(copy_from_fs) .globl copy_to_fs .type copy_to_fs, @function copy_to_fs: GLOBAL(copy_to_fs) pushw %es pushw %fs popw %es call memcpy popw %es ret .size copy_to_fs, .-copy_to_fs ENDPROC(copy_to_fs) #if 0 /* Not currently used, but can be enabled as needed */ .globl copy_from_gs .type copy_from_gs, @function copy_from_gs: GLOBAL(copy_from_gs) pushw %ds pushw %gs popw %ds call memcpy popw %ds ret .size copy_from_gs, .-copy_from_gs .globl copy_to_gs ENDPROC(copy_from_gs) .type copy_to_gs, @function copy_to_gs: GLOBAL(copy_to_gs) pushw %es pushw %gs popw %es call memcpy popw %es ret .size copy_to_gs, .-copy_to_gs ENDPROC(copy_to_gs) #endif arch/x86/boot/header.S +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ #include <linux/utsrelease.h> #include <asm/boot.h> #include <asm/e820.h> #include <asm/page.h> #include <asm/page_types.h> #include <asm/setup.h> #include "boot.h" #include "offsets.h" Loading arch/x86/boot/pmjump.S +5 −11 Original line number Diff line number Diff line Loading @@ -15,18 +15,15 @@ #include <asm/boot.h> #include <asm/processor-flags.h> #include <asm/segment.h> #include <linux/linkage.h> .text .globl protected_mode_jump .type protected_mode_jump, @function .code16 /* * void protected_mode_jump(u32 entrypoint, u32 bootparams); */ protected_mode_jump: GLOBAL(protected_mode_jump) movl %edx, %esi # Pointer to boot_params table xorl %ebx, %ebx Loading @@ -47,12 +44,10 @@ protected_mode_jump: .byte 0x66, 0xea # ljmpl opcode 2: .long in_pm32 # offset .word __BOOT_CS # segment .size protected_mode_jump, .-protected_mode_jump ENDPROC(protected_mode_jump) .code32 .type in_pm32, @function in_pm32: GLOBAL(in_pm32) # Set up data segments for flat 32-bit mode movl %ecx, %ds movl %ecx, %es Loading @@ -78,5 +73,4 @@ in_pm32: lldt %cx jmpl *%eax # Jump to the 32-bit entrypoint .size in_pm32, .-in_pm32 ENDPROC(in_pm32) Loading
arch/x86/boot/compressed/head_32.S +4 −4 Original line number Diff line number Diff line Loading @@ -25,14 +25,12 @@ #include <linux/linkage.h> #include <asm/segment.h> #include <asm/page.h> #include <asm/page_types.h> #include <asm/boot.h> #include <asm/asm-offsets.h> .section ".text.head","ax",@progbits .globl startup_32 startup_32: ENTRY(startup_32) cld /* test KEEP_SEGMENTS flag to see if the bootloader is asking * us to not reload segments */ Loading Loading @@ -113,6 +111,8 @@ startup_32: */ leal relocated(%ebx), %eax jmp *%eax ENDPROC(startup_32) .section ".text" relocated: Loading
arch/x86/boot/compressed/head_64.S +4 −6 Original line number Diff line number Diff line Loading @@ -26,8 +26,8 @@ #include <linux/linkage.h> #include <asm/segment.h> #include <asm/pgtable.h> #include <asm/page.h> #include <asm/pgtable_types.h> #include <asm/page_types.h> #include <asm/boot.h> #include <asm/msr.h> #include <asm/processor-flags.h> Loading @@ -35,9 +35,7 @@ .section ".text.head" .code32 .globl startup_32 startup_32: ENTRY(startup_32) cld /* test KEEP_SEGMENTS flag to see if the bootloader is asking * us to not reload segments */ Loading Loading @@ -176,6 +174,7 @@ startup_32: /* Jump from 32bit compatibility mode into 64bit mode. */ lret ENDPROC(startup_32) no_longmode: /* This isn't an x86-64 CPU so hang */ Loading Loading @@ -295,7 +294,6 @@ relocated: call decompress_kernel popq %rsi /* * Jump to the decompressed kernel. */ Loading
arch/x86/boot/copy.S +14 −26 Original line number Diff line number Diff line Loading @@ -8,6 +8,8 @@ * * ----------------------------------------------------------------------- */ #include <linux/linkage.h> /* * Memory copy routines */ Loading @@ -15,9 +17,7 @@ .code16gcc .text .globl memcpy .type memcpy, @function memcpy: GLOBAL(memcpy) pushw %si pushw %di movw %ax, %di Loading @@ -31,11 +31,9 @@ memcpy: popw %di popw %si ret .size memcpy, .-memcpy ENDPROC(memcpy) .globl memset .type memset, @function memset: GLOBAL(memset) pushw %di movw %ax, %di movzbl %dl, %eax Loading @@ -48,52 +46,42 @@ memset: rep; stosb popw %di ret .size memset, .-memset ENDPROC(memset) .globl copy_from_fs .type copy_from_fs, @function copy_from_fs: GLOBAL(copy_from_fs) pushw %ds pushw %fs popw %ds call memcpy popw %ds ret .size copy_from_fs, .-copy_from_fs ENDPROC(copy_from_fs) .globl copy_to_fs .type copy_to_fs, @function copy_to_fs: GLOBAL(copy_to_fs) pushw %es pushw %fs popw %es call memcpy popw %es ret .size copy_to_fs, .-copy_to_fs ENDPROC(copy_to_fs) #if 0 /* Not currently used, but can be enabled as needed */ .globl copy_from_gs .type copy_from_gs, @function copy_from_gs: GLOBAL(copy_from_gs) pushw %ds pushw %gs popw %ds call memcpy popw %ds ret .size copy_from_gs, .-copy_from_gs .globl copy_to_gs ENDPROC(copy_from_gs) .type copy_to_gs, @function copy_to_gs: GLOBAL(copy_to_gs) pushw %es pushw %gs popw %es call memcpy popw %es ret .size copy_to_gs, .-copy_to_gs ENDPROC(copy_to_gs) #endif
arch/x86/boot/header.S +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ #include <linux/utsrelease.h> #include <asm/boot.h> #include <asm/e820.h> #include <asm/page.h> #include <asm/page_types.h> #include <asm/setup.h> #include "boot.h" #include "offsets.h" Loading
arch/x86/boot/pmjump.S +5 −11 Original line number Diff line number Diff line Loading @@ -15,18 +15,15 @@ #include <asm/boot.h> #include <asm/processor-flags.h> #include <asm/segment.h> #include <linux/linkage.h> .text .globl protected_mode_jump .type protected_mode_jump, @function .code16 /* * void protected_mode_jump(u32 entrypoint, u32 bootparams); */ protected_mode_jump: GLOBAL(protected_mode_jump) movl %edx, %esi # Pointer to boot_params table xorl %ebx, %ebx Loading @@ -47,12 +44,10 @@ protected_mode_jump: .byte 0x66, 0xea # ljmpl opcode 2: .long in_pm32 # offset .word __BOOT_CS # segment .size protected_mode_jump, .-protected_mode_jump ENDPROC(protected_mode_jump) .code32 .type in_pm32, @function in_pm32: GLOBAL(in_pm32) # Set up data segments for flat 32-bit mode movl %ecx, %ds movl %ecx, %es Loading @@ -78,5 +73,4 @@ in_pm32: lldt %cx jmpl *%eax # Jump to the 32-bit entrypoint .size in_pm32, .-in_pm32 ENDPROC(in_pm32)