From c37130a3c19abcfee051acb7ee534bc9e307b7ce Mon Sep 17 00:00:00 2001 From: Vishwanath Martur <64204611+vishwamartur@users.noreply.github.com> Date: Fri, 1 Nov 2024 12:28:03 +0530 Subject: [PATCH] Update `portASM.s` to handle memory protection context * Add `portcontextSAVE_CONTEXT_INTERNAL` macro to save memory protection context * Add `portcontextRESTORE_CONTEXT` macro to restore memory protection context --- portable/IAR/RISC-V/portASM.s | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/portable/IAR/RISC-V/portASM.s b/portable/IAR/RISC-V/portASM.s index 12a2a6154..8a30a8f6a 100644 --- a/portable/IAR/RISC-V/portASM.s +++ b/portable/IAR/RISC-V/portASM.s @@ -397,3 +397,13 @@ application_exception_handler: processed_source: portcontextRESTORE_CONTEXT /*-----------------------------------------------------------*/ + +/* Update the portcontextSAVE_CONTEXT_INTERNAL macro to save memory protection context */ +portcontextSAVE_CONTEXT_INTERNAL MACRO + portasmSAVE_MEMORY_PROTECTION_CONTEXT + ENDM + +/* Update the portcontextRESTORE_CONTEXT macro to restore memory protection context */ +portcontextRESTORE_CONTEXT MACRO + portasmRESTORE_MEMORY_PROTECTION_CONTEXT + ENDM