diff --git a/NanoKernel/NKInit.s b/NanoKernel/NKInit.s index c7f141b..a9c12af 100755 --- a/NanoKernel/NKInit.s +++ b/NanoKernel/NKInit.s @@ -93,7 +93,7 @@ InitKernelMemory clrrwi r11, r12, 16 ; Init KDP, 2 pages below HTAB subi r1, r11, 0x2000 - lwz r11, KDP.ThudSavedSDR1(r1) + lwz r11, KDP.CrashSDR1(r1) mtsprg 0, r1 cmpw r12, r11 lis r11, 0x7fff @@ -107,7 +107,7 @@ InitKernelMemory @eraseloop subic. r12, r12, 4 subf r10, r11, r12 - cmplwi cr7, r10, KDP.CrashBtm - KDP.CrashTop - 4 + cmplwi cr7, r10, KDP.CrashBtm - KDP.CrashTop ble cr7, @skipwrite stwx r0, r13, r12 @skipwrite @@ -268,7 +268,6 @@ InitProcessorInfo lwz r11, KDP.NKCodePtr(r1) addi r10, r1, KDP.ProcInfo.Ovr li r9, NKProcessorInfo.OvrEnd - NKProcessorInfo.Ovr - _kaddr r11, r11, ProcessorInfoTable cmpwi r12, 1 ; 601 addi r11, r11, NKProcessorInfo.OvrEnd - NKProcessorInfo.Ovr @@ -401,7 +400,7 @@ InitEmulator cmpwi r7, 1 lis r7, FlagEmu >> 16 ; we will enter System Context (all CPUs) bne @not_601 - ori r7, r7, FlagHasMQ ; but only 601 has MQ register + _bset r7, r7, bitFlagHasMQ ; but only 601 has MQ register @not_601 stw r7, KDP.Flags(r1) @@ -425,7 +424,7 @@ InitEmulator ######################################################################## ResetContextClock - lwz r8, KDP.ProcInfo.DecClockRateHz + lwz r8, KDP.ProcInfo.DecClockRateHz(r1) stw r8, KDP.OtherContextDEC(r1) mtdec r8 diff --git a/NanoKernel/NKIntHandlers.s b/NanoKernel/NKIntHandlers.s index 7d8abbc..d4cfd97 100644 --- a/NanoKernel/NKIntHandlers.s +++ b/NanoKernel/NKIntHandlers.s @@ -60,14 +60,14 @@ IntExternal0 _align 6 IntLookupTable - dc.l 0, 1, 2, 2, 4, 4, 4, 4 - dc.l 3, 3, 3, 3, 4, 4, 4, 4 - dc.l 4, 4, 4, 4, 4, 4, 4, 4 - dc.l 4, 4, 4, 4, 4, 4, 4, 4 - dc.l 7, 7, 7, 7, 7, 7, 7, 7 - dc.l 7, 7, 7, 7, 7, 7, 7, 7 - dc.l 7, 7, 7, 7, 7, 7, 7, 7 - dc.l 7, 7, 7, 7, 7, 7, 7, 7 + dc.b 0, 1, 2, 2, 4, 4, 4, 4 + dc.b 3, 3, 3, 3, 4, 4, 4, 4 + dc.b 4, 4, 4, 4, 4, 4, 4, 4 + dc.b 4, 4, 4, 4, 4, 4, 4, 4 + dc.b 7, 7, 7, 7, 7, 7, 7, 7 + dc.b 7, 7, 7, 7, 7, 7, 7, 7 + dc.b 7, 7, 7, 7, 7, 7, 7, 7 + dc.b 7, 7, 7, 7, 7, 7, 7, 7 _align 6 IntExternal1 diff --git a/NanoKernel/NKStructs.s b/NanoKernel/NKStructs.s index 4269998..6695206 100644 --- a/NanoKernel/NKStructs.s +++ b/NanoKernel/NKStructs.s @@ -325,9 +325,12 @@ CrashF30 ds.d 1 ; 8f0 CrashF31 ds.d 1 ; 8f8 CrashFPSCR ds.l 1 ; 900 CrashKernReturn ds.l 1 ; 904 -CrashUnknown ds.l 1 ; 908 +CrashUnknown1 ds.l 1 ; 908 +CrashUnknown2 ds.l 1 ; 90c CrashBtm +PageMap ds.b 0x1a8 ; 910:ab8 + org 0xCC0 SysInfo ds NKSystemInfo ; cc0:d80 DiagInfo ds NKDiagInfo ; d80:e80