summaryrefslogtreecommitdiff
path: root/arch/x86/machine/cpu.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2014-05-28 21:10:55 +0200
committerRichard Braun <rbraun@sceen.net>2014-05-28 21:10:55 +0200
commit2cc712601311cd6d9524c1af368a0d2576b3896f (patch)
tree4aa10eb7b60ba7c52489f007c2316fabe3441f03 /arch/x86/machine/cpu.h
parent8e0fd5a7964d7869fd37360fd1d61f09c7abc728 (diff)
x86/{boot,cpu}: dynamically allocate AP boot stacks
The main goal of this change is to reduce the size of the kernel executable image since boot stacks, despite being uninitialized, aren't declared as common symbols.
Diffstat (limited to 'arch/x86/machine/cpu.h')
-rw-r--r--arch/x86/machine/cpu.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/machine/cpu.h b/arch/x86/machine/cpu.h
index 97ef8ef1..f1e9cfb6 100644
--- a/arch/x86/machine/cpu.h
+++ b/arch/x86/machine/cpu.h
@@ -254,6 +254,7 @@ struct cpu {
struct cpu_tss double_fault_tss;
#endif /* __LP64__ */
volatile int state;
+ unsigned long boot_stack;
unsigned long double_fault_stack;
} __aligned(CPU_ALIGN);
@@ -583,6 +584,11 @@ cpu_delay(unsigned long usecs)
}
/*
+ * Return the address of the boot stack allocated for the current processor.
+ */
+unsigned long cpu_get_boot_stack(void);
+
+/*
* Set the given GDT for the current processor, and reload its segment
* registers.
*/