diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S index 2c4b171..4cb40d7 100644 --- a/arch/x86/boot/compressed/head_64.S +++ b/arch/x86/boot/compressed/head_64.S @@ -184,28 +184,9 @@ no_longmode: #include "../../kernel/verify_cpu.S" - /* - * Be careful here startup_64 needs to be at a predictable - * address so I can export it in an ELF header. Bootloaders - * should look at the ELF header to find this address, as - * it may change in the future. - */ .code64 - .org 0x200 -ENTRY(startup_64) - /* - * We come here either from startup_32 or directly from a - * 64bit bootloader. If we come here from a bootloader we depend on - * an identity mapped page table being provied that maps our - * entire text+data+bss and hopefully all of memory. - */ #ifdef CONFIG_EFI_STUB - /* - * The entry point for the PE/COFF executable is 0x210, so only - * legacy boot loaders will execute this jmp. - */ - jmp preferred_addr - + /* The entry point for the PE/COFF executable is 0x210 */ .org 0x210 mov %rcx, %rdi mov %rdx, %rsi @@ -234,12 +215,26 @@ ENTRY(startup_64) subq $3b, %rax subq BP_pref_address(%rsi), %rax add BP_code32_start(%esi), %eax - leaq preferred_addr(%rax), %rax + leaq startup_64(%rax), %rax jmp *%rax -preferred_addr: #endif + /* + * Be careful here startup_64 needs to be at a predictable + * address so I can export it in an ELF header. Bootloaders + * should look at the ELF header to find this address, as + * it may change in the future. + */ + .org 0x400 +ENTRY(startup_64) + /* + * We come here either from startup_32 or directly from a + * 64bit bootloader. If we come here from a bootloader we depend on + * an identity mapped page table being provied that maps our + * entire text+data+bss and hopefully all of memory. + */ + /* Setup data segments. */ xorl %eax, %eax movl %eax, %ds