summaryrefslogtreecommitdiff
path: root/src/security/vboot/common.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2019-07-01 16:44:01 -0700
committerJulius Werner <jwerner@chromium.org>2019-07-03 00:38:41 +0000
commiteda20b677f55707eb84c98bf04a15ec5b9eb3c33 (patch)
tree2f09e02f1ba0d008aac6b5886ed56e073c76770e /src/security/vboot/common.c
parent275f7ba5ac9b11a9dc044e5d344f27e6948008d2 (diff)
downloadcoreboot-eda20b677f55707eb84c98bf04a15ec5b9eb3c33.tar.xz
vboot: Use CONFIG_VBOOT_MIGRATE_WORKING_DATA on all platforms
When we added CONFIG_VBOOT_MIGRATE_WORKING_DATA, the idea was that on some Arm platforms the original working data buffer was in SRAM, which stays accessbile for the whole runtime of the system. There is no reason to migrate it into CBMEM on those platforms because ramstage and the payload could continue to access it in SRAM. Now that we've had a couple of months of experience with this option, we found that most of our Arm platforms have some issue that requires migrating anyway, because BL31 often claims SRAM for itself and makes it inaccessible to the payload. On the remaining platforms, accessing SRAM from the payload is possible but still an issue, because libpayload doesn't have enough memory layout information to set up proper page tables for it, so we're accessing it uncached and at risk of alignment errors. Rather than having to figure out how to map the right SRAM range for every platform in the payload, let's just get rid of the option. memcpy()ing 12KB isn't worth this much hassle. Change-Id: I1b94e01c998f723c8950be4d12cc8f02b363a1bf Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33952 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Joel Kitching <kitching@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'src/security/vboot/common.c')
-rw-r--r--src/security/vboot/common.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/security/vboot/common.c b/src/security/vboot/common.c
index bd72683e00..626fbc52a4 100644
--- a/src/security/vboot/common.c
+++ b/src/security/vboot/common.c
@@ -117,13 +117,12 @@ int vboot_is_slot_selected(void)
return reg->size > 0;
}
-#if CONFIG(VBOOT_MIGRATE_WORKING_DATA)
+#if CONFIG(VBOOT_STARTS_IN_BOOTBLOCK)
/*
* For platforms that do not employ VBOOT_STARTS_IN_ROMSTAGE, vboot
* verification occurs before CBMEM is brought online, using pre-RAM.
* In order to make vboot data structures available downstream, copy
- * vboot_working_data from SRAM/CAR into CBMEM on platforms where this
- * memory later becomes unavailable.
+ * vboot_working_data from SRAM/CAR into CBMEM.
*/
static void vboot_migrate_cbmem(int unused)
{
@@ -140,7 +139,7 @@ static void vboot_migrate_cbmem(int unused)
memcpy(wd_cbmem, wd_preram, cbmem_size);
}
ROMSTAGE_CBMEM_INIT_HOOK(vboot_migrate_cbmem)
-#elif CONFIG(VBOOT_STARTS_IN_ROMSTAGE)
+#else
static void vboot_setup_cbmem(int unused)
{
struct vboot_working_data *wd_cbmem =