summaryrefslogtreecommitdiff
path: root/src/cpu/x86/lapic
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2015-06-18 01:15:27 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-06-20 18:16:54 +0200
commite021dea777e87180d76ad6ac89f9b54b5f1111ad (patch)
treecb5c9c6ee84632a8f9b3c9a0c0487eb66416b926 /src/cpu/x86/lapic
parentdefee17c670c6ec20edfea39afc751cc1c77871f (diff)
downloadcoreboot-e021dea777e87180d76ad6ac89f9b54b5f1111ad.tar.xz
cpu: x86 port to 64bit
Change-Id: Ib1c6732d3a338f6d898fadc19e5af59032343451 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Signed-off-by: Scott Duplichan <scott@notabs.org> Reviewed-on: http://review.coreboot.org/10580 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Diffstat (limited to 'src/cpu/x86/lapic')
-rw-r--r--src/cpu/x86/lapic/lapic_cpu_init.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c
index 0e2550fb6f..0e314fd108 100644
--- a/src/cpu/x86/lapic/lapic_cpu_init.c
+++ b/src/cpu/x86/lapic/lapic_cpu_init.c
@@ -58,13 +58,17 @@ int lowmem_backup_size;
static inline void setup_secondary_gdt(void)
{
u16 *gdt_limit;
+#ifdef __x86_64__
+ u64 *gdt_base;
+#else
u32 *gdt_base;
+#endif
gdt_limit = (void *)&_secondary_gdt_addr;
gdt_base = (void *)&gdt_limit[1];
- *gdt_limit = (u32)&gdt_end - (u32)&gdt - 1;
- *gdt_base = (u32)&gdt;
+ *gdt_limit = (uintptr_t)&gdt_end - (uintptr_t)&gdt - 1;
+ *gdt_base = (uintptr_t)&gdt;
}
static void copy_secondary_start_to_lowest_1M(void)