diff options
| author | Manish Pandey <manish.pandey2@arm.com> | 2022-06-23 13:11:48 +0100 |
|---|---|---|
| committer | Manish V Badarkhe <Manish.Badarkhe@arm.com> | 2022-10-05 15:25:28 +0100 |
| commit | b1392f429cdd368ea2b8e183a1ac0fb31deaf694 (patch) | |
| tree | 1dc0c7f0ad74382683d0927ec2b0529d09e24ad3 /services | |
| parent | d1747e1b8e617ad024456791ce0ab8950bb282ca (diff) | |
| download | arm-trusted-firmware-b1392f429cdd368ea2b8e183a1ac0fb31deaf694.tar.gz | |
feat(drtm): ensure that no SDEI event registered during dynamic launch
Ensured no SDEI event are registered during dynamic launch.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Ied3b2d389aa3d9a96ace9078581d5e691f0b38a7
Diffstat (limited to 'services')
| -rw-r--r-- | services/std_svc/drtm/drtm_main.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/services/std_svc/drtm/drtm_main.c b/services/std_svc/drtm/drtm_main.c index 9237d82a5..bec4b72f1 100644 --- a/services/std_svc/drtm/drtm_main.c +++ b/services/std_svc/drtm/drtm_main.c @@ -26,6 +26,7 @@ #include <lib/xlat_tables/xlat_tables_v2.h> #include <plat/common/platform.h> #include <services/drtm_svc.h> +#include <services/sdei.h> #include <platform_def.h> /* Structure to store DRTM features specific to the platform. */ @@ -569,6 +570,13 @@ static uint64_t drtm_dynamic_launch(uint64_t x1, void *handle) SMC_RET1(handle, ret); } + /* Ensure that there are no SDEI event registered */ +#if SDEI_SUPPORT + if (sdei_get_registered_event_count() != 0) { + SMC_RET1(handle, DENIED); + } +#endif /* SDEI_SUPPORT */ + /* * Engage the DMA protections. The launch cannot proceed without the DMA * protections due to potential TOC/TOU vulnerabilities w.r.t. the DLME @@ -611,13 +619,6 @@ static uint64_t drtm_dynamic_launch(uint64_t x1, void *handle) drtm_dl_reset_dlme_el_state(dlme_el); drtm_dl_reset_dlme_context(dlme_el); - /* - * TODO: Reset all SDEI event handlers, since they are untrusted. Both - * private and shared events for all cores must be unregistered. - * Note that simply calling SDEI ABIs would not be adequate for this, since - * there is currently no SDEI operation that clears private data for all PEs. - */ - drtm_dl_prepare_eret_to_dlme(&args, dlme_el); /* |
