[v2,5/6] x86/boot: Use copied boot data in __startup_64()
Commit Message
Use the copied version instead of the original real mode data.
Signed-off-by: Brian Gerst <brgerst@gmail.com>
---
arch/x86/include/asm/setup.h | 2 +-
arch/x86/kernel/head64.c | 4 ++--
arch/x86/kernel/head_64.S | 2 --
3 files changed, 3 insertions(+), 5 deletions(-)
@@ -49,7 +49,7 @@ extern unsigned long saved_video_mode;
extern void reserve_standard_io_resources(void);
extern void i386_reserve_resources(void);
-extern unsigned long __startup_64(unsigned long physaddr, struct boot_params *bp);
+extern unsigned long __startup_64(unsigned long physaddr);
extern void startup_64_setup_env(unsigned long physbase);
extern void early_setup_idt(void);
extern void __init do_early_exception(struct pt_regs *regs, int trapnr);
@@ -176,9 +176,9 @@ static unsigned long __head sme_postprocess_startup(struct boot_params *bp, pmdv
* boot-time crashes. To work around this problem, every global pointer must
* be adjusted using fixup_pointer().
*/
-unsigned long __head __startup_64(unsigned long physaddr,
- struct boot_params *bp)
+unsigned long __head __startup_64(unsigned long physaddr)
{
+ struct boot_params *bp = fixup_pointer(&boot_params, physaddr);
unsigned long load_delta, *p;
unsigned long pgtable_flags;
pgdval_t *pgd;
@@ -113,9 +113,7 @@ SYM_CODE_START_NOALIGN(startup_64)
* programmed into CR3.
*/
leaq _text(%rip), %rdi
- pushq %rsi
call __startup_64
- popq %rsi
/* Form the CR3 value being sure to include the CR3 modifier */
addq $(early_top_pgt - __START_KERNEL_map), %rax