mirror of
https://github.com/elliotnunn/powermac-rom.git
synced 2024-05-28 22:41:35 +00:00
waaay neater
This commit is contained in:
parent
7c05aaf190
commit
b28fd136c0
|
@ -1,4 +1,16 @@
|
|||
; AUTO-GENERATED SYMBOL LIST
|
||||
; IMPORTS:
|
||||
; NKExceptions
|
||||
; Exception
|
||||
; MRException
|
||||
; NKMemory
|
||||
; GetPhysical
|
||||
; PutPTE
|
||||
; NKSystemCrash
|
||||
; SystemCrash
|
||||
; EXPORTS:
|
||||
; MRDataStorageInt (=> NKReset)
|
||||
; MRMachineCheckInt (=> NKReset)
|
||||
|
||||
; Special MR registers to investigate: r19 (inst addr), r26 (error)
|
||||
|
||||
|
@ -12,8 +24,8 @@ MRDataStorageInt ; Consult DSISR and the page table to decide what to do
|
|||
bne @possible_htab_miss
|
||||
|
||||
andis. r28, r31, 0x0800 ; Illegal data access (else crash!)
|
||||
addi r29, r1, 0x320 ; ?bug -> PutPTE used to accept this arg
|
||||
bnel GetPhysical ; Read the failing PTE to r30/r31 ; TODO fix!
|
||||
addi r29, r1, KDP.CurDBAT0
|
||||
bnel GetPhysical ; Get LBAT or lower PTE
|
||||
li r28, 0x43 ; Filter Writethru and Protection bits
|
||||
and r28, r31, r28
|
||||
cmpwi cr7, r28, 0x43
|
||||
|
@ -62,7 +74,7 @@ MRMachineCheckInt ; Always gives HW fault
|
|||
lwz r27, KDP.HtabLastEA(r1)
|
||||
|
||||
subf r28, r19, r27 ; Delete last HTAB entry if suspicious
|
||||
cmpwi r28, -16
|
||||
cmpwi r28, -16 ; (i.e. within 16b of MemRetried EA)
|
||||
blt @no_htab_del
|
||||
cmpwi r28, 16
|
||||
bgt @no_htab_del
|
||||
|
|
|
@ -1,4 +1,59 @@
|
|||
; AUTO-GENERATED SYMBOL LIST
|
||||
; IMPORTS:
|
||||
; MRMemtabCode
|
||||
; MRLoad1
|
||||
; MRLoad11
|
||||
; MRLoad12
|
||||
; MRLoad121
|
||||
; MRLoad122
|
||||
; MRLoad1221
|
||||
; MRLoad124
|
||||
; MRLoad1241
|
||||
; MRLoad14
|
||||
; MRLoad141
|
||||
; MRLoad142
|
||||
; MRLoad1421
|
||||
; MRLoad21
|
||||
; MRLoad221
|
||||
; MRLoad24
|
||||
; MRLoad241
|
||||
; MRLoad242
|
||||
; MRLoad4
|
||||
; MRLoad41
|
||||
; MRLoad42
|
||||
; MRLoad421
|
||||
; MRLoad44
|
||||
; MRLoad8
|
||||
; MRStore1
|
||||
; MRStore11
|
||||
; MRStore12
|
||||
; MRStore121
|
||||
; MRStore122
|
||||
; MRStore1221
|
||||
; MRStore124
|
||||
; MRStore1241
|
||||
; MRStore14
|
||||
; MRStore141
|
||||
; MRStore142
|
||||
; MRStore1421
|
||||
; MRStore2
|
||||
; MRStore21
|
||||
; MRStore221
|
||||
; MRStore24
|
||||
; MRStore241
|
||||
; MRStore242
|
||||
; MRStore4
|
||||
; MRStore41
|
||||
; MRStore42
|
||||
; MRStore421
|
||||
; MRStore44
|
||||
; MRStore8
|
||||
; MROptabCode
|
||||
; MRLoad2
|
||||
; MRLoad22
|
||||
; MRStore22
|
||||
; EXPORTS:
|
||||
; MRMemtab (=> MROptabCode, NKExceptions)
|
||||
|
||||
; Indexing this table:
|
||||
; bits 0-23 MRCode
|
||||
|
|
|
@ -1,4 +1,58 @@
|
|||
; AUTO-GENERATED SYMBOL LIST
|
||||
; IMPORTS:
|
||||
; MROptabCode
|
||||
; MRDoSecondary
|
||||
; MRLoad2
|
||||
; MRLoad22
|
||||
; MRStore22
|
||||
; EXPORTS:
|
||||
; MRLoad1 (=> MRMemtab)
|
||||
; MRLoad11 (=> MRMemtab)
|
||||
; MRLoad12 (=> MRMemtab)
|
||||
; MRLoad121 (=> MRMemtab)
|
||||
; MRLoad122 (=> MRMemtab)
|
||||
; MRLoad1221 (=> MRMemtab)
|
||||
; MRLoad124 (=> MRMemtab)
|
||||
; MRLoad1241 (=> MRMemtab)
|
||||
; MRLoad14 (=> MRMemtab)
|
||||
; MRLoad141 (=> MRMemtab)
|
||||
; MRLoad142 (=> MRMemtab)
|
||||
; MRLoad1421 (=> MRMemtab)
|
||||
; MRLoad21 (=> MRMemtab)
|
||||
; MRLoad221 (=> MRMemtab)
|
||||
; MRLoad24 (=> MRMemtab)
|
||||
; MRLoad241 (=> MRMemtab)
|
||||
; MRLoad242 (=> MRMemtab)
|
||||
; MRLoad4 (=> MRMemtab)
|
||||
; MRLoad41 (=> MRMemtab)
|
||||
; MRLoad42 (=> MRMemtab)
|
||||
; MRLoad421 (=> MRMemtab)
|
||||
; MRLoad44 (=> MRMemtab)
|
||||
; MRLoad8 (=> MRMemtab)
|
||||
; MRStore1 (=> MRMemtab)
|
||||
; MRStore11 (=> MRMemtab)
|
||||
; MRStore12 (=> MRMemtab)
|
||||
; MRStore121 (=> MRMemtab)
|
||||
; MRStore122 (=> MRMemtab)
|
||||
; MRStore1221 (=> MRMemtab)
|
||||
; MRStore124 (=> MRMemtab)
|
||||
; MRStore1241 (=> MRMemtab)
|
||||
; MRStore14 (=> MRMemtab)
|
||||
; MRStore141 (=> MRMemtab)
|
||||
; MRStore142 (=> MRMemtab)
|
||||
; MRStore1421 (=> MRMemtab)
|
||||
; MRStore2 (=> MRMemtab)
|
||||
; MRStore21 (=> MRMemtab)
|
||||
; MRStore221 (=> MRMemtab)
|
||||
; MRStore24 (=> MRMemtab)
|
||||
; MRStore241 (=> MRMemtab)
|
||||
; MRStore242 (=> MRMemtab)
|
||||
; MRStore4 (=> MRMemtab)
|
||||
; MRStore41 (=> MRMemtab)
|
||||
; MRStore42 (=> MRMemtab)
|
||||
; MRStore421 (=> MRMemtab)
|
||||
; MRStore44 (=> MRMemtab)
|
||||
; MRStore8 (=> MRMemtab)
|
||||
|
||||
; Each routine accepts:
|
||||
; r17 = pretend inst with accessLen (range 1-8) in bits 27-30 (will be decremented)
|
||||
|
|
|
@ -1,4 +1,74 @@
|
|||
; AUTO-GENERATED SYMBOL LIST
|
||||
; IMPORTS:
|
||||
; MROptabCode
|
||||
; MRPriCrash
|
||||
; MRPriDCBZ
|
||||
; MRPriLSCBX
|
||||
; MRPriLSWI
|
||||
; MRPriLSWX
|
||||
; MRPriPlainLoad
|
||||
; MRPriPlainStore
|
||||
; MRPriSTFDUx
|
||||
; MRPriSTFDx
|
||||
; MRPriSTFSUx
|
||||
; MRPriSTFSx
|
||||
; MRPriSTHBRX
|
||||
; MRPriSTSWI
|
||||
; MRPriSTSWX
|
||||
; MRPriSTWBRX
|
||||
; MRPriUpdLoad
|
||||
; MRPriUpdStore
|
||||
; MRSecDCBZ
|
||||
; MRSecDone
|
||||
; MRSecException
|
||||
; MRSecException2
|
||||
; MRSecLFDu
|
||||
; MRSecLFSu
|
||||
; MRSecLHBRX
|
||||
; MRSecLMW
|
||||
; MRSecLSCBX
|
||||
; MRSecLSWix
|
||||
; MRSecLWARX
|
||||
; MRSecLWBRX
|
||||
; MRSecLoad
|
||||
; MRSecLoadExt
|
||||
; MRSecRedoNoTrace
|
||||
; MRSecSTMW
|
||||
; MRSecSTWCX
|
||||
; MRSecStrStore
|
||||
; MRRestab
|
||||
; MRResBlank
|
||||
; MRResDCBZ
|
||||
; MRResLBZux
|
||||
; MRResLDARX
|
||||
; MRResLDux
|
||||
; MRResLFDux
|
||||
; MRResLFSux
|
||||
; MRResLHAux
|
||||
; MRResLHBRX
|
||||
; MRResLHZux
|
||||
; MRResLMW
|
||||
; MRResLSCBX
|
||||
; MRResLSWix
|
||||
; MRResLWARX
|
||||
; MRResLWAux
|
||||
; MRResLWBRX
|
||||
; MRResLWZux
|
||||
; MRResRedoNoTrace
|
||||
; MRResST1ux
|
||||
; MRResST2ux
|
||||
; MRResST4ux
|
||||
; MRResST8ux
|
||||
; MRResSTDCX
|
||||
; MRResSTMW
|
||||
; MRResSTSWix
|
||||
; MRResSTWCX
|
||||
; MRResX1012
|
||||
; MRResX884
|
||||
; MRRestab
|
||||
; EXPORTS:
|
||||
; MROptabD (=> NKHotInts)
|
||||
; MROptabX (=> NKHotInts)
|
||||
|
||||
########################################################################
|
||||
|
||||
|
@ -7,8 +77,8 @@
|
|||
_L set 1
|
||||
_S set 0
|
||||
DC.W (&myAccLen << 11) | (&myLoadStore << 10) | (((&resLabel - MRResTab) >> 1) << 4) | &myFlags
|
||||
DC.B (&primLabel - MRBase) >> 2
|
||||
DC.B (&secLabel - MRBase) >> 2
|
||||
DC.B (&primLabel-MRBase) >> 2
|
||||
DC.B (&secLabel-MRBase) >> 2
|
||||
ENDM
|
||||
|
||||
; LEGEND .... access size (r17 bits 27-30) and 0=Store/1=Load (r17 bit 31)
|
||||
|
|
|
@ -1,31 +1,82 @@
|
|||
; AUTO-GENERATED SYMBOL LIST
|
||||
; IMPORTS:
|
||||
; MRMemtab
|
||||
; MRMemtab
|
||||
; NKExceptions
|
||||
; MRException
|
||||
; NKFloatingPt
|
||||
; LFDTable
|
||||
; STFDTable
|
||||
; NKSystemCrash
|
||||
; SystemCrash
|
||||
; EXPORTS:
|
||||
; MRDoSecondary (=> MRMemtabCode, NKExceptions)
|
||||
; MRDoneTableSTFD (=> NKFloatingPt)
|
||||
; MRLoad2 (=> MRMemtab, MRMemtabCode)
|
||||
; MRLoad22 (=> MRMemtab, MRMemtabCode)
|
||||
; MRPriCrash (=> MROptab)
|
||||
; MRPriDCBZ (=> MROptab)
|
||||
; MRPriLSCBX (=> MROptab)
|
||||
; MRPriLSWI (=> MROptab)
|
||||
; MRPriLSWX (=> MROptab)
|
||||
; MRPriPlainLoad (=> MROptab)
|
||||
; MRPriPlainStore (=> MROptab)
|
||||
; MRPriSTFDUx (=> MROptab)
|
||||
; MRPriSTFDx (=> MROptab)
|
||||
; MRPriSTFSUx (=> MROptab)
|
||||
; MRPriSTFSx (=> MROptab)
|
||||
; MRPriSTHBRX (=> MROptab)
|
||||
; MRPriSTSWI (=> MROptab)
|
||||
; MRPriSTSWX (=> MROptab)
|
||||
; MRPriSTWBRX (=> MROptab)
|
||||
; MRPriUpdLoad (=> MROptab)
|
||||
; MRPriUpdStore (=> MROptab)
|
||||
; MRSecDCBZ (=> MROptab, MRRestab)
|
||||
; MRSecDone (=> MROptab, MRRestab, NKFloatingPt, NKSoftInts)
|
||||
; MRSecException (=> MROptab, MRRestab)
|
||||
; MRSecException2 (=> MROptab, MRRestab)
|
||||
; MRSecLFDu (=> MROptab, MRRestab)
|
||||
; MRSecLFSu (=> MROptab, MRRestab)
|
||||
; MRSecLHBRX (=> MROptab, MRRestab)
|
||||
; MRSecLMW (=> MROptab, MRRestab)
|
||||
; MRSecLSCBX (=> MROptab, MRRestab)
|
||||
; MRSecLSWix (=> MROptab, MRRestab)
|
||||
; MRSecLWARX (=> MROptab, MRRestab)
|
||||
; MRSecLWBRX (=> MROptab, MRRestab)
|
||||
; MRSecLoad (=> MROptab, MRRestab)
|
||||
; MRSecLoadExt (=> MROptab, MRRestab)
|
||||
; MRSecRedoNoTrace (=> MROptab, MRRestab)
|
||||
; MRSecSTMW (=> MROptab, MRRestab)
|
||||
; MRSecSTWCX (=> MROptab, MRRestab)
|
||||
; MRSecStrStore (=> MROptab, MRRestab)
|
||||
; MRStore22 (=> MRMemtab, MRMemtabCode)
|
||||
|
||||
########################################################################
|
||||
|
||||
MRPriCrash ; C00
|
||||
MRPriCrash
|
||||
bl SystemCrash
|
||||
MRSecException ; C04
|
||||
MRSecException
|
||||
b MRSecException2
|
||||
|
||||
########################################################################
|
||||
|
||||
MRPriSTFSx ; C08
|
||||
MRPriSTFSx
|
||||
rlwinm r17, r17, 0,16,10
|
||||
|
||||
MRPriSTFSUx ; C0C
|
||||
MRPriSTFSUx
|
||||
crclr cr7_so
|
||||
b MRDoTableSTFD
|
||||
|
||||
MRPriSTFDx ; C14
|
||||
MRPriSTFDx
|
||||
rlwinm r17, r17, 0,16,10
|
||||
|
||||
MRPriSTFDUx ; C18
|
||||
MRPriSTFDUx
|
||||
crset cr7_so
|
||||
|
||||
MRDoTableSTFD ; C1C
|
||||
MRDoTableSTFD
|
||||
; This table is of the form:
|
||||
; stfd <reg>, KDP.FloatScratch(r1)
|
||||
; b
|
||||
; b MRDoneTableSTFD
|
||||
|
||||
clrrwi r19, r25, 10
|
||||
rlwimi r19, r17, 14,24,28
|
||||
|
@ -35,7 +86,7 @@ MRDoTableSTFD ; C1C
|
|||
mtmsr r14
|
||||
blr
|
||||
|
||||
MRDoneTableSTFD ; c38
|
||||
MRDoneTableSTFD
|
||||
ori r11, r11, 0x2000
|
||||
lwz r20, KDP.FloatScratch(r1)
|
||||
lwz r21, KDP.FloatScratch+4(r1)
|
||||
|
@ -58,12 +109,12 @@ MRDoneTableSTFD ; c38
|
|||
|
||||
########################################################################
|
||||
|
||||
MRPriSTWBRX ; C84
|
||||
MRPriSTWBRX
|
||||
rlwinm r28, r17, 13,25,29
|
||||
lwbrx r21, r1, r28
|
||||
b MRPriPlainLoad
|
||||
|
||||
MRPriSTHBRX ; C90
|
||||
MRPriSTHBRX
|
||||
rlwinm r28, r17, 13,25,29
|
||||
addi r21, r1, 2
|
||||
lhbrx r21, r21, r28
|
||||
|
@ -71,25 +122,25 @@ MRPriSTHBRX ; C90
|
|||
|
||||
########################################################################
|
||||
|
||||
MRPriUpdStore ; CA0
|
||||
MRPriUpdStore
|
||||
rlwinm r28, r17, 13,25,29
|
||||
lwzx r21, r1, r28
|
||||
b MRPriUpdLoad
|
||||
|
||||
MRPriPlainStore ; CAC
|
||||
MRPriPlainStore
|
||||
rlwinm r28, r17, 13,25,29
|
||||
lwzx r21, r1, r28
|
||||
|
||||
MRPriPlainLoad ; CB4
|
||||
MRPriPlainLoad
|
||||
rlwinm r17, r17, 0,16,10
|
||||
|
||||
MRPriUpdLoad ; CB8
|
||||
MRPriUpdLoad
|
||||
extrwi. r22, r17, 4,27
|
||||
add r19, r18, r22
|
||||
|
||||
########################################################################
|
||||
|
||||
MRPriDone ; CC0
|
||||
MRPriDone
|
||||
clrrwi r25, r25, 10
|
||||
insrwi r25, r19, 3,28
|
||||
insrwi r25, r17, 4,24
|
||||
|
@ -119,7 +170,7 @@ MRLoad2
|
|||
lhz r23, -2(r19)
|
||||
insrwi r21, r23, 16,16
|
||||
|
||||
MRDoSecondary ; D18
|
||||
MRDoSecondary
|
||||
sync
|
||||
rlwinm. r28, r17, 18,25,29
|
||||
mtlr r25
|
||||
|
@ -133,10 +184,10 @@ MRDoSecondary ; D18
|
|||
|
||||
########################################################################
|
||||
|
||||
MRSecLoadExt ; D40
|
||||
MRSecLoadExt
|
||||
extsh r21, r21
|
||||
|
||||
MRSecLoad ; D44
|
||||
MRSecLoad
|
||||
rlwinm r28, r17, 13,25,29
|
||||
crset mrFlagDidLoad
|
||||
stwx r21, r1, r28
|
||||
|
@ -179,10 +230,10 @@ MRSecDone
|
|||
|
||||
########################################################################
|
||||
|
||||
MRSecLHBRX ; DC0
|
||||
MRSecLHBRX
|
||||
slwi r21, r21, 16
|
||||
|
||||
MRSecLWBRX ; DC4
|
||||
MRSecLWBRX
|
||||
rlwinm r28, r17, 13,25,29
|
||||
crset mrFlagDidLoad
|
||||
stwbrx r21, r1, r28
|
||||
|
@ -190,7 +241,7 @@ MRSecLWBRX ; DC4
|
|||
|
||||
########################################################################
|
||||
|
||||
MRSecLFSu ; DD4
|
||||
MRSecLFSu
|
||||
clrrwi r20, r21, 31
|
||||
xor. r21, r20, r21
|
||||
beq MRSecLFDu
|
||||
|
@ -213,7 +264,7 @@ MRSecLFSu ; DD4
|
|||
slwi r21, r21, 21
|
||||
insrwi r20, r23, 11,1
|
||||
|
||||
MRSecLFDu ; E28
|
||||
MRSecLFDu
|
||||
; This table is of the form:
|
||||
; lfd <reg>, KDP.FloatScratch(r1)
|
||||
; b MRSecDone
|
||||
|
@ -230,7 +281,7 @@ MRSecLFDu ; E28
|
|||
|
||||
########################################################################
|
||||
|
||||
MRSecLMW ; E50
|
||||
MRSecLMW
|
||||
rlwinm. r28, r17, 13,25,29
|
||||
rlwinm r23, r17, 18,25,29
|
||||
cmpw cr7, r28, r23
|
||||
|
@ -238,10 +289,10 @@ MRSecLMW ; E50
|
|||
beq loc_E68
|
||||
beq cr7, loc_E6C
|
||||
|
||||
loc_E68 ; E68
|
||||
loc_E68
|
||||
stwx r21, r1, r28
|
||||
|
||||
loc_E6C ; E6C
|
||||
loc_E6C
|
||||
cmpwi r28, 0x7C
|
||||
li r22, 9
|
||||
insrwi r17, r22, 6,26
|
||||
|
@ -249,7 +300,7 @@ loc_E6C ; E6C
|
|||
bne MRPriDone
|
||||
b MRSecDone
|
||||
|
||||
MRSecSTMW ; E84
|
||||
MRSecSTMW
|
||||
addis r17, r17, 0x20
|
||||
rlwinm. r28, r17, 13,25,29
|
||||
beq MRSecDone
|
||||
|
@ -265,12 +316,12 @@ MRPriDCBZ ; Zero four 8b chunks of the cache blk
|
|||
clrrwi r19, r18, 5 ; r19 = address of chunk to zero
|
||||
b MRComDCBZ ; (for use by this code only)
|
||||
|
||||
MRSecDCBZ ; EAC
|
||||
MRSecDCBZ
|
||||
andi. r22, r19, 0x18
|
||||
clrrwi r19, r19, 3 ; MemAccess code decrements this reg
|
||||
beq MRSecDone ; Zeroed all foun chunks -> done!
|
||||
|
||||
MRComDCBZ ; EB8
|
||||
MRComDCBZ
|
||||
li r22, 0x10 ; Set 8 bytes (? set bit 27)
|
||||
insrwi. r17, r22, 6,26
|
||||
addi r19, r19, 8 ; Align ptr to right hand size of chunk
|
||||
|
@ -280,14 +331,14 @@ MRComDCBZ ; EB8
|
|||
|
||||
########################################################################
|
||||
|
||||
MRSecLWARX ; ED0
|
||||
MRSecLWARX
|
||||
rlwinm r28, r17, 13,25,29
|
||||
crset mrFlagDidLoad
|
||||
stwx r21, r1, r28
|
||||
stwcx. r21, r1, r28
|
||||
b MRSecDone
|
||||
|
||||
MRSecSTWCX ; EE4
|
||||
MRSecSTWCX
|
||||
stwcx. r0, 0, r1
|
||||
mfcr r23
|
||||
rlwinm r23, r23, 0,3,1
|
||||
|
@ -304,31 +355,31 @@ MRSecRedoNoTrace ; Rerun the (cache) instruction, but not its Trace Exception
|
|||
|
||||
########################################################################
|
||||
|
||||
MRSecException2 ; F08
|
||||
MRSecException2
|
||||
li r8, ecDataInvalidAddress
|
||||
b MRException
|
||||
|
||||
########################################################################
|
||||
|
||||
MRPriSTSWI ; F10
|
||||
MRPriSTSWI
|
||||
addi r22, r27, -0x800
|
||||
extrwi r22, r22, 5,16
|
||||
b loc_F2C
|
||||
|
||||
MRPriSTSWX ; F1C
|
||||
MRPriSTSWX
|
||||
mfxer r22
|
||||
andi. r22, r22, 0x7F
|
||||
addi r22, r22, -1
|
||||
beq MRSecDone
|
||||
|
||||
loc_F2C ; F2C
|
||||
loc_F2C
|
||||
rlwimi r17, r22, 4,21,25
|
||||
not r22, r22
|
||||
insrwi r17, r22, 2,4
|
||||
mr r19, r18
|
||||
b loc_1008
|
||||
|
||||
MRSecStrStore ; F40
|
||||
MRSecStrStore
|
||||
andi. r22, r17, 0x7C0
|
||||
addis r28, r17, 0x20
|
||||
rlwimi r17, r28, 0,6,10
|
||||
|
@ -338,21 +389,21 @@ MRSecStrStore ; F40
|
|||
|
||||
########################################################################
|
||||
|
||||
MRPriLSWI ; F58
|
||||
MRPriLSWI
|
||||
addi r22, r27, -0x800
|
||||
extrwi r22, r22, 5,16
|
||||
addis r28, r27, 0x3E0
|
||||
rlwimi r17, r28, 22,16,20
|
||||
b loc_F80
|
||||
|
||||
MRPriLSWX ; F6C
|
||||
MRPriLSWX
|
||||
mfxer r22
|
||||
andi. r22, r22, 0x7F
|
||||
rlwimi r17, r27, 0,16,20
|
||||
addi r22, r22, -1
|
||||
beq MRSecDone
|
||||
|
||||
loc_F80 ; F80
|
||||
loc_F80
|
||||
andis. r23, r17, 0x1F
|
||||
rlwimi r17, r22, 4,21,25
|
||||
not r22, r22
|
||||
|
@ -362,7 +413,7 @@ loc_F80 ; F80
|
|||
rlwimi r17, r17, 5,11,15
|
||||
b loc_1070
|
||||
|
||||
MRSecLSWix ; FA0
|
||||
MRSecLSWix
|
||||
andi. r22, r17, 0x7C0
|
||||
rlwinm r28, r17, 13,25,29
|
||||
bne loc_1044
|
||||
|
@ -372,7 +423,7 @@ MRSecLSWix ; FA0
|
|||
|
||||
########################################################################
|
||||
|
||||
MRPriLSCBX ; FB8
|
||||
MRPriLSCBX
|
||||
mfxer r22
|
||||
andi. r22, r22, 0x7F
|
||||
rlwimi r17, r27, 0,16,20
|
||||
|
@ -388,7 +439,7 @@ MRPriLSCBX ; FB8
|
|||
rlwimi r17, r17, 5,11,15
|
||||
b loc_10C8
|
||||
|
||||
MRSecLSCBX ; FF0
|
||||
MRSecLSCBX
|
||||
rlwinm. r22, r17, 28,25,29
|
||||
rlwinm r28, r17, 13,25,29
|
||||
bne loc_109C
|
||||
|
@ -398,7 +449,7 @@ MRSecLSCBX ; FF0
|
|||
|
||||
########################################################################
|
||||
|
||||
loc_1008 ; 1008
|
||||
loc_1008
|
||||
andi. r23, r17, 0x7C0
|
||||
rlwinm r28, r17, 13,25,29
|
||||
lwzx r21, r1, r28
|
||||
|
@ -415,7 +466,7 @@ loc_1008 ; 1008
|
|||
insrwi. r17, r22, 5,26
|
||||
b MRPriDone
|
||||
|
||||
loc_1044 ; 1044
|
||||
loc_1044
|
||||
rlwinm r23, r17, 18,25,29
|
||||
cmpw cr7, r28, r23
|
||||
rlwinm r23, r17, 23,25,29
|
||||
|
@ -424,13 +475,13 @@ loc_1044 ; 1044
|
|||
beq cr6, loc_1060
|
||||
stwx r21, r1, r28
|
||||
|
||||
loc_1060 ; 1060
|
||||
loc_1060
|
||||
addis r28, r17, 0x20
|
||||
rlwimi r17, r28, 0,6,10
|
||||
addi r17, r17, -0x40
|
||||
beq MRSecDone
|
||||
|
||||
loc_1070 ; 1070
|
||||
loc_1070
|
||||
andi. r23, r17, 0x7C0
|
||||
li r22, 9
|
||||
insrwi r17, r22, 6,26
|
||||
|
@ -443,7 +494,7 @@ loc_1070 ; 1070
|
|||
insrwi. r17, r22, 5,26
|
||||
b MRPriDone
|
||||
|
||||
loc_109C ; 109C
|
||||
loc_109C
|
||||
rlwinm r23, r17, 18,25,29
|
||||
cmpw cr7, r28, r23
|
||||
rlwinm r23, r17, 23,25,29
|
||||
|
@ -452,13 +503,13 @@ loc_109C ; 109C
|
|||
beq cr6, loc_10B8
|
||||
stwx r21, r1, r28
|
||||
|
||||
loc_10B8 ; 10B8
|
||||
loc_10B8
|
||||
addis r28, r17, 0x20
|
||||
rlwimi r17, r28, 0,6,10
|
||||
addi r17, r17, -0x40
|
||||
beq MRSecDone
|
||||
|
||||
loc_10C8 ; 10C8
|
||||
loc_10C8
|
||||
not r22, r22
|
||||
rlwimi r22, r17, 6,30,31
|
||||
li r28, 1
|
||||
|
@ -485,7 +536,7 @@ loc_10C8 ; 10C8
|
|||
beq cr7, loc_112C
|
||||
bne loc_1070
|
||||
|
||||
loc_112C ; 112C
|
||||
loc_112C
|
||||
rlwinm. r28, r17, 0,3,3
|
||||
mfxer r23
|
||||
add r22, r22, r23
|
||||
|
|
|
@ -1,11 +1,61 @@
|
|||
; AUTO-GENERATED SYMBOL LIST
|
||||
; IMPORTS:
|
||||
; MROptabCode
|
||||
; MRSecDCBZ
|
||||
; MRSecDone
|
||||
; MRSecException
|
||||
; MRSecException2
|
||||
; MRSecLFDu
|
||||
; MRSecLFSu
|
||||
; MRSecLHBRX
|
||||
; MRSecLMW
|
||||
; MRSecLSCBX
|
||||
; MRSecLSWix
|
||||
; MRSecLWARX
|
||||
; MRSecLWBRX
|
||||
; MRSecLoad
|
||||
; MRSecLoadExt
|
||||
; MRSecRedoNoTrace
|
||||
; MRSecSTMW
|
||||
; MRSecSTWCX
|
||||
; MRSecStrStore
|
||||
; EXPORTS:
|
||||
; MRResBlank (=> MROptab)
|
||||
; MRResDCBZ (=> MROptab)
|
||||
; MRResLBZux (=> MROptab)
|
||||
; MRResLDARX (=> MROptab)
|
||||
; MRResLDux (=> MROptab)
|
||||
; MRResLFDux (=> MROptab)
|
||||
; MRResLFSux (=> MROptab)
|
||||
; MRResLHAux (=> MROptab)
|
||||
; MRResLHBRX (=> MROptab)
|
||||
; MRResLHZux (=> MROptab)
|
||||
; MRResLMW (=> MROptab)
|
||||
; MRResLSCBX (=> MROptab)
|
||||
; MRResLSWix (=> MROptab)
|
||||
; MRResLWARX (=> MROptab)
|
||||
; MRResLWAux (=> MROptab)
|
||||
; MRResLWBRX (=> MROptab)
|
||||
; MRResLWZux (=> MROptab)
|
||||
; MRResRedoNoTrace (=> MROptab)
|
||||
; MRResST1ux (=> MROptab)
|
||||
; MRResST2ux (=> MROptab)
|
||||
; MRResST4ux (=> MROptab)
|
||||
; MRResST8ux (=> MROptab)
|
||||
; MRResSTDCX (=> MROptab)
|
||||
; MRResSTMW (=> MROptab)
|
||||
; MRResSTSWix (=> MROptab)
|
||||
; MRResSTWCX (=> MROptab)
|
||||
; MRResX1012 (=> MROptab)
|
||||
; MRResX884 (=> MROptab)
|
||||
; MRRestab (=> MROptab, NKExceptions)
|
||||
|
||||
########################################################################
|
||||
|
||||
MACRO
|
||||
restabLine &myFlags, &secLabel
|
||||
DC.B &myFlags
|
||||
DC.B (&secLabel - MRBase) >> 2
|
||||
DC.B (&secLabel-MRBase) >> 2
|
||||
ENDM
|
||||
|
||||
MRRestab
|
||||
|
|
|
@ -1,4 +1,14 @@
|
|||
; AUTO-GENERATED SYMBOL LIST
|
||||
; IMPORTS:
|
||||
; NKExceptions
|
||||
; Exception
|
||||
; LoadInterruptRegisters
|
||||
; ReturnFromInt
|
||||
; NKMemory
|
||||
; PutPTE
|
||||
; EXPORTS:
|
||||
; InstStorageInt (=> NKReset)
|
||||
; MachineCheckInt (=> NKReset)
|
||||
|
||||
########################################################################
|
||||
|
||||
|
|
|
@ -1,4 +1,25 @@
|
|||
; AUTO-GENERATED SYMBOL LIST
|
||||
; IMPORTS:
|
||||
; MRMemtab
|
||||
; MRMemtab
|
||||
; MROptabCode
|
||||
; MRDoSecondary
|
||||
; MRRestab
|
||||
; MRRestab
|
||||
; NKFloatingPt
|
||||
; DisableFPU
|
||||
; EnableFPU
|
||||
; ReloadFPU
|
||||
; NKSystemCrash
|
||||
; SystemCrash
|
||||
; EXPORTS:
|
||||
; Exception (=> MRInterrupts, NKColdInts, NKSoftInts)
|
||||
; KCallReturnFromException (=> NKReset)
|
||||
; KCallReturnFromExceptionFastPath (=> NKSoftInts)
|
||||
; LoadInterruptRegisters (=> NKColdInts, NKSoftInts)
|
||||
; MRException (=> MRInterrupts, MROptabCode)
|
||||
; ReturnFromInt (=> NKColdInts, NKLegacyVM, NKSoftInts)
|
||||
; SwitchContext (=> NKSoftInts)
|
||||
|
||||
########################################################################
|
||||
; MemRetry error
|
||||
|
|
|
@ -1,4 +1,15 @@
|
|||
; AUTO-GENERATED SYMBOL LIST
|
||||
; IMPORTS:
|
||||
; MROptabCode
|
||||
; MRDoneTableSTFD
|
||||
; MRSecDone
|
||||
; EXPORTS:
|
||||
; DisableFPU (=> NKExceptions)
|
||||
; EnableFPU (=> NKExceptions)
|
||||
; FPUnavailInt (=> NKReset)
|
||||
; LFDTable (=> MROptabCode)
|
||||
; ReloadFPU (=> NKExceptions)
|
||||
; STFDTable (=> MROptabCode)
|
||||
|
||||
########################################################################
|
||||
|
||||
|
|
|
@ -1,4 +1,17 @@
|
|||
; AUTO-GENERATED SYMBOL LIST
|
||||
; IMPORTS:
|
||||
; MROptab
|
||||
; MROptabD
|
||||
; MROptabX
|
||||
; EXPORTS:
|
||||
; AlignmentInt (=> NKReset)
|
||||
; DataStorageInt (=> NKReset)
|
||||
; DecrementerIntAlt (=> NKReset)
|
||||
; DecrementerIntSys (=> NKReset)
|
||||
; EmulateDataAccess (=> NKSoftInts)
|
||||
; ExternalInt0 (=> NKReset)
|
||||
; ExternalInt1 (=> NKReset)
|
||||
; ExternalInt2 (=> NKReset)
|
||||
|
||||
########################################################################
|
||||
|
||||
|
@ -297,7 +310,7 @@ EmulateDataAccess
|
|||
;dform
|
||||
rlwimi r25, r27, 7, 26, 29
|
||||
rlwimi r25, r27, 12, 25, 25
|
||||
lwz r26, MROptabD - MRBase(r25) ; table of 4b elements, index = major opcode bits 51234 (this is the last quarter of MROptabX)
|
||||
lwz r26, MROptabD-MRBase(r25) ; table of 4b elements, index = major opcode bits 51234 (this is the last quarter of MROptabX)
|
||||
extsh r23, r27 ; r23 = register offset field, sign-extended
|
||||
rlwimi r25, r26, 26, 22, 29
|
||||
mtlr r25 ; dest = r25 = first of two function ptrs in table entry
|
||||
|
@ -310,7 +323,7 @@ EmulateDataAccess
|
|||
rlwimi r25, r27, 27, 26, 29
|
||||
rlwimi r25, r27, 0, 25, 25
|
||||
rlwimi r25, r27, 6, 23, 24
|
||||
lwz r26, MROptabX - MRBase(r25) ; table of 4b elements, index = minor (x-form) opcode bits 8940123
|
||||
lwz r26, MROptabX-MRBase(r25) ; table of 4b elements, index = minor (x-form) opcode bits 8940123
|
||||
rlwinm r23, r27, 23, 25, 29 ; r23 = 4 * rB
|
||||
rlwimi r25, r26, 26, 22, 29
|
||||
mtlr r25 ; dest = r25 = first of two function ptrs in table entry
|
||||
|
@ -355,7 +368,7 @@ AlignmentInt
|
|||
bne @xform
|
||||
|
||||
;dform
|
||||
lwz r26, MROptabD - MRBase(r25) ; use upper quarter of table
|
||||
lwz r26, MROptabD-MRBase(r25) ; use upper quarter of table
|
||||
mfmsr r14
|
||||
rlwimi r25, r26, 26, 22, 29 ; third byte of lookup value is a /4 code offset in FDP
|
||||
mtlr r25 ; so get ready to go there
|
||||
|
@ -365,7 +378,7 @@ AlignmentInt
|
|||
blr
|
||||
|
||||
@xform
|
||||
lwz r26, MROptabX - MRBase(r25)
|
||||
lwz r26, MROptabX-MRBase(r25)
|
||||
mfmsr r14
|
||||
rlwimi r25, r26, 26, 22, 29
|
||||
mtlr r25
|
||||
|
|
|
@ -2,13 +2,14 @@
|
|||
; IMPORTS:
|
||||
; NKExceptions
|
||||
; ReturnFromInt
|
||||
; NKPaging
|
||||
; NKMemory
|
||||
; PutPTE
|
||||
; NKSystemCrash
|
||||
; SystemCrash
|
||||
; EXPORTS:
|
||||
; EditPTEInHTAB (=> NKMPCalls)
|
||||
; GetPARPageInfo (=> NKMPCalls)
|
||||
; VMSecondLastExportedFunc (=> NKMPCalls)
|
||||
; kcVMDispatch (=> NKInit)
|
||||
; KCallVMDispatch (=> NKReset)
|
||||
|
||||
; This file is a horrible mess. It needs a do-over.
|
||||
|
||||
########################################################################
|
||||
|
||||
|
|
|
@ -1,10 +1,18 @@
|
|||
; AUTO-GENERATED SYMBOL LIST
|
||||
; IMPORTS:
|
||||
; NKSystemCrash
|
||||
; SystemCrash
|
||||
; EXPORTS:
|
||||
; FlushTLB (=> NKReset)
|
||||
; GetPhysical (=> MRInterrupts, NKSoftInts)
|
||||
; PutPTE (=> MRInterrupts, NKColdInts, NKLegacyVM, NKReset)
|
||||
; SetMap (=> NKReset)
|
||||
|
||||
########################################################################
|
||||
########################################################################
|
||||
|
||||
PutPTE ; EA r27 // PTE r30/r31, EQ=Success, GT=Invalid, LT=Fault
|
||||
lwz r29, KDP.CurMap.SegMapPtr(r1) ; late addition: r29 used to be an argument
|
||||
lwz r29, KDP.CurMap.SegMapPtr(r1)
|
||||
rlwinm r28, r27, 7, 0x0000000F << 3 ; convert segment of passed ptr to offset into SegMap
|
||||
lwzx r29, r29, r28 ; r29 = ptr to start of segment in PageMap
|
||||
rlwinm r28, r27, 20, 0x0000FFFF ; r27 = page index within SegMap
|
||||
|
|
|
@ -1,4 +1,39 @@
|
|||
; AUTO-GENERATED SYMBOL LIST
|
||||
; IMPORTS:
|
||||
; MRInterrupts
|
||||
; MRDataStorageInt
|
||||
; MRMachineCheckInt
|
||||
; NKColdInts
|
||||
; InstStorageInt
|
||||
; MachineCheckInt
|
||||
; NKExceptions
|
||||
; KCallReturnFromException
|
||||
; NKFloatingPt
|
||||
; FPUnavailInt
|
||||
; NKHotInts
|
||||
; AlignmentInt
|
||||
; DataStorageInt
|
||||
; DecrementerIntAlt
|
||||
; DecrementerIntSys
|
||||
; ExternalInt0
|
||||
; ExternalInt1
|
||||
; ExternalInt2
|
||||
; NKLegacyVM
|
||||
; KCallVMDispatch
|
||||
; NKMemory
|
||||
; FlushTLB
|
||||
; PutPTE
|
||||
; SetMap
|
||||
; NKSoftInts
|
||||
; KCallPrioritizeInterrupts
|
||||
; KCallResetSystem
|
||||
; KCallRunAlternateContext
|
||||
; KCallSystemCrash
|
||||
; ProgramInt
|
||||
; SyscallInt
|
||||
; TraceInt
|
||||
; NKSystemCrash
|
||||
; SystemCrash
|
||||
|
||||
########################################################################
|
||||
|
||||
|
|
|
@ -1,4 +1,27 @@
|
|||
; AUTO-GENERATED SYMBOL LIST
|
||||
; IMPORTS:
|
||||
; MROptabCode
|
||||
; MRSecDone
|
||||
; NKExceptions
|
||||
; Exception
|
||||
; KCallReturnFromExceptionFastPath
|
||||
; LoadInterruptRegisters
|
||||
; ReturnFromInt
|
||||
; SwitchContext
|
||||
; NKHotInts
|
||||
; EmulateDataAccess
|
||||
; NKMemory
|
||||
; GetPhysical
|
||||
; NKSystemCrash
|
||||
; SystemCrash
|
||||
; EXPORTS:
|
||||
; KCallPrioritizeInterrupts (=> NKReset)
|
||||
; KCallResetSystem (=> NKReset)
|
||||
; KCallRunAlternateContext (=> NKReset)
|
||||
; KCallSystemCrash (=> NKReset)
|
||||
; ProgramInt (=> NKReset)
|
||||
; SyscallInt (=> NKReset)
|
||||
; TraceInt (=> NKReset)
|
||||
|
||||
########################################################################
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
; AUTO-GENERATED SYMBOL LIST
|
||||
; EXPORTS:
|
||||
; SystemCrash (=> MRInterrupts, MROptabCode, NKExceptions, NKLegacyVM, NKMemory, NKReset, NKSoftInts)
|
||||
|
||||
########################################################################
|
||||
|
||||
|
|
|
@ -11,12 +11,12 @@ CodeBase
|
|||
|
||||
_align 10
|
||||
MRBase
|
||||
include 'MROptabCode.s' ; c00:1154
|
||||
include 'MRMemtabCode.s' ; 1154:13f4
|
||||
include 'MRInterrupts.s' ; 13f4:14f4
|
||||
include 'MROptab.s' ; 14f4:16f4
|
||||
include 'MRMemtab.s' ; 16f4:17f4
|
||||
include 'MRRestab.s' ; 17f4:1874
|
||||
include 'MROptabCode.s'
|
||||
include 'MRMemtabCode.s'
|
||||
include 'MRInterrupts.s'
|
||||
include 'MROptab.s'
|
||||
include 'MRMemtab.s'
|
||||
include 'MRRestab.s'
|
||||
|
||||
include 'NKColdInts.s'
|
||||
include 'NKMemory.s'
|
||||
|
|
Loading…
Reference in New Issue
Block a user