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);
BOOLEAN CacheForceDiskSectorsIntoCache(UCHAR DiskNumber, ULONGLONG StartSector, ULONG SectorCount)
BOOLEAN CacheInternalFreeBlock(PCACHE_DRIVE CacheDrive)
PCACHE_BLOCK CacheInternalGetBlockPointer(PCACHE_DRIVE CacheDrive, ULONG BlockNumber)
#define DBG_DEFAULT_CHANNEL(ch)
#define MachDiskGetDriveGeometry(Drive, Geom)
#define MachDiskGetCacheableBlockCount(Drive)
PFN_NUMBER TotalPagesInLookupTable
FORCEINLINE VOID FrLdrTempFree(PVOID Allocation, ULONG Tag)
VOID CacheInvalidateCacheData(VOID)
BOOLEAN CacheReadDiskSectors(UCHAR DiskNumber, ULONGLONG StartSector, ULONG SectorCount, PVOID Buffer)
BOOLEAN CacheManagerDataInvalid
CACHE_DRIVE CacheManagerDrive
BOOLEAN CacheManagerInitialized
BOOLEAN CacheInitializeDrive(UCHAR DriveNumber)
BOOLEAN CacheReleaseMemory(ULONG MinimumAmountToRelease)
#define IsListEmpty(ListHead)
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
LIST_ENTRY CacheBlockHead
ULONG BytesPerSector
Number of bytes per sector.
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)