{
LARGE_INTEGER ActualOffset;
SIZE_TActualLength;
ULONG PageOffset;
//// We only support boot disks for now//ASSERT(DeviceExtension->DiskType == RAMDISK_BOOT_DISK);
//// Calculate the actual offset in the drive//
ActualOffset.QuadPart = DeviceExtension->DiskOffset + Offset.QuadPart;
//// Calculate pages spanned for the mapping//
ActualLength = ADDRESS_AND_SIZE_TO_SPAN_PAGES(ActualOffset.QuadPart, Length);
//// And convert this back to bytes//
ActualLength <<= PAGE_SHIFT;
//// Get the offset within the page//
PageOffset = BYTE_OFFSET(ActualOffset.QuadPart);
//// Calculate actual base address where we mapped this//BaseAddress = (PVOID)((ULONG_PTR)BaseAddress - PageOffset);
//// Unmap the I/O space we got from the loader//MmUnmapIoSpace(BaseAddress, ActualLength);
}
Generated on Sat May 26 2012 04:46:32 for ReactOS by
1.7.6.1
ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.