Julius Werner submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved
trogdor: QCSDI loading depends on VB2_GBB_FLAG_RUNNING_FAFT setting flag

Change-Id: I63f35c94bc6c60934ace5fe0fd9176443059b354
Signed-off-by: Ashwin Kumar <ashk@codeaurora.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36518
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
M src/soc/qualcomm/common/qclib.c
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/soc/qualcomm/common/qclib.c b/src/soc/qualcomm/common/qclib.c
index 6bf2f0e..d06cb42 100644
--- a/src/soc/qualcomm/common/qclib.c
+++ b/src/soc/qualcomm/common/qclib.c
@@ -13,6 +13,8 @@
#include <soc/mmu_common.h>
#include <soc/qclib_common.h>
#include <soc/symbols_common.h>
+#include <security/vboot/misc.h>
+#include <vb2_api.h>

struct qclib_cb_if_table qclib_cb_if_table = {
.magic = QCLIB_MAGIC_NUMBER,
@@ -144,9 +146,11 @@
qclib_cb_if_table.global_attributes =
QCLIB_GA_ENABLE_UART_LOGGING;

- if (CONFIG(QC_SDI_ENABLE)) {
+ if (CONFIG(QC_SDI_ENABLE) && (!CONFIG(VBOOT) ||
+ !vboot_is_gbb_flag_set(VB2_GBB_FLAG_RUNNING_FAFT))) {
struct prog qcsdi =
- PROG_INIT(PROG_REFCODE, CONFIG_CBFS_PREFIX "/qcsdi");
+ PROG_INIT(PROG_REFCODE,
+ CONFIG_CBFS_PREFIX "/qcsdi");

/* Attempt to load QCSDI elf */
if (prog_locate(&qcsdi))
@@ -155,8 +159,8 @@
if (cbfs_prog_stage_load(&qcsdi))
goto fail;

- qclib_add_if_table_entry(QCLIB_TE_QCSDI, prog_entry(&qcsdi),
- prog_size(&qcsdi), 0);
+ qclib_add_if_table_entry(QCLIB_TE_QCSDI,
+ prog_entry(&qcsdi), prog_size(&qcsdi), 0);
printk(BIOS_INFO, "qcsdi.entry[%p]\n", qcsdi.entry);
}


To view, visit change 36518. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I63f35c94bc6c60934ace5fe0fd9176443059b354
Gerrit-Change-Number: 36518
Gerrit-PatchSet: 44
Gerrit-Owner: mturney mturney <mturney@codeaurora.org>
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Ravi kumar <rbokka@codeaurora.org>
Gerrit-Reviewer: ashk@codeaurora.org
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Reviewer: mturney mturney <mturney@codeaurora.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-CC: Ravi Kumar Bokka <c_rbokka@qualcomm.corp-partner.google.com>
Gerrit-MessageType: merged