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

flushtb.c File Reference

#include "ki.h"

Go to the source code of this file.

Functions

VOID KeFlushEntireTb (IN BOOLEAN Invalid, IN BOOLEAN AllProcessors)
VOID KeFlushMultipleTb (IN ULONG Number, IN PVOID *Virtual, IN BOOLEAN Invalid, IN BOOLEAN AllProcessors, IN PHARDWARE_PTE *PtePointer OPTIONAL, IN HARDWARE_PTE PteValue)
HARDWARE_PTE KeFlushSingleTb (IN PVOID Virtual, IN BOOLEAN Invalid, IN BOOLEAN AllProcessors, IN PHARDWARE_PTE PtePointer, IN HARDWARE_PTE PteValue)


Function Documentation

VOID KeFlushEntireTb IN BOOLEAN  Invalid,
IN BOOLEAN  AllProcessors
 

Definition at line 33 of file ppc/flushtb.c.

References ASSERT, IPI_INSTRUMENT_COUNT, KeFlushCurrentTb(), KeGetCurrentPrcb, KeLowerIrql(), and SYNCH_LEVEL.

Referenced by MiCheckVirtualAddress(), MiDownShareCountFlushEntireTb(), MiFlushPteList(), MiFlushUserPhysicalPteList(), MiHandleBankedSection(), MiInitMachineDependent(), MiMapBBTMemory(), MiMapLockedPagesInUserSpace(), MiMapPageInHyperSpace(), MiMapSinglePage(), MiMapViewOfPhysicalSection(), MiReleaseSystemPtes(), MiRemoveMappedView(), MiReserveSystemPtes(), MiResolveMappedFileFault(), MmAllocateNonCachedMemory(), MmFreeLoaderBlock(), MmMapIoSpace(), MmMapLockedPagesSpecifyCache(), MmMapUserAddressesToPage(), MmMapViewInSystemCache(), MmOutPageKernelStack(), MmSetAddressRangeModified(), and MmSetBankedSection().

00040 : 00041 00042 This function flushes the entire translation buffer (TB) on all 00043 processors that are currently running threads which are children 00044 of the current process or flushes the entire translation buffer 00045 on all processors in the host configuration. 00046 00047 N.B. The entire translation buffer on all processors in the host 00048 configuration is always flushed since PowerPC TB is tagged by 00049 VSID and translations are held across context switch boundaries. 00050 00051 Arguments: 00052 00053 Invalid - Supplies a boolean value that specifies the reason for 00054 flushing the translation buffer. 00055 00056 AllProcessors - Supplies a boolean value that determines which 00057 translation buffers are to be flushed. 00058 00059 Return Value: 00060 00061 None. 00062 00063 --*/ 00064 00065 { 00066 00067 KIRQL OldIrql; 00068 00069 ASSERT(KeGetCurrentIrql() <= SYNCH_LEVEL); 00070 00071 #if !defined(NT_UP) 00072 00073 // 00074 // Raise IRQL to synchronization level to avoid a possible context switch. 00075 // 00076 00077 OldIrql = KeRaiseIrqlToSynchLevel(); 00078 00079 IPI_INSTRUMENT_COUNT(KeGetCurrentPrcb()->Number, FlushEntireTb); 00080 00081 #endif 00082 00083 // 00084 // Flush TB on current processor. 00085 // PowerPC hardware broadcasts if MP. 00086 // 00087 00088 KeFlushCurrentTb(); 00089 00090 #if !defined(NT_UP) 00091 00092 // 00093 // Lower IRQL to previous level. 00094 // 00095 00096 KeLowerIrql(OldIrql); 00097 00098 #endif 00099 00100 return; 00101 }

VOID KeFlushMultipleTb IN ULONG  Number,
IN PVOID *  Virtual,
IN BOOLEAN  Invalid,
IN BOOLEAN  AllProcessors,
IN PHARDWARE_PTE *PtePointer  OPTIONAL,
IN HARDWARE_PTE  PteValue
 

Definition at line 104 of file ppc/flushtb.c.

References ASSERT, DISPATCH_LEVEL, Index, IPI_INSTRUMENT_COUNT, KeGetCurrentPrcb, KiFlushSingleTb(), and Virtual.

Referenced by MiFlushPteList(), MiFlushUserPhysicalPteList(), MmOutPageKernelStack(), and MmSetAddressRangeModified().

00115 : 00116 00117 This function flushes multiple entries from the translation buffer 00118 on all processors that are currently running threads which are 00119 children of the current process or flushes multiple entries from 00120 the translation buffer on all processors in the host configuration. 00121 00122 N.B. The specified translation entries on all processors in the host 00123 configuration are always flushed since PowerPC TB is tagged by 00124 VSID and translations are held across context switch boundaries. 00125 00126 Arguments: 00127 00128 Number - Supplies the number of TB entries to flush. 00129 00130 Virtual - Supplies a pointer to an array of virtual addresses that 00131 are within the pages whose translation buffer entries are to be 00132 flushed. 00133 00134 Invalid - Supplies a boolean value that specifies the reason for 00135 flushing the translation buffer. 00136 00137 AllProcessors - Supplies a boolean value that determines which 00138 translation buffers are to be flushed. 00139 00140 PtePointer - Supplies an optional pointer to an array of pointers to 00141 page table entries that receive the specified page table entry 00142 value. 00143 00144 PteValue - Supplies the the new page table entry value. 00145 00146 Return Value: 00147 00148 None. 00149 00150 --*/ 00151 00152 { 00153 00154 ULONG Index; 00155 00156 ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL); 00157 00158 // 00159 // If a page table entry address array is specified, then set the 00160 // specified page table entries to the specific value. 00161 // 00162 00163 if (ARGUMENT_PRESENT(PtePointer)) { 00164 for (Index = 0; Index < Number; Index += 1) { 00165 *PtePointer[Index] = PteValue; 00166 } 00167 } 00168 00169 #if !defined(NT_UP) 00170 00171 IPI_INSTRUMENT_COUNT(KeGetCurrentPrcb()->Number, FlushSingleTb); 00172 00173 #endif 00174 00175 // 00176 // Flush the specified entries from the TB on the current processor. 00177 // PowerPC hardware broadcasts if MP. 00178 // 00179 00180 for (Index = 0; Index < Number; Index += 1) { 00181 KiFlushSingleTb(Invalid, Virtual[Index]); 00182 } 00183 00184 return; 00185 }

HARDWARE_PTE KeFlushSingleTb IN PVOID  Virtual,
IN BOOLEAN  Invalid,
IN BOOLEAN  AllProcessors,
IN PHARDWARE_PTE  PtePointer,
IN HARDWARE_PTE  PteValue
 

Definition at line 188 of file ppc/flushtb.c.

References ASSERT, DISPATCH_LEVEL, IPI_INSTRUMENT_COUNT, KeGetCurrentPrcb, KiFlushSingleCallData, KiFlushSingleTb(), RECORD_CALL_DATA, and Virtual.

Referenced by Ki386UseSynchronousTbFlush(), MiCopyOnWrite(), MiDeletePte(), MiEliminateWorkingSetEntry(), MiEnablePagingOfDriverAtInit(), MiFlushDirtyBitsToPfn(), MiFlushPteList(), MiFlushTbAndCapture(), MiFlushUserPhysicalPteList(), MiFreeNonPagedPool(), MiInitMachineDependent(), MiMapPageToZeroInHyperSpace(), MiMapSinglePage(), MiProtectFreeNonPagedPool(), MiProtectSpecialPool(), MiResetVirtualMemory(), MiSetPageModified(), MiSetPagingOfDriver(), MiSetSystemCodeProtection(), MiUnmapImageHeaderInHyperSpace(), MiUnmapLockedPagesInUserSpace(), MmFreeSpecialPool(), MmMapUserAddressesToPage(), MmRemovePhysicalMemory(), MmSetAddressRangeModified(), and MmSetPageProtection().

00198 : 00199 00200 This function flushes a single entry from the translation buffer 00201 on all processors that are currently running threads which are 00202 children of the current process or flushes a single entry from 00203 the translation buffer on all processors in the host configuration. 00204 00205 N.B. The specified translation entry on all processors in the host 00206 configuration is always flushed since PowerPC TB is tagged by 00207 VSID and translations are held across context switch boundaries. 00208 00209 Arguments: 00210 00211 Virtual - Supplies a virtual address that is within the page whose 00212 translation buffer entry is to be flushed. 00213 00214 Invalid - Supplies a boolean value that specifies the reason for 00215 flushing the translation buffer. 00216 00217 AllProcessors - Supplies a boolean value that determines which 00218 translation buffers are to be flushed. 00219 00220 PtePointer - Supplies a pointer to the page table entry which 00221 receives the specified value. 00222 00223 PteValue - Supplies the the new page table entry value. 00224 00225 Return Value: 00226 00227 The previous contents of the specified page table entry is returned 00228 as the function value. 00229 00230 --*/ 00231 00232 { 00233 00234 HARDWARE_PTE OldPte; 00235 00236 ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL); 00237 00238 // 00239 // Collect call data. 00240 // 00241 00242 #if defined(_COLLECT_FLUSH_SINGLE_CALLDATA_) 00243 00244 RECORD_CALL_DATA(&KiFlushSingleCallData); 00245 00246 #endif 00247 00248 // 00249 // Capture the previous contents of the page table entry and set the 00250 // page table entry to the new value. 00251 // 00252 00253 OldPte = *PtePointer; 00254 *PtePointer = PteValue; 00255 00256 #if !defined(NT_UP) 00257 00258 IPI_INSTRUMENT_COUNT(KeGetCurrentPrcb()->Number, FlushSingleTb); 00259 00260 #endif 00261 00262 // 00263 // Flush the specified entry from the TB on the current processor. 00264 // PowerPC hardware broadcasts if MP. 00265 // 00266 00267 KiFlushSingleTb(Invalid, Virtual); 00268 00269 // 00270 // Return the previous page table entry value. 00271 // 00272 00273 return OldPte; 00274 } }


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