From 45622ddc580460624fef99ca6ece32031db04191 Mon Sep 17 00:00:00 2001 From: Vishwanath Martur <64204611+vishwamartur@users.noreply.github.com> Date: Fri, 1 Nov 2024 12:32:11 +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/GCC/RISC-V/portASM.S | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/portable/GCC/RISC-V/portASM.S b/portable/GCC/RISC-V/portASM.S index b5f054777..9e422c6b2 100644 --- a/portable/GCC/RISC-V/portASM.S +++ b/portable/GCC/RISC-V/portASM.S @@ -382,3 +382,13 @@ application_exception_handler: processed_source: portcontextRESTORE_CONTEXT /*-----------------------------------------------------------*/ + +/* Update the portcontextSAVE_CONTEXT_INTERNAL macro to save memory protection context */ +.macro portcontextSAVE_CONTEXT_INTERNAL + portasmSAVE_MEMORY_PROTECTION_CONTEXT +.endm + +/* Update the portcontextRESTORE_CONTEXT macro to restore memory protection context */ +.macro portcontextRESTORE_CONTEXT + portasmRESTORE_MEMORY_PROTECTION_CONTEXT +.endm