summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cpu/x86/64bit/exit32.inc12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/cpu/x86/64bit/exit32.inc b/src/cpu/x86/64bit/exit32.inc
index 48837d96a9..6722cfdf3f 100644
--- a/src/cpu/x86/64bit/exit32.inc
+++ b/src/cpu/x86/64bit/exit32.inc
@@ -12,14 +12,22 @@
#include <cpu/x86/msr.h>
#include <cpu/x86/cr.h>
+#if defined(__RAMSTAGE__)
+#include <arch/ram_segs.h>
+#define CODE_SEG RAM_CODE_SEG
+#define DATA_SEG RAM_DATA_SEG
+#else
#include <arch/rom_segs.h>
+#define CODE_SEG ROM_CODE_SEG
+#define DATA_SEG ROM_DATA_SEG
+#endif
drop_longmode:
/* Ensure cache is clean. */
wbinvd
/* Set 32-bit code segment and ss */
- mov $ROM_CODE_SEG, %rcx
+ mov $CODE_SEG, %rcx
/* SetCodeSelector32 will drop us to protected mode on return */
call SetCodeSelector32
@@ -54,7 +62,7 @@ __longmode_compatibility:
/* Running in 32-bit compatibility mode */
/* Use flat data segment */
- movl $ROM_DATA_SEG, %eax
+ movl $DATA_SEG, %eax
movl %eax, %ds
movl %eax, %es
movl %eax, %ss