47 (DriveNumber >= 0x80) &&
100 TRACE(
"Initializing BIOS drive 0x%x.\n", DriveNumber);
117 ULONG SectorOffsetInStartBlock;
118 ULONG CopyLengthInStartBlock;
120 ULONG SectorOffsetInEndBlock;
124 TRACE(
"CacheReadDiskSectors() DiskNumber: 0x%x StartSector: %I64d SectorCount: %d Buffer: 0x%x\n", DiskNumber, StartSector,
SectorCount,
Buffer);
140 BlockCount = (EndBlock - StartBlock) + 1;
141 TRACE(
"StartBlock: %d SectorOffsetInStartBlock: %d CopyLengthInStartBlock: %d EndBlock: %d SectorOffsetInEndBlock: %d BlockCount: %d\n", StartBlock, SectorOffsetInStartBlock, CopyLengthInStartBlock, EndBlock, SectorOffsetInEndBlock, BlockCount);
152 if (CacheBlock ==
NULL)
179 for (Idx=StartBlock+1; BlockCount>1; Idx++)
185 if (CacheBlock ==
NULL)
218 if (CacheBlock ==
NULL)
254 TRACE(
"CacheForceDiskSectorsIntoCache() DiskNumber: 0x%x StartSector: %d SectorCount: %d\n", DiskNumber, StartSector,
SectorCount);
267 BlockCount = (EndBlock - StartBlock) + 1;
272 for (Idx=StartBlock; Idx<(StartBlock+BlockCount); Idx++)
278 if (CacheBlock ==
NULL)
295 ULONG AmountReleased;
297 TRACE(
"CacheReleaseMemory() MinimumAmountToRelease = %d\n", MinimumAmountToRelease);
306 for (AmountReleased=0; AmountReleased<MinimumAmountToRelease; )
320 return (AmountReleased >= MinimumAmountToRelease);
DBG_DEFAULT_CHANNEL(CACHE)
BOOLEAN CacheInitializeDrive(UCHAR DriveNumber)
BOOLEAN CacheReadDiskSectors(UCHAR DiskNumber, ULONGLONG StartSector, ULONG SectorCount, PVOID Buffer)
VOID CacheInvalidateCacheData(VOID)
_Must_inspect_result_ FORCEINLINE BOOLEAN IsListEmpty(_In_ const LIST_ENTRY *ListHead)
#define MachDiskGetCacheableBlockCount(Drive)
BOOLEAN CacheForceDiskSectorsIntoCache(UCHAR DiskNumber, ULONGLONG StartSector, ULONG SectorCount)
CACHE_DRIVE CacheManagerDrive
LIST_ENTRY CacheBlockHead
PCACHE_BLOCK CacheInternalGetBlockPointer(PCACHE_DRIVE CacheDrive, ULONG BlockNumber)
FORCEINLINE PLIST_ENTRY RemoveHeadList(_Inout_ PLIST_ENTRY ListHead)
PFN_NUMBER TotalPagesInLookupTable
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
#define MachDiskGetDriveGeometry(Drive, Geom)
BOOLEAN CacheInternalFreeBlock(PCACHE_DRIVE CacheDrive)
BOOLEAN CacheManagerInitialized
BOOLEAN CacheReleaseMemory(ULONG MinimumAmountToRelease)
#define InitializeListHead(ListHead)
#define RtlZeroMemory(Destination, Length)
#define RtlCopyMemory(Destination, Source, Length)
BOOLEAN CacheManagerDataInvalid
FORCEINLINE VOID FrLdrTempFree(PVOID Allocation, ULONG Tag)