x86, realmode: Move SMP trampoline to unified realmode code

Migrated SMP trampoline code to the real mode blob.
SMP trampoline code is not yet removed from
.x86_trampoline because it is needed by the wakeup
code.

[ hpa: always enable compiling startup_32_smp in head_32.S... it is
  only a few instructions which go into .init on UP builds, and it makes
  the rest of the code less #ifdef ugly. ]

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
Link: http://lkml.kernel.org/r/1336501366-28617-6-git-send-email-jarkko.sakkinen@intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
Jarkko Sakkinen 2012-05-08 21:22:28 +03:00 committed by H. Peter Anvin
parent 5a8c9aebe0
commit 48927bbb97
9 changed files with 316 additions and 16 deletions

View file

@ -12,6 +12,17 @@ struct real_mode_header {
/* reboot */
#ifdef CONFIG_X86_32
u32 machine_real_restart_asm;
#endif
/* SMP trampoline */
u32 trampoline_data;
u32 trampoline_status;
#ifdef CONFIG_X86_32
u32 startup_32_smp;
u32 boot_gdt;
#else
u32 startup_64_smp;
u32 level3_ident_pgt;
u32 level3_kernel_pgt;
#endif
} __attribute__((__packed__));
@ -25,6 +36,13 @@ extern unsigned long initial_gs;
extern unsigned char real_mode_blob[];
extern unsigned char real_mode_relocs[];
#ifdef CONFIG_X86_32
extern unsigned char startup_32_smp[];
extern unsigned char boot_gdt[];
#else
extern unsigned char secondary_startup_64[];
#endif
extern void __init setup_real_mode(void);
#endif /* _ARCH_X86_REALMODE_H */