summaryrefslogtreecommitdiff
path: root/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0025-efi_setup-discover-FF-A-bus-before-raising-EFI-start.patch
blob: 568d9464c924ecfdb20519fd10919f9595d258dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From 1f165f5b6e7d82611b55260b7254fee5fbebe539 Mon Sep 17 00:00:00 2001
From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Date: Wed, 30 Nov 2022 19:14:52 +0000
Subject: [PATCH 25/42] efi_setup: discover FF-A bus before raising EFI started
 event

add FF-A discovery to efi_corstone1000_uboot_efi_started_event()

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Upstream-Status: Pending [Not submitted to upstream yet]
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
---
 lib/efi_loader/efi_setup.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c
index 08c742edbd..65bd626e49 100644
--- a/lib/efi_loader/efi_setup.c
+++ b/lib/efi_loader/efi_setup.c
@@ -142,9 +142,16 @@ static efi_status_t efi_init_secure_boot(void)
 static int efi_corstone1000_uboot_efi_started_event(void)
 {
 	struct ffa_send_direct_data msg = {0};
+	int ret;
 
 	log_debug("[%s]\n", __func__);
 
+	ret = ffa_bus_discover(NULL);
+	if (ret != 0) {
+		log_err("failure to discover FF-A bus\n");
+		return ret;
+	}
+
 	/*
 	 * setting the kernel started  event arguments:
 	 * setting capsule update interface ID(31:16)
@@ -284,9 +291,9 @@ efi_status_t efi_init_obj_list(void)
 		int ffa_ret;
 		ffa_ret = efi_corstone1000_uboot_efi_started_event();
 		if (ffa_ret)
-			debug("[efi_boottime][ERROR]: Failure to notify SE Proxy FW update service\n");
+			log_err("Failure to notify SE Proxy FW update service\n");
 		else
-			debug("[efi_boottime][INFO]: SE Proxy FW update service notified\n");
+			debug("SE Proxy FW update service notified\n");
 #endif
 
 	/* Initialize variable services */
-- 
2.25.1