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

xxmpipi.c File Reference

#include "ki.h"

Go to the source code of this file.

Functions

VOID KiRestoreProcessorState (IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame)
VOID KiSaveProcessorState (IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame)
VOID KiSaveProcessorControlState (IN PKPROCESSOR_STATE ProcessorState)
BOOLEAN KiIpiServiceRoutine (IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame)


Function Documentation

BOOLEAN KiIpiServiceRoutine IN PKTRAP_FRAME  TrapFrame,
IN PKEXCEPTION_FRAME  ExceptionFrame
 

Definition at line 160 of file xxmpipi.c.

References IPI_FREEZE, KiFreezeTargetExecution(), and KiIpiProcessRequests().

00167 : 00168 00169 00170 This function is called at IPI_LEVEL to process any outstanding 00171 interprocess request for the current processor. 00172 00173 Arguments: 00174 00175 TrapFrame - Supplies a pointer to a trap frame. 00176 00177 ExceptionFrame - Supplies a pointer to an exception frame 00178 00179 Return Value: 00180 00181 A value of TRUE is returned, if one of more requests were service. 00182 Otherwise, FALSE is returned. 00183 00184 --*/ 00185 00186 { 00187 00188 ULONG RequestSummary; 00189 00190 // 00191 // Process any outstanding interprocessor requests. 00192 // 00193 00194 RequestSummary = KiIpiProcessRequests(); 00195 00196 // 00197 // If freeze is requested, then freeze target execution. 00198 // 00199 00200 if ((RequestSummary & IPI_FREEZE) != 0) { 00201 KiFreezeTargetExecution(TrapFrame, ExceptionFrame); 00202 } 00203 00204 // 00205 // Return whether any requests were processed. 00206 // 00207 00208 return (RequestSummary & ~IPI_FREEZE) != 0; 00209 } }

VOID KiRestoreProcessorState IN PKTRAP_FRAME  TrapFrame,
IN PKEXCEPTION_FRAME  ExceptionFrame
 

Definition at line 28 of file xxmpipi.c.

References CONTEXT_FULL, KeContextToKframes(), KeGetCurrentPrcb, and KernelMode.

00035 : 00036 00037 This function moves processor register state from the current 00038 processor context structure in the processor block to the 00039 specified trap and exception frames. 00040 00041 Arguments: 00042 00043 TrapFrame - Supplies a pointer to a trap frame. 00044 00045 ExceptionFrame - Supplies a pointer to an exception frame. 00046 00047 Return Value: 00048 00049 None. 00050 00051 --*/ 00052 00053 { 00054 00055 PKPRCB Prcb; 00056 00057 // 00058 // Get the address of the current processor block and move the 00059 // specified register state from the processor context structure 00060 // to the specified trap and exception frames 00061 // 00062 00063 Prcb = KeGetCurrentPrcb(); 00064 KeContextToKframes(TrapFrame, 00065 ExceptionFrame, 00066 &Prcb->ProcessorState.ContextFrame, 00067 CONTEXT_FULL, 00068 KernelMode); 00069 00070 return; 00071 }

VOID KiSaveProcessorControlState IN PKPROCESSOR_STATE  ProcessorState  ) 
 

Definition at line 124 of file xxmpipi.c.

References Index.

Referenced by ExpSystemErrorHandler(), KdpTrap(), KeBugCheckEx(), KeSaveStateForHibernate(), and KiSaveProcessorState().

00130 : 00131 00132 This routine saves the processor's control state for debugger. 00133 00134 Arguments: 00135 00136 ProcessorState (a0) - Supplies a pointer to the processor state. 00137 00138 Return Value: 00139 00140 None. 00141 00142 --*/ 00143 00144 { 00145 00146 ULONG Index; 00147 00148 // 00149 // Read Tb entries and store in the processor state structure. 00150 // 00151 00152 for (Index = 0; Index < KeNumberTbEntries; Index += 1) { 00153 KiReadEntryTb(Index, &ProcessorState->TbEntry[Index]); 00154 } 00155 00156 return; 00157 }

VOID KiSaveProcessorState IN PKTRAP_FRAME  TrapFrame,
IN PKEXCEPTION_FRAME  ExceptionFrame
 

Definition at line 74 of file xxmpipi.c.

References CONTEXT_FULL, KeContextFromKframes(), KeGetCurrentPrcb, and KiSaveProcessorControlState().

00081 : 00082 00083 This function moves processor register state from the specified trap 00084 and exception frames to the processor context structure in the current 00085 processor block. 00086 00087 Arguments: 00088 00089 TrapFrame - Supplies a pointer to a trap frame. 00090 00091 ExceptionFrame - Supplies a pointer to an exception frame. 00092 00093 Return Value: 00094 00095 None. 00096 00097 --*/ 00098 00099 { 00100 00101 PKPRCB Prcb; 00102 00103 // 00104 // Get the address of the current processor block and move the 00105 // specified register state from specified trap and exception 00106 // frames to the current processor context structure. 00107 // 00108 00109 Prcb = KeGetCurrentPrcb(); 00110 Prcb->ProcessorState.ContextFrame.ContextFlags = CONTEXT_FULL; 00111 KeContextFromKframes(TrapFrame, 00112 ExceptionFrame, 00113 &Prcb->ProcessorState.ContextFrame); 00114 00115 // 00116 // Save the current processor control state. 00117 // 00118 00119 KiSaveProcessorControlState(&Prcb->ProcessorState); 00120 return; 00121 }


Generated on Sat May 15 19:46:11 2004 for test by doxygen 1.3.7