From b1ca5b40496620f514d310d42e3c1307091ebfcc Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 30 Apr 2025 22:33:40 -0700 Subject: [PATCH] kern: plutoo is an intellectual, I am a fool, fix chicanery --- .../source/arch/arm64/kern_exception_handlers.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libraries/libmesosphere/source/arch/arm64/kern_exception_handlers.cpp b/libraries/libmesosphere/source/arch/arm64/kern_exception_handlers.cpp index b745d5ab3..6c21b455b 100644 --- a/libraries/libmesosphere/source/arch/arm64/kern_exception_handlers.cpp +++ b/libraries/libmesosphere/source/arch/arm64/kern_exception_handlers.cpp @@ -115,7 +115,10 @@ namespace ams::kern::arch::arm64 { u64 far = raw_far; const u64 ec = (esr >> 26) & 0x3F; if (ec == EsrEc_InstructionAbortEl0 || ec == EsrEc_DataAbortEl0) { - /* Adjust registers if a memory tagging exception has occurred. */ + /* Adjust registers if a synchronous external abort has occurred with far not valid. */ + /* Mask 0x03F = Low 6 bits IFSC == 0x10: "Synchronous External abort, */ + /* not on translation table walk or hardware update of translation table. */ + /* Mask 0x400 = FnV = "FAR Not Valid" */ /* TODO: How would we perform this check using named register accesses? */ if ((esr & 0x43F) == 0x410) { /* Clear the faulting register on memory tagging exception. */ @@ -450,7 +453,10 @@ namespace ams::kern::arch::arm64 { /* Pre-process exception registers as needed. */ const u64 ec = (esr >> 26) & 0x3F; if (ec == EsrEc_InstructionAbortEl0 || ec == EsrEc_DataAbortEl0) { - /* Adjust registers if a memory tagging exception has occurred. */ + /* Adjust registers if a synchronous external abort has occurred with far not valid. */ + /* Mask 0x03F = Low 6 bits IFSC == 0x10: "Synchronous External abort, */ + /* not on translation table walk or hardware update of translation table. */ + /* Mask 0x400 = FnV = "FAR Not Valid" */ /* TODO: How would we perform this check using named register accesses? */ if ((esr & 0x43F) == 0x410) { /* Clear the faulting register on memory tagging exception. */