00001
#include "kxmips.h"
00002
00003
00004
00005
00006
00007 #define WrExecutive 0x0
00008
00009
00010
00011
00012
00013 #define APC_INDEX_MISMATCH 0x1
00014 #define DATA_BUS_ERROR 0x2e
00015 #define DATA_COHERENCY_EXCEPTION 0x55
00016 #define HAL1_INITIALIZATION_FAILED 0x61
00017 #define INSTRUCTION_BUS_ERROR 0x2f
00018 #define INSTRUCTION_COHERENCY_EXCEPTION 0x56
00019 #define INTERRUPT_EXCEPTION_NOT_HANDLED 0x3d
00020 #define INTERRUPT_UNWIND_ATTEMPTED 0x3c
00021 #define INVALID_AFFINITY_SET 0x3
00022 #define INVALID_DATA_ACCESS_TRAP 0x4
00023 #define IRQL_GT_ZERO_AT_SYSTEM_SERVICE 0x4a
00024 #define IRQL_NOT_LESS_OR_EQUAL 0xa
00025 #define KMODE_EXCEPTION_NOT_HANDLED 0x1e
00026 #define NMI_HARDWARE_FAILURE 0x80
00027 #define NO_USER_MODE_CONTEXT 0xe
00028 #define PAGE_FAULT_WITH_INTERRUPTS_OFF 0x49
00029 #define PANIC_STACK_SWITCH 0x2b
00030 #define SPIN_LOCK_INIT_FAILURE 0x81
00031 #define SYSTEM_EXIT_OWNED_MUTEX 0x39
00032 #define SYSTEM_SERVICE_EXCEPTION 0x3b
00033 #define SYSTEM_UNWIND_PREVIOUS_USER 0x3a
00034 #define TRAP_CAUSE_UNKNOWN 0x12
00035 #define UNEXPECTED_KERNEL_MODE_TRAP 0x7f
00036
00037
00038
00039
00040
00041 #define DBG_STATUS_CONTROL_C 0x1
00042
00043
00044
00045
00046
00047 #define EXCEPTION_NONCONTINUABLE 0x1
00048 #define EXCEPTION_UNWINDING 0x2
00049 #define EXCEPTION_EXIT_UNWIND 0x4
00050 #define EXCEPTION_STACK_INVALID 0x8
00051 #define EXCEPTION_NESTED_CALL 0x10
00052 #define EXCEPTION_TARGET_UNWIND 0x20
00053 #define EXCEPTION_COLLIDED_UNWIND 0x40
00054 #define EXCEPTION_UNWIND 0x66
00055 #define EXCEPTION_EXECUTE_HANDLER 0x1
00056 #define EXCEPTION_CONTINUE_SEARCH 0x0
00057 #define EXCEPTION_CONTINUE_EXECUTION 0xffffffff
00058
00059 #define ExceptionContinueExecution 0x0
00060 #define ExceptionContinueSearch 0x1
00061 #define ExceptionNestedException 0x2
00062 #define ExceptionCollidedUnwind 0x3
00063
00064 #define ErExceptionCode 0x0
00065 #define ErExceptionFlags 0x4
00066 #define ErExceptionRecord 0x8
00067 #define ErExceptionAddress 0xc
00068 #define ErNumberParameters 0x10
00069 #define ErExceptionInformation 0x14
00070 #define ExceptionRecordLength 0x50
00071
00072
00073
00074
00075
00076 #define FmCount 0x0
00077 #define FmOwner 0x4
00078 #define FmContention 0x8
00079 #define FmEvent 0xc
00080 #define FmOldIrql 0x1c
00081
00082
00083
00084
00085
00086 #define APC_LEVEL 0x1
00087 #define DISPATCH_LEVEL 0x2
00088 #define IPI_LEVEL 0x7
00089 #define POWER_LEVEL 0x7
00090 #define PROFILE_LEVEL 0x8
00091 #define HIGH_LEVEL 0x8
00092 #define SYNCH_LEVEL 0x6
00093
00094
00095
00096
00097
00098 #define LiLowPart 0x0
00099 #define LiHighPart 0x4
00100
00101
00102
00103
00104
00105 #define LsFlink 0x0
00106 #define LsBlink 0x4
00107
00108
00109
00110
00111
00112 #define StrLength 0x0
00113 #define StrMaximumLength 0x2
00114 #define StrBuffer 0x4
00115
00116
00117
00118
00119
00120 #define StLowTime 0x0
00121 #define StHigh1Time 0x4
00122 #define StHigh2Time 0x8
00123
00124
00125
00126
00127
00128 #define TmLowTime 0x0
00129 #define TmHighTime 0x4
00130
00131
00132
00133
00134
00135 #define DpType 0x0
00136 #define DpNumber 0x2
00137 #define DpImportance 0x3
00138 #define DpDpcListEntry 0x4
00139 #define DpDeferredRoutine 0xc
00140 #define DpDeferredContext 0x10
00141 #define DpSystemArgument1 0x14
00142 #define DpSystemArgument2 0x18
00143 #define DpLock 0x1c
00144 #define DpcObjectLength 0x20
00145
00146
00147
00148
00149
00150 #define InLevelSensitive 0x0
00151 #define InLatched 0x1
00152
00153 #define InType 0x0
00154 #define InSize 0x2
00155 #define InInterruptListEntry 0x4
00156 #define InServiceRoutine 0xc
00157 #define InServiceContext 0x10
00158 #define InSpinLock 0x14
00159 #define InActualLock 0x1c
00160 #define InDispatchAddress 0x20
00161 #define InVector 0x24
00162 #define InIrql 0x28
00163 #define InSynchronizeIrql 0x29
00164 #define InFloatingSave 0x2a
00165 #define InConnected 0x2b
00166 #define InNumber 0x2c
00167 #define InMode 0x30
00168 #define InShareVector 0x2d
00169 #define InDispatchCode 0x3c
00170 #define InterruptObjectLength 0x4c
00171
00172
00173
00174
00175
00176 #define PRCB_MINOR_VERSION 0x1
00177 #define PRCB_MAJOR_VERSION 0x1
00178
00179 #define PbMinorVersion 0x0
00180 #define PbMajorVersion 0x2
00181 #define PbCurrentThread 0x4
00182 #define PbNextThread 0x8
00183 #define PbIdleThread 0xc
00184 #define PbNumber 0x10
00185 #define PbSetMember 0x14
00186 #define PbRestartBlock 0x18
00187 #define PbSystemReserved 0x20
00188 #define PbHalReserved 0x60
00189
00190
00191
00192
00193
00194 #define PCR_MINOR_VERSION 0x1
00195 #define PCR_MAJOR_VERSION 0x1
00196
00197 #define PcMinorVersion 0x0
00198 #define PcMajorVersion 0x2
00199 #define PcInterruptRoutine 0x4
00200 #define PcXcodeDispatch 0x404
00201 #define PcFirstLevelDcacheSize 0x484
00202 #define PcFirstLevelDcacheFillSize 0x488
00203 #define PcFirstLevelIcacheSize 0x48c
00204 #define PcFirstLevelIcacheFillSize 0x490
00205 #define PcSecondLevelDcacheSize 0x494
00206 #define PcSecondLevelDcacheFillSize 0x498
00207 #define PcSecondLevelIcacheSize 0x49c
00208 #define PcSecondLevelIcacheFillSize 0x4a0
00209 #define PcPrcb 0x4a4
00210 #define PcTeb 0x4a8
00211 #define PcTlsArray 0x4ac
00212 #define PcDcacheFillSize 0x4b0
00213 #define PcIcacheAlignment 0x4b4
00214 #define PcIcacheFillSize 0x4b8
00215 #define PcProcessorId 0x4bc
00216 #define PcProfileInterval 0x4c0
00217 #define PcProfileCount 0x4c4
00218 #define PcStallExecutionCount 0x4c8
00219 #define PcStallScaleFactor 0x4cc
00220 #define PcNumber 0x4d0
00221 #define PcDataBusError 0x4d4
00222 #define PcInstructionBusError 0x4d8
00223 #define PcCachePolicy 0x4dc
00224 #define PcIrqlMask 0x4e0
00225 #define PcIrqlTable 0x500
00226 #define PcCurrentIrql 0x509
00227 #define PcSetMember 0x50c
00228 #define PcCurrentThread 0x514
00229 #define PcAlignedCachePolicy 0x518
00230 #define PcNotMember 0x51c
00231 #define PcSystemReserved 0x520
00232 #define PcDcacheAlignment 0x55c
00233 #define PcHalReserved 0x560
00234
00235
00236
00237
00238
00239 #define CONTEXT_FULL 0x10017
00240 #define CONTEXT_CONTROL 0x10001
00241 #define CONTEXT_FLOATING_POINT 0x10002
00242 #define CONTEXT_INTEGER 0x10004
00243 #define CONTEXT_EXTENDED_FLOAT 0x1000a
00244 #define CONTEXT_EXTENDED_INTEGER 0x10014
00245
00246
00247
00248
00249
00250 #define CxFltF0 0x10
00251 #define CxFltF1 0x14
00252 #define CxFltF2 0x18
00253 #define CxFltF3 0x1c
00254 #define CxFltF4 0x20
00255 #define CxFltF5 0x24
00256 #define CxFltF6 0x28
00257 #define CxFltF7 0x2c
00258 #define CxFltF8 0x30
00259 #define CxFltF9 0x34
00260 #define CxFltF10 0x38
00261 #define CxFltF11 0x3c
00262 #define CxFltF12 0x40
00263 #define CxFltF13 0x44
00264 #define CxFltF14 0x48
00265 #define CxFltF15 0x4c
00266 #define CxFltF16 0x50
00267 #define CxFltF17 0x54
00268 #define CxFltF18 0x58
00269 #define CxFltF19 0x5c
00270 #define CxFltF20 0x60
00271 #define CxFltF21 0x64
00272 #define CxFltF22 0x68
00273 #define CxFltF23 0x6c
00274 #define CxFltF24 0x70
00275 #define CxFltF25 0x74
00276 #define CxFltF26 0x78
00277 #define CxFltF27 0x7c
00278 #define CxFltF28 0x80
00279 #define CxFltF29 0x84
00280 #define CxFltF30 0x88
00281 #define CxFltF31 0x8c
00282 #define CxIntZero 0x90
00283 #define CxIntAt 0x94
00284 #define CxIntV0 0x98
00285 #define CxIntV1 0x9c
00286 #define CxIntA0 0xa0
00287 #define CxIntA1 0xa4
00288 #define CxIntA2 0xa8
00289 #define CxIntA3 0xac
00290 #define CxIntT0 0xb0
00291 #define CxIntT1 0xb4
00292 #define CxIntT2 0xb8
00293 #define CxIntT3 0xbc
00294 #define CxIntT4 0xc0
00295 #define CxIntT5 0xc4
00296 #define CxIntT6 0xc8
00297 #define CxIntT7 0xcc
00298 #define CxIntS0 0xd0
00299 #define CxIntS1 0xd4
00300 #define CxIntS2 0xd8
00301 #define CxIntS3 0xdc
00302 #define CxIntS4 0xe0
00303 #define CxIntS5 0xe4
00304 #define CxIntS6 0xe8
00305 #define CxIntS7 0xec
00306 #define CxIntT8 0xf0
00307 #define CxIntT9 0xf4
00308 #define CxIntK0 0xf8
00309 #define CxIntK1 0xfc
00310 #define CxIntGp 0x100
00311 #define CxIntSp 0x104
00312 #define CxIntS8 0x108
00313 #define CxIntRa 0x10c
00314 #define CxIntLo 0x110
00315 #define CxIntHi 0x114
00316 #define CxFsr 0x118
00317 #define CxFir 0x11c
00318 #define CxPsr 0x120
00319 #define CxContextFlags 0x124
00320
00321
00322
00323
00324
00325 #define CxXFltF0 0x10
00326 #define CxXFltF1 0x18
00327 #define CxXFltF2 0x20
00328 #define CxXFltF3 0x28
00329 #define CxXFltF4 0x30
00330 #define CxXFltF5 0x38
00331 #define CxXFltF6 0x40
00332 #define CxXFltF7 0x48
00333 #define CxXFltF8 0x50
00334 #define CxXFltF9 0x58
00335 #define CxXFltF10 0x60
00336 #define CxXFltF11 0x68
00337 #define CxXFltF12 0x70
00338 #define CxXFltF13 0x78
00339 #define CxXFltF14 0x80
00340 #define CxXFltF15 0x88
00341 #define CxXFltF16 0x90
00342 #define CxXFltF17 0x98
00343 #define CxXFltF18 0xa0
00344 #define CxXFltF19 0xa8
00345 #define CxXFltF20 0xb0
00346 #define CxXFltF21 0xb8
00347 #define CxXFltF22 0xc0
00348 #define CxXFltF23 0xc8
00349 #define CxXFltF24 0xd0
00350 #define CxXFltF25 0xd8
00351 #define CxXFltF26 0xe0
00352 #define CxXFltF27 0xe8
00353 #define CxXFltF28 0xf0
00354 #define CxXFltF29 0xf8
00355 #define CxXFltF30 0x100
00356 #define CxXFltF31 0x108
00357 #define CxXFsr 0x118
00358 #define CxXFir 0x11c
00359 #define CxXPsr 0x120
00360 #define CxXContextFlags 0x124
00361 #define CxXIntZero 0x128
00362 #define CxXIntAt 0x130
00363 #define CxXIntV0 0x138
00364 #define CxXIntV1 0x140
00365 #define CxXIntA0 0x148
00366 #define CxXIntA1 0x150
00367 #define CxXIntA2 0x158
00368 #define CxXIntA3 0x160
00369 #define CxXIntT0 0x168
00370 #define CxXIntT1 0x170
00371 #define CxXIntT2 0x178
00372 #define CxXIntT3 0x180
00373 #define CxXIntT4 0x188
00374 #define CxXIntT5 0x190
00375 #define CxXIntT6 0x198
00376 #define CxXIntT7 0x1a0
00377 #define CxXIntS0 0x1a8
00378 #define CxXIntS1 0x1b0
00379 #define CxXIntS2 0x1b8
00380 #define CxXIntS3 0x1c0
00381 #define CxXIntS4 0x1c8
00382 #define CxXIntS5 0x1d0
00383 #define CxXIntS6 0x1d8
00384 #define CxXIntS7 0x1e0
00385 #define CxXIntT8 0x1e8
00386 #define CxXIntT9 0x1f0
00387 #define CxXIntK0 0x1f8
00388 #define CxXIntK1 0x200
00389 #define CxXIntGp 0x208
00390 #define CxXIntSp 0x210
00391 #define CxXIntS8 0x218
00392 #define CxXIntRa 0x220
00393 #define CxXIntLo 0x228
00394 #define CxXIntHi 0x230
00395 #define ContextFrameLength 0x238
00396
00397
00398
00399
00400
00401 #define ExArgs 0x0
00402
00403
00404
00405
00406
00407 #define ExFltF20 0x20
00408 #define ExFltF21 0x24
00409 #define ExFltF22 0x28
00410 #define ExFltF23 0x2c
00411 #define ExFltF24 0x30
00412 #define ExFltF25 0x34
00413 #define ExFltF26 0x38
00414 #define ExFltF27 0x3c
00415 #define ExFltF28 0x40
00416 #define ExFltF29 0x44
00417 #define ExFltF30 0x48
00418 #define ExFltF31 0x4c
00419
00420
00421
00422
00423
00424 #define ExXFltF20 0x20
00425 #define ExXFltF22 0x28
00426 #define ExXFltF24 0x30
00427 #define ExXFltF26 0x38
00428 #define ExXFltF28 0x40
00429 #define ExXFltF30 0x48
00430
00431
00432
00433
00434
00435 #define ExIntS0 0x50
00436 #define ExIntS1 0x54
00437 #define ExIntS2 0x58
00438 #define ExIntS3 0x5c
00439 #define ExIntS4 0x60
00440 #define ExIntS5 0x64
00441 #define ExIntS6 0x68
00442 #define ExIntS7 0x6c
00443 #define ExIntS8 0x70
00444 #define ExSwapReturn 0x74
00445 #define ExIntRa 0x78
00446 #define ExceptionFrameLength 0x80
00447
00448
00449
00450
00451
00452 #define TrArgs 0x0
00453
00454
00455
00456
00457
00458 #define TrFltF0 0x10
00459 #define TrFltF1 0x14
00460 #define TrFltF2 0x18
00461 #define TrFltF3 0x1c
00462 #define TrFltF4 0x20
00463 #define TrFltF5 0x24
00464 #define TrFltF6 0x28
00465 #define TrFltF7 0x2c
00466 #define TrFltF8 0x30
00467 #define TrFltF9 0x34
00468 #define TrFltF10 0x38
00469 #define TrFltF11 0x3c
00470 #define TrFltF12 0x40
00471 #define TrFltF13 0x44
00472 #define TrFltF14 0x48
00473 #define TrFltF15 0x4c
00474 #define TrFltF16 0x50
00475 #define TrFltF17 0x54
00476 #define TrFltF18 0x58
00477 #define TrFltF19 0x5c
00478
00479
00480
00481
00482
00483 #define TrXFltF0 0x10
00484 #define TrXFltF1 0x18
00485 #define TrXFltF2 0x20
00486 #define TrXFltF3 0x28
00487 #define TrXFltF4 0x30
00488 #define TrXFltF5 0x38
00489 #define TrXFltF6 0x40
00490 #define TrXFltF7 0x48
00491 #define TrXFltF8 0x50
00492 #define TrXFltF9 0x58
00493 #define TrXFltF10 0x60
00494 #define TrXFltF11 0x68
00495 #define TrXFltF12 0x70
00496 #define TrXFltF13 0x78
00497 #define TrXFltF14 0x80
00498 #define TrXFltF15 0x88
00499 #define TrXFltF16 0x90
00500 #define TrXFltF17 0x98
00501 #define TrXFltF18 0xa0
00502 #define TrXFltF19 0xa8
00503 #define TrXFltF21 0xb0
00504 #define TrXFltF23 0xb8
00505 #define TrXFltF25 0xc0
00506 #define TrXFltF27 0xc8
00507 #define TrXFltF29 0xd0
00508 #define TrXFltF31 0xd8
00509
00510
00511
00512
00513
00514 #define TrXIntZero 0xe0
00515 #define TrXIntAt 0xe8
00516 #define TrXIntV0 0xf0
00517 #define TrXIntV1 0xf8
00518 #define TrXIntA0 0x100
00519 #define TrXIntA1 0x108
00520 #define TrXIntA2 0x110
00521 #define TrXIntA3 0x118
00522 #define TrXIntT0 0x120
00523 #define TrXIntT1 0x128
00524 #define TrXIntT2 0x130
00525 #define TrXIntT3 0x138
00526 #define TrXIntT4 0x140
00527 #define TrXIntT5 0x148
00528 #define TrXIntT6 0x150
00529 #define TrXIntT7 0x158
00530 #define TrXIntS0 0x160
00531 #define TrXIntS1 0x168
00532 #define TrXIntS2 0x170
00533 #define TrXIntS3 0x178
00534 #define TrXIntS4 0x180
00535 #define TrXIntS5 0x188
00536 #define TrXIntS6 0x190
00537 #define TrXIntS7 0x198
00538 #define TrXIntT8 0x1a0
00539 #define TrXIntT9 0x1a8
00540 #define TrXIntGp 0x1c0
00541 #define TrXIntSp 0x1c8
00542 #define TrXIntS8 0x1d0
00543 #define TrXIntRa 0x1d8
00544 #define TrXIntLo 0x1e0
00545 #define TrXIntHi 0x1e8
00546
00547 #define TrFir 0x1f4
00548 #define TrFsr 0x1f0
00549 #define TrPsr 0x1f8
00550 #define TrExceptionRecord 0x1fc
00551 #define TrOldIrql 0x24c
00552 #define TrPreviousMode 0x24d
00553 #define TrSavedFlag 0x24e
00554 #define TrOnInterruptStack 0x250
00555 #define TrTrapFrame 0x250
00556 #define TrapFrameLength 0x258
00557 #define TrapFrameArguments 0x40
00558
00559
00560
00561
00562
00563 #define LpbLoadOrderListHead 0x0
00564 #define LpbMemoryDescriptorListHead 0x8
00565 #define LpbKernelStack 0x18
00566 #define LpbPrcb 0x1c
00567 #define LpbProcess 0x20
00568 #define LpbThread 0x24
00569 #define LpbInterruptStack 0x5c
00570 #define LpbFirstLevelDcacheSize 0x60
00571 #define LpbFirstLevelDcacheFillSize 0x64
00572 #define LpbFirstLevelIcacheSize 0x68
00573 #define LpbFirstLevelIcacheFillSize 0x6c
00574 #define LpbGpBase 0x70
00575 #define LpbPanicStack 0x74
00576 #define LpbPcrPage 0x78
00577 #define LpbPdrPage 0x7c
00578 #define LpbSecondLevelDcacheSize 0x80
00579 #define LpbSecondLevelDcacheFillSize 0x84
00580 #define LpbSecondLevelIcacheSize 0x88
00581 #define LpbSecondLevelIcacheFillSize 0x8c
00582 #define LpbPcrPage2 0x90
00583 #define LpbRegistryLength 0x28
00584 #define LpbRegistryBase 0x2c
00585
00586
00587
00588
00589
00590 #define KUSEG_BASE 0x0
00591 #define KSEG0_BASE 0x80000000
00592 #define KSEG1_BASE 0xa0000000
00593 #define KSEG2_BASE 0xc0000000
00594
00595
00596
00597
00598
00599 #define PAGE_SIZE 0x1000
00600 #define PAGE_SHIFT 0xc
00601 #define PDI_SHIFT 0x16
00602 #define PTI_SHIFT 0xc
00603
00604
00605
00606
00607
00608 #define APC_INTERRUPT 0x100
00609 #define DISPATCH_INTERRUPT 0x200
00610
00611
00612
00613
00614
00615 #define USER_BREAKPOINT 0x0
00616 #define KERNEL_BREAKPOINT 0x1
00617 #define BREAKIN_BREAKPOINT 0x2
00618
00619
00620
00621
00622
00623 #define Executive 0x0
00624 #define KernelMode 0x0
00625 #define FALSE 0x0
00626 #define TRUE 0x1
00627 #define UNCACHED_POLICY 0x2
00628 #define KiPcr 0xfffff000
00629 #define KiPcr2 0xffffe000