Commit 5266c864 authored by Jeffrey Lee's avatar Jeffrey Lee Committed by ROOL
Browse files

Fix OS_ReadSysInfo 7 to record prefetch abort details

OS_ReadSysInfo 7 is meant to record the details of the last data or
prefetch abort that was passed to the environment handlers. This was
implemented in Ursula, but the code for recording the prefetch abort
details got lost somewhere during the 32 bit conversion process. Restore
parent fccd5e2f
......@@ -18,11 +18,11 @@
; Exception veneers
[ AMB_LazyMapIn
; Instruction fetch abort pre-veneer, just to field possible lazy AMB aborts
; Instruction fetch abort pre-veneer
PAbPreVeneer ROUT
Push "r0-r7, lr" ; wahey, we have an abort stack
[ AMB_LazyMapIn
SUB r0, lr_abort, #4 ; aborting address
MOV r2, #1
BL AMB_LazyFixUp ; can trash r0-r7, returns NE status if claimed and fixed up
......@@ -31,11 +31,18 @@ PAbPreVeneer ROUT
SUBNES pc, lr_abort, #4 ; restart aborting instruction if fixed up
BL AMB_MakeFullyHonest ; PAbHan might not support recursive aborts
LDR lr, [sp, #8*4] ; (not a lazy abort) restore lr
; Remember the details of this abort, for OS_ReadSysInfo 7
LDR r4, =ZeroPage+Abort32_dumparea
MSR SPSR_cxsf, r1
STR lr, [r4] ; dump 32-bit PC
STR r1, [r4, #4] ; dump 32-bit PSR
STR lr, [r4, #2*4] ; fault address is PC (yes, PC, not PC-4)
LDR r0, =ZeroPage+PAbHan ; we want to jump to PAb handler, in abort mode
LDR r0, [r0]
STR r0, [sp, #8*4]
Pull "r0-r7, pc"
DAbPreVeneer ROUT
......@@ -376,12 +376,7 @@ DefaultProcVecs
UndPreVeneer * ZeroPage+ProcVecPreVeneers+(.-DefaultPreVeneers)
LDR PC, DefaultPreVeneers-ProcVecPreVeneers+UndHan
[ AMB_LazyMapIn
PAbPreVeneer * ZeroPage+ProcVecPreVeneers+(.-DefaultPreVeneers)
LDR PC, DefaultPreVeneers-ProcVecPreVeneers+PAbHan
AdXPreVeneer * ZeroPage+ProcVecPreVeneers+(.-DefaultPreVeneers)
LDR PC, DefaultPreVeneers-ProcVecPreVeneers+AdXHan
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment