powermac-rom/NanoKernel/NKColdInts.s

60 lines
1.4 KiB
ArmAsm
Raw Permalink Normal View History

2018-07-28 06:20:23 +00:00
; AUTO-GENERATED SYMBOL LIST
; IMPORTS:
; NKExceptions
; Exception
; LoadInterruptRegisters
; ReturnFromInt
; NKMemory
; PutPTE
; EXPORTS:
; InstStorageInt (=> NKReset)
; MachineCheckInt (=> NKReset)
2018-07-28 05:37:20 +00:00
########################################################################
InstStorageInt
2018-07-28 06:20:23 +00:00
bl LoadInterruptRegisters
andis. r8, r11, 0x4020 ; Not in HTAB || Bad seg reg
beq @already_in_htab
stmw r14, KDP.r14(r1)
mr r27, r10
bl PutPTE
bne @illegal_address ; Could not find in SegMap
mfsprg r24, 3
mfmsr r14
_set r15, r14, bitMsrDR
addi r23, r1, KDP.VecTblMemRetry
mtsprg 3, r23
mr r19, r10
mtmsr r15
lbz r23, 0(r19)
sync
mtmsr r14
mtsprg 3, r24
lmw r14, KDP.r14(r1)
b ReturnFromInt
2018-07-28 05:37:20 +00:00
@illegal_address
2018-07-28 06:20:23 +00:00
lmw r14, KDP.r14(r1)
li r8, ecInstPageFault
blt Exception
li r8, ecInstInvalidAddress
b Exception
2018-07-28 05:37:20 +00:00
@already_in_htab
2018-07-28 06:20:23 +00:00
andis. r8, r11, 0x800 ; Illegal access to legal EA?
li r8, ecInstSupAccessViolation
bne Exception
li r8, ecInstHardwareFault
b Exception
2018-07-28 05:37:20 +00:00
########################################################################
MachineCheckInt
2018-07-28 06:20:23 +00:00
bl LoadInterruptRegisters
li r8, ecMachineCheck
b Exception