[coreboot-gerrit] New patch to review for coreboot: arch/x86: don't create new gdt in cbmem for relocatable ramstage
Aaron Durbin (adurbin@chromium.org)
gerrit at coreboot.org
Sat Nov 19 17:13:43 CET 2016
Aaron Durbin (adurbin at chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17504
-gerrit
commit b17e39c69edd18a364ba4f48c6660409dcd2f735
Author: Aaron Durbin <adurbin at chromium.org>
Date: Sat Nov 19 10:06:00 2016 -0600
arch/x86: don't create new gdt in cbmem for relocatable ramstage
When running with relocatable ramstage, the gdt loaded from c_start.S
is already in CBMEM (high memory). Thus, there's no need to create
a new copy of the gdt and reload.
Change-Id: I2750d30119fee01baf4748d8001a672d18a13fb0
Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
src/arch/x86/gdt.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/arch/x86/gdt.c b/src/arch/x86/gdt.c
index 982b8ae..f662edd 100644
--- a/src/arch/x86/gdt.c
+++ b/src/arch/x86/gdt.c
@@ -38,6 +38,10 @@ static void move_gdt(int is_recovery)
u16 num_gdt_bytes = (uintptr_t)&gdt_end - (uintptr_t)&gdt;
struct gdtarg gdtarg;
+ /* ramstage is already in high memory. No need to use a new gdt. */
+ if (IS_ENABLED(CONFIG_RELOCATABLE_RAMSTAGE))
+ return;
+
newgdt = cbmem_find(CBMEM_ID_GDT);
if (!newgdt) {
newgdt = cbmem_add(CBMEM_ID_GDT, ALIGN(num_gdt_bytes, 512));
More information about the coreboot-gerrit
mailing list