mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 12:21:18 +00:00
kern: return ExceptionType_UnalignedData on data abort caused by alignment fault
This commit is contained in:
parent
bf3203da0f
commit
48e86f0406
1 changed files with 7 additions and 0 deletions
|
@ -223,6 +223,13 @@ namespace ams::kern::arch::arm64 {
|
|||
type = ams::svc::ExceptionType_InstructionAbort;
|
||||
break;
|
||||
case EsrEc_DataAbortEl0:
|
||||
/* If esr.IFSC is "Alignment Fault", return UnalignedData instead of DataAbort. */
|
||||
if ((esr & 0x3F) == 0b100001) {
|
||||
type = ams::svc::ExceptionType_UnalignedData;
|
||||
} else {
|
||||
type = ams::svc::ExceptionType_DataAbort;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
type = ams::svc::ExceptionType_DataAbort;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue