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

i386.h File Reference

Go to the source code of this file.

Defines

#define KF_V86_VIS   0x00000001
#define KF_RDTSC   0x00000002
#define KF_CR4   0x00000004
#define KF_CMOV   0x00000008
#define KF_GLOBAL_PAGE   0x00000010
#define KF_LARGE_PAGE   0x00000020
#define KF_MTRR   0x00000040
#define KF_CMPXCHG8B   0x00000080
#define KF_MMX   0x00000100
#define KF_WORKING_PTE   0x00000200
#define KF_PAT   0x00000400
#define KF_FXSR   0x00000800
#define KF_FAST_SYSCALL   0x00001000
#define KF_XMMI   0x00002000
#define KF_3DNOW   0x00004000
#define KF_AMDK6MTRR   0x00008000
#define Isx86FeaturePresent(_f_)   ((KiBootFeatureBits & (_f_)) != 0)

Functions

VOID Ke386SetLdtProcess (struct _KPROCESS *Process, PLDT_ENTRY Ldt, ULONG Limit)
VOID Ke386SetDescriptorProcess (struct _KPROCESS *Process, ULONG Offset, LDT_ENTRY LdtEntry)
VOID Ke386GetGdtEntryThread (struct _KTHREAD *Thread, ULONG Offset, PKGDTENTRY Descriptor)
BOOLEAN Ke386SetIoAccessMap (ULONG MapNumber, PKIO_ACCESS_MAP IoAccessMap)
BOOLEAN Ke386QueryIoAccessMap (ULONG MapNumber, PKIO_ACCESS_MAP IoAccessMap)
BOOLEAN Ke386IoSetAccessProcess (struct _KPROCESS *Process, ULONG MapNumber)
VOID Ke386SetIOPL (struct _KPROCESS *Process)
NTSTATUS Ke386CallBios (IN ULONG BiosCommand, IN OUT PCONTEXT BiosArguments)
VOID KiEditIopmDpc (IN struct _KDPC *Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
BOOLEAN Ki386GetSelectorParameters (IN USHORT Selector, OUT PULONG Flags, OUT PULONG Base, OUT PULONG Limit)
NTSTATUS Ke386SetVdmInterruptHandler (IN struct _KPROCESS *Process, IN ULONG Interrupt, IN USHORT Selector, IN ULONG Offset, IN BOOLEAN Gate32)
NTSTATUS KeI386GetLid (IN USHORT DeviceId, IN USHORT RelativeLid, IN BOOLEAN SharedLid, IN struct _DRIVER_OBJECT *DeviceObject, OUT PUSHORT LogicalId)
NTSTATUS KeI386ReleaseLid (IN USHORT LogicalId, IN struct _DRIVER_OBJECT *DeviceObject)
NTSTATUS KeI386AbiosCall (IN USHORT LogicalId, IN struct _DRIVER_OBJECT *DriverObject, IN PUCHAR RequestBlock, IN USHORT EntryPoint)
NTSTATUS KeI386AllocateGdtSelectors (OUT PUSHORT SelectorArray, IN USHORT NumberOfSelectors)
VOID KeI386Call16BitFunction (IN OUT PCONTEXT Regs)
USHORT KeI386Call16BitCStyleFunction (IN ULONG EntryOffset, IN ULONG EntrySelector, IN PUCHAR Parameters, IN ULONG Size)
NTSTATUS KeI386FlatToGdtSelector (IN ULONG SelectorBase, IN USHORT Length, IN USHORT Selector)
NTSTATUS KeI386ReleaseGdtSelectors (OUT PUSHORT SelectorArray, IN USHORT NumberOfSelectors)
NTSTATUS KeI386SetGdtSelector (ULONG Selector, PKGDTENTRY GdtValue)
VOID KeOptimizeProcessorControlState (VOID)
BOOLEAN Ke386VdmInsertQueueApc (IN PKAPC Apc, IN struct _KTHREAD *Thread, IN KPROCESSOR_MODE ApcMode, IN PKKERNEL_ROUTINE KernelRoutine, IN PKRUNDOWN_ROUTINE RundownRoutine OPTIONAL, IN PKNORMAL_ROUTINE NormalRoutine OPTIONAL, IN PVOID NormalContext OPTIONAL, IN KPRIORITY Increment)
VOID Ke386VdmClearApcObject (IN PKAPC Apc)
VOID KeI386VdmInitialize (VOID)
VOID CPUID (ULONG InEax, PULONG OutEax, PULONG OutEbx, PULONG OutEcx, PULONG OutEdx)
LONGLONG RDTSC (VOID)
ULONGLONG FASTCALL RDMSR (IN ULONG MsrRegister)
VOID WRMSR (IN ULONG MsrRegister, IN ULONGLONG MsrValue)

Variables

ULONG KeI386EFlagsAndMaskV86
ULONG KeI386EFlagsOrMaskV86
BOOLEAN KeI386VdmIoplAllowed
ULONG KeI386VirtualIntExtensions
ULONG KeI386CpuType
ULONG KeI386CpuStep
BOOLEAN KeI386NpxPresent
BOOLEAN KeI386FxsrPresent
ULONG KiBootFeatureBits


Define Documentation

#define Isx86FeaturePresent _f_   )     ((KiBootFeatureBits & (_f_)) != 0)
 

Definition at line 2725 of file i386.h.

Referenced by ExAllocateFromPagedLookasideList(), ExAllocatePoolWithTag(), ExFreePoolWithTag(), and ExFreeToPagedLookasideList().

#define KF_3DNOW   0x00004000
 

Definition at line 2716 of file i386.h.

Referenced by KiInitializeKernel().

#define KF_AMDK6MTRR   0x00008000
 

Definition at line 2717 of file i386.h.

Referenced by KeRestoreMtrr(), KeSetPhysicalCacheTypeRange(), KiInitMachineDependent(), and KiLoadMTRR().

#define KF_CMOV   0x00000008
 

Definition at line 2705 of file i386.h.

#define KF_CMPXCHG8B   0x00000080
 

Definition at line 2709 of file i386.h.

Referenced by ExAllocateFromPagedLookasideList(), ExAllocatePoolWithTag(), ExFreePoolWithTag(), ExFreeToPagedLookasideList(), and KiInitializeKernel().

#define KF_CR4   0x00000004
 

Definition at line 2704 of file i386.h.

#define KF_FAST_SYSCALL   0x00001000
 

Definition at line 2714 of file i386.h.

#define KF_FXSR   0x00000800
 

Definition at line 2713 of file i386.h.

Referenced by KeSetup80387OrEmulate(), KiInitializeKernel(), and KiInitMachineDependent().

#define KF_GLOBAL_PAGE   0x00000010
 

Definition at line 2706 of file i386.h.

Referenced by KiInitializeKernel(), KiInitMachineDependent(), and MiInitMachineDependent().

#define KF_LARGE_PAGE   0x00000020
 

Definition at line 2707 of file i386.h.

Referenced by KiInitMachineDependent(), and MiInitMachineDependent().

#define KF_MMX   0x00000100
 

Definition at line 2710 of file i386.h.

Referenced by KeSetup80387OrEmulate(), and KiInitializeKernel().

#define KF_MTRR   0x00000040
 

Definition at line 2708 of file i386.h.

Referenced by KiInitializeKernel(), KiInitializeMTRR(), and KiInitMachineDependent().

#define KF_PAT   0x00000400
 

Definition at line 2712 of file i386.h.

Referenced by KeRestorePAT(), KiInitializeKernel(), KiInitializePAT(), KiInitMachineDependent(), and MmMapIoSpace().

#define KF_RDTSC   0x00000002
 

Definition at line 2703 of file i386.h.

Referenced by KiInitializeKernel(), and KiInitMachineDependent().

#define KF_V86_VIS   0x00000001
 

Definition at line 2702 of file i386.h.

Referenced by KeI386VdmInitialize().

#define KF_WORKING_PTE   0x00000200
 

Definition at line 2711 of file i386.h.

Referenced by KiInitMachineDependent().

#define KF_XMMI   0x00002000
 

Definition at line 2715 of file i386.h.

Referenced by KeSetup80387OrEmulate(), KiInitializeKernel(), and KiInitMachineDependent().


Function Documentation

VOID CPUID ULONG  InEax,
PULONG  OutEax,
PULONG  OutEbx,
PULONG  OutEcx,
PULONG  OutEdx
 

Referenced by CmpInitializeMachineDependentConfiguration(), KiGetCacheInformation(), KiGetCpuVendor(), and KiInitMachineDependent().

NTSTATUS Ke386CallBios IN ULONG  BiosCommand,
IN OUT PCONTEXT  BiosArguments
 

Definition at line 60 of file biosc.c.

References _KTHREAD::ApcState, ASSERT, BiosInitialized, CONTEXT_FULL, ExAllocatePoolWithTag, EXCEPTION_EXECUTE_HANDLER, ExFreePool(), INT_10_TEB, INT_OPCODE, IOPM_OFFSET, KeGetCurrentThread, KeGetPcr, KeRevertToUserAffinityThread(), KeSetSystemAffinityThread(), Ki386IopmSaveArea, Ki386SetupAndExitToV86Code(), NonPagedPool, NTSTATUS(), NULL, PAGE_SIZE, _KAPC_STATE::Process, PsGetCurrentProcess, PVDM_TIB, _Vdm_Tib::Size, Status, USHORT, V86_BOP_OPCODE, V86_CODE_ADDRESS, VDM_TIB, VDM_TIB_ADDRESS, and _Vdm_Tib::VdmContext.

00067 : 00068 00069 This function invokes specified ROM BIOS code by executing 00070 "INT BiosCommand." Before executing the BIOS code, this function 00071 will setup VDM context, change stack pointer ...etc. If for some reason 00072 the operation fails, a status code will be returned. Otherwise, this 00073 function always returns success reguardless of the result of the BIOS 00074 call. 00075 00076 N.B. This implementation relies on the fact that the direct 00077 I/O access operations between apps are serialized by win user. 00078 00079 Arguments: 00080 00081 BiosCommand - specifies which ROM BIOS function to invoke. 00082 00083 BiosArguments - specifies a pointer to the context which will be used 00084 to invoke ROM BIOS. 00085 00086 Return Value: 00087 00088 NTSTATUS code to specify the failure. 00089 00090 --*/ 00091 00092 { 00093 00094 NTSTATUS Status = STATUS_SUCCESS; 00095 PVDM_TIB VdmTib; 00096 PUCHAR BaseAddress = (PUCHAR)V86_CODE_ADDRESS; 00097 PTEB UserInt10Teb = (PTEB)INT_10_TEB; 00098 PKTSS Tss; 00099 PKPROCESS Process; 00100 PKTHREAD Thread; 00101 USHORT OldIopmOffset, OldIoMapBase; 00102 PVDM_PROCESS_OBJECTS VdmObjects; 00103 ULONG ContextLength; 00104 00105 // KIRQL OldIrql; 00106 //#if DBG 00107 // PULONG IdtAddress; 00108 // ULONG RegionSize; 00109 // ULONG OldProtect; 00110 //#endif 00111 00112 // 00113 // Map in ROM BIOS area to perform the int 10 code 00114 // 00115 00116 if (!BiosInitialized) { 00117 RtlZeroMemory(UserInt10Teb, sizeof(TEB)); 00118 } 00119 00120 //#if DBG 00121 // IdtAddress = 0; 00122 // RegionSize = 0x1000; 00123 // ZwProtectVirtualMemory ( NtCurrentProcess(), 00124 // &IdtAddress, 00125 // &RegionSize, 00126 // PAGE_READWRITE, 00127 // &OldProtect 00128 // ); 00129 //#endif 00130 00131 try { 00132 00133 // 00134 // Write "Int BiosCommand; bop" to reserved user space (0x1000). 00135 // Later control will transfer to the user space to execute 00136 // these two instructions. 00137 // 00138 00139 *BaseAddress++ = INT_OPCODE; 00140 *BaseAddress++ = (UCHAR)BiosCommand; 00141 *(PULONG)BaseAddress = V86_BOP_OPCODE; 00142 00143 // 00144 // Set up Vdm(v86) context to execute the int BiosCommand 00145 // instruction by copying user supplied context to VdmContext 00146 // and updating the control registers to predefined values. 00147 // 00148 00149 // 00150 // We want to use a constant number for the int10. 00151 // 00152 // 00153 // Create a fake TEB so we can switch the thread to it while we 00154 // do an int10 00155 // 00156 00157 UserInt10Teb->Vdm = (PVOID)VDM_TIB_ADDRESS; 00158 VdmTib = (PVDM_TIB)VDM_TIB_ADDRESS; 00159 RtlZeroMemory(VdmTib, sizeof(VDM_TIB)); 00160 VdmTib->Size = sizeof(VDM_TIB); 00161 *pNtVDMState = 0; 00162 00163 // 00164 // extended registers are never going to matter to 00165 // an Int10 call, so only copy the old part of the 00166 // context record. 00167 // 00168 ContextLength = FIELD_OFFSET(CONTEXT, ExtendedRegisters); 00169 RtlMoveMemory(&(VdmTib->VdmContext), BiosArguments, ContextLength); 00170 VdmTib->VdmContext.SegCs = (ULONG)BaseAddress >> 4; 00171 VdmTib->VdmContext.SegSs = (ULONG)BaseAddress >> 4; 00172 VdmTib->VdmContext.Eip = 0; 00173 VdmTib->VdmContext.Esp = 2 * PAGE_SIZE - sizeof(ULONG); 00174 VdmTib->VdmContext.EFlags |= EFLAGS_V86_MASK | EFLAGS_INTERRUPT_MASK; 00175 VdmTib->VdmContext.ContextFlags = CONTEXT_FULL; 00176 00177 } except (EXCEPTION_EXECUTE_HANDLER) { 00178 00179 Status = GetExceptionCode(); 00180 } 00181 00182 // 00183 // The vdm kernel code finds the Tib by looking at a pointer cached in 00184 // kernel memory, which was probed at Vdm creation time. Since the 00185 // creation semantics for this vdm are peculiar, we do something similar 00186 // here. 00187 // 00188 00189 try { 00190 00191 // 00192 // We never get here on a process that is a real vdm. If we do, 00193 // bad things will happen (pool leak, failure to execute dos and windows apps) 00194 // 00195 ASSERT(PsGetCurrentProcess()->VdmObjects == NULL); 00196 VdmObjects = ExAllocatePoolWithTag( 00197 NonPagedPool, 00198 sizeof(VDM_PROCESS_OBJECTS), 00199 ' eK' 00200 ); 00201 00202 00203 // 00204 // Since we are doing this on behalf of CSR not a user process, we aren't 00205 // charging quota. 00206 // 00207 if (VdmObjects == NULL) { 00208 Status = STATUS_NO_MEMORY; 00209 } else { 00210 00211 // 00212 // We are only initializing the VdmTib pointer, because that's the only 00213 // part of the VdmObjects we use for ROM calls. We aren't set up 00214 // to simulate interrupts, or any of the other stuff that would be done 00215 // in a conventional vdm 00216 // 00217 RtlZeroMemory( VdmObjects, sizeof(VDM_PROCESS_OBJECTS)); 00218 00219 VdmObjects->VdmTib = VdmTib; 00220 00221 PsGetCurrentProcess()->VdmObjects = VdmObjects; 00222 } 00223 } except (EXCEPTION_EXECUTE_HANDLER) { 00224 00225 Status = GetExceptionCode(); 00226 } 00227 00228 if (Status == STATUS_SUCCESS) { 00229 00230 // 00231 // Since we are going to v86 mode and accessing some I/O ports, we 00232 // need to make sure the IopmOffset is set correctly across context 00233 // swap and the I/O bit map has all the bits cleared. 00234 // N.B. This implementation assumes that there is only one full 00235 // screen DOS app and the io access between full screen DOS 00236 // app and the server code is serialized by win user. That 00237 // means even we change the IOPM, the full screen dos app won't 00238 // be able to run on this IOPM. 00239 // * In another words, IF THERE IS 00240 // * MORE THAN ONE FULL SCREEN DOS APPS, THIS CODE IS BROKEN.* 00241 // 00242 // NOTE This code works on the assumption that winuser serializes 00243 // direct I/O access operations. 00244 // 00245 00246 // 00247 // Call the bios from the processor which booted the machine. 00248 // 00249 00250 Thread = KeGetCurrentThread(); 00251 KeSetSystemAffinityThread(1); 00252 Tss = KeGetPcr()->TSS; 00253 00254 // 00255 // Save away the original IOPM bit map and clear all the IOPM bits 00256 // to allow v86 int 10 code to access ALL the io ports. 00257 // 00258 00259 // 00260 // Make sure there are at least 2 IOPM maps. 00261 // 00262 00263 ASSERT(KeGetPcr()->GDT[KGDT_TSS / 8].LimitLow >= (0x2000 + IOPM_OFFSET - 1)); 00264 RtlMoveMemory (Ki386IopmSaveArea, 00265 (PVOID)&Tss->IoMaps[0].IoMap, 00266 PAGE_SIZE * 2 00267 ); 00268 RtlZeroMemory ((PVOID)&Tss->IoMaps[0].IoMap, PAGE_SIZE * 2); 00269 00270 Process = Thread->ApcState.Process; 00271 OldIopmOffset = Process->IopmOffset; 00272 OldIoMapBase = Tss->IoMapBase; 00273 Process->IopmOffset = (USHORT)(IOPM_OFFSET); // Set Process IoPmOffset before 00274 Tss->IoMapBase = (USHORT)(IOPM_OFFSET); // updating Tss IoMapBase 00275 00276 // 00277 // Call ASM routine to switch stack to exit to v86 mode to 00278 // run Int BiosCommand. 00279 // 00280 00281 Ki386SetupAndExitToV86Code(UserInt10Teb); 00282 00283 // 00284 // After we return from v86 mode, the control comes here. 00285 // 00286 // Restore old IOPM 00287 // 00288 00289 RtlMoveMemory ((PVOID)&Tss->IoMaps[0].IoMap, 00290 Ki386IopmSaveArea, 00291 PAGE_SIZE * 2 00292 ); 00293 00294 Process->IopmOffset = OldIopmOffset; 00295 Tss->IoMapBase = OldIoMapBase; 00296 00297 // 00298 // Restore old affinity for current thread. 00299 // 00300 00301 KeRevertToUserAffinityThread(); 00302 00303 // 00304 // Copy 16 bit vdm context back to caller. 00305 // 00306 // Extended register state is not going to matter, 00307 // so copy only the old part of the context record. 00308 // 00309 ContextLength = FIELD_OFFSET(CONTEXT, ExtendedRegisters); 00310 RtlMoveMemory(BiosArguments, &(VdmTib->VdmContext), ContextLength); 00311 BiosArguments->ContextFlags = CONTEXT_FULL; 00312 00313 // 00314 // Free the pool used for the VdmTib pointer 00315 // 00316 ExFreePool(PsGetCurrentProcess()->VdmObjects); 00317 PsGetCurrentProcess()->VdmObjects = NULL; 00318 00319 } 00320 00321 //#if DBG 00322 // IdtAddress = 0; 00323 // RegionSize = 0x1000; 00324 // ZwProtectVirtualMemory ( NtCurrentProcess(), 00325 // &IdtAddress, 00326 // &RegionSize, 00327 // PAGE_NOACCESS, 00328 // &OldProtect 00329 // ); 00330 //#endif 00331 00332 return(Status); 00333 } }

VOID Ke386GetGdtEntryThread struct _KTHREAD Thread,
ULONG  Offset,
PKGDTENTRY  Descriptor
 

BOOLEAN Ke386IoSetAccessProcess struct _KPROCESS Process,
ULONG  MapNumber
 

BOOLEAN Ke386QueryIoAccessMap ULONG  MapNumber,
PKIO_ACCESS_MAP  IoAccessMap
 

Definition at line 235 of file i386/iopm.c.

References FALSE, KiLockContextSwap, KiPcr, KiUnlockContextSwap, and TRUE.

00242 : 00243 00244 The specified i/o access map will be dumped into the buffer. 00245 map 0 is a constant, but will be dumped anyway. 00246 00247 Arguments: 00248 00249 MapNumber - Number of access map to set. map 0 is fixed. 00250 00251 IoAccessMap - Pointer to buffer (64K bits, 8K bytes) which 00252 is to receive the definition of the access map. 00253 Must be in non-paged pool. 00254 00255 Return Value: 00256 00257 TRUE if successful. FALSE if failure (attempt to query a map 00258 which does not exist) 00259 00260 --*/ 00261 00262 { 00263 00264 ULONG i; 00265 PVOID Map; 00266 KIRQL OldIrql; 00267 PUCHAR p; 00268 00269 // 00270 // Reject illegal requests 00271 // 00272 00273 if (MapNumber > IOPM_COUNT) { 00274 return FALSE; 00275 } 00276 00277 // 00278 // Acquire the context swap lock so a context switch will not occur. 00279 // 00280 00281 KiLockContextSwap(&OldIrql); 00282 00283 // 00284 // Copy out the map 00285 // 00286 00287 if (MapNumber == IO_ACCESS_MAP_NONE) { 00288 00289 // 00290 // no access case, simply return a map of all 1s 00291 // 00292 00293 p = (PUCHAR)IoAccessMap; 00294 for (i = 0; i < IOPM_SIZE; i++) { 00295 p[i] = (UCHAR)-1; 00296 } 00297 00298 } else { 00299 00300 // 00301 // normal case, just copy the bits 00302 // 00303 00304 Map = (PVOID)&(KiPcr()->TSS->IoMaps[MapNumber-1].IoMap); 00305 RtlMoveMemory((PVOID)IoAccessMap, Map, IOPM_SIZE); 00306 } 00307 00308 // 00309 // Restore IRQL and unlock the context swap lock. 00310 // 00311 00312 KiUnlockContextSwap(OldIrql); 00313 return TRUE; 00314 }

VOID Ke386SetDescriptorProcess struct _KPROCESS Process,
ULONG  Offset,
LDT_ENTRY  LdtEntry
 

BOOLEAN Ke386SetIoAccessMap ULONG  MapNumber,
PKIO_ACCESS_MAP  IoAccessMap
 

Definition at line 80 of file i386/iopm.c.

References FALSE, KeActiveProcessors, KeGetCurrentPrcb, KiIpiSendPacket(), KiIpiStallOnPacketTargets(), KiLockContextSwap, KiPcr, KiSetIoMap(), KiUnlockContextSwap, NULL, and TRUE.

00087 : 00088 00089 The specified i/o access map will be set to match the 00090 definition specified by IoAccessMap (i.e. enable/disable 00091 those ports) before the call returns. The change will take 00092 effect on all processors. 00093 00094 Ke386SetIoAccessMap does not give any process enhanced I/O 00095 access, it merely defines a particular access map. 00096 00097 Arguments: 00098 00099 MapNumber - Number of access map to set. Map 0 is fixed. 00100 00101 IoAccessMap - Pointer to bitvector (64K bits, 8K bytes) which 00102 defines the specified access map. Must be in 00103 non-paged pool. 00104 00105 Return Value: 00106 00107 TRUE if successful. FALSE if failure (attempt to set a map 00108 which does not exist, attempt to set map 0) 00109 00110 --*/ 00111 00112 { 00113 00114 PKPROCESS CurrentProcess; 00115 KIRQL OldIrql; 00116 PKPRCB Prcb; 00117 PVOID pt; 00118 KAFFINITY TargetProcessors; 00119 00120 // 00121 // Reject illegal requests 00122 // 00123 00124 if ((MapNumber > IOPM_COUNT) || (MapNumber == IO_ACCESS_MAP_NONE)) { 00125 return FALSE; 00126 } 00127 00128 // 00129 // Acquire the context swap lock so a context switch will not occur. 00130 // 00131 00132 KiLockContextSwap(&OldIrql); 00133 00134 // 00135 // Compute set of active processors other than this one, if non-empty 00136 // IPI them to set their maps. 00137 // 00138 00139 Prcb = KeGetCurrentPrcb(); 00140 00141 #if !defined(NT_UP) 00142 00143 TargetProcessors = KeActiveProcessors & ~Prcb->SetMember; 00144 if (TargetProcessors != 0) { 00145 KiIpiSendPacket(TargetProcessors, 00146 KiSetIoMap, 00147 IoAccessMap, 00148 (PVOID)MapNumber, 00149 NULL); 00150 } 00151 00152 #endif 00153 00154 // 00155 // Copy the IOPM map and load the map for the current process. 00156 // 00157 00158 pt = &(KiPcr()->TSS->IoMaps[MapNumber-1].IoMap); 00159 RtlMoveMemory(pt, (PVOID)IoAccessMap, IOPM_SIZE); 00160 CurrentProcess = Prcb->CurrentThread->ApcState.Process; 00161 KiPcr()->TSS->IoMapBase = CurrentProcess->IopmOffset; 00162 00163 // 00164 // Wait until all of the target processors have finished copying the 00165 // new map. 00166 // 00167 00168 #if !defined(NT_UP) 00169 00170 if (TargetProcessors != 0) { 00171 KiIpiStallOnPacketTargets(TargetProcessors); 00172 } 00173 00174 #endif 00175 00176 // 00177 // Restore IRQL and unlock the context swap lock. 00178 // 00179 00180 KiUnlockContextSwap(OldIrql); 00181 return TRUE; 00182 }

VOID Ke386SetIOPL struct _KPROCESS Process  ) 
 

VOID Ke386SetLdtProcess struct _KPROCESS Process,
PLDT_ENTRY  Ldt,
ULONG  Limit
 

NTSTATUS Ke386SetVdmInterruptHandler IN struct _KPROCESS Process,
IN ULONG  Interrupt,
IN USHORT  Selector,
IN ULONG  Offset,
IN BOOLEAN  Gate32
 

VOID Ke386VdmClearApcObject IN PKAPC  Apc  ) 
 

Definition at line 1437 of file ke/i386/vdm.c.

References KiLockDispatcherDatabase, KiUnlockDispatcherDatabase(), and NULL.

Referenced by VdmpDelayIntApcRoutine(), and VdmpQueueIntApcRoutine().

01442 : 01443 01444 Clears a VDM APC object, synchronously with Ke386VdmInsertQueueApc, and 01445 is expected to be called by one of the vdm kernel apc routine or the 01446 rundown routine. 01447 01448 01449 Arguments: 01450 01451 Apc - Supplies a pointer to a control object of type APC. 01452 01453 01454 Return Value: 01455 01456 void 01457 01458 --*/ 01459 { 01460 01461 KIRQL OldIrql; 01462 01463 // 01464 // Take Dispatcher database lock, to sync with Ke386VDMInsertQueueApc 01465 // 01466 01467 KiLockDispatcherDatabase(&OldIrql); 01468 Apc->Thread = NULL; 01469 KiUnlockDispatcherDatabase(OldIrql); 01470 01471 }

BOOLEAN Ke386VdmInsertQueueApc IN PKAPC  Apc,
IN struct _KTHREAD Thread,
IN KPROCESSOR_MODE  ApcMode,
IN PKKERNEL_ROUTINE  KernelRoutine,
IN PKRUNDOWN_ROUTINE RundownRoutine  OPTIONAL,
IN PKNORMAL_ROUTINE NormalRoutine  OPTIONAL,
IN PVOID NormalContext  OPTIONAL,
IN KPRIORITY  Increment
 

NTSTATUS KeI386AbiosCall IN USHORT  LogicalId,
IN struct _DRIVER_OBJECT DriverObject,
IN PUCHAR  RequestBlock,
IN USHORT  EntryPoint
 

NTSTATUS KeI386AllocateGdtSelectors OUT PUSHORT  SelectorArray,
IN USHORT  NumberOfSelectors
 

Definition at line 449 of file abiosc.c.

References _KFREE_GDT_ENTRY::Flink, KiAbiosGdt, KiAbiosGdtLock, KiFreeGdtListHead, KiNumberFreeSelectors, and USHORT.

00456 : 00457 00458 This function allocates a set of GDT selectors for a device driver to use. 00459 Usually this allocation is performed at device driver initialization time 00460 to reserve the selectors for later use. 00461 00462 Arguments: 00463 00464 SelectorArray - Supplies a pointer to an array of USHORT to be filled 00465 in with the GDT selectors allocated. 00466 00467 NumberOfSelectors - Specifies the number of selectors to be allocated. 00468 00469 Return Value: 00470 00471 STATUS_SUCCESS - If the requested selectors are allocated. 00472 00473 STATUS_ABIOS_SELECTOR_NOT_AVAILABLE - if systen can not allocate the number 00474 of selectors requested. 00475 00476 --*/ 00477 00478 { 00479 PKFREE_GDT_ENTRY GdtEntry; 00480 KIRQL OldIrql; 00481 00482 if (KiNumberFreeSelectors >= NumberOfSelectors) { 00483 ExAcquireSpinLock(&KiAbiosGdtLock, &OldIrql); 00484 00485 // 00486 // The Free Gdt link list is maintained on Processor 0's GDT ONLY. 00487 // Because the 'selector' is an offset to the beginning of GDT and 00488 // it should be the same accross all the processors. 00489 // 00490 00491 KiNumberFreeSelectors -= NumberOfSelectors; 00492 GdtEntry = KiFreeGdtListHead; 00493 while (NumberOfSelectors != 0) { 00494 *SelectorArray++ = (USHORT)((ULONG)GdtEntry - KiAbiosGdt[0]); 00495 GdtEntry = GdtEntry->Flink; 00496 NumberOfSelectors--; 00497 } 00498 KiFreeGdtListHead = GdtEntry; 00499 ExReleaseSpinLock(&KiAbiosGdtLock, OldIrql); 00500 return STATUS_SUCCESS; 00501 } else { 00502 return STATUS_ABIOS_SELECTOR_NOT_AVAILABLE; 00503 } 00504 }

USHORT KeI386Call16BitCStyleFunction IN ULONG  EntryOffset,
IN ULONG  EntrySelector,
IN PUCHAR  Parameters,
IN ULONG  Size
 

VOID KeI386Call16BitFunction IN OUT PCONTEXT  Regs  ) 
 

NTSTATUS KeI386FlatToGdtSelector IN ULONG  SelectorBase,
IN USHORT  Length,
IN USHORT  Selector
 

Definition at line 558 of file abiosc.c.

References HIGHBYTE, KeNumberProcessors, KiAbiosGdt, KiAbiosGdtLock, KiAbiosPresent, LOWBYTE, RESERVED_GDT_ENTRIES, and USHORT.

00566 : 00567 00568 This function converts a 32-bit flat address to a GDT selector-offset 00569 pair. The segment set up is always 16-bit ring 0 data segment. 00570 00571 Arguments: 00572 00573 SelectorBase - Supplies 32 bit flat address to be set as the base address 00574 of the desired selector. 00575 00576 Length - Supplies the Length of the segment. The Length is a 16 bit value 00577 and zero means 64KB. 00578 00579 Selector - Supplies the selector to be set up. 00580 00581 Return Value: 00582 00583 STATUS_SUCCESS - If the requested LID is released. 00584 00585 STATUS_ABIOS_NOT_PRESENT - If there is no ABIOS support in the system. 00586 00587 STATUS_ABIOS_INVALID_SELECTOR - If the selector supplied is invalid. 00588 00589 00590 --*/ 00591 00592 { 00593 PKGDTENTRY GdtEntry, GdtEntry1; 00594 KIRQL OldIrql; 00595 ULONG i; 00596 00597 if (!KiAbiosPresent) { 00598 return STATUS_ABIOS_NOT_PRESENT; 00599 } 00600 if (Selector < RESERVED_GDT_ENTRIES * sizeof(KGDTENTRY)) { 00601 return STATUS_ABIOS_INVALID_SELECTOR; 00602 } else { 00603 ExAcquireSpinLock(&KiAbiosGdtLock, &OldIrql); 00604 GdtEntry = (PKGDTENTRY)(KiAbiosGdt[0] + Selector); 00605 GdtEntry->LimitLow = (USHORT)(Length - 1); 00606 GdtEntry->BaseLow = LOWWORD(SelectorBase); 00607 GdtEntry->HighWord.Bytes.BaseMid = LOWBYTE(HIGHWORD(SelectorBase)); 00608 GdtEntry->HighWord.Bytes.BaseHi = HIGHBYTE(HIGHWORD(SelectorBase)); 00609 GdtEntry->HighWord.Bits.Pres = 1; 00610 GdtEntry->HighWord.Bits.Type = TYPE_DATA; 00611 GdtEntry->HighWord.Bits.Dpl = DPL_SYSTEM; 00612 for (i = 1; i < (ULONG)KeNumberProcessors; i++) { 00613 GdtEntry1 = (PKGDTENTRY)(KiAbiosGdt[i] + Selector); 00614 *GdtEntry1 = *GdtEntry; 00615 } 00616 ExReleaseSpinLock(&KiAbiosGdtLock, OldIrql); 00617 return STATUS_SUCCESS; 00618 } 00619 }

NTSTATUS KeI386GetLid IN USHORT  DeviceId,
IN USHORT  RelativeLid,
IN BOOLEAN  SharedLid,
IN struct _DRIVER_OBJECT DeviceObject,
OUT PUSHORT  LogicalId
 

NTSTATUS KeI386ReleaseGdtSelectors OUT PUSHORT  SelectorArray,
IN USHORT  NumberOfSelectors
 

Definition at line 507 of file abiosc.c.

References _KFREE_GDT_ENTRY::Flink, KiAbiosGdt, KiAbiosGdtLock, KiFreeGdtListHead, and KiNumberFreeSelectors.

00514 : 00515 00516 This function releases a set of GDT selectors for a device driver. 00517 Usually this function is called at device driver termination or 00518 deinstallation time. 00519 00520 Arguments: 00521 00522 SelectorArray - Supplies a pointer to an array of USHORT selectors 00523 to be freed. 00524 00525 NumberOfSelectors - Specifies the number of selectors to be released. 00526 00527 Return Value: 00528 00529 STATUS_SUCCESS - If the requested LID is released. 00530 00531 --*/ 00532 { 00533 PKFREE_GDT_ENTRY GdtEntry; 00534 KIRQL OldIrql; 00535 ULONG Gdt; 00536 00537 ExAcquireSpinLock(&KiAbiosGdtLock, &OldIrql); 00538 00539 // 00540 // The Free Gdt link list is maintained on Processor 0's GDT ONLY. 00541 // Because the 'selector' is an offset to the beginning of GDT and 00542 // it should be the same accross all the processors. 00543 // 00544 00545 KiNumberFreeSelectors += NumberOfSelectors; 00546 Gdt = KiAbiosGdt[0]; 00547 while (NumberOfSelectors != 0) { 00548 GdtEntry = (PKFREE_GDT_ENTRY)(Gdt + *SelectorArray++); 00549 GdtEntry->Flink = KiFreeGdtListHead; 00550 KiFreeGdtListHead = GdtEntry; 00551 NumberOfSelectors--; 00552 } 00553 ExReleaseSpinLock(&KiAbiosGdtLock, OldIrql); 00554 return STATUS_SUCCESS; 00555 }

NTSTATUS KeI386ReleaseLid IN USHORT  LogicalId,
IN struct _DRIVER_OBJECT DeviceObject
 

NTSTATUS KeI386SetGdtSelector ULONG  Selector,
PKGDTENTRY  GdtValue
 

Definition at line 117 of file i386/gdtsup.c.

References ClearMember, KeActiveProcessors, KeFindFirstSetRightMember, KiProcessorBlock, and PAGED_CODE.

00123 : 00124 00125 Sets a GDTs returned via KeI386AllocateGdtSelectors to the supplied 00126 GdtValue. 00127 00128 Arguments: 00129 00130 Selector - Which GDT to set 00131 GdtValue - GDT value to set into GDT 00132 00133 Return Value: 00134 00135 status code 00136 00137 --*/ 00138 { 00139 KAFFINITY TargetSet; 00140 PKPRCB Prcb; 00141 PKPCR Pcr; 00142 PKGDTENTRY GdtEntry; 00143 ULONG GdtIndex, BitNumber; 00144 00145 PAGED_CODE (); 00146 00147 // 00148 // Verify GDT entry passed, and it's above the kernel GDT values 00149 // 00150 00151 GdtIndex = Selector >> 3; 00152 if ((Selector & 0x7) != 0 || GdtIndex < KGDT_NUMBER) { 00153 return STATUS_UNSUCCESSFUL; 00154 } 00155 00156 // 00157 // Set gdt entry in each processors GDT 00158 // 00159 00160 TargetSet = KeActiveProcessors; 00161 while (TargetSet != 0) { 00162 BitNumber = KeFindFirstSetRightMember(TargetSet); 00163 ClearMember(BitNumber, TargetSet); 00164 00165 Prcb = KiProcessorBlock[BitNumber]; 00166 Pcr = CONTAINING_RECORD (Prcb, KPCR, PrcbData); 00167 GdtEntry = Pcr->GDT + GdtIndex; 00168 00169 // set it 00170 *GdtEntry = *GdtValue; 00171 } 00172 00173 return STATUS_SUCCESS; 00174 } }

VOID KeI386VdmInitialize VOID   ) 
 

Definition at line 1088 of file ke/i386/vdm.c.

References KeFeatureBits, KeI386EFlagsAndMaskV86, KeI386EFlagsOrMaskV86, KeI386MachineType, KeI386VdmIoplAllowed, KeI386VirtualIntExtensions, KeInitializeMutex(), KF_V86_VIS, Ki386VdmEnablePentiumExtentions(), KiIpiGenericCall(), L, MUTEX_LEVEL_VDM_IO, NT_SUCCESS, NTSTATUS(), NULL, ObjectAttributes, RtlInitUnicodeString(), Status, TRUE, VdmFixedStateLinear, and VdmStringIoMutex.

01093 : 01094 01095 This routine initializes the vdm stuff 01096 01097 Arguments: 01098 01099 None 01100 01101 Return Value: 01102 01103 None 01104 --*/ 01105 { 01106 NTSTATUS Status; 01107 OBJECT_ATTRIBUTES ObjectAttributes; 01108 HANDLE RegistryHandle = NULL; 01109 UNICODE_STRING WorkString; 01110 UCHAR KeyInformation[sizeof(KEY_VALUE_BASIC_INFORMATION) + 30]; 01111 ULONG ResultLength; 01112 01113 KeInitializeMutex( &VdmStringIoMutex, MUTEX_LEVEL_VDM_IO ); 01114 01115 // 01116 // Set up and open KeyPath to wow key 01117 // 01118 01119 RtlInitUnicodeString( 01120 &WorkString, 01121 L"\\REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Wow" 01122 ); 01123 01124 InitializeObjectAttributes( 01125 &ObjectAttributes, 01126 &WorkString, 01127 OBJ_CASE_INSENSITIVE, 01128 (HANDLE)NULL, 01129 NULL 01130 ); 01131 01132 Status = ZwOpenKey( 01133 &RegistryHandle, 01134 KEY_READ, 01135 &ObjectAttributes 01136 ); 01137 01138 // 01139 // If there is no Wow key, don't allow Vdms to run 01140 // 01141 if (!NT_SUCCESS(Status)) { 01142 return; 01143 } 01144 01145 // 01146 // Set up for using virtual interrupt extensions if they are available 01147 // 01148 01149 // 01150 // Get the Pentium Feature disable value. 01151 // If this value is present, don't enable vme stuff. 01152 // 01153 RtlInitUnicodeString( 01154 &WorkString, 01155 L"DisableVme" 01156 ); 01157 01158 Status = ZwQueryValueKey( 01159 RegistryHandle, 01160 &WorkString, 01161 KeyValueBasicInformation, 01162 &KeyInformation, 01163 sizeof(KEY_VALUE_BASIC_INFORMATION) + 30, 01164 &ResultLength 01165 ); 01166 01167 if (!NT_SUCCESS(Status)) { 01168 01169 // 01170 // If we have the extensions, set the appropriate bits 01171 // in cr4 01172 // 01173 if (KeFeatureBits & KF_V86_VIS) { 01174 KiIpiGenericCall( 01175 Ki386VdmEnablePentiumExtentions, 01176 TRUE 01177 ); 01178 KeI386VirtualIntExtensions = V86_VIRTUAL_INT_EXTENSIONS; 01179 } 01180 } 01181 01182 // 01183 // If we have V86 mode int extensions, we don't want to run with 01184 // IOPL in v86 mode 01185 // 01186 if (!KeI386VirtualIntExtensions & V86_VIRTUAL_INT_EXTENSIONS) { 01187 // 01188 // Read registry to determine if Vdms will run with IOPL in v86 mode 01189 // 01190 01191 // 01192 // Get the VdmIOPL value. 01193 // 01194 RtlInitUnicodeString( 01195 &WorkString, 01196 L"VdmIOPL" 01197 ); 01198 01199 Status = ZwQueryValueKey( 01200 RegistryHandle, 01201 &WorkString, 01202 KeyValueBasicInformation, 01203 &KeyInformation, 01204 sizeof(KEY_VALUE_BASIC_INFORMATION) + 30, 01205 &ResultLength 01206 ); 01207 01208 // 01209 // If the value exists, let Vdms run with IOPL in V86 mode 01210 // 01211 if (NT_SUCCESS(Status)) { 01212 // 01213 // KeEflagsAndMaskV86 and KeEflagsOrMaskV86 are used 01214 // in SANITIZE_FLAGS, and the Vdm code to make sure the 01215 // values in EFlags for v86 mode trap frames are acceptable 01216 // 01217 KeI386EFlagsAndMaskV86 = EFLAGS_USER_SANITIZE | EFLAGS_INTERRUPT_MASK; 01218 KeI386EFlagsOrMaskV86 = EFLAGS_IOPL_MASK; 01219 01220 // 01221 // KeVdmIoplAllowed is used by the Vdm code to determine if 01222 // the virtual interrupt flag is in EFlags, or 40:xx 01223 // 01224 KeI386VdmIoplAllowed = TRUE; 01225 01226 } 01227 } 01228 01229 ZwClose(RegistryHandle); 01230 01231 // 01232 // Initialize the address of the Vdm communications area based on 01233 // machine type because of non-AT Japanese PCs. Note that we only 01234 // have to change the op-code for PC-98 machines as the default is 01235 // the PC/AT value. 01236 // 01237 01238 if (KeI386MachineType & MACHINE_TYPE_PC_9800_COMPATIBLE) { 01239 01240 // 01241 // Set NTVDM state liner for PC-9800 Series 01242 // 01243 01244 VdmFixedStateLinear = FIXED_NTVDMSTATE_LINEAR_PC_98; 01245 } else { 01246 01247 // 01248 // We are running on an normal PC/AT or a Fujitsu FMR comaptible. 01249 // 01250 01251 VdmFixedStateLinear = FIXED_NTVDMSTATE_LINEAR_PC_AT; 01252 } 01253 }

VOID KeOptimizeProcessorControlState VOID   ) 
 

Definition at line 1998 of file kernlini.c.

References Ke386ConfigureCyrixProcessor().

Referenced by CmpConfigureProcessors().

02001 { 02002 Ke386ConfigureCyrixProcessor (); 02003 }

BOOLEAN Ki386GetSelectorParameters IN USHORT  Selector,
OUT PULONG  Flags,
OUT PULONG  Base,
OUT PULONG  Limit
 

Definition at line 160 of file ke/i386/vdm.c.

References EXCEPTION_EXECUTE_HANDLER, FALSE, KeGetCurrentThread, SEL_TYPE_2GIG, SEL_TYPE_BIG, SEL_TYPE_ED, SEL_TYPE_EXECUTE, SEL_TYPE_READ, SEL_TYPE_WRITE, and TRUE.

00169 : 00170 00171 This routine gets information about a selector in the ldt, and 00172 returns it to the caller. 00173 00174 Arguments: 00175 00176 IN USHORT Selector -- selector number for selector to return info for 00177 OUT PULONG Flags -- flags indicating the type of the selector. 00178 OUT PULONG Base -- base linear address of the selector 00179 OUT PULONG Limit -- limit of the selector. 00180 00181 Return Value: 00182 00183 return-value - True if the selector is in the LDT, and present. 00184 False otherwise. 00185 Note: 00186 00187 This routine should probably be somewhere else. There are a number 00188 of issues to clear up with respect to selectors and the kernel, and 00189 after they have been cleared up, this code will be moved to its 00190 correct place 00191 00192 --*/ 00193 00194 { 00195 00196 PLDT_ENTRY Ldt,OldLdt; 00197 ULONG LdtLimit,OldLdtLimit,RetryCount = 0; 00198 PKPROCESS Process; 00199 BOOLEAN ReturnValue; 00200 00201 *Flags = 0; 00202 00203 if ((Selector & (SELECTOR_TABLE_INDEX | DPL_USER)) 00204 != (SELECTOR_TABLE_INDEX | DPL_USER)) { 00205 return FALSE; 00206 } 00207 00208 00209 Process = KeGetCurrentThread()->ApcState.Process; 00210 Ldt = (PLDT_ENTRY)((Process->LdtDescriptor.BaseLow) | 00211 (Process->LdtDescriptor.HighWord.Bytes.BaseMid << 16) | 00212 (Process->LdtDescriptor.HighWord.Bytes.BaseHi << 24)); 00213 00214 LdtLimit = ((Process->LdtDescriptor.LimitLow) | 00215 (Process->LdtDescriptor.HighWord.Bits.LimitHi << 16)); 00216 00217 Selector &= ~(SELECTOR_TABLE_INDEX | DPL_USER); 00218 00219 // 00220 // Under normal circumstances, we will only execute the following loop 00221 // once. If there is a bug in the user mode wow code however, the LDT 00222 // may change while we execute the following code. We don't want to take 00223 // the Ldt mutex, because that is expensive. 00224 // 00225 00226 do { 00227 00228 RetryCount++; 00229 00230 if (((ULONG)Selector >= LdtLimit) || (!Ldt)) { 00231 return FALSE; 00232 } 00233 00234 try { 00235 00236 if (!Ldt[Selector/sizeof(LDT_ENTRY)].HighWord.Bits.Pres) { 00237 *Flags = SEL_TYPE_NP; 00238 ReturnValue = FALSE; 00239 } else { 00240 00241 *Base = (Ldt[Selector/sizeof(LDT_ENTRY)].BaseLow | 00242 (Ldt[Selector/sizeof(LDT_ENTRY)].HighWord.Bytes.BaseMid << 16) | 00243 (Ldt[Selector/sizeof(LDT_ENTRY)].HighWord.Bytes.BaseHi << 24)); 00244 00245 *Limit = (Ldt[Selector/sizeof(LDT_ENTRY)].LimitLow | 00246 (Ldt[Selector/sizeof(LDT_ENTRY)].HighWord.Bits.LimitHi << 16)); 00247 00248 *Flags = 0; 00249 00250 if ((Ldt[Selector/sizeof(LDT_ENTRY)].HighWord.Bits.Type & 0x18) == 0x18) { 00251 *Flags |= SEL_TYPE_EXECUTE; 00252 00253 if (Ldt[Selector/sizeof(LDT_ENTRY)].HighWord.Bits.Type & 0x02) { 00254 *Flags |= SEL_TYPE_READ; 00255 } 00256 } else { 00257 *Flags |= SEL_TYPE_READ; 00258 if (Ldt[Selector/sizeof(LDT_ENTRY)].HighWord.Bits.Type & 0x02) { 00259 *Flags |= SEL_TYPE_WRITE; 00260 } 00261 if (Ldt[Selector/sizeof(LDT_ENTRY)].HighWord.Bits.Type & 0x04) { 00262 *Flags |= SEL_TYPE_ED; 00263 } 00264 } 00265 00266 if (Ldt[Selector/sizeof(LDT_ENTRY)].HighWord.Bits.Default_Big) { 00267 *Flags |= SEL_TYPE_BIG; 00268 } 00269 00270 if (Ldt[Selector/sizeof(LDT_ENTRY)].HighWord.Bits.Granularity) { 00271 *Flags |= SEL_TYPE_2GIG; 00272 } 00273 } 00274 ReturnValue = TRUE; 00275 } except(EXCEPTION_EXECUTE_HANDLER) { 00276 // Don't do anything here. We took the fault because the 00277 // Ldt moved. We will get an answer the next time around 00278 } 00279 00280 // 00281 // If we can't get an answer in 10 tries, we never will 00282 // 00283 if ((RetryCount > 10)) { 00284 ReturnValue = FALSE; 00285 } 00286 00287 if (ReturnValue == FALSE) { 00288 break; 00289 } 00290 00291 OldLdt = Ldt; 00292 OldLdtLimit = LdtLimit; 00293 00294 Ldt = (PLDT_ENTRY)((Process->LdtDescriptor.BaseLow) | 00295 (Process->LdtDescriptor.HighWord.Bytes.BaseMid << 16) | 00296 (Process->LdtDescriptor.HighWord.Bytes.BaseHi << 24)); 00297 00298 LdtLimit = ((Process->LdtDescriptor.LimitLow) | 00299 (Process->LdtDescriptor.HighWord.Bits.LimitHi << 16)); 00300 00301 } while ((Ldt != OldLdt) || (LdtLimit != OldLdtLimit)); 00302 00303 return ReturnValue; 00304 }

VOID KiEditIopmDpc IN struct _KDPC Dpc,
IN PVOID  DeferredContext,
IN PVOID  SystemArgument1,
IN PVOID  SystemArgument2
 

ULONGLONG FASTCALL RDMSR IN ULONG  MsrRegister  ) 
 

Referenced by KdpReadMachineSpecificRegister(), KiAmdK6InitializeMTRR(), KiInitializeMTRR(), and KiLoadMTRR().

LONGLONG RDTSC VOID   ) 
 

Referenced by KiInitMachineDependent().

VOID WRMSR IN ULONG  MsrRegister,
IN ULONGLONG  MsrValue
 

Referenced by KdpWriteMachineSpecificRegister(), KiAmdK6MtrrWRMSR(), KiLoadMTRR(), and KiLoadPAT().


Variable Documentation

ULONG KeI386CpuStep
 

Definition at line 2693 of file i386.h.

Referenced by KiInitializeKernel().

ULONG KeI386CpuType
 

Definition at line 2692 of file i386.h.

Referenced by KeInvalidateAllCaches(), and KiInitializeKernel().

ULONG KeI386EFlagsAndMaskV86
 

Definition at line 2686 of file i386.h.

Referenced by KeI386VdmInitialize().

ULONG KeI386EFlagsOrMaskV86
 

Definition at line 2687 of file i386.h.

Referenced by KeI386VdmInitialize().

BOOLEAN KeI386FxsrPresent
 

Definition at line 2695 of file i386.h.

Referenced by KeContextFromKframes(), KeContextToKframes(), KeRestoreFloatingPointState(), KeSaveFloatingPointState(), KiInitializeContextThread(), and KiInitializeKernel().

BOOLEAN KeI386NpxPresent
 

Definition at line 2694 of file i386.h.

Referenced by CmpInitializeMachineDependentConfiguration(), KeContextFromKframes(), KeContextToKframes(), KeRestoreFloatingPointState(), KeSaveFloatingPointState(), KeSetup80387OrEmulate(), KiInitializeContextThread(), KiInitializeKernel(), and VdmSkipNpxInstruction().

BOOLEAN KeI386VdmIoplAllowed
 

Definition at line 2688 of file i386.h.

Referenced by KeI386VdmInitialize(), NtVdmControl(), VdmDispatchInterrupts(), VdmEndExecution(), VdmpDispatchableIntPending(), and VdmpStartExecution().

ULONG KeI386VirtualIntExtensions
 

Definition at line 2689 of file i386.h.

Referenced by KeI386VdmInitialize(), NtVdmControl(), VdmDispatchInterrupts(), VdmEndExecution(), VdmpDispatchableIntPending(), VdmpQueueIntApcRoutine(), and VdmpStartExecution().

ULONG KiBootFeatureBits
 

Definition at line 2723 of file i386.h.

Referenced by KiInitializeKernel().


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