squash tiny bugs

Now round-trips from 0x29C0, except for ALIGN padding
This commit is contained in:
Elliot Nunn 2018-07-06 22:05:02 +08:00
parent be94869b92
commit e5bc679367
2 changed files with 7 additions and 7 deletions

View File

@ -232,13 +232,13 @@ CopyPageMap
lwz r8, NKConfigurationInfo.PageMapIRPOffset(rCI) lwz r8, NKConfigurationInfo.PageMapIRPOffset(rCI)
add r8, rPgMap, r8 add r8, rPgMap, r8
lwz r23, PageMapEntry.PBaseAndFlags(r8) lwz r23, PageMapEntry.PBaseAndFlags(r8)
rlwimi r23, r19, 0, 0xFFFFF000 rlwimi r23, r1, 0, 0xFFFFF000
stw r23, PageMapEntry.PBaseAndFlags(r8) stw r23, PageMapEntry.PBaseAndFlags(r8)
lwz r8, NKConfigurationInfo.PageMapKDPOffset(rCI) lwz r8, NKConfigurationInfo.PageMapKDPOffset(rCI)
add r8, rPgMap, r8 add r8, rPgMap, r8
lwz r23, PageMapEntry.PBaseAndFlags(r8) lwz r23, PageMapEntry.PBaseAndFlags(r8)
rlwimi r23, r19, 0, 0xFFFFF000 rlwimi r23, r1, 0, 0xFFFFF000
stw r23, PageMapEntry.PBaseAndFlags(r8) stw r23, PageMapEntry.PBaseAndFlags(r8)
lwz r19, KDP.PA_EmulatorData(r1) lwz r19, KDP.PA_EmulatorData(r1)
@ -338,7 +338,7 @@ CreatePageList
lwz r20, KDP.KernelMemoryEnd(r1) lwz r20, KDP.KernelMemoryEnd(r1)
subi r29, r21, 4 ; ptr to last added entry subi r29, r21, 4 ; ptr to last added entry
addi r19, r30, IRP.SystemInfo + NKSystemInfo.Bank0Start - 8 addi r19, r1, KDP.SystemInfo + NKSystemInfo.Bank0Start - 8
lwz r23, KDP.PageAttributeInit(r1) ; default WIMG/PP settings in PTEs lwz r23, KDP.PageAttributeInit(r1) ; default WIMG/PP settings in PTEs
@ -394,9 +394,9 @@ CreatePARInPageMap
addi r19, r22, 4 addi r19, r22, 4
slwi r19, r19, 10 slwi r19, r19, 10
ori r30, r30, 0xffff ori r30, r30, 0xffff
stw r19, IRP.SystemInfo + NKSystemInfo.UsableMemorySize(r8) stw r19, KDP.SystemInfo + NKSystemInfo.UsableMemorySize(r1)
srwi r22, r22, 2 srwi r22, r22, 2
stw r19, IRP.SystemInfo + NKSystemInfo.LogicalMemorySize(r8) stw r19, KDP.SystemInfo + NKSystemInfo.LogicalMemorySize(r1)
; convert r19 to pages, and save in some places ; convert r19 to pages, and save in some places
srwi r19, r19, 12 srwi r19, r19, 12

View File

@ -38,7 +38,7 @@ KCallRunAlternateContext
clrlwi r7, r7, 8 clrlwi r7, r7, 8
stw r8, ContextBlock.LA_EmulatorKernelTrapTable(r9) stw r8, ContextBlock.LA_EmulatorKernelTrapTable(r9)
stw r9, EWA.PA_ContextBlock(r1) stw r9, KDP.PA_ContextBlock(r1)
b IntReturnToOtherBlueContext b IntReturnToOtherBlueContext
@ -298,7 +298,7 @@ IntProgram ; (also called when the Alternate Context gets an External Int => Exc
xoris r8, r8, 0xfff xoris r8, r8, 0xfff
cmplwi cr7, r8, 16 ; only traps 0-15 are allowed cmplwi cr7, r8, 16 ; only traps 0-15 are allowed
slwi r8, r8, 2 ; (for "success" case below) slwi r8, r8, 2 ; (for "success" case below)
bge @illegalTrap bge cr7, @illegalTrap
; SUCCESSFUL TRAP from outside emulator KCall table ; SUCCESSFUL TRAP from outside emulator KCall table
; => Service call then return to following instruction ; => Service call then return to following instruction