summaryrefslogtreecommitdiff
path: root/src/cpu/x86/64bit/entry64.inc
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2019-12-01 07:23:59 +0100
committerArthur Heymans <arthur@aheymans.xyz>2020-12-01 14:53:44 +0000
commita1695504799f733c2fb1f030d1313535bbb5b065 (patch)
treeb5daefcdbb854357d9aef7b350d5caf4ffd97591 /src/cpu/x86/64bit/entry64.inc
parent45dc92a8c2e697411cb91bf255506575dd48afba (diff)
cpu/x86/sipi: Add x86_64 support
Enter long mode on secondary APs. Tested on Lenovo T410 with additional x86_64 patches. Tested on HP Z220 with additional x86_64 patches. Still boots on x86_32. Change-Id: I53eae082123d1a12cfa97ead1d87d84db4a334c0 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45187 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/cpu/x86/64bit/entry64.inc')
-rw-r--r--src/cpu/x86/64bit/entry64.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cpu/x86/64bit/entry64.inc b/src/cpu/x86/64bit/entry64.inc
index 65c0fdc929..70255173f1 100644
--- a/src/cpu/x86/64bit/entry64.inc
+++ b/src/cpu/x86/64bit/entry64.inc
@@ -16,7 +16,12 @@
#endif
#include <cpu/x86/msr.h>
+#if defined(__RAMSTAGE__)
+#include <arch/ram_segs.h>
+#else
#include <arch/rom_segs.h>
+#endif
+
setup_longmode:
/* Get page table address */
@@ -42,7 +47,12 @@ setup_longmode:
movl %eax, %cr0
/* use long jump to switch to 64-bit code segment */
+#if defined(__RAMSTAGE__)
+ ljmp $RAM_CODE_SEG64, $__longmode_start
+#else
ljmp $ROM_CODE_SEG64, $__longmode_start
+
+#endif
.code64
__longmode_start: