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

ipi.c File Reference

#include "ki.h"

Go to the source code of this file.

Functions

VOID KiRestoreProcessorControlState (IN PKPROCESSOR_STATE ProcessorState)
VOID KiSaveProcessorControlState (IN PKPROCESSOR_STATE ProcessorState)
VOID KiRestoreProcessorState (IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame)
VOID KiSaveProcessorState (IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame)
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 156 of file ppc/ipi.c.

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

Referenced by KeFreezeExecution().

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

VOID KiRestoreProcessorControlState IN PKPROCESSOR_STATE  ProcessorState  ) 
 

Referenced by KdpTrap(), and KiRestoreProcessorState().

VOID KiRestoreProcessorState IN PKTRAP_FRAME  TrapFrame,
IN PKEXCEPTION_FRAME  ExceptionFrame
 

Definition at line 46 of file ppc/ipi.c.

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

Referenced by KdpTrap(), and KiFreezeTargetExecution().

00053 : 00054 00055 This function moves processor register state from the current 00056 processor context structure in the processor block to the 00057 specified trap and exception frames. 00058 00059 Arguments: 00060 00061 TrapFrame - Supplies a pointer to a trap frame. 00062 00063 ExceptionFrame - Supplies a pointer to an exception frame. 00064 00065 Return Value: 00066 00067 None. 00068 00069 --*/ 00070 00071 { 00072 00073 PKPRCB Prcb; 00074 00075 // 00076 // Get the address of the current processor block and move the 00077 // specified register state from the processor context structure 00078 // to the specified trap and exception frames 00079 // 00080 Prcb = KeGetCurrentPrcb(); 00081 00082 #if !defined(NT_UP) 00083 00084 KeContextToKframes(TrapFrame, 00085 ExceptionFrame, 00086 &Prcb->ProcessorState.ContextFrame, 00087 CONTEXT_FULL, 00088 KernelMode); 00089 00090 #endif 00091 00092 // 00093 // Restore the current processor control state. 00094 // Currently, the primary use is to allow the kernel 00095 // debugger to set hardware debug registers. Still 00096 // investigating whether this is required for MP systems. 00097 // 00098 00099 KiRestoreProcessorControlState(&Prcb->ProcessorState); 00100 return; 00101 }

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 104 of file ppc/ipi.c.

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

Referenced by KdpTrap(), and KiFreezeTargetExecution().

00111 : 00112 00113 This function moves processor register state from the specified trap 00114 and exception frames to the processor context structure in the current 00115 processor block. 00116 00117 Arguments: 00118 00119 TrapFrame - Supplies a pointer to a trap frame. 00120 00121 ExceptionFrame - Supplies a pointer to an exception frame. 00122 00123 Return Value: 00124 00125 None. 00126 00127 --*/ 00128 00129 { 00130 00131 PKPRCB Prcb; 00132 00133 // 00134 // Get the address of the current processor block and move the 00135 // specified register state from specified trap and exception 00136 // frames to the current processor context structure. 00137 // 00138 00139 Prcb = KeGetCurrentPrcb(); 00140 Prcb->ProcessorState.ContextFrame.ContextFlags = CONTEXT_FULL | 00141 CONTEXT_DEBUG_REGISTERS; 00142 KeContextFromKframes(TrapFrame, 00143 ExceptionFrame, 00144 &Prcb->ProcessorState.ContextFrame); 00145 00146 // 00147 // Save the current processor control state. 00148 // 00149 Prcb->ProcessorState.SpecialRegisters.KernelDr6 = 00150 Prcb->ProcessorState.ContextFrame.Dr6; 00151 KiSaveProcessorControlState(&Prcb->ProcessorState); 00152 return; 00153 }


Generated on Sat May 15 19:44:23 2004 for test by doxygen 1.3.7