2017-11-19 04:11:07 +00:00
|
|
|
;_______________________________________________________________________
|
|
|
|
; Equates for the whole NanoKernel
|
|
|
|
;_______________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
kNanoKernelVersion equ $0228
|
|
|
|
|
|
|
|
|
|
|
|
; PowerPC Machine Status Register (MSR) bits
|
|
|
|
; (borrowing the _bitEqu macro from NKInfoRecordsPriv.s)
|
|
|
|
|
|
|
|
_bitEqu MSR_POW, 13
|
|
|
|
_bitEqu MSR_ILE, 15
|
|
|
|
_bitEqu MSR_EE, 16
|
|
|
|
_bitEqu MSR_PR, 17
|
|
|
|
_bitEqu MSR_FP, 18
|
|
|
|
_bitEqu MSR_ME, 19
|
|
|
|
_bitEqu MSR_FE0, 20
|
|
|
|
_bitEqu MSR_SE, 21
|
|
|
|
_bitEqu MSR_BE, 22
|
|
|
|
_bitEqu MSR_FE1, 23
|
|
|
|
_bitEqu MSR_IP, 25
|
|
|
|
_bitEqu MSR_IR, 26
|
|
|
|
_bitEqu MSR_DR, 27
|
|
|
|
_bitEqu MSR_RI, 30
|
|
|
|
_bitEqu MSR_LE, 31
|
|
|
|
|
|
|
|
|
|
|
|
; Special Purpose Registers (SPRs) not understood by MPW
|
|
|
|
|
|
|
|
l2cr equ 1017
|
|
|
|
|
|
|
|
|
|
|
|
; Alignment for NanoKernel interrupt routines (mostly Interrupts.s)
|
|
|
|
|
|
|
|
kIntAlign equ 5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Junk
|
|
|
|
|
|
|
|
|
|
|
|
; IRP is 10 pages below KDP (measured start to start)
|
2018-03-23 09:22:56 +00:00
|
|
|
; This should be neatened up to describe the kernel global area
|
2017-11-19 04:11:07 +00:00
|
|
|
IRPOffset equ (-10) * 4096
|
|
|
|
kKDPfromIRP equ 10 * 4096
|
2018-03-23 09:22:56 +00:00
|
|
|
kPoolOffsetFromGlobals equ (-7) * 4096 ; goes all the way up to 24 bytes short of PSA
|
2017-11-19 04:11:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-17 16:57:01 +00:00
|
|
|
; Branch instruction BO fields
|
|
|
|
; (disregarding static prediction :)
|
|
|
|
BO_IF equ 12
|
|
|
|
BO_IF_NOT equ 4
|
2017-11-19 04:11:07 +00:00
|
|
|
|
2018-02-17 16:57:01 +00:00
|
|
|
Z equ 0x80000000
|
2018-03-05 11:00:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
; SIGP (SIGnal Plugin) selectors used by the kernel:
|
|
|
|
kStartProcessor equ 1 ; r4 = target CPU idx, r5 = cpu's entry point, r6 = entry point's r3 (CPU struct ptr)
|
|
|
|
kStopProcessor equ 3 ; r4 = target CPU idx
|
|
|
|
kResetProcessor equ 4 ; r4 = target CPU idx
|
|
|
|
kAlert equ 5 ; r4 = target CPU idx? ; my name, has something to do with timers
|
|
|
|
kSIGP6 equ 6 ; r4 = target CPU idx?
|
|
|
|
kSIGP7 equ 7 ; r4 = target CPU idx?
|
|
|
|
kSynchClock equ 8 ; r4 = target CPU idx,
|
|
|
|
kSIGP9 equ 9 ; no args?
|
2018-03-09 11:46:39 +00:00
|
|
|
kGetProcessorTemp equ 12 ; r4 = selector (ignored on Core99), r5 = cpu ID ; my name
|
2018-03-05 11:00:11 +00:00
|
|
|
kSIGP17 equ 17 ; r4 = target CPU idx?
|
2018-07-04 11:26:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
; Exception cause equates
|
|
|
|
; System = FFFFFFFF, Alt = 7DF2F700 (ecInstPageFault and ecDataPageFault disabled), same +/- VM
|
|
|
|
ecNoException equ 0 ; Exception
|
|
|
|
ecSystemCall equ 1 ; ?
|
|
|
|
ecTrapInstr equ 2 ; Exception
|
|
|
|
ecFloatException equ 3 ; Exception
|
|
|
|
ecInvalidInstr equ 4 ; Exception
|
|
|
|
ecPrivilegedInstr equ 5 ; ?
|
|
|
|
ecMachineCheck equ 7 ; Exception
|
|
|
|
ecInstTrace equ 8 ; Exception
|
|
|
|
ecInstInvalidAddress equ 10 ; Exception
|
|
|
|
ecInstHardwareFault equ 11 ; Exception
|
|
|
|
ecInstPageFault equ 12 ; Exception
|
|
|
|
ecInstSupAccessViolation equ 14 ; Exception
|
|
|
|
|
|
|
|
; Usually from MemRetryDSI (also IntAlignment and IntMachineCheck)
|
|
|
|
ecDataInvalidAddress equ 18 ; ExceptionMemRetried
|
|
|
|
ecDataHardwareFault equ 19 ; ExceptionMemRetried
|
|
|
|
ecDataPageFault equ 20 ; ExceptionMemRetried
|
|
|
|
ecDataWriteViolation equ 21 ; ExceptionMemRetried
|
|
|
|
ecDataSupAccessViolation equ 22 ; ExceptionMemRetried
|
|
|
|
ecDataSupWriteViolation equ 23 ; ?
|
|
|
|
ecUnknown24 equ 24 ; ExceptionMemRetried
|