aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/compressed/head_64.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/boot/compressed/head_64.S')
-rw-r--r--arch/x86/boot/compressed/head_64.S14
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index 2bb500af1bd7..f62c284db9eb 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -84,8 +84,11 @@ ENTRY(startup_32)
84 84
85#ifdef CONFIG_RELOCATABLE 85#ifdef CONFIG_RELOCATABLE
86 movl %ebp, %ebx 86 movl %ebp, %ebx
87 addl $(PMD_PAGE_SIZE -1), %ebx 87 movl BP_kernel_alignment(%esi), %eax
88 andl $PMD_PAGE_MASK, %ebx 88 decl %eax
89 addl %eax, %ebx
90 notl %eax
91 andl %eax, %ebx
89#else 92#else
90 movl $LOAD_PHYSICAL_ADDR, %ebx 93 movl $LOAD_PHYSICAL_ADDR, %ebx
91#endif 94#endif
@@ -224,8 +227,11 @@ ENTRY(startup_64)
224 /* Start with the delta to where the kernel will run at. */ 227 /* Start with the delta to where the kernel will run at. */
225#ifdef CONFIG_RELOCATABLE 228#ifdef CONFIG_RELOCATABLE
226 leaq startup_32(%rip) /* - $startup_32 */, %rbp 229 leaq startup_32(%rip) /* - $startup_32 */, %rbp
227 addq $(PMD_PAGE_SIZE - 1), %rbp 230 movl BP_kernel_alignment(%rsi), %eax
228 andq $PMD_PAGE_MASK, %rbp 231 decl %eax
232 addq %rax, %rbp
233 notq %rax
234 andq %rax, %rbp
229#else 235#else
230 movq $LOAD_PHYSICAL_ADDR, %rbp 236 movq $LOAD_PHYSICAL_ADDR, %rbp
231#endif 237#endif