Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

genppc.c File Reference

#include "ki.h"
#include "excpt.h"
#include "ctype.h"
#include "stdio.h"
#include "stdarg.h"
#include "stdlib.h"
#include "nt.h"
#include "ntdef.h"
#include "ntkeapi.h"
#include "ntppc.h"
#include "ntimage.h"
#include "ntseapi.h"
#include "ntobapi.h"
#include "ntlpcapi.h"
#include "ntioapi.h"
#include "ntmmapi.h"
#include "ntldr.h"
#include "ntpsapi.h"
#include "ntexapi.h"
#include "ntnls.h"
#include "ntrtl.h"
#include "nturtl.h"
#include "ntcsrmsg.h"
#include "ntcsrsrv.h"
#include "ntosdef.h"
#include "ntxcapi.h"
#include "ppc.h"
#include "arc.h"
#include "ke.h"
#include "ex.h"
#include "ps.h"
#include "bugcodes.h"
#include "ntstatus.h"
#include "exboosts.h"
#include "ppcdef.h"
#include "setjmp.h"
#include "..\genxx.inc"

Go to the source code of this file.

Defines

#define HEADER_FILE
#define genAlt(Name, Type, Member)   dumpf("#define " #Name " 0x%lx\n", OFFSET(Type, Member))
#define genCom(Comment)
#define genDef(Prefix, Type, Member)   dumpf("#define " #Prefix #Member " 0x%lx\n", OFFSET(Type, Member))
#define genVal(Name, Value)   dumpf("#define " #Name " 0x%lx\n", Value)
#define genSpc()   dumpf("\n");
#define OFFSET(type, field)   ((LONG)(&((type *)0)->field))
#define EnableInc(a)   OutputEnabled |= a;
#define DisableInc(a)   OutputEnabled &= ~a;
#define KSPPC   0x01
#define HALPPC   0x02
#define KERNEL   KSPPC
#define HAL   HALPPC

Functions

VOID dumpf (const char *format,...)
LONG t (IN ULONG z)
VOID main (int argc, argv)

Variables

FILE * KsPpc
FILE * HalPpc
ULONG OutputEnabled


Define Documentation

#define DisableInc  )     OutputEnabled &= ~a;
 

Definition at line 124 of file genppc.c.

#define EnableInc  )     OutputEnabled |= a;
 

Definition at line 118 of file genppc.c.

#define genAlt Name,
Type,
Member   )     dumpf("#define " #Name " 0x%lx\n", OFFSET(Type, Member))
 

Definition at line 87 of file genppc.c.

#define genCom Comment   ) 
 

Value:

dumpf("\n"); \ dumpf("//\n"); \ dumpf("// " Comment "\n"); \ dumpf("//\n"); \ dumpf("\n")

Definition at line 90 of file genppc.c.

#define genDef Prefix,
Type,
Member   )     dumpf("#define " #Prefix #Member " 0x%lx\n", OFFSET(Type, Member))
 

Definition at line 97 of file genppc.c.

 
#define genSpc  )     dumpf("\n");
 

Definition at line 103 of file genppc.c.

#define genVal Name,
Value   )     dumpf("#define " #Name " 0x%lx\n", Value)
 

Definition at line 100 of file genppc.c.

#define HAL   HALPPC
 

Definition at line 132 of file genppc.c.

#define HALPPC   0x02
 

Definition at line 129 of file genppc.c.

Referenced by main().

#define HEADER_FILE
 

Definition at line 26 of file genppc.c.

#define KERNEL   KSPPC
 

Definition at line 131 of file genppc.c.

#define KSPPC   0x01
 

Definition at line 128 of file genppc.c.

Referenced by main().

#define OFFSET type,
field   )     ((LONG)(&((type *)0)->field))
 

Definition at line 109 of file genppc.c.


Function Documentation

VOID dumpf const char *  format,
  ...
 

Referenced by main().

VOID main int  argc,
argv 
 

Definition at line 163 of file genppc.c.

References BASE_PRIORITY_THRESHOLD, BREAKIN_BREAKPOINT, Buffer, ChangeColor, CLOCK_QUANTUM_DECREMENT, CONTEXT_CONTROL, CONTEXT_FLOATING_POINT, CONTEXT_FULL, CONTEXT_INTEGER, ContextFrameLength, DECREMENT_VECTOR, DisableInc, dumpf(), EnableInc, EVENT_PAIR_INCREMENT, ExceptionFrameLength, Executive, exit, EXTERNAL_INTERRUPT_VECTOR, FALSE, genAlt, genCom, genDef, genSpc, genVal, HALPPC, HalPpc, IPI_APC, IPI_DPC, IPI_FREEZE, IPI_PACKET_READY, KeDcacheFlushCount, KeIcacheFlushCount, KERNEL_BREAKPOINT, KernelMode, KiPcr, KiPcr2, KSEG0_BASE, KSPPC, KsPpc, KUSEG_BASE, LpbDcacheMode, LpbFirstLevelDcacheFillSize, LpbFirstLevelDcacheSize, LpbFirstLevelIcacheFillSize, LpbFirstLevelIcacheSize, LpbHashedPageTable, LpbHashedPageTableSize, LpbIcacheMode, LpbInterruptStack, LpbKernelKseg0PagesDescriptor, LpbKseg0Top, LpbMaximumBlockLength, LpbMemoryManagementModel, LpbMinimumBlockLength, LpbNumberCongruenceClasses, LpbPanicStack, LpbPcrPage, LpbPcrPage2, LpbPdrPage, LpbSecondLevelDcacheFillSize, LpbSecondLevelDcacheSize, LpbSecondLevelIcacheFillSize, LpbSecondLevelIcacheSize, MACHINE_CHECK_VECTOR, NULL, PAGE_SHIFT, PAGE_SIZE, PCR_MAJOR_VERSION, PCR_MINOR_VERSION, PDI_SHIFT, perror, PMI_VECTOR, PRCB_MAJOR_VERSION, PRCB_MINOR_VERSION, ProcessorStateLength, PTI_SHIFT, READY_SKIP_QUANTUM, Reserved1, ROUND_TRIP_DECREMENT_COUNT, SetMember, Spare2, StackFrameHeaderLength, THREAD_QUANTUM, TrapFrameLength, TrIar, TRUE, UNCACHED_POLICY, USER_BREAKPOINT, and WAIT_QUANTUM_DECREMENT.

00166 { 00167 00168 char *outName; 00169 LONG EventOffset; 00170 00171 // 00172 // Create file for output. 00173 // 00174 00175 if (argc == 2) { 00176 outName = argv[ 1 ]; 00177 } else { 00178 outName = "\\nt\\public\\sdk\\inc\\ksppc.h"; 00179 } 00180 outName = argc >= 2 ? argv[1] : "\\nt\\public\\sdk\\inc\\ksppc.h"; 00181 KsPpc = fopen( outName, "w" ); 00182 00183 if (KsPpc == NULL) { 00184 fprintf( stderr, "GENPPC: Cannot open %s for writing.\n", outName); 00185 perror("GENPPC"); 00186 exit(1); 00187 } 00188 00189 fprintf( stderr, "GENPPC: Writing %s header file.\n", outName ); 00190 00191 outName = argc >= 3 ? argv[2] : "\\nt\\private\\ntos\\inc\\halppc.h"; 00192 00193 HalPpc = fopen( outName, "w" ); 00194 00195 if (HalPpc == NULL) { 00196 fprintf( stderr, "GENPPC: Cannot open %s for writing.\n", outName); 00197 perror("GENPPC"); 00198 exit(1); 00199 } 00200 00201 fprintf( stderr, "GENPPC: Writing %s header file.\n", outName ); 00202 00203 // 00204 // Include statement for PPC architecture static definitions. 00205 // 00206 00207 EnableInc (KSPPC | HALPPC); 00208 00209 dumpf("#include \"kxppc.h\"\n"); 00210 00211 DisableInc (HALPPC); 00212 00213 // 00214 // Include architecture independent definitions. 00215 // 00216 00217 #include "..\genxx.inc" 00218 00219 // 00220 // Generate architecture dependent definitions. 00221 // 00222 // Processor control register structure definitions. 00223 // 00224 00225 EnableInc (HALPPC); 00226 00227 genCom("Processor Control Registers Structure Offset Definitions"); 00228 00229 genVal(PCR_MINOR_VERSION, PCR_MINOR_VERSION); 00230 genVal(PCR_MAJOR_VERSION, PCR_MAJOR_VERSION); 00231 00232 genSpc(); 00233 00234 genDef(Pc, KPCR, MinorVersion); 00235 genDef(Pc, KPCR, MajorVersion); 00236 genDef(Pc, KPCR, InterruptRoutine); 00237 genDef(Pc, KPCR, PcrPage2); 00238 genDef(Pc, KPCR, Kseg0Top); 00239 genDef(Pc, KPCR, FirstLevelDcacheSize); 00240 genDef(Pc, KPCR, FirstLevelDcacheFillSize); 00241 genDef(Pc, KPCR, FirstLevelIcacheSize); 00242 genDef(Pc, KPCR, FirstLevelIcacheFillSize); 00243 genDef(Pc, KPCR, SecondLevelDcacheSize); 00244 genDef(Pc, KPCR, SecondLevelDcacheFillSize); 00245 genDef(Pc, KPCR, SecondLevelIcacheSize); 00246 genDef(Pc, KPCR, SecondLevelIcacheFillSize); 00247 genDef(Pc, KPCR, Prcb); 00248 genDef(Pc, KPCR, Teb); 00249 genDef(Pc, KPCR, DcacheAlignment); 00250 genDef(Pc, KPCR, DcacheFillSize); 00251 genDef(Pc, KPCR, IcacheAlignment); 00252 genDef(Pc, KPCR, IcacheFillSize); 00253 genDef(Pc, KPCR, ProcessorVersion); 00254 genDef(Pc, KPCR, ProcessorRevision); 00255 genDef(Pc, KPCR, ProfileInterval); 00256 genDef(Pc, KPCR, ProfileCount); 00257 genDef(Pc, KPCR, StallExecutionCount); 00258 genDef(Pc, KPCR, StallScaleFactor); 00259 genDef(Pc, KPCR, CachePolicy); 00260 genDef(Pc, KPCR, IcacheMode); 00261 genDef(Pc, KPCR, DcacheMode); 00262 genDef(Pc, KPCR, IrqlMask); 00263 genDef(Pc, KPCR, IrqlTable); 00264 genDef(Pc, KPCR, CurrentIrql); 00265 genDef(Pc, KPCR, Number); 00266 genDef(Pc, KPCR, SetMember); 00267 genDef(Pc, KPCR, CurrentThread); 00268 genDef(Pc, KPCR, AlignedCachePolicy); 00269 genDef(Pc, KPCR, SoftwareInterrupt); 00270 genDef(Pc, KPCR, ApcInterrupt); 00271 genDef(Pc, KPCR, DispatchInterrupt); 00272 genDef(Pc, KPCR, NotMember); 00273 genDef(Pc, KPCR, SystemReserved); 00274 genDef(Pc, KPCR, HalReserved); 00275 00276 DisableInc (HALPPC); 00277 00278 genDef(Pc, KPCR, FirstLevelActive); 00279 genDef(Pc, KPCR, SystemServiceDispatchStart); 00280 genDef(Pc, KPCR, SystemServiceDispatchEnd); 00281 genDef(Pc, KPCR, InterruptStack); 00282 genDef(Pc, KPCR, QuantumEnd); 00283 genDef(Pc, KPCR, InitialStack); 00284 genDef(Pc, KPCR, PanicStack); 00285 genDef(Pc, KPCR, BadVaddr); 00286 genDef(Pc, KPCR, StackLimit); 00287 genDef(Pc, KPCR, SavedStackLimit); 00288 genDef(Pc, KPCR, SavedV0); 00289 genDef(Pc, KPCR, SavedV1); 00290 genDef(Pc, KPCR, DebugActive); 00291 genDef(Pc, KPCR, GprSave); 00292 genDef(Pc, KPCR, SiR0); 00293 genDef(Pc, KPCR, SiR2); 00294 genDef(Pc, KPCR, SiR3); 00295 genDef(Pc, KPCR, SiR4); 00296 genDef(Pc, KPCR, SiR5); 00297 genDef(Pc, KPCR, PgDirRa); 00298 genDef(Pc, KPCR, OnInterruptStack); 00299 genDef(Pc, KPCR, SavedInitialStack); 00300 00301 genVal(ProcessorControlRegisterLength, ((sizeof(KPCR) + 15) & ~15)); 00302 00303 genSpc(); 00304 00305 genDef(Pc2, KUSER_SHARED_DATA, TickCountLow); 00306 genDef(Pc2, KUSER_SHARED_DATA, TickCountMultiplier); 00307 genDef(Pc2, KUSER_SHARED_DATA, InterruptTime); 00308 genDef(Pc2, KUSER_SHARED_DATA, SystemTime); 00309 genDef(Pc2, KUSER_SHARED_DATA, ProcessorFeatures); 00310 genVal(PfPpcMovemem64BitOk, sizeof(BOOLEAN) * PF_PPC_MOVEMEM_64BIT_OK); 00311 00312 // 00313 // Offsets to elements within the InterruptRoutine table. 00314 // 00315 00316 genSpc(); 00317 00318 genVal(IrPmiVector, sizeof(unsigned) * PMI_VECTOR); 00319 genVal(IrMachineCheckVector, sizeof(unsigned) * MACHINE_CHECK_VECTOR); 00320 genVal(IrDeviceVector, sizeof(unsigned) * EXTERNAL_INTERRUPT_VECTOR); 00321 genVal(IrDecrementVector, sizeof(unsigned) * DECREMENT_VECTOR); 00322 00323 // 00324 // Processor block structure definitions. 00325 // 00326 00327 EnableInc (HALPPC); 00328 00329 genCom("Processor Block Structure Offset Definitions"); 00330 00331 genVal(PRCB_MINOR_VERSION, PRCB_MINOR_VERSION); 00332 genVal(PRCB_MAJOR_VERSION, PRCB_MAJOR_VERSION); 00333 00334 genSpc(); 00335 00336 genDef(Pb, KPRCB, MinorVersion); 00337 genDef(Pb, KPRCB, MajorVersion); 00338 genDef(Pb, KPRCB, CurrentThread); 00339 genDef(Pb, KPRCB, NextThread); 00340 genDef(Pb, KPRCB, IdleThread); 00341 genDef(Pb, KPRCB, Number); 00342 genDef(Pb, KPRCB, SetMember); 00343 genDef(Pb, KPRCB, RestartBlock); 00344 genDef(Pb, KPRCB, PcrPage); 00345 genDef(Pb, KPRCB, SystemReserved); 00346 genDef(Pb, KPRCB, HalReserved); 00347 00348 DisableInc (HALPPC); 00349 00350 genDef(Pb, KPRCB, DpcTime); 00351 genDef(Pb, KPRCB, InterruptTime); 00352 genDef(Pb, KPRCB, KernelTime); 00353 genDef(Pb, KPRCB, UserTime); 00354 genDef(Pb, KPRCB, AdjustDpcThreshold); 00355 genDef(Pb, KPRCB, InterruptCount); 00356 genDef(Pb, KPRCB, ApcBypassCount); 00357 genDef(Pb, KPRCB, DpcBypassCount); 00358 genDef(Pb, KPRCB, IpiFrozen); 00359 genDef(Pb, KPRCB, ProcessorState); 00360 genAlt(PbAlignmentFixupCount, KPRCB, KeAlignmentFixupCount); 00361 genAlt(PbContextSwitches, KPRCB, KeContextSwitches); 00362 genAlt(PbDcacheFlushCount, KPRCB, KeDcacheFlushCount); 00363 genAlt(PbExceptionDispatchCount, KPRCB, KeExceptionDispatchCount); 00364 genAlt(PbFirstLevelTbFills, KPRCB, KeFirstLevelTbFills); 00365 genAlt(PbFloatingEmulationCount, KPRCB, KeFloatingEmulationCount); 00366 genAlt(PbIcacheFlushCount, KPRCB, KeIcacheFlushCount); 00367 genAlt(PbSecondLevelTbFills, KPRCB, KeSecondLevelTbFills); 00368 genAlt(PbSystemCalls, KPRCB, KeSystemCalls); 00369 genDef(Pb, KPRCB, CurrentPacket); 00370 genDef(Pb, KPRCB, TargetSet); 00371 genDef(Pb, KPRCB, WorkerRoutine); 00372 genDef(Pb, KPRCB, RequestSummary); 00373 genDef(Pb, KPRCB, SignalDone); 00374 genDef(Pb, KPRCB, DpcInterruptRequested); 00375 genDef(Pb, KPRCB, MaximumDpcQueueDepth); 00376 genDef(Pb, KPRCB, MinimumDpcRate); 00377 genDef(Pb, KPRCB, IpiCounts); 00378 genDef(Pb, KPRCB, StartCount); 00379 genDef(Pb, KPRCB, DpcLock); 00380 genDef(Pb, KPRCB, DpcListHead); 00381 genDef(Pb, KPRCB, DpcQueueDepth); 00382 genDef(Pb, KPRCB, DpcCount); 00383 genDef(Pb, KPRCB, DpcLastCount); 00384 genDef(Pb, KPRCB, DpcRequestRate); 00385 genDef(Pb, KPRCB, DpcRoutineActive); 00386 genVal(ProcessorBlockLength, ((sizeof(KPRCB) + 15) & ~15)); 00387 00388 // 00389 // Immediate interprocessor command definitions. 00390 // 00391 00392 genCom("Immediate Interprocessor Command Definitions"); 00393 00394 genVal(IPI_APC, IPI_APC); 00395 genVal(IPI_DPC, IPI_DPC); 00396 genVal(IPI_FREEZE, IPI_FREEZE); 00397 genVal(IPI_PACKET_READY, IPI_PACKET_READY); 00398 00399 // 00400 // Interprocessor interrupt count structure offset definitions. 00401 // 00402 00403 genCom("Interprocessor Interrupt Count Structure Offset Definitions"); 00404 00405 genDef(Ic, KIPI_COUNTS, Freeze); 00406 genDef(Ic, KIPI_COUNTS, Packet); 00407 genDef(Ic, KIPI_COUNTS, DPC); 00408 genDef(Ic, KIPI_COUNTS, APC); 00409 genDef(Ic, KIPI_COUNTS, FlushSingleTb); 00410 genDef(Ic, KIPI_COUNTS, FlushEntireTb); 00411 genDef(Ic, KIPI_COUNTS, ChangeColor); 00412 genDef(Ic, KIPI_COUNTS, SweepDcache); 00413 genDef(Ic, KIPI_COUNTS, SweepIcache); 00414 genDef(Ic, KIPI_COUNTS, SweepIcacheRange); 00415 genDef(Ic, KIPI_COUNTS, FlushIoBuffers); 00416 00417 // 00418 // Context frame offset definitions and flag definitions. 00419 // 00420 00421 EnableInc (HALPPC); 00422 00423 genCom("Context Frame Offset and Flag Definitions"); 00424 00425 genVal(CONTEXT_FULL, CONTEXT_FULL); 00426 genVal(CONTEXT_CONTROL, CONTEXT_CONTROL); 00427 genVal(CONTEXT_FLOATING_POINT, CONTEXT_FLOATING_POINT); 00428 genVal(CONTEXT_INTEGER, CONTEXT_INTEGER); 00429 00430 genSpc(); 00431 00432 genDef(Cx, CONTEXT, Fpr0); 00433 genDef(Cx, CONTEXT, Fpr1); 00434 genDef(Cx, CONTEXT, Fpr2); 00435 genDef(Cx, CONTEXT, Fpr3); 00436 genDef(Cx, CONTEXT, Fpr4); 00437 genDef(Cx, CONTEXT, Fpr5); 00438 genDef(Cx, CONTEXT, Fpr6); 00439 genDef(Cx, CONTEXT, Fpr7); 00440 genDef(Cx, CONTEXT, Fpr8); 00441 genDef(Cx, CONTEXT, Fpr9); 00442 genDef(Cx, CONTEXT, Fpr10); 00443 genDef(Cx, CONTEXT, Fpr11); 00444 genDef(Cx, CONTEXT, Fpr12); 00445 genDef(Cx, CONTEXT, Fpr13); 00446 genDef(Cx, CONTEXT, Fpr14); 00447 genDef(Cx, CONTEXT, Fpr15); 00448 genDef(Cx, CONTEXT, Fpr16); 00449 genDef(Cx, CONTEXT, Fpr17); 00450 genDef(Cx, CONTEXT, Fpr18); 00451 genDef(Cx, CONTEXT, Fpr19); 00452 genDef(Cx, CONTEXT, Fpr20); 00453 genDef(Cx, CONTEXT, Fpr21); 00454 genDef(Cx, CONTEXT, Fpr22); 00455 genDef(Cx, CONTEXT, Fpr23); 00456 genDef(Cx, CONTEXT, Fpr24); 00457 genDef(Cx, CONTEXT, Fpr25); 00458 genDef(Cx, CONTEXT, Fpr26); 00459 genDef(Cx, CONTEXT, Fpr27); 00460 genDef(Cx, CONTEXT, Fpr28); 00461 genDef(Cx, CONTEXT, Fpr29); 00462 genDef(Cx, CONTEXT, Fpr30); 00463 genDef(Cx, CONTEXT, Fpr31); 00464 genDef(Cx, CONTEXT, Fpscr); 00465 genDef(Cx, CONTEXT, Gpr0); 00466 genDef(Cx, CONTEXT, Gpr1); 00467 genDef(Cx, CONTEXT, Gpr2); 00468 genDef(Cx, CONTEXT, Gpr3); 00469 genDef(Cx, CONTEXT, Gpr4); 00470 genDef(Cx, CONTEXT, Gpr5); 00471 genDef(Cx, CONTEXT, Gpr6); 00472 genDef(Cx, CONTEXT, Gpr7); 00473 genDef(Cx, CONTEXT, Gpr8); 00474 genDef(Cx, CONTEXT, Gpr9); 00475 genDef(Cx, CONTEXT, Gpr10); 00476 genDef(Cx, CONTEXT, Gpr11); 00477 genDef(Cx, CONTEXT, Gpr12); 00478 genDef(Cx, CONTEXT, Gpr13); 00479 genDef(Cx, CONTEXT, Gpr14); 00480 genDef(Cx, CONTEXT, Gpr15); 00481 genDef(Cx, CONTEXT, Gpr16); 00482 genDef(Cx, CONTEXT, Gpr17); 00483 genDef(Cx, CONTEXT, Gpr18); 00484 genDef(Cx, CONTEXT, Gpr19); 00485 genDef(Cx, CONTEXT, Gpr20); 00486 genDef(Cx, CONTEXT, Gpr21); 00487 genDef(Cx, CONTEXT, Gpr22); 00488 genDef(Cx, CONTEXT, Gpr23); 00489 genDef(Cx, CONTEXT, Gpr24); 00490 genDef(Cx, CONTEXT, Gpr25); 00491 genDef(Cx, CONTEXT, Gpr26); 00492 genDef(Cx, CONTEXT, Gpr27); 00493 genDef(Cx, CONTEXT, Gpr28); 00494 genDef(Cx, CONTEXT, Gpr29); 00495 genDef(Cx, CONTEXT, Gpr30); 00496 genDef(Cx, CONTEXT, Gpr31); 00497 genDef(Cx, CONTEXT, Cr); 00498 genDef(Cx, CONTEXT, Xer); 00499 genDef(Cx, CONTEXT, Msr); 00500 genDef(Cx, CONTEXT, Iar); 00501 genDef(Cx, CONTEXT, Lr); 00502 genDef(Cx, CONTEXT, Ctr); 00503 genDef(Cx, CONTEXT, ContextFlags); 00504 genDef(Cx, CONTEXT, Dr0); 00505 genDef(Cx, CONTEXT, Dr1); 00506 genDef(Cx, CONTEXT, Dr2); 00507 genDef(Cx, CONTEXT, Dr3); 00508 genDef(Cx, CONTEXT, Dr4); 00509 genDef(Cx, CONTEXT, Dr5); 00510 genDef(Cx, CONTEXT, Dr6); 00511 genDef(Cx, CONTEXT, Dr7); 00512 00513 genVal(ContextFrameLength, (sizeof(CONTEXT) + 15) & (~15)); 00514 00515 // 00516 // Call/return stack frame header offset definitions. 00517 // 00518 00519 genCom("Call/Return Stack Frame Header Offset Definitions and Length"); 00520 00521 genDef(Cr, STACK_FRAME_HEADER, BackChain); 00522 genDef(Cr, STACK_FRAME_HEADER, GlueSaved1); 00523 genDef(Cr, STACK_FRAME_HEADER, GlueSaved2); 00524 genDef(Cr, STACK_FRAME_HEADER, Reserved1); 00525 genDef(Cr, STACK_FRAME_HEADER, Spare1); 00526 genDef(Cr, STACK_FRAME_HEADER, Spare2); 00527 00528 genDef(Cr, STACK_FRAME_HEADER, Parameter0); 00529 genDef(Cr, STACK_FRAME_HEADER, Parameter1); 00530 genDef(Cr, STACK_FRAME_HEADER, Parameter2); 00531 genDef(Cr, STACK_FRAME_HEADER, Parameter3); 00532 genDef(Cr, STACK_FRAME_HEADER, Parameter4); 00533 genDef(Cr, STACK_FRAME_HEADER, Parameter5); 00534 genDef(Cr, STACK_FRAME_HEADER, Parameter6); 00535 genDef(Cr, STACK_FRAME_HEADER, Parameter7); 00536 00537 genVal(StackFrameHeaderLength, (sizeof(STACK_FRAME_HEADER) + 7) & (~7)); 00538 00539 // 00540 // Exception frame offset definitions. 00541 // 00542 00543 genCom("Exception Frame Offset Definitions and Length"); 00544 00545 genDef(Ex, KEXCEPTION_FRAME, Gpr13); 00546 genDef(Ex, KEXCEPTION_FRAME, Gpr14); 00547 genDef(Ex, KEXCEPTION_FRAME, Gpr15); 00548 genDef(Ex, KEXCEPTION_FRAME, Gpr16); 00549 genDef(Ex, KEXCEPTION_FRAME, Gpr17); 00550 genDef(Ex, KEXCEPTION_FRAME, Gpr18); 00551 genDef(Ex, KEXCEPTION_FRAME, Gpr19); 00552 genDef(Ex, KEXCEPTION_FRAME, Gpr20); 00553 genDef(Ex, KEXCEPTION_FRAME, Gpr21); 00554 genDef(Ex, KEXCEPTION_FRAME, Gpr22); 00555 genDef(Ex, KEXCEPTION_FRAME, Gpr23); 00556 genDef(Ex, KEXCEPTION_FRAME, Gpr24); 00557 genDef(Ex, KEXCEPTION_FRAME, Gpr25); 00558 genDef(Ex, KEXCEPTION_FRAME, Gpr26); 00559 genDef(Ex, KEXCEPTION_FRAME, Gpr27); 00560 genDef(Ex, KEXCEPTION_FRAME, Gpr28); 00561 genDef(Ex, KEXCEPTION_FRAME, Gpr29); 00562 genDef(Ex, KEXCEPTION_FRAME, Gpr30); 00563 genDef(Ex, KEXCEPTION_FRAME, Gpr31); 00564 00565 genDef(Ex, KEXCEPTION_FRAME, Fpr14); 00566 genDef(Ex, KEXCEPTION_FRAME, Fpr15); 00567 genDef(Ex, KEXCEPTION_FRAME, Fpr16); 00568 genDef(Ex, KEXCEPTION_FRAME, Fpr17); 00569 genDef(Ex, KEXCEPTION_FRAME, Fpr18); 00570 genDef(Ex, KEXCEPTION_FRAME, Fpr19); 00571 genDef(Ex, KEXCEPTION_FRAME, Fpr20); 00572 genDef(Ex, KEXCEPTION_FRAME, Fpr21); 00573 genDef(Ex, KEXCEPTION_FRAME, Fpr22); 00574 genDef(Ex, KEXCEPTION_FRAME, Fpr23); 00575 genDef(Ex, KEXCEPTION_FRAME, Fpr24); 00576 genDef(Ex, KEXCEPTION_FRAME, Fpr25); 00577 genDef(Ex, KEXCEPTION_FRAME, Fpr26); 00578 genDef(Ex, KEXCEPTION_FRAME, Fpr27); 00579 genDef(Ex, KEXCEPTION_FRAME, Fpr28); 00580 genDef(Ex, KEXCEPTION_FRAME, Fpr29); 00581 genDef(Ex, KEXCEPTION_FRAME, Fpr30); 00582 genDef(Ex, KEXCEPTION_FRAME, Fpr31); 00583 00584 genVal(ExceptionFrameLength, (sizeof(KEXCEPTION_FRAME) + 7) & (~7)); 00585 00586 // 00587 // Swap Frame offset definitions. 00588 // 00589 00590 DisableInc (HALPPC); 00591 00592 genCom("Swap Frame Definitions and Length"); 00593 00594 genDef(Sw, KSWAP_FRAME, ConditionRegister); 00595 genDef(Sw, KSWAP_FRAME, SwapReturn); 00596 00597 genVal(SwapFrameLength, (sizeof(KSWAP_FRAME) + 7) & (~7)); 00598 00599 EnableInc (HALPPC); 00600 00601 // 00602 // Jump buffer offset definitions. 00603 // 00604 00605 DisableInc (HALPPC); 00606 00607 genCom("Jump Offset Definitions and Length"); 00608 00609 genDef(Jb, _JUMP_BUFFER, Fpr14); 00610 genDef(Jb, _JUMP_BUFFER, Fpr15); 00611 genDef(Jb, _JUMP_BUFFER, Fpr16); 00612 genDef(Jb, _JUMP_BUFFER, Fpr17); 00613 genDef(Jb, _JUMP_BUFFER, Fpr18); 00614 genDef(Jb, _JUMP_BUFFER, Fpr19); 00615 genDef(Jb, _JUMP_BUFFER, Fpr20); 00616 genDef(Jb, _JUMP_BUFFER, Fpr21); 00617 genDef(Jb, _JUMP_BUFFER, Fpr22); 00618 genDef(Jb, _JUMP_BUFFER, Fpr23); 00619 genDef(Jb, _JUMP_BUFFER, Fpr24); 00620 genDef(Jb, _JUMP_BUFFER, Fpr25); 00621 genDef(Jb, _JUMP_BUFFER, Fpr26); 00622 genDef(Jb, _JUMP_BUFFER, Fpr27); 00623 genDef(Jb, _JUMP_BUFFER, Fpr28); 00624 genDef(Jb, _JUMP_BUFFER, Fpr29); 00625 genDef(Jb, _JUMP_BUFFER, Fpr30); 00626 genDef(Jb, _JUMP_BUFFER, Fpr31); 00627 00628 genDef(Jb, _JUMP_BUFFER, Gpr1); 00629 genDef(Jb, _JUMP_BUFFER, Gpr2); 00630 genDef(Jb, _JUMP_BUFFER, Gpr13); 00631 genDef(Jb, _JUMP_BUFFER, Gpr14); 00632 genDef(Jb, _JUMP_BUFFER, Gpr15); 00633 genDef(Jb, _JUMP_BUFFER, Gpr16); 00634 genDef(Jb, _JUMP_BUFFER, Gpr17); 00635 genDef(Jb, _JUMP_BUFFER, Gpr18); 00636 genDef(Jb, _JUMP_BUFFER, Gpr19); 00637 genDef(Jb, _JUMP_BUFFER, Gpr20); 00638 genDef(Jb, _JUMP_BUFFER, Gpr21); 00639 genDef(Jb, _JUMP_BUFFER, Gpr22); 00640 genDef(Jb, _JUMP_BUFFER, Gpr23); 00641 genDef(Jb, _JUMP_BUFFER, Gpr24); 00642 genDef(Jb, _JUMP_BUFFER, Gpr25); 00643 genDef(Jb, _JUMP_BUFFER, Gpr26); 00644 genDef(Jb, _JUMP_BUFFER, Gpr27); 00645 genDef(Jb, _JUMP_BUFFER, Gpr28); 00646 genDef(Jb, _JUMP_BUFFER, Gpr29); 00647 genDef(Jb, _JUMP_BUFFER, Gpr30); 00648 genDef(Jb, _JUMP_BUFFER, Gpr31); 00649 00650 genDef(Jb, _JUMP_BUFFER, Cr); 00651 genDef(Jb, _JUMP_BUFFER, Iar); 00652 genDef(Jb, _JUMP_BUFFER, Type); 00653 00654 // 00655 // Trap frame offset definitions. 00656 // 00657 00658 EnableInc (HALPPC); 00659 00660 genCom("Trap Frame Offset Definitions and Length"); 00661 00662 genDef(Tr, KTRAP_FRAME, TrapFrame); 00663 genDef(Tr, KTRAP_FRAME, OldIrql); 00664 genDef(Tr, KTRAP_FRAME, PreviousMode); 00665 genDef(Tr, KTRAP_FRAME, SavedApcStateIndex); 00666 genDef(Tr, KTRAP_FRAME, SavedKernelApcDisable); 00667 genDef(Tr, KTRAP_FRAME, ExceptionRecord); 00668 00669 genDef(Tr, KTRAP_FRAME, Gpr0); 00670 genDef(Tr, KTRAP_FRAME, Gpr1); 00671 genDef(Tr, KTRAP_FRAME, Gpr2); 00672 genDef(Tr, KTRAP_FRAME, Gpr3); 00673 genDef(Tr, KTRAP_FRAME, Gpr4); 00674 genDef(Tr, KTRAP_FRAME, Gpr5); 00675 genDef(Tr, KTRAP_FRAME, Gpr6); 00676 genDef(Tr, KTRAP_FRAME, Gpr7); 00677 genDef(Tr, KTRAP_FRAME, Gpr8); 00678 genDef(Tr, KTRAP_FRAME, Gpr9); 00679 genDef(Tr, KTRAP_FRAME, Gpr10); 00680 genDef(Tr, KTRAP_FRAME, Gpr11); 00681 genDef(Tr, KTRAP_FRAME, Gpr12); 00682 00683 genDef(Tr, KTRAP_FRAME, Fpr0); 00684 genDef(Tr, KTRAP_FRAME, Fpr1); 00685 genDef(Tr, KTRAP_FRAME, Fpr2); 00686 genDef(Tr, KTRAP_FRAME, Fpr3); 00687 genDef(Tr, KTRAP_FRAME, Fpr4); 00688 genDef(Tr, KTRAP_FRAME, Fpr5); 00689 genDef(Tr, KTRAP_FRAME, Fpr6); 00690 genDef(Tr, KTRAP_FRAME, Fpr7); 00691 genDef(Tr, KTRAP_FRAME, Fpr8); 00692 genDef(Tr, KTRAP_FRAME, Fpr9); 00693 genDef(Tr, KTRAP_FRAME, Fpr10); 00694 genDef(Tr, KTRAP_FRAME, Fpr11); 00695 genDef(Tr, KTRAP_FRAME, Fpr12); 00696 genDef(Tr, KTRAP_FRAME, Fpr13); 00697 00698 genDef(Tr, KTRAP_FRAME, Fpscr); 00699 genDef(Tr, KTRAP_FRAME, Cr); 00700 genDef(Tr, KTRAP_FRAME, Xer); 00701 genDef(Tr, KTRAP_FRAME, Msr); 00702 genDef(Tr, KTRAP_FRAME, Iar); 00703 genDef(Tr, KTRAP_FRAME, Lr); 00704 genDef(Tr, KTRAP_FRAME, Ctr); 00705 00706 genDef(Tr, KTRAP_FRAME, Dr0); 00707 genDef(Tr, KTRAP_FRAME, Dr1); 00708 genDef(Tr, KTRAP_FRAME, Dr2); 00709 genDef(Tr, KTRAP_FRAME, Dr3); 00710 genDef(Tr, KTRAP_FRAME, Dr4); 00711 genDef(Tr, KTRAP_FRAME, Dr5); 00712 genDef(Tr, KTRAP_FRAME, Dr6); 00713 genDef(Tr, KTRAP_FRAME, Dr7); 00714 00715 genVal(TrapFrameLength, (sizeof(KTRAP_FRAME) + 7) & (~7)); 00716 00717 // 00718 // Usermode callout frame definitions 00719 // 00720 00721 DisableInc (HALPPC); 00722 00723 genCom("Usermode callout frame definitions"); 00724 00725 genDef(Cu, KCALLOUT_FRAME, Frame); 00726 genDef(Cu, KCALLOUT_FRAME, CbStk); 00727 genDef(Cu, KCALLOUT_FRAME, TrFr); 00728 genDef(Cu, KCALLOUT_FRAME, InStk); 00729 genDef(Cu, KCALLOUT_FRAME, TrIar); 00730 genDef(Cu, KCALLOUT_FRAME, TrToc); 00731 genDef(Cu, KCALLOUT_FRAME, R3); 00732 genDef(Cu, KCALLOUT_FRAME, R4); 00733 genDef(Cu, KCALLOUT_FRAME, Lr); 00734 genDef(Cu, KCALLOUT_FRAME, Gpr); 00735 genDef(Cu, KCALLOUT_FRAME, Fpr); 00736 00737 genVal(CuFrameLength, sizeof(KCALLOUT_FRAME)); 00738 00739 genCom("Usermode callout user frame definitions"); 00740 00741 genDef(Ck, UCALLOUT_FRAME, Frame); 00742 genDef(Ck, UCALLOUT_FRAME, Buffer); 00743 genDef(Ck, UCALLOUT_FRAME, Length); 00744 genDef(Ck, UCALLOUT_FRAME, ApiNumber); 00745 genDef(Ck, UCALLOUT_FRAME, Lr); 00746 genDef(Ck, UCALLOUT_FRAME, Toc); 00747 00748 genVal(CkFrameLength, sizeof(UCALLOUT_FRAME)); 00749 00750 // 00751 // Exception stack frame definitions 00752 // 00753 00754 genCom("Exception stack frame frame definitions"); 00755 00756 genVal(STK_SLACK_SPACE, STK_SLACK_SPACE); 00757 genAlt(TF_BASE, KEXCEPTION_STACK_FRAME, TrapFrame); 00758 genAlt(KERN_SYS_CALL_FRAME, KEXCEPTION_STACK_FRAME, ExceptionFrame); 00759 genAlt(EF_BASE, KEXCEPTION_STACK_FRAME, ExceptionFrame); 00760 genDef(Ef, KEXCEPTION_STACK_FRAME, Lr); 00761 genDef(Ef, KEXCEPTION_STACK_FRAME, Cr); 00762 genAlt(USER_SYS_CALL_FRAME, KEXCEPTION_STACK_FRAME, SlackSpace); 00763 genAlt(STACK_DELTA_NEWSTK, KEXCEPTION_STACK_FRAME, SlackSpace); 00764 genVal(STACK_DELTA, sizeof(KEXCEPTION_STACK_FRAME)); 00765 00766 EnableInc (HALPPC); 00767 00768 // 00769 // Processor State Frame offsets relative to base 00770 // 00771 00772 genCom("Processor State Frame Offset Definitions"); 00773 00774 genDef(Ps, KPROCESSOR_STATE, ContextFrame); 00775 genDef(Ps, KPROCESSOR_STATE, SpecialRegisters); 00776 genDef(Sr, KSPECIAL_REGISTERS, KernelDr0); 00777 genDef(Sr, KSPECIAL_REGISTERS, KernelDr1); 00778 genDef(Sr, KSPECIAL_REGISTERS, KernelDr2); 00779 genDef(Sr, KSPECIAL_REGISTERS, KernelDr3); 00780 genDef(Sr, KSPECIAL_REGISTERS, KernelDr4); 00781 genDef(Sr, KSPECIAL_REGISTERS, KernelDr5); 00782 genDef(Sr, KSPECIAL_REGISTERS, KernelDr6); 00783 genDef(Sr, KSPECIAL_REGISTERS, KernelDr7); 00784 genDef(Sr, KSPECIAL_REGISTERS, Sprg0); 00785 genDef(Sr, KSPECIAL_REGISTERS, Sprg1); 00786 genDef(Sr, KSPECIAL_REGISTERS, Sr0); 00787 genDef(Sr, KSPECIAL_REGISTERS, Sr1); 00788 genDef(Sr, KSPECIAL_REGISTERS, Sr2); 00789 genDef(Sr, KSPECIAL_REGISTERS, Sr3); 00790 genDef(Sr, KSPECIAL_REGISTERS, Sr4); 00791 genDef(Sr, KSPECIAL_REGISTERS, Sr5); 00792 genDef(Sr, KSPECIAL_REGISTERS, Sr6); 00793 genDef(Sr, KSPECIAL_REGISTERS, Sr7); 00794 genDef(Sr, KSPECIAL_REGISTERS, Sr8); 00795 genDef(Sr, KSPECIAL_REGISTERS, Sr9); 00796 genDef(Sr, KSPECIAL_REGISTERS, Sr10); 00797 genDef(Sr, KSPECIAL_REGISTERS, Sr11); 00798 genDef(Sr, KSPECIAL_REGISTERS, Sr12); 00799 genDef(Sr, KSPECIAL_REGISTERS, Sr13); 00800 genDef(Sr, KSPECIAL_REGISTERS, Sr14); 00801 genDef(Sr, KSPECIAL_REGISTERS, Sr15); 00802 genDef(Sr, KSPECIAL_REGISTERS, DBAT0L); 00803 genDef(Sr, KSPECIAL_REGISTERS, DBAT0U); 00804 genDef(Sr, KSPECIAL_REGISTERS, DBAT1L); 00805 genDef(Sr, KSPECIAL_REGISTERS, DBAT1U); 00806 genDef(Sr, KSPECIAL_REGISTERS, DBAT2L); 00807 genDef(Sr, KSPECIAL_REGISTERS, DBAT2U); 00808 genDef(Sr, KSPECIAL_REGISTERS, DBAT3L); 00809 genDef(Sr, KSPECIAL_REGISTERS, DBAT3U); 00810 genDef(Sr, KSPECIAL_REGISTERS, IBAT0L); 00811 genDef(Sr, KSPECIAL_REGISTERS, IBAT0U); 00812 genDef(Sr, KSPECIAL_REGISTERS, IBAT1L); 00813 genDef(Sr, KSPECIAL_REGISTERS, IBAT1U); 00814 genDef(Sr, KSPECIAL_REGISTERS, IBAT2L); 00815 genDef(Sr, KSPECIAL_REGISTERS, IBAT2U); 00816 genDef(Sr, KSPECIAL_REGISTERS, IBAT3L); 00817 genDef(Sr, KSPECIAL_REGISTERS, IBAT3U); 00818 genDef(Sr, KSPECIAL_REGISTERS, Sdr1); 00819 00820 genVal(ProcessorStateLength, ((sizeof(KPROCESSOR_STATE) + 15) & ~15)); 00821 00822 // 00823 // Loader Parameter Block offset definitions. 00824 // 00825 00826 genCom("Loader Parameter Block Offset Definitions"); 00827 00828 genDef(Lpb, LOADER_PARAMETER_BLOCK, LoadOrderListHead); 00829 genDef(Lpb, LOADER_PARAMETER_BLOCK, MemoryDescriptorListHead); 00830 genDef(Lpb, LOADER_PARAMETER_BLOCK, KernelStack); 00831 genDef(Lpb, LOADER_PARAMETER_BLOCK, Prcb); 00832 genDef(Lpb, LOADER_PARAMETER_BLOCK, Process); 00833 genDef(Lpb, LOADER_PARAMETER_BLOCK, Thread); 00834 genDef(Lpb, LOADER_PARAMETER_BLOCK, RegistryLength); 00835 genDef(Lpb, LOADER_PARAMETER_BLOCK, RegistryBase); 00836 genAlt(LpbInterruptStack, LOADER_PARAMETER_BLOCK, u.Ppc.InterruptStack); 00837 genAlt(LpbFirstLevelDcacheSize, LOADER_PARAMETER_BLOCK, u.Ppc.FirstLevelDcacheSize); 00838 genAlt(LpbFirstLevelDcacheFillSize, LOADER_PARAMETER_BLOCK, u.Ppc.FirstLevelDcacheFillSize); 00839 genAlt(LpbFirstLevelIcacheSize, LOADER_PARAMETER_BLOCK, u.Ppc.FirstLevelIcacheSize); 00840 genAlt(LpbFirstLevelIcacheFillSize, LOADER_PARAMETER_BLOCK, u.Ppc.FirstLevelIcacheFillSize); 00841 genAlt(LpbHashedPageTable, LOADER_PARAMETER_BLOCK, u.Ppc.HashedPageTable); 00842 genAlt(LpbPanicStack, LOADER_PARAMETER_BLOCK, u.Ppc.PanicStack); 00843 genAlt(LpbPcrPage, LOADER_PARAMETER_BLOCK, u.Ppc.PcrPage); 00844 genAlt(LpbPdrPage, LOADER_PARAMETER_BLOCK, u.Ppc.PdrPage); 00845 genAlt(LpbSecondLevelDcacheSize, LOADER_PARAMETER_BLOCK, u.Ppc.SecondLevelDcacheSize); 00846 genAlt(LpbSecondLevelDcacheFillSize, LOADER_PARAMETER_BLOCK, u.Ppc.SecondLevelDcacheFillSize); 00847 genAlt(LpbSecondLevelIcacheSize, LOADER_PARAMETER_BLOCK, u.Ppc.SecondLevelIcacheSize); 00848 genAlt(LpbSecondLevelIcacheFillSize, LOADER_PARAMETER_BLOCK, u.Ppc.SecondLevelIcacheFillSize); 00849 genAlt(LpbPcrPage2, LOADER_PARAMETER_BLOCK, u.Ppc.PcrPage2); 00850 genAlt(LpbIcacheMode, LOADER_PARAMETER_BLOCK, u.Ppc.IcacheMode); 00851 genAlt(LpbDcacheMode, LOADER_PARAMETER_BLOCK, u.Ppc.DcacheMode); 00852 genAlt(LpbNumberCongruenceClasses, LOADER_PARAMETER_BLOCK, u.Ppc.NumberCongruenceClasses); 00853 genAlt(LpbKseg0Top, LOADER_PARAMETER_BLOCK, u.Ppc.Kseg0Top); 00854 genAlt(LpbMemoryManagementModel, LOADER_PARAMETER_BLOCK, u.Ppc.MemoryManagementModel); 00855 genAlt(LpbHashedPageTableSize, LOADER_PARAMETER_BLOCK, u.Ppc.HashedPageTableSize); 00856 genAlt(LpbKernelKseg0PagesDescriptor, LOADER_PARAMETER_BLOCK, u.Ppc.KernelKseg0PagesDescriptor); 00857 genAlt(LpbMinimumBlockLength, LOADER_PARAMETER_BLOCK, u.Ppc.MinimumBlockLength); 00858 genAlt(LpbMaximumBlockLength, LOADER_PARAMETER_BLOCK, u.Ppc.MaximumBlockLength); 00859 00860 // 00861 // Memory Allocation Descriptor offset definitions. 00862 // 00863 00864 genCom("Memory Allocation Descriptor Offset Definitions"); 00865 00866 genDef(Mad, MEMORY_ALLOCATION_DESCRIPTOR, ListEntry); 00867 genDef(Mad, MEMORY_ALLOCATION_DESCRIPTOR, MemoryType); 00868 genDef(Mad, MEMORY_ALLOCATION_DESCRIPTOR, BasePage); 00869 genDef(Mad, MEMORY_ALLOCATION_DESCRIPTOR, PageCount); 00870 00871 DisableInc (HALPPC); 00872 00873 // 00874 // Address space layout definitions 00875 // 00876 00877 EnableInc (HALPPC); 00878 00879 genCom("Address Space Layout Definitions"); 00880 00881 genVal(KUSEG_BASE, KUSEG_BASE); 00882 genVal(KSEG0_BASE, KSEG0_BASE); 00883 dumpf("#define KSEG1_BASE PCR->Kseg0Top\n"); 00884 dumpf("#define KSEG2_BASE KSEG1_BASE\n"); 00885 00886 DisableInc (HALPPC); 00887 00888 genVal(SYSTEM_BASE, SYSTEM_BASE); 00889 genVal(PDE_BASE, PDE_BASE); 00890 genVal(PTE_BASE, PTE_BASE); 00891 00892 // 00893 // Page table and page directory entry definitions 00894 // 00895 00896 EnableInc (HALPPC); 00897 00898 genCom("Page Table and Directory Entry Definitions"); 00899 00900 genVal(PAGE_SIZE, PAGE_SIZE); 00901 genVal(PAGE_SHIFT, PAGE_SHIFT); 00902 genVal(PDI_SHIFT, PDI_SHIFT); 00903 genVal(PTI_SHIFT, PTI_SHIFT); 00904 00905 DisableInc (HALPPC); 00906 00907 // 00908 // Breakpoint instruction definitions 00909 // 00910 00911 EnableInc (HALPPC); 00912 00913 genCom("Breakpoint Definitions"); 00914 00915 genVal(USER_BREAKPOINT, USER_BREAKPOINT); 00916 genVal(KERNEL_BREAKPOINT, KERNEL_BREAKPOINT); 00917 genVal(BREAKIN_BREAKPOINT, BREAKIN_BREAKPOINT); 00918 00919 DisableInc (HALPPC); 00920 00921 genVal(BRANCH_TAKEN_BREAKPOINT, BRANCH_TAKEN_BREAKPOINT); 00922 genVal(BRANCH_NOT_TAKEN_BREAKPOINT, BRANCH_NOT_TAKEN_BREAKPOINT); 00923 genVal(SINGLE_STEP_BREAKPOINT, SINGLE_STEP_BREAKPOINT); 00924 genVal(DIVIDE_OVERFLOW_BREAKPOINT, DIVIDE_OVERFLOW_BREAKPOINT); 00925 genVal(DIVIDE_BY_ZERO_BREAKPOINT, DIVIDE_BY_ZERO_BREAKPOINT); 00926 genVal(RANGE_CHECK_BREAKPOINT, RANGE_CHECK_BREAKPOINT); 00927 genVal(STACK_OVERFLOW_BREAKPOINT, STACK_OVERFLOW_BREAKPOINT); 00928 genVal(MULTIPLY_OVERFLOW_BREAKPOINT, MULTIPLY_OVERFLOW_BREAKPOINT); 00929 genVal(DEBUG_PRINT_BREAKPOINT, DEBUG_PRINT_BREAKPOINT); 00930 genVal(DEBUG_PROMPT_BREAKPOINT, DEBUG_PROMPT_BREAKPOINT); 00931 genVal(DEBUG_STOP_BREAKPOINT, DEBUG_STOP_BREAKPOINT); 00932 genVal(DEBUG_LOAD_SYMBOLS_BREAKPOINT, DEBUG_LOAD_SYMBOLS_BREAKPOINT); 00933 genVal(DEBUG_UNLOAD_SYMBOLS_BREAKPOINT, DEBUG_UNLOAD_SYMBOLS_BREAKPOINT); 00934 00935 // 00936 // Miscellaneous definitions 00937 // 00938 00939 EnableInc (HALPPC); 00940 00941 genCom("Miscellaneous Definitions"); 00942 00943 genVal(Executive, Executive); 00944 genVal(KernelMode, KernelMode); 00945 genVal(FALSE, FALSE); 00946 genVal(TRUE, TRUE); 00947 genVal(UNCACHED_POLICY, UNCACHED_POLICY); 00948 genVal(KiPcr, KIPCR); 00949 genVal(KiPcr2, KIPCR2); 00950 00951 DisableInc (HALPPC); 00952 00953 genVal(BASE_PRIORITY_THRESHOLD, BASE_PRIORITY_THRESHOLD); 00954 genVal(EVENT_PAIR_INCREMENT, EVENT_PAIR_INCREMENT); 00955 genVal(LOW_REALTIME_PRIORITY, LOW_REALTIME_PRIORITY); 00956 genVal(KERNEL_STACK_SIZE, KERNEL_STACK_SIZE); 00957 genVal(KERNEL_LARGE_STACK_COMMIT, KERNEL_LARGE_STACK_COMMIT); 00958 genVal(MM_USER_PROBE_ADDRESS, MM_USER_PROBE_ADDRESS); 00959 genVal(ROUND_TO_NEAREST, ROUND_TO_NEAREST); 00960 genVal(ROUND_TO_ZERO, ROUND_TO_ZERO); 00961 genVal(ROUND_TO_PLUS_INFINITY, ROUND_TO_PLUS_INFINITY); 00962 genVal(ROUND_TO_MINUS_INFINITY, ROUND_TO_MINUS_INFINITY); 00963 genVal(CLOCK_QUANTUM_DECREMENT, CLOCK_QUANTUM_DECREMENT); 00964 genVal(READY_SKIP_QUANTUM, READY_SKIP_QUANTUM); 00965 genVal(THREAD_QUANTUM, THREAD_QUANTUM); 00966 genVal(WAIT_QUANTUM_DECREMENT, WAIT_QUANTUM_DECREMENT); 00967 genVal(ROUND_TRIP_DECREMENT_COUNT, ROUND_TRIP_DECREMENT_COUNT); 00968 00969 // 00970 // Close header file. 00971 // 00972 00973 fprintf(stderr, " Finished\n"); 00974 return; 00975 }

LONG t IN ULONG  z  ) 
 

Definition at line 142 of file genppc.c.

00146 { 00147 LONG i; 00148 00149 for (i = 0; i < 32; i += 1) { 00150 if ((z >> i) & 1) { 00151 break; 00152 } 00153 } 00154 return i; 00155 }


Variable Documentation

FILE* HalPpc
 

Definition at line 112 of file genppc.c.

Referenced by main().

FILE* KsPpc
 

Definition at line 111 of file genppc.c.

Referenced by main().

ULONG OutputEnabled
 

Definition at line 126 of file genppc.c.


Generated on Sat May 15 19:43:51 2004 for test by doxygen 1.3.7