summaryrefslogtreecommitdiff
path: root/src/cpu/x86
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-12-18 10:36:33 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-12-31 09:51:50 +0100
commitbae775a4f43449e79622ed144118554ff780744a (patch)
treede6094464d801f18c33bb6e929ee9afef0cfce82 /src/cpu/x86
parenta91e1e6cc18b3d510a8dd5e3b2c7bdbba3299369 (diff)
downloadcoreboot-bae775a4f43449e79622ed144118554ff780744a.tar.xz
arch/x86: Declare GDT symbols and move_gdt()
We relocate GDT to CBMEM, this can be done late in ramstage. Note: We currently do this for BSP CPU only. Change-Id: I626faaf22f846433f25ca2253d6a2a5230f50b6b Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/7858 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'src/cpu/x86')
-rw-r--r--src/cpu/x86/lapic/lapic_cpu_init.c7
-rw-r--r--src/cpu/x86/mp_init.c5
2 files changed, 2 insertions, 10 deletions
diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c
index 61b6bd72f7..472d6edf60 100644
--- a/src/cpu/x86/lapic/lapic_cpu_init.c
+++ b/src/cpu/x86/lapic/lapic_cpu_init.c
@@ -21,6 +21,7 @@
*/
#include <cpu/x86/cr.h>
+#include <cpu/x86/gdt.h>
#include <cpu/x86/lapic.h>
#include <delay.h>
#include <halt.h>
@@ -53,11 +54,6 @@ char *lowmem_backup_ptr;
int lowmem_backup_size;
#endif
-extern char _secondary_start[];
-extern char _secondary_gdt_addr[];
-extern char gdt[];
-extern char gdt_end[];
-
static inline void setup_secondary_gdt(void)
{
u16 *gdt_limit;
@@ -72,7 +68,6 @@ static inline void setup_secondary_gdt(void)
static void copy_secondary_start_to_lowest_1M(void)
{
- extern char _secondary_start_end[];
unsigned long code_size;
/* Fill in secondary_start's local gdt. */
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c
index a97a4c532b..3e293f60c4 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -26,6 +26,7 @@
#include <cpu/cpu.h>
#include <cpu/intel/microcode.h>
#include <cpu/x86/cache.h>
+#include <cpu/x86/gdt.h>
#include <cpu/x86/lapic.h>
#include <cpu/x86/name.h>
#include <cpu/x86/msr.h>
@@ -67,10 +68,6 @@ struct saved_msr {
/* The sipi vector rmodule is included in the ramstage using 'objdump -B'. */
extern char _binary_sipi_vector_start[];
-/* These symbols are defined in c_start.S. */
-extern char gdt[];
-extern char gdt_end[];
-extern char idtarg[];
/* The SIPI vector is loaded at the SMM_DEFAULT_BASE. The reason is at the
* memory range is already reserved so the OS cannot use it. That region is