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

alignem.c File Reference

#include "ki.h"

Go to the source code of this file.

Classes

struct  _ALFAULT

Defines

#define LDARX_INDEX_VALUE   1
#define LD_INDEX_VALUE   13
#define STD_INDEX_VALUE   15
#define STWCX_INDEX_VALUE   66
#define STDCX_INDEX_VALUE   67
#define LWBRX_INDEX_VALUE   72
#define STWBRX_INDEX_VALUE   74
#define LHBRX_INDEX_VALUE   76
#define STHBRX_INDEX_VALUE   78
#define ECIWX_INDEX_VALUE   84
#define ECOWX_INDEX_VALUE   86
#define DCBZ_INDEX_VALUE   95
#define STFIWX_INDEX_VALUE   111

Typedefs

typedef _ALFAULT ALFAULT
typedef _ALFAULTPALFAULT

Functions

VOID KiSetFloatRegisterValue (IN ULONG, IN DOUBLE, OUT PKEXCEPTION_FRAME, OUT PKTRAP_FRAME)
DOUBLE KiGetFloatRegisterValue (IN ULONG, IN PKEXCEPTION_FRAME, IN PKTRAP_FRAME)
BOOLEAN KiEmulateReference (IN OUT PEXCEPTION_RECORD ExceptionRecord, IN OUT PKEXCEPTION_FRAME ExceptionFrame, IN OUT PKTRAP_FRAME TrapFrame)
BOOLEAN KiEmulateDcbz (IN OUT PEXCEPTION_RECORD ExceptionRecord, IN OUT PKEXCEPTION_FRAME ExceptionFrame, IN OUT PKTRAP_FRAME TrapFrame)

Variables

ALFAULT AlFault [128]


Define Documentation

#define DCBZ_INDEX_VALUE   95
 

Definition at line 118 of file ppc/alignem.c.

Referenced by KiEmulateDcbz(), and KiEmulateReference().

#define ECIWX_INDEX_VALUE   84
 

Definition at line 116 of file ppc/alignem.c.

Referenced by KiEmulateReference().

#define ECOWX_INDEX_VALUE   86
 

Definition at line 117 of file ppc/alignem.c.

Referenced by KiEmulateReference().

#define LD_INDEX_VALUE   13
 

Definition at line 108 of file ppc/alignem.c.

Referenced by KiEmulateReference().

#define LDARX_INDEX_VALUE   1
 

Definition at line 107 of file ppc/alignem.c.

Referenced by KiEmulateReference().

#define LHBRX_INDEX_VALUE   76
 

Definition at line 114 of file ppc/alignem.c.

Referenced by KiEmulateReference().

#define LWBRX_INDEX_VALUE   72
 

Definition at line 112 of file ppc/alignem.c.

Referenced by KiEmulateReference().

#define STD_INDEX_VALUE   15
 

Definition at line 109 of file ppc/alignem.c.

Referenced by KiEmulateReference().

#define STDCX_INDEX_VALUE   67
 

Definition at line 111 of file ppc/alignem.c.

Referenced by KiEmulateReference().

#define STFIWX_INDEX_VALUE   111
 

Definition at line 119 of file ppc/alignem.c.

Referenced by KiEmulateReference().

#define STHBRX_INDEX_VALUE   78
 

Definition at line 115 of file ppc/alignem.c.

Referenced by KiEmulateReference().

#define STWBRX_INDEX_VALUE   74
 

Definition at line 113 of file ppc/alignem.c.

Referenced by KiEmulateReference().

#define STWCX_INDEX_VALUE   66
 

Definition at line 110 of file ppc/alignem.c.

Referenced by KiEmulateReference().


Typedef Documentation

typedef struct _ALFAULT ALFAULT
 

typedef struct _ALFAULT * PALFAULT
 


Function Documentation

BOOLEAN KiEmulateDcbz IN OUT PEXCEPTION_RECORD  ExceptionRecord,
IN OUT PKEXCEPTION_FRAME  ExceptionFrame,
IN OUT PKTRAP_FRAME  TrapFrame
 

Definition at line 754 of file ppc/alignem.c.

References AlFault, _DSISR::DataReg, DCBZ_INDEX_VALUE, _ALFAULT::Escape, FALSE, _DSISR::Index, KiCopyInformation(), TRUE, and _ALFAULT::Valid.

Referenced by KiDispatchException().

00762 : 00763 00764 This function is called to emulate a Data Cache Block Zero instruction. 00765 The PowerPC hardware will raise an alignment exception if a DCBZ is 00766 attempted on non-cached memory. We need to emulate this even in kernel 00767 mode so we can debug h/w problems by disabling the data cache. 00768 00769 Arguments: 00770 00771 ExceptionRecord - Supplies a pointer to an exception record. 00772 00773 ExceptionFrame - Supplies a pointer to an exception frame. 00774 00775 TrapFrame - Supplies a pointer to a trap frame. 00776 00777 Return Value: 00778 00779 A value of TRUE is returned if the data reference is successfully 00780 emulated. Otherwise, a value of FALSE is returned. 00781 00782 --*/ 00783 00784 { 00785 00786 PUCHAR DataAddress; 00787 PVOID ExceptionAddress; 00788 DSISR DsisrValue; 00789 ULONG TableIndex; 00790 ULONG DataRegNum; 00791 ALFAULT Info; 00792 00793 // 00794 // Save the original exception address in case another exception 00795 // occurs. 00796 // 00797 00798 ExceptionAddress = ExceptionRecord->ExceptionAddress; 00799 00800 // 00801 // Any exception that occurs during the attempted emulation of the 00802 // unaligned reference causes the emulation to be aborted. The new 00803 // exception code and information is copied to the original exception 00804 // record and a value of FALSE is returned. 00805 // 00806 00807 try { 00808 00809 // 00810 // The effective address of the reference from the DAR was saved 00811 // in the exception record. Check to make sure it is within the 00812 // user part of the address space. Alignment exceptions take 00813 // precedence over memory management exceptions (this is true 00814 // for PowerPC as well as MIPS) and the address could be a 00815 // system address. 00816 // 00817 00818 DataAddress = (PUCHAR) (ExceptionRecord->ExceptionInformation[1]); 00819 00820 // 00821 // Get information about the failing instruction from saved DSISR. 00822 // 00823 00824 DsisrValue = *(DSISR*) &(ExceptionRecord->ExceptionInformation[2]); 00825 TableIndex = DsisrValue.Index; 00826 DataRegNum = DsisrValue.DataReg; 00827 Info = AlFault[TableIndex]; 00828 00829 // 00830 // If table entry is valid and does not indicate special processing 00831 // needed, and is a DCBZ instruction, emulate the execution of the 00832 // instruction 00833 // 00834 00835 if (Info.Valid && Info.Escape && (TableIndex == DCBZ_INDEX_VALUE)) { 00836 00837 // 00838 // Data Cache Block Zero 00839 // 00840 // A data cache block is 32 bytes long, we emulate this 00841 // instruction by storing 8 zero integers a the address 00842 // specified. 00843 // 00844 // Note, dcbz zeros the block "containing" the address 00845 // so we round down first. 00846 // 00847 00848 PULONG DcbAddress = (PULONG)((ULONG)DataAddress & ~0x1f); 00849 00850 *DcbAddress++ = 0; 00851 *DcbAddress++ = 0; 00852 *DcbAddress++ = 0; 00853 *DcbAddress++ = 0; 00854 *DcbAddress++ = 0; 00855 *DcbAddress++ = 0; 00856 *DcbAddress++ = 0; 00857 *DcbAddress++ = 0; 00858 00859 // 00860 // Bump instruction address to next instruction. 00861 // 00862 00863 TrapFrame->Iar += 4; 00864 00865 return TRUE; 00866 } 00867 00868 // 00869 // If an exception occurs, then copy the new exception information to the 00870 // original exception record and handle the exception. 00871 // 00872 00873 } except (KiCopyInformation(ExceptionRecord, 00874 (GetExceptionInformation())->ExceptionRecord)) { 00875 00876 // 00877 // Preserve the original exception address. 00878 // 00879 00880 ExceptionRecord->ExceptionAddress = ExceptionAddress; 00881 } 00882 00883 // 00884 // Return a value of FALSE. 00885 // 00886 00887 return FALSE; 00888 } }

BOOLEAN KiEmulateReference IN OUT PEXCEPTION_RECORD  ExceptionRecord,
IN OUT PKEXCEPTION_FRAME  ExceptionFrame,
IN OUT PKTRAP_FRAME  TrapFrame
 

Definition at line 255 of file ppc/alignem.c.

References AlFault, _DSISR::DataReg, DCBZ_INDEX_VALUE, ECIWX_INDEX_VALUE, ECOWX_INDEX_VALUE, _ALFAULT::Escape, FALSE, _ALFAULT::Fixed, _DSISR::Index, KeLowerIrql(), KeProfileInterruptWithSource(), KeRaiseIrql(), KiCopyInformation(), KiGetFloatRegisterValue(), KiGetRegisterValue(), KiProfileAlignmentFixup, KiProfileAlignmentFixupCount, KiProfileAlignmentFixupInterval, KiSetFloatRegisterValue(), KiSetRegisterValue(), LD_INDEX_VALUE, LDARX_INDEX_VALUE, _ALFAULT::Length, LHBRX_INDEX_VALUE, _ALFAULT::Load, LWBRX_INDEX_VALUE, PROFILE_LEVEL, SHORT, _ALFAULT::Signed, STD_INDEX_VALUE, STDCX_INDEX_VALUE, STFIWX_INDEX_VALUE, STHBRX_INDEX_VALUE, STWBRX_INDEX_VALUE, STWCX_INDEX_VALUE, TRUE, _ALFAULT::Update, _DSISR::UpdateReg, USHORT, and _ALFAULT::Valid.

Referenced by KiDispatchException().

00263 : 00264 00265 This function is called to emulate an unaligned data reference to an 00266 address in the user part of the address space. 00267 00268 Arguments: 00269 00270 ExceptionRecord - Supplies a pointer to an exception record. 00271 00272 ExceptionFrame - Supplies a pointer to an exception frame. 00273 00274 TrapFrame - Supplies a pointer to a trap frame. 00275 00276 Return Value: 00277 00278 A value of TRUE is returned if the data reference is successfully 00279 emulated. Otherwise, a value of FALSE is returned. 00280 00281 --*/ 00282 00283 { 00284 00285 ULONG BranchAddress; 00286 PUCHAR DataAddress; 00287 00288 union { 00289 DOUBLE Double; 00290 float Float; 00291 ULONG Long; 00292 SHORT Short; 00293 } DataReference; 00294 PUCHAR DataValue = (PUCHAR) &DataReference; 00295 00296 PVOID ExceptionAddress; 00297 DSISR DsisrValue; 00298 ULONG TableIndex; 00299 ULONG DataRegNum; 00300 ALFAULT Info; 00301 KIRQL OldIrql; 00302 00303 // 00304 // Call out to profile interrupt if alignment profiling is active 00305 // 00306 if (KiProfileAlignmentFixup) { 00307 00308 if (++KiProfileAlignmentFixupCount >= KiProfileAlignmentFixupInterval) { 00309 00310 KeRaiseIrql(PROFILE_LEVEL, &OldIrql); 00311 KiProfileAlignmentFixupCount = 0; 00312 KeProfileInterruptWithSource(TrapFrame, ProfileAlignmentFixup); 00313 KeLowerIrql(OldIrql); 00314 00315 } 00316 } 00317 00318 // 00319 // Save the original exception address in case another exception 00320 // occurs. 00321 // 00322 00323 ExceptionAddress = ExceptionRecord->ExceptionAddress; 00324 00325 // 00326 // Any exception that occurs during the attempted emulation of the 00327 // unaligned reference causes the emulation to be aborted. The new 00328 // exception code and information is copied to the original exception 00329 // record and a value of FALSE is returned. 00330 // 00331 00332 try { 00333 00334 // 00335 // PowerPC has no branch-delay-slot complexities like MIPS 00336 // 00337 00338 BranchAddress = TrapFrame->Iar + 4; 00339 00340 // 00341 // The effective address of the reference from the DAR was saved 00342 // in the exception record. Check to make sure it is within the 00343 // user part of the address space. Alignment exceptions take 00344 // precedence over memory management exceptions (this is true 00345 // for PowerPC as well as MIPS) and the address could be a 00346 // system address. 00347 // 00348 00349 DataAddress = (PUCHAR) (ExceptionRecord->ExceptionInformation[1]); 00350 00351 if ((ULONG)DataAddress < MM_USER_PROBE_ADDRESS) { 00352 00353 // 00354 // Get information about the failing instruction from saved DSISR. 00355 // 00356 00357 DsisrValue = *(DSISR*) &(ExceptionRecord->ExceptionInformation[2]); 00358 TableIndex = DsisrValue.Index; 00359 DataRegNum = DsisrValue.DataReg; 00360 Info = AlFault[TableIndex]; 00361 00362 // 00363 // If table entry is marked invalid, we have some sort of logic error. 00364 // 00365 00366 if (!Info.Valid) 00367 return FALSE; 00368 00369 // 00370 // If table entry does not indicate special processing needed, 00371 // emulate the execution of the instruction 00372 // 00373 00374 if (!Info.Escape) { 00375 00376 // 00377 // Integer or float load or store 00378 // 00379 00380 if (Info.Fixed) { 00381 00382 // 00383 // Integer register 00384 // 00385 00386 if (Info.Load) { 00387 00388 // 00389 // Integer load 00390 // 00391 00392 switch (Info.Length) { 00393 00394 // 00395 // Halfword integer load 00396 // 00397 00398 case 1: 00399 DataValue[0] = DataAddress[0]; 00400 DataValue[1] = DataAddress[1]; 00401 KiSetRegisterValue 00402 (DataRegNum, 00403 Info.Signed ? // sign extension ... 00404 (ULONG) ((LONG) DataReference.Short) : 00405 (ULONG) ((USHORT) DataReference.Short), 00406 ExceptionFrame, 00407 TrapFrame); 00408 break; 00409 00410 // 00411 // Fullword integer load 00412 // 00413 00414 case 2: 00415 DataValue[0] = DataAddress[0]; 00416 DataValue[1] = DataAddress[1]; 00417 DataValue[2] = DataAddress[2]; 00418 DataValue[3] = DataAddress[3]; 00419 KiSetRegisterValue 00420 (DataRegNum, 00421 DataReference.Long, 00422 ExceptionFrame, 00423 TrapFrame); 00424 break; 00425 00426 // 00427 // Doubleword integer load 00428 // 00429 00430 case 3: 00431 return FALSE; // Have no 8-byte integer regs yet 00432 00433 } 00434 } else { 00435 00436 // 00437 // Integer store 00438 // 00439 00440 switch (Info.Length) { 00441 00442 // 00443 // Halfword integer store 00444 // 00445 00446 case 1: 00447 DataReference.Short = (SHORT) 00448 KiGetRegisterValue 00449 (DataRegNum, 00450 ExceptionFrame, 00451 TrapFrame); 00452 DataAddress[0] = DataValue[0]; 00453 DataAddress[1] = DataValue[1]; 00454 break; 00455 00456 // 00457 // Fullword integer store 00458 // 00459 00460 case 2: // Word 00461 DataReference.Long = 00462 KiGetRegisterValue 00463 (DataRegNum, 00464 ExceptionFrame, 00465 TrapFrame); 00466 DataAddress[0] = DataValue[0]; 00467 DataAddress[1] = DataValue[1]; 00468 DataAddress[2] = DataValue[2]; 00469 DataAddress[3] = DataValue[3]; 00470 break; 00471 00472 // 00473 // Doubleword integer store 00474 // 00475 00476 case 3: 00477 00478 return FALSE; // Have no 8-byte integer regs yet 00479 } 00480 } 00481 } else { // Floating point 00482 00483 // 00484 // Floating-point register 00485 // 00486 00487 if (Info.Load) { // Floating point load 00488 00489 // 00490 // Floating-point load 00491 // 00492 00493 if (Info.Length == 2) { 00494 00495 // 00496 // Floating-point single precision load 00497 // 00498 DataValue[0] = DataAddress[0]; 00499 DataValue[1] = DataAddress[1]; 00500 DataValue[2] = DataAddress[2]; 00501 DataValue[3] = DataAddress[3]; 00502 KiSetFloatRegisterValue 00503 (DataRegNum, 00504 (DOUBLE) DataReference.Float, 00505 ExceptionFrame, 00506 TrapFrame); 00507 00508 } else { 00509 00510 // 00511 // Floating-point double precision load 00512 // 00513 DataValue[0] = DataAddress[0]; 00514 DataValue[1] = DataAddress[1]; 00515 DataValue[2] = DataAddress[2]; 00516 DataValue[3] = DataAddress[3]; 00517 DataValue[4] = DataAddress[4]; 00518 DataValue[5] = DataAddress[5]; 00519 DataValue[6] = DataAddress[6]; 00520 DataValue[7] = DataAddress[7]; 00521 KiSetFloatRegisterValue 00522 (DataRegNum, 00523 DataReference.Double, 00524 ExceptionFrame, 00525 TrapFrame); 00526 } 00527 } else { 00528 00529 // 00530 // Floating-point store 00531 // 00532 00533 if (Info.Length == 2) { 00534 00535 // 00536 // Floating-point single precision store 00537 // 00538 00539 DataReference.Float = (float) 00540 KiGetFloatRegisterValue 00541 (DataRegNum, 00542 ExceptionFrame, 00543 TrapFrame); 00544 DataAddress[0] = DataValue[0]; 00545 DataAddress[1] = DataValue[1]; 00546 DataAddress[2] = DataValue[2]; 00547 DataAddress[3] = DataValue[3]; 00548 00549 } else { 00550 00551 // 00552 // Floating-point double precision store 00553 // 00554 DataReference.Double = 00555 KiGetFloatRegisterValue 00556 (DataRegNum, 00557 ExceptionFrame, 00558 TrapFrame); 00559 DataAddress[0] = DataValue[0]; 00560 DataAddress[1] = DataValue[1]; 00561 DataAddress[2] = DataValue[2]; 00562 DataAddress[3] = DataValue[3]; 00563 DataAddress[4] = DataValue[4]; 00564 DataAddress[5] = DataValue[5]; 00565 DataAddress[6] = DataValue[6]; 00566 DataAddress[7] = DataValue[7]; 00567 } 00568 } 00569 } 00570 00571 // 00572 // See if "update" (post-increment) form of addressing 00573 // 00574 00575 if (Info.Update) 00576 KiSetRegisterValue // Store effective addr back into base reg 00577 (DsisrValue.UpdateReg, 00578 (ULONG) DataAddress, 00579 ExceptionFrame, 00580 TrapFrame); 00581 00582 } 00583 00584 // 00585 // Table indicates that special processing is needed, either because 00586 // the DSISR does not contain enough information to disambiguate the 00587 // failing instruction, or the instruction is not a load or store, 00588 // or the instruction has some other unusual requirement. 00589 // 00590 00591 else { // Info.Escape == 1 00592 switch (TableIndex) { 00593 00594 // 00595 // Doubleword integers not yet supported 00596 // 00597 00598 case LD_INDEX_VALUE: 00599 case STD_INDEX_VALUE: 00600 return FALSE; 00601 00602 // 00603 // Load-and-reserve, store-conditional not supported 00604 // for misaligned addresses 00605 // 00606 00607 case LDARX_INDEX_VALUE: 00608 case STWCX_INDEX_VALUE: 00609 case STDCX_INDEX_VALUE: 00610 return FALSE; 00611 00612 // 00613 // Integer byte-reversed fullword load 00614 // 00615 00616 case LWBRX_INDEX_VALUE: 00617 DataValue[0] = DataAddress[3]; 00618 DataValue[1] = DataAddress[2]; 00619 DataValue[2] = DataAddress[1]; 00620 DataValue[3] = DataAddress[0]; 00621 KiSetRegisterValue 00622 (DataRegNum, 00623 DataReference.Long, 00624 ExceptionFrame, 00625 TrapFrame); 00626 break; 00627 00628 // 00629 // Integer byte-reversed fullword store 00630 // 00631 00632 case STWBRX_INDEX_VALUE: 00633 DataReference.Long = 00634 KiGetRegisterValue 00635 (DataRegNum, 00636 ExceptionFrame, 00637 TrapFrame); 00638 DataAddress[0] = DataValue[3]; 00639 DataAddress[1] = DataValue[2]; 00640 DataAddress[2] = DataValue[1]; 00641 DataAddress[3] = DataValue[0]; 00642 break; 00643 00644 // 00645 // Integer byte-reversed halfword load 00646 // 00647 00648 case LHBRX_INDEX_VALUE: 00649 DataValue[0] = DataAddress[1]; 00650 DataValue[1] = DataAddress[0]; 00651 KiSetRegisterValue 00652 (DataRegNum, 00653 Info.Signed ? // sign extension ... 00654 (ULONG) ((LONG) DataReference.Short) : 00655 (ULONG) ((USHORT) DataReference.Short), 00656 ExceptionFrame, 00657 TrapFrame); 00658 break; 00659 00660 // 00661 // Integer byte-reversed halfword store 00662 // 00663 00664 case STHBRX_INDEX_VALUE: 00665 DataReference.Short = (SHORT) 00666 KiGetRegisterValue 00667 (DataRegNum, 00668 ExceptionFrame, 00669 TrapFrame); 00670 DataAddress[0] = DataValue[1]; 00671 DataAddress[1] = DataValue[0]; 00672 break; 00673 00674 // 00675 // Special I/O instructions not supported yet 00676 // 00677 00678 case ECIWX_INDEX_VALUE: 00679 case ECOWX_INDEX_VALUE: 00680 return FALSE; 00681 00682 // 00683 // Data Cache Block Zero 00684 // 00685 // dcbz causes an alignment fault if cache is disabled 00686 // for the address range covered by the block. 00687 // 00688 // A data cache block is 32 bytes long, we emulate this 00689 // instruction by storing 8 zero integers a the address 00690 // specified. 00691 // 00692 // Note, dcbz zeros the block "containing" the address 00693 // so we round down first. 00694 // 00695 00696 case DCBZ_INDEX_VALUE: { 00697 PULONG DcbAddress = (PULONG)((ULONG)DataAddress & ~0x1f); 00698 00699 *DcbAddress++ = 0; 00700 *DcbAddress++ = 0; 00701 *DcbAddress++ = 0; 00702 *DcbAddress++ = 0; 00703 *DcbAddress++ = 0; 00704 *DcbAddress++ = 0; 00705 *DcbAddress++ = 0; 00706 *DcbAddress++ = 0; 00707 break; 00708 } 00709 00710 // 00711 // Store Floating as Integer 00712 // 00713 00714 case STFIWX_INDEX_VALUE: 00715 DataReference.Double = 00716 KiGetFloatRegisterValue 00717 (DataRegNum, 00718 ExceptionFrame, 00719 TrapFrame); 00720 DataAddress[0] = DataValue[0]; 00721 DataAddress[1] = DataValue[1]; 00722 DataAddress[2] = DataValue[2]; 00723 DataAddress[3] = DataValue[3]; 00724 } 00725 } 00726 00727 TrapFrame->Iar = BranchAddress; 00728 return TRUE; 00729 } 00730 00731 // 00732 // If an exception occurs, then copy the new exception information to the 00733 // original exception record and handle the exception. 00734 // 00735 00736 } except (KiCopyInformation(ExceptionRecord, 00737 (GetExceptionInformation())->ExceptionRecord)) { 00738 00739 // 00740 // Preserve the original exception address. 00741 // 00742 00743 ExceptionRecord->ExceptionAddress = ExceptionAddress; 00744 } 00745 00746 // 00747 // Return a value of FALSE. 00748 // 00749 00750 return FALSE; 00751 }

DOUBLE KiGetFloatRegisterValue IN  ULONG,
IN  PKEXCEPTION_FRAME,
IN  PKTRAP_FRAME
 

Definition at line 276 of file ppc/getsetrg.c.

Referenced by get_fp_register(), and KiEmulateReference().

00284 : 00285 00286 This function is called to get the value of a floating point register 00287 from the specified exception or trap frame. 00288 00289 Arguments: 00290 00291 Register - Supplies the number of the register whose value is to be 00292 returned. Only FPRs (float regs) are supported, numbered 0..31. 00293 00294 ExceptionFrame - Supplies a pointer to an exception frame. 00295 00296 TrapFrame - Supplies a pointer to a trap frame. 00297 00298 Return Value: 00299 00300 The value of the specified register is returned as the function value. 00301 00302 --*/ 00303 00304 { 00305 00306 // 00307 // Dispatch on the FP register number. 00308 // 00309 00310 switch (Register) { 00311 case 0: 00312 return TrapFrame->Fpr0; 00313 case 1: 00314 return TrapFrame->Fpr1; 00315 case 2: 00316 return TrapFrame->Fpr2; 00317 case 3: 00318 return TrapFrame->Fpr3; 00319 case 4: 00320 return TrapFrame->Fpr4; 00321 case 5: 00322 return TrapFrame->Fpr5; 00323 case 6: 00324 return TrapFrame->Fpr6; 00325 case 7: 00326 return TrapFrame->Fpr7; 00327 case 8: 00328 return TrapFrame->Fpr8; 00329 case 9: 00330 return TrapFrame->Fpr9; 00331 case 10: 00332 return TrapFrame->Fpr10; 00333 case 11: 00334 return TrapFrame->Fpr11; 00335 case 12: 00336 return TrapFrame->Fpr12; 00337 case 13: 00338 return TrapFrame->Fpr13; 00339 case 14: 00340 return ExceptionFrame->Fpr14; 00341 case 15: 00342 return ExceptionFrame->Fpr15; 00343 case 16: 00344 return ExceptionFrame->Fpr16; 00345 case 17: 00346 return ExceptionFrame->Fpr17; 00347 case 18: 00348 return ExceptionFrame->Fpr18; 00349 case 19: 00350 return ExceptionFrame->Fpr19; 00351 case 20: 00352 return ExceptionFrame->Fpr20; 00353 case 21: 00354 return ExceptionFrame->Fpr21; 00355 case 22: 00356 return ExceptionFrame->Fpr22; 00357 case 23: 00358 return ExceptionFrame->Fpr23; 00359 case 24: 00360 return ExceptionFrame->Fpr24; 00361 case 25: 00362 return ExceptionFrame->Fpr25; 00363 case 26: 00364 return ExceptionFrame->Fpr26; 00365 case 27: 00366 return ExceptionFrame->Fpr27; 00367 case 28: 00368 return ExceptionFrame->Fpr28; 00369 case 29: 00370 return ExceptionFrame->Fpr29; 00371 case 30: 00372 return ExceptionFrame->Fpr30; 00373 case 31: 00374 return ExceptionFrame->Fpr31; 00375 } 00376 }

VOID KiSetFloatRegisterValue IN  ULONG,
IN  DOUBLE,
OUT  PKEXCEPTION_FRAME,
OUT  PKTRAP_FRAME
 

Definition at line 379 of file ppc/getsetrg.c.

Referenced by KiEmulateReference(), and set_fp_register().

00388 : 00389 00390 This function is called to set the value of a floating point register 00391 in the specified exception or trap frame. 00392 00393 Arguments: 00394 00395 Register - Supplies the number of the register whose value is to be 00396 stored. This routine handles only Fprs (float regs), numbered 0..31. 00397 00398 Value - Supplies the value to be stored in the specified register. 00399 00400 ExceptionFrame - Supplies a pointer to an exception frame. 00401 00402 TrapFrame - Supplies a pointer to a trap frame. 00403 00404 Return Value: 00405 00406 None. 00407 00408 --*/ 00409 00410 { 00411 00412 // 00413 // Dispatch on the FP register number. 00414 // 00415 00416 switch (Register) { 00417 00418 case 0: 00419 TrapFrame->Fpr0 = Value; 00420 return; 00421 case 1: 00422 TrapFrame->Fpr1 = Value; 00423 return; 00424 case 2: 00425 TrapFrame->Fpr2 = Value; 00426 return; 00427 case 3: 00428 TrapFrame->Fpr3 = Value; 00429 return; 00430 case 4: 00431 TrapFrame->Fpr4 = Value; 00432 return; 00433 case 5: 00434 TrapFrame->Fpr5 = Value; 00435 return; 00436 case 6: 00437 TrapFrame->Fpr6 = Value; 00438 return; 00439 case 7: 00440 TrapFrame->Fpr7 = Value; 00441 return; 00442 case 8: 00443 TrapFrame->Fpr8 = Value; 00444 return; 00445 case 9: 00446 TrapFrame->Fpr9 = Value; 00447 return; 00448 case 10: 00449 TrapFrame->Fpr10 = Value; 00450 return; 00451 case 11: 00452 TrapFrame->Fpr11 = Value; 00453 return; 00454 case 12: 00455 TrapFrame->Fpr12 = Value; 00456 return; 00457 case 13: 00458 TrapFrame->Fpr13 = Value; 00459 return; 00460 case 14: 00461 ExceptionFrame->Fpr14 = Value; 00462 return; 00463 case 15: 00464 ExceptionFrame->Fpr15 = Value; 00465 return; 00466 case 16: 00467 ExceptionFrame->Fpr16 = Value; 00468 return; 00469 case 17: 00470 ExceptionFrame->Fpr17 = Value; 00471 return; 00472 case 18: 00473 ExceptionFrame->Fpr18 = Value; 00474 return; 00475 case 19: 00476 ExceptionFrame->Fpr19 = Value; 00477 return; 00478 case 20: 00479 ExceptionFrame->Fpr20 = Value; 00480 return; 00481 case 21: 00482 ExceptionFrame->Fpr21 = Value; 00483 return; 00484 case 22: 00485 ExceptionFrame->Fpr22 = Value; 00486 return; 00487 case 23: 00488 ExceptionFrame->Fpr23 = Value; 00489 return; 00490 case 24: 00491 ExceptionFrame->Fpr24 = Value; 00492 return; 00493 case 25: 00494 ExceptionFrame->Fpr25 = Value; 00495 return; 00496 case 26: 00497 ExceptionFrame->Fpr26 = Value; 00498 return; 00499 case 27: 00500 ExceptionFrame->Fpr27 = Value; 00501 return; 00502 case 28: 00503 ExceptionFrame->Fpr28 = Value; 00504 return; 00505 case 29: 00506 ExceptionFrame->Fpr29 = Value; 00507 return; 00508 case 30: 00509 ExceptionFrame->Fpr30 = Value; 00510 return; 00511 case 31: 00512 ExceptionFrame->Fpr31 = Value; 00513 return; 00514 00515 } 00516 } }


Variable Documentation

ALFAULT AlFault[128] [static]
 

Definition at line 121 of file ppc/alignem.c.

Referenced by KiEmulateDcbz(), and KiEmulateReference().


Generated on Sat May 15 19:42:50 2004 for test by doxygen 1.3.7