Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame^] | 1 | From e5e1cf36cb7b77a5bb526f1744c0c77164374ca3 Mon Sep 17 00:00:00 2001 |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 2 | From: Vishnu Banavath <vishnu.banavath@arm.com> |
| 3 | Date: Fri, 10 Dec 2021 20:10:41 +0000 |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame^] | 4 | Subject: [PATCH 16/24] efi_boottime: corstone1000: pass interface id and |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 5 | kernel event id using register w4 |
| 6 | |
| 7 | Initially the interface/event IDs are passed to the SP using register |
| 8 | w3 and w5. |
| 9 | |
| 10 | Now the SE proxy SP requires this arguments to be in register w4. |
| 11 | |
| 12 | This change is to pass interface ID(31:16) and kernel started |
| 13 | event ID(15:0) to SE proxy SP to trigger an event to |
| 14 | secure enclave just before ExitbootService(). |
| 15 | |
| 16 | Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com> |
| 17 | Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> |
| 18 | Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> |
| 19 | --- |
| 20 | lib/efi_loader/efi_boottime.c | 13 ++++++++++--- |
| 21 | 1 file changed, 10 insertions(+), 3 deletions(-) |
| 22 | |
| 23 | diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame^] | 24 | index f2b5c7834c01..140d0f4f71da 100644 |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 25 | --- a/lib/efi_loader/efi_boottime.c |
| 26 | +++ b/lib/efi_loader/efi_boottime.c |
| 27 | @@ -27,6 +27,11 @@ |
| 28 | #include <arm_ffa_helper.h> |
| 29 | #endif |
| 30 | |
| 31 | +#if IS_ENABLED(CONFIG_TARGET_CORSTONE1000) |
| 32 | +#include <linux/bitfield.h> |
| 33 | +#include <linux/bitops.h> |
| 34 | +#endif |
| 35 | + |
| 36 | DECLARE_GLOBAL_DATA_PTR; |
| 37 | |
| 38 | /* Task priority level */ |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame^] | 39 | @@ -2120,10 +2125,12 @@ static int efi_corstone1000_kernel_started_event(void) |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 40 | func_data.data0 = &part_id; |
| 41 | |
| 42 | /* |
| 43 | - * setting the kernel started event arguments |
| 44 | + * setting the kernel started event arguments: |
| 45 | + * setting capsule update interface ID(31:16) |
| 46 | + * the kernel started event ID(15:0) |
| 47 | */ |
| 48 | - msg.a3 = CORSTONE1000_SEPROXY_UPDATE_SVC_ID; |
| 49 | - msg.a5 = CORSTONE1000_KERNEL_STARTED_EVT; |
| 50 | + msg.a4 = PREP_SEPROXY_SVC_ID(CORSTONE1000_SEPROXY_UPDATE_SVC_ID) | |
| 51 | + PREP_SEPROXY_EVT(CORSTONE1000_KERNEL_STARTED_EVT); |
| 52 | |
| 53 | func_data.data1_size = sizeof(msg); |
| 54 | func_data.data1 = &msg; |
| 55 | -- |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame^] | 56 | 2.37.1 |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 57 | |