Julius Werner has submitted this change and it was merged. ( https://review.coreboot.org/18979 )
Change subject: vboot: Remove VBOOT_DYNAMIC_WORK_BUFFER Kconfig option
......................................................................
vboot: Remove VBOOT_DYNAMIC_WORK_BUFFER Kconfig option
VBOOT_DYNAMIC_WORK_BUFFER and VBOOT_STARTS_IN_ROMSTAGE are equivalent in
practice. We can't have a dynamic work buffer unless we start in/after
romstage, and there'd be no reason to go with a static buffer if we do.
Let's get rid of one extra option and merge the two.
Change-Id: I3f953c8d2a8dcb3f65b07f548184d6dd0eb688fe
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Reviewed-on: https://review.coreboot.org/18979
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
---
M src/mainboard/google/cyan/Kconfig
M src/mainboard/intel/strago/Kconfig
M src/soc/marvell/mvmap2315/Kconfig
M src/vboot/Kconfig
M src/vboot/common.c
M src/vboot/vboot_handoff.c
M src/vboot/vboot_loader.c
7 files changed, 8 insertions(+), 22 deletions(-)
Approvals:
Aaron Durbin: Looks good to me, approved
build bot (Jenkins): Verified
diff --git a/src/mainboard/google/cyan/Kconfig b/src/mainboard/google/cyan/Kconfig
index d236aa0..6b9d5a2 100644
--- a/src/mainboard/google/cyan/Kconfig
+++ b/src/mainboard/google/cyan/Kconfig
@@ -19,7 +19,6 @@
select EC_GOOGLE_CHROMEEC_SWITCHES
select EC_SOFTWARE_SYNC
select LID_SWITCH
- select VBOOT_DYNAMIC_WORK_BUFFER
select VBOOT_VBNV_CMOS
select VIRTUAL_DEV_SWITCH
diff --git a/src/mainboard/intel/strago/Kconfig b/src/mainboard/intel/strago/Kconfig
index 0d59371..8915323 100644
--- a/src/mainboard/intel/strago/Kconfig
+++ b/src/mainboard/intel/strago/Kconfig
@@ -19,7 +19,6 @@
select EC_GOOGLE_CHROMEEC_SWITCHES
select EC_SOFTWARE_SYNC
select LID_SWITCH
- select VBOOT_DYNAMIC_WORK_BUFFER
select VBOOT_VBNV_CMOS
select VIRTUAL_DEV_SWITCH
diff --git a/src/soc/marvell/mvmap2315/Kconfig b/src/soc/marvell/mvmap2315/Kconfig
index d27f4c4..45e03c1 100644
--- a/src/soc/marvell/mvmap2315/Kconfig
+++ b/src/soc/marvell/mvmap2315/Kconfig
@@ -33,7 +33,6 @@
config CHROMEOS
select VBOOT
- select VBOOT_DYNAMIC_WORK_BUFFER
select VBOOT_STARTS_IN_ROMSTAGE
config CONSOLE_SERIAL_MVMAP2315_UART_ADDRESS
diff --git a/src/vboot/Kconfig b/src/vboot/Kconfig
index 2b6cde1..0c72d47 100644
--- a/src/vboot/Kconfig
+++ b/src/vboot/Kconfig
@@ -95,17 +95,6 @@
reused by the succeeding stage. This is useful if a RAM space is too
small to fit both the verstage and the succeeding stage.
-config VBOOT_DYNAMIC_WORK_BUFFER
- bool "Vboot's work buffer is dynamically allocated."
- default y if ARCH_ROMSTAGE_X86_32 && !SEPARATE_VERSTAGE
- default n
- depends on VBOOT
- help
- This option is used when there isn't enough pre-main memory
- RAM to allocate the vboot work buffer. That means vboot verification
- is after memory init and requires main memory to back the work
- buffer.
-
config VBOOT_SAVE_RECOVERY_REASON_ON_REBOOT
bool
default n
diff --git a/src/vboot/common.c b/src/vboot/common.c
index cfdb82a..3e480ed 100644
--- a/src/vboot/common.c
+++ b/src/vboot/common.c
@@ -46,7 +46,7 @@
static struct vb2_working_data * const vboot_get_working_data(void)
{
- if (IS_ENABLED(CONFIG_VBOOT_DYNAMIC_WORK_BUFFER))
+ if (IS_ENABLED(CONFIG_VBOOT_STARTS_IN_ROMSTAGE))
/* cbmem_add() does a cbmem_find() first. */
return cbmem_add(CBMEM_ID_VBOOT_WORKBUF, vb_work_buf_size);
else
@@ -55,7 +55,7 @@
static size_t vb2_working_data_size(void)
{
- if (IS_ENABLED(CONFIG_VBOOT_DYNAMIC_WORK_BUFFER))
+ if (IS_ENABLED(CONFIG_VBOOT_STARTS_IN_ROMSTAGE))
return vb_work_buf_size;
else
return _vboot2_work_size;
@@ -168,12 +168,12 @@
}
/*
- * For platforms that employ VBOOT_DYNAMIC_WORK_BUFFER, the vboot
+ * For platforms that employ VBOOT_STARTS_IN_ROMSTAGE, the vboot
* verification doesn't happen until after cbmem is brought online.
* Therefore, the selected region contents would not be initialized
* so don't automatically add results when cbmem comes online.
*/
-#if !IS_ENABLED(CONFIG_VBOOT_DYNAMIC_WORK_BUFFER)
+#if !IS_ENABLED(CONFIG_VBOOT_STARTS_IN_ROMSTAGE)
static void vb2_store_selected_region_cbmem(int unused)
{
vb2_store_selected_region();
diff --git a/src/vboot/vboot_handoff.c b/src/vboot/vboot_handoff.c
index 2533a1d..2bd5c09 100644
--- a/src/vboot/vboot_handoff.c
+++ b/src/vboot/vboot_handoff.c
@@ -175,12 +175,12 @@
}
/*
- * For platforms that employ VBOOT_DYNAMIC_WORK_BUFFER, the vboot
+ * For platforms that employ VBOOT_STARTS_IN_ROMSTAGE, the vboot
* verification doesn't happen until after cbmem is brought online.
* Therefore, the vboot results would not be initialized so don't
* automatically add results when cbmem comes online.
*/
-#if !IS_ENABLED(CONFIG_VBOOT_DYNAMIC_WORK_BUFFER)
+#if !IS_ENABLED(CONFIG_VBOOT_STARTS_IN_ROMSTAGE)
static void vb2_fill_handoff_cbmem(int unused)
{
vboot_fill_handoff();
diff --git a/src/vboot/vboot_loader.c b/src/vboot/vboot_loader.c
index 207aada..9593358 100644
--- a/src/vboot/vboot_loader.c
+++ b/src/vboot/vboot_loader.c
@@ -145,12 +145,12 @@
/*
* Fill in vboot cbmem objects before moving to ramstage so all
* downstream users have access to vboot results. This path only
- * applies to platforms employing VBOOT_DYNAMIC_WORK_BUFFER because
+ * applies to platforms employing VBOOT_STARTS_IN_ROMSTAGE because
* cbmem comes online prior to vboot verification taking place. For
* other platforms the vboot cbmem objects are initialized when
* cbmem comes online.
*/
- if (ENV_ROMSTAGE && IS_ENABLED(CONFIG_VBOOT_DYNAMIC_WORK_BUFFER)) {
+ if (ENV_ROMSTAGE && IS_ENABLED(CONFIG_VBOOT_STARTS_IN_ROMSTAGE)) {
vb2_store_selected_region();
vboot_fill_handoff();
}
--
To view, visit https://review.coreboot.org/18979
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3f953c8d2a8dcb3f65b07f548184d6dd0eb688fe
Gerrit-PatchSet: 10
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins)
Julius Werner has submitted this change and it was merged. ( https://review.coreboot.org/18978 )
Change subject: vboot: Remove CHIPSET_PROVIDES_VERSTAGE_MAIN_SYMBOL Kconfig option
......................................................................
vboot: Remove CHIPSET_PROVIDES_VERSTAGE_MAIN_SYMBOL Kconfig option
CHIPSET_PROVIDES_VERSTAGE_MAIN_SYMBOL allows the SoC directory to
provide its own main() symbol that can execute code before the generic
verstage code runs. We have now established in other places (e.g. T210
ramstage) a sort of convention that SoCs which need to run code in any
stage before main() should just override stage_entry() instead. This
patch aligns the verstage with that model and gets rid of the extra
Kconfig option. This also removes the need for aliasing between main()
and verstage(). Like other stages the main verstage code is now just in
main() and can be called from stage_entry().
Change-Id: If42c9c4fbab51fbd474e1530023a30b69495d1d6
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Reviewed-on: https://review.coreboot.org/18978
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Tested-by: build bot (Jenkins)
---
M src/arch/x86/verstage.c
M src/soc/nvidia/tegra124/Kconfig
M src/soc/nvidia/tegra124/verstage.c
M src/vboot/Kconfig
M src/vboot/vboot_common.h
M src/vboot/verstage.c
6 files changed, 7 insertions(+), 21 deletions(-)
Approvals:
Aaron Durbin: Looks good to me, approved
build bot (Jenkins): Verified
diff --git a/src/arch/x86/verstage.c b/src/arch/x86/verstage.c
index 7987e1c..d24866b 100644
--- a/src/arch/x86/verstage.c
+++ b/src/arch/x86/verstage.c
@@ -14,10 +14,10 @@
*/
#include <arch/cpu.h>
-#include <vendorcode/google/chromeos/chromeos.h>
+#include <main_decl.h>
/* Provide an entry point for verstage when it's a separate stage. */
asmlinkage void car_stage_entry(void)
{
- verstage();
+ main();
}
diff --git a/src/soc/nvidia/tegra124/Kconfig b/src/soc/nvidia/tegra124/Kconfig
index 227efca..fdbbc7f 100644
--- a/src/soc/nvidia/tegra124/Kconfig
+++ b/src/soc/nvidia/tegra124/Kconfig
@@ -20,7 +20,6 @@
select VBOOT_OPROM_MATTERS
select VBOOT_STARTS_IN_BOOTBLOCK
select SEPARATE_VERSTAGE
- select CHIPSET_PROVIDES_VERSTAGE_MAIN_SYMBOL
config TEGRA124_MODEL_TD570D
bool "TD570D"
diff --git a/src/soc/nvidia/tegra124/verstage.c b/src/soc/nvidia/tegra124/verstage.c
index 9eee064..526f14e 100644
--- a/src/soc/nvidia/tegra124/verstage.c
+++ b/src/soc/nvidia/tegra124/verstage.c
@@ -45,9 +45,9 @@
early_mainboard_init();
}
-void main(void)
+void stage_entry(void)
{
asm volatile ("bl arm_init_caches"
: : : "r0", "r1", "r2", "r3", "r4", "r5", "ip");
- verstage();
+ main();
}
diff --git a/src/vboot/Kconfig b/src/vboot/Kconfig
index e67c108..2b6cde1 100644
--- a/src/vboot/Kconfig
+++ b/src/vboot/Kconfig
@@ -95,13 +95,6 @@
reused by the succeeding stage. This is useful if a RAM space is too
small to fit both the verstage and the succeeding stage.
-config CHIPSET_PROVIDES_VERSTAGE_MAIN_SYMBOL
- bool "The chipset provides the main() entry point for verstage"
- default n
- depends on SEPARATE_VERSTAGE
- help
- The chipset code provides their own main() entry point.
-
config VBOOT_DYNAMIC_WORK_BUFFER
bool "Vboot's work buffer is dynamically allocated."
default y if ARCH_ROMSTAGE_X86_32 && !SEPARATE_VERSTAGE
diff --git a/src/vboot/vboot_common.h b/src/vboot/vboot_common.h
index 956b54c..aa01f28 100644
--- a/src/vboot/vboot_common.h
+++ b/src/vboot/vboot_common.h
@@ -97,11 +97,10 @@
/* ============================= VERSTAGE ================================== */
/*
- * Main logic for verified boot. verstage() is the stage entry point
- * while the verstage_main() is just the core logic.
+ * Main logic for verified boot. verstage_main() is just the core vboot logic.
+ * If the verstage is a separate stage, it should be entered via main().
*/
void verstage_main(void);
-void verstage(void);
void verstage_mainboard_init(void);
/* Check boot modes */
diff --git a/src/vboot/verstage.c b/src/vboot/verstage.c
index 0ec9ca6..64fadc7 100644
--- a/src/vboot/verstage.c
+++ b/src/vboot/verstage.c
@@ -24,7 +24,7 @@
/* Default empty implementation. */
}
-void verstage(void)
+void main(void)
{
console_init();
exception_init();
@@ -37,8 +37,3 @@
hlt();
}
}
-
-#if !IS_ENABLED(CONFIG_CHIPSET_PROVIDES_VERSTAGE_MAIN_SYMBOL)
-/* This is for boards that rely on main() for an entry point of a stage. */
-void main(void) __attribute__((alias ("verstage")));
-#endif
--
To view, visit https://review.coreboot.org/18978
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If42c9c4fbab51fbd474e1530023a30b69495d1d6
Gerrit-PatchSet: 10
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins)
Julius Werner has submitted this change and it was merged. ( https://review.coreboot.org/18976 )
Change subject: arm64: Fix verstage to use proper assembly versions of mem*()
......................................................................
arm64: Fix verstage to use proper assembly versions of mem*()
Due to an unfortunate race between adding verstage support and reverting
an earlier hack that disabled the optimized assembly versions of
memcpy(), memmove() and memset() on ARM64, it seems that we never
enabled the optimized code for the verstage. This should be fixed so
that all stages use the same architecture support code.
Change-Id: I0bf3245e346105492030f4b133729c4d11bdb3ff
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Reviewed-on: https://review.coreboot.org/18976
Tested-by: build bot (Jenkins)
---
M src/arch/arm64/Makefile.inc
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Julius Werner: Looks good to me, approved
build bot (Jenkins): Verified
diff --git a/src/arch/arm64/Makefile.inc b/src/arch/arm64/Makefile.inc
index 95bc58d..7f3ce3f 100644
--- a/src/arch/arm64/Makefile.inc
+++ b/src/arch/arm64/Makefile.inc
@@ -72,9 +72,9 @@
verstage-y += boot.c
verstage-y += div0.c
verstage-y += eabi_compat.c
-verstage-y += ../../lib/memset.c
-verstage-y += ../../lib/memcpy.c
-verstage-y += ../../lib/memmove.c
+verstage-y += memset.S
+verstage-y += memcpy.S
+verstage-y += memmove.S
verstage-y += transition.c transition_asm.S
--
To view, visit https://review.coreboot.org/18976
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0bf3245e346105492030f4b133729c4d11bdb3ff
Gerrit-PatchSet: 6
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins)
Julius Werner has posted comments on this change. ( https://review.coreboot.org/18976 )
Change subject: arm64: Fix verstage to use proper assembly versions of mem*()
......................................................................
Patch Set 5: Code-Review+2
Just fixed a typo in the commit message there.
--
To view, visit https://review.coreboot.org/18976
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I0bf3245e346105492030f4b133729c4d11bdb3ff
Gerrit-PatchSet: 5
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins)
Gerrit-HasComments: No
Julius Werner has submitted this change and it was merged. ( https://review.coreboot.org/18975 )
Change subject: abuild: Treat command line for recursive invocations as bash array
......................................................................
abuild: Treat command line for recursive invocations as bash array
This fix changes the $cmdline variable that is used for recursive
parallel abuild invocations through xargs from a string to a true bash
array (like $@). This allows bash to properly preserve and pass on
whitespace in parameters, like you get from invocations such as:
util/abuild/abuild -c 32 -t "MY_FIRST_BOARD MY_SECOND_BOARD"
Also add a mechanism to better spread CPUs across targets, since
otherwise we can leave a lot of CPUs idle if we're trying to build only
a few boards in parallel.
Change-Id: I76a1c6456ef8ab21286fdc1636d659a3b76bc5d7
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Reviewed-on: https://review.coreboot.org/18975
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth(a)google.com>
---
M util/abuild/abuild
1 file changed, 9 insertions(+), 6 deletions(-)
Approvals:
build bot (Jenkins): Verified
Martin Roth: Looks good to me, approved
diff --git a/util/abuild/abuild b/util/abuild/abuild
index 93ceac5..95711a1 100755
--- a/util/abuild/abuild
+++ b/util/abuild/abuild
@@ -16,8 +16,8 @@
#set -x # Turn echo on....
-ABUILD_DATE="Dec 6, 2016"
-ABUILD_VERSION="0.10.01"
+ABUILD_DATE="Mar 28, 2017"
+ABUILD_VERSION="0.10.02"
TOP=$PWD
@@ -581,8 +581,8 @@
export PATH=$PATH:util/abuild
getopt - > /dev/null 2>/dev/null || gcc -o util/abuild/getopt util/abuild/getopt.c
-# command line for xargs parallelization. Thus overwrite -c X
-cmdline="$* -c 1"
+# Save command line for xargs parallelization.
+cmdline=("$@")
# parse parameters.. try to find out whether we're running GNU getopt
getoptbrand="$(getopt -V)"
@@ -735,6 +735,8 @@
local ABSPATH
local stime
local etime
+ local num_targets
+ local cpus_per_target
local targets=${*-$(get_mainboards)}
# seed shared utils
@@ -781,8 +783,9 @@
rmdir "${scanbuild_out}tmp"
fi
rm -rf "$TARGET/temp" "$TMPCFG"
- # shellcheck disable=SC2086
- echo $targets | xargs -P ${cpus:-0} -n 1 "$0" $cmdline -I -t
+ num_targets=$(wc -w <<<"$targets")
+ cpus_per_target=$(((${cpus:-1} + num_targets - 1) / num_targets))
+ echo "$targets" | xargs -P ${cpus:-0} -n 1 "$0" "${cmdline[@]}" -I -c "$cpus_per_target" -t
}
fi
--
To view, visit https://review.coreboot.org/18975
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I76a1c6456ef8ab21286fdc1636d659a3b76bc5d7
Gerrit-PatchSet: 6
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins)