mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-22 12:27:19 +07:00
b32f96c75d
The 'stack_start' variable is similar in usage to 'initial_code' and 'initial_gs': they're all stored in head_64.S and they're all updated by SMP and ACPI suspend before starting a CPU. Rename it to 'initial_stack' to be consistent with the others. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Byungchul Park <byungchul.park@lge.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Kees Cook <keescook@chromium.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Nilay Vaish <nilayvaish@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/87063d773a3212051b77e17b0ee427f6582a5050.1471535549.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
73 lines
1.5 KiB
C
73 lines
1.5 KiB
C
#ifndef _ARCH_X86_REALMODE_H
|
|
#define _ARCH_X86_REALMODE_H
|
|
|
|
#include <linux/types.h>
|
|
#include <asm/io.h>
|
|
|
|
/* This must match data at realmode.S */
|
|
struct real_mode_header {
|
|
u32 text_start;
|
|
u32 ro_end;
|
|
/* SMP trampoline */
|
|
u32 trampoline_start;
|
|
u32 trampoline_status;
|
|
u32 trampoline_header;
|
|
#ifdef CONFIG_X86_64
|
|
u32 trampoline_pgd;
|
|
#endif
|
|
/* ACPI S3 wakeup */
|
|
#ifdef CONFIG_ACPI_SLEEP
|
|
u32 wakeup_start;
|
|
u32 wakeup_header;
|
|
#endif
|
|
/* APM/BIOS reboot */
|
|
u32 machine_real_restart_asm;
|
|
#ifdef CONFIG_X86_64
|
|
u32 machine_real_restart_seg;
|
|
#endif
|
|
};
|
|
|
|
/* This must match data at trampoline_32/64.S */
|
|
struct trampoline_header {
|
|
#ifdef CONFIG_X86_32
|
|
u32 start;
|
|
u16 gdt_pad;
|
|
u16 gdt_limit;
|
|
u32 gdt_base;
|
|
#else
|
|
u64 start;
|
|
u64 efer;
|
|
u32 cr4;
|
|
#endif
|
|
};
|
|
|
|
extern struct real_mode_header *real_mode_header;
|
|
extern unsigned char real_mode_blob_end[];
|
|
|
|
extern unsigned long initial_code;
|
|
extern unsigned long initial_gs;
|
|
extern unsigned long initial_stack;
|
|
|
|
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
|
|
|
|
static inline size_t real_mode_size_needed(void)
|
|
{
|
|
if (real_mode_header)
|
|
return 0; /* already allocated. */
|
|
|
|
return ALIGN(real_mode_blob_end - real_mode_blob, PAGE_SIZE);
|
|
}
|
|
|
|
void set_real_mode_mem(phys_addr_t mem, size_t size);
|
|
void reserve_real_mode(void);
|
|
|
|
#endif /* _ARCH_X86_REALMODE_H */
|