common sense reform

to v1

for v2

for v1

large vm diff getting shape correct

Local_Panic -> VMPanic

kdp revert to v1

teensy fix

byte-perfect
This commit is contained in:
Elliot Nunn 2018-07-03 00:12:09 +08:00
parent 1a967c5163
commit 4bd3ed39c4
9 changed files with 139 additions and 915 deletions

View File

@ -587,10 +587,7 @@ OldKDP ds.l 1 ; 5a0 ; gotten from the old SPRG0
OtherFreeThing ds.l 1 ; 5a4
TopOfFreePages ds.l 1 ; 5a8 ; gotten from the old SPRG0
ds.l 1 ; 5ac
PA_InterruptHandler ds.l 1 ; 5b0
LA_NCB ds.l 1 ; 5b4 ; most recent physical address found
HiLevelPerfMonitorBits ds.l 1 ; 5b8
ds.l 1 ; 5bc
FlatPageListSegPtrs ds.l 4 ; 5b0:5c0
PerfMonitorBits ds.l 1 ; 5c0
ds.l 1 ; 5c4
SegMap32SupInitPtr ds.l 1 ; 5c8
@ -615,9 +612,9 @@ PA_NanoKernelCode ds.l 1 ; 64c ; Calculated by NanoKernel itself.
PA_FDP ds.l 1 ; 650 ; See notes in NanoKernel. Very interesting.
LA_ECB ds.l 1 ; 654 ; Logical ptr into EDP.
PA_ECB ds.l 1 ; 658 ; gets called "system context"
PA_ECB_Old ds.l 1 ; 65c ; copied from NKv<=01.01 to EWA.PA_ContextBlock.
ds.l 1 ; 660
ds.l 1 ; 664
PA_ContextBlock ds.l 1 ; 65c ; moved to EWA (per-CPU) in NKv2
Flags ds.l 1 ; 660 ; moved to EWA (per-CPU) in NKv2
Enables ds.l 1 ; 664 ; moved to EWA (per-CPU) in NKv2
ds.l 1 ; 668
PA_PageMapEnd ds.l 1 ; 66c ; Set at the same time as PA_PageMapStart below...
TestIntMaskInit ds.l 1 ; 670 ; These are all copied from ConfigInfo...
@ -644,7 +641,7 @@ CpuSpecificByte2 ds.b 1 ; 6b9 ; probably not flags (set in same way)
ds.b 1 ; 6ba
ds.b 1 ; 6bb
ds.l 1 ; 6bc
FlatPageListSegPtrs ds.l 16 ; 6c0
ds.l 16 ; 6c0 ; was FlatPageListSegPtrs
StartOfPanicArea ; PROTECTED BY THUD LOCK
ThudSavedR0 ds.l 1 ; 700
@ -753,9 +750,11 @@ ZeroWord ds.l 1 ; 910 ; Only NewWorld and Unknown PIHes touch this
ds.l 1 ; 914
ds.l 1 ; 918
ds.l 1 ; 91c
PageMap ds.b 1184; 920:dc0
NanoKernelInfo ds.b 352 ; dc0:f20 ; see NKNanoKernelInfo in PPCInfoRecordsPriv
ProcessorInfo ds.b 160 ; f20:fc0
ds.b 0x3a0 ; 920:cc0
SystemInfo ds.b 192 ; cc0:d80
DiagnosticInfo ds.b 256 ; d80:e80
NanoKernelInfo ds.b 256 ; e80:f80 ; see NKNanoKernelInfo in PPCInfoRecordsPriv
ProcessorInfo ds.b 64 ; f80:fc0
InfoRecord ds.b 64 ; fc0:1000 ; was main copy in NKv1, now vestigial?
endr

View File

@ -31,18 +31,13 @@
; NKThud
; panic
; EXPORTS:
; CreateArea (=> NKVMCalls)
; CreateAreasFromPageMap (=> NKInit)
; DeletePTE (=> NKVMCalls)
; FindAreaAbove (=> NKIntHandlers, NKPaging, NKTasks, NKVMCalls)
; FindAreaAbove (=> NKIntHandlers, NKPaging, NKTasks)
; FreePageListPush (=> NKInit)
; GetPTEFromPLE (=> NKVMCalls)
; InitFreePageList (=> NKInit)
; InvalPTE (=> NKVMCalls)
; MPCall_95_0x254 (=> NKPaging)
; NKCreateAddressSpaceSub (=> NKInit)
; SetPTE (=> NKVMCalls)
; SpaceGetPagePLE (=> NKIntHandlers, NKPaging, NKVMCalls)
; SpaceGetPagePLE (=> NKIntHandlers, NKPaging)
; SpaceL2PIgnoringBATs (=> NKMPCalls)
; SpaceL2PUsingBATs (=> NKIntHandlers, NKMPCalls)

View File

@ -11,7 +11,7 @@
; printd (=> NKInit, NKMPCalls, NKPoolAllocator, NKTimers)
; printh (=> NKBuiltinInit, NKMPCalls, NKReplacementInit, NKScheduler, NKThud, NKTimers)
; prints (=> NKMPCalls, NKThud)
; printw (=> NKAddressSpaces, NKExceptions, NKInit, NKIntHandlers, NKIntMisc, NKMPCalls, NKPaging, NKPoolAllocator, NKReplacementInit, NKScheduler, NKThud, NKTimers, NKVMCalls)
; printw (=> NKAddressSpaces, NKExceptions, NKInit, NKIntHandlers, NKIntMisc, NKMPCalls, NKPaging, NKPoolAllocator, NKReplacementInit, NKScheduler, NKThud, NKTimers)

View File

@ -62,7 +62,6 @@
; NKVMCalls
; EditPTEInHTAB
; GetPARPageInfo
; RemovePageFromTLB
; VMSecondLastExportedFunc
; EXPORTS:
; BlockMPCall (=> NKExceptions, NKSync)

View File

@ -46,7 +46,7 @@
; ExtendPool (=> NKMPCalls)
; InitPool (=> NKInit)
; PoolAlloc (=> NKExceptions, NKSync, NKTasks)
; PoolAllocClear (=> NKAddressSpaces, NKIndex, NKInit, NKMPCalls, NKSync, NKTasks, NKTimers, NKVMCalls)
; PoolAllocClear (=> NKAddressSpaces, NKIndex, NKInit, NKMPCalls, NKSync, NKTasks, NKTimers)
; PoolFree (=> NKAddressSpaces, NKMPCalls, NKSync, NKTasks, NKTimers)

View File

@ -171,16 +171,16 @@ InitReplacement
bgt @replaces_later_than_0101
;
lwz r12, KDP.PA_ECB_Old(r1)
; Move some per-cpu values from KDP to EWA
lwz r12, KDP.PA_ContextBlock(r1)
stw r12, EWA.PA_ContextBlock(r1)
lwz r12, 0x660(r1)
oris r12, r12, 0x20
lwz r12, KDP.Flags(r1)
_bset r12, r12, EWA.kFlag9
stw r12, EWA.Flags(r1)
lwz r12, 0x0664(r1)
stw r12, EWA.Enables(r1) ; boy, better figure out what this is
lwz r12, KDP.Enables(r1)
stw r12, EWA.Enables(r1)
b @endif
@replaces_later_than_0101

View File

@ -31,10 +31,10 @@
; SchInit (=> NKInit)
; SchRdyTaskLater (=> NKMPCalls, NKPrimaryIntHandlers, NKSync)
; SchRdyTaskNow (=> NKExceptions, NKInit, NKMPCalls, NKSync, NKTasks, NKTimers)
; SchRestoreStartingAtR14 (=> NKExceptions, NKInit, NKIntHandlers, NKIntMisc, NKMPCalls, NKPrimaryIntHandlers, NKVMCalls)
; SchRestoreStartingAtR14 (=> NKExceptions, NKInit, NKIntHandlers, NKIntMisc, NKMPCalls, NKPrimaryIntHandlers)
; SchRestoreStartingAtR20 (=> NKPrimaryIntHandlers)
; SchReturn (=> NKExceptions)
; SchSaveStartingAtR14 (=> NKExceptions, NKIntHandlers, NKIntMisc, NKMPCalls, NKVMCalls)
; SchSaveStartingAtR14 (=> NKExceptions, NKIntHandlers, NKIntMisc, NKMPCalls)
; SchSaveStartingAtR20 (=> NKPrimaryIntHandlers)
; SchSwitchSpace (=> NKInit, NKIntMisc, NKSleep)
; SchTaskUnrdy (=> NKExceptions, NKMPCalls, NKPrimaryIntHandlers, NKSync, NKTasks, NKTimers)

View File

@ -16,7 +16,7 @@
; PagingFunc1
; PagingL2PWithoutBATs
; EXPORTS:
; panic (=> NKAddressSpaces, NKIndex, NKInit, NKMPCalls, NKPaging, NKPoolAllocator, NKPowerCalls, NKRTASCalls, NKScheduler, NKSleep, NKSync, NKTasks, NKTimers, NKTranslation, NKVMCalls)
; panic (=> NKAddressSpaces, NKIndex, NKInit, NKMPCalls, NKPaging, NKPoolAllocator, NKPowerCalls, NKRTASCalls, NKScheduler, NKSleep, NKSync, NKTasks, NKTimers, NKTranslation)
; panic_non_interactive (=> NKTimers)

File diff suppressed because it is too large Load Diff