summaryrefslogtreecommitdiffstats
path: root/src/arch/x86/assembly_entry.S
diff options
context:
space:
mode:
authorHannah Williams <hannah.williams@intel.com>2018-04-27 09:09:04 -0700
committerAaron Durbin <adurbin@chromium.org>2018-05-03 04:40:58 +0000
commitd3c0c0c318d2e2b5a3d6276bb0fdd732170756d3 (patch)
treebed0302a3bb8c7223cf41c9cf538c27aaeb83098 /src/arch/x86/assembly_entry.S
parent0f9af5500e7bc524debe3affd1a9cb406102ab9a (diff)
downloadcoreboot-d3c0c0c318d2e2b5a3d6276bb0fdd732170756d3.tar.gz
coreboot-d3c0c0c318d2e2b5a3d6276bb0fdd732170756d3.tar.bz2
coreboot-d3c0c0c318d2e2b5a3d6276bb0fdd732170756d3.zip
arch/x86: Relocate GDT in verstage, romstage, and postcar
In each stage keep GDT in the code region. This accommodates platforms, such as glk, that are executing out of CAR. The gdt is small and loading it is trivial so just do it unconditionally instead of introducing another Kconfig. BUG=b:78656686 Change-Id: I01ded6e9b358b23e04d92bef5263bfe8c2a5ec5a Signed-off-by: Hannah Williams <hannah.williams@intel.com> Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/25895 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Justin TerAvest <teravest@chromium.org>
Diffstat (limited to 'src/arch/x86/assembly_entry.S')
-rw-r--r--src/arch/x86/assembly_entry.S11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/arch/x86/assembly_entry.S b/src/arch/x86/assembly_entry.S
index a5399b74a549..02f492cfaa6a 100644
--- a/src/arch/x86/assembly_entry.S
+++ b/src/arch/x86/assembly_entry.S
@@ -20,15 +20,18 @@
/*
* This path is for stages that are post bootblock when employing
- * CONFIG_C_ENVIRONMENT_BOOTBLOCK. There's no need to re-load the gdt,
- * etc as all those settings are cached within the processor. In order
- * to continue with C code execution one needs to set stack pointer and
- * clear CAR_GLOBAL variables that are stage specific.
+ * CONFIG_C_ENVIRONMENT_BOOTBLOCK. The gdt is reloaded to accommodate
+ * platforms that are executing out of CAR. In order to continue with
+ * C code execution one needs to set stack pointer and clear CAR_GLOBAL
+ * variables that are stage specific.
*/
.section ".text._start", "ax", @progbits
.global _start
_start:
+ /* Migrate GDT to this text segment */
+ call gdt_init
+
/* reset stack pointer to CAR stack */
mov $_car_stack_end, %esp