[coreboot-gerrit] Patch set updated for coreboot: arch/x86: provide verstage support for CONFIG_C_ENVIRONMENT_BOOTBLOCK

Aaron Durbin (adurbin@chromium.org) gerrit at coreboot.org
Thu May 26 18:12:13 CEST 2016


Aaron Durbin (adurbin at chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14971

-gerrit

commit c8e3ee1bec8be2855bb0c426a4d969d03d71f2a4
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Thu May 26 10:55:48 2016 -0500

    arch/x86: provide verstage support for CONFIG_C_ENVIRONMENT_BOOTBLOCK
    
    When CONFIG_C_ENVIRONMENT_BOOTBLOCK is employed there's not need for
    a chipset specific verstage entry point because cache-as-ram has
    already been initialized. Therefore, provide a default entry point
    for verstage in that environment.
    
    Change-Id: Idd8f45bd58d3e5b251d1e38cca7ae794b8b77a28
    Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
 src/arch/x86/Makefile.inc |  4 ++++
 src/arch/x86/verstage.c   | 23 +++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 536caa3..28bb8ea 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -178,6 +178,10 @@ verstage-y += memset.c
 verstage-y += memcpy.c
 verstage-y += memmove.c
 verstage-$(CONFIG_X86_TOP4G_BOOTMEDIA_MAP) += mmap_boot.c
+# If C environment is used for bootblock it means there's no need
+# for a chipset-specific car_stage_entry() so use the generic one
+# which just calls verstage().
+verstage-$(CONFIG_C_ENVIRONMENT_BOOTBLOCK) += verstage.c
 
 verstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
 
diff --git a/src/arch/x86/verstage.c b/src/arch/x86/verstage.c
new file mode 100644
index 0000000..a44bf0f
--- /dev/null
+++ b/src/arch/x86/verstage.c
@@ -0,0 +1,23 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2016 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <arch/cpu.h>
+#include <vendorcode/google/chromeos/chromeos.h>
+
+/* Provide an entry point for verstage when it's a separate stage. */
+void asmlinkage car_stage_entry(void)
+{
+	verstage();
+}



More information about the coreboot-gerrit mailing list