#include "ki.h"#include "ki386.h"#include "fastsys.inc"Go to the source code of this file.
Defines | |
| #define | TRAP332_GATE 0xEF00 | 
| #define | RET 0xc3 | 
| #define | CRC_NDX (PUCHAR)0x22 | 
| #define | CRC_DAT (CRC_NDX + 1) | 
| #define | CCR1 0xc1 | 
| #define | CPUID_REG_COUNT 4 | 
| #define | MAX_ATTEMPTS 10 | 
| #define | IDT_SKIP (7 * sizeof (KIDTENTRY)) | 
Enumerations | |
| enum | CPU_VENDORS {  CPU_NONE, CPU_INTEL, CPU_AMD, CPU_CYRIX, CPU_UNKNOWN }  | 
Functions | |
| VOID | KiSetProcessorType (VOID) | 
| VOID | KiSetCR0Bits (VOID) | 
| BOOLEAN | KiIsNpxPresent (VOID) | 
| VOID | KiI386PentiumLockErrataFixup (VOID) | 
| VOID | KiInitializeDblFaultTSS (IN PKTSS Tss, IN ULONG Stack, IN PKGDTENTRY TssDescriptor) | 
| VOID | KiInitializeTSS2 (IN PKTSS Tss, IN PKGDTENTRY TssDescriptor) | 
| VOID | KiSwapIDT (VOID) | 
| VOID | KeSetup80387OrEmulate (IN PVOID *R3EmulatorTable) | 
| VOID | KiGetCacheInformation (VOID) | 
| ULONG | KiGetCpuVendor (VOID) | 
| ULONG | KiGetFeatureBits (VOID) | 
| NTSTATUS | KiMoveRegTree (HANDLE Source, HANDLE Dest) | 
| VOID | Ki386EnableFxsr (IN volatile PLONG Number) | 
| VOID | Ki386EnableXMMIExceptions (IN volatile PLONG Number) | 
| VOID | Ki386EnableGlobalPage (IN volatile PLONG Number) | 
| VOID | Ki386UseSynchronousTbFlush (IN volatile PLONG Number) | 
| BOOLEAN | KiInitMachineDependent (VOID) | 
| VOID | KiInitializeMTRR (IN BOOLEAN LastProcessor) | 
| VOID | KiInitializePAT (VOID) | 
| VOID | KiAmdK6InitializeMTRR (VOID) | 
| VOID FASTCALL | KiZeroPage (PVOID PageBase) | 
| VOID FASTCALL | KiXMMIZeroPage (PVOID PageBase) | 
| VOID FASTCALL | KiXMMIZeroPageNoSave (PVOID PageBase) | 
| VOID | KiInitializeKernel (IN PKPROCESS Process, IN PKTHREAD Thread, IN PVOID IdleStack, IN PKPRCB Prcb, IN CCHAR Number, PLOADER_PARAMETER_BLOCK LoaderBlock) | 
| VOID | KiInitializePcr (IN ULONG Processor, IN PKPCR Pcr, IN PKIDTENTRY Idt, IN PKGDTENTRY Gdt, IN PKTSS Tss, IN PKTHREAD Thread, IN PVOID DpcStack) | 
| VOID | KiInitializeTSS (IN PKTSS Tss) | 
| VOID | KiSwapIDT () | 
| VOID | KeOptimizeProcessorControlState (VOID) | 
Variables | |
| KSPIN_LOCK | CcMasterSpinLock | 
| KSPIN_LOCK | CcVacbSpinLock | 
| KSPIN_LOCK | MmPfnLock | 
| KSPIN_LOCK | MmSystemSpaceLock | 
| BOOLEAN | KiI386PentiumLockErrataPresent = FALSE | 
| BOOLEAN | KiIgnoreUnexpectedTrap07 = FALSE | 
| PVOID | Ki387RoundModeTable | 
| PVOID | Ki386IopmSaveArea | 
| ULONG | KeI386ForceNpxEmulation | 
| WCHAR | CmDisabledFloatingPointProcessor [] | 
| UCHAR | CmpCyrixID [] | 
| UCHAR | CmpIntelID [] | 
| UCHAR | CmpAmdID [] | 
| PVOID | ScPatchFxb | 
| PVOID | ScPatchFxe | 
| BOOLEAN | KeI386XMMIPresent | 
| KE_ZERO_PAGE_ROUTINE | KeZeroPage = KiZeroPage | 
| KE_ZERO_PAGE_ROUTINE | KeZeroPageFromIdleThread = KiZeroPage | 
| ULONG | Ki486CompatibilityLock | 
| KIDTENTRY | IDT [] | 
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
 Referenced by KiGetCacheInformation().  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
 Referenced by KiI386PentiumLockErrataFixup().  | 
  
      
  | 
  
| 
 
 Definition at line 1688 of file kernlini.c. Referenced by KiInitMachineDependent(), and WinHelpA().  | 
  
      
  | 
  
| 
 
 Referenced by KiInitializeKernel().  | 
  
      
  | 
  
| 
 
 Definition at line 41 of file kernlini.c. Referenced by KeSetup80387OrEmulate().  | 
  
      
  | 
  
| 
 
 Definition at line 194 of file kernlini.c. 
 
  | 
  
      
  | 
  
| 
 
 Definition at line 1998 of file kernlini.c. References Ke386ConfigureCyrixProcessor(). Referenced by CmpConfigureProcessors(). 
 
  | 
  
      
  | 
  
| 
 
 Definition at line 2008 of file kernlini.c. References CmDisabledFloatingPointProcessor, CmRegistryMachineHardwareDescriptionSystemName, CmTypeName, Compare(), FALSE, FloatingPointProcessor, is, it, KeActiveProcessors, KeFeatureBits, KeGetPcr, KeI386ForceNpxEmulation, KeI386NpxPresent, KeRevertToUserAffinityThread(), KeSetSystemAffinityThread(), KF_FXSR, KF_MMX, KF_XMMI, Ki387RoundModeTable, KiLockDispatcherDatabase, KiMoveRegTree(), KiUnlockDispatcherDatabase(), move, NT_SUCCESS, NTSTATUS(), NULL, ObjectAttributes, RtlInitUnicodeString(), Status, the, TRAP332_GATE, and TRUE. Referenced by PspInitializeSystemDll(). 
 
  | 
  
      
  | 
  
| 
 
 Referenced by KiInitMachineDependent().  | 
  
      
  | 
  
| 
 
 Referenced by KiInitMachineDependent().  | 
  
      
  | 
  
| 
 
 Referenced by KiInitMachineDependent().  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
 Definition at line 168 of file mtrramd.c. References AMDK6_MTRR_MSR, AMDK6_MTRR_TYPE_DISABLED, AMDK6_REGION_UNUSED, AmdK6RegionCount, AmdK6Regions, AmdMtrrHwUsageCount, _AMDK6_MTRR_REGION::BaseAddress, DBGMSG, KeAcquireSpinLock, KeInitializeSpinLock(), KeReleaseSpinLock(), KiAmdK6Mtrr, KiAmdK6MTRRAddRegionFromHW(), KiRangeLock, MAX_K6_REGIONS, RDMSR(), _AMDK6_MTRR_REGION::RegionFlags, and _AMDK6_MTRR_MSR_IMAGE::u. 
 
  | 
  
      
  | 
  
| 
 
 Definition at line 1509 of file kernlini.c. References ASSERT, CPU_AMD, CPU_INTEL, CPU_NONE, CPUID(), CPUID_REG_COUNT, FALSE, KeGetPcr, KiGetCpuVendor(), and TRUE. Referenced by KiInitializeKernel(). 
 
  | 
  
      
  | 
  
| 
 
 Definition at line 1110 of file kernlini.c. References Buffer, CmpAmdID, CmpCyrixID, CmpIntelID, CPU_AMD, CPU_CYRIX, CPU_INTEL, CPU_NONE, CPU_UNKNOWN, CPUID(), and KeGetCurrentPrcb. Referenced by KiGetCacheInformation(). 
 
  | 
  
      
  | 
  
| 
 
 Referenced by KiInitializeKernel().  | 
  
      
  | 
  
| 
 
 Definition at line 2460 of file kernlini.c. References ASSERT, IDT_SKIP, KeGetPcr, KiDisableInterrupts(), KiRestoreInterrupts(), MmAllocateIndependentPages(), MmSetPageProtection(), PAGE_SIZE, and Status. Referenced by KiInitMachineDependent(). 
 
  | 
  
      
  | 
  ||||||||||||||||
| 
 
  | 
  
      
  | 
  ||||||||||||||||||||||||||||
| 
 
 Definition at line 246 of file kernlini.c. References APC_LEVEL, CcMasterSpinLock, CcVacbSpinLock, DISPATCH_LEVEL, ExAllocatePoolWithTag, EXCEPTION_EXECUTE_HANDLER, ExpInitializeExecutive(), FALSE, HIGH_LEVEL, Index, KeBugCheck(), KeBugCheckEx(), KeFeatureBits, KeGetPcr, KeI386CpuStep, KeI386CpuType, KeI386FxsrPresent, KeI386NpxPresent, KeI386XMMIPresent, KeInitializeProcess(), KeInitializeSpinLock(), KeInitializeThread(), KeLowerIrql(), KeMaximumIncrement, KeProcessorArchitecture, KeProcessorLevel, KeProcessorRevision, KeRaiseIrql(), KeReleaseSpinLock(), KeSetPriorityThread(), KF_3DNOW, KF_CMPXCHG8B, KF_FXSR, KF_GLOBAL_PAGE, KF_MMX, KF_MTRR, KF_PAT, KF_RDTSC, KF_XMMI, Ki386IopmSaveArea, Ki486CompatibilityLock, KiAdjustDpcThreshold, KiBootFeatureBits, KiComputeReciprocal(), KiContextSwapLock, KiDispatcherLock, KiFreezeExecutionLock, KiGetCacheInformation(), KiGetFeatureBits(), KiIdleSummary, KiInitSystem(), KiIsNpxPresent(), KiMaximumDpcQueueDepth, KiMinimumDpcRate, KiQueuedSpinLockContext, KiSetCR0Bits(), KiSetProcessorType(), KiTimeIncrementReciprocal, KiTimeIncrementShiftCount, KiTryToAcquireQueuedSpinLock(), LockQueueContextSwapLock, LockQueueDispatcherLock, LockQueueMasterLock, LockQueuePfnLock, LockQueueSystemSpaceLock, LockQueueVacbLock, MmCreateKernelStack(), MmPfnLock, MmSystemSpaceLock, NULL, PAGE_SIZE, PagedPool, PKSTART_ROUTINE, PKSYSTEM_ROUTINE, PoInitializePrcb(), _LOADER_PARAMETER_BLOCK::Prcb, RET, Running, SetMember, TRUE, and USHORT. 
 
  | 
  
      
  | 
  
| 
 
 Definition at line 275 of file mtrr.c. References _RANGE_INFO::Capabilities, DBGMSG, _RANGE_INFO::Default, _RANGE_INFO::DefaultCachedType, ExAllocatePoolWithTag, ExFreePool(), FALSE, GROW_RANGE_TABLE, Index, KeFeatureBits, KeGetCurrentPrcb, KeGetPcr, KeInitializeSpinLock(), KF_MTRR, KiAddRange(), KiMaskToLength(), KiRangeInfo, KiRangeLock, MASK_OVERFLOW_MASK, _RANGE_INFO::MaxRange, MTRR_CAPABILITIES, MTRR_DEFAULT, MTRR_MASK_BASE, MTRR_MASK_MASK, MTRR_MSR_CAPABILITIES, MTRR_MSR_DEFAULT, MTRR_MSR_VARIABLE_BASE, MTRR_MSR_VARIABLE_MASK, MTRR_TYPE_MAX, MTRR_TYPE_UC, MTRR_TYPE_WB, MTRR_TYPE_WT, MTRR_VARIABLE_BASE, MTRR_VARIABLE_MASK, _RANGE_INFO::MtrrWorkaround, NonPagedPool, _RANGE_INFO::NoRange, NT_SUCCESS, NTSTATUS(), NULL, ONE_RANGE, _RANGE_INFO::Ranges, _RANGE_INFO::RangesValid, RDMSR(), Size, Status, TRUE, _MTRR_VARIABLE_MASK::u, _MTRR_VARIABLE_BASE::u, _MTRR_DEFAULT::u, and _MTRR_CAPABILITIES::u. 
 
  | 
  
      
  | 
  
| 
 
 Definition at line 119 of file pat.c. References ASSERT, _NEW_PAT::Attributes, HIGH_LEVEL, _PAT::hw, KeActiveProcessors, KeFeatureBits, KeGetCurrentPrcb, KeRaiseIrql(), KF_PAT, KiIpiStallOnPacketTargets(), KiLoadPAT(), KiLoadPATTarget(), KiLockContextSwap, KiUnlockContextSwap, MmEnablePAT(), NULL, PAT_TYPE_STRONG_UC, PAT_TYPE_USWC, PAT_TYPE_WB, PAT_TYPE_WEAK_UC, _NEW_PAT::Processor, Size, _NEW_PAT::TargetCount, and _NEW_PAT::TargetPhase. 
 
  | 
  
      
  | 
  ||||||||||||||||||||||||||||||||
| 
 
 Definition at line 749 of file kernlini.c. References KiProcessorBlock, PCR_MAJOR_VERSION, PCR_MINOR_VERSION, PRCB_MAJOR_VERSION, PRCB_MINOR_VERSION, and TRUE. Referenced by KeStartAllProcessors(). 
 
  | 
  
      
  | 
  
| 
 
 Definition at line 944 of file kernlini.c. 
 
  | 
  
      
  | 
  ||||||||||||
| 
 
 Definition at line 992 of file kernlini.c. References NULL. 
 
  | 
  
      
  | 
  
| 
 
 Definition at line 1691 of file kernlini.c. References ASSERT, CPUID(), FALSE, HalFrameBufferCachingInformation, HalQuerySystemInformation, IDENTITY_MAP, Index, KeActiveProcessors, KeDelayExecutionThread(), KeFeatureBits, KeGetCurrentPrcb, KeNumberProcessors, KeQueryPerformanceCounter(), KeRevertToUserAffinityThread(), KernelMode, KeSetSystemAffinityThread(), KeZeroPage, KeZeroPageFromIdleThread, KF_AMDK6MTRR, KF_FXSR, KF_GLOBAL_PAGE, KF_LARGE_PAGE, KF_MTRR, KF_PAT, KF_RDTSC, KF_WORKING_PTE, KF_XMMI, Ki386ClearIdentityMap(), Ki386CreateIdentityMap(), Ki386EnableCurrentLargePage(), Ki386EnableCurrentLargePageEnd, Ki386EnableFxsr(), Ki386EnableGlobalPage(), Ki386EnableTargetLargePage(), Ki386EnableXMMIExceptions(), Ki386UseSynchronousTbFlush(), KiAmdK6InitializeMTRR(), KiI386PentiumLockErrataFixup(), KiI386PentiumLockErrataPresent, KiInitializeMTRR(), KiInitializePAT(), KiIpiGenericCall(), KiXMMIZeroPage(), KiXMMIZeroPageNoSave(), L, MAX_ATTEMPTS, NT_SUCCESS, NTSTATUS(), NULL, PKIPI_BROADCAST_WORKER, RDTSC(), ScPatchFxb, ScPatchFxe, Size, Status, TRUE, and USHORT. 
 
  | 
  
      
  | 
  
| 
 
 Referenced by KiInitializeKernel().  | 
  
      
  | 
  ||||||||||||
| 
 
 Definition at line 2297 of file kernlini.c. References KeyName, NT_SUCCESS, NtDeleteKey(), NTSTATUS(), NULL, ObjectAttributes, Status, USHORT, and ValueName. Referenced by KeSetup80387OrEmulate(). 
 
  | 
  
      
  | 
  
| 
 
 Referenced by KiInitializeKernel().  | 
  
      
  | 
  
| 
 
 Referenced by KiInitializeKernel().  | 
  
      
  | 
  
| 
 
 Definition at line 1072 of file kernlini.c. References IDT, Index, and USHORT. 
 
  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
 Referenced by KiInitMachineDependent().  | 
  
      
  | 
  
| 
 
 Referenced by KiInitMachineDependent().  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
 Definition at line 47 of file kernlini.c.  | 
  
      
  | 
  
| 
 
 Definition at line 48 of file kernlini.c.  | 
  
      
  | 
  
| 
 
 Definition at line 184 of file kernlini.c.  | 
  
      
  | 
  
| 
 
 Definition at line 187 of file kernlini.c.  | 
  
      
  | 
  
| 
 
 Definition at line 185 of file kernlini.c.  | 
  
      
  | 
  
| 
 
 Definition at line 186 of file kernlini.c.  | 
  
      
  | 
  
| 
 
 Definition at line 243 of file kernlini.c. Referenced by KiSwapIDT().  | 
  
      
  | 
  
| 
 
 Definition at line 183 of file kernlini.c. Referenced by KeSetup80387OrEmulate().  | 
  
      
  | 
  
| 
 
 Definition at line 208 of file kernlini.c.  | 
  
      
  | 
  
| 
 
 Definition at line 228 of file kernlini.c. Referenced by KiInitMachineDependent(), and MiZeroPhysicalPage().  | 
  
      
  | 
  
| 
 
 Definition at line 229 of file kernlini.c. Referenced by KiInitMachineDependent(), and MmZeroPageThread().  | 
  
      
  | 
  
| 
 
 Definition at line 182 of file kernlini.c. Referenced by Ke386CallBios(), and KiInitializeKernel().  | 
  
      
  | 
  
| 
 
 Definition at line 181 of file kernlini.c. Referenced by KeSetup80387OrEmulate().  | 
  
      
  | 
  
| 
 
 Definition at line 237 of file kernlini.c. Referenced by KiInitializeKernel().  | 
  
      
  | 
  
| 
 
 Definition at line 173 of file kernlini.c. Referenced by KiInitMachineDependent().  | 
  
      
  | 
  
| 
 
 Definition at line 174 of file kernlini.c.  | 
  
      
  | 
  
| 
 
 Definition at line 49 of file kernlini.c.  | 
  
      
  | 
  
| 
 
 Definition at line 50 of file kernlini.c.  | 
  
      
  | 
  
| 
 
 Definition at line 190 of file kernlini.c. Referenced by KiInitMachineDependent().  | 
  
      
  | 
  
| 
 
 Definition at line 191 of file kernlini.c. Referenced by KiInitMachineDependent().  | 
  
 1.3.7