summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/x86/machine/cpu.c6
-rw-r--r--arch/x86/machine/cpu.h6
-rw-r--r--arch/x86/machine/cpu_asm.S5
3 files changed, 9 insertions, 8 deletions
diff --git a/arch/x86/machine/cpu.c b/arch/x86/machine/cpu.c
index 488b2b75..2505698a 100644
--- a/arch/x86/machine/cpu.c
+++ b/arch/x86/machine/cpu.c
@@ -166,6 +166,12 @@ cpu_seg_set_tss(char *table, unsigned int selector, struct cpu_tss *tss)
| (limit & CPU_DESC_SEG_LIMIT_LOW_MASK);
}
+/*
+ * Set the given GDT for the current processor, and reload its segment
+ * registers.
+ */
+void cpu_load_gdt(struct cpu *cpu, struct cpu_pseudo_desc *gdtr);
+
static void __init
cpu_init_gdt(struct cpu *cpu)
{
diff --git a/arch/x86/machine/cpu.h b/arch/x86/machine/cpu.h
index 07dd98db..08420ac6 100644
--- a/arch/x86/machine/cpu.h
+++ b/arch/x86/machine/cpu.h
@@ -589,12 +589,6 @@ cpu_delay(unsigned long usecs)
unsigned long cpu_get_boot_stack(void);
/*
- * Set the given GDT for the current processor, and reload its segment
- * registers.
- */
-void cpu_load_gdt(struct cpu *cpu, struct cpu_pseudo_desc *gdtr);
-
-/*
* Install an interrupt handler in the IDT.
*/
void cpu_idt_set_gate(unsigned int vector, void (*isr)(void));
diff --git a/arch/x86/machine/cpu_asm.S b/arch/x86/machine/cpu_asm.S
index 0917b821..56e8e2fb 100644
--- a/arch/x86/machine/cpu_asm.S
+++ b/arch/x86/machine/cpu_asm.S
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2012 Richard Braun.
+ * Copyright (c) 2011-2014 Richard Braun.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,10 +15,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <kern/init.h>
#include <machine/asm.h>
#include <machine/cpu.h>
-.text
+.section INIT_SECTION
ASM_ENTRY(cpu_load_gdt)
#ifdef __LP64__