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

miscc.c File Reference

#include "ntrtlp.h"

Go to the source code of this file.

Functions

VOID RtlpFlushRSE (OUT PULONGLONG BackingStore, OUT PULONGLONG RNat)
VOID RtlpCaptureRnats (IN OUT PCONTEXT ContextRecord)
VOID Rtlp64GetBStoreLimits (OUT PULONGLONG LowBStoreLimit, OUT PULONGLONG HighBStoreLimit)
VOID RtlpGetStackLimits (OUT PULONG_PTR LowStackLimit, OUT PULONG_PTR HighStackLimit)
VOID Rtlp64GetStackLimits (OUT PULONGLONG LowStackLimit, OUT PULONGLONG HighStackLimit)


Function Documentation

VOID Rtlp64GetBStoreLimits OUT PULONGLONG  LowBStoreLimit,
OUT PULONGLONG  HighBStoreLimit
 

Definition at line 75 of file rtl/ia64/miscc.c.

Referenced by RtlDispatchException(), RtlGetCallersAddress(), and RtlUnwind2().

00082 : 00083 00084 This function returns the current backing store limits based on the 00085 current processor mode. 00086 00087 Arguments: 00088 00089 LowBStoreLimit - Supplies a pointer to a variable that is to receive 00090 the low limit of the backing store. 00091 00092 HighBStoreLimit - Supplies a pointer to a variable that is to receive 00093 the high limit of the backing store. 00094 00095 Return Value: 00096 00097 None. 00098 00099 --*/ 00100 00101 { 00102 #if defined(NTOS_KERNEL_RUNTIME) 00103 00104 // 00105 // Kernel Mode 00106 // 00107 00108 *LowBStoreLimit = (ULONGLONG)(PCR->InitialBStore); 00109 *HighBStoreLimit = (ULONGLONG)(PCR->BStoreLimit); 00110 00111 #else 00112 00113 // 00114 // User Mode 00115 // 00116 00117 PTEB CurrentTeb = NtCurrentTeb(); 00118 00119 *HighBStoreLimit = (ULONGLONG)CurrentTeb->BStoreLimit; 00120 *LowBStoreLimit = (ULONGLONG)CurrentTeb->NtTib.StackBase; 00121 00122 #endif // defined(NTOS_KERNEL_RUNTIME) 00123 }

VOID Rtlp64GetStackLimits OUT PULONGLONG  LowStackLimit,
OUT PULONGLONG  HighStackLimit
 

Definition at line 178 of file rtl/ia64/miscc.c.

Referenced by RtlDispatchException(), RtlGetCallersAddress(), and RtlUnwind2().

00185 : 00186 00187 This function returns the current memory stack limits based on the 00188 current processor mode. 00189 00190 Arguments: 00191 00192 LowStackLimit - Supplies a pointer to a variable that is to receive 00193 the low limit of the memory stack. 00194 00195 HighStackLimit - Supplies a pointer to a variable that is to receive 00196 the high limit of the memory stack. 00197 00198 Return Value: 00199 00200 None. 00201 00202 --*/ 00203 00204 { 00205 00206 #if defined(NTOS_KERNEL_RUNTIME) 00207 00208 // 00209 // Kernel Mode 00210 // 00211 00212 *HighStackLimit = (ULONG_PTR)PCR->InitialStack; 00213 *LowStackLimit = (ULONG_PTR)PCR->StackLimit; 00214 00215 #else 00216 00217 // 00218 // User Mode 00219 // 00220 00221 PTEB CurrentTeb = NtCurrentTeb(); 00222 00223 *HighStackLimit = (ULONGLONG)CurrentTeb->NtTib.StackBase; 00224 *LowStackLimit = (ULONGLONG)CurrentTeb->NtTib.StackLimit; 00225 00226 #endif // defined(NTOS_KERNEL_RUNTIME) 00227 } }

VOID RtlpCaptureRnats IN OUT PCONTEXT  ContextRecord  ) 
 

Definition at line 37 of file rtl/ia64/miscc.c.

References RtlpFlushRSE(), and SHORT.

Referenced by KiDispatchException().

00043 : 00044 00045 This function captures Nat bits of all the stacked registers in 00046 the RSE frame specified in the context record. 00047 --*/ 00048 { 00049 SHORT BsFrameSize; // in 8-byte units 00050 SHORT TempFrameSize; // in 8-byte units 00051 SHORT RNatSaveIndex; 00052 ULONGLONG Rnat; 00053 ULONGLONG Bsp; 00054 ULONGLONG TopRnatAddress; 00055 00056 RtlpFlushRSE(&Bsp, &Rnat); 00057 00058 BsFrameSize = (SHORT)ContextRecord->StIFS & PFS_SIZE_MASK; 00059 RNatSaveIndex = (SHORT)(ContextRecord->RsBSP >> 3) & NAT_BITS_PER_RNAT_REG; 00060 TempFrameSize = RNatSaveIndex + BsFrameSize - NAT_BITS_PER_RNAT_REG; 00061 while (TempFrameSize >= 0) { 00062 BsFrameSize++; 00063 TempFrameSize -= NAT_BITS_PER_RNAT_REG; 00064 } 00065 TopRnatAddress = (ContextRecord->RsBSP + BsFrameSize * 8) | RNAT_ALIGNMENT; 00066 if (TopRnatAddress < Bsp) { 00067 ContextRecord->RsRNAT = *(PULONGLONG)TopRnatAddress; 00068 } else { 00069 ContextRecord->RsRNAT = Rnat; 00070 } 00071 }

VOID RtlpFlushRSE OUT PULONGLONG  BackingStore,
OUT PULONGLONG  RNat
 

Referenced by KiFlushUserRseState(), and RtlpCaptureRnats().

VOID RtlpGetStackLimits OUT PULONG_PTR  LowStackLimit,
OUT PULONG_PTR  HighStackLimit
 

Definition at line 126 of file rtl/ia64/miscc.c.

Referenced by RtlDispatchException(), RtlGetCallersAddress(), RtlUnwind(), RtlUnwind2(), RtlUnwindReturn(), and RtlUnwindRfp().

00133 : 00134 00135 This function returns the current memory stack limits based on the 00136 current processor mode. 00137 00138 Arguments: 00139 00140 LowStackLimit - Supplies a pointer to a variable that is to receive 00141 the low limit of the memory stack. 00142 00143 HighStackLimit - Supplies a pointer to a variable that is to receive 00144 the high limit of the memory stack. 00145 00146 Return Value: 00147 00148 None. 00149 00150 --*/ 00151 00152 { 00153 00154 #if defined(NTOS_KERNEL_RUNTIME) 00155 00156 // 00157 // Kernel Mode 00158 // 00159 00160 *HighStackLimit = (ULONG_PTR)PCR->InitialStack; 00161 *LowStackLimit = (ULONG_PTR)PCR->StackLimit; 00162 00163 #else 00164 00165 // 00166 // User Mode 00167 // 00168 00169 PTEB CurrentTeb = NtCurrentTeb(); 00170 00171 *HighStackLimit = (ULONG_PTR)CurrentTeb->NtTib.StackBase; 00172 *LowStackLimit = (ULONG_PTR)CurrentTeb->NtTib.StackLimit; 00173 00174 #endif // defined(NTOS_KERNEL_RUNTIME) 00175 }


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