aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/setup_64.c
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-05-28 19:19:53 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 06:48:16 -0400
commita939098afcfa5f81d3474782ec15c6d114e57763 (patch)
tree62c21fb10d6b58dc8247c34e68ab5562e045b8d0 /arch/x86/kernel/setup_64.c
parent736f12bff9d9e7b4e895c64f73b190c8383fc2a1 (diff)
x86: move x86_64 gdt closer to i386
i386 and x86_64 used two different schemes for maintaining the gdt. With this patch, x86_64 initial gdt table is defined in a .c file, same way as i386 is now. Also, we call it "gdt_page", and the descriptor, "early_gdt_descr". This way we achieve common naming, which can allow for more code integration. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/setup_64.c')
-rw-r--r--arch/x86/kernel/setup_64.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c
index 504caeaffd58..a93300de4da9 100644
--- a/arch/x86/kernel/setup_64.c
+++ b/arch/x86/kernel/setup_64.c
@@ -81,8 +81,6 @@
81#define ARCH_SETUP 81#define ARCH_SETUP
82#endif 82#endif
83 83
84#include "cpu/cpu.h"
85
86/* 84/*
87 * Machine setup.. 85 * Machine setup..
88 */ 86 */
@@ -228,6 +226,23 @@ static inline void copy_edd(void)
228} 226}
229#endif 227#endif
230 228
229/* Overridden in paravirt.c if CONFIG_PARAVIRT */
230void __attribute__((weak)) __init memory_setup(void)
231{
232 machine_specific_memory_setup();
233}
234
235/* Current gdt points %fs at the "master" per-cpu area: after this,
236 * it's on the real one. */
237void switch_to_new_gdt(void)
238{
239 struct desc_ptr gdt_descr;
240
241 gdt_descr.address = (long)get_cpu_gdt_table(smp_processor_id());
242 gdt_descr.size = GDT_SIZE - 1;
243 load_gdt(&gdt_descr);
244}
245
231/* 246/*
232 * setup_arch - architecture-specific boot-time initializations 247 * setup_arch - architecture-specific boot-time initializations
233 * 248 *