[coreboot-gerrit] Patch set updated for coreboot: ade8fcf vboot2: fix up "add verstage"

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Wed Jan 14 21:22:22 CET 2015


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8225

-gerrit

commit ade8fcff2f1b88ecb75d1493afd031841388908f
Author: Stefan Reinauer <reinauer at chromium.org>
Date:   Wed Jan 14 11:07:49 2015 -0800

    vboot2: fix up "add verstage"
    
    Architecture support was incomplete, which lead to
    toolchain.inc choking on some of its implicit expectations
    from Kconfig.
    
    Fix config variable usage in tegra124 bootblock and remove
    extra whitespace.
    
    Change-Id: I0a504f01d10302fbf2bd1bbc82cfd047ed02157f
    Signed-off-by: Stefan Reinauer <stefan.reinauer at coreboot.org>
---
 src/arch/arm/Kconfig                |  4 ++--
 src/arch/arm/Makefile.inc           |  2 +-
 src/arch/arm64/Kconfig              |  4 ++++
 src/arch/arm64/armv8/Kconfig        |  3 +++
 src/arch/x86/Kconfig                |  4 ++++
 src/soc/nvidia/tegra124/bootblock.c |  5 +----
 src/soc/nvidia/tegra124/verstage.c  | 19 +++++++++++++++++++
 src/soc/nvidia/tegra124/verstage.h  | 24 ++++++++++++++++++++++++
 8 files changed, 58 insertions(+), 7 deletions(-)

diff --git a/src/arch/arm/Kconfig b/src/arch/arm/Kconfig
index f73ad27..1c3a339 100644
--- a/src/arch/arm/Kconfig
+++ b/src/arch/arm/Kconfig
@@ -4,8 +4,8 @@ config ARCH_BOOTBLOCK_ARM
 	select ARCH_ARM
 
 config ARCH_VERSTAGE_ARM
-  bool
-  default n
+	bool
+	default n
 
 config ARCH_ROMSTAGE_ARM
 	bool
diff --git a/src/arch/arm/Makefile.inc b/src/arch/arm/Makefile.inc
index ba7fb60..6f65a71 100644
--- a/src/arch/arm/Makefile.inc
+++ b/src/arch/arm/Makefile.inc
@@ -61,7 +61,7 @@ bootblock-y += memcpy.S
 bootblock-y += memmove.S
 bootblock-y += div0.c
 
-$(objcbfs)/bootblock.debug: $(src)/arch/arm/bootblock.ld $(obj)/ldoptions $$(bootblock-objs) $$(VERSTAGE_LIB) 
+$(objcbfs)/bootblock.debug: $(src)/arch/arm/bootblock.ld $(obj)/ldoptions $$(bootblock-objs) $$(VERSTAGE_LIB)
 	@printf "    LINK       $(subst $(obj)/,,$(@))\n"
 	$(LD_bootblock) --gc-sections -static -o $@ -L$(obj) --start-group $(bootblock-objs) --end-group -T $(src)/arch/arm/bootblock.ld
 
diff --git a/src/arch/arm64/Kconfig b/src/arch/arm64/Kconfig
index dc0e332..186dd44 100644
--- a/src/arch/arm64/Kconfig
+++ b/src/arch/arm64/Kconfig
@@ -3,6 +3,10 @@ config ARCH_BOOTBLOCK_ARM64
 	default n
 	select ARCH_ARM64
 
+config ARCH_VERSTAGE_ARM64
+	bool
+	default n
+
 config ARCH_ROMSTAGE_ARM64
 	bool
 	default n
diff --git a/src/arch/arm64/armv8/Kconfig b/src/arch/arm64/armv8/Kconfig
index fc2e668..5840e81 100644
--- a/src/arch/arm64/armv8/Kconfig
+++ b/src/arch/arm64/armv8/Kconfig
@@ -1,6 +1,9 @@
 config ARCH_BOOTBLOCK_ARM_V8_64
 	def_bool n
 	select ARCH_BOOTBLOCK_ARM64
+config ARCH_VERSTAGE_ARM_V8_64
+	def_bool n
+	select ARCH_VERSTAGE_ARM64
 config ARCH_ROMSTAGE_ARM_V8_64
 	def_bool n
 	select ARCH_ROMSTAGE_ARM64
diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig
index 56d8f88..edbc67a 100644
--- a/src/arch/x86/Kconfig
+++ b/src/arch/x86/Kconfig
@@ -3,6 +3,10 @@ config ARCH_BOOTBLOCK_X86_32
 	default n
 	select ARCH_X86
 
+config ARCH_VERSTAGE_X86_32
+	bool
+	default n
+
 config ARCH_ROMSTAGE_X86_32
 	bool
 	default n
diff --git a/src/soc/nvidia/tegra124/bootblock.c b/src/soc/nvidia/tegra124/bootblock.c
index 0456b48..76e3c77 100644
--- a/src/soc/nvidia/tegra124/bootblock.c
+++ b/src/soc/nvidia/tegra124/bootblock.c
@@ -25,10 +25,7 @@
 #include <soc/nvidia/tegra/apbmisc.h>
 #include "pinmux.h"
 #include "power.h"
-
-#if CONFIG_VBOOT2_VERIFY_FIRMWARE
 #include "verstage.h"
-#endif
 
 void main(void)
 {
@@ -75,7 +72,7 @@ void main(void)
 	power_enable_cpu_rail();
 	power_ungate_cpu();
 
-#if CONFIG_VBOOT2_VERIFY_FIRMWARE
+#if IS_ENABLED(CONFIG_VBOOT2_VERIFY_FIRMWARE)
 	entry = (void *)verstage_vboot_main;
 #else
 	entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, "fallback/romstage");
diff --git a/src/soc/nvidia/tegra124/verstage.c b/src/soc/nvidia/tegra124/verstage.c
index 234a89d..7551b28 100644
--- a/src/soc/nvidia/tegra124/verstage.c
+++ b/src/soc/nvidia/tegra124/verstage.c
@@ -1,3 +1,22 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2014 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
 #include "verstage.h"
 
 /**
diff --git a/src/soc/nvidia/tegra124/verstage.h b/src/soc/nvidia/tegra124/verstage.h
index a0bac34..ffcd4d6 100644
--- a/src/soc/nvidia/tegra124/verstage.h
+++ b/src/soc/nvidia/tegra124/verstage.h
@@ -1,2 +1,26 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2014 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __VERSTAGE_H
+#define __VERSTAGE_H
+
 void vboot_main(void);
 void verstage_vboot_main(void);
+
+#endif



More information about the coreboot-gerrit mailing list