Merge changes from topic "mb/drtm-preparatory-patches" into integration

* changes:
  docs(drtm): steps to run DRTM implementation
  docs(drtm): add platform APIs for DRTM
  feat(drtm): flush dcache before DLME launch
  feat(drtm): invalidate icache before DLME launch
  feat(drtm): ensure that passed region lies within Non-Secure region of DRAM
  feat(fvp): add plat API to validate that passed region is non-secure
  feat(drtm): ensure that no SDEI event registered during dynamic launch
  feat(drtm): prepare EL state during dynamic launch
  feat(drtm): prepare DLME data for DLME launch
  feat(drtm): take DRTM components measurements before DLME launch
  feat(drtm): add a few DRTM DMA protection APIs
  feat(drtm): add remediation driver support in DRTM
  feat(fvp): add plat API to set and get the DRTM error
  feat(drtm): add Event Log driver support for DRTM
  feat(drtm): check drtm arguments during dynamic launch
  feat(drtm): introduce drtm dynamic launch function
  refactor(measured-boot): split out a few Event Log driver functions
  feat(drtm): retrieve DRTM features
  feat(drtm): add platform functions for DRTM
  feat(sdei): add a function to return total number of events registered
  feat(drtm): add PCR entries for DRTM
  feat(drtm): update drtm setup function
  refactor(crypto): change CRYPTO_SUPPORT flag to numeric
  feat(mbedtls): update mbedTLS driver for DRTM support
  feat(fvp): add crypto support in BL31
  feat(crypto): update crypto module for DRTM support
  build(changelog): add new scope for mbedTLS and Crypto module
  feat(drtm): add standard DRTM service
  build(changelog): add new scope for DRTM service
  feat(fvp): increase MAX_XLAT_TABLES entries for DRTM support
  feat(fvp): increase BL31's stack size for DRTM support
  feat(fvp): add platform hooks for DRTM DMA protection
diff --git a/Makefile b/Makefile
index 1edf3b8..8adc0d0 100644
--- a/Makefile
+++ b/Makefile
@@ -852,6 +852,12 @@
     $(info DRTM_SUPPORT is an experimental feature)
 endif
 
+ifeq (${ENABLE_RME},1)
+    ifneq (${SEPARATE_CODE_AND_RODATA},1)
+        $(error `ENABLE_RME=1` requires `SEPARATE_CODE_AND_RODATA=1`)
+    endif
+endif
+
 ################################################################################
 # Process platform overrideable behaviour
 ################################################################################
diff --git a/changelog.yaml b/changelog.yaml
index debbbe7..f95cdbd 100644
--- a/changelog.yaml
+++ b/changelog.yaml
@@ -652,6 +652,9 @@
       - title: Context Management
         scope: context mgmt
 
+      - title: Semihosting
+        scope: semihosting
+
   - title: Drivers
 
     subsections:
diff --git a/lib/semihosting/semihosting.c b/lib/semihosting/semihosting.c
index e0845c1..163a82d 100644
--- a/lib/semihosting/semihosting.c
+++ b/lib/semihosting/semihosting.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2022, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -64,8 +64,10 @@
 
 	result = semihosting_call(SEMIHOSTING_SYS_SEEK, (uintptr_t)&seek_block);
 
-	if (result != 0) {
+	if (result < 0) {
 		result = semihosting_call(SEMIHOSTING_SYS_ERRNO, 0);
+	} else  {
+		result = 0;
 	}
 
 	return result;
diff --git a/plat/qti/common/src/qti_interrupt_svc.c b/plat/qti/common/src/qti_interrupt_svc.c
index 89cd7b5..3017dc7 100644
--- a/plat/qti/common/src/qti_interrupt_svc.c
+++ b/plat/qti/common/src/qti_interrupt_svc.c
@@ -55,6 +55,7 @@
 	 * & we don't have S-EL1 support.
 	 */
 	set_interrupt_rm_flag(flags, NON_SECURE);
+	set_interrupt_rm_flag(flags, SECURE);
 
 	/* Register handler for EL3 interrupts */
 	ret = register_interrupt_type_handler(INTR_TYPE_EL3,