📄 ksshx.h
字号:
; Copyright (c) 1999-2000 Microsoft Corporation. All rights reserved. .include "kxshx.h"; API call defines: cloned from syscall.hFIRST_METHOD: .equ h'FFFFFE01SYSCALL_RETURN: .equ FIRST_METHOD-2METHOD_MASK: .equ h'00FFHANDLE_MASK: .equ h'003FHANDLE_SHIFT: .equ 8NUM_SYS_HANDLES: .equ 32SYS_HANDLE_BASE: .equ 64SH_WIN32: .equ 0SH_CURTHREAD: .equ 1SH_CURPROC: .equ 2; a few Win32 error codes:ERROR_INVALID_FUNCTION: .equ 1ERROR_INVALID_HANDLE: .equ 6ERROR_INVALID_ADDRESS: .equ 487 .aif SH_CPU eq h'40; SH4 MMU and exception registersSH3CTL_BASE: .equ h'ff000000MMUPTEH: .equ h'00 ; MMU Page Table Entry HighMMUPTEL: .equ h'04 ; MMU Page Table Entry LowMMUPTEA: .equ h'34 ; MMU Page Table Entry LowMMUTTB: .equ h'08 ; MMU Translation Table BaseMMUTEA: .equ h'0c ; MMU Translation Effective AddressMMUCR: .equ h'10 ; MMU control registerCCR: .equ h'1C ; Cache Control registerTRPA: .equ h'20 ; TRAPA codeEXPEVT: .equ h'24 ; general exception event codeINTEVT: .equ h'28 ; interrupt exception event code .aendi .aif (SH_CPU/16) eq 3; SH3 MMU and exception registersSH3CTL_BASE: .equ h'ffffffd0TRPA: .equ h'00 ; TRAPA codeEXPEVT: .equ h'04 ; general exception event codeINTEVT: .equ h'08 ; interrupt exception event codeMMUCR: .equ h'10 ; MMU control registerUBCASA: .equ h'14 ; Breakpoint ASID AUBCASB: .equ h'18 ; Breakpoint ASID BCCR: .equ h'1C ; Cache Control registerMMUPTEH: .equ h'20 ; MMU Page Table Entry HighMMUPTEL: .equ h'24 ; MMU Page Table Entry LowMMUTTB: .equ h'28 ; MMU Translation Table BaseMMUTEA: .equ h'2c ; MMU Translation Effective Address; SH3 User Breakpoint Unit registersUBC_BASE: .equ h'ffffff90UBCBARA: .equ h'20 ; address A (32 bit)UBCBAMRA: .equ h'24 ; address mask A (8 bit)UBCBBRA: .equ h'28 ; bus cycle A (16 bit); ASID registers in SH3 MMU setUBCBARB: .equ h'10 ; address B (32 bit)UBCBAMRB: .equ h'14 ; address mask B (8 bit)UBCBBRB: .equ h'18 ; bus cycle B (16 bit); ASID registers in SH3 MMU setUBCBDRB: .equ h'00 ; data register B (32 bit)UBCBDMRB: .equ h'04 ; data mask B (32 bit)UBCBRCR: .equ h'08 ; break control register (16 bit) .aendi;*;* KDataStruct offsets;*USER_KPAGE: .equ h'5800USER_KPAGE_SHR10: .equ h'16INTERLOCKED_START: .equ USER_KPAGE+h'380INTERLOCKED_END: .equ USER_KPAGE+h'400lpvTls: .equ h'000 ; Current thread local storage pointerahSys: .equ h'004 ; system handle arrayhCurThread: .equ h'008 ; SH_CURTHREAD==1hCurProc: .equ h'00c ; SH_CURPROC==2bResched: .equ h'084 ; reschedule flagcNest: .equ h'085 ; kernel exception nestingbPowerOff: .equ h'086bProfileOn: .equ h'087cMsec: .equ h'088 ; # of milliseconds since bootcDMsec: .equ h'08c ; # of mSec since last TimerCallBackpCurPrc: .equ h'090 ; pointer to current PROCESS structurepCurThd: .equ h'094 ; pointer to current THREAD structuredwKCRes: .equ h'098hBase: .equ h'09c ; handle table base addressaSections: .equ h'0a0 ; section table for virutal memoryalpeIntrEvents: .equ h'1a0alpvIntrData: .equ h'220bIntrIndexLow: .equ h'2a4bIntrIndexHigh: .equ h'2a8bIntrNumber: .equ h'2acg_CurFPUOwner: .equ h'2cc ; SH4 onlyg_CurDSPOwner: .equ h'2cc ; SH3(DSP) onlyPendEvents: .equ h'340;*;* Process structure fields;*PrcID: .equ 0PrcHandle: .equ h'08PrcVMBase: .equ h'0c;*;* IPC Call Stack structure fields;*CstkNext: .equ 0CstkRa: .equ 4CstkPrcLast: .equ 8CstkAkyLast: .equ 12CstkSizeof: .equ 16;* Thread structure fieldsThwInfo: .equ h'0ThProc: .equ h'0cThAKey: .equ h'14ThPcstkTop: .equ h'18ThStkBase: .equ h'1cThTlsPtr: .equ h'24ThHandle: .equ h'3cTHREAD_CONTEXT_OFFSET: .equ h'5cCtxContextFlags: .equ h'00CtxPR: .equ h'04CtxMACH: .equ h'08CtxMACL: .equ h'0cCtxGBR: .equ h'10CtxR0: .equ h'14CtxR1: .equ h'18CtxR2: .equ h'1cCtxR3: .equ h'20CtxR4: .equ h'24CtxR5: .equ h'28CtxR6: .equ h'2cCtxR7: .equ h'30CtxR8: .equ h'34CtxR9: .equ h'38CtxR10: .equ h'3cCtxR11: .equ h'40CtxR12: .equ h'44CtxR13: .equ h'48CtxR14: .equ h'4cCtxR15: .equ h'50CtxFir: .equ h'54CtxPsr: .equ h'58CONTEXT_FULL: .equ h'43 .aif SH_CPU eq h'30CtxOldStuff: .equ h'5cCtxDbgRegs: .equ h'64CtxDsr: .equ h'80CtxMod: .equ h'84CtxRS: .equ h'88CtxRE: .equ h'8cCtxDSPRegs: .equ h'90CtxDSPSizeof: .equ h'34CtxSizeof: .equ h'B4 .aendi .aif SH_CPU eq h'40CtxFpscr: .equ h'5cCtxFpul: .equ h'60CtxFRegs: .equ h'64CtxXFRegs: .equ h'A4CtxFPSizeof: .equ h'88CtxSizeof: .equ h'E4 .aendi; Dispatcher Context Structure Offset DefinitionsDcControlPc: .equ h'0DcFunctionEntry: .equ h'4DcEstablisherFrame: .equ h'8DcContextRecord: .equ h'c; Exception Record Offset, Flag, and Enumerated Type DefinitionsEXCEPTION_NONCONTINUABLE: .equ h'1EXCEPTION_UNWINDING: .equ h'2EXCEPTION_EXIT_UNWIND: .equ h'4EXCEPTION_STACK_INVALID: .equ h'8EXCEPTION_NESTED_CALL: .equ h'10EXCEPTION_TARGET_UNWIND: .equ h'20EXCEPTION_COLLIDED_UNWIND: .equ h'40EXCEPTION_UNWIND: .equ h'66ExceptionContinueExecution: .equ h'0ExceptionContinueSearch: .equ h'1ExceptionNestedException: .equ h'2ExceptionCollidedUnwind: .equ h'3ErExceptionCode: .equ h'0ErExceptionFlags: .equ h'4ErExceptionRecord: .equ h'8ErExceptionAddress: .equ h'cErNumberParameters: .equ h'10ErExceptionInformation: .equ h'14ExceptionRecordLength: .equ h'50; Offsets of the components of a virtual address .aif SH_CPU eq h'40VA_PAGE: .equ 12 ;; 10 - 1K pages 11 - pseudo 2k pages or 12 - 4K pages .aelseVA_PAGE: .equ 10 ;; 10 - 1K pages 11 - pseudo 2k pages or 12 - 4K pages .aendiVA_BLOCK: .equ 16VA_SECTION: .equ 25 .aif VA_PAGE eq 10 ; 1k pagesPAGE_MASK: .equ h'03FPAGE_MASK4: .equ h'0FC .aendi .aif VA_PAGE eq 12 ; 4k pagesPAGE_MASK: .equ h'00FPAGE_MASK4: .equ h'03C .aendiBLOCK_MASK: .equ h'1ffSECTION_MASK: .equ h'03F; MemBlock structure layoutmb_lock: .equ 0mb_uses: .equ 4mb_ixBase: .equ 6mb_hPf: .equ 8mb_pages: .equ 12VERIFY_WRITE_FLAG: .equ 1VERIFY_KERNEL_OK: .equ 2;* NK interrupt definesSYSINTR_NOP: .equ 0SYSINTR_RESCHED: .equ 1SYSINTR_BREAK: .equ 2SYSINTR_DEVICES: .equ 8SYSINTR_MAX_DEVICES: .equ 32SYSINTR_FIRMWARE: .equ SYSINTR_DEVICES+16SYSINTR_MAXIMUM: .equ SYSINTR_DEVICES+SYSINTR_MAX_DEVICES
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -