#include "ki.h"
#include "mtrr.h"
Go to the source code of this file.
Classes | |
struct | _ONE_RANGE |
struct | _MTRR_RANGE |
struct | _RANGE_INFO |
struct | _NEW_RANGE |
Defines | |
#define | STATIC |
#define | IDBG 0 |
#define | DBGMSG(a) |
#define | GROW_RANGE_TABLE 4 |
#define | MOV_EAX_CR4 _emit { 0Fh, 20h, E0h } |
#define | MOV_CR4_EAX _emit { 0Fh, 22h, E0h } |
Typedefs | |
typedef _ONE_RANGE | ONE_RANGE |
typedef _ONE_RANGE * | PONE_RANGE |
typedef _MTRR_RANGE | MTRR_RANGE |
typedef _MTRR_RANGE * | PMTRR_RANGE |
typedef _RANGE_INFO | RANGE_INFO |
typedef _RANGE_INFO * | PRANGE_INFO |
typedef _NEW_RANGE | NEW_RANGE |
typedef _NEW_RANGE * | PNEW_RANGE |
Functions | |
VOID | KiInitializeMTRR (IN BOOLEAN LastProcessor) |
BOOLEAN | KiRemoveRange (IN PNEW_RANGE NewRange, IN ULONGLONG Base, IN ULONGLONG Limit, IN PBOOLEAN RemoveThisType) |
VOID | KiAddRange (IN PNEW_RANGE NewRange, IN ULONGLONG Base, IN ULONGLONG Limit, IN UCHAR Type) |
VOID | KiStartEffectiveRangeChange (IN PNEW_RANGE NewRange) |
VOID | KiCompleteEffectiveRangeChange (IN PNEW_RANGE NewRange) |
STATIC ULONG | KiRangeWeight (IN PONE_RANGE Range) |
STATIC ULONG | KiFindFirstSetLeftBit (IN ULONGLONG Set) |
STATIC ULONG | KiFindFirstSetRightBit (IN ULONGLONG Set) |
VOID | KiLoadMTRRTarget (IN PKIPI_CONTEXT SignalDone, IN PVOID Context, IN PVOID Parameter2, IN PVOID Parameter3) |
NTSTATUS | KiLoadMTRR (IN PNEW_RANGE Context) |
VOID | KiSynchronizeMTRRLoad (IN PNEW_RANGE Context) |
ULONGLONG | KiMaskToLength (IN ULONGLONG Mask) |
ULONGLONG | KiLengthToMask (IN ULONGLONG Length) |
NTSTATUS | KiAmdK6MtrrSetMemoryType (IN ULONG BaseAddress, IN ULONG NumberOfBytes, IN MEMORY_CACHING_TYPE CacheType) |
VOID | KiAmdK6MtrrWRMSR (VOID) |
VOID | KeRestoreMtrr (VOID) |
NTSTATUS | KeSetPhysicalCacheTypeRange (IN PHYSICAL_ADDRESS PhysicalAddress, IN ULONG NumberOfBytes, IN MEMORY_CACHING_TYPE CacheType) |
Variables | |
KSPIN_LOCK | KiRangeLock |
RANGE_INFO | KiRangeInfo |
|
|
|
Definition at line 55 of file mtrr.c. Referenced by KiAddRange(), and KiInitializeMTRR(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
Referenced by KiInitializeMTRR(). |
|
Referenced by KiCompleteEffectiveRangeChange(). |
|
Referenced by KiLoadMTRRTarget(). |
|
Referenced by KiAddRange(), KiCompleteEffectiveRangeChange(), and KiRemoveRange(). |
|
|
|
|
|
Definition at line 526 of file mtrr.c. References ASSERT, KeAcquireSpinLock, KeFeatureBits, KeReleaseSpinLock(), KF_AMDK6MTRR, KiCompleteEffectiveRangeChange(), KiLoadMTRR(), KiRangeInfo, KiRangeLock, KiStartEffectiveRangeChange(), NT_SUCCESS, NULL, and _RANGE_INFO::RangesValid.
|
|
Definition at line 576 of file mtrr.c. References ASSERT, _RANGE_INFO::Capabilities, DBGMSG, _RANGE_INFO::DefaultCachedType, DISPATCH_LEVEL, ExPageLockHandle, FALSE, KeAcquireSpinLock, KeFeatureBits, KeReleaseSpinLock(), KF_AMDK6MTRR, KiAddRange(), KiAmdK6MtrrSetMemoryType(), KiCompleteEffectiveRangeChange(), KiRangeInfo, KiRangeLock, KiRemoveRange(), KiStartEffectiveRangeChange(), MmCached, MmLockPagableSectionByHandle(), MmNonCached, MmUnlockPagableImageSection(), MmUSWCCached, MmWriteCombined, MTRR_TYPE_MAX, MTRR_TYPE_UC, MTRR_TYPE_USWC, _RANGE_INFO::MtrrWorkaround, NT_SUCCESS, _RANGE_INFO::RangesValid, TRUE, and _MTRR_CAPABILITIES::u. Referenced by MmMapIoSpace().
|
|
Definition at line 992 of file mtrr.c. References _ONE_RANGE::Base, ExAllocatePoolWithTag, ExFreePool(), GROW_RANGE_TABLE, KiRangeInfo, _ONE_RANGE::Limit, _RANGE_INFO::MaxRange, NonPagedPool, _RANGE_INFO::NoRange, PONE_RANGE, _RANGE_INFO::Ranges, and _ONE_RANGE::Type. Referenced by KeSetPhysicalCacheTypeRange(), KiInitializeMTRR(), and KiRemoveRange().
|
|
|
|
Definition at line 754 of file mtrramd.c. References AMDK6_MTRR_MSR, KiAmdK6Mtrr, _AMDK6_MTRR_MSR_IMAGE::u, and WRMSR(). Referenced by KiLoadMTRR().
|
|
Definition at line 1112 of file mtrr.c. References ASSERT, _MTRR_RANGE::Base, _ONE_RANGE::Base, _RANGE_INFO::Capabilities, DBGMSG, _RANGE_INFO::Default, DISPATCH_LEVEL, ExFreePool(), FALSE, HIGH_LEVEL, Index, KeActiveProcessors, KeGetCurrentPrcb, KeRaiseIrql(), KiFindFirstSetLeftBit(), KiFindFirstSetRightBit(), KiIpiStallOnPacketTargets(), KiLengthToMask(), KiLoadMTRR(), KiLoadMTRRTarget(), KiLockContextSwap, KiMaskToLength(), KiRangeInfo, KiRangeWeight(), KiRemoveRange(), KiUnlockContextSwap, _ONE_RANGE::Limit, _MTRR_RANGE::Mask, MTRR_MASK_MASK, MTRR_MAX_RANGE_SHIFT, MTRR_PAGE_MASK, MTRR_PAGE_SIZE, MTRR_TYPE_MAX, MTRR_TYPE_UC, MTRR_TYPE_USWC, MTRR_TYPE_WB, MTRR_TYPE_WT, _RANGE_INFO::NoRange, NT_SUCCESS, NULL, PMTRR_RANGE, PONE_RANGE, _RANGE_INFO::Ranges, TRUE, _ONE_RANGE::Type, _MTRR_DEFAULT::u, _MTRR_CAPABILITIES::u, _MTRR_VARIABLE_MASK::u, and _MTRR_VARIABLE_BASE::u. Referenced by KeRestoreMtrr(), and KeSetPhysicalCacheTypeRange().
|
|
Definition at line 1690 of file mtrr.c. References ASSERT, and KiFindFirstSetLeft. Referenced by KiCompleteEffectiveRangeChange().
|
|
Definition at line 1669 of file mtrr.c. References ASSERT, and KiFindFirstSetRight. Referenced by KiCompleteEffectiveRangeChange(), KiLengthToMask(), and KiMaskToLength().
|
|
Referenced by KiInitMachineDependent(). |
|
Definition at line 1645 of file mtrr.c. References KiFindFirstSetRightBit(), MTRR_MAX_RANGE_SHIFT, and MTRR_RESVBIT_MASK. Referenced by KiCompleteEffectiveRangeChange().
|
|
Definition at line 1796 of file mtrr.c. References Index, is, it, KeFeatureBits, KF_AMDK6MTRR, KiAmdK6MtrrWRMSR(), KiDisableInterrupts(), KiRestoreInterrupts(), KiSynchronizeMTRRLoad(), MTRR_MSR_DEFAULT, MTRR_MSR_VARIABLE_BASE, MTRR_MSR_VARIABLE_MASK, RDMSR(), the, _MTRR_DEFAULT::u, and WRMSR().
|
|
Definition at line 1766 of file mtrr.c. References KiLoadMTRR(), PNEW_RANGE, and _NEW_RANGE::TargetPhase. Referenced by KiCompleteEffectiveRangeChange().
|
|
Definition at line 1624 of file mtrr.c. References KiFindFirstSetRightBit(), and MTRR_MAX_RANGE_SHIFT. Referenced by KiCompleteEffectiveRangeChange(), and KiInitializeMTRR().
|
|
Definition at line 1586 of file mtrr.c. References MTRR_TYPE_UC, MTRR_TYPE_USWC, MTRR_TYPE_WB, MTRR_TYPE_WP, and MTRR_TYPE_WT. Referenced by KiCompleteEffectiveRangeChange().
|
|
Definition at line 855 of file mtrr.c. References _ONE_RANGE::Base, DBGMSG, FALSE, KiAddRange(), KiRangeInfo, _ONE_RANGE::Limit, _RANGE_INFO::NoRange, NT_SUCCESS, PONE_RANGE, _RANGE_INFO::Ranges, TRUE, and _ONE_RANGE::Type. Referenced by KeSetPhysicalCacheTypeRange(), and KiCompleteEffectiveRangeChange().
|
|
Definition at line 1060 of file mtrr.c. References _RANGE_INFO::Capabilities, ExAllocatePoolWithTag, KiRangeInfo, NonPagedPool, _RANGE_INFO::NoRange, _RANGE_INFO::Ranges, and _MTRR_CAPABILITIES::u. Referenced by KeRestoreMtrr(), and KeSetPhysicalCacheTypeRange().
|
|
Definition at line 1993 of file mtrr.c. References KeGetCurrentPrcb, and KeNumberProcessors. Referenced by KiLoadMTRR().
|
|
Definition at line 272 of file mtrr.c. Referenced by KeRestoreMtrr(), KeSetPhysicalCacheTypeRange(), KiAddRange(), KiCompleteEffectiveRangeChange(), KiInitializeMTRR(), KiRemoveRange(), and KiStartEffectiveRangeChange(). |
|
Definition at line 265 of file mtrr.c. Referenced by KeRestoreMtrr(), KeSetPhysicalCacheTypeRange(), KiAmdK6InitializeMTRR(), KiAmdK6MtrrSetMemoryType(), and KiInitializeMTRR(). |